@aarhus-university/au-designsystem-delphinus 0.34.13 → 0.34.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/build/js/app.js.map +1 -1
- package/build/js/demo/app.ts +4 -4
- package/build/js/production/app.ts +3 -3
- package/build/projects/bachelor-applications/js/app.js.map +1 -1
- package/build/projects/bachelor-applications/style.css +1 -1
- package/build/projects/bachelor-applications/style.css.map +1 -1
- package/build/projects/brightspace/style.css +1 -1
- package/build/projects/brightspace/style.css.map +1 -18
- package/build/projects/course-catalogue/js/app.js.map +1 -1
- package/build/projects/course-catalogue/style.css +1 -1
- package/build/projects/course-catalogue/style.css.map +1 -1
- package/build/projects/medarbejdere/js/app.js.map +1 -1
- package/build/projects/medarbejdere/style.css +1 -1
- package/build/projects/medarbejdere/style.css.map +13 -2
- package/build/projects/mitstudie/js/app.js.map +1 -1
- package/build/projects/mitstudie/style.css +1 -1
- package/build/projects/mitstudie/style.css.map +1 -1
- package/build/projects/typo3/style.css +1 -1
- package/build/projects/typo3/style.css.map +3 -2
- package/build/style.css +1 -1
- package/build/style.css.map +1 -1
- package/package.json +1 -1
- package/source/js/demo/app.ts +4 -4
- package/source/js/production/app.ts +3 -3
- package/source/markup/icons.pug +1 -1
- package/source/markup/navigation.pug +1 -1
- package/source/markup/partials/mixins/_horizontal-scroll.pug +5 -3
- package/source/markup/partials/page-templates/_layout.pug +1 -1
- package/source/projects/brightspace/style.scss +0 -17
- package/source/projects/medarbejdere/course-config.pug +2 -5
- package/source/projects/medarbejdere/holiday-overview.pug +1 -4
- package/source/projects/medarbejdere/index.pug +20 -7
- package/source/projects/medarbejdere/markup/_medarbejdere-template.pug +96 -0
- package/source/projects/medarbejdere/markup/_pure-profile-editor.pug +246 -0
- package/source/projects/medarbejdere/pure-profile-editor-empty.pug +14 -0
- package/source/projects/medarbejdere/pure-profile-editor-links.pug +82 -0
- package/source/projects/medarbejdere/pure-profile-editor-profile-text.pug +35 -0
- package/source/projects/medarbejdere/pure-profile-editor-subject-areas.pug +41 -0
- package/source/projects/medarbejdere/pure-profile-editor-teaching.pug +28 -0
- package/source/projects/medarbejdere/pure-profile-editor.pug +15 -0
- package/source/projects/medarbejdere/roles-config.pug +2 -5
- package/source/projects/medarbejdere/style/_pure-profile-editor.scss +187 -0
- package/source/projects/medarbejdere/style.scss +17 -1
- package/source/projects/typo3/employee-profiles/mixins/_person-profile.pug +2 -2
- package/source/projects/typo3/employee-profiles/mixins/_profile-header.pug +2 -2
- package/source/projects/typo3/style/_contact-list.scss +1 -0
- package/source/projects/typo3/style/_profile-header.scss +78 -58
- package/source/projects/typo3/style/_typo3-breakpoints.scss +3 -0
- package/source/projects/typo3/style/_typo3-component-sass-variables.scss +11 -0
- package/source/projects/typo3/style/_typo3-sass-variables.scss +0 -3
- package/source/projects/typo3/style.scss +2 -1
- package/source/projects/typo3/typo3-markup/_typo3-header.pug +1 -1
- package/source/style/_sass-variables.scss +4 -0
- package/source/style/module/_empty-state.scss +4 -0
- package/source/style/module/_horizontal-scroll.scss +1 -1
- package/source/projects/medarbejdere/demo.scss +0 -6
- package/source/projects/typo3/style/_component-sass-variables.scss +0 -3
- package/source/projects/typo3/style/typo3-news-list.scss +0 -616
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## 0.34.14 (February 17, 2023)
|
|
2
|
+
|
|
3
|
+
### Core Delphinus Updates
|
|
4
|
+
* Adds icons for minimizing and maximizing.
|
|
5
|
+
* Fixes localization of confirm message in Copy to Clipboard component.
|
|
6
|
+
|
|
7
|
+
### Delphinus Projects Updates
|
|
8
|
+
#### Brightspace
|
|
9
|
+
* Optimized CSS file.
|
|
10
|
+
|
|
11
|
+
#### medarbejdere.au.dk
|
|
12
|
+
* Adds initial stuff for Pure Profile Editor
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
## 0.34.13 (February 14, 2023)
|
|
2
17
|
|
|
3
18
|
### Core Delphinus Updates
|
package/build/js/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./source/js/components/helpers.ts","webpack:///./source/js/components/nav.ts","webpack:///./source/js/components/tabs.ts","webpack:///./source/js/components/toolbar.ts","webpack:///./source/js/production/app.ts","webpack:///./source/js/components/ready.ts","webpack:///./source/js/components/table.ts","webpack:///./source/js/components/content-toggle.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","isElementWithClassNameInEventPath","event","className","found","composedPath","forEach","classList","contains","convertRemToPixels","rem","parseFloat","getComputedStyle","document","documentElement","fontSize","isViewportBelow","mediaQuery","Math","max","clientWidth","innerWidth","parseInt","getPropertyValue","replace","findNav","element","parent","parentElement","closeResponsiveNav","navElements","keepOpen","button","querySelector","focus","setAttribute","remove","setResponsiveToggle","cleanUp","querySelectorAll","clickEvent","nav","navItems","lastNavItem","add","firstElement","transitionListener","toggle","removeEventListener","addEventListener","toggleMenu","ariaExpanded","getAttribute","push","setResponsiveNav","navElement","navItemsParent","isOverflownClass","hasOverflowClass","isActiveClass","hasOverflown","length","offsetTop","isActive","bodyClickEvent","e","target","isBelowViewportLimit","widthInRem","getBaseFontSize","mediaWidth","getMediaWidthBasedOnModifier","switchTab","tabs","panels","oldTab","newTab","_","callback","index","console","log","removeAttribute","Array","indexOf","from","id","link","hidden","oldIndex","dispatchEvent","CustomEvent","bubbles","detail","tab","closeAllContentTogglesInToolbar","toolbar","content","findToolbar","windowInnerWidth","tabbedObjects","setTabs","tabObject","rendered","domElement","dataInitial","tabbed","initial","tablist","section","parentNode","expandAll","expandAllEvent","panel","tabClickEvent","preventDefault","currentTab","currentTarget","tabIndex","tabKeyEvent","dir","setTabbedContent","destroyTabs","fn","readyState","ready","body","bgColor","existingMeta","meta","createElement","getElementsByTagName","appendChild","setMetaThemeColor","table","head","foot","headers","h","innerHTML","rowContainers","rc","tr","cell","setResponsiveTable","onClick","beforeCallback","afterCallback","setContentClose","contentClose","click","hasAttribute","cc","btnClick","setContentToggle","popout","allowedDistance","popoutX","width","popoutWidth","getBoundingClientRect","x","distance","offsetWidth","style","setProperty","contentToggleEdgeHandling","lockBodyScroll","unlockBodyScroll"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ,EAAGI,EACHC,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQF,GAAUG,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAQ,EAAoBK,EAAIF,EAGxBH,EAAoBM,EAAIP,EAGxBC,EAAoBO,EAAI,SAASf,EAASgB,EAAMC,GAC3CT,EAAoBU,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhET,EAAoBe,EAAI,SAASvB,GACX,oBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,OAAO,KAQvDlB,E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AQsI,wBAAwBC,EAE9CC,EAAWrJ,SAASiH,KAAKqC,YAAcP,EAAkBC,EAAUE,EAErEG,EAAW,GACbxI,EAAQ0I,MAAMC,YAAY,oCAAqCH,SCjG7DI,CAA0BX,GD3DX,MACrB,MAAM7B,EAAOjH,SAASoB,cAAc,SAChCjB,EAAgB,gBAAkBA,EAAgB,sBACpD8G,WAAMvH,UAAUqC,IAAI,qBCyDhB2H,IAEDtE,GAAyBF,EAAgCG,EAAYD,IACtE,CAACA,EAAsBjE,KACrB,MAAMmB,EAAenB,EAAOoB,aAAa,iBACnC4C,EAAUE,EAAYD,GACP,SAAjB9C,EACF6C,WAASzF,UAAUqC,IAAI,uBAEvBoD,WAASzF,UAAU6B,OAAO,uBAG5B6D,EAAQhD,iBAAiB,QAAU/C,IAC5BA,EAAMgE,OAAuB3D,UAAUC,SAAS,qBAC/CP,EAAkCC,EAAqB,8BAC3D6F,EAAgCC,GDpEnB,MACvB,MAAM8B,EAAOjH,SAASoB,cAAc,QACpC6F,WAAMvH,UAAU6B,OAAO,oBCmEboI,UAOV1M,OAAOmF,iBAAiB,OAAQ,KAC9BkD,EAAmBrI,OAAOuD,aAG5BvD,OAAOmF,iBAAiB,SAAU,KAC5BkD,EAAmB,GAAKrI,OAAOuD,aAAe8E,IAChDA,EAAmBrI,OAAOuD,WAC1BS,EAAYxB,QAASZ,GAAM4D,EAAiBxB,EAAapC,IACzD2G","file":"app.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* eslint-disable wrap-iife */\n/* eslint-disable import/prefer-default-export */\n/* eslint-env browser */\nconst copyToClipboard = (str: string): void => {\n // eslint-disable-next-line no-console\n navigator.clipboard.writeText(str).then(() => console.log(`${str} written to clipboard`));\n};\n\nconst isElementWithClassNameInEventPath = (event: MouseEvent, className: string): boolean => {\n let found = false;\n const path = event.composedPath();\n path.forEach((p: EventTarget): void => {\n if ((p as HTMLElement).classList) {\n if ((p as HTMLElement).classList.contains(className)) {\n found = true;\n }\n }\n });\n return found;\n};\n\nconst setMetaThemeColor = (): void => {\n const body = document.querySelector('body');\n if (body) {\n const bgColor = window.getComputedStyle(body).getPropertyValue('--color-background');\n const existingMeta = document.querySelector('meta[name=\"theme-color\"]') as HTMLMetaElement;\n if (existingMeta) {\n existingMeta.content = bgColor;\n } else {\n const meta = document.createElement('meta');\n meta.name = 'theme-color';\n meta.content = bgColor;\n document.getElementsByTagName('head')[0].appendChild(meta);\n }\n }\n};\n\nconst getBaseFontSize = (): number => parseInt(window.getComputedStyle(document.documentElement).fontSize.replace('px', ''), 10);\n\n// eslint-disable-next-line max-len\nconst convertRemToPixels = (rem: number): number => rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst isViewportBelow = (mediaQuery: string): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const mediaQueryValue = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue(mediaQuery).replace('rem', ''), 10));\n return viewportWidth < mediaQueryValue;\n};\n\nconst setScrollbarWidthVariable = (): void => {\n const scrollbarWidth = window.innerWidth - document.body.clientWidth;\n document.documentElement.style.setProperty('--vertical-scrollbar-width', `${scrollbarWidth}px`);\n};\n\nconst overflowsY = (element: HTMLElement): boolean => element.offsetHeight !== element.scrollHeight;\nconst overflowsX = (element: HTMLElement): boolean => element.offsetWidth !== element.scrollWidth;\n// eslint-disable-next-line max-len\nconst elementOverflows = (element: HTMLElement): boolean => overflowsY(element) || overflowsX(element);\n\nconst setHorizontalScroll = (element: HTMLElement): void => {\n const content = element.querySelector('.horizontal-scroll__scrollable-content');\n if (!overflowsX(content as HTMLElement)) {\n element.classList.add('horizontal-scroll--no-overflow');\n content?.removeAttribute('tabindex');\n } else {\n content?.setAttribute('tabindex', '0');\n }\n};\n\nexport {\n copyToClipboard,\n isElementWithClassNameInEventPath,\n getBaseFontSize,\n setMetaThemeColor,\n isViewportBelow,\n convertRemToPixels,\n setScrollbarWidthVariable,\n overflowsX,\n overflowsY,\n elementOverflows,\n setHorizontalScroll,\n};\n","/* eslint-env browser */\nimport { copyToClipboard, isElementWithClassNameInEventPath } from './helpers';\n\nconst findNav = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('nav')) {\n return parent;\n }\n return findNav(parent);\n }\n return element;\n};\n\n// eslint-disable-next-line max-len\nconst closeResponsiveNav = (navElements: NodeListOf<Element>, keepOpen: HTMLElement | null = null): void => {\n const navToggledClass = 'nav--toggled';\n navElements.forEach((n) => {\n const button = n.querySelector('.nav__toggle') as HTMLElement;\n if (n !== keepOpen) {\n if (n.classList.contains(navToggledClass)) {\n button.focus();\n button.setAttribute('aria-expanded', 'false');\n }\n n.classList.remove(navToggledClass);\n }\n });\n};\n\nconst setResponsiveToggle = (navElements: NodeListOf<Element>): CleanUpPair[] => {\n const toggleMenu = (button: HTMLElement) => {\n const parent = findNav(button);\n\n const navItems = parent.querySelector('.nav__items');\n const lastNavItem = navItems?.querySelector('.nav__item:last-of-type');\n navItems?.classList.add('nav__items--fadeout');\n const firstElement = navItems?.querySelector('.nav__item--is-overflown') as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n }\n\n const transitionListener = () => {\n parent.classList.toggle('nav--toggled');\n navItems?.classList.remove('nav__items--fadeout');\n lastNavItem?.removeEventListener('transitionend', transitionListener);\n };\n\n lastNavItem?.addEventListener('transitionend', transitionListener);\n return parent;\n };\n\n const cleanUp: CleanUpPair[] = [];\n\n const toggle = document.querySelectorAll('.nav__toggle');\n toggle.forEach((button) => {\n const clickEvent = () => {\n const nav = toggleMenu(button as HTMLElement);\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n closeResponsiveNav(navElements, nav);\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n button.addEventListener('click', clickEvent);\n });\n\n return cleanUp;\n};\n\nconst setResponsiveNav = (\n navElements: NodeListOf<Element>,\n navElement: Element,\n): SetResponsiveNavCleanUp => {\n const navToggledClass = 'nav--toggled';\n const navItemsClass = 'nav__items';\n // gitlab #117\n navElement.classList.remove(navToggledClass);\n const navItemsParent = navElement.querySelector(`.${navItemsClass}`);\n\n if (navItemsParent) {\n const navItems = navItemsParent.querySelectorAll('.nav__item');\n const isOverflownClass = 'nav__item--is-overflown';\n const hasOverflowClass = 'nav--has-overflow';\n const isActiveClass = 'nav__item--active';\n let hasOverflown = false;\n\n for (let i = navItems.length - 1; i >= 0; i -= 1) {\n const nav = navItems[i] as HTMLElement;\n const top = nav.offsetTop;\n\n if (top > 0) {\n nav.classList.add(isOverflownClass);\n navElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n } else if (!nav.classList.contains(isActiveClass)) {\n nav.classList.remove(isOverflownClass);\n }\n }\n\n if (!hasOverflown) {\n navElement.classList.remove(hasOverflowClass);\n const isActive = navElement.querySelector(`.${isActiveClass}`);\n if (isActive) {\n isActive.classList.remove(isOverflownClass);\n }\n }\n }\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!(e.target as HTMLElement).classList.contains('nav__toggle')\n && !isElementWithClassNameInEventPath(e as MouseEvent, navItemsClass)) {\n closeResponsiveNav(navElements);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n\n return {\n element: document.querySelector('body'),\n clickEvent: bodyClickEvent,\n };\n};\n\nconst closeSubNav = (buttons: NodeListOf<Element>, keepOpen: Element | null = null) => {\n const subNavClass = 'sub-nav--toggled';\n buttons.forEach((button) => {\n if (button !== keepOpen) {\n if (button?.parentElement?.classList.contains(subNavClass)) {\n (button as HTMLElement).focus();\n button.setAttribute('aria-expanded', 'false');\n }\n button?.parentElement?.classList.remove(subNavClass);\n }\n });\n};\n\nconst setSubNavToggle = (buttons: NodeListOf<Element>, button: Element): SetSubNavToggleCleanUp => {\n const subNavClass = 'sub-nav--toggled';\n const buttonClickEvent = () => {\n button?.parentElement?.classList.toggle(subNavClass);\n if (button?.parentElement?.classList.contains(subNavClass)) {\n button.setAttribute('aria-expanded', 'true');\n } else {\n button.setAttribute('aria-expanded', 'false');\n }\n closeSubNav(buttons, button);\n };\n\n button.addEventListener('click', buttonClickEvent);\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!isElementWithClassNameInEventPath(e as MouseEvent, 'sub-nav')) {\n closeSubNav(buttons);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n return {\n buttonClickEvent,\n element: document.querySelector('body'),\n bodyClickEvent,\n };\n};\n\nconst setClickMessage = ((\n text: string,\n copyElement: Element,\n clickElement: Element | null,\n ctcThis: HTMLElement | null,\n listener: () => void,\n): void => {\n if (ctcThis && clickElement) {\n // Vi kopierer teksten til clipboard\n copyToClipboard(ctcThis.innerText);\n copyElement.classList.add('copy-to-clipboard--confirm');\n if (copyElement === clickElement) {\n copyElement.classList.add('copy-to-clipboard--done');\n }\n // Laver en span, der viser, at teksten er kopieret\n const ctcThisMessage = document.createElement('span');\n ctcThisMessage.classList.add('copy-to-clipboard__this__confirm-message');\n ctcThisMessage.innerText = text;\n ctcThis.appendChild(ctcThisMessage);\n\n // Efter 1,2 sekunder fjerner vi beskeden igen\n clickElement.removeEventListener('click', listener);\n setTimeout(() => {\n copyElement.classList.remove('copy-to-clipboard--confirm');\n ctcThisMessage.remove();\n clickElement.addEventListener('click', listener);\n }, 1200);\n }\n});\n\nconst setCopyToClipboard = (element: HTMLElement, text = 'Kopieret!'): void => {\n const ctcThis = <HTMLElement>element.querySelector('.copy-to-clipboard__this');\n // Hvis det er en knap, så sætter vi click event på knappen\n if ((element as HTMLButtonElement).type === 'button') {\n const listener = (): void => {\n setClickMessage(text, element, element, ctcThis, listener);\n };\n element.addEventListener('click', listener);\n // Hvis det ikke er en knap, finder vi knappen \"inde i\" elementet\n } else {\n const btn = element.querySelector('.copy-to-clipboard__execute');\n const listener = (): void => {\n setClickMessage(text, element, btn, ctcThis, listener);\n };\n btn?.addEventListener('click', listener);\n }\n};\n\nconst setSearchToggle = (navSearch: Element, button: Element): void => {\n const toggleClass = 'nav__search--toggled';\n button.addEventListener('click', () => {\n if (navSearch.classList.contains(toggleClass)) {\n button.setAttribute('aria-expanded', 'false');\n navSearch.classList.remove(toggleClass);\n } else {\n button.setAttribute('aria-expanded', 'true');\n navSearch.classList.add(toggleClass);\n }\n });\n};\n\nexport {\n findNav,\n setResponsiveToggle,\n setResponsiveNav,\n setSubNavToggle,\n setCopyToClipboard,\n setSearchToggle,\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable no-param-reassign */\nimport { getBaseFontSize } from './helpers';\n\nconst getMediaWidthBasedOnModifier = (classList: DOMTokenList): number => {\n if (classList.contains('tabbed-content--hide-tabs-on-medium-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-medium').replace('rem', ''), 10);\n }\n if (classList.contains('tabbed-content--hide-tabs-on-wide-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-wide').replace('rem', ''), 10);\n }\n\n return -1;\n};\n\nconst isBelowViewportLimit = (classList: DOMTokenList): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const widthInRem = viewportWidth / getBaseFontSize();\n const mediaWidth = getMediaWidthBasedOnModifier(classList);\n if (mediaWidth > -1) {\n return widthInRem < mediaWidth;\n }\n return true;\n};\n\nconst destroyTabs = (tabbed: Element): void => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n tabs?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('nav__item--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst destroySwitches = (tabbed: Element): void => {\n const switchlist = tabbed.querySelector('.switch');\n const switches = switchlist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n switches?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('switch__segment--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst switchTab = (\n tabs: NodeListOf<HTMLAnchorElement>,\n panels: HTMLElement[],\n oldTab: Element | null,\n newTab: HTMLElement,\n _: DOMTokenList,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number): void => console.log(index),\n): void => {\n if (focus) {\n newTab.focus();\n }\n // Make the active tab focusable by the user (Tab key)\n newTab.removeAttribute('tabindex');\n // Set the selected state\n newTab.setAttribute('aria-selected', 'true');\n\n // Check if switch // should this be more pretty?\n if (newTab.classList.contains('switch__segment')) {\n newTab.classList.add('switch__segment--active');\n } else {\n newTab.classList.add('nav__item--active');\n }\n\n if (oldTab) {\n oldTab.removeAttribute('aria-selected');\n oldTab.setAttribute('tabindex', '-1');\n\n if (oldTab.classList.contains('switch__segment')) {\n oldTab.classList.remove('switch__segment--active');\n } else {\n oldTab.classList.remove('nav__item--active');\n }\n }\n\n const index = Array.prototype.indexOf.call(tabs, newTab);\n\n // More links\n /*let moreLinks;\n var moreLink: HTMLElement;\n moreLinks = document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`);\n moreLinks.forEach((moreLink) => {\n moreLink.classList.add('tabbed-content-peripheral--active');\n moreLink.hidden = false;\n });*/\n let moreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`));\n moreLinks.forEach((link) => {\n link.classList.add('tabbed-content-peripheral--active');\n link.hidden = false;\n });\n\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n panels[index].hidden = false;\n if (oldTab) {\n const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);\n\n let oldMoreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[oldIndex].id}\"]`));\n oldMoreLinks.forEach((link) => {\n link.classList.remove('tabbed-content-peripheral--active');\n link.hidden = true;\n });\n\n /* moreLinks.forEach((moreLink) => {\n moreLink.classList.remove('tabbed-content-peripheral--active');\n moreLink.hidden = true;\n });*/\n\n panels[oldIndex].hidden = true;\n }\n\n // Dispatches custom event on every tab change\n newTab.dispatchEvent(new CustomEvent('switch-tab', {\n bubbles: true,\n detail: { tab: index },\n }));\n callback(index);\n};\n\nconst setTabbedContent = (\n key: number,\n tabbed: Element,\n initial = 0,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number) => console.log(index),\n): void => {\n const tablist = tabbed.querySelector('.switch,.nav__items') as HTMLElement;\n const tabs = tablist.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n\n const expandAll = tabbed.querySelector('button.tabbed-content__expand-all');\n if (expandAll) {\n const expandAllEvent = () => {\n tablist.hidden = true;\n panels.forEach((panel: HTMLElement) => {\n panel.hidden = false;\n });\n };\n\n expandAll.removeEventListener('click', expandAllEvent);\n expandAll.addEventListener('click', expandAllEvent);\n }\n\n // Add the tablist role to the first <ul> in the .tabbed container\n tablist.setAttribute('role', 'tablist');\n\n // Add semantics are remove user focusability for each tab\n tabs.forEach((tab, i) => {\n tab.setAttribute('role', 'tab');\n tab.setAttribute('id', `tab${key}_${(i + 1)}`);\n tab.setAttribute('tabindex', '-1');\n tab.parentElement?.setAttribute('role', 'presentation');\n\n // Handle clicking of tabs for mouse users\n const tabClickEvent = (e: MouseEvent) => {\n e.preventDefault();\n const currentTab = tablist.querySelector('[aria-selected]');\n if (e.currentTarget !== currentTab) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, currentTab, e.currentTarget as HTMLElement, tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n };\n\n tab.removeEventListener('click', tabClickEvent);\n tab.addEventListener('click', tabClickEvent);\n\n // Handle keydown events for keyboard users\n const tabKeyEvent = (e: KeyboardEvent) => {\n // Get the index of the current tab in the tabs node list\n const index = Array.prototype.indexOf.call(tabs, e.currentTarget);\n // Work out which key the user is pressing and\n // Calculate the new tab's index where appropriate\n let dir: number | string | null = null;\n if (e.key === 'ArrowLeft') {\n dir = index - 1;\n }\n if (e.key === 'ArrowRight') {\n dir = index + 1;\n }\n if (e.key === 'ArrowDown') {\n dir = 'down';\n }\n if (dir !== null) {\n e.preventDefault();\n // If the down key is pressed, move focus to the open panel,\n // otherwise switch to the adjacent tab\n if (dir === 'down') {\n panels[i].focus();\n } else if (tabs[dir]) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, e.currentTarget as Element, tabs[dir], tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n }\n };\n tab.removeEventListener('keydown', tabKeyEvent);\n tab.addEventListener('keydown', tabKeyEvent);\n });\n\n // Add tab panel semantics and hide them all\n panels.forEach((panel: HTMLElement, i: number) => {\n panel.setAttribute('tabindex', '-1');\n panel.setAttribute('aria-labelledby', tabs[i].id);\n // eslint-disable-next-line no-param-reassign\n panel.hidden = true;\n panel.setAttribute('role', 'tabpanel');\n });\n\n // Initially activate the first tab and reveal the first tab panel\n if (initial > -1) {\n switchTab(tabs, panels, null, tabs[initial], tabbed.classList, focus);\n }\n};\n\nexport {\n setTabbedContent,\n isBelowViewportLimit,\n destroyTabs,\n destroySwitches,\n};\n","/* eslint-disable max-len */\nimport { convertRemToPixels, isElementWithClassNameInEventPath, isViewportBelow } from './helpers';\n\nconst lockBodyScroll = (): void => {\n const body = document.querySelector('body');\n if (isViewportBelow('--bp-medium') || isViewportBelow('--bp-low-height')) {\n body?.classList.add('body--no-scroll');\n }\n};\n\nconst unlockBodyScroll = (): void => {\n const body = document.querySelector('body');\n body?.classList.remove('body--no-scroll');\n};\n\n/* eslint-env browser */\nconst closeAllContentTogglesInToolbar = (toolbar: HTMLElement): void => {\n const contentToggles = toolbar.querySelectorAll('.content-toggle__toggle');\n contentToggles.forEach((toggle) => {\n const content = toggle.parentElement?.querySelector('.content-toggle__content');\n toggle.setAttribute('aria-expanded', 'false');\n content?.setAttribute('hidden', 'hidden');\n });\n};\n\nconst setOverflow = (toolbarElement: Element): void => {\n if (!toolbarElement.classList.contains('toolbar--no-collapse')) {\n toolbarElement.classList.remove('toolbar--toggled');\n }\n toolbarElement.classList.remove('toolbar--fully-overflown');\n toolbarElement.classList.remove('toolbar--has-popout');\n const toolbarItemsParent = toolbarElement.querySelector('.toolbar__items');\n const toolbarItems = toolbarItemsParent?.children as HTMLCollection;\n const isOverflownClass = 'toolbar__item--is-overflown';\n const hasOverflowClass = 'toolbar--has-overflow';\n let hasOverflown = false;\n\n let overflownCount = 0;\n const addOverflowClass = (item: HTMLElement, index: number) => {\n if (item) {\n const top = item.offsetTop;\n if (top > 25) {\n item.classList.add(isOverflownClass);\n toolbarElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n overflownCount += 1;\n } else {\n item.classList.remove(isOverflownClass);\n }\n\n if (!hasOverflown) {\n toolbarElement.classList.remove(hasOverflowClass);\n } else if (index - 1 >= 0) {\n addOverflowClass(toolbarItems[index - 1] as HTMLElement, index - 1);\n }\n }\n };\n\n addOverflowClass(toolbarItems[toolbarItems.length - 1] as HTMLElement, toolbarItems.length - 1);\n\n if (overflownCount > 0 && overflownCount === toolbarItems.length) {\n toolbarElement.classList.add('toolbar--fully-overflown');\n }\n};\n\nconst setToolbarToggle = (toolbar: HTMLElement): ExtendedCleanUpPair[] => {\n const cleanUp: ExtendedCleanUpPair[] = [];\n const buttons = toolbar.querySelectorAll('.toolbar__toggle');\n buttons.forEach((button) => {\n const clickEvent = () => {\n button?.parentElement?.classList.toggle('toolbar--toggled');\n const ariaExpanded = button.getAttribute('aria-expanded');\n if (ariaExpanded !== 'true') {\n const focusable = 'a.toolbar__item--is-overflown, button.toolbar__item--is-overflown, input.toolbar__item--is-overflown, select.toolbar__item--is-overflown, .toolbar__item--is-overflown a, .toolbar__item--is-overflown button, .toolbar__item--is-overflown input, .toolbar__item--is-overflown select';\n const firstWithOverflow = button?.parentElement?.querySelector(focusable) as HTMLElement;\n if (firstWithOverflow) {\n setTimeout(() => {\n firstWithOverflow.focus();\n }, 0);\n }\n }\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n button.addEventListener('click', clickEvent);\n });\n return cleanUp;\n};\n\nconst setToolbar = (\n toolbar: HTMLElement,\n onCloseContentToggle: (toolbarElement: HTMLElement) => void,\n setOverflowOnly = true,\n): ExtendedCleanUpPair[] => {\n let cleanUp: ExtendedCleanUpPair[] = [];\n\n setOverflow(toolbar);\n onCloseContentToggle(toolbar);\n cleanUp = cleanUp.concat(setToolbarToggle(toolbar));\n\n if (!setOverflowOnly) {\n const bodyClickEvent = (event: Event) => {\n if (!(event.target as HTMLElement).classList.contains('content-toggle__toggle')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'content-toggle__content')) {\n onCloseContentToggle(toolbar);\n }\n };\n\n const escKeyEvent = (event: Event) => {\n if ((event as KeyboardEvent).key === 'Escape') {\n if (event.target && (event.target as HTMLElement).getAttribute('type') !== 'search') {\n onCloseContentToggle(toolbar);\n }\n }\n };\n\n const body = document.querySelector('body');\n\n cleanUp.push({\n element: body as Element,\n clickEvent: bodyClickEvent,\n });\n\n cleanUp.push({\n element: window,\n keyUpEvent: escKeyEvent,\n });\n\n body?.addEventListener('click', bodyClickEvent);\n window.addEventListener('keyup', escKeyEvent);\n }\n\n return cleanUp;\n};\n\nconst findToolbar = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('toolbar')) {\n return parent;\n }\n return findToolbar(parent);\n }\n return element;\n};\n\nconst contentToggleEdgeHandling = (element: HTMLElement): void => {\n if (!isViewportBelow('--bp-medium') && !isViewportBelow('--bp-low-height')) {\n const allowedDistance = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue('--toolbar-popout-allowed-edge-distance').replace('rem,', ''), 10));\n const popoutX = parseInt(getComputedStyle(element).width.replace('px', ''), 10);\n const popoutWidth = element.getBoundingClientRect().x;\n\n const distance = document.body.offsetWidth - allowedDistance - popoutX - popoutWidth;\n\n if (distance < 0) {\n element.style.setProperty('--toolbar-popout-edge-overflow', `${distance}px`);\n }\n }\n};\n\nexport {\n setToolbar,\n setOverflow,\n findToolbar,\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n lockBodyScroll,\n unlockBodyScroll,\n};\n","/* eslint-disable no-param-reassign */\n/* eslint-env browser */\nimport ready from '../components/ready';\nimport {\n setResponsiveNav,\n setResponsiveToggle,\n} from '../components/nav';\nimport { isElementWithClassNameInEventPath, setMetaThemeColor } from '../components/helpers';\nimport { setResponsiveTable } from '../components/table';\nimport { setTabbedContent, isBelowViewportLimit, destroyTabs } from '../components/tabs';\nimport { setContentToggle } from '../components/content-toggle';\nimport {\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n findToolbar,\n lockBodyScroll,\n unlockBodyScroll,\n} from '../components/toolbar';\n\nlet windowInnerWidth = 0;\n\nconst tabbedObjects: ITabbedObject[] = [];\n\nconst setTabs = (): void => {\n tabbedObjects.forEach((tabObject: ITabbedObject, key: number): void => {\n const { rendered, domElement } = tabObject;\n if (isBelowViewportLimit(domElement.classList)) {\n if (!rendered) {\n const focus = domElement.getAttribute('data-focus-onload');\n const dataInitial = domElement.getAttribute('data-initial-tab');\n const initial = dataInitial ? parseInt(dataInitial, 10) : 0;\n setTabbedContent(key, domElement, initial, focus !== 'false');\n tabObject.rendered = true;\n }\n } else if (rendered) {\n destroyTabs(domElement);\n tabObject.rendered = false;\n }\n });\n};\n\nready(() => {\n const tabbedContent = document.querySelectorAll('.tabbed-content');\n tabbedContent.forEach((tab) => tabbedObjects.push({\n domElement: tab,\n rendered: false,\n }));\n setTabs();\n setMetaThemeColor();\n\n const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setResponsiveToggle(navElements);\n\n const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');\n tables.forEach((table) => setResponsiveTable(table));\n\n const toggles = document.querySelectorAll('.content-toggle__content');\n toggles.forEach((toggle) => {\n setContentToggle(\n toggle,\n (popout: HTMLElement) => {\n contentToggleEdgeHandling(popout);\n lockBodyScroll();\n },\n (content: HTMLElement) => closeAllContentTogglesInToolbar(findToolbar(content)),\n (content: HTMLElement, button: HTMLButtonElement) => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n const toolbar = findToolbar(content);\n if (ariaExpanded === 'true') {\n toolbar?.classList.add('toolbar--has-popout');\n } else {\n toolbar?.classList.remove('toolbar--has-popout');\n }\n\n content.addEventListener('click', (event: MouseEvent) => {\n if ((event.target as HTMLElement).classList.contains('toolbar__popout')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'toolbar__filter__content')) {\n closeAllContentTogglesInToolbar(toolbar);\n unlockBodyScroll();\n }\n });\n },\n );\n });\n\n window.addEventListener('load', () => {\n windowInnerWidth = window.innerWidth;\n });\n\n window.addEventListener('resize', () => {\n if (windowInnerWidth > 0 && window.innerWidth !== windowInnerWidth) {\n windowInnerWidth = window.innerWidth;\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setTabs();\n }\n });\n});\n","/* eslint-env browser */\nconst ready = (fn: () => void): void => {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n};\n\nexport default ready;\n","/* eslint-disable import/prefer-default-export */\nconst setResponsiveTable = (table: Element): void => {\n const head = table.querySelector('thead');\n const body = table.querySelector('tbody');\n const foot = table.querySelector('tfoot');\n\n if (head) {\n const headers: string[] = [];\n const ths = head.querySelectorAll('th');\n ths.forEach((h) => {\n if (!h.classList.contains('table__cell--self-explanatory')) {\n headers.push(h.innerHTML); // Because innerText inherits stuff like text-transform\n } else {\n headers.push(''); // If header is self explanatory we do not add it\n }\n });\n\n const rowContainers: HTMLTableSectionElement[] = [];\n // Table elements that possibly contains <tr>'s\n if (body) {\n rowContainers.push(body);\n }\n if (foot) {\n rowContainers.push(foot);\n }\n\n rowContainers.forEach((rc) => {\n const rows = rc.querySelectorAll('tr');\n rows.forEach((tr) => {\n const cells = tr.querySelectorAll('td, th');\n cells.forEach((cell, i) => {\n if (headers[i]) {\n // if header is self explanatory we skip (value of array index is '' which is falsy)\n cell.setAttribute('data-label', headers[i]);\n }\n });\n });\n });\n }\n};\n\nexport {\n setResponsiveTable,\n};\n","/* eslint-disable max-len */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\nconst setContentToggle = (\n content: Element,\n onClick: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n beforeCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n afterCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n): CleanUpPair[] => {\n const cleanUp: CleanUpPair[] = [];\n const setContentClose = (button: HTMLElement, contentClose: HTMLElement, focus: boolean): () => void => {\n if (focus) {\n contentClose.focus();\n }\n const click = () => {\n content.setAttribute('hidden', 'hidden');\n button.removeAttribute('hidden');\n button.setAttribute('aria-expanded', 'false');\n button.focus();\n };\n contentClose.addEventListener('click', click);\n return click;\n };\n\n const button = content?.parentElement?.querySelector('.content-toggle__toggle') as HTMLElement;\n const contentClose = content.querySelectorAll('.content-toggle__close');\n\n if (button) {\n const clickEvent = () => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n // Til toolbar: hvis man klikker på en knap, der ikke er foldet ud\n // Så lukker vi alle åbne content-toggles\n if (typeof beforeCallback === 'function' && ariaExpanded === 'false') {\n beforeCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n // Og så går vi i gang med folde-ud-logikken\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n if (ariaExpanded === 'true') {\n content.setAttribute('hidden', 'hidden');\n } else {\n content.removeAttribute('hidden');\n }\n\n if (typeof onClick === 'function') {\n onClick(content as HTMLElement, button as HTMLButtonElement);\n }\n\n if (button.hasAttribute('aria-haspopup')) {\n button.setAttribute('hidden', 'hidden');\n contentClose.forEach((cc) => {\n setContentClose(button, cc as HTMLElement, true);\n });\n }\n\n // Det der sker efter folde-logikken\n if (typeof afterCallback === 'function') {\n afterCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n };\n\n button.addEventListener('click', clickEvent);\n // Altid tilføj denne først!\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n contentClose.forEach((cc) => {\n const btnClick = setContentClose(button, cc as HTMLElement, false);\n cleanUp.push({\n element: cc,\n clickEvent: btnClick,\n });\n });\n }\n return cleanUp;\n};\n\nexport {\n setContentToggle,\n};\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./source/js/components/helpers.ts","webpack:///./source/js/components/nav.ts","webpack:///./source/js/components/tabs.ts","webpack:///./source/js/components/toolbar.ts","webpack:///./source/js/production/app.ts","webpack:///./source/js/components/ready.ts","webpack:///./source/js/components/table.ts","webpack:///./source/js/components/content-toggle.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","isElementWithClassNameInEventPath","event","className","found","composedPath","forEach","classList","contains","convertRemToPixels","rem","parseFloat","getComputedStyle","document","documentElement","fontSize","isViewportBelow","mediaQuery","Math","max","clientWidth","innerWidth","parseInt","getPropertyValue","replace","findNav","element","parent","parentElement","closeResponsiveNav","navElements","keepOpen","button","querySelector","focus","setAttribute","remove","setResponsiveToggle","cleanUp","querySelectorAll","clickEvent","nav","navItems","lastNavItem","add","firstElement","transitionListener","toggle","removeEventListener","addEventListener","toggleMenu","ariaExpanded","getAttribute","push","setResponsiveNav","navElement","navItemsParent","isOverflownClass","hasOverflowClass","isActiveClass","hasOverflown","length","offsetTop","isActive","bodyClickEvent","e","target","isBelowViewportLimit","widthInRem","getBaseFontSize","mediaWidth","getMediaWidthBasedOnModifier","switchTab","tabs","panels","oldTab","newTab","_","callback","index","console","log","removeAttribute","Array","indexOf","from","id","link","hidden","oldIndex","dispatchEvent","CustomEvent","bubbles","detail","tab","closeAllContentTogglesInToolbar","toolbar","content","findToolbar","windowInnerWidth","tabbedObjects","setTabs","tabObject","rendered","domElement","dataInitial","tabbed","initial","tablist","section","parentNode","expandAll","expandAllEvent","panel","tabClickEvent","preventDefault","currentTab","currentTarget","tabIndex","tabKeyEvent","dir","setTabbedContent","destroyTabs","fn","readyState","ready","body","bgColor","existingMeta","meta","createElement","getElementsByTagName","appendChild","setMetaThemeColor","table","head","foot","headers","h","innerHTML","rowContainers","rc","tr","cell","setResponsiveTable","onClick","beforeCallback","afterCallback","setContentClose","contentClose","click","hasAttribute","cc","btnClick","setContentToggle","popout","allowedDistance","popoutX","width","popoutWidth","getBoundingClientRect","x","distance","offsetWidth","style","setProperty","contentToggleEdgeHandling","lockBodyScroll","unlockBodyScroll"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ,EAAGI,EACHC,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQF,GAAUG,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAQ,EAAoBK,EAAIF,EAGxBH,EAAoBM,EAAIP,EAGxBC,EAAoBO,EAAI,SAASf,EAASgB,EAAMC,GAC3CT,EAAoBU,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhET,EAAoBe,EAAI,SAASvB,GACX,oBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,OAAO,KAQvDlB,EAAoBmB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQlB,EAAoBkB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,E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Ac,SAChCjB,EAAgB,gBAAkBA,EAAgB,sBACpD8G,WAAMvH,UAAUqC,IAAI,qBCyDhB2H,IAEDtE,GAAyBF,EAAgCG,EAAYD,IACtE,CAACA,EAAsBjE,KACrB,MAAMmB,EAAenB,EAAOoB,aAAa,iBACnC4C,EAAUE,EAAYD,GACP,SAAjB9C,EACF6C,WAASzF,UAAUqC,IAAI,uBAEvBoD,WAASzF,UAAU6B,OAAO,uBAG5B6D,EAAQhD,iBAAiB,QAAU/C,IAC5BA,EAAMgE,OAAuB3D,UAAUC,SAAS,qBAC/CP,EAAkCC,EAAqB,8BAC3D6F,EAAgCC,GDpEnB,MACvB,MAAM8B,EAAOjH,SAASoB,cAAc,QACpC6F,WAAMvH,UAAU6B,OAAO,oBCmEboI,UAOV1M,OAAOmF,iBAAiB,OAAQ,KAC9BkD,EAAmBrI,OAAOuD,aAG5BvD,OAAOmF,iBAAiB,SAAU,KAC5BkD,EAAmB,GAAKrI,OAAOuD,aAAe8E,IAChDA,EAAmBrI,OAAOuD,WAC1BS,EAAYxB,QAASZ,GAAM4D,EAAiBxB,EAAapC,IACzD2G","file":"app.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* eslint-disable wrap-iife */\n/* eslint-disable import/prefer-default-export */\n/* eslint-env browser */\nconst copyToClipboard = (str: string): void => {\n // eslint-disable-next-line no-console\n navigator.clipboard.writeText(str).then(() => console.log(`${str} written to clipboard`));\n};\n\nconst isElementWithClassNameInEventPath = (event: MouseEvent, className: string): boolean => {\n let found = false;\n const path = event.composedPath();\n path.forEach((p: EventTarget): void => {\n if ((p as HTMLElement).classList) {\n if ((p as HTMLElement).classList.contains(className)) {\n found = true;\n }\n }\n });\n return found;\n};\n\nconst setMetaThemeColor = (): void => {\n const body = document.querySelector('body');\n if (body) {\n const bgColor = window.getComputedStyle(body).getPropertyValue('--color-background');\n const existingMeta = document.querySelector('meta[name=\"theme-color\"]') as HTMLMetaElement;\n if (existingMeta) {\n existingMeta.content = bgColor;\n } else {\n const meta = document.createElement('meta');\n meta.name = 'theme-color';\n meta.content = bgColor;\n document.getElementsByTagName('head')[0].appendChild(meta);\n }\n }\n};\n\nconst getBaseFontSize = (): number => parseInt(window.getComputedStyle(document.documentElement).fontSize.replace('px', ''), 10);\n\n// eslint-disable-next-line max-len\nconst convertRemToPixels = (rem: number): number => rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst isViewportBelow = (mediaQuery: string): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const mediaQueryValue = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue(mediaQuery).replace('rem', ''), 10));\n return viewportWidth < mediaQueryValue;\n};\n\nconst setScrollbarWidthVariable = (): void => {\n const scrollbarWidth = window.innerWidth - document.body.clientWidth;\n document.documentElement.style.setProperty('--vertical-scrollbar-width', `${scrollbarWidth}px`);\n};\n\nconst overflowsY = (element: HTMLElement): boolean => element.offsetHeight !== element.scrollHeight;\nconst overflowsX = (element: HTMLElement): boolean => element.offsetWidth !== element.scrollWidth;\n// eslint-disable-next-line max-len\nconst elementOverflows = (element: HTMLElement): boolean => overflowsY(element) || overflowsX(element);\n\nconst setHorizontalScroll = (element: HTMLElement): void => {\n const content = element.querySelector('.horizontal-scroll__scrollable-content');\n if (!overflowsX(content as HTMLElement)) {\n element.classList.add('horizontal-scroll--no-overflow');\n content?.removeAttribute('tabindex');\n } else {\n content?.setAttribute('tabindex', '0');\n }\n};\n\nexport {\n copyToClipboard,\n isElementWithClassNameInEventPath,\n getBaseFontSize,\n setMetaThemeColor,\n isViewportBelow,\n convertRemToPixels,\n setScrollbarWidthVariable,\n overflowsX,\n overflowsY,\n elementOverflows,\n setHorizontalScroll,\n};\n","/* eslint-env browser */\nimport { copyToClipboard, isElementWithClassNameInEventPath } from './helpers';\n\nconst findNav = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('nav')) {\n return parent;\n }\n return findNav(parent);\n }\n return element;\n};\n\n// eslint-disable-next-line max-len\nconst closeResponsiveNav = (navElements: NodeListOf<Element>, keepOpen: HTMLElement | null = null): void => {\n const navToggledClass = 'nav--toggled';\n navElements.forEach((n) => {\n const button = n.querySelector('.nav__toggle') as HTMLElement;\n if (n !== keepOpen) {\n if (n.classList.contains(navToggledClass)) {\n button.focus();\n button.setAttribute('aria-expanded', 'false');\n }\n n.classList.remove(navToggledClass);\n }\n });\n};\n\nconst setResponsiveToggle = (navElements: NodeListOf<Element>): CleanUpPair[] => {\n const toggleMenu = (button: HTMLElement) => {\n const parent = findNav(button);\n\n const navItems = parent.querySelector('.nav__items');\n const lastNavItem = navItems?.querySelector('.nav__item:last-of-type');\n navItems?.classList.add('nav__items--fadeout');\n const firstElement = navItems?.querySelector('.nav__item--is-overflown') as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n }\n\n const transitionListener = () => {\n parent.classList.toggle('nav--toggled');\n navItems?.classList.remove('nav__items--fadeout');\n lastNavItem?.removeEventListener('transitionend', transitionListener);\n };\n\n lastNavItem?.addEventListener('transitionend', transitionListener);\n return parent;\n };\n\n const cleanUp: CleanUpPair[] = [];\n\n const toggle = document.querySelectorAll('.nav__toggle');\n toggle.forEach((button) => {\n const clickEvent = () => {\n const nav = toggleMenu(button as HTMLElement);\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n closeResponsiveNav(navElements, nav);\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n button.addEventListener('click', clickEvent);\n });\n\n return cleanUp;\n};\n\nconst setResponsiveNav = (\n navElements: NodeListOf<Element>,\n navElement: Element,\n): SetResponsiveNavCleanUp => {\n const navToggledClass = 'nav--toggled';\n const navItemsClass = 'nav__items';\n // gitlab #117\n navElement.classList.remove(navToggledClass);\n const navItemsParent = navElement.querySelector(`.${navItemsClass}`);\n\n if (navItemsParent) {\n const navItems = navItemsParent.querySelectorAll('.nav__item');\n const isOverflownClass = 'nav__item--is-overflown';\n const hasOverflowClass = 'nav--has-overflow';\n const isActiveClass = 'nav__item--active';\n let hasOverflown = false;\n\n for (let i = navItems.length - 1; i >= 0; i -= 1) {\n const nav = navItems[i] as HTMLElement;\n const top = nav.offsetTop;\n\n if (top > 0) {\n nav.classList.add(isOverflownClass);\n navElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n } else if (!nav.classList.contains(isActiveClass)) {\n nav.classList.remove(isOverflownClass);\n }\n }\n\n if (!hasOverflown) {\n navElement.classList.remove(hasOverflowClass);\n const isActive = navElement.querySelector(`.${isActiveClass}`);\n if (isActive) {\n isActive.classList.remove(isOverflownClass);\n }\n }\n }\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!(e.target as HTMLElement).classList.contains('nav__toggle')\n && !isElementWithClassNameInEventPath(e as MouseEvent, navItemsClass)) {\n closeResponsiveNav(navElements);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n\n return {\n element: document.querySelector('body'),\n clickEvent: bodyClickEvent,\n };\n};\n\nconst closeSubNav = (buttons: NodeListOf<Element>, keepOpen: Element | null = null) => {\n const subNavClass = 'sub-nav--toggled';\n buttons.forEach((button) => {\n if (button !== keepOpen) {\n if (button?.parentElement?.classList.contains(subNavClass)) {\n (button as HTMLElement).focus();\n button.setAttribute('aria-expanded', 'false');\n }\n button?.parentElement?.classList.remove(subNavClass);\n }\n });\n};\n\nconst setSubNavToggle = (buttons: NodeListOf<Element>, button: Element): SetSubNavToggleCleanUp => {\n const subNavClass = 'sub-nav--toggled';\n const buttonClickEvent = () => {\n button?.parentElement?.classList.toggle(subNavClass);\n if (button?.parentElement?.classList.contains(subNavClass)) {\n button.setAttribute('aria-expanded', 'true');\n } else {\n button.setAttribute('aria-expanded', 'false');\n }\n closeSubNav(buttons, button);\n };\n\n button.addEventListener('click', buttonClickEvent);\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!isElementWithClassNameInEventPath(e as MouseEvent, 'sub-nav')) {\n closeSubNav(buttons);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n return {\n buttonClickEvent,\n element: document.querySelector('body'),\n bodyClickEvent,\n };\n};\n\nconst setClickMessage = ((\n text: string,\n copyElement: Element,\n clickElement: Element | null,\n ctcThis: HTMLElement | null,\n listener: () => void,\n): void => {\n if (ctcThis && clickElement) {\n // Vi kopierer teksten til clipboard\n copyToClipboard(ctcThis.innerText);\n copyElement.classList.add('copy-to-clipboard--confirm');\n if (copyElement === clickElement) {\n copyElement.classList.add('copy-to-clipboard--done');\n }\n // Laver en span, der viser, at teksten er kopieret\n const ctcThisMessage = document.createElement('span');\n ctcThisMessage.classList.add('copy-to-clipboard__this__confirm-message');\n ctcThisMessage.innerText = text;\n ctcThis.appendChild(ctcThisMessage);\n\n // Efter 1,2 sekunder fjerner vi beskeden igen\n clickElement.removeEventListener('click', listener);\n setTimeout(() => {\n copyElement.classList.remove('copy-to-clipboard--confirm');\n ctcThisMessage.remove();\n clickElement.addEventListener('click', listener);\n }, 1200);\n }\n});\n\nconst setCopyToClipboard = (element: HTMLElement, text = 'Kopieret!'): void => {\n const ctcThis = <HTMLElement>element.querySelector('.copy-to-clipboard__this');\n // Hvis det er en knap, så sætter vi click event på knappen\n if ((element as HTMLButtonElement).type === 'button') {\n const listener = (): void => {\n setClickMessage(text, element, element, ctcThis, listener);\n };\n element.addEventListener('click', listener);\n // Hvis det ikke er en knap, finder vi knappen \"inde i\" elementet\n } else {\n const btn = element.querySelector('.copy-to-clipboard__execute');\n const listener = (): void => {\n setClickMessage(text, element, btn, ctcThis, listener);\n };\n btn?.addEventListener('click', listener);\n }\n};\n\nconst setSearchToggle = (navSearch: Element, button: Element): void => {\n const toggleClass = 'nav__search--toggled';\n button.addEventListener('click', () => {\n if (navSearch.classList.contains(toggleClass)) {\n button.setAttribute('aria-expanded', 'false');\n navSearch.classList.remove(toggleClass);\n } else {\n button.setAttribute('aria-expanded', 'true');\n navSearch.classList.add(toggleClass);\n }\n });\n};\n\nexport {\n findNav,\n setResponsiveToggle,\n setResponsiveNav,\n setSubNavToggle,\n setCopyToClipboard,\n setSearchToggle,\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable no-param-reassign */\nimport { getBaseFontSize } from './helpers';\n\nconst getMediaWidthBasedOnModifier = (classList: DOMTokenList): number => {\n if (classList.contains('tabbed-content--hide-tabs-on-medium-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-medium').replace('rem', ''), 10);\n }\n if (classList.contains('tabbed-content--hide-tabs-on-wide-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-wide').replace('rem', ''), 10);\n }\n\n return -1;\n};\n\nconst isBelowViewportLimit = (classList: DOMTokenList): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const widthInRem = viewportWidth / getBaseFontSize();\n const mediaWidth = getMediaWidthBasedOnModifier(classList);\n if (mediaWidth > -1) {\n return widthInRem < mediaWidth;\n }\n return true;\n};\n\nconst destroyTabs = (tabbed: Element): void => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n tabs?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('nav__item--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst destroySwitches = (tabbed: Element): void => {\n const switchlist = tabbed.querySelector('.switch');\n const switches = switchlist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n switches?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('switch__segment--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst switchTab = (\n tabs: NodeListOf<HTMLAnchorElement>,\n panels: HTMLElement[],\n oldTab: Element | null,\n newTab: HTMLElement,\n _: DOMTokenList,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number): void => console.log(index),\n): void => {\n if (focus) {\n newTab.focus();\n }\n // Make the active tab focusable by the user (Tab key)\n newTab.removeAttribute('tabindex');\n // Set the selected state\n newTab.setAttribute('aria-selected', 'true');\n\n // Check if switch // should this be more pretty?\n if (newTab.classList.contains('switch__segment')) {\n newTab.classList.add('switch__segment--active');\n } else {\n newTab.classList.add('nav__item--active');\n }\n\n if (oldTab) {\n oldTab.removeAttribute('aria-selected');\n oldTab.setAttribute('tabindex', '-1');\n\n if (oldTab.classList.contains('switch__segment')) {\n oldTab.classList.remove('switch__segment--active');\n } else {\n oldTab.classList.remove('nav__item--active');\n }\n }\n\n const index = Array.prototype.indexOf.call(tabs, newTab);\n\n // More links\n /*let moreLinks;\n var moreLink: HTMLElement;\n moreLinks = document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`);\n moreLinks.forEach((moreLink) => {\n moreLink.classList.add('tabbed-content-peripheral--active');\n moreLink.hidden = false;\n });*/\n let moreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`));\n moreLinks.forEach((link) => {\n link.classList.add('tabbed-content-peripheral--active');\n link.hidden = false;\n });\n\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n panels[index].hidden = false;\n if (oldTab) {\n const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);\n\n let oldMoreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[oldIndex].id}\"]`));\n oldMoreLinks.forEach((link) => {\n link.classList.remove('tabbed-content-peripheral--active');\n link.hidden = true;\n });\n\n /* moreLinks.forEach((moreLink) => {\n moreLink.classList.remove('tabbed-content-peripheral--active');\n moreLink.hidden = true;\n });*/\n\n panels[oldIndex].hidden = true;\n }\n\n // Dispatches custom event on every tab change\n newTab.dispatchEvent(new CustomEvent('switch-tab', {\n bubbles: true,\n detail: { tab: index },\n }));\n callback(index);\n};\n\nconst setTabbedContent = (\n key: number,\n tabbed: Element,\n initial = 0,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number) => console.log(index),\n): void => {\n const tablist = tabbed.querySelector('.switch,.nav__items') as HTMLElement;\n const tabs = tablist.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n\n const expandAll = tabbed.querySelector('button.tabbed-content__expand-all');\n if (expandAll) {\n const expandAllEvent = () => {\n tablist.hidden = true;\n panels.forEach((panel: HTMLElement) => {\n panel.hidden = false;\n });\n };\n\n expandAll.removeEventListener('click', expandAllEvent);\n expandAll.addEventListener('click', expandAllEvent);\n }\n\n // Add the tablist role to the first <ul> in the .tabbed container\n tablist.setAttribute('role', 'tablist');\n\n // Add semantics are remove user focusability for each tab\n tabs.forEach((tab, i) => {\n tab.setAttribute('role', 'tab');\n tab.setAttribute('id', `tab${key}_${(i + 1)}`);\n tab.setAttribute('tabindex', '-1');\n tab.parentElement?.setAttribute('role', 'presentation');\n\n // Handle clicking of tabs for mouse users\n const tabClickEvent = (e: MouseEvent) => {\n e.preventDefault();\n const currentTab = tablist.querySelector('[aria-selected]');\n if (e.currentTarget !== currentTab) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, currentTab, e.currentTarget as HTMLElement, tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n };\n\n tab.removeEventListener('click', tabClickEvent);\n tab.addEventListener('click', tabClickEvent);\n\n // Handle keydown events for keyboard users\n const tabKeyEvent = (e: KeyboardEvent) => {\n // Get the index of the current tab in the tabs node list\n const index = Array.prototype.indexOf.call(tabs, e.currentTarget);\n // Work out which key the user is pressing and\n // Calculate the new tab's index where appropriate\n let dir: number | string | null = null;\n if (e.key === 'ArrowLeft') {\n dir = index - 1;\n }\n if (e.key === 'ArrowRight') {\n dir = index + 1;\n }\n if (e.key === 'ArrowDown') {\n dir = 'down';\n }\n if (dir !== null) {\n e.preventDefault();\n // If the down key is pressed, move focus to the open panel,\n // otherwise switch to the adjacent tab\n if (dir === 'down') {\n panels[i].focus();\n } else if (tabs[dir]) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, e.currentTarget as Element, tabs[dir], tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n }\n };\n tab.removeEventListener('keydown', tabKeyEvent);\n tab.addEventListener('keydown', tabKeyEvent);\n });\n\n // Add tab panel semantics and hide them all\n panels.forEach((panel: HTMLElement, i: number) => {\n panel.setAttribute('tabindex', '-1');\n panel.setAttribute('aria-labelledby', tabs[i].id);\n // eslint-disable-next-line no-param-reassign\n panel.hidden = true;\n panel.setAttribute('role', 'tabpanel');\n });\n\n // Initially activate the first tab and reveal the first tab panel\n if (initial > -1) {\n switchTab(tabs, panels, null, tabs[initial], tabbed.classList, focus);\n }\n};\n\nexport {\n setTabbedContent,\n isBelowViewportLimit,\n destroyTabs,\n destroySwitches,\n};\n","/* eslint-disable max-len */\nimport { convertRemToPixels, isElementWithClassNameInEventPath, isViewportBelow } from './helpers';\n\nconst lockBodyScroll = (): void => {\n const body = document.querySelector('body');\n if (isViewportBelow('--bp-medium') || isViewportBelow('--bp-low-height')) {\n body?.classList.add('body--no-scroll');\n }\n};\n\nconst unlockBodyScroll = (): void => {\n const body = document.querySelector('body');\n body?.classList.remove('body--no-scroll');\n};\n\n/* eslint-env browser */\nconst closeAllContentTogglesInToolbar = (toolbar: HTMLElement): void => {\n const contentToggles = toolbar.querySelectorAll('.content-toggle__toggle');\n contentToggles.forEach((toggle) => {\n const content = toggle.parentElement?.querySelector('.content-toggle__content');\n toggle.setAttribute('aria-expanded', 'false');\n content?.setAttribute('hidden', 'hidden');\n });\n};\n\nconst setOverflow = (toolbarElement: Element): void => {\n if (!toolbarElement.classList.contains('toolbar--no-collapse')) {\n toolbarElement.classList.remove('toolbar--toggled');\n }\n toolbarElement.classList.remove('toolbar--fully-overflown');\n toolbarElement.classList.remove('toolbar--has-popout');\n const toolbarItemsParent = toolbarElement.querySelector('.toolbar__items');\n const toolbarItems = toolbarItemsParent?.children as HTMLCollection;\n const isOverflownClass = 'toolbar__item--is-overflown';\n const hasOverflowClass = 'toolbar--has-overflow';\n let hasOverflown = false;\n\n let overflownCount = 0;\n const addOverflowClass = (item: HTMLElement, index: number) => {\n if (item) {\n const top = item.offsetTop;\n if (top > 25) {\n item.classList.add(isOverflownClass);\n toolbarElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n overflownCount += 1;\n } else {\n item.classList.remove(isOverflownClass);\n }\n\n if (!hasOverflown) {\n toolbarElement.classList.remove(hasOverflowClass);\n } else if (index - 1 >= 0) {\n addOverflowClass(toolbarItems[index - 1] as HTMLElement, index - 1);\n }\n }\n };\n\n addOverflowClass(toolbarItems[toolbarItems.length - 1] as HTMLElement, toolbarItems.length - 1);\n\n if (overflownCount > 0 && overflownCount === toolbarItems.length) {\n toolbarElement.classList.add('toolbar--fully-overflown');\n }\n};\n\nconst setToolbarToggle = (toolbar: HTMLElement): ExtendedCleanUpPair[] => {\n const cleanUp: ExtendedCleanUpPair[] = [];\n const buttons = toolbar.querySelectorAll('.toolbar__toggle');\n buttons.forEach((button) => {\n const clickEvent = () => {\n button?.parentElement?.classList.toggle('toolbar--toggled');\n const ariaExpanded = button.getAttribute('aria-expanded');\n if (ariaExpanded !== 'true') {\n const focusable = 'a.toolbar__item--is-overflown, button.toolbar__item--is-overflown, input.toolbar__item--is-overflown, select.toolbar__item--is-overflown, .toolbar__item--is-overflown a, .toolbar__item--is-overflown button, .toolbar__item--is-overflown input, .toolbar__item--is-overflown select';\n const firstWithOverflow = button?.parentElement?.querySelector(focusable) as HTMLElement;\n if (firstWithOverflow) {\n setTimeout(() => {\n firstWithOverflow.focus();\n }, 0);\n }\n }\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n button.addEventListener('click', clickEvent);\n });\n return cleanUp;\n};\n\nconst setToolbar = (\n toolbar: HTMLElement,\n onCloseContentToggle: (toolbarElement: HTMLElement) => void,\n setOverflowOnly = true,\n): ExtendedCleanUpPair[] => {\n let cleanUp: ExtendedCleanUpPair[] = [];\n\n setOverflow(toolbar);\n onCloseContentToggle(toolbar);\n cleanUp = cleanUp.concat(setToolbarToggle(toolbar));\n\n if (!setOverflowOnly) {\n const bodyClickEvent = (event: Event) => {\n if (!(event.target as HTMLElement).classList.contains('content-toggle__toggle')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'content-toggle__content')) {\n onCloseContentToggle(toolbar);\n }\n };\n\n const escKeyEvent = (event: Event) => {\n if ((event as KeyboardEvent).key === 'Escape') {\n if (event.target && (event.target as HTMLElement).getAttribute('type') !== 'search') {\n onCloseContentToggle(toolbar);\n }\n }\n };\n\n const body = document.querySelector('body');\n\n cleanUp.push({\n element: body as Element,\n clickEvent: bodyClickEvent,\n });\n\n cleanUp.push({\n element: window,\n keyUpEvent: escKeyEvent,\n });\n\n body?.addEventListener('click', bodyClickEvent);\n window.addEventListener('keyup', escKeyEvent);\n }\n\n return cleanUp;\n};\n\nconst findToolbar = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('toolbar')) {\n return parent;\n }\n return findToolbar(parent);\n }\n return element;\n};\n\nconst contentToggleEdgeHandling = (element: HTMLElement): void => {\n if (!isViewportBelow('--bp-medium') && !isViewportBelow('--bp-low-height')) {\n const allowedDistance = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue('--toolbar-popout-allowed-edge-distance').replace('rem,', ''), 10));\n const popoutX = parseInt(getComputedStyle(element).width.replace('px', ''), 10);\n const popoutWidth = element.getBoundingClientRect().x;\n\n const distance = document.body.offsetWidth - allowedDistance - popoutX - popoutWidth;\n\n if (distance < 0) {\n element.style.setProperty('--toolbar-popout-edge-overflow', `${distance}px`);\n }\n }\n};\n\nexport {\n setToolbar,\n setOverflow,\n findToolbar,\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n lockBodyScroll,\n unlockBodyScroll,\n};\n","/* eslint-disable no-param-reassign */\n/* eslint-env browser */\nimport ready from '../components/ready';\nimport {\n setResponsiveNav,\n setResponsiveToggle,\n} from '../components/nav';\nimport { isElementWithClassNameInEventPath, setMetaThemeColor } from '../components/helpers';\nimport { setResponsiveTable } from '../components/table';\nimport { setTabbedContent, isBelowViewportLimit, destroyTabs } from '../components/tabs';\nimport { setContentToggle } from '../components/content-toggle';\nimport {\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n findToolbar,\n lockBodyScroll,\n unlockBodyScroll,\n} from '../components/toolbar';\n\nlet windowInnerWidth = 0;\n\nconst tabbedObjects: ITabbedObject[] = [];\n\nconst setTabs = (): void => {\n tabbedObjects.forEach((tabObject: ITabbedObject, key: number): void => {\n const { rendered, domElement } = tabObject;\n if (isBelowViewportLimit(domElement.classList)) {\n if (!rendered) {\n const focus = domElement.getAttribute('data-focus-onload');\n const dataInitial = domElement.getAttribute('data-initial-tab');\n const initial = dataInitial ? parseInt(dataInitial, 10) : 0;\n setTabbedContent(key, domElement, initial, focus !== 'false');\n tabObject.rendered = true;\n }\n } else if (rendered) {\n destroyTabs(domElement);\n tabObject.rendered = false;\n }\n });\n};\n\nready(() => {\n const tabbedContent = document.querySelectorAll('.tabbed-content'); \n tabbedContent.forEach((tab) => tabbedObjects.push({\n domElement: tab,\n rendered: false,\n }));\n setTabs(); //med i typo3\n setMetaThemeColor();\n\n const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setResponsiveToggle(navElements);\n\n const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');\n tables.forEach((table) => setResponsiveTable(table));\n\n const toggles = document.querySelectorAll('.content-toggle__content'); //med i typo3\n toggles.forEach((toggle) => {\n setContentToggle(\n toggle,\n (popout: HTMLElement) => {\n contentToggleEdgeHandling(popout);\n lockBodyScroll();\n },\n (content: HTMLElement) => closeAllContentTogglesInToolbar(findToolbar(content)),\n (content: HTMLElement, button: HTMLButtonElement) => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n const toolbar = findToolbar(content);\n if (ariaExpanded === 'true') {\n toolbar?.classList.add('toolbar--has-popout');\n } else {\n toolbar?.classList.remove('toolbar--has-popout');\n }\n\n content.addEventListener('click', (event: MouseEvent) => {\n if ((event.target as HTMLElement).classList.contains('toolbar__popout')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'toolbar__filter__content')) {\n closeAllContentTogglesInToolbar(toolbar);\n unlockBodyScroll();\n }\n });\n },\n );\n });\n\n window.addEventListener('load', () => {\n windowInnerWidth = window.innerWidth;\n });\n\n window.addEventListener('resize', () => {\n if (windowInnerWidth > 0 && window.innerWidth !== windowInnerWidth) {\n windowInnerWidth = window.innerWidth;\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setTabs();\n }\n });\n});\n","/* eslint-env browser */\nconst ready = (fn: () => void): void => {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n};\n\nexport default ready;\n","/* eslint-disable import/prefer-default-export */\nconst setResponsiveTable = (table: Element): void => {\n const head = table.querySelector('thead');\n const body = table.querySelector('tbody');\n const foot = table.querySelector('tfoot');\n\n if (head) {\n const headers: string[] = [];\n const ths = head.querySelectorAll('th');\n ths.forEach((h) => {\n if (!h.classList.contains('table__cell--self-explanatory')) {\n headers.push(h.innerHTML); // Because innerText inherits stuff like text-transform\n } else {\n headers.push(''); // If header is self explanatory we do not add it\n }\n });\n\n const rowContainers: HTMLTableSectionElement[] = [];\n // Table elements that possibly contains <tr>'s\n if (body) {\n rowContainers.push(body);\n }\n if (foot) {\n rowContainers.push(foot);\n }\n\n rowContainers.forEach((rc) => {\n const rows = rc.querySelectorAll('tr');\n rows.forEach((tr) => {\n const cells = tr.querySelectorAll('td, th');\n cells.forEach((cell, i) => {\n if (headers[i]) {\n // if header is self explanatory we skip (value of array index is '' which is falsy)\n cell.setAttribute('data-label', headers[i]);\n }\n });\n });\n });\n }\n};\n\nexport {\n setResponsiveTable,\n};\n","/* eslint-disable max-len */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\nconst setContentToggle = (\n content: Element,\n onClick: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n beforeCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n afterCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n): CleanUpPair[] => {\n const cleanUp: CleanUpPair[] = [];\n const setContentClose = (button: HTMLElement, contentClose: HTMLElement, focus: boolean): () => void => {\n if (focus) {\n contentClose.focus();\n }\n const click = () => {\n content.setAttribute('hidden', 'hidden');\n button.removeAttribute('hidden');\n button.setAttribute('aria-expanded', 'false');\n button.focus();\n };\n contentClose.addEventListener('click', click);\n return click;\n };\n\n const button = content?.parentElement?.querySelector('.content-toggle__toggle') as HTMLElement;\n const contentClose = content.querySelectorAll('.content-toggle__close');\n\n if (button) {\n const clickEvent = () => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n // Til toolbar: hvis man klikker på en knap, der ikke er foldet ud\n // Så lukker vi alle åbne content-toggles\n if (typeof beforeCallback === 'function' && ariaExpanded === 'false') {\n beforeCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n // Og så går vi i gang med folde-ud-logikken\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n if (ariaExpanded === 'true') {\n content.setAttribute('hidden', 'hidden');\n } else {\n content.removeAttribute('hidden');\n }\n\n if (typeof onClick === 'function') {\n onClick(content as HTMLElement, button as HTMLButtonElement);\n }\n\n if (button.hasAttribute('aria-haspopup')) {\n button.setAttribute('hidden', 'hidden');\n contentClose.forEach((cc) => {\n setContentClose(button, cc as HTMLElement, true);\n });\n }\n\n // Det der sker efter folde-logikken\n if (typeof afterCallback === 'function') {\n afterCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n };\n\n button.addEventListener('click', clickEvent);\n // Altid tilføj denne først!\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n contentClose.forEach((cc) => {\n const btnClick = setContentClose(button, cc as HTMLElement, false);\n cleanUp.push({\n element: cc,\n clickEvent: btnClick,\n });\n });\n }\n return cleanUp;\n};\n\nexport {\n setContentToggle,\n};\n"],"sourceRoot":""}
|
package/build/js/demo/app.ts
CHANGED
|
@@ -35,11 +35,11 @@ ready(() => {
|
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
// Find alle copy-to-clipboard elementer
|
|
38
|
-
const ctc = document.querySelectorAll('.copy-to-clipboard');
|
|
39
|
-
ctc.forEach((element) => setCopyToClipboard(element as HTMLElement));
|
|
38
|
+
const ctc = document.querySelectorAll('.copy-to-clipboard'); //med i typo3
|
|
39
|
+
ctc.forEach((element) => setCopyToClipboard(element as HTMLElement, document.querySelector('html')?.getAttribute('lang') === 'en' ? 'Copied!' : 'Kopieret!'));
|
|
40
40
|
|
|
41
41
|
// Horizontal scroll
|
|
42
|
-
const horizontalScroll = document.querySelectorAll('.horizontal-scroll');
|
|
42
|
+
const horizontalScroll = document.querySelectorAll('.horizontal-scroll'); //med i typo3
|
|
43
43
|
horizontalScroll.forEach((hs) => {
|
|
44
44
|
setHorizontalScroll(hs as HTMLElement);
|
|
45
45
|
});
|
|
@@ -72,7 +72,7 @@ ready(() => {
|
|
|
72
72
|
}, false));
|
|
73
73
|
|
|
74
74
|
document.documentElement.style.setProperty('--window-inner-height', `${window.innerHeight}px`);
|
|
75
|
-
setScrollbarWidthVariable();
|
|
75
|
+
setScrollbarWidthVariable(); //med i typo3
|
|
76
76
|
|
|
77
77
|
window.addEventListener('load', () => {
|
|
78
78
|
windowInnerWidth = window.innerWidth;
|
|
@@ -40,12 +40,12 @@ const setTabs = (): void => {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
ready(() => {
|
|
43
|
-
const tabbedContent = document.querySelectorAll('.tabbed-content');
|
|
43
|
+
const tabbedContent = document.querySelectorAll('.tabbed-content');
|
|
44
44
|
tabbedContent.forEach((tab) => tabbedObjects.push({
|
|
45
45
|
domElement: tab,
|
|
46
46
|
rendered: false,
|
|
47
47
|
}));
|
|
48
|
-
setTabs();
|
|
48
|
+
setTabs(); //med i typo3
|
|
49
49
|
setMetaThemeColor();
|
|
50
50
|
|
|
51
51
|
const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');
|
|
@@ -55,7 +55,7 @@ ready(() => {
|
|
|
55
55
|
const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');
|
|
56
56
|
tables.forEach((table) => setResponsiveTable(table));
|
|
57
57
|
|
|
58
|
-
const toggles = document.querySelectorAll('.content-toggle__content');
|
|
58
|
+
const toggles = document.querySelectorAll('.content-toggle__content'); //med i typo3
|
|
59
59
|
toggles.forEach((toggle) => {
|
|
60
60
|
setContentToggle(
|
|
61
61
|
toggle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./source/js/components/helpers.ts","webpack:///./source/js/components/nav.ts","webpack:///./source/js/components/tabs.ts","webpack:///./source/js/components/toolbar.ts","webpack:///./source/js/production/app.ts","webpack:///./source/js/components/ready.ts","webpack:///./source/js/components/table.ts","webpack:///./source/js/components/content-toggle.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","isElementWithClassNameInEventPath","event","className","found","composedPath","forEach","classList","contains","convertRemToPixels","rem","parseFloat","getComputedStyle","document","documentElement","fontSize","isViewportBelow","mediaQuery","Math","max","clientWidth","innerWidth","parseInt","getPropertyValue","replace","findNav","element","parent","parentElement","closeResponsiveNav","navElements","keepOpen","button","querySelector","focus","setAttribute","remove","setResponsiveToggle","cleanUp","querySelectorAll","clickEvent","nav","navItems","lastNavItem","add","firstElement","transitionListener","toggle","removeEventListener","addEventListener","toggleMenu","ariaExpanded","getAttribute","push","setResponsiveNav","navElement","navItemsParent","isOverflownClass","hasOverflowClass","isActiveClass","hasOverflown","length","offsetTop","isActive","bodyClickEvent","e","target","isBelowViewportLimit","widthInRem","getBaseFontSize","mediaWidth","getMediaWidthBasedOnModifier","switchTab","tabs","panels","oldTab","newTab","_","callback","index","console","log","removeAttribute","Array","indexOf","from","id","link","hidden","oldIndex","dispatchEvent","CustomEvent","bubbles","detail","tab","closeAllContentTogglesInToolbar","toolbar","content","findToolbar","windowInnerWidth","tabbedObjects","setTabs","tabObject","rendered","domElement","dataInitial","tabbed","initial","tablist","section","parentNode","expandAll","expandAllEvent","panel","tabClickEvent","preventDefault","currentTab","currentTarget","tabIndex","tabKeyEvent","dir","setTabbedContent","destroyTabs","fn","readyState","ready","body","bgColor","existingMeta","meta","createElement","getElementsByTagName","appendChild","setMetaThemeColor","table","head","foot","headers","h","innerHTML","rowContainers","rc","tr","cell","setResponsiveTable","onClick","beforeCallback","afterCallback","setContentClose","contentClose","click","hasAttribute","cc","btnClick","setContentToggle","popout","allowedDistance","popoutX","width","popoutWidth","getBoundingClientRect","x","distance","offsetWidth","style","setProperty","contentToggleEdgeHandling","lockBodyScroll","unlockBodyScroll"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ,EAAGI,EACHC,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQF,GAAUG,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAQ,EAAoBK,EAAIF,EAGxBH,EAAoBM,EAAIP,EAGxBC,EAAoBO,EAAI,SAASf,EAASgB,EAAMC,GAC3CT,EAAoBU,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhET,EAAoBe,EAAI,SAASvB,GACX,oBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,O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EuI,EAAcrI,EAAQsI,wBAAwBC,EAE9CC,EAAWrJ,SAASiH,KAAKqC,YAAcP,EAAkBC,EAAUE,EAErEG,EAAW,GACbxI,EAAQ0I,MAAMC,YAAY,oCAAqCH,SCjG7DI,CAA0BX,GD3DX,MACrB,MAAM7B,EAAOjH,SAASoB,cAAc,SAChCjB,EAAgB,gBAAkBA,EAAgB,sBACpD8G,WAAMvH,UAAUqC,IAAI,qBCyDhB2H,IAEDtE,GAAyBF,EAAgCG,EAAYD,IACtE,CAACA,EAAsBjE,KACrB,MAAMmB,EAAenB,EAAOoB,aAAa,iBACnC4C,EAAUE,EAAYD,GACP,SAAjB9C,EACF6C,WAASzF,UAAUqC,IAAI,uBAEvBoD,WAASzF,UAAU6B,OAAO,uBAG5B6D,EAAQhD,iBAAiB,QAAU/C,IAC5BA,EAAMgE,OAAuB3D,UAAUC,SAAS,qBAC/CP,EAAkCC,EAAqB,8BAC3D6F,EAAgCC,GDpEnB,MACvB,MAAM8B,EAAOjH,SAASoB,cAAc,QACpC6F,WAAMvH,UAAU6B,OAAO,oBCmEboI,UAOV1M,OAAOmF,iBAAiB,OAAQ,KAC9BkD,EAAmBrI,OAAOuD,aAG5BvD,OAAOmF,iBAAiB,SAAU,KAC5BkD,EAAmB,GAAKrI,OAAOuD,aAAe8E,IAChDA,EAAmBrI,OAAOuD,WAC1BS,EAAYxB,QAASZ,GAAM4D,EAAiBxB,EAAapC,IACzD2G","file":"app.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* eslint-disable wrap-iife */\n/* eslint-disable import/prefer-default-export */\n/* eslint-env browser */\nconst copyToClipboard = (str: string): void => {\n // eslint-disable-next-line no-console\n navigator.clipboard.writeText(str).then(() => console.log(`${str} written to clipboard`));\n};\n\nconst isElementWithClassNameInEventPath = (event: MouseEvent, className: string): boolean => {\n let found = false;\n const path = event.composedPath();\n path.forEach((p: EventTarget): void => {\n if ((p as HTMLElement).classList) {\n if ((p as HTMLElement).classList.contains(className)) {\n found = true;\n }\n }\n });\n return found;\n};\n\nconst setMetaThemeColor = (): void => {\n const body = document.querySelector('body');\n if (body) {\n const bgColor = window.getComputedStyle(body).getPropertyValue('--color-background');\n const existingMeta = document.querySelector('meta[name=\"theme-color\"]') as HTMLMetaElement;\n if (existingMeta) {\n existingMeta.content = bgColor;\n } else {\n const meta = document.createElement('meta');\n meta.name = 'theme-color';\n meta.content = bgColor;\n document.getElementsByTagName('head')[0].appendChild(meta);\n }\n }\n};\n\nconst getBaseFontSize = (): number => parseInt(window.getComputedStyle(document.documentElement).fontSize.replace('px', ''), 10);\n\n// eslint-disable-next-line max-len\nconst convertRemToPixels = (rem: number): number => rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst isViewportBelow = (mediaQuery: string): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const mediaQueryValue = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue(mediaQuery).replace('rem', ''), 10));\n return viewportWidth < mediaQueryValue;\n};\n\nconst setScrollbarWidthVariable = (): void => {\n const scrollbarWidth = window.innerWidth - document.body.clientWidth;\n document.documentElement.style.setProperty('--vertical-scrollbar-width', `${scrollbarWidth}px`);\n};\n\nconst overflowsY = (element: HTMLElement): boolean => element.offsetHeight !== element.scrollHeight;\nconst overflowsX = (element: HTMLElement): boolean => element.offsetWidth !== element.scrollWidth;\n// eslint-disable-next-line max-len\nconst elementOverflows = (element: HTMLElement): boolean => overflowsY(element) || overflowsX(element);\n\nconst setHorizontalScroll = (element: HTMLElement): void => {\n const content = element.querySelector('.horizontal-scroll__scrollable-content');\n if (!overflowsX(content as HTMLElement)) {\n element.classList.add('horizontal-scroll--no-overflow');\n content?.removeAttribute('tabindex');\n } else {\n content?.setAttribute('tabindex', '0');\n }\n};\n\nexport {\n copyToClipboard,\n isElementWithClassNameInEventPath,\n getBaseFontSize,\n setMetaThemeColor,\n isViewportBelow,\n convertRemToPixels,\n setScrollbarWidthVariable,\n overflowsX,\n overflowsY,\n elementOverflows,\n setHorizontalScroll,\n};\n","/* eslint-env browser */\nimport { copyToClipboard, isElementWithClassNameInEventPath } from './helpers';\n\nconst findNav = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('nav')) {\n return parent;\n }\n return findNav(parent);\n }\n return element;\n};\n\n// eslint-disable-next-line max-len\nconst closeResponsiveNav = (navElements: NodeListOf<Element>, keepOpen: HTMLElement | null = null): void => {\n const navToggledClass = 'nav--toggled';\n navElements.forEach((n) => {\n const button = n.querySelector('.nav__toggle') as HTMLElement;\n if (n !== keepOpen) {\n if (n.classList.contains(navToggledClass)) {\n button.focus();\n button.setAttribute('aria-expanded', 'false');\n }\n n.classList.remove(navToggledClass);\n }\n });\n};\n\nconst setResponsiveToggle = (navElements: NodeListOf<Element>): CleanUpPair[] => {\n const toggleMenu = (button: HTMLElement) => {\n const parent = findNav(button);\n\n const navItems = parent.querySelector('.nav__items');\n const lastNavItem = navItems?.querySelector('.nav__item:last-of-type');\n navItems?.classList.add('nav__items--fadeout');\n const firstElement = navItems?.querySelector('.nav__item--is-overflown') as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n }\n\n const transitionListener = () => {\n parent.classList.toggle('nav--toggled');\n navItems?.classList.remove('nav__items--fadeout');\n lastNavItem?.removeEventListener('transitionend', transitionListener);\n };\n\n lastNavItem?.addEventListener('transitionend', transitionListener);\n return parent;\n };\n\n const cleanUp: CleanUpPair[] = [];\n\n const toggle = document.querySelectorAll('.nav__toggle');\n toggle.forEach((button) => {\n const clickEvent = () => {\n const nav = toggleMenu(button as HTMLElement);\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n closeResponsiveNav(navElements, nav);\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n button.addEventListener('click', clickEvent);\n });\n\n return cleanUp;\n};\n\nconst setResponsiveNav = (\n navElements: NodeListOf<Element>,\n navElement: Element,\n): SetResponsiveNavCleanUp => {\n const navToggledClass = 'nav--toggled';\n const navItemsClass = 'nav__items';\n // gitlab #117\n navElement.classList.remove(navToggledClass);\n const navItemsParent = navElement.querySelector(`.${navItemsClass}`);\n\n if (navItemsParent) {\n const navItems = navItemsParent.querySelectorAll('.nav__item');\n const isOverflownClass = 'nav__item--is-overflown';\n const hasOverflowClass = 'nav--has-overflow';\n const isActiveClass = 'nav__item--active';\n let hasOverflown = false;\n\n for (let i = navItems.length - 1; i >= 0; i -= 1) {\n const nav = navItems[i] as HTMLElement;\n const top = nav.offsetTop;\n\n if (top > 0) {\n nav.classList.add(isOverflownClass);\n navElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n } else if (!nav.classList.contains(isActiveClass)) {\n nav.classList.remove(isOverflownClass);\n }\n }\n\n if (!hasOverflown) {\n navElement.classList.remove(hasOverflowClass);\n const isActive = navElement.querySelector(`.${isActiveClass}`);\n if (isActive) {\n isActive.classList.remove(isOverflownClass);\n }\n }\n }\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!(e.target as HTMLElement).classList.contains('nav__toggle')\n && !isElementWithClassNameInEventPath(e as MouseEvent, navItemsClass)) {\n closeResponsiveNav(navElements);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n\n return {\n element: document.querySelector('body'),\n clickEvent: bodyClickEvent,\n };\n};\n\nconst closeSubNav = (buttons: NodeListOf<Element>, keepOpen: Element | null = null) => {\n const subNavClass = 'sub-nav--toggled';\n buttons.forEach((button) => {\n if (button !== keepOpen) {\n if (button?.parentElement?.classList.contains(subNavClass)) {\n (button as HTMLElement).focus();\n button.setAttribute('aria-expanded', 'false');\n }\n button?.parentElement?.classList.remove(subNavClass);\n }\n });\n};\n\nconst setSubNavToggle = (buttons: NodeListOf<Element>, button: Element): SetSubNavToggleCleanUp => {\n const subNavClass = 'sub-nav--toggled';\n const buttonClickEvent = () => {\n button?.parentElement?.classList.toggle(subNavClass);\n if (button?.parentElement?.classList.contains(subNavClass)) {\n button.setAttribute('aria-expanded', 'true');\n } else {\n button.setAttribute('aria-expanded', 'false');\n }\n closeSubNav(buttons, button);\n };\n\n button.addEventListener('click', buttonClickEvent);\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!isElementWithClassNameInEventPath(e as MouseEvent, 'sub-nav')) {\n closeSubNav(buttons);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n return {\n buttonClickEvent,\n element: document.querySelector('body'),\n bodyClickEvent,\n };\n};\n\nconst setClickMessage = ((\n text: string,\n copyElement: Element,\n clickElement: Element | null,\n ctcThis: HTMLElement | null,\n listener: () => void,\n): void => {\n if (ctcThis && clickElement) {\n // Vi kopierer teksten til clipboard\n copyToClipboard(ctcThis.innerText);\n copyElement.classList.add('copy-to-clipboard--confirm');\n if (copyElement === clickElement) {\n copyElement.classList.add('copy-to-clipboard--done');\n }\n // Laver en span, der viser, at teksten er kopieret\n const ctcThisMessage = document.createElement('span');\n ctcThisMessage.classList.add('copy-to-clipboard__this__confirm-message');\n ctcThisMessage.innerText = text;\n ctcThis.appendChild(ctcThisMessage);\n\n // Efter 1,2 sekunder fjerner vi beskeden igen\n clickElement.removeEventListener('click', listener);\n setTimeout(() => {\n copyElement.classList.remove('copy-to-clipboard--confirm');\n ctcThisMessage.remove();\n clickElement.addEventListener('click', listener);\n }, 1200);\n }\n});\n\nconst setCopyToClipboard = (element: HTMLElement, text = 'Kopieret!'): void => {\n const ctcThis = <HTMLElement>element.querySelector('.copy-to-clipboard__this');\n // Hvis det er en knap, så sætter vi click event på knappen\n if ((element as HTMLButtonElement).type === 'button') {\n const listener = (): void => {\n setClickMessage(text, element, element, ctcThis, listener);\n };\n element.addEventListener('click', listener);\n // Hvis det ikke er en knap, finder vi knappen \"inde i\" elementet\n } else {\n const btn = element.querySelector('.copy-to-clipboard__execute');\n const listener = (): void => {\n setClickMessage(text, element, btn, ctcThis, listener);\n };\n btn?.addEventListener('click', listener);\n }\n};\n\nconst setSearchToggle = (navSearch: Element, button: Element): void => {\n const toggleClass = 'nav__search--toggled';\n button.addEventListener('click', () => {\n if (navSearch.classList.contains(toggleClass)) {\n button.setAttribute('aria-expanded', 'false');\n navSearch.classList.remove(toggleClass);\n } else {\n button.setAttribute('aria-expanded', 'true');\n navSearch.classList.add(toggleClass);\n }\n });\n};\n\nexport {\n findNav,\n setResponsiveToggle,\n setResponsiveNav,\n setSubNavToggle,\n setCopyToClipboard,\n setSearchToggle,\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable no-param-reassign */\nimport { getBaseFontSize } from './helpers';\n\nconst getMediaWidthBasedOnModifier = (classList: DOMTokenList): number => {\n if (classList.contains('tabbed-content--hide-tabs-on-medium-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-medium').replace('rem', ''), 10);\n }\n if (classList.contains('tabbed-content--hide-tabs-on-wide-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-wide').replace('rem', ''), 10);\n }\n\n return -1;\n};\n\nconst isBelowViewportLimit = (classList: DOMTokenList): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const widthInRem = viewportWidth / getBaseFontSize();\n const mediaWidth = getMediaWidthBasedOnModifier(classList);\n if (mediaWidth > -1) {\n return widthInRem < mediaWidth;\n }\n return true;\n};\n\nconst destroyTabs = (tabbed: Element): void => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n tabs?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('nav__item--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst destroySwitches = (tabbed: Element): void => {\n const switchlist = tabbed.querySelector('.switch');\n const switches = switchlist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n switches?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('switch__segment--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst switchTab = (\n tabs: NodeListOf<HTMLAnchorElement>,\n panels: HTMLElement[],\n oldTab: Element | null,\n newTab: HTMLElement,\n _: DOMTokenList,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number): void => console.log(index),\n): void => {\n if (focus) {\n newTab.focus();\n }\n // Make the active tab focusable by the user (Tab key)\n newTab.removeAttribute('tabindex');\n // Set the selected state\n newTab.setAttribute('aria-selected', 'true');\n\n // Check if switch // should this be more pretty?\n if (newTab.classList.contains('switch__segment')) {\n newTab.classList.add('switch__segment--active');\n } else {\n newTab.classList.add('nav__item--active');\n }\n\n if (oldTab) {\n oldTab.removeAttribute('aria-selected');\n oldTab.setAttribute('tabindex', '-1');\n\n if (oldTab.classList.contains('switch__segment')) {\n oldTab.classList.remove('switch__segment--active');\n } else {\n oldTab.classList.remove('nav__item--active');\n }\n }\n\n const index = Array.prototype.indexOf.call(tabs, newTab);\n\n // More links\n /*let moreLinks;\n var moreLink: HTMLElement;\n moreLinks = document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`);\n moreLinks.forEach((moreLink) => {\n moreLink.classList.add('tabbed-content-peripheral--active');\n moreLink.hidden = false;\n });*/\n let moreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`));\n moreLinks.forEach((link) => {\n link.classList.add('tabbed-content-peripheral--active');\n link.hidden = false;\n });\n\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n panels[index].hidden = false;\n if (oldTab) {\n const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);\n\n let oldMoreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[oldIndex].id}\"]`));\n oldMoreLinks.forEach((link) => {\n link.classList.remove('tabbed-content-peripheral--active');\n link.hidden = true;\n });\n\n /* moreLinks.forEach((moreLink) => {\n moreLink.classList.remove('tabbed-content-peripheral--active');\n moreLink.hidden = true;\n });*/\n\n panels[oldIndex].hidden = true;\n }\n\n // Dispatches custom event on every tab change\n newTab.dispatchEvent(new CustomEvent('switch-tab', {\n bubbles: true,\n detail: { tab: index },\n }));\n callback(index);\n};\n\nconst setTabbedContent = (\n key: number,\n tabbed: Element,\n initial = 0,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number) => console.log(index),\n): void => {\n const tablist = tabbed.querySelector('.switch,.nav__items') as HTMLElement;\n const tabs = tablist.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n\n const expandAll = tabbed.querySelector('button.tabbed-content__expand-all');\n if (expandAll) {\n const expandAllEvent = () => {\n tablist.hidden = true;\n panels.forEach((panel: HTMLElement) => {\n panel.hidden = false;\n });\n };\n\n expandAll.removeEventListener('click', expandAllEvent);\n expandAll.addEventListener('click', expandAllEvent);\n }\n\n // Add the tablist role to the first <ul> in the .tabbed container\n tablist.setAttribute('role', 'tablist');\n\n // Add semantics are remove user focusability for each tab\n tabs.forEach((tab, i) => {\n tab.setAttribute('role', 'tab');\n tab.setAttribute('id', `tab${key}_${(i + 1)}`);\n tab.setAttribute('tabindex', '-1');\n tab.parentElement?.setAttribute('role', 'presentation');\n\n // Handle clicking of tabs for mouse users\n const tabClickEvent = (e: MouseEvent) => {\n e.preventDefault();\n const currentTab = tablist.querySelector('[aria-selected]');\n if (e.currentTarget !== currentTab) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, currentTab, e.currentTarget as HTMLElement, tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n };\n\n tab.removeEventListener('click', tabClickEvent);\n tab.addEventListener('click', tabClickEvent);\n\n // Handle keydown events for keyboard users\n const tabKeyEvent = (e: KeyboardEvent) => {\n // Get the index of the current tab in the tabs node list\n const index = Array.prototype.indexOf.call(tabs, e.currentTarget);\n // Work out which key the user is pressing and\n // Calculate the new tab's index where appropriate\n let dir: number | string | null = null;\n if (e.key === 'ArrowLeft') {\n dir = index - 1;\n }\n if (e.key === 'ArrowRight') {\n dir = index + 1;\n }\n if (e.key === 'ArrowDown') {\n dir = 'down';\n }\n if (dir !== null) {\n e.preventDefault();\n // If the down key is pressed, move focus to the open panel,\n // otherwise switch to the adjacent tab\n if (dir === 'down') {\n panels[i].focus();\n } else if (tabs[dir]) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, e.currentTarget as Element, tabs[dir], tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n }\n };\n tab.removeEventListener('keydown', tabKeyEvent);\n tab.addEventListener('keydown', tabKeyEvent);\n });\n\n // Add tab panel semantics and hide them all\n panels.forEach((panel: HTMLElement, i: number) => {\n panel.setAttribute('tabindex', '-1');\n panel.setAttribute('aria-labelledby', tabs[i].id);\n // eslint-disable-next-line no-param-reassign\n panel.hidden = true;\n panel.setAttribute('role', 'tabpanel');\n });\n\n // Initially activate the first tab and reveal the first tab panel\n if (initial > -1) {\n switchTab(tabs, panels, null, tabs[initial], tabbed.classList, focus);\n }\n};\n\nexport {\n setTabbedContent,\n isBelowViewportLimit,\n destroyTabs,\n destroySwitches,\n};\n","/* eslint-disable max-len */\nimport { convertRemToPixels, isElementWithClassNameInEventPath, isViewportBelow } from './helpers';\n\nconst lockBodyScroll = (): void => {\n const body = document.querySelector('body');\n if (isViewportBelow('--bp-medium') || isViewportBelow('--bp-low-height')) {\n body?.classList.add('body--no-scroll');\n }\n};\n\nconst unlockBodyScroll = (): void => {\n const body = document.querySelector('body');\n body?.classList.remove('body--no-scroll');\n};\n\n/* eslint-env browser */\nconst closeAllContentTogglesInToolbar = (toolbar: HTMLElement): void => {\n const contentToggles = toolbar.querySelectorAll('.content-toggle__toggle');\n contentToggles.forEach((toggle) => {\n const content = toggle.parentElement?.querySelector('.content-toggle__content');\n toggle.setAttribute('aria-expanded', 'false');\n content?.setAttribute('hidden', 'hidden');\n });\n};\n\nconst setOverflow = (toolbarElement: Element): void => {\n if (!toolbarElement.classList.contains('toolbar--no-collapse')) {\n toolbarElement.classList.remove('toolbar--toggled');\n }\n toolbarElement.classList.remove('toolbar--fully-overflown');\n toolbarElement.classList.remove('toolbar--has-popout');\n const toolbarItemsParent = toolbarElement.querySelector('.toolbar__items');\n const toolbarItems = toolbarItemsParent?.children as HTMLCollection;\n const isOverflownClass = 'toolbar__item--is-overflown';\n const hasOverflowClass = 'toolbar--has-overflow';\n let hasOverflown = false;\n\n let overflownCount = 0;\n const addOverflowClass = (item: HTMLElement, index: number) => {\n if (item) {\n const top = item.offsetTop;\n if (top > 25) {\n item.classList.add(isOverflownClass);\n toolbarElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n overflownCount += 1;\n } else {\n item.classList.remove(isOverflownClass);\n }\n\n if (!hasOverflown) {\n toolbarElement.classList.remove(hasOverflowClass);\n } else if (index - 1 >= 0) {\n addOverflowClass(toolbarItems[index - 1] as HTMLElement, index - 1);\n }\n }\n };\n\n addOverflowClass(toolbarItems[toolbarItems.length - 1] as HTMLElement, toolbarItems.length - 1);\n\n if (overflownCount > 0 && overflownCount === toolbarItems.length) {\n toolbarElement.classList.add('toolbar--fully-overflown');\n }\n};\n\nconst setToolbarToggle = (toolbar: HTMLElement): ExtendedCleanUpPair[] => {\n const cleanUp: ExtendedCleanUpPair[] = [];\n const buttons = toolbar.querySelectorAll('.toolbar__toggle');\n buttons.forEach((button) => {\n const clickEvent = () => {\n button?.parentElement?.classList.toggle('toolbar--toggled');\n const ariaExpanded = button.getAttribute('aria-expanded');\n if (ariaExpanded !== 'true') {\n const focusable = 'a.toolbar__item--is-overflown, button.toolbar__item--is-overflown, input.toolbar__item--is-overflown, select.toolbar__item--is-overflown, .toolbar__item--is-overflown a, .toolbar__item--is-overflown button, .toolbar__item--is-overflown input, .toolbar__item--is-overflown select';\n const firstWithOverflow = button?.parentElement?.querySelector(focusable) as HTMLElement;\n if (firstWithOverflow) {\n setTimeout(() => {\n firstWithOverflow.focus();\n }, 0);\n }\n }\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n button.addEventListener('click', clickEvent);\n });\n return cleanUp;\n};\n\nconst setToolbar = (\n toolbar: HTMLElement,\n onCloseContentToggle: (toolbarElement: HTMLElement) => void,\n setOverflowOnly = true,\n): ExtendedCleanUpPair[] => {\n let cleanUp: ExtendedCleanUpPair[] = [];\n\n setOverflow(toolbar);\n onCloseContentToggle(toolbar);\n cleanUp = cleanUp.concat(setToolbarToggle(toolbar));\n\n if (!setOverflowOnly) {\n const bodyClickEvent = (event: Event) => {\n if (!(event.target as HTMLElement).classList.contains('content-toggle__toggle')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'content-toggle__content')) {\n onCloseContentToggle(toolbar);\n }\n };\n\n const escKeyEvent = (event: Event) => {\n if ((event as KeyboardEvent).key === 'Escape') {\n if (event.target && (event.target as HTMLElement).getAttribute('type') !== 'search') {\n onCloseContentToggle(toolbar);\n }\n }\n };\n\n const body = document.querySelector('body');\n\n cleanUp.push({\n element: body as Element,\n clickEvent: bodyClickEvent,\n });\n\n cleanUp.push({\n element: window,\n keyUpEvent: escKeyEvent,\n });\n\n body?.addEventListener('click', bodyClickEvent);\n window.addEventListener('keyup', escKeyEvent);\n }\n\n return cleanUp;\n};\n\nconst findToolbar = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('toolbar')) {\n return parent;\n }\n return findToolbar(parent);\n }\n return element;\n};\n\nconst contentToggleEdgeHandling = (element: HTMLElement): void => {\n if (!isViewportBelow('--bp-medium') && !isViewportBelow('--bp-low-height')) {\n const allowedDistance = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue('--toolbar-popout-allowed-edge-distance').replace('rem,', ''), 10));\n const popoutX = parseInt(getComputedStyle(element).width.replace('px', ''), 10);\n const popoutWidth = element.getBoundingClientRect().x;\n\n const distance = document.body.offsetWidth - allowedDistance - popoutX - popoutWidth;\n\n if (distance < 0) {\n element.style.setProperty('--toolbar-popout-edge-overflow', `${distance}px`);\n }\n }\n};\n\nexport {\n setToolbar,\n setOverflow,\n findToolbar,\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n lockBodyScroll,\n unlockBodyScroll,\n};\n","/* eslint-disable no-param-reassign */\n/* eslint-env browser */\nimport ready from '../components/ready';\nimport {\n setResponsiveNav,\n setResponsiveToggle,\n} from '../components/nav';\nimport { isElementWithClassNameInEventPath, setMetaThemeColor } from '../components/helpers';\nimport { setResponsiveTable } from '../components/table';\nimport { setTabbedContent, isBelowViewportLimit, destroyTabs } from '../components/tabs';\nimport { setContentToggle } from '../components/content-toggle';\nimport {\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n findToolbar,\n lockBodyScroll,\n unlockBodyScroll,\n} from '../components/toolbar';\n\nlet windowInnerWidth = 0;\n\nconst tabbedObjects: ITabbedObject[] = [];\n\nconst setTabs = (): void => {\n tabbedObjects.forEach((tabObject: ITabbedObject, key: number): void => {\n const { rendered, domElement } = tabObject;\n if (isBelowViewportLimit(domElement.classList)) {\n if (!rendered) {\n const focus = domElement.getAttribute('data-focus-onload');\n const dataInitial = domElement.getAttribute('data-initial-tab');\n const initial = dataInitial ? parseInt(dataInitial, 10) : 0;\n setTabbedContent(key, domElement, initial, focus !== 'false');\n tabObject.rendered = true;\n }\n } else if (rendered) {\n destroyTabs(domElement);\n tabObject.rendered = false;\n }\n });\n};\n\nready(() => {\n const tabbedContent = document.querySelectorAll('.tabbed-content');\n tabbedContent.forEach((tab) => tabbedObjects.push({\n domElement: tab,\n rendered: false,\n }));\n setTabs();\n setMetaThemeColor();\n\n const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setResponsiveToggle(navElements);\n\n const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');\n tables.forEach((table) => setResponsiveTable(table));\n\n const toggles = document.querySelectorAll('.content-toggle__content');\n toggles.forEach((toggle) => {\n setContentToggle(\n toggle,\n (popout: HTMLElement) => {\n contentToggleEdgeHandling(popout);\n lockBodyScroll();\n },\n (content: HTMLElement) => closeAllContentTogglesInToolbar(findToolbar(content)),\n (content: HTMLElement, button: HTMLButtonElement) => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n const toolbar = findToolbar(content);\n if (ariaExpanded === 'true') {\n toolbar?.classList.add('toolbar--has-popout');\n } else {\n toolbar?.classList.remove('toolbar--has-popout');\n }\n\n content.addEventListener('click', (event: MouseEvent) => {\n if ((event.target as HTMLElement).classList.contains('toolbar__popout')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'toolbar__filter__content')) {\n closeAllContentTogglesInToolbar(toolbar);\n unlockBodyScroll();\n }\n });\n },\n );\n });\n\n window.addEventListener('load', () => {\n windowInnerWidth = window.innerWidth;\n });\n\n window.addEventListener('resize', () => {\n if (windowInnerWidth > 0 && window.innerWidth !== windowInnerWidth) {\n windowInnerWidth = window.innerWidth;\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setTabs();\n }\n });\n});\n","/* eslint-env browser */\nconst ready = (fn: () => void): void => {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n};\n\nexport default ready;\n","/* eslint-disable import/prefer-default-export */\nconst setResponsiveTable = (table: Element): void => {\n const head = table.querySelector('thead');\n const body = table.querySelector('tbody');\n const foot = table.querySelector('tfoot');\n\n if (head) {\n const headers: string[] = [];\n const ths = head.querySelectorAll('th');\n ths.forEach((h) => {\n if (!h.classList.contains('table__cell--self-explanatory')) {\n headers.push(h.innerHTML); // Because innerText inherits stuff like text-transform\n } else {\n headers.push(''); // If header is self explanatory we do not add it\n }\n });\n\n const rowContainers: HTMLTableSectionElement[] = [];\n // Table elements that possibly contains <tr>'s\n if (body) {\n rowContainers.push(body);\n }\n if (foot) {\n rowContainers.push(foot);\n }\n\n rowContainers.forEach((rc) => {\n const rows = rc.querySelectorAll('tr');\n rows.forEach((tr) => {\n const cells = tr.querySelectorAll('td, th');\n cells.forEach((cell, i) => {\n if (headers[i]) {\n // if header is self explanatory we skip (value of array index is '' which is falsy)\n cell.setAttribute('data-label', headers[i]);\n }\n });\n });\n });\n }\n};\n\nexport {\n setResponsiveTable,\n};\n","/* eslint-disable max-len */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\nconst setContentToggle = (\n content: Element,\n onClick: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n beforeCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n afterCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n): CleanUpPair[] => {\n const cleanUp: CleanUpPair[] = [];\n const setContentClose = (button: HTMLElement, contentClose: HTMLElement, focus: boolean): () => void => {\n if (focus) {\n contentClose.focus();\n }\n const click = () => {\n content.setAttribute('hidden', 'hidden');\n button.removeAttribute('hidden');\n button.setAttribute('aria-expanded', 'false');\n button.focus();\n };\n contentClose.addEventListener('click', click);\n return click;\n };\n\n const button = content?.parentElement?.querySelector('.content-toggle__toggle') as HTMLElement;\n const contentClose = content.querySelectorAll('.content-toggle__close');\n\n if (button) {\n const clickEvent = () => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n // Til toolbar: hvis man klikker på en knap, der ikke er foldet ud\n // Så lukker vi alle åbne content-toggles\n if (typeof beforeCallback === 'function' && ariaExpanded === 'false') {\n beforeCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n // Og så går vi i gang med folde-ud-logikken\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n if (ariaExpanded === 'true') {\n content.setAttribute('hidden', 'hidden');\n } else {\n content.removeAttribute('hidden');\n }\n\n if (typeof onClick === 'function') {\n onClick(content as HTMLElement, button as HTMLButtonElement);\n }\n\n if (button.hasAttribute('aria-haspopup')) {\n button.setAttribute('hidden', 'hidden');\n contentClose.forEach((cc) => {\n setContentClose(button, cc as HTMLElement, true);\n });\n }\n\n // Det der sker efter folde-logikken\n if (typeof afterCallback === 'function') {\n afterCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n };\n\n button.addEventListener('click', clickEvent);\n // Altid tilføj denne først!\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n contentClose.forEach((cc) => {\n const btnClick = setContentClose(button, cc as HTMLElement, false);\n cleanUp.push({\n element: cc,\n clickEvent: btnClick,\n });\n });\n }\n return cleanUp;\n};\n\nexport {\n setContentToggle,\n};\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./source/js/components/helpers.ts","webpack:///./source/js/components/nav.ts","webpack:///./source/js/components/tabs.ts","webpack:///./source/js/components/toolbar.ts","webpack:///./source/js/production/app.ts","webpack:///./source/js/components/ready.ts","webpack:///./source/js/components/table.ts","webpack:///./source/js/components/content-toggle.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","isElementWithClassNameInEventPath","event","className","found","composedPath","forEach","classList","contains","convertRemToPixels","rem","parseFloat","getComputedStyle","document","documentElement","fontSize","isViewportBelow","mediaQuery","Math","max","clientWidth","innerWidth","parseInt","getPropertyValue","replace","findNav","element","parent","parentElement","closeResponsiveNav","navElements","keepOpen","button","querySelector","focus","setAttribute","remove","setResponsiveToggle","cleanUp","querySelectorAll","clickEvent","nav","navItems","lastNavItem","add","firstElement","transitionListener","toggle","removeEventListener","addEventListener","toggleMenu","ariaExpanded","getAttribute","push","setResponsiveNav","navElement","navItemsParent","isOverflownClass","hasOverflowClass","isActiveClass","hasOverflown","length","offsetTop","isActive","bodyClickEvent","e","target","isBelowViewportLimit","widthInRem","getBaseFontSize","mediaWidth","getMediaWidthBasedOnModifier","switchTab","tabs","panels","oldTab","newTab","_","callback","index","console","log","removeAttribute","Array","indexOf","from","id","link","hidden","oldIndex","dispatchEvent","CustomEvent","bubbles","detail","tab","closeAllContentTogglesInToolbar","toolbar","content","findToolbar","windowInnerWidth","tabbedObjects","setTabs","tabObject","rendered","domElement","dataInitial","tabbed","initial","tablist","section","parentNode","expandAll","expandAllEvent","panel","tabClickEvent","preventDefault","currentTab","currentTarget","tabIndex","tabKeyEvent","dir","setTabbedContent","destroyTabs","fn","readyState","ready","body","bgColor","existingMeta","meta","createElement","getElementsByTagName","appendChild","setMetaThemeColor","table","head","foot","headers","h","innerHTML","rowContainers","rc","tr","cell","setResponsiveTable","onClick","beforeCallback","afterCallback","setContentClose","contentClose","click","hasAttribute","cc","btnClick","setContentToggle","popout","allowedDistance","popoutX","width","popoutWidth","getBoundingClientRect","x","distance","offsetWidth","style","setProperty","contentToggleEdgeHandling","lockBodyScroll","unlockBodyScroll"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ,EAAGI,EACHC,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQF,GAAUG,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAQ,EAAoBK,EAAIF,EAGxBH,EAAoBM,EAAIP,EAGxBC,EAAoBO,EAAI,SAASf,EAASgB,EAAMC,GAC3CT,EAAoBU,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhET,EAAoBe,EAAI,SAASvB,GACX,oBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,OAAO,KAQvDlB,EAAoBmB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQlB,EAAoBkB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAO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AOjH,SAASoB,cAAc,SAChCjB,EAAgB,gBAAkBA,EAAgB,sBACpD8G,WAAMvH,UAAUqC,IAAI,qBCyDhB2H,IAEDtE,GAAyBF,EAAgCG,EAAYD,IACtE,CAACA,EAAsBjE,KACrB,MAAMmB,EAAenB,EAAOoB,aAAa,iBACnC4C,EAAUE,EAAYD,GACP,SAAjB9C,EACF6C,WAASzF,UAAUqC,IAAI,uBAEvBoD,WAASzF,UAAU6B,OAAO,uBAG5B6D,EAAQhD,iBAAiB,QAAU/C,IAC5BA,EAAMgE,OAAuB3D,UAAUC,SAAS,qBAC/CP,EAAkCC,EAAqB,8BAC3D6F,EAAgCC,GDpEnB,MACvB,MAAM8B,EAAOjH,SAASoB,cAAc,QACpC6F,WAAMvH,UAAU6B,OAAO,oBCmEboI,UAOV1M,OAAOmF,iBAAiB,OAAQ,KAC9BkD,EAAmBrI,OAAOuD,aAG5BvD,OAAOmF,iBAAiB,SAAU,KAC5BkD,EAAmB,GAAKrI,OAAOuD,aAAe8E,IAChDA,EAAmBrI,OAAOuD,WAC1BS,EAAYxB,QAASZ,GAAM4D,EAAiBxB,EAAapC,IACzD2G","file":"app.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* eslint-disable wrap-iife */\n/* eslint-disable import/prefer-default-export */\n/* eslint-env browser */\nconst copyToClipboard = (str: string): void => {\n // eslint-disable-next-line no-console\n navigator.clipboard.writeText(str).then(() => console.log(`${str} written to clipboard`));\n};\n\nconst isElementWithClassNameInEventPath = (event: MouseEvent, className: string): boolean => {\n let found = false;\n const path = event.composedPath();\n path.forEach((p: EventTarget): void => {\n if ((p as HTMLElement).classList) {\n if ((p as HTMLElement).classList.contains(className)) {\n found = true;\n }\n }\n });\n return found;\n};\n\nconst setMetaThemeColor = (): void => {\n const body = document.querySelector('body');\n if (body) {\n const bgColor = window.getComputedStyle(body).getPropertyValue('--color-background');\n const existingMeta = document.querySelector('meta[name=\"theme-color\"]') as HTMLMetaElement;\n if (existingMeta) {\n existingMeta.content = bgColor;\n } else {\n const meta = document.createElement('meta');\n meta.name = 'theme-color';\n meta.content = bgColor;\n document.getElementsByTagName('head')[0].appendChild(meta);\n }\n }\n};\n\nconst getBaseFontSize = (): number => parseInt(window.getComputedStyle(document.documentElement).fontSize.replace('px', ''), 10);\n\n// eslint-disable-next-line max-len\nconst convertRemToPixels = (rem: number): number => rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n\nconst isViewportBelow = (mediaQuery: string): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const mediaQueryValue = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue(mediaQuery).replace('rem', ''), 10));\n return viewportWidth < mediaQueryValue;\n};\n\nconst setScrollbarWidthVariable = (): void => {\n const scrollbarWidth = window.innerWidth - document.body.clientWidth;\n document.documentElement.style.setProperty('--vertical-scrollbar-width', `${scrollbarWidth}px`);\n};\n\nconst overflowsY = (element: HTMLElement): boolean => element.offsetHeight !== element.scrollHeight;\nconst overflowsX = (element: HTMLElement): boolean => element.offsetWidth !== element.scrollWidth;\n// eslint-disable-next-line max-len\nconst elementOverflows = (element: HTMLElement): boolean => overflowsY(element) || overflowsX(element);\n\nconst setHorizontalScroll = (element: HTMLElement): void => {\n const content = element.querySelector('.horizontal-scroll__scrollable-content');\n if (!overflowsX(content as HTMLElement)) {\n element.classList.add('horizontal-scroll--no-overflow');\n content?.removeAttribute('tabindex');\n } else {\n content?.setAttribute('tabindex', '0');\n }\n};\n\nexport {\n copyToClipboard,\n isElementWithClassNameInEventPath,\n getBaseFontSize,\n setMetaThemeColor,\n isViewportBelow,\n convertRemToPixels,\n setScrollbarWidthVariable,\n overflowsX,\n overflowsY,\n elementOverflows,\n setHorizontalScroll,\n};\n","/* eslint-env browser */\nimport { copyToClipboard, isElementWithClassNameInEventPath } from './helpers';\n\nconst findNav = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('nav')) {\n return parent;\n }\n return findNav(parent);\n }\n return element;\n};\n\n// eslint-disable-next-line max-len\nconst closeResponsiveNav = (navElements: NodeListOf<Element>, keepOpen: HTMLElement | null = null): void => {\n const navToggledClass = 'nav--toggled';\n navElements.forEach((n) => {\n const button = n.querySelector('.nav__toggle') as HTMLElement;\n if (n !== keepOpen) {\n if (n.classList.contains(navToggledClass)) {\n button.focus();\n button.setAttribute('aria-expanded', 'false');\n }\n n.classList.remove(navToggledClass);\n }\n });\n};\n\nconst setResponsiveToggle = (navElements: NodeListOf<Element>): CleanUpPair[] => {\n const toggleMenu = (button: HTMLElement) => {\n const parent = findNav(button);\n\n const navItems = parent.querySelector('.nav__items');\n const lastNavItem = navItems?.querySelector('.nav__item:last-of-type');\n navItems?.classList.add('nav__items--fadeout');\n const firstElement = navItems?.querySelector('.nav__item--is-overflown') as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n }\n\n const transitionListener = () => {\n parent.classList.toggle('nav--toggled');\n navItems?.classList.remove('nav__items--fadeout');\n lastNavItem?.removeEventListener('transitionend', transitionListener);\n };\n\n lastNavItem?.addEventListener('transitionend', transitionListener);\n return parent;\n };\n\n const cleanUp: CleanUpPair[] = [];\n\n const toggle = document.querySelectorAll('.nav__toggle');\n toggle.forEach((button) => {\n const clickEvent = () => {\n const nav = toggleMenu(button as HTMLElement);\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n closeResponsiveNav(navElements, nav);\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n button.addEventListener('click', clickEvent);\n });\n\n return cleanUp;\n};\n\nconst setResponsiveNav = (\n navElements: NodeListOf<Element>,\n navElement: Element,\n): SetResponsiveNavCleanUp => {\n const navToggledClass = 'nav--toggled';\n const navItemsClass = 'nav__items';\n // gitlab #117\n navElement.classList.remove(navToggledClass);\n const navItemsParent = navElement.querySelector(`.${navItemsClass}`);\n\n if (navItemsParent) {\n const navItems = navItemsParent.querySelectorAll('.nav__item');\n const isOverflownClass = 'nav__item--is-overflown';\n const hasOverflowClass = 'nav--has-overflow';\n const isActiveClass = 'nav__item--active';\n let hasOverflown = false;\n\n for (let i = navItems.length - 1; i >= 0; i -= 1) {\n const nav = navItems[i] as HTMLElement;\n const top = nav.offsetTop;\n\n if (top > 0) {\n nav.classList.add(isOverflownClass);\n navElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n } else if (!nav.classList.contains(isActiveClass)) {\n nav.classList.remove(isOverflownClass);\n }\n }\n\n if (!hasOverflown) {\n navElement.classList.remove(hasOverflowClass);\n const isActive = navElement.querySelector(`.${isActiveClass}`);\n if (isActive) {\n isActive.classList.remove(isOverflownClass);\n }\n }\n }\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!(e.target as HTMLElement).classList.contains('nav__toggle')\n && !isElementWithClassNameInEventPath(e as MouseEvent, navItemsClass)) {\n closeResponsiveNav(navElements);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n\n return {\n element: document.querySelector('body'),\n clickEvent: bodyClickEvent,\n };\n};\n\nconst closeSubNav = (buttons: NodeListOf<Element>, keepOpen: Element | null = null) => {\n const subNavClass = 'sub-nav--toggled';\n buttons.forEach((button) => {\n if (button !== keepOpen) {\n if (button?.parentElement?.classList.contains(subNavClass)) {\n (button as HTMLElement).focus();\n button.setAttribute('aria-expanded', 'false');\n }\n button?.parentElement?.classList.remove(subNavClass);\n }\n });\n};\n\nconst setSubNavToggle = (buttons: NodeListOf<Element>, button: Element): SetSubNavToggleCleanUp => {\n const subNavClass = 'sub-nav--toggled';\n const buttonClickEvent = () => {\n button?.parentElement?.classList.toggle(subNavClass);\n if (button?.parentElement?.classList.contains(subNavClass)) {\n button.setAttribute('aria-expanded', 'true');\n } else {\n button.setAttribute('aria-expanded', 'false');\n }\n closeSubNav(buttons, button);\n };\n\n button.addEventListener('click', buttonClickEvent);\n\n // gitlab #115\n const bodyClickEvent = (e: Event) => {\n if (!isElementWithClassNameInEventPath(e as MouseEvent, 'sub-nav')) {\n closeSubNav(buttons);\n }\n };\n\n document.querySelector('body')?.addEventListener('click', bodyClickEvent);\n return {\n buttonClickEvent,\n element: document.querySelector('body'),\n bodyClickEvent,\n };\n};\n\nconst setClickMessage = ((\n text: string,\n copyElement: Element,\n clickElement: Element | null,\n ctcThis: HTMLElement | null,\n listener: () => void,\n): void => {\n if (ctcThis && clickElement) {\n // Vi kopierer teksten til clipboard\n copyToClipboard(ctcThis.innerText);\n copyElement.classList.add('copy-to-clipboard--confirm');\n if (copyElement === clickElement) {\n copyElement.classList.add('copy-to-clipboard--done');\n }\n // Laver en span, der viser, at teksten er kopieret\n const ctcThisMessage = document.createElement('span');\n ctcThisMessage.classList.add('copy-to-clipboard__this__confirm-message');\n ctcThisMessage.innerText = text;\n ctcThis.appendChild(ctcThisMessage);\n\n // Efter 1,2 sekunder fjerner vi beskeden igen\n clickElement.removeEventListener('click', listener);\n setTimeout(() => {\n copyElement.classList.remove('copy-to-clipboard--confirm');\n ctcThisMessage.remove();\n clickElement.addEventListener('click', listener);\n }, 1200);\n }\n});\n\nconst setCopyToClipboard = (element: HTMLElement, text = 'Kopieret!'): void => {\n const ctcThis = <HTMLElement>element.querySelector('.copy-to-clipboard__this');\n // Hvis det er en knap, så sætter vi click event på knappen\n if ((element as HTMLButtonElement).type === 'button') {\n const listener = (): void => {\n setClickMessage(text, element, element, ctcThis, listener);\n };\n element.addEventListener('click', listener);\n // Hvis det ikke er en knap, finder vi knappen \"inde i\" elementet\n } else {\n const btn = element.querySelector('.copy-to-clipboard__execute');\n const listener = (): void => {\n setClickMessage(text, element, btn, ctcThis, listener);\n };\n btn?.addEventListener('click', listener);\n }\n};\n\nconst setSearchToggle = (navSearch: Element, button: Element): void => {\n const toggleClass = 'nav__search--toggled';\n button.addEventListener('click', () => {\n if (navSearch.classList.contains(toggleClass)) {\n button.setAttribute('aria-expanded', 'false');\n navSearch.classList.remove(toggleClass);\n } else {\n button.setAttribute('aria-expanded', 'true');\n navSearch.classList.add(toggleClass);\n }\n });\n};\n\nexport {\n findNav,\n setResponsiveToggle,\n setResponsiveNav,\n setSubNavToggle,\n setCopyToClipboard,\n setSearchToggle,\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable no-param-reassign */\nimport { getBaseFontSize } from './helpers';\n\nconst getMediaWidthBasedOnModifier = (classList: DOMTokenList): number => {\n if (classList.contains('tabbed-content--hide-tabs-on-medium-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-medium').replace('rem', ''), 10);\n }\n if (classList.contains('tabbed-content--hide-tabs-on-wide-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-wide').replace('rem', ''), 10);\n }\n\n return -1;\n};\n\nconst isBelowViewportLimit = (classList: DOMTokenList): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const widthInRem = viewportWidth / getBaseFontSize();\n const mediaWidth = getMediaWidthBasedOnModifier(classList);\n if (mediaWidth > -1) {\n return widthInRem < mediaWidth;\n }\n return true;\n};\n\nconst destroyTabs = (tabbed: Element): void => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n tabs?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('nav__item--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst destroySwitches = (tabbed: Element): void => {\n const switchlist = tabbed.querySelector('.switch');\n const switches = switchlist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n switches?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('switch__segment--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst switchTab = (\n tabs: NodeListOf<HTMLAnchorElement>,\n panels: HTMLElement[],\n oldTab: Element | null,\n newTab: HTMLElement,\n _: DOMTokenList,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number): void => console.log(index),\n): void => {\n if (focus) {\n newTab.focus();\n }\n // Make the active tab focusable by the user (Tab key)\n newTab.removeAttribute('tabindex');\n // Set the selected state\n newTab.setAttribute('aria-selected', 'true');\n\n // Check if switch // should this be more pretty?\n if (newTab.classList.contains('switch__segment')) {\n newTab.classList.add('switch__segment--active');\n } else {\n newTab.classList.add('nav__item--active');\n }\n\n if (oldTab) {\n oldTab.removeAttribute('aria-selected');\n oldTab.setAttribute('tabindex', '-1');\n\n if (oldTab.classList.contains('switch__segment')) {\n oldTab.classList.remove('switch__segment--active');\n } else {\n oldTab.classList.remove('nav__item--active');\n }\n }\n\n const index = Array.prototype.indexOf.call(tabs, newTab);\n\n // More links\n /*let moreLinks;\n var moreLink: HTMLElement;\n moreLinks = document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`);\n moreLinks.forEach((moreLink) => {\n moreLink.classList.add('tabbed-content-peripheral--active');\n moreLink.hidden = false;\n });*/\n let moreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[index].id}\"]`));\n moreLinks.forEach((link) => {\n link.classList.add('tabbed-content-peripheral--active');\n link.hidden = false;\n });\n\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n panels[index].hidden = false;\n if (oldTab) {\n const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);\n\n let oldMoreLinks: HTMLElement[] = Array.from(document.querySelectorAll(`[data-for=\"${panels[oldIndex].id}\"]`));\n oldMoreLinks.forEach((link) => {\n link.classList.remove('tabbed-content-peripheral--active');\n link.hidden = true;\n });\n\n /* moreLinks.forEach((moreLink) => {\n moreLink.classList.remove('tabbed-content-peripheral--active');\n moreLink.hidden = true;\n });*/\n\n panels[oldIndex].hidden = true;\n }\n\n // Dispatches custom event on every tab change\n newTab.dispatchEvent(new CustomEvent('switch-tab', {\n bubbles: true,\n detail: { tab: index },\n }));\n callback(index);\n};\n\nconst setTabbedContent = (\n key: number,\n tabbed: Element,\n initial = 0,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number) => console.log(index),\n): void => {\n const tablist = tabbed.querySelector('.switch,.nav__items') as HTMLElement;\n const tabs = tablist.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n\n const expandAll = tabbed.querySelector('button.tabbed-content__expand-all');\n if (expandAll) {\n const expandAllEvent = () => {\n tablist.hidden = true;\n panels.forEach((panel: HTMLElement) => {\n panel.hidden = false;\n });\n };\n\n expandAll.removeEventListener('click', expandAllEvent);\n expandAll.addEventListener('click', expandAllEvent);\n }\n\n // Add the tablist role to the first <ul> in the .tabbed container\n tablist.setAttribute('role', 'tablist');\n\n // Add semantics are remove user focusability for each tab\n tabs.forEach((tab, i) => {\n tab.setAttribute('role', 'tab');\n tab.setAttribute('id', `tab${key}_${(i + 1)}`);\n tab.setAttribute('tabindex', '-1');\n tab.parentElement?.setAttribute('role', 'presentation');\n\n // Handle clicking of tabs for mouse users\n const tabClickEvent = (e: MouseEvent) => {\n e.preventDefault();\n const currentTab = tablist.querySelector('[aria-selected]');\n if (e.currentTarget !== currentTab) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, currentTab, e.currentTarget as HTMLElement, tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n };\n\n tab.removeEventListener('click', tabClickEvent);\n tab.addEventListener('click', tabClickEvent);\n\n // Handle keydown events for keyboard users\n const tabKeyEvent = (e: KeyboardEvent) => {\n // Get the index of the current tab in the tabs node list\n const index = Array.prototype.indexOf.call(tabs, e.currentTarget);\n // Work out which key the user is pressing and\n // Calculate the new tab's index where appropriate\n let dir: number | string | null = null;\n if (e.key === 'ArrowLeft') {\n dir = index - 1;\n }\n if (e.key === 'ArrowRight') {\n dir = index + 1;\n }\n if (e.key === 'ArrowDown') {\n dir = 'down';\n }\n if (dir !== null) {\n e.preventDefault();\n // If the down key is pressed, move focus to the open panel,\n // otherwise switch to the adjacent tab\n if (dir === 'down') {\n panels[i].focus();\n } else if (tabs[dir]) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, e.currentTarget as Element, tabs[dir], tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n }\n };\n tab.removeEventListener('keydown', tabKeyEvent);\n tab.addEventListener('keydown', tabKeyEvent);\n });\n\n // Add tab panel semantics and hide them all\n panels.forEach((panel: HTMLElement, i: number) => {\n panel.setAttribute('tabindex', '-1');\n panel.setAttribute('aria-labelledby', tabs[i].id);\n // eslint-disable-next-line no-param-reassign\n panel.hidden = true;\n panel.setAttribute('role', 'tabpanel');\n });\n\n // Initially activate the first tab and reveal the first tab panel\n if (initial > -1) {\n switchTab(tabs, panels, null, tabs[initial], tabbed.classList, focus);\n }\n};\n\nexport {\n setTabbedContent,\n isBelowViewportLimit,\n destroyTabs,\n destroySwitches,\n};\n","/* eslint-disable max-len */\nimport { convertRemToPixels, isElementWithClassNameInEventPath, isViewportBelow } from './helpers';\n\nconst lockBodyScroll = (): void => {\n const body = document.querySelector('body');\n if (isViewportBelow('--bp-medium') || isViewportBelow('--bp-low-height')) {\n body?.classList.add('body--no-scroll');\n }\n};\n\nconst unlockBodyScroll = (): void => {\n const body = document.querySelector('body');\n body?.classList.remove('body--no-scroll');\n};\n\n/* eslint-env browser */\nconst closeAllContentTogglesInToolbar = (toolbar: HTMLElement): void => {\n const contentToggles = toolbar.querySelectorAll('.content-toggle__toggle');\n contentToggles.forEach((toggle) => {\n const content = toggle.parentElement?.querySelector('.content-toggle__content');\n toggle.setAttribute('aria-expanded', 'false');\n content?.setAttribute('hidden', 'hidden');\n });\n};\n\nconst setOverflow = (toolbarElement: Element): void => {\n if (!toolbarElement.classList.contains('toolbar--no-collapse')) {\n toolbarElement.classList.remove('toolbar--toggled');\n }\n toolbarElement.classList.remove('toolbar--fully-overflown');\n toolbarElement.classList.remove('toolbar--has-popout');\n const toolbarItemsParent = toolbarElement.querySelector('.toolbar__items');\n const toolbarItems = toolbarItemsParent?.children as HTMLCollection;\n const isOverflownClass = 'toolbar__item--is-overflown';\n const hasOverflowClass = 'toolbar--has-overflow';\n let hasOverflown = false;\n\n let overflownCount = 0;\n const addOverflowClass = (item: HTMLElement, index: number) => {\n if (item) {\n const top = item.offsetTop;\n if (top > 25) {\n item.classList.add(isOverflownClass);\n toolbarElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n overflownCount += 1;\n } else {\n item.classList.remove(isOverflownClass);\n }\n\n if (!hasOverflown) {\n toolbarElement.classList.remove(hasOverflowClass);\n } else if (index - 1 >= 0) {\n addOverflowClass(toolbarItems[index - 1] as HTMLElement, index - 1);\n }\n }\n };\n\n addOverflowClass(toolbarItems[toolbarItems.length - 1] as HTMLElement, toolbarItems.length - 1);\n\n if (overflownCount > 0 && overflownCount === toolbarItems.length) {\n toolbarElement.classList.add('toolbar--fully-overflown');\n }\n};\n\nconst setToolbarToggle = (toolbar: HTMLElement): ExtendedCleanUpPair[] => {\n const cleanUp: ExtendedCleanUpPair[] = [];\n const buttons = toolbar.querySelectorAll('.toolbar__toggle');\n buttons.forEach((button) => {\n const clickEvent = () => {\n button?.parentElement?.classList.toggle('toolbar--toggled');\n const ariaExpanded = button.getAttribute('aria-expanded');\n if (ariaExpanded !== 'true') {\n const focusable = 'a.toolbar__item--is-overflown, button.toolbar__item--is-overflown, input.toolbar__item--is-overflown, select.toolbar__item--is-overflown, .toolbar__item--is-overflown a, .toolbar__item--is-overflown button, .toolbar__item--is-overflown input, .toolbar__item--is-overflown select';\n const firstWithOverflow = button?.parentElement?.querySelector(focusable) as HTMLElement;\n if (firstWithOverflow) {\n setTimeout(() => {\n firstWithOverflow.focus();\n }, 0);\n }\n }\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n };\n\n cleanUp.push({\n element: button,\n clickEvent,\n });\n button.addEventListener('click', clickEvent);\n });\n return cleanUp;\n};\n\nconst setToolbar = (\n toolbar: HTMLElement,\n onCloseContentToggle: (toolbarElement: HTMLElement) => void,\n setOverflowOnly = true,\n): ExtendedCleanUpPair[] => {\n let cleanUp: ExtendedCleanUpPair[] = [];\n\n setOverflow(toolbar);\n onCloseContentToggle(toolbar);\n cleanUp = cleanUp.concat(setToolbarToggle(toolbar));\n\n if (!setOverflowOnly) {\n const bodyClickEvent = (event: Event) => {\n if (!(event.target as HTMLElement).classList.contains('content-toggle__toggle')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'content-toggle__content')) {\n onCloseContentToggle(toolbar);\n }\n };\n\n const escKeyEvent = (event: Event) => {\n if ((event as KeyboardEvent).key === 'Escape') {\n if (event.target && (event.target as HTMLElement).getAttribute('type') !== 'search') {\n onCloseContentToggle(toolbar);\n }\n }\n };\n\n const body = document.querySelector('body');\n\n cleanUp.push({\n element: body as Element,\n clickEvent: bodyClickEvent,\n });\n\n cleanUp.push({\n element: window,\n keyUpEvent: escKeyEvent,\n });\n\n body?.addEventListener('click', bodyClickEvent);\n window.addEventListener('keyup', escKeyEvent);\n }\n\n return cleanUp;\n};\n\nconst findToolbar = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('toolbar')) {\n return parent;\n }\n return findToolbar(parent);\n }\n return element;\n};\n\nconst contentToggleEdgeHandling = (element: HTMLElement): void => {\n if (!isViewportBelow('--bp-medium') && !isViewportBelow('--bp-low-height')) {\n const allowedDistance = convertRemToPixels(parseInt(getComputedStyle(document.documentElement).getPropertyValue('--toolbar-popout-allowed-edge-distance').replace('rem,', ''), 10));\n const popoutX = parseInt(getComputedStyle(element).width.replace('px', ''), 10);\n const popoutWidth = element.getBoundingClientRect().x;\n\n const distance = document.body.offsetWidth - allowedDistance - popoutX - popoutWidth;\n\n if (distance < 0) {\n element.style.setProperty('--toolbar-popout-edge-overflow', `${distance}px`);\n }\n }\n};\n\nexport {\n setToolbar,\n setOverflow,\n findToolbar,\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n lockBodyScroll,\n unlockBodyScroll,\n};\n","/* eslint-disable no-param-reassign */\n/* eslint-env browser */\nimport ready from '../components/ready';\nimport {\n setResponsiveNav,\n setResponsiveToggle,\n} from '../components/nav';\nimport { isElementWithClassNameInEventPath, setMetaThemeColor } from '../components/helpers';\nimport { setResponsiveTable } from '../components/table';\nimport { setTabbedContent, isBelowViewportLimit, destroyTabs } from '../components/tabs';\nimport { setContentToggle } from '../components/content-toggle';\nimport {\n closeAllContentTogglesInToolbar,\n contentToggleEdgeHandling,\n findToolbar,\n lockBodyScroll,\n unlockBodyScroll,\n} from '../components/toolbar';\n\nlet windowInnerWidth = 0;\n\nconst tabbedObjects: ITabbedObject[] = [];\n\nconst setTabs = (): void => {\n tabbedObjects.forEach((tabObject: ITabbedObject, key: number): void => {\n const { rendered, domElement } = tabObject;\n if (isBelowViewportLimit(domElement.classList)) {\n if (!rendered) {\n const focus = domElement.getAttribute('data-focus-onload');\n const dataInitial = domElement.getAttribute('data-initial-tab');\n const initial = dataInitial ? parseInt(dataInitial, 10) : 0;\n setTabbedContent(key, domElement, initial, focus !== 'false');\n tabObject.rendered = true;\n }\n } else if (rendered) {\n destroyTabs(domElement);\n tabObject.rendered = false;\n }\n });\n};\n\nready(() => {\n const tabbedContent = document.querySelectorAll('.tabbed-content'); \n tabbedContent.forEach((tab) => tabbedObjects.push({\n domElement: tab,\n rendered: false,\n }));\n setTabs(); //med i typo3\n setMetaThemeColor();\n\n const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setResponsiveToggle(navElements);\n\n const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');\n tables.forEach((table) => setResponsiveTable(table));\n\n const toggles = document.querySelectorAll('.content-toggle__content'); //med i typo3\n toggles.forEach((toggle) => {\n setContentToggle(\n toggle,\n (popout: HTMLElement) => {\n contentToggleEdgeHandling(popout);\n lockBodyScroll();\n },\n (content: HTMLElement) => closeAllContentTogglesInToolbar(findToolbar(content)),\n (content: HTMLElement, button: HTMLButtonElement) => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n const toolbar = findToolbar(content);\n if (ariaExpanded === 'true') {\n toolbar?.classList.add('toolbar--has-popout');\n } else {\n toolbar?.classList.remove('toolbar--has-popout');\n }\n\n content.addEventListener('click', (event: MouseEvent) => {\n if ((event.target as HTMLElement).classList.contains('toolbar__popout')\n && !isElementWithClassNameInEventPath(event as MouseEvent, 'toolbar__filter__content')) {\n closeAllContentTogglesInToolbar(toolbar);\n unlockBodyScroll();\n }\n });\n },\n );\n });\n\n window.addEventListener('load', () => {\n windowInnerWidth = window.innerWidth;\n });\n\n window.addEventListener('resize', () => {\n if (windowInnerWidth > 0 && window.innerWidth !== windowInnerWidth) {\n windowInnerWidth = window.innerWidth;\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setTabs();\n }\n });\n});\n","/* eslint-env browser */\nconst ready = (fn: () => void): void => {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n};\n\nexport default ready;\n","/* eslint-disable import/prefer-default-export */\nconst setResponsiveTable = (table: Element): void => {\n const head = table.querySelector('thead');\n const body = table.querySelector('tbody');\n const foot = table.querySelector('tfoot');\n\n if (head) {\n const headers: string[] = [];\n const ths = head.querySelectorAll('th');\n ths.forEach((h) => {\n if (!h.classList.contains('table__cell--self-explanatory')) {\n headers.push(h.innerHTML); // Because innerText inherits stuff like text-transform\n } else {\n headers.push(''); // If header is self explanatory we do not add it\n }\n });\n\n const rowContainers: HTMLTableSectionElement[] = [];\n // Table elements that possibly contains <tr>'s\n if (body) {\n rowContainers.push(body);\n }\n if (foot) {\n rowContainers.push(foot);\n }\n\n rowContainers.forEach((rc) => {\n const rows = rc.querySelectorAll('tr');\n rows.forEach((tr) => {\n const cells = tr.querySelectorAll('td, th');\n cells.forEach((cell, i) => {\n if (headers[i]) {\n // if header is self explanatory we skip (value of array index is '' which is falsy)\n cell.setAttribute('data-label', headers[i]);\n }\n });\n });\n });\n }\n};\n\nexport {\n setResponsiveTable,\n};\n","/* eslint-disable max-len */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\nconst setContentToggle = (\n content: Element,\n onClick: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n beforeCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n afterCallback: ((content: HTMLElement, button: HTMLButtonElement) => void) | undefined,\n): CleanUpPair[] => {\n const cleanUp: CleanUpPair[] = [];\n const setContentClose = (button: HTMLElement, contentClose: HTMLElement, focus: boolean): () => void => {\n if (focus) {\n contentClose.focus();\n }\n const click = () => {\n content.setAttribute('hidden', 'hidden');\n button.removeAttribute('hidden');\n button.setAttribute('aria-expanded', 'false');\n button.focus();\n };\n contentClose.addEventListener('click', click);\n return click;\n };\n\n const button = content?.parentElement?.querySelector('.content-toggle__toggle') as HTMLElement;\n const contentClose = content.querySelectorAll('.content-toggle__close');\n\n if (button) {\n const clickEvent = () => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n // Til toolbar: hvis man klikker på en knap, der ikke er foldet ud\n // Så lukker vi alle åbne content-toggles\n if (typeof beforeCallback === 'function' && ariaExpanded === 'false') {\n beforeCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n // Og så går vi i gang med folde-ud-logikken\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n if (ariaExpanded === 'true') {\n content.setAttribute('hidden', 'hidden');\n } else {\n content.removeAttribute('hidden');\n }\n\n if (typeof onClick === 'function') {\n onClick(content as HTMLElement, button as HTMLButtonElement);\n }\n\n if (button.hasAttribute('aria-haspopup')) {\n button.setAttribute('hidden', 'hidden');\n contentClose.forEach((cc) => {\n setContentClose(button, cc as HTMLElement, true);\n });\n }\n\n // Det der sker efter folde-logikken\n if (typeof afterCallback === 'function') {\n afterCallback(content as HTMLElement, button as HTMLButtonElement);\n }\n };\n\n button.addEventListener('click', clickEvent);\n // Altid tilføj denne først!\n cleanUp.push({\n element: button,\n clickEvent,\n });\n\n contentClose.forEach((cc) => {\n const btnClick = setContentClose(button, cc as HTMLElement, false);\n cleanUp.push({\n element: cc,\n clickEvent: btnClick,\n });\n });\n }\n return cleanUp;\n};\n\nexport {\n setContentToggle,\n};\n"],"sourceRoot":""}
|