PageSourceSearch

https://www.eifel-direkt.de/_assets/1798f66a72c0609b2ee5b404d10475…/Components/Trigger.b7bdfaafb0df12c862c2.js

js eifel-direkt.de collected 2026-10-02 19:33:06 UTC 3,329 bytes, 101 lines download raw bytes

1/******/ (() => { // webpackBootstrap
2/******/ 	"use strict";
3// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
4(() => {
5// extracted by mini-css-extract-plugin
6
7})();
8
9// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
10(() => {
11
12;// ./packages/portal/Resources/Private/Components/Assistants/Shared/Scripts/Classes/page-state.ts
13/**
14 * LICENSE
15 *
16 * This software and its source code is protected by copyright law (Sec. 69a ff. UrhG).
17 * It is not allowed to make any kinds of modifications, nor must it be copied,
18 * or published without explicit permission. Misuse will lead to persecution.
19 *
20 * @copyright  2024 infomax websolutions GmbH
21 * @link       https://www.infomax-online.de
22 * @author     Benjamin Hofmann <[email protected]>
23 * @since      2024-06-03
24 */
25var PAGE_STATES;
26(function (PAGE_STATES) {
27  PAGE_STATES["NOSCROLL"] = "noscroll";
28})(PAGE_STATES || (PAGE_STATES = {}));
29window.imx = window.imx || {};
30window.imx.pagestate = window.imx.pagestate || {
31  [PAGE_STATES.NOSCROLL]: 0
32};
33class PageState {
34  root;
35  constructor(root = document.documentElement || document.querySelector('html')) {
36    this.root = root;
37  }
38  has(state) {
39    return window.imx.pagestate[state] > 0;
40  }
41  add(state) {
42    window.imx.pagestate[state]++;
43    // Only trigger class addition and event if we didn't have that state before.
44    if (window.imx.pagestate[state] === 1) {
45      window.requestAnimationFrame(() => this.root.classList.add(this.prefix(state)));
46      document.dispatchEvent(new CustomEvent('pageState.add', {
47        detail: state
48      }));
49    }
50  }
51  remove(state) {
52    window.imx.pagestate[state]--;
53    if (window.imx.pagestate[state] < 0) {
54      window.imx.pagestate[state] = 0;
55    }
56    // Only trigger class removal and event if we did have that state before.
57    if (window.imx.pagestate[state] === 0) {
58      window.requestAnimationFrame(() => this.root.classList.remove(this.prefix(state)));
59      document.dispatchEvent(new CustomEvent('pageState.remove', {
60        detail: state
61      }));
62    }
63  }
64  prefix(state) {
65    return `-state-${state}`;
66  }
67}
68;// ./packages/portal/Resources/Private/Components/Structures/FulltextSearch/Components/Trigger/Scripts/base/_init.ts
69
70const state = new PageState();
71document.addEventListener('DOMContentLoaded', () => {
72  const overlay = document.querySelector('.fulltextSearch__trigger');
73  const popup = document.getElementById('popup--fulltextSearch');
74  if (!overlay || !popup) {
75    console.error('Overlay or popup not found.');
76    return;
77  }
78  const focusables = popup.querySelectorAll('a, button, input');
79  const firstFocusable = focusables[0];
80  const lastFocusable = focusables[focusables.length - 1];
81  firstFocusable.addEventListener('keydown', event => {
82    if (event.key === 'Tab' && event.shiftKey) {
83      closeOverlay();
84    }
85  });
86  lastFocusable.addEventListener('keydown', event => {
87    if (event.key === 'Tab' && !event.shiftKey) {
88      closeOverlay();
89    }
90  });
91  function closeOverlay() {
92    console.log('Closing overlay');
93    popup.hidden = true;
94    expandable.controls.forEach(button => button.setAttribute('aria-expanded', 'false'));
95    state.remove(PAGE_STATES.NOSCROLL);
96  }
97});
98})();
99
100/******/ })()
101;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.