{"version":3,"file":"ww-app-253fd9c3.js","sources":["../../../common/components/ki-menu-hdoe.ts","../../src/app/ww-app.css.js","../../src/app/ww-app.ts"],"sourcesContent":["import { customElement } from 'lit/decorators.js';\nimport { KiMenu } from '@kisters/wiski-web/components';\nimport { Mix } from '@kisters/wiski-web/common';\nimport { html, css } from 'lit';\n\n@customElement('ki-menu-hdoe')\nexport default class KiMenuHdoe extends Mix(KiMenu) {\n static styles = [\n KiMenu.styles,\n css`\n :host {\n display: flex;\n height: 100%;\n overflow: hidden;\n }\n div.menu-item,\n div.sub-menu-item {\n color: white;\n }\n ki-icon {\n fill: white;\n font-size: 1.3em;\n }\n .sub-menu-item {\n margin-top: -1px;\n }\n .menu-item.selected {\n color: var(--theme-color-primary, #1d1d1b);\n }\n .menu-item {\n display: flex;\n color: white;\n flex-direction: row;\n margin: 10px 5px;\n background: var(--theme-color-primary, #1d1d1b);\n border: 1px solid var(--theme-color-primary, #1d1d1b);\n align-items: center;\n flex: 1 1 0%;\n position: relative;\n justify-content: start;\n transition: all 0.3s ease 0s;\n min-width: 0%;\n max-height: 100px;\n max-width: 320px;\n }\n `,\n ];\n\n render() {\n const isMobile = this.direction === 'vertical';\n this.classList.toggle('vertical', this.direction === 'vertical');\n return html`${this.items.map((item, index) => {\n const renderSubMenu = this.value === item;\n const hasSubMenu = item.items?.length > 0;\n return html`\n
\n \n
\n
${item.label}
\n
\n \n
\n \n ${renderSubMenu ? this._renderSubMenu() : ''} `;\n })}`;\n }\n\n _renderSubMenu() {\n const isMobile = this.direction === 'vertical';\n const curentIndex = this.items.indexOf(this.value);\n const currentMenuItem = this.renderRoot.getElementById(\n `menu-item-${curentIndex}`,\n );\n const { height, top, left, width } =\n currentMenuItem.getBoundingClientRect(); // sub menu left position\n return html`\n ${this.value?.items?.map(\n (subItem, i) =>\n html`\n
\n \n
\n
${subItem.label}
\n `,\n )}\n `;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _getPrev(node) {\n node.classList.remove('focused');\n let next = node.previousElementSibling;\n if (next && next.classList.contains('sub-menu-wrapper')) {\n next = node.nextElementSibling.firstElementChild;\n }\n next.classList.add('focused');\n return next;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _getNext(node) {\n node.classList.remove('focused');\n let next = node.nextElementSibling;\n if (next && next.classList.contains('sub-menu-wrapper')) {\n next = node.nextElementSibling.firstElementChild;\n }\n next.classList.add('focused');\n return next;\n }\n\n keydownevent(e) {\n switch (e.key) {\n case 'Enter':\n e.target.dispatchEvent(new CustomEvent('click'));\n break;\n case 'ArrowUp':\n this._getPrev(e.target).focus();\n break;\n case 'ArrowDown':\n this._getNext(e.target).focus();\n break;\n default:\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n handleLeave(e) {\n e.stopPropagation();\n const target = e.toElement || e.relatedTarget;\n if (!target) {\n return;\n }\n if (!target.classList.contains('sub-menu-item')) {\n this.value = null;\n this.requestUpdate();\n }\n }\n\n handleOver(e) {\n e.stopPropagation();\n if (e.currentTarget.value?.items) {\n if (this.value === e.currentTarget.value) {\n this.value = null;\n } else {\n this.value = e.currentTarget.value;\n }\n this.requestUpdate();\n }\n }\n}\n","import { css } from 'lit';\n// language=CSS\nexport default css`\n :host {\n height: 100%;\n }\n\n ki-menu-hdoe::part(menu-item) {\n display: flex;\n color: white;\n flex-direction: row;\n margin: 10px 5px;\n background: var(--theme-color-primary, #1d1d1b);\n border: 1px solid var(--theme-color-primary, #1d1d1b);\n align-items: center;\n flex: 1 1 0%;\n position: relative;\n justify-content: start;\n transition: all 0.3s ease 0s;\n min-width: 0%;\n max-height: 100px;\n max-width: 320px;\n }\n\n ki-menu-hdoe::part(menu-label) {\n padding: 0px 5px 0px 5px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: normal;\n word-break: break-word;\n }\n\n ki-menu-hdoe::part(sub-menu-item) {\n color: white;\n font-weight: bold;\n }\n\n ki-menu-hdoe::part(sub-menu-item):hover {\n color: var(--theme-color-primary, #1d1d1b);\n }\n\n ki-menu-hdoe::part(menu-icon) {\n fill: white;\n border: 0px;\n margin-bottom: 3px;\n }\n\n ki-menu-hdoe::part(menu-item):hover ki-menu-hdoe::part(menu-icon) {\n fill: var(--theme-color-primary, #1d1d1b);\n }\n\n ki-menu-hdoe::part(expand-icon) {\n fill: white;\n }\n\n ki-menu-hdoe::part(menu-item):hover ki-menu-hdoe::part(expand-icon) {\n fill: var(--theme-color-primary, #1d1d1b);\n }\n\n .header {\n height: 80px;\n background: white;\n }\n\n .wappenText {\n font-weight: 600;\n }\n .footer {\n display: flex;\n justify-content: space-between;\n border-top: var(\n --ki-breadcrumbs-border-bottom,\n var(--ki-breadcrumbs-border, none)\n );\n }\n .footer .item {\n padding: 3px 5px;\n }\n .footer a {\n padding: 3px 5px;\n text-decoration: none;\n color: var(--theme-text-color, 'rgb(29,29,29)');\n }\n .footer a:hover {\n background: var(--theme-color-secondary, white);\n color: var(--theme-text-color, darkgray);\n }\n .logo-left {\n align-items: center;\n }\n .logo-right {\n width: 165px;\n justify-content: center;\n }\n\n .footer .mobile {\n display: none;\n }\n\n :host(.sm-screen) .header {\n height: 50pt;\n }\n\n :host(.sm-screen) .main {\n border-top: 1px solid lightgray;\n }\n\n :host(.sm-screen) ki-app-breadcrumb:last-child {\n display: none;\n }\n\n :host(.sm-screen) .logo-left img,\n :host(.sm-screen) .logo-right img {\n height: 40pt;\n padding: 5px;\n }\n :host(.sm-screen) .logo-right {\n width: auto;\n align-items: center;\n margin-right: 10px;\n }\n\n :host(.sm-screen) .footer .mobile {\n display: block;\n }\n :host(.sm-screen) .footer .desktop {\n display: none;\n }\n`;\n","import { Mix } from '@kisters/wiski-web/common';\nimport { customElement } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { SM, ViewPort } from '@kisters/wiski-web/decorators';\nimport '@kisters/wiski-web/components/ki-ww-start/ki-ww-start';\nimport {\n navigateTo,\n getSearchParamString,\n getCurrentPath,\n getNavItems,\n KiAppWWP,\n} from '@kisters/wiski-web/components';\nimport '../../../common/components/ki-menu-hdoe';\nimport style from './ww-app.css.js';\n\n@customElement('ww-app')\nexport default class WWApp extends Mix(KiAppWWP) {\n static styles = [KiAppWWP.styles, style];\n\n // eslint-disable-next-line class-methods-use-this\n _renderFooter() {\n return html`
\n \n
\n © Hydrographischer Dienst Oberösterreich\n
\n
© HDOÖ
\n
`;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _renderMain() {\n return html`
\n \n
\n \n
\n
`;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _renderMenu() {\n const menuMode = ViewPort.size === SM ? 'vertical' : 'horizontal';\n // language=html\n return html`\n {\n const currentQuery = getSearchParamString();\n const currentViewType = getCurrentPath().replace(/[^/]+$/, '');\n const newViewType = e.detail.value.replace(/[^/]+$/, '');\n let newUrl = e.detail.value;\n if (currentViewType === newViewType) {\n newUrl = `${newUrl}${\n currentQuery.charAt(0) === '?' ? '' : '?'\n }${currentQuery}`;\n }\n navigateTo(newUrl);\n }}\"\n .items=\"${getNavItems()}\"\n >\n `;\n }\n\n _renderHeader() {\n return html`\n
\n \n
\n \n \n LAND
\n OBERÖSTERREICH\n
\n
\n
${ViewPort.size === SM ? '' : this._renderMenu()}
\n
\n \n
\n \n `;\n }\n}\n"],"names":["KiMenuHdoe","Mix","KiMenu","isMobile","html","item","index","renderSubMenu","hasSubMenu","curentIndex","currentMenuItem","height","top","left","width","subItem","i","node","next","e","target","css","__decorateClass","customElement","style","WWApp","KiAppWWP","menuMode","ViewPort","SM","currentQuery","getSearchParamString","currentViewType","getCurrentPath","newViewType","newUrl","navigateTo","getNavItems"],"mappings":"0UAMA,IAAqBA,EAArB,cAAwCC,EAAIC,CAAM,CAAE,CA0ClD,QAAS,CACD,MAAAC,EAAW,KAAK,YAAc,WACpC,YAAK,UAAU,OAAO,WAAY,KAAK,YAAc,UAAU,EACxDC,IAAO,KAAK,MAAM,IAAI,CAACC,EAAMC,IAAU,CACtC,MAAAC,EAAgB,KAAK,QAAUF,EAC/BG,EAAaH,EAAK,OAAO,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