@oiz/stzh-components 2.11.1 → 2.12.0-beta2
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/dist/cjs/{app-globals-7697372c.js → app-globals-b9d20033.js} +8 -4
- package/dist/cjs/app-globals-b9d20033.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-accordion.cjs.entry.js +1 -1
- package/dist/cjs/stzh-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-appointments.cjs.entry.js +7 -3
- package/dist/cjs/stzh-appointments.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-container.cjs.entry.js +1 -1
- package/dist/cjs/stzh-container.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datalist_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js +33 -14
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-gallery.cjs.entry.js +1 -1
- package/dist/cjs/stzh-gallery.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-progressbar-item.cjs.entry.js +2 -1
- package/dist/cjs/stzh-progressbar-item.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-progressbar.cjs.entry.js +14 -0
- package/dist/cjs/stzh-progressbar.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-sticky.cjs.entry.js +1 -1
- package/dist/cjs/stzh-sticky.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-toastbar.cjs.entry.js +8 -1
- package/dist/cjs/stzh-toastbar.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-vbz-majorticker.cjs.entry.js +7 -3
- package/dist/cjs/stzh-vbz-majorticker.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +7 -3
- package/dist/cjs/stzh-vbz-ticker.cjs.entry.js.map +1 -1
- package/dist/collection/assets/i18n/de.json +12 -0
- package/dist/collection/assets/i18n/en.json +12 -0
- package/dist/collection/components/stzh-accordion/stzh-accordion.css +3 -2
- package/dist/collection/components/stzh-appointments/stzh-appointments.js +9 -3
- package/dist/collection/components/stzh-appointments/stzh-appointments.js.map +1 -1
- package/dist/collection/components/stzh-button/stzh-button.js +1 -1
- package/dist/collection/components/stzh-checkbox/stzh-checkbox.js +1 -1
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js +1 -1
- package/dist/collection/components/stzh-chip-select/stzh-chip-select.js +1 -1
- package/dist/collection/components/stzh-container/stzh-container.css +8 -8
- package/dist/collection/components/stzh-datalist/stzh-datalist.css +1 -1
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.js +1 -1
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +62 -15
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
- package/dist/collection/components/stzh-gallery/stzh-gallery.css +0 -4
- package/dist/collection/components/stzh-input/stzh-input.js +1 -1
- package/dist/collection/components/stzh-link/stzh-link.js +1 -1
- package/dist/collection/components/stzh-progressbar/stzh-progressbar.js +35 -0
- package/dist/collection/components/stzh-progressbar/stzh-progressbar.js.map +1 -1
- package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js +3 -2
- package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js.map +1 -1
- package/dist/collection/components/stzh-radio/stzh-radio.js +1 -1
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js +1 -1
- package/dist/collection/components/stzh-richtext/stzh-richtext.js +1 -1
- package/dist/collection/components/stzh-sticky/stzh-sticky.css +4 -4
- package/dist/collection/components/stzh-timepicker/stzh-timepicker.js +1 -1
- package/dist/collection/components/stzh-toastbar/stzh-toastbar.js +8 -1
- package/dist/collection/components/stzh-toastbar/stzh-toastbar.js.map +1 -1
- package/dist/collection/components/stzh-toggle/stzh-toggle.js +1 -1
- package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.js +9 -3
- package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.js.map +1 -1
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +9 -3
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js.map +1 -1
- package/dist/collection/global/js/helpers/utils.js +6 -2
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/translation-utils.js.map +1 -1
- package/dist/components/index.js +7 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-accordion.js +1 -1
- package/dist/components/stzh-accordion.js.map +1 -1
- package/dist/components/stzh-appointments.js +8 -3
- package/dist/components/stzh-appointments.js.map +1 -1
- package/dist/components/stzh-container.js +1 -1
- package/dist/components/stzh-container.js.map +1 -1
- package/dist/components/stzh-datalist2.js +1 -1
- package/dist/components/stzh-datalist2.js.map +1 -1
- package/dist/components/stzh-datepicker2.js +38 -16
- package/dist/components/stzh-datepicker2.js.map +1 -1
- package/dist/components/stzh-gallery.js +1 -1
- package/dist/components/stzh-gallery.js.map +1 -1
- package/dist/components/stzh-progressbar-item2.js +2 -1
- package/dist/components/stzh-progressbar-item2.js.map +1 -1
- package/dist/components/stzh-progressbar.js +16 -1
- package/dist/components/stzh-progressbar.js.map +1 -1
- package/dist/components/stzh-sticky.js +1 -1
- package/dist/components/stzh-sticky.js.map +1 -1
- package/dist/components/stzh-toastbar.js +8 -1
- package/dist/components/stzh-toastbar.js.map +1 -1
- package/dist/components/stzh-vbz-majorticker.js +8 -3
- package/dist/components/stzh-vbz-majorticker.js.map +1 -1
- package/dist/components/stzh-vbz-ticker.js +8 -3
- package/dist/components/stzh-vbz-ticker.js.map +1 -1
- package/dist/esm/{app-globals-1a77c38b.js → app-globals-0cf2577d.js} +8 -4
- package/dist/esm/app-globals-0cf2577d.js.map +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-accordion.entry.js +1 -1
- package/dist/esm/stzh-accordion.entry.js.map +1 -1
- package/dist/esm/stzh-appointments.entry.js +7 -3
- package/dist/esm/stzh-appointments.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-container.entry.js +1 -1
- package/dist/esm/stzh-container.entry.js.map +1 -1
- package/dist/esm/stzh-datalist_2.entry.js +1 -1
- package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js +34 -15
- package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm/stzh-gallery.entry.js +1 -1
- package/dist/esm/stzh-gallery.entry.js.map +1 -1
- package/dist/esm/stzh-progressbar-item.entry.js +2 -1
- package/dist/esm/stzh-progressbar-item.entry.js.map +1 -1
- package/dist/esm/stzh-progressbar.entry.js +14 -0
- package/dist/esm/stzh-progressbar.entry.js.map +1 -1
- package/dist/esm/stzh-sticky.entry.js +1 -1
- package/dist/esm/stzh-sticky.entry.js.map +1 -1
- package/dist/esm/stzh-toastbar.entry.js +8 -1
- package/dist/esm/stzh-toastbar.entry.js.map +1 -1
- package/dist/esm/stzh-vbz-majorticker.entry.js +7 -3
- package/dist/esm/stzh-vbz-majorticker.entry.js.map +1 -1
- package/dist/esm/stzh-vbz-ticker.entry.js +7 -3
- package/dist/esm/stzh-vbz-ticker.entry.js.map +1 -1
- package/dist/esm-es5/{app-globals-1a77c38b.js → app-globals-0cf2577d.js} +2 -2
- package/dist/esm-es5/app-globals-0cf2577d.js.map +1 -0
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/stzh-accordion.entry.js +1 -1
- package/dist/esm-es5/stzh-accordion.entry.js.map +1 -1
- package/dist/esm-es5/stzh-appointments.entry.js +1 -1
- package/dist/esm-es5/stzh-appointments.entry.js.map +1 -1
- package/dist/esm-es5/stzh-components.js +1 -1
- package/dist/esm-es5/stzh-components.js.map +1 -1
- package/dist/esm-es5/stzh-container.entry.js +1 -1
- package/dist/esm-es5/stzh-container.entry.js.map +1 -1
- package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
- package/dist/esm-es5/stzh-datalist_2.entry.js.map +1 -1
- package/dist/esm-es5/stzh-datepicker_3.entry.js +1 -1
- package/dist/esm-es5/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm-es5/stzh-gallery.entry.js +1 -1
- package/dist/esm-es5/stzh-gallery.entry.js.map +1 -1
- package/dist/esm-es5/stzh-progressbar-item.entry.js +1 -1
- package/dist/esm-es5/stzh-progressbar-item.entry.js.map +1 -1
- package/dist/esm-es5/stzh-progressbar.entry.js +1 -1
- package/dist/esm-es5/stzh-progressbar.entry.js.map +1 -1
- package/dist/esm-es5/stzh-sticky.entry.js +1 -1
- package/dist/esm-es5/stzh-sticky.entry.js.map +1 -1
- package/dist/esm-es5/stzh-toastbar.entry.js +1 -1
- package/dist/esm-es5/stzh-toastbar.entry.js.map +1 -1
- package/dist/esm-es5/stzh-vbz-majorticker.entry.js +1 -1
- package/dist/esm-es5/stzh-vbz-majorticker.entry.js.map +1 -1
- package/dist/esm-es5/stzh-vbz-ticker.entry.js +1 -1
- package/dist/esm-es5/stzh-vbz-ticker.entry.js.map +1 -1
- package/dist/stzh-components/assets/i18n/de.json +12 -0
- package/dist/stzh-components/assets/i18n/en.json +12 -0
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/p-0b1b2aa6.system.entry.js +2 -0
- package/dist/stzh-components/p-0b1b2aa6.system.entry.js.map +1 -0
- package/dist/stzh-components/{p-11784b90.entry.js → p-0ba7ce34.entry.js} +2 -2
- package/dist/stzh-components/p-0ba7ce34.entry.js.map +1 -0
- package/dist/stzh-components/p-0bb08043.system.js.map +1 -1
- package/dist/stzh-components/p-222ba06a.entry.js +2 -0
- package/dist/stzh-components/p-222ba06a.entry.js.map +1 -0
- package/dist/stzh-components/{p-c658502d.system.entry.js → p-241997a2.system.entry.js} +2 -2
- package/dist/stzh-components/p-241997a2.system.entry.js.map +1 -0
- package/dist/stzh-components/p-2d88c544.system.entry.js +2 -0
- package/dist/stzh-components/p-2d88c544.system.entry.js.map +1 -0
- package/dist/stzh-components/p-361996d1.entry.js +2 -0
- package/dist/stzh-components/p-361996d1.entry.js.map +1 -0
- package/dist/stzh-components/{p-54dbcd0e.system.entry.js → p-383c2c21.system.entry.js} +2 -2
- package/dist/stzh-components/{p-54dbcd0e.system.entry.js.map → p-383c2c21.system.entry.js.map} +1 -1
- package/dist/stzh-components/{p-15980af0.entry.js → p-534dc28e.entry.js} +2 -2
- package/dist/stzh-components/{p-15980af0.entry.js.map → p-534dc28e.entry.js.map} +1 -1
- package/dist/stzh-components/{p-5fdf0a8e.entry.js → p-5486402c.entry.js} +2 -2
- package/dist/stzh-components/{p-5fdf0a8e.entry.js.map → p-5486402c.entry.js.map} +1 -1
- package/dist/stzh-components/p-55d76b46.system.entry.js +2 -0
- package/dist/stzh-components/p-55d76b46.system.entry.js.map +1 -0
- package/dist/stzh-components/{p-84ae2651.system.js → p-6233fc4f.system.js} +2 -2
- package/dist/stzh-components/p-6233fc4f.system.js.map +1 -0
- package/dist/stzh-components/{p-e5c1f04c.system.entry.js → p-628b5b0d.system.entry.js} +2 -2
- package/dist/stzh-components/p-628b5b0d.system.entry.js.map +1 -0
- package/dist/stzh-components/p-66b0d1f3.entry.js +2 -0
- package/dist/stzh-components/p-66b0d1f3.entry.js.map +1 -0
- package/dist/stzh-components/{p-8b4cc10d.entry.js → p-761909d5.entry.js} +2 -2
- package/dist/stzh-components/p-761909d5.entry.js.map +1 -0
- package/dist/stzh-components/{p-50914ed3.system.entry.js → p-87a3758c.system.entry.js} +2 -2
- package/dist/stzh-components/p-87a3758c.system.entry.js.map +1 -0
- package/dist/stzh-components/p-a1e1261a.entry.js +2 -0
- package/dist/stzh-components/p-a1e1261a.entry.js.map +1 -0
- package/dist/stzh-components/p-aa9975e6.entry.js +2 -0
- package/dist/stzh-components/p-aa9975e6.entry.js.map +1 -0
- package/dist/stzh-components/p-ae0e530e.system.js +2 -0
- package/dist/stzh-components/{p-bde8bb45.system.js.map → p-ae0e530e.system.js.map} +1 -1
- package/dist/stzh-components/{p-98b60fb7.js → p-b2b9d87e.js} +2 -2
- package/dist/stzh-components/p-b2b9d87e.js.map +1 -0
- package/dist/stzh-components/{p-bb2fe16f.system.entry.js → p-b3d76f2a.system.entry.js} +2 -2
- package/dist/stzh-components/{p-bb2fe16f.system.entry.js.map → p-b3d76f2a.system.entry.js.map} +1 -1
- package/dist/stzh-components/{p-aefc1441.entry.js → p-c57402af.entry.js} +2 -2
- package/dist/stzh-components/p-c57402af.entry.js.map +1 -0
- package/dist/stzh-components/{p-cbcb366a.system.entry.js → p-c60ccc16.system.entry.js} +2 -2
- package/dist/stzh-components/p-c60ccc16.system.entry.js.map +1 -0
- package/dist/stzh-components/{p-cc260e20.entry.js → p-d5ee8b1a.entry.js} +2 -2
- package/dist/stzh-components/{p-cc260e20.entry.js.map → p-d5ee8b1a.entry.js.map} +1 -1
- package/dist/stzh-components/{p-d9984b93.system.entry.js → p-dc30c467.system.entry.js} +2 -2
- package/dist/stzh-components/p-dc30c467.system.entry.js.map +1 -0
- package/dist/stzh-components/{p-9bfe7d0d.system.entry.js → p-e69312e4.system.entry.js} +2 -2
- package/dist/stzh-components/p-e69312e4.system.entry.js.map +1 -0
- package/dist/stzh-components/p-fa0e39e0.system.entry.js +2 -0
- package/dist/stzh-components/p-fa0e39e0.system.entry.js.map +1 -0
- package/dist/stzh-components/p-ffb4e717.entry.js +2 -0
- package/dist/stzh-components/p-ffb4e717.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/stzh-components/stzh-components.js +1 -1
- package/dist/types/components/stzh-appointments/stzh-appointments.d.ts +1 -0
- package/dist/types/components/stzh-datepicker/stzh-datepicker.d.ts +11 -1
- package/dist/types/components/stzh-progressbar/stzh-progressbar.d.ts +10 -0
- package/dist/types/components/stzh-vbz-majorticker/stzh-vbz-majorticker.d.ts +1 -0
- package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.d.ts +1 -0
- package/dist/types/components.d.ts +14 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/translation-utils.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cjs/app-globals-7697372c.js.map +0 -1
- package/dist/esm/app-globals-1a77c38b.js.map +0 -1
- package/dist/esm-es5/app-globals-1a77c38b.js.map +0 -1
- package/dist/stzh-components/p-07819ba5.entry.js +0 -2
- package/dist/stzh-components/p-07819ba5.entry.js.map +0 -1
- package/dist/stzh-components/p-1095d872.system.entry.js +0 -2
- package/dist/stzh-components/p-1095d872.system.entry.js.map +0 -1
- package/dist/stzh-components/p-11784b90.entry.js.map +0 -1
- package/dist/stzh-components/p-446dcea5.entry.js +0 -2
- package/dist/stzh-components/p-446dcea5.entry.js.map +0 -1
- package/dist/stzh-components/p-50914ed3.system.entry.js.map +0 -1
- package/dist/stzh-components/p-7b0da017.entry.js +0 -2
- package/dist/stzh-components/p-7b0da017.entry.js.map +0 -1
- package/dist/stzh-components/p-7fdd98fe.entry.js +0 -2
- package/dist/stzh-components/p-7fdd98fe.entry.js.map +0 -1
- package/dist/stzh-components/p-84ae2651.system.js.map +0 -1
- package/dist/stzh-components/p-8b4cc10d.entry.js.map +0 -1
- package/dist/stzh-components/p-8f98fc45.system.entry.js +0 -2
- package/dist/stzh-components/p-8f98fc45.system.entry.js.map +0 -1
- package/dist/stzh-components/p-98b60fb7.js.map +0 -1
- package/dist/stzh-components/p-9bfe7d0d.system.entry.js.map +0 -1
- package/dist/stzh-components/p-aafc8687.entry.js +0 -2
- package/dist/stzh-components/p-aafc8687.entry.js.map +0 -1
- package/dist/stzh-components/p-aefc1441.entry.js.map +0 -1
- package/dist/stzh-components/p-afb2885a.entry.js +0 -2
- package/dist/stzh-components/p-afb2885a.entry.js.map +0 -1
- package/dist/stzh-components/p-bde8bb45.system.js +0 -2
- package/dist/stzh-components/p-c658502d.system.entry.js.map +0 -1
- package/dist/stzh-components/p-cbcb366a.system.entry.js.map +0 -1
- package/dist/stzh-components/p-d9984b93.system.entry.js.map +0 -1
- package/dist/stzh-components/p-e278cda2.system.entry.js +0 -2
- package/dist/stzh-components/p-e278cda2.system.entry.js.map +0 -1
- package/dist/stzh-components/p-e5c1f04c.system.entry.js.map +0 -1
- package/dist/stzh-components/p-ff356dc8.system.entry.js +0 -2
- package/dist/stzh-components/p-ff356dc8.system.entry.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as e,a as s,g as o}from"./p-c92165bd.js";import{j as i}from"./p-60bcfe94.js";import"./p-3e8ff66b.js";const n=":host{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;}:host[hidden]{display:none}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{bottom:var(--stzh-space-medium);z-index:var(--stzh-z-index-overlay);position:fixed;pointer-events:none;bottom:var(--stzh-header-sticky-appnav-height, 0);left:1.25rem;right:1.25rem}@media screen and (min-width: 1024px){:host{bottom:var(--stzh-space-large)}}@media screen and (min-width: 1260px){:host{bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 600px){:host{left:2rem;right:auto;max-width:35rem;max-width:min(35rem, calc(100% - (2rem * 2)))}}@media screen and (min-width: 1024px){:host{left:2.5rem}}@media screen and (min-width: 1260px){:host{left:5.5rem}}:host ::slotted(*:not([hidden]):not([slot])){margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 1024px){:host ::slotted(*:not([hidden]):not([slot])){margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 1260px){:host ::slotted(*:not([hidden]):not([slot])){margin-bottom:var(--stzh-space-xlarge)}}.stzh-toastbar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:end;justify-content:flex-end}@media screen and (min-width: 600px){.stzh-toastbar{-ms-flex-align:start;align-items:flex-start}}";const a="stzh-components-toastbar-closed";const r=class{constructor(e){t(this,e);this._initialToasts=[];this.handleSlotchange=()=>{this.toastsAppended();this.hideOverflowingItems()};this.hideAfter=30;this.max=5;this.initialToasts=[]}async toast(t,{type:e,link:s}={type:"info"}){const o=document.createElement("stzh-toast");o.hidden=true;o.label=t;o.role="alert";o.type=e||"info";o.initialOpenAnimation=true;if(s){s.slot="link";s.size="small";o.appendChild(s)}this.element.appendChild(o);return o}initialToastsWatcher(t){if(typeof t==="string"){this._initialToasts=JSON.parse(t)}else{this._initialToasts=t}}toastAppended(t){if(t.getAttribute("data-stzh-toastbar-managed")){return}t.setAttribute("data-stzh-toastbar-managed","");t.addEventListener("stzhClosed",(()=>{t.remove()}));if(t.type!=="error"){let e=(new Date).getTime();let s=this.hideAfter*1e3;let o=window.setTimeout((()=>{t.hide()}),s);t.addEventListener("pointerenter",(()=>{if(o){window.clearTimeout(o);const t=(new Date).getTime()-e;s=s-t}}));t.addEventListener("pointerleave",(()=>{e=(new Date).getTime();o=window.setTimeout((()=>{t.hide()}),s)}))}}toastsAppended(){Array.from(this.element.children).forEach((t=>{this.toastAppended(t)}))}hideOverflowingItems(){const t=this.element.children.length;Array.from(this.element.children).splice(0,t-this.max).forEach((t=>{t.hide()}))}componentWillLoad(){this.initialToastsWatcher(this.initialToasts)}componentDidLoad(){this._initialToasts.forEach((async t=>{if(t.cookie){const e=i.get(`${a}-${t.cookie}`);if(e){return}}let e=t.link;if(!(e instanceof HTMLElement)){const s=document.createElement("stzh-link");s.slot="link";s.size="small";Object.assign(s,t.link);e=s}const s=await this.toast(t.label,{type:t.type,link:e});if(t.cookie){s.addEventListener("stzhClosed",(()=>{i.set(`${a}-${t.cookie}`,"1",{expires:
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as e,a as s,g as o}from"./p-c92165bd.js";import{j as i}from"./p-60bcfe94.js";import"./p-3e8ff66b.js";const n=":host{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;}:host[hidden]{display:none}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{bottom:var(--stzh-space-medium);z-index:var(--stzh-z-index-overlay);position:fixed;pointer-events:none;bottom:var(--stzh-header-sticky-appnav-height, 0);left:1.25rem;right:1.25rem}@media screen and (min-width: 1024px){:host{bottom:var(--stzh-space-large)}}@media screen and (min-width: 1260px){:host{bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 600px){:host{left:2rem;right:auto;max-width:35rem;max-width:min(35rem, calc(100% - (2rem * 2)))}}@media screen and (min-width: 1024px){:host{left:2.5rem}}@media screen and (min-width: 1260px){:host{left:5.5rem}}:host ::slotted(*:not([hidden]):not([slot])){margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 1024px){:host ::slotted(*:not([hidden]):not([slot])){margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 1260px){:host ::slotted(*:not([hidden]):not([slot])){margin-bottom:var(--stzh-space-xlarge)}}.stzh-toastbar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:end;justify-content:flex-end}@media screen and (min-width: 600px){.stzh-toastbar{-ms-flex-align:start;align-items:flex-start}}";const a="stzh-components-toastbar-closed";const r=class{constructor(e){t(this,e);this._initialToasts=[];this.handleSlotchange=()=>{this.toastsAppended();this.hideOverflowingItems()};this.hideAfter=30;this.max=5;this.initialToasts=[]}async toast(t,{type:e,link:s}={type:"info"}){const o=document.createElement("stzh-toast");o.hidden=true;o.label=t;o.role="alert";o.type=e||"info";o.initialOpenAnimation=true;if(s){s.slot="link";s.size="small";o.appendChild(s)}this.element.appendChild(o);return o}initialToastsWatcher(t){if(typeof t==="string"){this._initialToasts=JSON.parse(t)}else{this._initialToasts=t}}toastAppended(t){if(t.getAttribute("data-stzh-toastbar-managed")){return}t.setAttribute("data-stzh-toastbar-managed","");t.addEventListener("stzhClosed",(()=>{t.remove()}));if(t.type!=="error"){let e=(new Date).getTime();let s=this.hideAfter*1e3;let o=window.setTimeout((()=>{t.hide()}),s);t.addEventListener("pointerenter",(()=>{if(o){window.clearTimeout(o);const t=(new Date).getTime()-e;s=s-t}}));t.addEventListener("pointerleave",(()=>{e=(new Date).getTime();o=window.setTimeout((()=>{t.hide()}),s)}))}}toastsAppended(){Array.from(this.element.children).forEach((t=>{this.toastAppended(t)}))}hideOverflowingItems(){const t=this.element.children.length;Array.from(this.element.children).splice(0,t-this.max).forEach((t=>{t.hide()}))}componentWillLoad(){this.initialToastsWatcher(this.initialToasts)}componentDidLoad(){this._initialToasts.forEach((async t=>{if(t.cookie){const e=i.get(`${a}-${t.cookie}`);if(e){return}}let e=t.link;if(!(e instanceof HTMLElement)){const s=document.createElement("stzh-link");s.slot="link";s.size="small";Object.assign(s,t.link);e=s}const s=await this.toast(t.label,{type:t.type,link:e});if(t.cookie){let e=365;if(t.cookieExpires===0){e=null}else if(t.cookieExpires){e=t.cookieExpires}s.addEventListener("stzhClosed",(()=>{i.set(`${a}-${t.cookie}`,"1",{expires:e})}))}}))}render(){const t={"stzh-toastbar":true};return e(s,null,e("div",{class:t},e("slot",{onSlotchange:this.handleSlotchange})))}get element(){return o(this)}static get watchers(){return{initialToasts:["initialToastsWatcher"]}}};r.style=n;export{r as stzh_toastbar};
|
|
2
|
+
//# sourceMappingURL=p-5486402c.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stzhToastbarCss","KEY_PREFIX_CLOSED","StzhToastbar","this","_initialToasts","handleSlotchange","toastsAppended","hideOverflowingItems","toast","label","type","link","document","createElement","hidden","role","initialOpenAnimation","slot","size","appendChild","element","initialToastsWatcher","newValue","JSON","parse","toastAppended","getAttribute","setAttribute","addEventListener","remove","timeoutStarted","Date","getTime","restTime","hideAfter","currentTimeout","window","setTimeout","hide","clearTimeout","timePassed","Array","from","children","forEach","childCount","length","splice","max","componentWillLoad","initialToasts","componentDidLoad","async","data","cookie","alreadyClosedBefore","Cookie","get","HTMLElement","generatedLink","Object","assign","
|
|
1
|
+
{"version":3,"names":["stzhToastbarCss","KEY_PREFIX_CLOSED","StzhToastbar","this","_initialToasts","handleSlotchange","toastsAppended","hideOverflowingItems","toast","label","type","link","document","createElement","hidden","role","initialOpenAnimation","slot","size","appendChild","element","initialToastsWatcher","newValue","JSON","parse","toastAppended","getAttribute","setAttribute","addEventListener","remove","timeoutStarted","Date","getTime","restTime","hideAfter","currentTimeout","window","setTimeout","hide","clearTimeout","timePassed","Array","from","children","forEach","childCount","length","splice","max","componentWillLoad","initialToasts","componentDidLoad","async","data","cookie","alreadyClosedBefore","Cookie","get","HTMLElement","generatedLink","Object","assign","cookieExpires","set","expires","render","classes","h","Host","class","onSlotchange"],"sources":["src/components/stzh-toastbar/stzh-toastbar.scss?tag=stzh-toastbar&encapsulation=shadow","src/components/stzh-toastbar/stzh-toastbar.tsx"],"sourcesContent":[":host {\n @include spaceCurve('bottom', 'regular');\n z-index: $zIndexOverlay;\n position: fixed;\n pointer-events: none;\n bottom: var(--stzh-header-sticky-appnav-height, 0);\n left: $containerMargin;\n right: $containerMargin;\n\n @include mq($from: small) {\n left: $containerMarginSmall;\n right: auto;\n max-width: 560px;\n max-width: min(560px, calc(100% - (#{$containerMarginSmall} * 2)));\n }\n\n @include mq($from: medium) {\n left: $containerMarginMedium;\n // max-width: calc(100% - (#{$containerMarginMedium} * 2));\n }\n\n @include mq($from: large) {\n left: $containerMarginLarge;\n // max-width: calc(100% - (#{$containerMarginLarge} * 2));\n }\n\n ::slotted(*:not([hidden]):not([slot])) {\n @include spaceCurve('margin-bottom', 'regular');\n }\n}\n\n.stzh-toastbar {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n\n @include mq($from: small) {\n align-items: flex-start;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhToastbarInitialToast,\n StzhToastType,\n} from \"../../index\";\n\nimport Cookie from \"js-cookie\";\n\nconst KEY_PREFIX_CLOSED = \"stzh-components-toastbar-closed\";\n\n/**\n * @slot - Slot for stzh-toast elements\n */\n@Component({\n tag: \"stzh-toastbar\",\n styleUrl: \"stzh-toastbar.scss\",\n shadow: true\n})\nexport class StzhToastbar {\n /**\n * Time after toasts are hidden (in seconds).\n * Toasts with type `error` will stay, until the user closes them manually.\n */\n @Prop() hideAfter: number = 30;\n\n /**\n * Maximum of toasts allowed to be shown.\n * If more are created, oldest will be hidden, even if timeout not ended yet or toast type is `error`.\n */\n @Prop() max: number = 5;\n\n /**\n * Initial toasts.\n *\n * Array of objects that at least includes `label` and optionally `type`, `link` (object with `href` and `label`) `cookie` and `cookieExpires`:\n * `[{\"label\": \"Lorem ipsum\", \"link\": { \"label\": \"More info\", \"href\": \"https://example.com\" }, \"cookie\": \"cookie-banner\", \"cookieExpires\": 365 }]`\n *\n * If `cookie` exists in an object, it will check for that cookie name first (prefixed with `stzh-components-toastbar-closed-`) and only show if cookie doesn't exist.\n * `cookieExpires` sets the cookie lifetime (default 365 days, set 0 for session cookie).\n */\n @Prop() initialToasts: StzhToastbarInitialToast[] | string = [];\n private _initialToasts: StzhToastbarInitialToast[] = [];\n\n @Element() element: HTMLStzhToastbarElement;\n\n /** Create new toast. */\n @Method()\n async toast(\n label: string,\n { type, link }: { type?: StzhToastType, link?: HTMLStzhLinkElement } = { type: \"info\" }\n ): Promise<HTMLStzhToastElement> {\n const toast = document.createElement(\"stzh-toast\");\n toast.hidden = true;\n toast.label = label;\n toast.role = \"alert\";\n toast.type = type || \"info\";\n toast.initialOpenAnimation = true;\n\n if (link) {\n link.slot = \"link\";\n link.size = \"small\";\n toast.appendChild(link);\n }\n\n this.element.appendChild(toast);\n\n return toast;\n }\n\n @Watch(\"initialToasts\")\n initialToastsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._initialToasts = JSON.parse(newValue);\n } else {\n this._initialToasts = newValue;\n }\n }\n\n private toastAppended(toast: HTMLStzhToastElement) {\n if (toast.getAttribute('data-stzh-toastbar-managed')) {\n return;\n }\n\n toast.setAttribute('data-stzh-toastbar-managed', '');\n\n toast.addEventListener(\"stzhClosed\", () => {\n toast.remove();\n });\n\n if (toast.type !== \"error\") {\n let timeoutStarted = new Date().getTime();\n let restTime = this.hideAfter * 1000;\n let currentTimeout = window.setTimeout(() => {\n toast.hide();\n }, restTime);\n\n toast.addEventListener(\"pointerenter\", () => {\n if (currentTimeout) {\n window.clearTimeout(currentTimeout);\n const timePassed = new Date().getTime() - timeoutStarted;\n restTime = restTime - timePassed;\n }\n });\n\n toast.addEventListener(\"pointerleave\", () => {\n timeoutStarted = new Date().getTime();\n currentTimeout = window.setTimeout(() => {\n toast.hide();\n }, restTime);\n });\n }\n }\n\n private toastsAppended() {\n Array.from(this.element.children).forEach((toast: HTMLStzhToastElement) => {\n this.toastAppended(toast);\n });\n }\n\n private hideOverflowingItems() {\n const childCount = this.element.children.length;\n\n Array.from(this.element.children)\n .splice(0, childCount - this.max)\n .forEach((toast: HTMLStzhToastElement) => {\n toast.hide();\n });\n }\n\n private handleSlotchange = () => {\n this.toastsAppended();\n this.hideOverflowingItems();\n }\n\n componentWillLoad() {\n this.initialToastsWatcher(this.initialToasts);\n }\n\n componentDidLoad() {\n this._initialToasts.forEach(async (data) => {\n if (data.cookie) {\n const alreadyClosedBefore = Cookie.get(`${KEY_PREFIX_CLOSED}-${data.cookie}`);\n\n if (alreadyClosedBefore) {\n return;\n }\n }\n\n let link = data.link;\n\n if (!(link instanceof HTMLElement)) {\n const generatedLink = document.createElement(\"stzh-link\");\n generatedLink.slot = \"link\";\n generatedLink.size = \"small\";\n\n Object.assign(generatedLink, data.link);\n link = generatedLink;\n }\n\n const toast = await this.toast(data.label, {\n type: data.type,\n link: link as HTMLStzhLinkElement\n })\n\n if (data.cookie) {\n let cookieExpires = 365;\n\n if (data.cookieExpires === 0) {\n cookieExpires = null;\n } else if (data.cookieExpires) {\n cookieExpires = data.cookieExpires;\n }\n\n toast.addEventListener(\"stzhClosed\", () => {\n Cookie.set(`${KEY_PREFIX_CLOSED}-${data.cookie}`, '1', {\n expires: cookieExpires\n });\n });\n }\n })\n }\n\n render() {\n const classes = {\n \"stzh-toastbar\": true,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot onSlotchange={this.handleSlotchange}></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"qHAAA,MAAMA,EAAkB,+zDCiBxB,MAAMC,EAAoB,kC,MAUbC,EAAY,M,yBAuBfC,KAAAC,eAA6C,GAwF7CD,KAAAE,iBAAmB,KACzBF,KAAKG,iBACLH,KAAKI,sBAAsB,E,eA5GD,G,SAMN,E,mBAWuC,E,CAO7D,WAAMC,CACJC,GACAC,KAAEA,EAAIC,KAAEA,GAA+D,CAAED,KAAM,SAE/E,MAAMF,EAAQI,SAASC,cAAc,cACrCL,EAAMM,OAAS,KACfN,EAAMC,MAAQA,EACdD,EAAMO,KAAO,QACbP,EAAME,KAAOA,GAAQ,OACrBF,EAAMQ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SAAQQ,MAAOC,IACjC,GAAIA,EAAKC,OAAQ,CACf,MAAMC,EAAsBC,EAAOC,IAAI,GAAGxD,KAAqBoD,EAAKC,UAEpE,GAAIC,EAAqB,CACvB,M,EAIJ,IAAI5C,EAAO0C,EAAK1C,KAEhB,KAAMA,aAAgB+C,aAAc,CAClC,MAAMC,EAAgB/C,SAASC,cAAc,aAC7C8C,EAAc1C,KAAO,OACrB0C,EAAczC,KAAO,QAErB0C,OAAOC,OAAOF,EAAeN,EAAK1C,MAClCA,EAAOgD,C,CAGT,MAAMnD,QAAcL,KAAKK,MAAM6C,EAAK5C,MAAO,CACzCC,KAAM2C,EAAK3C,KACXC,KAAMA,IAGR,GAAI0C,EAAKC,OAAQ,CACf,IAAIQ,EAAgB,IAEpB,GAAIT,EAAKS,gBAAkB,EAAG,CAC5BA,EAAgB,I,MACX,GAAIT,EAAKS,cAAe,CAC7BA,EAAgBT,EAAKS,a,CAGvBtD,EAAMoB,iBAAiB,cAAc,KACnC4B,EAAOO,IAAI,GAAG9D,KAAqBoD,EAAKC,SAAU,IAAK,CACrDU,QAASF,GACT,G,KAMV,MAAAG,GACE,MAAMC,EAAU,CACd,gBAAiB,MAGnB,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAOH,GACVC,EAAA,QAAMG,aAAcnE,KAAKE,oB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./p-290fcb28.system.js"],(function(t){"use strict";var i,n,r;return{setters:[function(t){i=t.r;n=t.h;r=t.a}],execute:function(){var s=".sc-stzh-container-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-container-h{display:none}.sc-stzh-container-h *.sc-stzh-container,.sc-stzh-container-h *.sc-stzh-container::before,.sc-stzh-container-h *.sc-stzh-container::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-container-h .has-focus.sc-stzh-container{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-container-h .stzh-fylingfocus-focused.sc-stzh-container{outline-style:none !important}.sc-stzh-container-h .stzh-fylingfocus-focused.sc-stzh-container::-moz-focus-inner{border:0 !important}.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-1.25rem;margin-right:-1.25rem}@media screen and (min-width: 600px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-2rem;margin-right:-2rem}}@media screen and (min-width: 1024px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-2.5rem;margin-right:-2.5rem}}@media screen and (min-width: 1260px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-5.5rem;margin-right:-5.5rem}}@media screen and (min-width: 1440px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / -2);margin-right:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / -2)}}.sc-stzh-container-h .sc-stzh-container-s stzh-container{position:relative;left:50%;right:50%;margin-left:calc(-50vw + var(--stzh-scrollbar-width) / 2);margin-right:calc(-50vw + var(--stzh-scrollbar-width) / 2);width:calc(100vw - var(--stzh-scrollbar-width));max-width:calc(100vw - var(--stzh-scrollbar-width))}.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:1.25rem}@media screen and (min-width: 600px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:2rem}}@media screen and (min-width: 1024px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:2.5rem}}@media screen and (min-width: 1260px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:var(--stzh-space-xlarge)}}@media screen and (max-width: 1259px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{position:relative;left:50%;right:50%;margin-left:calc(-50vw + var(--stzh-scrollbar-width) / 2);margin-right:calc(-50vw + var(--stzh-scrollbar-width) / 2);width:calc(100vw - var(--stzh-scrollbar-width));max-width:calc(100vw - var(--stzh-scrollbar-width))}}.sc-stzh-container-h .sc-stzh-container-s stzh-row stzh-section[variant=highlight]{--highlight-horizontal-padding:var(--stzh-section-highlight-horizontal-padding)}@media screen and (max-width: 1259px){.sc-stzh-container-h .sc-stzh-container-s stzh-row stzh-section[variant=highlight]{left:initial;right:initial;margin-left:initial;margin-right:initial;width:initial;max-width:initial}}.stzh-container.sc-stzh-container{margin-left:1.25rem;margin-right:1.25rem}@media screen and (min-width: 600px){.stzh-container.sc-stzh-container{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 1024px){.stzh-container.sc-stzh-container{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.stzh-container.sc-stzh-container{margin-left:5.5rem;margin-right:5.5rem}}@media screen and (min-width: 1440px){.stzh-container.sc-stzh-container{margin-left:auto;margin-right:auto;width:78.75rem}}@media screen and (min-width: 1440px){.stzh-container--size-big.sc-stzh-container{width:90rem}}.stzh-container--has-no-margin.sc-stzh-container{margin-left:auto;margin-right:auto}";var e=t("stzh_container",function(){function t(t){i(this,t);this.size="default";this.noMargin=false}t.prototype.render=function(){var t;var i=(t={"stzh-container":true,"stzh-container--has-no-margin":this.noMargin},t["stzh-container--size-".concat(this.size)]=!!this.size,t);return n(r,null,n("div",{class:i},n("slot",null)))};return t}());e.style=s}}}));
|
|
2
|
+
//# sourceMappingURL=p-55d76b46.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stzhContainerCss","StzhContainer","exports","class_1","prototype","render","classes","_a","this","noMargin","concat","size","h","Host","class"],"sources":["src/components/stzh-container/stzh-container.scss?tag=stzh-container&encapsulation=scoped","src/components/stzh-container/stzh-container.tsx"],"sourcesContent":[":host {\n ::slotted(*) {\n stzh-header {\n margin-left: -$containerMargin;\n margin-right: -$containerMargin;\n\n @include mq($from: small) {\n margin-left: -$containerMarginSmall;\n margin-right: -$containerMarginSmall;\n }\n\n @include mq($from: medium) {\n margin-left: -$containerMarginMedium;\n margin-right: -$containerMarginMedium;\n }\n\n @include mq($from: large) {\n margin-left: -$containerMarginLarge;\n margin-right: -$containerMarginLarge;\n }\n\n @include mq($from: ultra) {\n margin-left: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / -2);\n margin-right: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / -2);\n }\n }\n\n stzh-container {\n position: relative;\n left: 50%;\n right: 50%;\n margin-left: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n margin-right: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n width: calc(100vw - var(--stzh-scrollbar-width));\n max-width: calc(100vw - var(--stzh-scrollbar-width));\n }\n\n stzh-section[variant=\"highlight\"] {\n --highlight-horizontal-padding: #{$containerMargin};\n\n @include mq($from: small) {\n --highlight-horizontal-padding: #{$containerMarginSmall};\n }\n\n @include mq($from: medium) {\n --highlight-horizontal-padding: #{$containerMarginMedium};\n }\n\n @include mq($from: large) {\n --highlight-horizontal-padding: #{space('xlarge')};\n }\n\n @include mq($to: large) {\n position: relative;\n left: 50%;\n right: 50%;\n margin-left: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n margin-right: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n width: calc(100vw - var(--stzh-scrollbar-width));\n max-width: calc(100vw - var(--stzh-scrollbar-width));\n }\n }\n\n stzh-row stzh-section[variant=\"highlight\"] {\n --highlight-horizontal-padding: #{$sectionHighlightHorizontalPadding};\n\n @include mq($to: large) {\n left: initial;\n right: initial;\n margin-left: initial;\n margin-right: initial;\n width: initial;\n max-width: initial;\n }\n }\n }\n}\n\n.stzh-container {\n @include container;\n\n &--size-big {\n @include mq($from: ultra) {\n width: $containerBigMaxWidth;\n }\n }\n\n &--has-no-margin {\n margin-left: auto;\n margin-right: auto;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n} from \"@stencil/core\";\n\n/**\n * @slot - Slot for any content\n */\n@Component({\n tag: \"stzh-container\",\n styleUrl: \"stzh-container.scss\",\n scoped: true\n})\nexport class StzhContainer {\n /** Size variant */\n @Prop() size: \"default\" | \"big\" = \"default\";\n\n /** Whether to prevent side margins */\n @Prop() noMargin: boolean = false;\n\n render() {\n const classes = {\n \"stzh-container\": true,\n \"stzh-container--has-no-margin\": this.noMargin,\n [`stzh-container--size-${this.size}`]: !!this.size,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"kJAAA,IAAMA,EAAmB,+7H,ICeZC,EAAaC,EAAA,4B,kCAEU,U,cAGN,K,CAE5BC,EAAAC,UAAAC,OAAA,W,MACE,IAAMC,GAAOC,EAAA,CACX,iBAAkB,KAClB,gCAAiCC,KAAKC,UACtCF,EAAC,wBAAAG,OAAwBF,KAAKG,SAAWH,KAAKG,K,GAGhD,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAOR,GACVM,EAAA,c,WAjBgB,I"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r["throw"](e))}catch(e){i(e)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register([],(function(e){"use strict";return{execute:function(){var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,n,r){if(n)e(t.prototype,n);if(r)e(t,r);return t}}();function n(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}(function(){if(typeof window==="undefined"){return}var e=Array.prototype.slice;var r=Element.prototype.matches||Element.prototype.msMatchesSelector;var o=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(",");var i=function(){function i(e,t){n(this,i);this._inertManager=t;this._rootElement=e;this._managedNodes=new Set;if(this._rootElement.hasAttribute("aria-hidden")){this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden")}else{this._savedAriaHidden=null}this._rootElement.setAttribute("aria-hidden","true");this._makeSubtreeUnfocusable(this._rootElement);this._observer=new MutationObserver(this._onMutation.bind(this));this._observer.observe(this._rootElement,{attributes:true,childList:true,subtree:true})}t(i,[{key:"destructor",value:function e(){this._observer.disconnect();if(this._rootElement){if(this._savedAriaHidden!==null){this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden)}else{this._rootElement.removeAttribute("aria-hidden")}}this._managedNodes.forEach((function(e){this._unmanageNode(e.node)}),this);this._observer=null;this._rootElement=null;this._managedNodes=null;this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function e(t){var n=this;u(t,(function(e){return n._visitNode(e)}));var r=document.activeElement;if(!document.body.contains(t)){var o=t;var i=undefined;while(o){if(o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){i=o;break}o=o.parentNode}if(i){r=i.activeElement}}if(t.contains(r)){r.blur();if(r===document.activeElement){document.body.focus()}}}},{key:"_visitNode",value:function e(t){if(t.nodeType!==Node.ELEMENT_NODE){return}var n=t;if(n!==this._rootElement&&n.hasAttribute("inert")){this._adoptInertRoot(n)}if(r.call(n,o)||n.hasAttribute("tabindex")){this._manageNode(n)}}},{key:"_manageNode",value:function e(t){var n=this._inertManager.register(t,this);this._managedNodes.add(n)}},{key:"_unmanageNode",value:function e(t){var n=this._inertManager.deregister(t,this);if(n){this._managedNodes["delete"](n)}}},{key:"_unmanageSubtree",value:function e(t){var n=this;u(t,(function(e){return n._unmanageNode(e)}))}},{key:"_adoptInertRoot",value:function e(t){var n=this._inertManager.getInertRoot(t);if(!n){this._inertManager.setInert(t,true);n=this._inertManager.getInertRoot(t)}n.managedNodes.forEach((function(e){this._manageNode(e.node)}),this)}},{key:"_onMutation",value:function t(n,r){n.forEach((function(t){var n=t.target;if(t.type==="childList"){e.call(t.addedNodes).forEach((function(e){this._makeSubtreeUnfocusable(e)}),this);e.call(t.removedNodes).forEach((function(e){this._unmanageSubtree(e)}),this)}else if(t.type==="attributes"){if(t.attributeName==="tabindex"){this._manageNode(n)}else if(n!==this._rootElement&&t.attributeName==="inert"&&n.hasAttribute("inert")){this._adoptInertRoot(n);var r=this._inertManager.getInertRoot(n);this._managedNodes.forEach((function(e){if(n.contains(e.node)){r._manageNode(e.node)}}))}}}),this)}},{key:"managedNodes",get:function e(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function e(){return this._savedAriaHidden!==null}},{key:"savedAriaHidden",set:function e(t){this._savedAriaHidden=t},get:function e(){return this._savedAriaHidden}}]);return i}();var a=function(){function e(t,r){n(this,e);this._node=t;this._overrodeFocusMethod=false;this._inertRoots=new Set([r]);this._savedTabIndex=null;this._destroyed=false;this.ensureUntabbable()}t(e,[{key:"destructor",value:function e(){this._throwIfDestroyed();if(this._node&&this._node.nodeType===Node.ELEMENT_NODE){var t=this._node;if(this._savedTabIndex!==null){t.setAttribute("tabindex",this._savedTabIndex)}else{t.removeAttribute("tabindex")}if(this._overrodeFocusMethod){delete t.focus}}this._node=null;this._inertRoots=null;this._destroyed=true}},{key:"_throwIfDestroyed",value:function e(){if(this.destroyed){throw new Error("Trying to access destroyed InertNode")}}},{key:"ensureUntabbable",value:function e(){if(this.node.nodeType!==Node.ELEMENT_NODE){return}var t=this.node;if(r.call(t,o)){if(t.tabIndex===-1&&this.hasSavedTabIndex){return}if(t.hasAttribute("tabindex")){this._savedTabIndex=t.tabIndex}t.setAttribute("tabindex","-1");if(t.nodeType===Node.ELEMENT_NODE){t.focus=function(){};this._overrodeFocusMethod=true}}else if(t.hasAttribute("tabindex")){this._savedTabIndex=t.tabIndex;t.removeAttribute("tabindex")}}},{key:"addInertRoot",value:function e(t){this._throwIfDestroyed();this._inertRoots.add(t)}},{key:"removeInertRoot",value:function e(t){this._throwIfDestroyed();this._inertRoots["delete"](t);if(this._inertRoots.size===0){this.destructor()}}},{key:"destroyed",get:function e(){return this._destroyed}},{key:"hasSavedTabIndex",get:function e(){return this._savedTabIndex!==null}},{key:"node",get:function e(){this._throwIfDestroyed();return this._node}},{key:"savedTabIndex",set:function e(t){this._throwIfDestroyed();this._savedTabIndex=t},get:function e(){this._throwIfDestroyed();return this._savedTabIndex}}]);return e}();var s=function(){function o(e){n(this,o);if(!e){throw new Error("Missing required argument; InertManager needs to wrap a document.")}this._document=e;this._managedNodes=new Map;this._inertRoots=new Map;this._observer=new MutationObserver(this._watchForInert.bind(this));d(e.head||e.body||e.documentElement);if(e.readyState==="loading"){e.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this))}else{this._onDocumentLoaded()}}t(o,[{key:"setInert",value:function e(t,n){if(n){if(this._inertRoots.has(t)){return}var r=new i(t,this);t.setAttribute("inert","");this._inertRoots.set(t,r);if(!this._document.body.contains(t)){var o=t.parentNode;while(o){if(o.nodeType===11){d(o)}o=o.parentNode}}}else{if(!this._inertRoots.has(t)){return}var a=this._inertRoots.get(t);a.destructor();this._inertRoots["delete"](t);t.removeAttribute("inert")}}},{key:"getInertRoot",value:function e(t){return this._inertRoots.get(t)}},{key:"register",value:function e(t,n){var r=this._managedNodes.get(t);if(r!==undefined){r.addInertRoot(n)}else{r=new a(t,n)}this._managedNodes.set(t,r);return r}},{key:"deregister",value:function e(t,n){var r=this._managedNodes.get(t);if(!r){return null}r.removeInertRoot(n);if(r.destroyed){this._managedNodes["delete"](t)}return r}},{key:"_onDocumentLoaded",value:function t(){var n=e.call(this._document.querySelectorAll("[inert]"));n.forEach((function(e){this.setInert(e,true)}),this);this._observer.observe(this._document.body||this._document.documentElement,{attributes:true,subtree:true,childList:true})}},{key:"_watchForInert",value:function t(n,o){var i=this;n.forEach((function(t){switch(t.type){case"childList":e.call(t.addedNodes).forEach((function(t){if(t.nodeType!==Node.ELEMENT_NODE){return}var n=e.call(t.querySelectorAll("[inert]"));if(r.call(t,"[inert]")){n.unshift(t)}n.forEach((function(e){this.setInert(e,true)}),i)}),i);break;case"attributes":if(t.attributeName!=="inert"){return}var n=t.target;var o=n.hasAttribute("inert");i.setInert(n,o);break}}),this)}}]);return o}();function u(e,t,n){if(e.nodeType==Node.ELEMENT_NODE){var r=e;if(t){t(r)}var o=r.shadowRoot;if(o){u(o,t);return}if(r.localName=="content"){var i=r;var a=i.getDistributedNodes?i.getDistributedNodes():[];for(var s=0;s<a.length;s++){u(a[s],t)}return}if(r.localName=="slot"){var d=r;var l=d.assignedNodes?d.assignedNodes({flatten:true}):[];for(var c=0;c<l.length;c++){u(l[c],t)}return}}var f=e.firstChild;while(f!=null){u(f,t);f=f.nextSibling}}function d(e){if(e.querySelector("style#inert-style, link#inert-style")){return}var t=document.createElement("style");t.setAttribute("id","inert-style");t.textContent="\n"+"[inert] {\n"+" pointer-events: none;\n"+" cursor: default;\n"+"}\n"+"\n"+"[inert], [inert] * {\n"+" -webkit-user-select: none;\n"+" -moz-user-select: none;\n"+" -ms-user-select: none;\n"+" user-select: none;\n"+"}\n";e.appendChild(t)}if(!HTMLElement.prototype.hasOwnProperty("inert")){var l=new s(document);Object.defineProperty(HTMLElement.prototype,"inert",{enumerable:true,get:function e(){return this.hasAttribute("inert")},set:function e(t){l.setInert(this,t)}})}})();var r="@oiz/stzh-components";var o="2.11.1";var i=r.substring(r.indexOf("/")+1);function a(){window.addEventListener("appload",(function(e){var t=document.querySelector("[autofocus]");if(t&&e.detail.namespace===i&&t.tagName.toLowerCase().indexOf("stzh-")===0&&"setFocus"in t){t.setFocus()}}))}function s(){var e={threshold:1};var t=function(e){e.forEach((function(e){var t=0;if(e.intersectionRatio<1){t=window.innerWidth-document.body.clientWidth}document.documentElement.style.setProperty("--stzh-scrollbar-width",t+"px")}))};var n=new IntersectionObserver(t,e);n.observe(document.body)}function u(e,t){if(t===void 0){t="datetime"}if(!window.stzhComponents.translations){console.log("Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`");return}var n=window.stzhComponents.translations,r=n.$formats,o=n.$globals;var i=f(r,o);return i.format(e,t)}function d(e,t){if(t===void 0){t="datetime"}if(!window.stzhComponents.translations){console.log("Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`");return}var n=window.stzhComponents.translations,r=n.$formats,o=n.$globals;var i=f(r,o);return i.parse(e,t)}function l(e,t,n){if(n===void 0){n="datetime"}if(!window.stzhComponents.translations){console.log("Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`");return}var r=window.stzhComponents.translations,o=r.$formats,i=r.$globals;var a=f(o,i);return a.formatSpan(e,t,n)}function c(e,t){if(t===void 0){t="datetime"}if(!window.stzhComponents.translations){console.log("Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`");return}var n=window.stzhComponents.translations,r=n.$formats,o=n.$globals;var i=f(r,o);return i.parseSpan(e,t)}function f(e,t){var n=function(e,n){if(!n||!(n instanceof Date)||isNaN(n.getTime())){return""}var r=n.getDate().toString(10);var o=r;var i=(n.getMonth()+1).toString(10);var a=i;var s=n.getFullYear().toString(10);var u=n.getHours().toString(10);var d=u;var l=n.getMinutes().toString(10);var c=t.monthNames[n.getMonth()];var f=t.monthNamesShort[n.getMonth()];var h=t.dayNames[n.getDay()];if(n.getMonth()<9){a="0".concat(a)}if(n.getDate()<10){o="0".concat(o)}if(n.getHours()<10){d="0".concat(d)}if(n.getMinutes()<10){l="0".concat(l)}return e.replace(/\{j\}/g,r).replace(/\{d\}/g,o).replace(/\{l\}/g,h).replace(/\{n\}/g,i).replace(/\{m\}/g,a).replace(/\{F\}/g,c).replace(/\{M\}/g,f).replace(/\{Y\}/g,s).replace(/\{H\}/g,d).replace(/\{G\}/g,u).replace(/\{i\}/g,l)};var r=function(e,t){if(!t){return}var n=new RegExp(e);var r=t.match(n);if(r){var o=r.groups;var i=parseInt(o.Y||"",10);var a=parseInt(o.n||o.m||"",10);var s=parseInt(o.j||o.d||"",10);var u=parseInt(o.G||o.H||"",10);var d=parseInt(o.i||"",10);if(!isNaN(i)&&(i<1e3||i>9999)){return}if(!isNaN(a)&&(a<1||a>12)){return}if(!isNaN(s)&&(s<1||s>31)){return}if(!isNaN(u)&&(u<0||u>23)){return}if(!isNaN(d)&&(d<0||d>59)){return}var l=new Date(!isNaN(i)?i:null,!isNaN(a)?a-1:null,!isNaN(s)?s:null,!isNaN(u)?u:null,!isNaN(d)?d:null);if(l.getMonth()+1!==a){return}return l}};var o={format:function(t,r){var o;if(r===void 0){r="datetime"}var i=__assign(__assign({},e[r]),((o=window.stzhComponents)===null||o===void 0?void 0:o.formats[r])||{});if(typeof i.format==="string"){return n(i.format,t)}else{return i.format(t)}},parse:function(t,n){var o;if(n===void 0){n="datetime"}var i=__assign(__assign({},e[n]),((o=window.stzhComponents)===null||o===void 0?void 0:o.formats[n])||{});if(typeof i.parse==="string"){return r(i.parse,t)}else{return i.parse(t)}},formatSpan:function(e,n,r){if(r===void 0){r="datetime"}var o=e;var i=n;if(e instanceof Date){o=this.format(e,r)}if(n instanceof Date){i=this.format(n,r)}var a=t.dateRange;if(r.startsWith("time")){a=t.timeRange}return"".concat(o).concat(a).concat(i)},parseSpan:function(e,n){var r=t.dateRange;if(n.startsWith("time")){r=t.timeRange}var o=e.split(r);var i=this.parse(o[0],n);var a=this.parse(o[1],n);return[i,a,r]}};return o}function h(e){var t=e.closest("[lang]");var n=t&&t.lang.split("-")[0];if(window.stzhComponents.supportedLocales.indexOf(n)===-1||!n){return window.stzhComponents.defaultLocale}else{return n}}function v(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,o,i,a;return __generator(this,(function(s){switch(s.label){case 0:n=h(e);r=JSON.parse(sessionStorage.getItem("stzhComponents.v".concat(window.stzhComponents.version,".i18n.").concat(n)));if(window.stzhComponents.cacheTranslations&&window.stzhComponents.version.match(/-dev-snapshot/i)===null&&r&&Object.keys(r).length>0){return[2,__assign(__assign({},r[t]||{}),{$globals:r.$globals,$locale:r.$code,$formats:r.$formats})]}s.label=1;case 1:s.trys.push([1,5,,6]);return[4,fetch("".concat(window.stzhComponents.pathTranslations,"/").concat(n,".json"))];case 2:o=s.sent();if(!o.ok)return[3,4];return[4,o.json()];case 3:i=s.sent();sessionStorage.setItem("stzhComponents.v".concat(window.stzhComponents.version,".i18n.").concat(n),JSON.stringify(i));return[2,__assign(__assign({},i[t]||{}),{$globals:i.$globals,$locale:i.$code,$formats:i.$formats})];case 4:return[3,6];case 5:a=s.sent();console.error("Error loading locale: ".concat(n),a);return[3,6];case 6:return[2]}}))}))}var m=Object.freeze({__proto__:null,format:u,parse:d,formatSpan:l,parseSpan:c,createFormatParseAdapter:f,fetchTranslations:v});function _(){window.stzhComponents=Object.assign(Object.assign({defaultLocale:"de",labels:"fixed",pathMedia:"/",pathTranslations:"/",cacheTranslations:true,formats:{},translations:null},window.stzhComponents||{}),{version:o,supportedLocales:["de","en"],utils:m});if(window.stzhComponents.translations===null){window.stzhComponents.translationsLoading=v(document.documentElement).then((function(e){window.stzhComponents.translations=e})).catch((function(e){console.error("Translations couldn't load:",e)}))}a();s()}var g=e("g",_)}}}));
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r["throw"](e))}catch(e){i(e)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register([],(function(e){"use strict";return{execute:function(){var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,n,r){if(n)e(t.prototype,n);if(r)e(t,r);return t}}();function n(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}(function(){if(typeof window==="undefined"){return}var e=Array.prototype.slice;var r=Element.prototype.matches||Element.prototype.msMatchesSelector;var o=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(",");var i=function(){function i(e,t){n(this,i);this._inertManager=t;this._rootElement=e;this._managedNodes=new Set;if(this._rootElement.hasAttribute("aria-hidden")){this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden")}else{this._savedAriaHidden=null}this._rootElement.setAttribute("aria-hidden","true");this._makeSubtreeUnfocusable(this._rootElement);this._observer=new MutationObserver(this._onMutation.bind(this));this._observer.observe(this._rootElement,{attributes:true,childList:true,subtree:true})}t(i,[{key:"destructor",value:function e(){this._observer.disconnect();if(this._rootElement){if(this._savedAriaHidden!==null){this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden)}else{this._rootElement.removeAttribute("aria-hidden")}}this._managedNodes.forEach((function(e){this._unmanageNode(e.node)}),this);this._observer=null;this._rootElement=null;this._managedNodes=null;this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function e(t){var n=this;u(t,(function(e){return n._visitNode(e)}));var r=document.activeElement;if(!document.body.contains(t)){var o=t;var i=undefined;while(o){if(o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){i=o;break}o=o.parentNode}if(i){r=i.activeElement}}if(t.contains(r)){r.blur();if(r===document.activeElement){document.body.focus()}}}},{key:"_visitNode",value:function e(t){if(t.nodeType!==Node.ELEMENT_NODE){return}var n=t;if(n!==this._rootElement&&n.hasAttribute("inert")){this._adoptInertRoot(n)}if(r.call(n,o)||n.hasAttribute("tabindex")){this._manageNode(n)}}},{key:"_manageNode",value:function e(t){var n=this._inertManager.register(t,this);this._managedNodes.add(n)}},{key:"_unmanageNode",value:function e(t){var n=this._inertManager.deregister(t,this);if(n){this._managedNodes["delete"](n)}}},{key:"_unmanageSubtree",value:function e(t){var n=this;u(t,(function(e){return n._unmanageNode(e)}))}},{key:"_adoptInertRoot",value:function e(t){var n=this._inertManager.getInertRoot(t);if(!n){this._inertManager.setInert(t,true);n=this._inertManager.getInertRoot(t)}n.managedNodes.forEach((function(e){this._manageNode(e.node)}),this)}},{key:"_onMutation",value:function t(n,r){n.forEach((function(t){var n=t.target;if(t.type==="childList"){e.call(t.addedNodes).forEach((function(e){this._makeSubtreeUnfocusable(e)}),this);e.call(t.removedNodes).forEach((function(e){this._unmanageSubtree(e)}),this)}else if(t.type==="attributes"){if(t.attributeName==="tabindex"){this._manageNode(n)}else if(n!==this._rootElement&&t.attributeName==="inert"&&n.hasAttribute("inert")){this._adoptInertRoot(n);var r=this._inertManager.getInertRoot(n);this._managedNodes.forEach((function(e){if(n.contains(e.node)){r._manageNode(e.node)}}))}}}),this)}},{key:"managedNodes",get:function e(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function e(){return this._savedAriaHidden!==null}},{key:"savedAriaHidden",set:function e(t){this._savedAriaHidden=t},get:function e(){return this._savedAriaHidden}}]);return i}();var a=function(){function e(t,r){n(this,e);this._node=t;this._overrodeFocusMethod=false;this._inertRoots=new Set([r]);this._savedTabIndex=null;this._destroyed=false;this.ensureUntabbable()}t(e,[{key:"destructor",value:function e(){this._throwIfDestroyed();if(this._node&&this._node.nodeType===Node.ELEMENT_NODE){var t=this._node;if(this._savedTabIndex!==null){t.setAttribute("tabindex",this._savedTabIndex)}else{t.removeAttribute("tabindex")}if(this._overrodeFocusMethod){delete t.focus}}this._node=null;this._inertRoots=null;this._destroyed=true}},{key:"_throwIfDestroyed",value:function e(){if(this.destroyed){throw new Error("Trying to access destroyed InertNode")}}},{key:"ensureUntabbable",value:function e(){if(this.node.nodeType!==Node.ELEMENT_NODE){return}var t=this.node;if(r.call(t,o)){if(t.tabIndex===-1&&this.hasSavedTabIndex){return}if(t.hasAttribute("tabindex")){this._savedTabIndex=t.tabIndex}t.setAttribute("tabindex","-1");if(t.nodeType===Node.ELEMENT_NODE){t.focus=function(){};this._overrodeFocusMethod=true}}else if(t.hasAttribute("tabindex")){this._savedTabIndex=t.tabIndex;t.removeAttribute("tabindex")}}},{key:"addInertRoot",value:function e(t){this._throwIfDestroyed();this._inertRoots.add(t)}},{key:"removeInertRoot",value:function e(t){this._throwIfDestroyed();this._inertRoots["delete"](t);if(this._inertRoots.size===0){this.destructor()}}},{key:"destroyed",get:function e(){return this._destroyed}},{key:"hasSavedTabIndex",get:function e(){return this._savedTabIndex!==null}},{key:"node",get:function e(){this._throwIfDestroyed();return this._node}},{key:"savedTabIndex",set:function e(t){this._throwIfDestroyed();this._savedTabIndex=t},get:function e(){this._throwIfDestroyed();return this._savedTabIndex}}]);return e}();var s=function(){function o(e){n(this,o);if(!e){throw new Error("Missing required argument; InertManager needs to wrap a document.")}this._document=e;this._managedNodes=new Map;this._inertRoots=new Map;this._observer=new MutationObserver(this._watchForInert.bind(this));d(e.head||e.body||e.documentElement);if(e.readyState==="loading"){e.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this))}else{this._onDocumentLoaded()}}t(o,[{key:"setInert",value:function e(t,n){if(n){if(this._inertRoots.has(t)){return}var r=new i(t,this);t.setAttribute("inert","");this._inertRoots.set(t,r);if(!this._document.body.contains(t)){var o=t.parentNode;while(o){if(o.nodeType===11){d(o)}o=o.parentNode}}}else{if(!this._inertRoots.has(t)){return}var a=this._inertRoots.get(t);a.destructor();this._inertRoots["delete"](t);t.removeAttribute("inert")}}},{key:"getInertRoot",value:function e(t){return this._inertRoots.get(t)}},{key:"register",value:function e(t,n){var r=this._managedNodes.get(t);if(r!==undefined){r.addInertRoot(n)}else{r=new a(t,n)}this._managedNodes.set(t,r);return r}},{key:"deregister",value:function e(t,n){var r=this._managedNodes.get(t);if(!r){return null}r.removeInertRoot(n);if(r.destroyed){this._managedNodes["delete"](t)}return r}},{key:"_onDocumentLoaded",value:function t(){var n=e.call(this._document.querySelectorAll("[inert]"));n.forEach((function(e){this.setInert(e,true)}),this);this._observer.observe(this._document.body||this._document.documentElement,{attributes:true,subtree:true,childList:true})}},{key:"_watchForInert",value:function t(n,o){var i=this;n.forEach((function(t){switch(t.type){case"childList":e.call(t.addedNodes).forEach((function(t){if(t.nodeType!==Node.ELEMENT_NODE){return}var n=e.call(t.querySelectorAll("[inert]"));if(r.call(t,"[inert]")){n.unshift(t)}n.forEach((function(e){this.setInert(e,true)}),i)}),i);break;case"attributes":if(t.attributeName!=="inert"){return}var n=t.target;var o=n.hasAttribute("inert");i.setInert(n,o);break}}),this)}}]);return o}();function u(e,t,n){if(e.nodeType==Node.ELEMENT_NODE){var r=e;if(t){t(r)}var o=r.shadowRoot;if(o){u(o,t);return}if(r.localName=="content"){var i=r;var a=i.getDistributedNodes?i.getDistributedNodes():[];for(var s=0;s<a.length;s++){u(a[s],t)}return}if(r.localName=="slot"){var d=r;var l=d.assignedNodes?d.assignedNodes({flatten:true}):[];for(var c=0;c<l.length;c++){u(l[c],t)}return}}var f=e.firstChild;while(f!=null){u(f,t);f=f.nextSibling}}function d(e){if(e.querySelector("style#inert-style, link#inert-style")){return}var t=document.createElement("style");t.setAttribute("id","inert-style");t.textContent="\n"+"[inert] {\n"+" pointer-events: none;\n"+" cursor: default;\n"+"}\n"+"\n"+"[inert], [inert] * {\n"+" -webkit-user-select: none;\n"+" -moz-user-select: none;\n"+" -ms-user-select: none;\n"+" user-select: none;\n"+"}\n";e.appendChild(t)}if(!HTMLElement.prototype.hasOwnProperty("inert")){var l=new s(document);Object.defineProperty(HTMLElement.prototype,"inert",{enumerable:true,get:function e(){return this.hasAttribute("inert")},set:function e(t){l.setInert(this,t)}})}})();var r="@oiz/stzh-components";var o="2.12.0-beta2";var i=r.substring(r.indexOf("/")+1);function a(){window.addEventListener("appload",(function(e){var t=document.querySelector("[autofocus]");if(t&&e.detail.namespace===i&&t.tagName.toLowerCase().indexOf("stzh-")===0&&"setFocus"in t){t.setFocus()}}))}function s(){var e={threshold:1};var t=function(e){e.forEach((function(e){var t=0;if(e.intersectionRatio<1){t=window.innerWidth-document.body.clientWidth}document.documentElement.style.setProperty("--stzh-scrollbar-width",t+"px")}))};var n=new IntersectionObserver(t,e);n.observe(document.body)}function u(e,t){if(t===void 0){t="datetime"}if(!window.stzhComponents.translations){console.log("Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`");return}var n=window.stzhComponents.translations,r=n.$formats,o=n.$globals;var i=f(r,o);return i.format(e,t)}function d(e,t){if(t===void 0){t="datetime"}if(!window.stzhComponents.translations){console.log("Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`");return}var n=window.stzhComponents.translations,r=n.$formats,o=n.$globals;var i=f(r,o);return i.parse(e,t)}function l(e,t,n){if(n===void 0){n="datetime"}if(!window.stzhComponents.translations){console.log("Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`");return}var r=window.stzhComponents.translations,o=r.$formats,i=r.$globals;var a=f(o,i);return a.formatSpan(e,t,n)}function c(e,t){if(t===void 0){t="datetime"}if(!window.stzhComponents.translations){console.log("Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`");return}var n=window.stzhComponents.translations,r=n.$formats,o=n.$globals;var i=f(r,o);return i.parseSpan(e,t)}function f(e,t){var n=function(e,n){if(!n||!(n instanceof Date)||isNaN(n.getTime())){return""}var r=n.getDate().toString(10);var o=r;var i=(n.getMonth()+1).toString(10);var a=i;var s=n.getFullYear().toString(10);var u=n.getHours().toString(10);var d=u;var l=n.getMinutes().toString(10);var c=t.monthNames[n.getMonth()];var f=t.monthNamesShort[n.getMonth()];var h=t.dayNames[n.getDay()];if(n.getMonth()<9){a="0".concat(a)}if(n.getDate()<10){o="0".concat(o)}if(n.getHours()<10){d="0".concat(d)}if(n.getMinutes()<10){l="0".concat(l)}return e.replace(/\{j\}/g,r).replace(/\{d\}/g,o).replace(/\{l\}/g,h).replace(/\{n\}/g,i).replace(/\{m\}/g,a).replace(/\{F\}/g,c).replace(/\{M\}/g,f).replace(/\{Y\}/g,s).replace(/\{H\}/g,d).replace(/\{G\}/g,u).replace(/\{i\}/g,l)};var r=function(e,t){if(!t){return}var n=new RegExp(e);var r=t.match(n);if(r){var o=r.groups;var i=parseInt(o.Y||"",10);var a=parseInt(o.n||o.m||"",10);var s=parseInt(o.j||o.d||"",10);var u=parseInt(o.G||o.H||"",10);var d=parseInt(o.i||"",10);if(!isNaN(i)&&(i<1e3||i>9999)){return}if(!isNaN(a)&&(a<1||a>12)){return}if(!isNaN(s)&&(s<1||s>31)){return}if(!isNaN(u)&&(u<0||u>23)){return}if(!isNaN(d)&&(d<0||d>59)){return}var l=new Date(!isNaN(i)?i:null,!isNaN(a)?a-1:null,!isNaN(s)?s:null,!isNaN(u)?u:null,!isNaN(d)?d:null);if(l.getMonth()+1!==a){return}return l}};var o={format:function(t,r){var o;if(r===void 0){r="datetime"}var i=__assign(__assign({},e[r]),((o=window.stzhComponents)===null||o===void 0?void 0:o.formats[r])||{});if(typeof i.format==="string"){return n(i.format,t)}else{return i.format(t)}},parse:function(t,n){var o;if(n===void 0){n="datetime"}var i=__assign(__assign({},e[n]),((o=window.stzhComponents)===null||o===void 0?void 0:o.formats[n])||{});if(typeof i.parse==="string"){return r(i.parse,t)}else{return i.parse(t)}},formatSpan:function(e,n,r){if(r===void 0){r="datetime"}var o=e;var i=n;if(e instanceof Date){o=this.format(e,r)}if(n instanceof Date){i=this.format(n,r)}var a=t.dateRange;if(r.startsWith("time")){a=t.timeRange}return"".concat(o).concat(a).concat(i)},parseSpan:function(e,n){var r=t.dateRange;if(n.startsWith("time")){r=t.timeRange}var o=e.split(r);var i=this.parse(o[0],n);var a=this.parse(o[1],n);return[i,a,r]}};return o}function h(e){var t=e.closest("[lang]");var n=t&&t.lang.split("-")[0];if(window.stzhComponents.supportedLocales.indexOf(n)===-1||!n){return window.stzhComponents.defaultLocale}else{return n}}function v(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,o,i,a;return __generator(this,(function(s){switch(s.label){case 0:n=h(e);r=JSON.parse(sessionStorage.getItem("stzhComponents.v".concat(window.stzhComponents.version,".i18n.").concat(n)));if(window.stzhComponents.cacheTranslations&&window.stzhComponents.version.match(/-dev-snapshot/i)===null&&r&&Object.keys(r).length>0){return[2,__assign(__assign({},r[t]||{}),{$globals:r.$globals,$locale:r.$code,$formats:r.$formats,$formatsIso:r.$formatsIso,$formatsLegacy:r.$formatsLegacy})]}s.label=1;case 1:s.trys.push([1,5,,6]);return[4,fetch("".concat(window.stzhComponents.pathTranslations,"/").concat(n,".json"))];case 2:o=s.sent();if(!o.ok)return[3,4];return[4,o.json()];case 3:i=s.sent();sessionStorage.setItem("stzhComponents.v".concat(window.stzhComponents.version,".i18n.").concat(n),JSON.stringify(i));return[2,__assign(__assign({},i[t]||{}),{$globals:i.$globals,$locale:i.$code,$formats:i.$formats,$formatsIso:i.$formatsIso,$formatsLegacy:i.$formatsLegacy})];case 4:return[3,6];case 5:a=s.sent();console.error("Error loading locale: ".concat(n),a);return[3,6];case 6:return[2]}}))}))}var m=Object.freeze({__proto__:null,format:u,parse:d,formatSpan:l,parseSpan:c,createFormatParseAdapter:f,fetchTranslations:v});function g(){window.stzhComponents=Object.assign(Object.assign({defaultLocale:"de",labels:"fixed",pathMedia:"/",pathTranslations:"/",cacheTranslations:true,formats:{},translations:null},window.stzhComponents||{}),{version:o,supportedLocales:["de","en"],utils:m});if(window.stzhComponents.translations===null){window.stzhComponents.translationsLoading=v(document.documentElement).then((function(e){window.stzhComponents.translations=e})).catch((function(e){console.error("Translations couldn't load:",e)}))}a();s()}var _=e("g",g)}}}));
|
|
2
|
+
//# sourceMappingURL=p-6233fc4f.system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","Constructor","protoProps","staticProps","prototype","_classCallCheck","instance","TypeError","window","slice","Array","matches","Element","msMatchesSelector","_focusableElementsString","join","InertRoot","rootElement","inertManager","this","_inertManager","_rootElement","_managedNodes","Set","hasAttribute","_savedAriaHidden","getAttribute","setAttribute","_makeSubtreeUnfocusable","_observer","MutationObserver","_onMutation","bind","observe","attributes","childList","subtree","value","destructor","disconnect","removeAttribute","forEach","inertNode","_unmanageNode","node","startNode","_this2","composedTreeWalk","_visitNode","activeElement","document","body","contains","root","undefined","nodeType","Node","DOCUMENT_FRAGMENT_NODE","parentNode","blur","focus","ELEMENT_NODE","element","_adoptInertRoot","call","_manageNode","register","add","deregister","_unmanageSubtree","_this3","inertSubroot","getInertRoot","setInert","managedNodes","savedInertNode","records","self","record","type","addedNodes","removedNodes","attributeName","managedNode","get","set","ariaHidden","InertNode","inertRoot","_node","_overrodeFocusMethod","_inertRoots","_savedTabIndex","_destroyed","ensureUntabbable","_throwIfDestroyed","destroyed","Error","tabIndex","hasSavedTabIndex","addInertRoot","removeInertRoot","size","InertManager","_document","Map","_watchForInert","addInertStyle","head","documentElement","readyState","addEventListener","_onDocumentLoaded","inert","has","parent","_inertRoot","inertElements","querySelectorAll","inertElement","_this","unshift","callback","shadowRootAncestor","shadowRoot","localName","content","distributedNodes","getDistributedNodes","slot","_distributedNodes","assignedNodes","flatten","_i","child","firstChild","nextSibling","querySelector","style","createElement","textContent","appendChild","HTMLElement","hasOwnProperty","packageName","packageNameScoped","substring","indexOf","applyAutofocus","event","autofocus","detail","namespace","tagName","toLowerCase","setFocus","observeScrollbarWidth","config","threshold","handleIntersect","entries","entry","scrollbarWidth","intersectionRatio","innerWidth","clientWidth","setProperty","bodyScrollObserver","IntersectionObserver","format","date","stzhComponents","translations","console","log","_a","$formats","$globals","adapter","createFormatParseAdapter","parse","string","formatSpan","date2","parseSpan","formats","globals","globalFormatter","Date","isNaN","getTime","j","getDate","toString","d","n","getMonth","m","yC","getFullYear","gC","getHours","hC","getMinutes","fC","monthNames","mC","monthNamesShort","l","dayNames","getDay","concat","replace","globalParser","input","regex","RegExp","match","groups","year","parseInt","Y","month","day","hours","G","H","minutes","globalAdapter","dateFormats","__assign","formattedDate","formattedDate2","range","dateRange","startsWith","timeRange","dates","split","getLocale","closestElement","closest","locale","lang","supportedLocales","defaultLocale","fetchTranslations","host","component","existingTranslations","JSON","sessionStorage","getItem","version","cacheTranslations","keys","$locale","$code","$formatsIso","$formatsLegacy","fetch","pathTranslations","result","sent","ok","json","data","setItem","stringify","error","exception_1","appGlobalScript","assign","labels","pathMedia","utils","translationsLoading","then","catch","reason","globalScripts","exports"],"sources":["node_modules/wicg-inert/dist/inert.esm.js","src/global/js/helpers/autofocus.js","src/global/js/helpers/scrollbar-width.js","src/global/js/helpers/utils.js","src/global/js/script.js","@stencil/core/internal/app-globals"],"sourcesContent":["var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * This work is licensed under the W3C Software and Document License\n * (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).\n */\n\n(function () {\n // Return early if we're not running inside of the browser.\n if (typeof window === 'undefined') {\n return;\n }\n\n // Convenience function for converting NodeLists.\n /** @type {typeof Array.prototype.slice} */\n var slice = Array.prototype.slice;\n\n /**\n * IE has a non-standard name for \"matches\".\n * @type {typeof Element.prototype.matches}\n */\n var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;\n\n /** @type {string} */\n var _focusableElementsString = ['a[href]', 'area[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'details', 'summary', 'iframe', 'object', 'embed', '[contenteditable]'].join(',');\n\n /**\n * `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert`\n * attribute.\n *\n * Its main functions are:\n *\n * - to create and maintain a set of managed `InertNode`s, including when mutations occur in the\n * subtree. The `makeSubtreeUnfocusable()` method handles collecting `InertNode`s via registering\n * each focusable node in the subtree with the singleton `InertManager` which manages all known\n * focusable nodes within inert subtrees. `InertManager` ensures that a single `InertNode`\n * instance exists for each focusable node which has at least one inert root as an ancestor.\n *\n * - to notify all managed `InertNode`s when this subtree stops being inert (i.e. when the `inert`\n * attribute is removed from the root node). This is handled in the destructor, which calls the\n * `deregister` method on `InertManager` for each managed inert node.\n */\n\n var InertRoot = function () {\n /**\n * @param {!HTMLElement} rootElement The HTMLElement at the root of the inert subtree.\n * @param {!InertManager} inertManager The global singleton InertManager object.\n */\n function InertRoot(rootElement, inertManager) {\n _classCallCheck(this, InertRoot);\n\n /** @type {!InertManager} */\n this._inertManager = inertManager;\n\n /** @type {!HTMLElement} */\n this._rootElement = rootElement;\n\n /**\n * @type {!Set<!InertNode>}\n * All managed focusable nodes in this InertRoot's subtree.\n */\n this._managedNodes = new Set();\n\n // Make the subtree hidden from assistive technology\n if (this._rootElement.hasAttribute('aria-hidden')) {\n /** @type {?string} */\n this._savedAriaHidden = this._rootElement.getAttribute('aria-hidden');\n } else {\n this._savedAriaHidden = null;\n }\n this._rootElement.setAttribute('aria-hidden', 'true');\n\n // Make all focusable elements in the subtree unfocusable and add them to _managedNodes\n this._makeSubtreeUnfocusable(this._rootElement);\n\n // Watch for:\n // - any additions in the subtree: make them unfocusable too\n // - any removals from the subtree: remove them from this inert root's managed nodes\n // - attribute changes: if `tabindex` is added, or removed from an intrinsically focusable\n // element, make that node a managed node.\n this._observer = new MutationObserver(this._onMutation.bind(this));\n this._observer.observe(this._rootElement, { attributes: true, childList: true, subtree: true });\n }\n\n /**\n * Call this whenever this object is about to become obsolete. This unwinds all of the state\n * stored in this object and updates the state of all of the managed nodes.\n */\n\n\n _createClass(InertRoot, [{\n key: 'destructor',\n value: function destructor() {\n this._observer.disconnect();\n\n if (this._rootElement) {\n if (this._savedAriaHidden !== null) {\n this._rootElement.setAttribute('aria-hidden', this._savedAriaHidden);\n } else {\n this._rootElement.removeAttribute('aria-hidden');\n }\n }\n\n this._managedNodes.forEach(function (inertNode) {\n this._unmanageNode(inertNode.node);\n }, this);\n\n // Note we cast the nulls to the ANY type here because:\n // 1) We want the class properties to be declared as non-null, or else we\n // need even more casts throughout this code. All bets are off if an\n // instance has been destroyed and a method is called.\n // 2) We don't want to cast \"this\", because we want type-aware optimizations\n // to know which properties we're setting.\n this._observer = /** @type {?} */null;\n this._rootElement = /** @type {?} */null;\n this._managedNodes = /** @type {?} */null;\n this._inertManager = /** @type {?} */null;\n }\n\n /**\n * @return {!Set<!InertNode>} A copy of this InertRoot's managed nodes set.\n */\n\n }, {\n key: '_makeSubtreeUnfocusable',\n\n\n /**\n * @param {!Node} startNode\n */\n value: function _makeSubtreeUnfocusable(startNode) {\n var _this2 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this2._visitNode(node);\n });\n\n var activeElement = document.activeElement;\n\n if (!document.body.contains(startNode)) {\n // startNode may be in shadow DOM, so find its nearest shadowRoot to get the activeElement.\n var node = startNode;\n /** @type {!ShadowRoot|undefined} */\n var root = undefined;\n while (node) {\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n root = /** @type {!ShadowRoot} */node;\n break;\n }\n node = node.parentNode;\n }\n if (root) {\n activeElement = root.activeElement;\n }\n }\n if (startNode.contains(activeElement)) {\n activeElement.blur();\n // In IE11, if an element is already focused, and then set to tabindex=-1\n // calling blur() will not actually move the focus.\n // To work around this we call focus() on the body instead.\n if (activeElement === document.activeElement) {\n document.body.focus();\n }\n }\n }\n\n /**\n * @param {!Node} node\n */\n\n }, {\n key: '_visitNode',\n value: function _visitNode(node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var element = /** @type {!HTMLElement} */node;\n\n // If a descendant inert root becomes un-inert, its descendants will still be inert because of\n // this inert root, so all of its managed nodes need to be adopted by this InertRoot.\n if (element !== this._rootElement && element.hasAttribute('inert')) {\n this._adoptInertRoot(element);\n }\n\n if (matches.call(element, _focusableElementsString) || element.hasAttribute('tabindex')) {\n this._manageNode(element);\n }\n }\n\n /**\n * Register the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n\n }, {\n key: '_manageNode',\n value: function _manageNode(node) {\n var inertNode = this._inertManager.register(node, this);\n this._managedNodes.add(inertNode);\n }\n\n /**\n * Unregister the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n\n }, {\n key: '_unmanageNode',\n value: function _unmanageNode(node) {\n var inertNode = this._inertManager.deregister(node, this);\n if (inertNode) {\n this._managedNodes['delete'](inertNode);\n }\n }\n\n /**\n * Unregister the entire subtree starting at `startNode`.\n * @param {!Node} startNode\n */\n\n }, {\n key: '_unmanageSubtree',\n value: function _unmanageSubtree(startNode) {\n var _this3 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this3._unmanageNode(node);\n });\n }\n\n /**\n * If a descendant node is found with an `inert` attribute, adopt its managed nodes.\n * @param {!HTMLElement} node\n */\n\n }, {\n key: '_adoptInertRoot',\n value: function _adoptInertRoot(node) {\n var inertSubroot = this._inertManager.getInertRoot(node);\n\n // During initialisation this inert root may not have been registered yet,\n // so register it now if need be.\n if (!inertSubroot) {\n this._inertManager.setInert(node, true);\n inertSubroot = this._inertManager.getInertRoot(node);\n }\n\n inertSubroot.managedNodes.forEach(function (savedInertNode) {\n this._manageNode(savedInertNode.node);\n }, this);\n }\n\n /**\n * Callback used when mutation observer detects subtree additions, removals, or attribute changes.\n * @param {!Array<!MutationRecord>} records\n * @param {!MutationObserver} self\n */\n\n }, {\n key: '_onMutation',\n value: function _onMutation(records, self) {\n records.forEach(function (record) {\n var target = /** @type {!HTMLElement} */record.target;\n if (record.type === 'childList') {\n // Manage added nodes\n slice.call(record.addedNodes).forEach(function (node) {\n this._makeSubtreeUnfocusable(node);\n }, this);\n\n // Un-manage removed nodes\n slice.call(record.removedNodes).forEach(function (node) {\n this._unmanageSubtree(node);\n }, this);\n } else if (record.type === 'attributes') {\n if (record.attributeName === 'tabindex') {\n // Re-initialise inert node if tabindex changes\n this._manageNode(target);\n } else if (target !== this._rootElement && record.attributeName === 'inert' && target.hasAttribute('inert')) {\n // If a new inert root is added, adopt its managed nodes and make sure it knows about the\n // already managed nodes from this inert subroot.\n this._adoptInertRoot(target);\n var inertSubroot = this._inertManager.getInertRoot(target);\n this._managedNodes.forEach(function (managedNode) {\n if (target.contains(managedNode.node)) {\n inertSubroot._manageNode(managedNode.node);\n }\n });\n }\n }\n }, this);\n }\n }, {\n key: 'managedNodes',\n get: function get() {\n return new Set(this._managedNodes);\n }\n\n /** @return {boolean} */\n\n }, {\n key: 'hasSavedAriaHidden',\n get: function get() {\n return this._savedAriaHidden !== null;\n }\n\n /** @param {?string} ariaHidden */\n\n }, {\n key: 'savedAriaHidden',\n set: function set(ariaHidden) {\n this._savedAriaHidden = ariaHidden;\n }\n\n /** @return {?string} */\n ,\n get: function get() {\n return this._savedAriaHidden;\n }\n }]);\n\n return InertRoot;\n }();\n\n /**\n * `InertNode` initialises and manages a single inert node.\n * A node is inert if it is a descendant of one or more inert root elements.\n *\n * On construction, `InertNode` saves the existing `tabindex` value for the node, if any, and\n * either removes the `tabindex` attribute or sets it to `-1`, depending on whether the element\n * is intrinsically focusable or not.\n *\n * `InertNode` maintains a set of `InertRoot`s which are descendants of this `InertNode`. When an\n * `InertRoot` is destroyed, and calls `InertManager.deregister()`, the `InertManager` notifies the\n * `InertNode` via `removeInertRoot()`, which in turn destroys the `InertNode` if no `InertRoot`s\n * remain in the set. On destruction, `InertNode` reinstates the stored `tabindex` if one exists,\n * or removes the `tabindex` attribute if the element is intrinsically focusable.\n */\n\n\n var InertNode = function () {\n /**\n * @param {!Node} node A focusable element to be made inert.\n * @param {!InertRoot} inertRoot The inert root element associated with this inert node.\n */\n function InertNode(node, inertRoot) {\n _classCallCheck(this, InertNode);\n\n /** @type {!Node} */\n this._node = node;\n\n /** @type {boolean} */\n this._overrodeFocusMethod = false;\n\n /**\n * @type {!Set<!InertRoot>} The set of descendant inert roots.\n * If and only if this set becomes empty, this node is no longer inert.\n */\n this._inertRoots = new Set([inertRoot]);\n\n /** @type {?number} */\n this._savedTabIndex = null;\n\n /** @type {boolean} */\n this._destroyed = false;\n\n // Save any prior tabindex info and make this node untabbable\n this.ensureUntabbable();\n }\n\n /**\n * Call this whenever this object is about to become obsolete.\n * This makes the managed node focusable again and deletes all of the previously stored state.\n */\n\n\n _createClass(InertNode, [{\n key: 'destructor',\n value: function destructor() {\n this._throwIfDestroyed();\n\n if (this._node && this._node.nodeType === Node.ELEMENT_NODE) {\n var element = /** @type {!HTMLElement} */this._node;\n if (this._savedTabIndex !== null) {\n element.setAttribute('tabindex', this._savedTabIndex);\n } else {\n element.removeAttribute('tabindex');\n }\n\n // Use `delete` to restore native focus method.\n if (this._overrodeFocusMethod) {\n delete element.focus;\n }\n }\n\n // See note in InertRoot.destructor for why we cast these nulls to ANY.\n this._node = /** @type {?} */null;\n this._inertRoots = /** @type {?} */null;\n this._destroyed = true;\n }\n\n /**\n * @type {boolean} Whether this object is obsolete because the managed node is no longer inert.\n * If the object has been destroyed, any attempt to access it will cause an exception.\n */\n\n }, {\n key: '_throwIfDestroyed',\n\n\n /**\n * Throw if user tries to access destroyed InertNode.\n */\n value: function _throwIfDestroyed() {\n if (this.destroyed) {\n throw new Error('Trying to access destroyed InertNode');\n }\n }\n\n /** @return {boolean} */\n\n }, {\n key: 'ensureUntabbable',\n\n\n /** Save the existing tabindex value and make the node untabbable and unfocusable */\n value: function ensureUntabbable() {\n if (this.node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var element = /** @type {!HTMLElement} */this.node;\n if (matches.call(element, _focusableElementsString)) {\n if ( /** @type {!HTMLElement} */element.tabIndex === -1 && this.hasSavedTabIndex) {\n return;\n }\n\n if (element.hasAttribute('tabindex')) {\n this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;\n }\n element.setAttribute('tabindex', '-1');\n if (element.nodeType === Node.ELEMENT_NODE) {\n element.focus = function () {};\n this._overrodeFocusMethod = true;\n }\n } else if (element.hasAttribute('tabindex')) {\n this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;\n element.removeAttribute('tabindex');\n }\n }\n\n /**\n * Add another inert root to this inert node's set of managing inert roots.\n * @param {!InertRoot} inertRoot\n */\n\n }, {\n key: 'addInertRoot',\n value: function addInertRoot(inertRoot) {\n this._throwIfDestroyed();\n this._inertRoots.add(inertRoot);\n }\n\n /**\n * Remove the given inert root from this inert node's set of managing inert roots.\n * If the set of managing inert roots becomes empty, this node is no longer inert,\n * so the object should be destroyed.\n * @param {!InertRoot} inertRoot\n */\n\n }, {\n key: 'removeInertRoot',\n value: function removeInertRoot(inertRoot) {\n this._throwIfDestroyed();\n this._inertRoots['delete'](inertRoot);\n if (this._inertRoots.size === 0) {\n this.destructor();\n }\n }\n }, {\n key: 'destroyed',\n get: function get() {\n return (/** @type {!InertNode} */this._destroyed\n );\n }\n }, {\n key: 'hasSavedTabIndex',\n get: function get() {\n return this._savedTabIndex !== null;\n }\n\n /** @return {!Node} */\n\n }, {\n key: 'node',\n get: function get() {\n this._throwIfDestroyed();\n return this._node;\n }\n\n /** @param {?number} tabIndex */\n\n }, {\n key: 'savedTabIndex',\n set: function set(tabIndex) {\n this._throwIfDestroyed();\n this._savedTabIndex = tabIndex;\n }\n\n /** @return {?number} */\n ,\n get: function get() {\n this._throwIfDestroyed();\n return this._savedTabIndex;\n }\n }]);\n\n return InertNode;\n }();\n\n /**\n * InertManager is a per-document singleton object which manages all inert roots and nodes.\n *\n * When an element becomes an inert root by having an `inert` attribute set and/or its `inert`\n * property set to `true`, the `setInert` method creates an `InertRoot` object for the element.\n * The `InertRoot` in turn registers itself as managing all of the element's focusable descendant\n * nodes via the `register()` method. The `InertManager` ensures that a single `InertNode` instance\n * is created for each such node, via the `_managedNodes` map.\n */\n\n\n var InertManager = function () {\n /**\n * @param {!Document} document\n */\n function InertManager(document) {\n _classCallCheck(this, InertManager);\n\n if (!document) {\n throw new Error('Missing required argument; InertManager needs to wrap a document.');\n }\n\n /** @type {!Document} */\n this._document = document;\n\n /**\n * All managed nodes known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map<!Node, !InertNode>}\n */\n this._managedNodes = new Map();\n\n /**\n * All inert roots known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map<!Node, !InertRoot>}\n */\n this._inertRoots = new Map();\n\n /**\n * Observer for mutations on `document.body`.\n * @type {!MutationObserver}\n */\n this._observer = new MutationObserver(this._watchForInert.bind(this));\n\n // Add inert style.\n addInertStyle(document.head || document.body || document.documentElement);\n\n // Wait for document to be loaded.\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', this._onDocumentLoaded.bind(this));\n } else {\n this._onDocumentLoaded();\n }\n }\n\n /**\n * Set whether the given element should be an inert root or not.\n * @param {!HTMLElement} root\n * @param {boolean} inert\n */\n\n\n _createClass(InertManager, [{\n key: 'setInert',\n value: function setInert(root, inert) {\n if (inert) {\n if (this._inertRoots.has(root)) {\n // element is already inert\n return;\n }\n\n var inertRoot = new InertRoot(root, this);\n root.setAttribute('inert', '');\n this._inertRoots.set(root, inertRoot);\n // If not contained in the document, it must be in a shadowRoot.\n // Ensure inert styles are added there.\n if (!this._document.body.contains(root)) {\n var parent = root.parentNode;\n while (parent) {\n if (parent.nodeType === 11) {\n addInertStyle(parent);\n }\n parent = parent.parentNode;\n }\n }\n } else {\n if (!this._inertRoots.has(root)) {\n // element is already non-inert\n return;\n }\n\n var _inertRoot = this._inertRoots.get(root);\n _inertRoot.destructor();\n this._inertRoots['delete'](root);\n root.removeAttribute('inert');\n }\n }\n\n /**\n * Get the InertRoot object corresponding to the given inert root element, if any.\n * @param {!Node} element\n * @return {!InertRoot|undefined}\n */\n\n }, {\n key: 'getInertRoot',\n value: function getInertRoot(element) {\n return this._inertRoots.get(element);\n }\n\n /**\n * Register the given InertRoot as managing the given node.\n * In the case where the node has a previously existing inert root, this inert root will\n * be added to its set of inert roots.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {!InertNode} inertNode\n */\n\n }, {\n key: 'register',\n value: function register(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n if (inertNode !== undefined) {\n // node was already in an inert subtree\n inertNode.addInertRoot(inertRoot);\n } else {\n inertNode = new InertNode(node, inertRoot);\n }\n\n this._managedNodes.set(node, inertNode);\n\n return inertNode;\n }\n\n /**\n * De-register the given InertRoot as managing the given inert node.\n * Removes the inert root from the InertNode's set of managing inert roots, and remove the inert\n * node from the InertManager's set of managed nodes if it is destroyed.\n * If the node is not currently managed, this is essentially a no-op.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {?InertNode} The potentially destroyed InertNode associated with this node, if any.\n */\n\n }, {\n key: 'deregister',\n value: function deregister(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n if (!inertNode) {\n return null;\n }\n\n inertNode.removeInertRoot(inertRoot);\n if (inertNode.destroyed) {\n this._managedNodes['delete'](node);\n }\n\n return inertNode;\n }\n\n /**\n * Callback used when document has finished loading.\n */\n\n }, {\n key: '_onDocumentLoaded',\n value: function _onDocumentLoaded() {\n // Find all inert roots in document and make them actually inert.\n var inertElements = slice.call(this._document.querySelectorAll('[inert]'));\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, this);\n\n // Comment this out to use programmatic API only.\n this._observer.observe(this._document.body || this._document.documentElement, { attributes: true, subtree: true, childList: true });\n }\n\n /**\n * Callback used when mutation observer detects attribute changes.\n * @param {!Array<!MutationRecord>} records\n * @param {!MutationObserver} self\n */\n\n }, {\n key: '_watchForInert',\n value: function _watchForInert(records, self) {\n var _this = this;\n records.forEach(function (record) {\n switch (record.type) {\n case 'childList':\n slice.call(record.addedNodes).forEach(function (node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var inertElements = slice.call(node.querySelectorAll('[inert]'));\n if (matches.call(node, '[inert]')) {\n inertElements.unshift(node);\n }\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, _this);\n }, _this);\n break;\n case 'attributes':\n if (record.attributeName !== 'inert') {\n return;\n }\n var target = /** @type {!HTMLElement} */record.target;\n var inert = target.hasAttribute('inert');\n _this.setInert(target, inert);\n break;\n }\n }, this);\n }\n }]);\n\n return InertManager;\n }();\n\n /**\n * Recursively walk the composed tree from |node|.\n * @param {!Node} node\n * @param {(function (!HTMLElement))=} callback Callback to be called for each element traversed,\n * before descending into child nodes.\n * @param {?ShadowRoot=} shadowRootAncestor The nearest ShadowRoot ancestor, if any.\n */\n\n\n function composedTreeWalk(node, callback, shadowRootAncestor) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n var element = /** @type {!HTMLElement} */node;\n if (callback) {\n callback(element);\n }\n\n // Descend into node:\n // If it has a ShadowRoot, ignore all child elements - these will be picked\n // up by the <content> or <shadow> elements. Descend straight into the\n // ShadowRoot.\n var shadowRoot = /** @type {!HTMLElement} */element.shadowRoot;\n if (shadowRoot) {\n composedTreeWalk(shadowRoot, callback, shadowRoot);\n return;\n }\n\n // If it is a <content> element, descend into distributed elements - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n if (element.localName == 'content') {\n var content = /** @type {!HTMLContentElement} */element;\n // Verifies if ShadowDom v0 is supported.\n var distributedNodes = content.getDistributedNodes ? content.getDistributedNodes() : [];\n for (var i = 0; i < distributedNodes.length; i++) {\n composedTreeWalk(distributedNodes[i], callback, shadowRootAncestor);\n }\n return;\n }\n\n // If it is a <slot> element, descend into assigned nodes - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n if (element.localName == 'slot') {\n var slot = /** @type {!HTMLSlotElement} */element;\n // Verify if ShadowDom v1 is supported.\n var _distributedNodes = slot.assignedNodes ? slot.assignedNodes({ flatten: true }) : [];\n for (var _i = 0; _i < _distributedNodes.length; _i++) {\n composedTreeWalk(_distributedNodes[_i], callback, shadowRootAncestor);\n }\n return;\n }\n }\n\n // If it is neither the parent of a ShadowRoot, a <content> element, a <slot>\n // element, nor a <shadow> element recurse normally.\n var child = node.firstChild;\n while (child != null) {\n composedTreeWalk(child, callback, shadowRootAncestor);\n child = child.nextSibling;\n }\n }\n\n /**\n * Adds a style element to the node containing the inert specific styles\n * @param {!Node} node\n */\n function addInertStyle(node) {\n if (node.querySelector('style#inert-style, link#inert-style')) {\n return;\n }\n var style = document.createElement('style');\n style.setAttribute('id', 'inert-style');\n style.textContent = '\\n' + '[inert] {\\n' + ' pointer-events: none;\\n' + ' cursor: default;\\n' + '}\\n' + '\\n' + '[inert], [inert] * {\\n' + ' -webkit-user-select: none;\\n' + ' -moz-user-select: none;\\n' + ' -ms-user-select: none;\\n' + ' user-select: none;\\n' + '}\\n';\n node.appendChild(style);\n }\n\n if (!HTMLElement.prototype.hasOwnProperty('inert')) {\n /** @type {!InertManager} */\n var inertManager = new InertManager(document);\n\n Object.defineProperty(HTMLElement.prototype, 'inert', {\n enumerable: true,\n /** @this {!HTMLElement} */\n get: function get() {\n return this.hasAttribute('inert');\n },\n /** @this {!HTMLElement} */\n set: function set(inert) {\n inertManager.setInert(this, inert);\n }\n });\n }\n})();\n","import { name as packageNameScoped } from '../../../../package.json';\n\nconst packageName = packageNameScoped.substring(packageNameScoped.indexOf('/')+1);\n\n/**\n * Execute setFocus method if it exists\n * on stzh-element with autofocus on pageload\n * when (child components are loaded)\n */\nexport function applyAutofocus() {\n window.addEventListener('appload', (event) => {\n const autofocus = document.querySelector('[autofocus]');\n\n if (autofocus\n && event.detail.namespace === packageName\n && autofocus.tagName.toLowerCase().indexOf('stzh-') === 0\n && 'setFocus' in autofocus\n ) {\n autofocus.setFocus();\n }\n });\n}\n","export function observeScrollbarWidth() {\n const config = {\n threshold: 1.0\n };\n\n const handleIntersect = (entries) => {\n entries.forEach(entry => {\n let scrollbarWidth = 0;\n\n if (entry.intersectionRatio < 1) {\n scrollbarWidth = window.innerWidth - document.body.clientWidth;\n }\n\n document.documentElement.style.setProperty('--stzh-scrollbar-width', scrollbarWidth + 'px');\n });\n };\n\n const bodyScrollObserver = new IntersectionObserver(handleIntersect, config);\n bodyScrollObserver.observe(document.body);\n}\n","\nexport function format(date, type = \"datetime\") {\n if (!window.stzhComponents.translations) {\n console.log(\"Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`\");\n return;\n }\n\n const { $formats, $globals } = window.stzhComponents.translations;\n const adapter = createFormatParseAdapter($formats, $globals);\n return adapter.format(date, type);\n}\n\nexport function parse(string, type = \"datetime\") {\n if (!window.stzhComponents.translations) {\n console.log(\"Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`\");\n return;\n }\n\n const { $formats, $globals } = window.stzhComponents.translations;\n const adapter = createFormatParseAdapter($formats, $globals);\n return adapter.parse(string, type);\n}\n\nexport function formatSpan(date, date2, type = \"datetime\") {\n if (!window.stzhComponents.translations) {\n console.log(\"Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`\");\n return;\n }\n\n const { $formats, $globals } = window.stzhComponents.translations;\n const adapter = createFormatParseAdapter($formats, $globals);\n return adapter.formatSpan(date, date2, type);\n}\n\nexport function parseSpan(string, type = \"datetime\") {\n if (!window.stzhComponents.translations) {\n console.log(\"Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`\");\n return;\n }\n\n const { $formats, $globals } = window.stzhComponents.translations;\n const adapter = createFormatParseAdapter($formats, $globals);\n return adapter.parseSpan(string, type);\n}\n\nexport function createFormatParseAdapter(formats, globals) {\n // format letters from https://www.php.net/manual/de/datetime.format.php\n const globalFormatter = function (format, date) {\n if (!date || !(date instanceof Date) || isNaN(date.getTime())) {\n return \"\";\n }\n\n let j = date.getDate().toString(10);\n let d = j;\n let n = (date.getMonth() + 1).toString(10);\n let m = n;\n let yC = date.getFullYear().toString(10);\n let gC = date.getHours().toString(10);\n let hC = gC;\n let i = date.getMinutes().toString(10);\n\n // full textual representation of a month\n let fC = globals.monthNames[date.getMonth()];\n // short textual representation of a month\n let mC = globals.monthNamesShort[date.getMonth()];\n // full textual representation of the day\n let l = globals.dayNames[date.getDay()];\n\n // months *are* zero-indexed, pad if less than 9!\n if (date.getMonth() < 9) {\n m = `0${m}`;\n }\n\n if (date.getDate() < 10) {\n d = `0${d}`;\n }\n\n if (date.getHours() < 10) {\n hC = `0${hC}`;\n }\n\n if (date.getMinutes() < 10) {\n i = `0${i}`;\n }\n\n return format\n .replace(/\\{j\\}/g, j)\n .replace(/\\{d\\}/g, d)\n .replace(/\\{l\\}/g, l)\n .replace(/\\{n\\}/g, n)\n .replace(/\\{m\\}/g, m)\n .replace(/\\{F\\}/g, fC)\n .replace(/\\{M\\}/g, mC)\n .replace(/\\{Y\\}/g, yC)\n .replace(/\\{H\\}/g, hC)\n .replace(/\\{G\\}/g, gC)\n .replace(/\\{i\\}/g, i);\n }\n\n const globalParser = function (parse, input) {\n if (!input) {\n return;\n }\n\n const regex = new RegExp(parse);\n const match = input.match(regex);\n\n if (match) {\n const { groups } = match;\n\n const year = parseInt(groups.Y || '', 10);\n const month = parseInt(groups.n || groups.m || '', 10);\n const day = parseInt(groups.j || groups.d || '', 10);\n const hours = parseInt(groups.G || groups.H || '', 10);\n const minutes = parseInt(groups.i || '', 10);\n\n if (!isNaN(year) && (year < 1000 || year > 9999)) {\n return;\n }\n\n if (!isNaN(month) && (month < 1 || month > 12)) {\n return;\n }\n\n // we check day later again (if month changed, it was out of range)\n if (!isNaN(day) && (day < 1 || day > 31)) {\n return;\n }\n\n if (!isNaN(hours) && (hours < 0 || hours > 23)) {\n return;\n }\n\n if (!isNaN(minutes) && (minutes < 0 || minutes > 59)) {\n return;\n }\n\n const date = new Date(\n !isNaN(year) ? year : null,\n !isNaN(month) ? month - 1 : null,\n !isNaN(day) ? day : null,\n !isNaN(hours) ? hours : null,\n !isNaN(minutes) ? minutes : null\n );\n\n // if day was out of possible range (1 - 28/29/30/31)\n // we find out by check if month has changed\n if (date.getMonth() + 1 !== month) {\n return;\n }\n\n return date;\n }\n }\n\n const globalAdapter = {\n format: function (date, type = \"datetime\") {\n const dateFormats = {\n ...formats[type],\n ...window.stzhComponents?.formats[type] || {}\n };\n\n if (typeof dateFormats.format === \"string\") {\n return globalFormatter(dateFormats.format, date);\n } else {\n return dateFormats.format(date);\n }\n },\n parse: function (input, type = \"datetime\") {\n const dateFormats = {\n ...formats[type],\n ...window.stzhComponents?.formats[type] || {}\n };\n\n if (typeof dateFormats.parse === \"string\") {\n return globalParser(dateFormats.parse, input);\n } else {\n return dateFormats.parse(input);\n }\n },\n formatSpan: function(date, date2, type = \"datetime\") {\n let formattedDate = date;\n let formattedDate2 = date2;\n\n if (date instanceof Date) {\n formattedDate = this.format(date, type);\n }\n\n if (date2 instanceof Date) {\n formattedDate2 = this.format(date2, type);\n }\n\n let range = globals.dateRange;\n\n if (type.startsWith('time')) {\n range = globals.timeRange;\n }\n\n return `${formattedDate}${range}${formattedDate2}`;\n },\n parseSpan: function(string, type) {\n let range = globals.dateRange;\n\n if (type.startsWith('time')) {\n range = globals.timeRange;\n }\n\n const dates = string.split(range);\n const date = this.parse(dates[0], type);\n const date2 = this.parse(dates[1], type);\n\n return [date, date2, range];\n }\n };\n\n return globalAdapter;\n}\n\nfunction getLocale(element) {\n const closestElement = element.closest(\"[lang]\");\n const locale = closestElement && closestElement.lang.split(\"-\")[0];\n\n if (window.stzhComponents.supportedLocales.indexOf(locale) === -1 || !locale) {\n return window.stzhComponents.defaultLocale;\n } else {\n return locale;\n }\n}\n\nexport async function fetchTranslations(host, component) {\n const locale = getLocale(host);\n const existingTranslations = JSON.parse(sessionStorage.getItem(`stzhComponents.v${window.stzhComponents.version}.i18n.${locale}`));\n\n if (\n window.stzhComponents.cacheTranslations\n && window.stzhComponents.version.match(/-dev-snapshot/i) === null\n && existingTranslations\n && Object.keys(existingTranslations).length > 0\n ) {\n return {\n ...existingTranslations[component] || {},\n $globals: existingTranslations.$globals,\n $locale: existingTranslations.$code,\n $formats: existingTranslations.$formats,\n $formatsIso: existingTranslations.$formatsIso,\n $formatsLegacy: existingTranslations.$formatsLegacy\n };\n }\n\n try {\n const result = await fetch(\n `${window.stzhComponents.pathTranslations}/${locale}.json`\n );\n\n if (result.ok) {\n const data = await result.json();\n sessionStorage.setItem(`stzhComponents.v${window.stzhComponents.version}.i18n.${locale}`, JSON.stringify(data));\n return {\n ...data[component] || {},\n $globals: data.$globals,\n $locale: data.$code,\n $formats: data.$formats,\n $formatsIso: data.$formatsIso,\n $formatsLegacy: data.$formatsLegacy\n };\n }\n\n } catch (exception) {\n console.error(`Error loading locale: ${locale}`, exception);\n }\n}\n","import \"wicg-inert\";\n\nimport { version } from '../../../package.json';\nimport { applyAutofocus } from './helpers/autofocus';\nimport { observeScrollbarWidth } from './helpers/scrollbar-width';\nimport * as utils from './helpers/utils';\n\nexport default function () {\n window.stzhComponents = {\n defaultLocale: 'de',\n labels: 'fixed',\n pathMedia: '/',\n pathTranslations: '/',\n cacheTranslations: true,\n formats: {},\n translations: null,\n ...window.stzhComponents || {},\n version,\n supportedLocales: ['de', 'en'],\n utils\n };\n\n if (window.stzhComponents.translations === null) {\n window.stzhComponents.translationsLoading = utils.fetchTranslations(document.documentElement).then((translations) => {\n window.stzhComponents.translations = translations;\n }).catch((reason) => {\n console.error(\"Translations couldn't load:\", reason)\n });\n }\n\n applyAutofocus();\n observeScrollbarWidth();\n}\n","import appGlobalScript from '/builds/OE-5041/desi/desi-code/stzh-components/src/global/js/script.js';\nexport const globalScripts = appGlobalScript;\n"],"mappings":"sxDAAA,IAAIA,EAAe,WAAc,SAASC,EAAiBC,EAAQC,GAAS,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,IAAIE,EAAaH,EAAMC,GAAIE,EAAWC,WAAaD,EAAWC,YAAc,MAAOD,EAAWE,aAAe,KAAM,GAAI,UAAWF,EAAYA,EAAWG,SAAW,KAAMC,OAAOC,eAAeT,EAAQI,EAAWM,IAAKN,E,CAAc,CAAG,OAAO,SAAUO,EAAaC,EAAYC,GAAe,GAAID,EAAYb,EAAiBY,EAAYG,UAAWF,GAAa,GAAIC,EAAad,EAAiBY,EAAaE,GAAc,OAAOF,CAAY,CAAG,CAA5hB,GAEnB,SAASI,EAAgBC,EAAUL,GAAe,KAAMK,aAAoBL,GAAc,CAAE,MAAM,IAAIM,UAAU,oC,CAAuC,EAOvJ,WAEE,UAAWC,SAAW,YAAa,CACjC,M,CAKF,IAAIC,EAAQC,MAAMN,UAAUK,MAM5B,IAAIE,EAAUC,QAAQR,UAAUO,SAAWC,QAAQR,UAAUS,kBAG7D,IAAIC,EAA2B,CAAC,UAAW,aAAc,wBAAyB,yBAA0B,2BAA4B,yBAA0B,UAAW,UAAW,SAAU,SAAU,QAAS,qBAAqBC,KAAK,KAmB/O,IAAIC,EAAY,WAKd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A,GACKoC,EAAKlB,IAAc,IAAE,CACxBvE,SAAUyF,EAAKzF,SACf+E,QAASU,EAAKT,MACdjF,SAAU0F,EAAK1F,SACfkF,YAAaQ,EAAKR,YAClBC,eAAgBO,EAAKP,kB,qCAKzBtF,QAAQgG,MAAM,yBAAA1D,OAAyB+B,GAAU4B,G,mKCvQtC,SAAAC,IACfvQ,OAAAmK,eAAA7K,OAAAkR,OAAAlR,OAAAkR,OAAA,CAAA3B,cAAA,KAAA4B,OAAA,QAAAC,UAAA,IAAAb,iBAAA,IAAAP,kBAAA,KAAArE,QAAA,GAAAb,aAAA,MAAApK,OAAAmK,gBAAA,KAAAkF,UAAAT,iBAAA,YAAA+B,UACE,GAAI3Q,OAAOmK,eAAeC,eAAA,MACxBpK,OAAOmK,eAAeyG,oBAAA9B,EAAApM,SAAA2D,iBAAAwK,MAAA,SAAAzG,GACpBpK,OAAOmK,eAAAC,cACb,IAAO0G,OAAM,SAACC,GACR1G,QAAQgG,MAAK,8BAAAU,EACnB,G,CAEEnI,IACAQ,GACF,CCfY,IAAC4H,EAAaC,EAAA,IAAGV,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,i,s){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function n(t){try{l(s.next(t))}catch(t){a(t)}}function c(t){try{l(s["throw"](t))}catch(t){a(t)}}function l(t){t.done?i(t.value):r(t.value).then(n,c)}l((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,r,a,n;return n={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function c(t){return function(e){return l([t,e])}}function l(c){if(s)throw new TypeError("Generator is already executing.");while(n&&(n=0,c[0]&&(i=0)),i)try{if(s=1,r&&(a=c[0]&2?r["return"]:c[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;if(r=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;r=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){i.label=c[1];break}if(c[0]===6&&i.label<a[1]){i.label=a[1];a=c;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(c);break}if(a[2])i.ops.pop();i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t];r=0}finally{s=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-290fcb28.system.js","./p-5a9ba368.system.js","./p-0bb08043.system.js"],(function(t){"use strict";var e,i,s,r,a,n,c;return{setters:[function(t){e=t.r;i=t.h;s=t.F;r=t.a;a=t.g},function(t){n=t.a},function(t){c=t.VBZ}],execute:function(){var l=".sc-stzh-vbz-ticker-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-vbz-ticker-h{display:none}.sc-stzh-vbz-ticker-h *.sc-stzh-vbz-ticker,.sc-stzh-vbz-ticker-h *.sc-stzh-vbz-ticker::before,.sc-stzh-vbz-ticker-h *.sc-stzh-vbz-ticker::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-vbz-ticker-h .has-focus.sc-stzh-vbz-ticker{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-vbz-ticker-h .stzh-fylingfocus-focused.sc-stzh-vbz-ticker{outline-style:none !important}.sc-stzh-vbz-ticker-h .stzh-fylingfocus-focused.sc-stzh-vbz-ticker::-moz-focus-inner{border:0 !important}.stzh-vbz-ticker.sc-stzh-vbz-ticker{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}@media screen and (min-width: 1024px){.stzh-vbz-ticker.sc-stzh-vbz-ticker{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:start;align-items:flex-start}}.stzh-vbz-ticker__icon.sc-stzh-vbz-ticker{--size:var(--stzh-icon-size-small);margin-right:var(--stzh-space-xsmall)}.stzh-vbz-ticker__title.sc-stzh-vbz-ticker{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}@media screen and (min-width: 1024px){.stzh-vbz-ticker__title.sc-stzh-vbz-ticker{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}.stzh-vbz-ticker__title-parts.sc-stzh-vbz-ticker{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:calc(var(--stzh-space-xxxsmall) / -1) 0}.stzh-vbz-ticker__title-part.sc-stzh-vbz-ticker{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;white-space:nowrap;margin:var(--stzh-space-xxxsmall) 0}.stzh-vbz-ticker__title-part.sc-stzh-vbz-ticker:not(:last-child){margin-right:var(--stzh-space-large)}.stzh-vbz-ticker__title-part--no-disturbances.sc-stzh-vbz-ticker{color:var(--stzh-color-truegreen)}.stzh-vbz-ticker__title-part--major-events.sc-stzh-vbz-ticker{color:var(--stzh-color-coral)}.stzh-vbz-ticker__title-part--disturbances.sc-stzh-vbz-ticker{color:var(--stzh-color-error)}.stzh-vbz-ticker__link.sc-stzh-vbz-ticker{margin-top:var(--stzh-space-small)}@media screen and (min-width: 1024px){.stzh-vbz-ticker__link.sc-stzh-vbz-ticker{position:absolute;top:0;right:0;margin-top:0}}.stzh-vbz-ticker__chips.sc-stzh-vbz-ticker{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.stzh-vbz-ticker__chips.sc-stzh-vbz-ticker:not(:empty){margin:calc(var(--stzh-space-xxsmall) * -1);margin-top:calc(var(--stzh-space-medium) - var(--stzh-space-xxsmall))}.stzh-vbz-ticker__chip.sc-stzh-vbz-ticker{margin:var(--stzh-space-xxsmall)}.stzh-vbz-ticker__tooltip.sc-stzh-vbz-ticker{--width:20.875rem}.stzh-vbz-ticker__disturbance.sc-stzh-vbz-ticker{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-vbz-ticker__disturbance.sc-stzh-vbz-ticker:not(:first-child){margin-top:var(--stzh-space-small)}.stzh-vbz-ticker__disturbance--type0.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-title.sc-stzh-vbz-ticker,.stzh-vbz-ticker__disturbance--type0.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-icon.sc-stzh-vbz-ticker,.stzh-vbz-ticker__disturbance--type2.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-title.sc-stzh-vbz-ticker,.stzh-vbz-ticker__disturbance--type2.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-icon.sc-stzh-vbz-ticker{color:var(--stzh-color-error)}.stzh-vbz-ticker__disturbance-title.sc-stzh-vbz-ticker{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);display:-ms-flexbox;display:flex}.stzh-vbz-ticker__disturbance--type0.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-title.sc-stzh-vbz-ticker,.stzh-vbz-ticker__disturbance--type2.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-title.sc-stzh-vbz-ticker{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy)}.stzh-vbz-ticker__disturbance-icon.sc-stzh-vbz-ticker{--size:var(--stzh-icon-size-xsmall);margin-top:var(--stzh-space-xxxsmall);margin-right:var(--stzh-space-xsmall)}.stzh-vbz-ticker__disturbance-link.sc-stzh-vbz-ticker{margin-top:var(--stzh-space-xsmall)}";var o=t("stzh_vbz_ticker",function(){function t(t){var i;e(this,t);this.globalDisturbances=[];this.lines=[];this.counter=(i={},i["".concat(c.DISTURBANCE_GLOBAL)]=0,i["".concat(c.DISTURBANCE_INFORMATION)]=0,i["".concat(c.DISTURBANCE_CONSTRUCTION)]=0,i["".concat(c.DISTURBANCE_NORMAL)]=0,i["".concat(c.DISTURBANCE_EVENT)]=0,i["".concat(c.DISTURBANCE_BUS)]=0,i);this.api="https://fpbe.zvv.ch/restproxy/himsearch?format=json&accessId=unic&channels=ticker&additionalfields=tickers:VBZ&orderBy=LMOD_DESC&lang={lang}";this.data="";this.moreInfoLink="https://zvv.ch/zvv/{lang}/fahrplan/vl.html?himIds={id}";this.dateAdapter=undefined;this.localization=undefined}t.prototype.localizationWatcher=function(){this.collator=new Intl.Collator(this.localization.$locale,{numeric:true})};t.prototype.apiWatcher=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(s){switch(s.label){case 0:if(!t){return[2]}e=this.api.replace(/\{lang\}/,this.localization.$locale);e=e+(e.includes("?")?"&":"?")+Date.now();return[4,n.get(e)];case 1:i=s.sent().data;this.data=i;return[2]}}))}))};t.prototype.dataWatcher=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,s;var r=this;return __generator(this,(function(a){if(typeof t==="string"){this._data=JSON.parse(t)}else{this._data=t}s={};(i=(e=this._data)===null||e===void 0?void 0:e.Message)===null||i===void 0?void 0:i.forEach((function(t){var e=t.channel.filter((function(t){return t.name===c.CHANNEL_TICKER&&t.url})).map((function(t){return t.url})).reduce((function(t,e){return t.concat(e)}),[]);var i=e.find((function(t){return t.url.indexOf(c.CHANNEL_INFO_URL_FILTER)!==-1}));if(t.baseType===c.BASE_TYPE_GLOBAL){r.counter[c.DISTURBANCE_GLOBAL]++;r.globalDisturbances.push({id:t.id,head:t.head,category:t.category,baseType:t.baseType,startDate:new Date("".concat(t.sDate,"T").concat(t.sTime,"+02:00")),endDate:new Date("".concat(t.eDate,"T").concat(t.eTime,"+02:00")),altStart:t.altStart,altEnd:t.altEnd,infoUrl:i})}else{r.counter[t.category]++}if(t.affectedProduct&&t.category!==c.DISTURBANCE_INFORMATION&&t.baseType!==c.BASE_TYPE_GLOBAL){var a=[];t.affectedProduct.forEach((function(e){if(typeof s[e.lineId]==="undefined"){s[e.lineId]={line:e.line,name:e.name,category:e.cls,disturbances:[],alert:false}}if(t.category===c.DISTURBANCE_NORMAL){s[e.lineId].alert=true}if(!a.includes(e.lineId)){a.push(e.lineId);s[e.lineId].disturbances.push({id:t.id,head:t.head,category:t.category,baseType:t.baseType,startDate:new Date("".concat(t.sDate,"T").concat(t.sTime,"+02:00")),endDate:new Date("".concat(t.eDate,"T").concat(t.eTime,"+02:00")),altStart:t.altStart,altEnd:t.altEnd,infoUrl:i})}}))}}));this.lines=Object.keys(s).map((function(t){return s[t]}));this.lines.sort((function(t,e){return r.collator.compare(t.line,e.line)}));return[2]}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:if(!!this.localization)return[3,2];t=this;return[4,window.stzhComponents.utils.fetchTranslations(this.element,"vbz-ticker")];case 1:t.localization=e.sent();this.localizationWatcher();e.label=2;case 2:if(!this.dateAdapter){this.dateAdapter=window.stzhComponents.utils.createFormatParseAdapter(this.localization.$formats,this.localization.$globals)}if(!this.data)return[3,4];return[4,this.dataWatcher(this.data)];case 3:e.sent();return[3,6];case 4:return[4,this.apiWatcher(this.api)];case 5:e.sent();e.label=6;case 6:return[2]}}))}))};t.prototype.renderDisturbance=function(t){var e;return i("div",{class:(e={"stzh-vbz-ticker__disturbance":true},e["stzh-vbz-ticker__disturbance--type".concat(t.category)]=!!t.category,e)},t.category===c.DISTURBANCE_NORMAL||t.baseType===c.BASE_TYPE_GLOBAL?i("stzh-icon",{name:"warning-big",class:"stzh-vbz-ticker__disturbance-icon"}):i("stzh-icon",{name:"construction",class:"stzh-vbz-ticker__disturbance-icon"}),i("div",{class:"stzh-vbz-ticker__disturbance-text"},i("div",{class:"stzh-vbz-ticker__disturbance-title"},t.head),i("div",{class:"stzh-vbz-ticker__disturbance-date"},this.dateAdapter.formatSpan(t.altStart||t.startDate,t.altEnd||t.endDate,"date")),t.infoUrl?i("stzh-link",{class:"stzh-vbz-ticker__disturbance-link",size:"small",href:t.infoUrl.url},this.localization.moreInfo):i("stzh-link",{class:"stzh-vbz-ticker__disturbance-link",size:"small",target:"_blank",icon:"external-link",href:this.moreInfoLink.replace(/\{lang\}/,this.localization.$locale).replace(/\{id\}/,t.id)},this.localization.moreInfo)))};t.prototype.render=function(){var t=this;var e={"stzh-vbz-ticker":true};return i(r,null,i("div",{class:e},i("div",{class:"stzh-vbz-ticker__text"},i("div",{class:"stzh-vbz-ticker__title"},i("div",{class:"stzh-vbz-ticker__title-parts"},this.lines.length===0&&this.counter[c.DISTURBANCE_GLOBAL]===0&&i("div",{class:"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--no-disturbances"},i("stzh-icon",{class:"stzh-vbz-ticker__icon",name:"checkmark-circle"}),this.localization.noDisturbances),this.counter[c.DISTURBANCE_NORMAL]>0&&i("div",{class:"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--disturbances"},i("stzh-icon",{class:"stzh-vbz-ticker__icon",name:"warning"}),this.counter[c.DISTURBANCE_GLOBAL]>0?this.localization.furtherDisturbanceTitle:this.localization.disturbanceTitle),(this.counter[c.DISTURBANCE_CONSTRUCTION]>0||this.counter[c.DISTURBANCE_EVENT]>0||this.counter[c.DISTURBANCE_BUS]>0)&&i("div",{class:"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--others"},i("stzh-icon",{class:"stzh-vbz-ticker__icon",name:"construction"}),this.localization.constructionsTitle))),(this.lines.length>0||this.counter[c.DISTURBANCE_GLOBAL]>0)&&i(s,null,i("div",{class:"stzh-vbz-ticker__chips",role:"list"},this.lines.map((function(e){return i("div",{class:"stzh-vbz-ticker__chip",role:"listitem"},i("stzh-tooltip",{class:"stzh-vbz-ticker__tooltip"},i("stzh-vbz-linechip",{line:e.line,alert:e.alert}),i("div",{class:"stzh-vbz-ticker__tooltip-content",slot:"content"},e.disturbances.map((function(e){return t.renderDisturbance(e)})))))}))))),i("div",{class:"stzh-vbz-ticker__link"},i("slot",{name:"link"}))))};Object.defineProperty(t.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{localization:["localizationWatcher"],api:["apiWatcher"],data:["dataWatcher"]}},enumerable:false,configurable:true});return t}());o.style=l}}}));
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,i,s){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function n(t){try{l(s.next(t))}catch(t){a(t)}}function c(t){try{l(s["throw"](t))}catch(t){a(t)}}function l(t){t.done?i(t.value):r(t.value).then(n,c)}l((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,r,a,n;return n={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function c(t){return function(e){return l([t,e])}}function l(c){if(s)throw new TypeError("Generator is already executing.");while(n&&(n=0,c[0]&&(i=0)),i)try{if(s=1,r&&(a=c[0]&2?r["return"]:c[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;if(r=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;r=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){i.label=c[1];break}if(c[0]===6&&i.label<a[1]){i.label=a[1];a=c;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(c);break}if(a[2])i.ops.pop();i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t];r=0}finally{s=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-290fcb28.system.js","./p-5a9ba368.system.js","./p-0bb08043.system.js"],(function(t){"use strict";var e,i,s,r,a,n,c;return{setters:[function(t){e=t.r;i=t.h;s=t.F;r=t.a;a=t.g},function(t){n=t.a},function(t){c=t.VBZ}],execute:function(){var l=".sc-stzh-vbz-ticker-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-vbz-ticker-h{display:none}.sc-stzh-vbz-ticker-h *.sc-stzh-vbz-ticker,.sc-stzh-vbz-ticker-h *.sc-stzh-vbz-ticker::before,.sc-stzh-vbz-ticker-h *.sc-stzh-vbz-ticker::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-vbz-ticker-h .has-focus.sc-stzh-vbz-ticker{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-vbz-ticker-h .stzh-fylingfocus-focused.sc-stzh-vbz-ticker{outline-style:none !important}.sc-stzh-vbz-ticker-h .stzh-fylingfocus-focused.sc-stzh-vbz-ticker::-moz-focus-inner{border:0 !important}.stzh-vbz-ticker.sc-stzh-vbz-ticker{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}@media screen and (min-width: 1024px){.stzh-vbz-ticker.sc-stzh-vbz-ticker{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:start;align-items:flex-start}}.stzh-vbz-ticker__icon.sc-stzh-vbz-ticker{--size:var(--stzh-icon-size-small);margin-right:var(--stzh-space-xsmall)}.stzh-vbz-ticker__title.sc-stzh-vbz-ticker{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}@media screen and (min-width: 1024px){.stzh-vbz-ticker__title.sc-stzh-vbz-ticker{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}.stzh-vbz-ticker__title-parts.sc-stzh-vbz-ticker{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:calc(var(--stzh-space-xxxsmall) / -1) 0}.stzh-vbz-ticker__title-part.sc-stzh-vbz-ticker{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;white-space:nowrap;margin:var(--stzh-space-xxxsmall) 0}.stzh-vbz-ticker__title-part.sc-stzh-vbz-ticker:not(:last-child){margin-right:var(--stzh-space-large)}.stzh-vbz-ticker__title-part--no-disturbances.sc-stzh-vbz-ticker{color:var(--stzh-color-truegreen)}.stzh-vbz-ticker__title-part--major-events.sc-stzh-vbz-ticker{color:var(--stzh-color-coral)}.stzh-vbz-ticker__title-part--disturbances.sc-stzh-vbz-ticker{color:var(--stzh-color-error)}.stzh-vbz-ticker__link.sc-stzh-vbz-ticker{margin-top:var(--stzh-space-small)}@media screen and (min-width: 1024px){.stzh-vbz-ticker__link.sc-stzh-vbz-ticker{position:absolute;top:0;right:0;margin-top:0}}.stzh-vbz-ticker__chips.sc-stzh-vbz-ticker{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.stzh-vbz-ticker__chips.sc-stzh-vbz-ticker:not(:empty){margin:calc(var(--stzh-space-xxsmall) * -1);margin-top:calc(var(--stzh-space-medium) - var(--stzh-space-xxsmall))}.stzh-vbz-ticker__chip.sc-stzh-vbz-ticker{margin:var(--stzh-space-xxsmall)}.stzh-vbz-ticker__tooltip.sc-stzh-vbz-ticker{--width:20.875rem}.stzh-vbz-ticker__disturbance.sc-stzh-vbz-ticker{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-vbz-ticker__disturbance.sc-stzh-vbz-ticker:not(:first-child){margin-top:var(--stzh-space-small)}.stzh-vbz-ticker__disturbance--type0.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-title.sc-stzh-vbz-ticker,.stzh-vbz-ticker__disturbance--type0.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-icon.sc-stzh-vbz-ticker,.stzh-vbz-ticker__disturbance--type2.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-title.sc-stzh-vbz-ticker,.stzh-vbz-ticker__disturbance--type2.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-icon.sc-stzh-vbz-ticker{color:var(--stzh-color-error)}.stzh-vbz-ticker__disturbance-title.sc-stzh-vbz-ticker{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);display:-ms-flexbox;display:flex}.stzh-vbz-ticker__disturbance--type0.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-title.sc-stzh-vbz-ticker,.stzh-vbz-ticker__disturbance--type2.sc-stzh-vbz-ticker .stzh-vbz-ticker__disturbance-title.sc-stzh-vbz-ticker{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy)}.stzh-vbz-ticker__disturbance-icon.sc-stzh-vbz-ticker{--size:var(--stzh-icon-size-xsmall);margin-top:var(--stzh-space-xxxsmall);margin-right:var(--stzh-space-xsmall)}.stzh-vbz-ticker__disturbance-link.sc-stzh-vbz-ticker{margin-top:var(--stzh-space-xsmall)}";var o=t("stzh_vbz_ticker",function(){function t(t){var i;e(this,t);this.globalDisturbances=[];this.lines=[];this.counter=(i={},i["".concat(c.DISTURBANCE_GLOBAL)]=0,i["".concat(c.DISTURBANCE_INFORMATION)]=0,i["".concat(c.DISTURBANCE_CONSTRUCTION)]=0,i["".concat(c.DISTURBANCE_NORMAL)]=0,i["".concat(c.DISTURBANCE_EVENT)]=0,i["".concat(c.DISTURBANCE_BUS)]=0,i);this.api="https://fpbe.zvv.ch/restproxy/himsearch?format=json&accessId=unic&channels=ticker&additionalfields=tickers:VBZ&orderBy=LMOD_DESC&lang={lang}";this.data="";this.moreInfoLink="https://zvv.ch/zvv/{lang}/fahrplan/vl.html?himIds={id}";this.dateAdapter=undefined;this.localization=undefined}t.prototype.localizationWatcher=function(){this.collator=new Intl.Collator(this.localization.$locale,{numeric:true})};t.prototype.apiWatcher=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(s){switch(s.label){case 0:if(!t){return[2]}e=this.api.replace(/\{lang\}/,this.localization.$locale);e=e+(e.includes("?")?"&":"?")+Date.now();return[4,n.get(e)];case 1:i=s.sent().data;this.data=i;return[2]}}))}))};t.prototype.dateAdapterWatcher=function(t){if(!t){this.dateAdapter=window.stzhComponents.utils.createFormatParseAdapter(this.localization.$formats,this.localization.$globals)}};t.prototype.dataWatcher=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,s;var r=this;return __generator(this,(function(a){if(typeof t==="string"){this._data=JSON.parse(t)}else{this._data=t}s={};(i=(e=this._data)===null||e===void 0?void 0:e.Message)===null||i===void 0?void 0:i.forEach((function(t){var e=t.channel.filter((function(t){return t.name===c.CHANNEL_TICKER&&t.url})).map((function(t){return t.url})).reduce((function(t,e){return t.concat(e)}),[]);var i=e.find((function(t){return t.url.indexOf(c.CHANNEL_INFO_URL_FILTER)!==-1}));if(t.baseType===c.BASE_TYPE_GLOBAL){r.counter[c.DISTURBANCE_GLOBAL]++;r.globalDisturbances.push({id:t.id,head:t.head,category:t.category,baseType:t.baseType,startDate:new Date("".concat(t.sDate,"T").concat(t.sTime,"+02:00")),endDate:new Date("".concat(t.eDate,"T").concat(t.eTime,"+02:00")),altStart:t.altStart,altEnd:t.altEnd,infoUrl:i})}else{r.counter[t.category]++}if(t.affectedProduct&&t.category!==c.DISTURBANCE_INFORMATION&&t.baseType!==c.BASE_TYPE_GLOBAL){var a=[];t.affectedProduct.forEach((function(e){if(typeof s[e.lineId]==="undefined"){s[e.lineId]={line:e.line,name:e.name,category:e.cls,disturbances:[],alert:false}}if(t.category===c.DISTURBANCE_NORMAL){s[e.lineId].alert=true}if(!a.includes(e.lineId)){a.push(e.lineId);s[e.lineId].disturbances.push({id:t.id,head:t.head,category:t.category,baseType:t.baseType,startDate:new Date("".concat(t.sDate,"T").concat(t.sTime,"+02:00")),endDate:new Date("".concat(t.eDate,"T").concat(t.eTime,"+02:00")),altStart:t.altStart,altEnd:t.altEnd,infoUrl:i})}}))}}));this.lines=Object.keys(s).map((function(t){return s[t]}));this.lines.sort((function(t,e){return r.collator.compare(t.line,e.line)}));return[2]}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:if(!!this.localization)return[3,2];t=this;return[4,window.stzhComponents.utils.fetchTranslations(this.element,"vbz-ticker")];case 1:t.localization=e.sent();this.localizationWatcher();e.label=2;case 2:this.dateAdapterWatcher(this.dateAdapter);if(!this.data)return[3,4];return[4,this.dataWatcher(this.data)];case 3:e.sent();return[3,6];case 4:return[4,this.apiWatcher(this.api)];case 5:e.sent();e.label=6;case 6:return[2]}}))}))};t.prototype.renderDisturbance=function(t){var e;return i("div",{class:(e={"stzh-vbz-ticker__disturbance":true},e["stzh-vbz-ticker__disturbance--type".concat(t.category)]=!!t.category,e)},t.category===c.DISTURBANCE_NORMAL||t.baseType===c.BASE_TYPE_GLOBAL?i("stzh-icon",{name:"warning-big",class:"stzh-vbz-ticker__disturbance-icon"}):i("stzh-icon",{name:"construction",class:"stzh-vbz-ticker__disturbance-icon"}),i("div",{class:"stzh-vbz-ticker__disturbance-text"},i("div",{class:"stzh-vbz-ticker__disturbance-title"},t.head),i("div",{class:"stzh-vbz-ticker__disturbance-date"},this.dateAdapter.formatSpan(t.altStart||t.startDate,t.altEnd||t.endDate,"date")),t.infoUrl?i("stzh-link",{class:"stzh-vbz-ticker__disturbance-link",size:"small",href:t.infoUrl.url},this.localization.moreInfo):i("stzh-link",{class:"stzh-vbz-ticker__disturbance-link",size:"small",target:"_blank",icon:"external-link",href:this.moreInfoLink.replace(/\{lang\}/,this.localization.$locale).replace(/\{id\}/,t.id)},this.localization.moreInfo)))};t.prototype.render=function(){var t=this;var e={"stzh-vbz-ticker":true};return i(r,null,i("div",{class:e},i("div",{class:"stzh-vbz-ticker__text"},i("div",{class:"stzh-vbz-ticker__title"},i("div",{class:"stzh-vbz-ticker__title-parts"},this.lines.length===0&&this.counter[c.DISTURBANCE_GLOBAL]===0&&i("div",{class:"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--no-disturbances"},i("stzh-icon",{class:"stzh-vbz-ticker__icon",name:"checkmark-circle"}),this.localization.noDisturbances),this.counter[c.DISTURBANCE_NORMAL]>0&&i("div",{class:"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--disturbances"},i("stzh-icon",{class:"stzh-vbz-ticker__icon",name:"warning"}),this.counter[c.DISTURBANCE_GLOBAL]>0?this.localization.furtherDisturbanceTitle:this.localization.disturbanceTitle),(this.counter[c.DISTURBANCE_CONSTRUCTION]>0||this.counter[c.DISTURBANCE_EVENT]>0||this.counter[c.DISTURBANCE_BUS]>0)&&i("div",{class:"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--others"},i("stzh-icon",{class:"stzh-vbz-ticker__icon",name:"construction"}),this.localization.constructionsTitle))),(this.lines.length>0||this.counter[c.DISTURBANCE_GLOBAL]>0)&&i(s,null,i("div",{class:"stzh-vbz-ticker__chips",role:"list"},this.lines.map((function(e){return i("div",{class:"stzh-vbz-ticker__chip",role:"listitem"},i("stzh-tooltip",{class:"stzh-vbz-ticker__tooltip"},i("stzh-vbz-linechip",{line:e.line,alert:e.alert}),i("div",{class:"stzh-vbz-ticker__tooltip-content",slot:"content"},e.disturbances.map((function(e){return t.renderDisturbance(e)})))))}))))),i("div",{class:"stzh-vbz-ticker__link"},i("slot",{name:"link"}))))};Object.defineProperty(t.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{localization:["localizationWatcher"],api:["apiWatcher"],dateAdapter:["dateAdapterWatcher"],data:["dataWatcher"]}},enumerable:false,configurable:true});return t}());o.style=l}}}));
|
|
2
|
+
//# sourceMappingURL=p-628b5b0d.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stzhVbzTickerCss","StzhVbzTicker","exports","this","globalDisturbances","lines","counter","_c","concat","VBZ","DISTURBANCE_GLOBAL","DISTURBANCE_INFORMATION","DISTURBANCE_CONSTRUCTION","DISTURBANCE_NORMAL","DISTURBANCE_EVENT","DISTURBANCE_BUS","class_1","prototype","localizationWatcher","collator","Intl","Collator","localization","$locale","numeric","apiWatcher","newValue","apiUrl","api","replace","includes","Date","now","axios","get","data","sent","dateAdapterWatcher","dateAdapter","window","stzhComponents","utils","createFormatParseAdapter","$formats","$globals","dataWatcher","_data","JSON","parse","_b","_a","Message","forEach","message","urls","channel","filter","name","CHANNEL_TICKER","url","map","reduce","a","b","infoUrl","find","indexOf","CHANNEL_INFO_URL_FILTER","baseType","BASE_TYPE_GLOBAL","_this","push","id","head","category","startDate","sDate","sTime","endDate","eDate","eTime","altStart","altEnd","affectedProduct","affectedLines_1","product","lineId","line","cls","disturbances","alert","Object","keys","key","sort","compare","componentWillLoad","fetchTranslations","element","_d","renderDisturbance","disturbance","h","class","formatSpan","size","href","moreInfo","target","icon","moreInfoLink","render","classes","Host","length","noDisturbances","furtherDisturbanceTitle","disturbanceTitle","constructionsTitle","Fragment","role","slot"],"sources":["src/components/stzh-vbz-ticker/stzh-vbz-ticker.scss?tag=stzh-vbz-ticker&encapsulation=scoped","src/components/stzh-vbz-ticker/stzh-vbz-ticker.tsx"],"sourcesContent":[":host {\n}\n\n.stzh-vbz-ticker {\n display: flex;\n flex-direction: column;\n position: relative;\n\n @include mq($from: medium) {\n flex-direction: row;\n align-items: flex-start;\n }\n\n &__icon {\n --size: #{iconSize('small')};\n margin-right: space('xsmall');\n }\n\n &__title {\n @include font('medium');\n @include fontCurve('p1');\n display: flex;\n flex-wrap: wrap;\n }\n\n &__title-parts {\n display: flex;\n flex-wrap: wrap;\n margin: calc(#{space('xxxsmall')} / -1) 0;\n }\n\n &__title-part {\n display: flex;\n align-items: center;\n white-space: nowrap;\n margin: space('xxxsmall') 0;\n\n &:not(:last-child) {\n margin-right: space('large');\n }\n\n &--no-disturbances {\n color: $colorTruegreen;\n }\n\n &--major-events {\n color: $colorCoral;\n }\n\n &--disturbances {\n color: $colorError;\n }\n }\n\n // &__description {\n // @include fontSize('micro');\n // @include spaceCurve('margin-top', 'tiny');\n // }\n\n &__link {\n margin-top: space('small');\n\n @include mq($from: medium) {\n position: absolute;\n top: 0;\n right: 0;\n margin-top: 0;\n }\n }\n\n &__chips {\n display: flex;\n flex-wrap: wrap;\n\n &:not(:empty) {\n margin: calc(#{space('xxsmall')} * -1);\n margin-top: calc(#{space('medium')} - #{space('xxsmall')});\n }\n }\n\n &__chip {\n margin: space('xxsmall');\n }\n\n &__tooltip {\n --width: 334px;\n }\n\n &__disturbance {\n display: flex;\n align-items: flex-start;\n\n &:not(:first-child) {\n margin-top: space('small');\n }\n }\n\n &__disturbance--type0 &__disturbance-title,\n &__disturbance--type0 &__disturbance-icon,\n &__disturbance--type2 &__disturbance-title,\n &__disturbance--type2 &__disturbance-icon {\n color: $colorError;\n }\n\n &__disturbance-title {\n @include font('medium');\n display: flex;\n }\n\n &__disturbance--type0 &__disturbance-title,\n &__disturbance--type2 &__disturbance-title {\n @include font('heavy');\n }\n\n &__disturbance-icon {\n --size: #{iconSize('xsmall')};\n margin-top: space('xxxsmall');\n margin-right: space('xsmall');\n }\n\n &__disturbance-link {\n margin-top: space('xsmall');\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Watch,\n Element,\n Fragment\n} from \"@stencil/core\";\n\nimport axios from 'axios';\n\nimport { StzhLocaleAdapter } from \"../../utils/date-adapter\";\n\nimport {\n VBZ,\n VbzTickerInfoUrl,\n VbzTickerDisturbance,\n VbzTickerLine\n} from \"../../index\";\n\nimport { StzhVbzTickerLocalizedText } from \"./stzh-vbz-ticker.localization\";\n\n/**\n * @slot link - Optional link to traffic situation\n */\n@Component({\n tag: \"stzh-vbz-ticker\",\n styleUrl: \"stzh-vbz-ticker.scss\",\n scoped: true\n})\nexport class StzhVbzTicker {\n /** API URL (`{lang}` is replaced in the URL) */\n @Prop() api: string = \"https://fpbe.zvv.ch/restproxy/himsearch?format=json&accessId=unic&channels=ticker&additionalfields=tickers:VBZ&orderBy=LMOD_DESC&lang={lang}\";\n\n /** Data to pass in directly (alternative for API call) */\n @Prop() data: any = \"\";\n private _data: any;\n\n /** More info link (`{lang}` and `{id}` are replaced in the URL) */\n @Prop() moreInfoLink: string = \"https://zvv.ch/zvv/{lang}/fahrplan/vl.html?himIds={id}\";\n\n /**\n * Date adapter, for custom parsing/formatting.\n * Must be object with a `parse` function which accepts a `string` and returns a `Date`,\n * and a `format` function which accepts a `Date` and returns a `string`.\n */\n @Prop() dateAdapter: StzhLocaleAdapter;\n\n /** Translation strings. */\n @Prop() localization: StzhVbzTickerLocalizedText;\n\n @Element() element: HTMLStzhVbzTickerElement;\n\n private globalDisturbances: VbzTickerDisturbance[] = [];\n private lines: VbzTickerLine[] = [];\n private collator: Intl.Collator;\n\n private counter = {\n [`${VBZ.DISTURBANCE_GLOBAL}`]: 0,\n [`${VBZ.DISTURBANCE_INFORMATION}`]: 0,\n [`${VBZ.DISTURBANCE_CONSTRUCTION}`]: 0,\n [`${VBZ.DISTURBANCE_NORMAL}`]: 0,\n [`${VBZ.DISTURBANCE_EVENT}`]: 0,\n [`${VBZ.DISTURBANCE_BUS}`]: 0\n };\n\n @Watch(\"localization\")\n localizationWatcher() {\n this.collator = new Intl.Collator(this.localization.$locale, {\n numeric: true\n });\n }\n\n @Watch(\"api\")\n async apiWatcher(newValue: string) {\n if (!newValue) {\n return;\n }\n\n let apiUrl = this.api.replace(/\\{lang\\}/, this.localization.$locale)\n apiUrl = apiUrl + (apiUrl.includes(\"?\") ? \"&\" : \"?\") + Date.now();\n\n // load data from API\n const { data } = await axios.get(apiUrl);\n\n this.data = data;\n }\n\n @Watch(\"dateAdapter\")\n dateAdapterWatcher(newValue: StzhLocaleAdapter) {\n if (!newValue) {\n this.dateAdapter = window.stzhComponents.utils.createFormatParseAdapter(\n this.localization.$formats,\n this.localization.$globals\n );\n }\n }\n\n @Watch(\"data\")\n async dataWatcher(newValue: any) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n const lines: { [key: string]: VbzTickerLine } = {};\n\n this._data?.Message?.forEach(message => {\n const urls: VbzTickerInfoUrl[] = message.channel\n .filter(channel => channel.name === VBZ.CHANNEL_TICKER && channel.url)\n .map(channel => channel.url)\n .reduce((a, b) => a.concat(b), []);\n\n const infoUrl = urls\n .find(url => url.url.indexOf(VBZ.CHANNEL_INFO_URL_FILTER) !== -1);\n\n if (message.baseType === VBZ.BASE_TYPE_GLOBAL) {\n this.counter[VBZ.DISTURBANCE_GLOBAL]++;\n\n this.globalDisturbances.push({\n id: message.id,\n head: message.head,\n category: message.category,\n baseType: message.baseType,\n startDate: new Date(`${message.sDate}T${message.sTime}+02:00`),\n endDate: new Date(`${message.eDate}T${message.eTime}+02:00`),\n altStart: message.altStart,\n altEnd: message.altEnd,\n infoUrl: infoUrl\n });\n } else {\n this.counter[message.category]++;\n }\n\n // don't add to lines if no line/product has been linked to\n // or if it is a information disturbance or global\n if (\n message.affectedProduct\n && message.category !== VBZ.DISTURBANCE_INFORMATION\n && message.baseType !== VBZ.BASE_TYPE_GLOBAL\n ) {\n const affectedLines = [];\n\n message.affectedProduct.forEach(product => {\n if (typeof lines[product.lineId] === \"undefined\") {\n lines[product.lineId] = {\n line: product.line,\n name: product.name,\n category: product.cls,\n disturbances: [],\n alert: false\n }\n }\n\n if (message.category === VBZ.DISTURBANCE_NORMAL) {\n lines[product.lineId].alert = true;\n }\n\n // only add disturbance message to line if it was not already added (avoiding same message twice)\n if (!affectedLines.includes(product.lineId)) {\n affectedLines.push(product.lineId);\n\n lines[product.lineId].disturbances.push({\n id: message.id,\n head: message.head,\n category: message.category,\n baseType: message.baseType,\n startDate: new Date(`${message.sDate}T${message.sTime}+02:00`),\n endDate: new Date(`${message.eDate}T${message.eTime}+02:00`),\n altStart: message.altStart,\n altEnd: message.altEnd,\n infoUrl: infoUrl\n })\n }\n })\n }\n });\n\n this.lines = Object.keys(lines)\n .map(key => lines[key]);\n\n // sort by line name\n this.lines.sort((a, b) => this.collator\n .compare(a.line, b.line));\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"vbz-ticker\");\n this.localizationWatcher();\n }\n\n this.dateAdapterWatcher(this.dateAdapter);\n\n if (this.data) {\n await this.dataWatcher(this.data);\n } else {\n await this.apiWatcher(this.api);\n }\n }\n\n renderDisturbance(disturbance: VbzTickerDisturbance) {\n return (\n <div class={{\n \"stzh-vbz-ticker__disturbance\": true,\n [`stzh-vbz-ticker__disturbance--type${disturbance.category}`]: !!disturbance.category\n }}>\n {disturbance.category === VBZ.DISTURBANCE_NORMAL\n || disturbance.baseType === VBZ.BASE_TYPE_GLOBAL\n ?\n <stzh-icon name=\"warning-big\" class=\"stzh-vbz-ticker__disturbance-icon\"></stzh-icon>\n :\n <stzh-icon name=\"construction\" class=\"stzh-vbz-ticker__disturbance-icon\"></stzh-icon>\n }\n\n <div class=\"stzh-vbz-ticker__disturbance-text\">\n <div class=\"stzh-vbz-ticker__disturbance-title\">\n {disturbance.head}\n </div>\n\n <div class=\"stzh-vbz-ticker__disturbance-date\">\n {this.dateAdapter.formatSpan(\n disturbance.altStart || disturbance.startDate,\n disturbance.altEnd || disturbance.endDate,\n \"date\"\n )}\n </div>\n\n {disturbance.infoUrl ?\n <stzh-link\n class=\"stzh-vbz-ticker__disturbance-link\"\n size=\"small\"\n href={disturbance.infoUrl.url}\n >\n {this.localization.moreInfo}\n </stzh-link>\n :\n <stzh-link\n class=\"stzh-vbz-ticker__disturbance-link\"\n size=\"small\"\n target=\"_blank\"\n icon=\"external-link\"\n href={this.moreInfoLink\n .replace(/\\{lang\\}/, this.localization.$locale)\n .replace(/\\{id\\}/, disturbance.id)}\n >\n {this.localization.moreInfo}\n </stzh-link>\n }\n </div>\n </div>\n );\n }\n\n render() {\n const classes = {\n \"stzh-vbz-ticker\": true\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class=\"stzh-vbz-ticker__text\">\n <div class=\"stzh-vbz-ticker__title\">\n <div class=\"stzh-vbz-ticker__title-parts\">\n {this.lines.length === 0 && this.counter[VBZ.DISTURBANCE_GLOBAL] === 0 &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--no-disturbances\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"checkmark-circle\"></stzh-icon>\n {this.localization.noDisturbances}\n </div>}\n\n {/* {this.counter[DISTURBANCE_GLOBAL] > 0 &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--major-events\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"important-warning\"></stzh-icon>\n {this.localization.majorEventTitle}\n </div>} */}\n\n {this.counter[VBZ.DISTURBANCE_NORMAL] > 0 &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--disturbances\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"warning\"></stzh-icon>\n {this.counter[VBZ.DISTURBANCE_GLOBAL] > 0 ?\n this.localization.furtherDisturbanceTitle : this.localization.disturbanceTitle}\n </div>}\n\n {(this.counter[VBZ.DISTURBANCE_CONSTRUCTION] > 0\n || this.counter[VBZ.DISTURBANCE_EVENT] > 0\n || this.counter[VBZ.DISTURBANCE_BUS] > 0) &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--others\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"construction\"></stzh-icon>\n {this.localization.constructionsTitle}\n </div>}\n </div>\n </div>\n\n {(this.lines.length > 0 || this.counter[VBZ.DISTURBANCE_GLOBAL] > 0) &&\n <Fragment>\n {/* <div class=\"stzh-vbz-ticker__description\">\n {this.counter[VBZ.DISTURBANCE_GLOBAL] > 0\n ? this.localization.globalDisturbance\n : this.localization.affectedLines}\n </div> */}\n <div class=\"stzh-vbz-ticker__chips\" role=\"list\">\n {/* {this.counter[VBZ.DISTURBANCE_GLOBAL] > 0 &&\n <div class=\"stzh-vbz-ticker__chip\" role=\"listitem\">\n <stzh-tooltip class=\"stzh-vbz-ticker__tooltip\">\n <stzh-vbz-linechip global></stzh-vbz-linechip>\n <div class=\"stzh-vbz-ticker__tooltip-content\" slot=\"content\">\n {this.globalDisturbances.map((disturbance) => this.renderDisturbance(disturbance))}\n </div>\n </stzh-tooltip>\n </div>} */}\n\n {this.lines.map((line) =>\n <div class=\"stzh-vbz-ticker__chip\" role=\"listitem\">\n <stzh-tooltip class=\"stzh-vbz-ticker__tooltip\">\n <stzh-vbz-linechip line={line.line} alert={line.alert}></stzh-vbz-linechip>\n <div class=\"stzh-vbz-ticker__tooltip-content\" slot=\"content\">\n {line.disturbances.map((disturbance) => this.renderDisturbance(disturbance))}\n </div>\n </stzh-tooltip>\n </div>\n )}\n </div>\n </Fragment>}\n </div>\n\n <div class=\"stzh-vbz-ticker__link\">\n <slot name=\"link\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"8sDAAA,IAAMA,EAAmB,s8J,IC+BZC,EAAaC,EAAA,6B,8BAuBhBC,KAAAC,mBAA6C,GAC7CD,KAAAE,MAAyB,GAGzBF,KAAAG,SAAOC,EAAA,GACbA,EAAC,GAAAC,OAAGC,EAAIC,qBAAuB,EAC/BH,EAAC,GAAAC,OAAGC,EAAIE,0BAA4B,EACpCJ,EAAC,GAAAC,OAAGC,EAAIG,2BAA6B,EACrCL,EAAC,GAAAC,OAAGC,EAAII,qBAAuB,EAC/BN,EAAC,GAAAC,OAAGC,EAAIK,oBAAsB,EAC9BP,EAAC,GAAAC,OAAGC,EAAIM,kBAAoB,E,YA/BR,+I,UAGF,G,kBAIW,yD,uDA4B/BC,EAAAC,UAAAC,oBAAA,WACEf,KAAKgB,SAAW,IAAIC,KAAKC,SAASlB,KAAKmB,aAAaC,QAAS,CAC3DC,QAAS,M,EAKPR,EAAAC,UAAAQ,WAAN,SAAiBC,G,oHACf,IAAKA,EAAU,CACb,S,CAGEC,EAASxB,KAAKyB,IAAIC,QAAQ,WAAY1B,KAAKmB,aAAaC,SAC5DI,EAASA,GAAUA,EAAOG,SAAS,KAAO,IAAM,KAAOC,KAAKC,MAG3C,SAAMC,EAAMC,IAAIP,I,OAAzBQ,EAAS5B,EAAA6B,OAAuBD,KA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-stzh-container-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-container-h{display:none}.sc-stzh-container-h *.sc-stzh-container,.sc-stzh-container-h *.sc-stzh-container::before,.sc-stzh-container-h *.sc-stzh-container::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-container-h .has-focus.sc-stzh-container{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-container-h .stzh-fylingfocus-focused.sc-stzh-container{outline-style:none !important}.sc-stzh-container-h .stzh-fylingfocus-focused.sc-stzh-container::-moz-focus-inner{border:0 !important}.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-1.25rem;margin-right:-1.25rem}@media screen and (min-width: 600px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-2rem;margin-right:-2rem}}@media screen and (min-width: 1024px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-2.5rem;margin-right:-2.5rem}}@media screen and (min-width: 1260px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-5.5rem;margin-right:-5.5rem}}@media screen and (min-width: 1440px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / -2);margin-right:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / -2)}}.sc-stzh-container-h .sc-stzh-container-s stzh-container{position:relative;left:50%;right:50%;margin-left:calc(-50vw + var(--stzh-scrollbar-width) / 2);margin-right:calc(-50vw + var(--stzh-scrollbar-width) / 2);width:calc(100vw - var(--stzh-scrollbar-width));max-width:calc(100vw - var(--stzh-scrollbar-width))}.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:1.25rem}@media screen and (min-width: 600px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:2rem}}@media screen and (min-width: 1024px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:2.5rem}}@media screen and (min-width: 1260px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:var(--stzh-space-xlarge)}}@media screen and (max-width: 1259px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{position:relative;left:50%;right:50%;margin-left:calc(-50vw + var(--stzh-scrollbar-width) / 2);margin-right:calc(-50vw + var(--stzh-scrollbar-width) / 2);width:calc(100vw - var(--stzh-scrollbar-width));max-width:calc(100vw - var(--stzh-scrollbar-width))}}.sc-stzh-container-h .sc-stzh-container-s stzh-row stzh-section[variant=highlight]{--highlight-horizontal-padding:var(--stzh-section-highlight-horizontal-padding)}@media screen and (max-width: 1259px){.sc-stzh-container-h .sc-stzh-container-s stzh-row stzh-section[variant=highlight]{left:initial;right:initial;margin-left:initial;margin-right:initial;width:initial;max-width:initial}}.stzh-container.sc-stzh-container{margin-left:1.25rem;margin-right:1.25rem}@media screen and (min-width: 600px){.stzh-container.sc-stzh-container{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 1024px){.stzh-container.sc-stzh-container{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.stzh-container.sc-stzh-container{margin-left:5.5rem;margin-right:5.5rem}}@media screen and (min-width: 1440px){.stzh-container.sc-stzh-container{margin-left:auto;margin-right:auto;width:78.75rem}}@media screen and (min-width: 1440px){.stzh-container--size-big.sc-stzh-container{width:90rem}}.stzh-container--has-no-margin.sc-stzh-container{margin-left:auto;margin-right:auto}";const s=class{constructor(i){t(this,i);this.size="default";this.noMargin=false}render(){const t={"stzh-container":true,"stzh-container--has-no-margin":this.noMargin,[`stzh-container--size-${this.size}`]:!!this.size};return i(n,null,i("div",{class:t},i("slot",null)))}};s.style=r;export{s as stzh_container};
|
|
2
|
+
//# sourceMappingURL=p-66b0d1f3.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stzhContainerCss","StzhContainer","render","classes","this","noMargin","size","h","Host","class"],"sources":["src/components/stzh-container/stzh-container.scss?tag=stzh-container&encapsulation=scoped","src/components/stzh-container/stzh-container.tsx"],"sourcesContent":[":host {\n ::slotted(*) {\n stzh-header {\n margin-left: -$containerMargin;\n margin-right: -$containerMargin;\n\n @include mq($from: small) {\n margin-left: -$containerMarginSmall;\n margin-right: -$containerMarginSmall;\n }\n\n @include mq($from: medium) {\n margin-left: -$containerMarginMedium;\n margin-right: -$containerMarginMedium;\n }\n\n @include mq($from: large) {\n margin-left: -$containerMarginLarge;\n margin-right: -$containerMarginLarge;\n }\n\n @include mq($from: ultra) {\n margin-left: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / -2);\n margin-right: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / -2);\n }\n }\n\n stzh-container {\n position: relative;\n left: 50%;\n right: 50%;\n margin-left: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n margin-right: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n width: calc(100vw - var(--stzh-scrollbar-width));\n max-width: calc(100vw - var(--stzh-scrollbar-width));\n }\n\n stzh-section[variant=\"highlight\"] {\n --highlight-horizontal-padding: #{$containerMargin};\n\n @include mq($from: small) {\n --highlight-horizontal-padding: #{$containerMarginSmall};\n }\n\n @include mq($from: medium) {\n --highlight-horizontal-padding: #{$containerMarginMedium};\n }\n\n @include mq($from: large) {\n --highlight-horizontal-padding: #{space('xlarge')};\n }\n\n @include mq($to: large) {\n position: relative;\n left: 50%;\n right: 50%;\n margin-left: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n margin-right: calc(-50vw + var(--stzh-scrollbar-width) / 2);\n width: calc(100vw - var(--stzh-scrollbar-width));\n max-width: calc(100vw - var(--stzh-scrollbar-width));\n }\n }\n\n stzh-row stzh-section[variant=\"highlight\"] {\n --highlight-horizontal-padding: #{$sectionHighlightHorizontalPadding};\n\n @include mq($to: large) {\n left: initial;\n right: initial;\n margin-left: initial;\n margin-right: initial;\n width: initial;\n max-width: initial;\n }\n }\n }\n}\n\n.stzh-container {\n @include container;\n\n &--size-big {\n @include mq($from: ultra) {\n width: $containerBigMaxWidth;\n }\n }\n\n &--has-no-margin {\n margin-left: auto;\n margin-right: auto;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n} from \"@stencil/core\";\n\n/**\n * @slot - Slot for any content\n */\n@Component({\n tag: \"stzh-container\",\n styleUrl: \"stzh-container.scss\",\n scoped: true\n})\nexport class StzhContainer {\n /** Size variant */\n @Prop() size: \"default\" | \"big\" = \"default\";\n\n /** Whether to prevent side margins */\n @Prop() noMargin: boolean = false;\n\n render() {\n const classes = {\n \"stzh-container\": true,\n \"stzh-container--has-no-margin\": this.noMargin,\n [`stzh-container--size-${this.size}`]: !!this.size,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAmB,+7H,MCeZC,EAAa,M,mCAEU,U,cAGN,K,CAE5B,MAAAC,GACE,MAAMC,EAAU,CACd,iBAAkB,KAClB,gCAAiCC,KAAKC,SACtC,CAAC,wBAAwBD,KAAKE,UAAWF,KAAKE,MAGhD,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAON,GACVI,EAAA,c"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as s,h as t,a as r,g as e}from"./p-c92165bd.js";import{m as i,a as h,r as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as s,h as t,a as r,g as e}from"./p-c92165bd.js";import{m as i,a as h,r as a}from"./p-cc8c83a8.js";const o=".sc-stzh-progressbar-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-progressbar-h{display:none}.sc-stzh-progressbar-h *.sc-stzh-progressbar,.sc-stzh-progressbar-h *.sc-stzh-progressbar::before,.sc-stzh-progressbar-h *.sc-stzh-progressbar::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-progressbar-h .has-focus.sc-stzh-progressbar{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-progressbar-h .stzh-fylingfocus-focused.sc-stzh-progressbar{outline-style:none !important}.sc-stzh-progressbar-h .stzh-fylingfocus-focused.sc-stzh-progressbar::-moz-focus-inner{border:0 !important}.sc-stzh-progressbar-h{min-width:calc(var(--steps) * 1.6875rem * 2)}@media screen and (min-width: 600px){.sc-stzh-progressbar-h{min-width:calc(var(--steps) * 1.9375rem * 2)}}.stzh-progressbar.sc-stzh-progressbar{position:relative;overflow:hidden}.stzh-progressbar__items.sc-stzh-progressbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.stzh-progressbar__item.sc-stzh-progressbar{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;-ms-flex-preferred-size:0;flex-basis:0}";const n=class{constructor(t){s(this,t);this.setCurrentSteps=()=>{if(i("ultra").matches&&this.stepsUltra){this.currentSteps=this.stepsUltra}else if(i("large").matches&&this.stepsLarge){this.currentSteps=this.stepsLarge}else if(i("medium").matches&&this.stepsMedium){this.currentSteps=this.stepsMedium}else if(i("small").matches&&this.stepsSmall){this.currentSteps=this.stepsSmall}else{this.currentSteps=this.steps}this.element.style.setProperty("--steps",this.currentSteps.toString())};this.localization=undefined;this.data=[];this.index=0;this.steps=5;this.stepsSmall=6;this.stepsMedium=0;this.stepsLarge=0;this.stepsUltra=0;this.currentSteps=undefined}async getItemData(){return this._data.map(((s,t)=>Object.assign(Object.assign({},s),this.getItemAttributes(t))))}dataWatcher(s){if(typeof s==="string"){this._data=JSON.parse(s)}else{this._data=s}this.lastItemIndex=this._data.length-1;this.maxStepIndex=this.currentSteps-1;this.withinLastFewSteps=this.index>=this._data.length-this.maxStepIndex}getItemAttributes(s){const t={};t.step=s+1;t.first=s===0;t.last=s===this.lastItemIndex;t.current=s===this.index;t.passed=s<this.index;if(this._data.length>this.currentSteps){if(s===this.lastItemIndex&&!this.withinLastFewSteps){t.dotted=true}if(this.index<2){t.hide=s>this.maxStepIndex-1&&s<this.lastItemIndex}else{if(s===0){t.dotted=true}let r=this.index;if(this.withinLastFewSteps){r=this._data.length-this.maxStepIndex}t.hide=s>0&&s<r||s>this.index+(this.currentSteps-3)&&s<this.lastItemIndex}}return t}async componentWillLoad(){this.dataWatcher(this.data);if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"progressbar")}}connectedCallback(){this.setCurrentSteps();h(this.setCurrentSteps)}disconnectedCallback(){a(this.setCurrentSteps)}render(){const s={"stzh-progressbar":true,[`stzh-progressbar--index-${this.index}`]:!!this.index};return t(r,null,t("div",{class:s},t("div",{class:"stzh-progressbar__items",role:"list","aria-label":this.localization.label},this._data.map(((s,r)=>t("stzh-progressbar-item",Object.assign({},this.getItemAttributes(r),{icon:s.icon,disabled:s.disabled,label:s.label,class:"stzh-progressbar__item"})))))))}get element(){return e(this)}static get watchers(){return{data:["dataWatcher"]}}};n.style=o;export{n as stzh_progressbar};
|
|
2
|
+
//# sourceMappingURL=p-761909d5.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stzhProgressbarCss","StzhProgressbar","this","setCurrentSteps","media","matches","stepsUltra","currentSteps","stepsLarge","stepsMedium","stepsSmall","steps","element","style","setProperty","toString","getItemData","_data","map","step","index","Object","assign","getItemAttributes","dataWatcher","newValue","JSON","parse","lastItemIndex","length","maxStepIndex","withinLastFewSteps","itemIndex","item","first","last","current","passed","dotted","hide","substract","componentWillLoad","data","localization","window","stzhComponents","utils","fetchTranslations","connectedCallback","addMediaChangeListener","disconnectedCallback","removeMediaChangeListener","render","classes","h","Host","class","role","label","icon","disabled"],"sources":["src/components/stzh-progressbar/stzh-progressbar.scss?tag=stzh-progressbar&encapsulation=scoped","src/components/stzh-progressbar/stzh-progressbar.tsx"],"sourcesContent":[":host {\n min-width: calc(var(--steps) * #{$progressbarItemDottedSize} * 2);\n\n @include mq($from: small) {\n min-width: calc(var(--steps) * #{$progressbarItemDottedSizeSmallUp} * 2);\n }\n}\n\n.stzh-progressbar {\n position: relative;\n\toverflow: hidden;\n\n &__items {\n display: flex;\n flex-wrap: nowrap;\n }\n\n &__item {\n /* flex the bullets to always have the same size */\n\t\tflex-grow: 1;\n\t\tflex-shrink: 1;\n\t\tflex-basis: 0;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Watch,\n Method\n} from \"@stencil/core\";\n\nimport {\n StzhProgressbarDataItem\n} from '../../index';\n\nimport { addMediaChangeListener, removeMediaChangeListener, media } from \"../../utils/media-utils\";\nimport { StzhProgressbarLocalizedText } from \"./stzh-progressbar.localization\"\n\n/**\n * @slot - Slot for any text content\n */\n@Component({\n tag: \"stzh-progressbar\",\n styleUrl: \"stzh-progressbar.scss\",\n scoped: true\n})\nexport class StzhProgressbar {\n /** Translation strings */\n @Prop() localization: StzhProgressbarLocalizedText;\n\n /**\n * Step data (JSON array with objects that have `label` attribute and optional:\n * - `disabled`, if step should be disabled\n * - `icon`, if icon instead of step number should be displayed):\n * - `analyticsId`, for Adobe Analytics, rendered as `s-object-id` (default is `label`)\n *\n * ```\n * {\n * \"label\": \"Step Label\"\n * \"icon\": \"clock\",\n * \"disabled\": true\n * }\n * ```\n */\n @Prop() data: StzhProgressbarDataItem[] | string = [];\n private _data: StzhProgressbarDataItem[];\n\n /** Index of the item that be active */\n @Prop() index: number = 0;\n\n /** Number of steps to show below small breakpoint */\n @Prop() steps: number = 5;\n\n /** Number of steps to show above small breakpoint */\n @Prop() stepsSmall: number = 6;\n\n /** Number of steps to show above medium breakpoint */\n @Prop() stepsMedium: number = 0;\n\n /** Number of steps to show above large breakpoint */\n @Prop() stepsLarge: number = 0;\n\n /** Number of steps to show above ultra breakpoint */\n @Prop() stepsUltra: number = 0;\n\n @State() currentSteps: number;\n\n @Element() element: HTMLStzhProgressbarElement;\n\n /**\n * Return infos about rendered progressbar items.\n * Array of objects including: hide (whether step is hidden)\n * / passed (whether step has been passed)\n * / current (whether step is currently active)\n * / dotted (whether step has dotted style active)\n * / first|last (whether step is first or last)\n * / label\n */\n @Method()\n async getItemData() {\n return this._data.map((step, index) => {\n return {\n ...step,\n ...this.getItemAttributes(index)\n }\n });\n }\n\n @Watch(\"data\")\n dataWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n }\n else {\n this._data = newValue;\n }\n\n this.lastItemIndex = this._data.length - 1;\n this.maxStepIndex = this.currentSteps - 1;\n this.withinLastFewSteps = this.index >= this._data.length - this.maxStepIndex;\n }\n\n private lastItemIndex: number;\n private maxStepIndex: number;\n private withinLastFewSteps: boolean;\n\n private getItemAttributes(itemIndex: number): any {\n const item = {} as HTMLStzhProgressbarItemElement;\n\n item.step = itemIndex + 1;\n item.first = itemIndex === 0;\n item.last = itemIndex === this.lastItemIndex;\n item.current = itemIndex === this.index;\n item.passed = itemIndex < this.index;\n\n // hide overflowings if more items than max steps in DOM\n if (this._data.length > this.currentSteps) {\n // add dots to last item if current index is below the last few items\n if (itemIndex === this.lastItemIndex && !this.withinLastFewSteps) {\n item.dotted = true;\n }\n\n if (this.index < 2) {\n // hide overflowing items on the right\n item.hide = itemIndex > this.maxStepIndex - 1 && itemIndex < this.lastItemIndex;\n } else {\n // add dots to first item if current item is third or above\n if (itemIndex === 0) {\n item.dotted = true;\n }\n\n let substract = this.index;\n\n // if is within the last elements, calculate how much previous\n // should be shown to stay on 5 visible elements\n if (this.withinLastFewSteps) {\n substract = this._data.length - this.maxStepIndex;\n }\n\n // hide overflowing items on left and right side\n item.hide = itemIndex > 0 && itemIndex < substract\n || itemIndex > this.index + (this.currentSteps - 3) && itemIndex < this.lastItemIndex;\n }\n }\n\n return item;\n }\n\n private setCurrentSteps = () => {\n if (media(\"ultra\").matches && this.stepsUltra) {\n this.currentSteps = this.stepsUltra;\n } else if (media(\"large\").matches && this.stepsLarge) {\n this.currentSteps = this.stepsLarge;\n } else if (media(\"medium\").matches && this.stepsMedium) {\n this.currentSteps = this.stepsMedium;\n } else if (media(\"small\").matches && this.stepsSmall) {\n this.currentSteps = this.stepsSmall;\n } else {\n this.currentSteps = this.steps;\n }\n\n this.element.style.setProperty(\"--steps\", this.currentSteps.toString());\n }\n\n async componentWillLoad() {\n this.dataWatcher(this.data);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"progressbar\");\n }\n }\n\n connectedCallback() {\n this.setCurrentSteps();\n addMediaChangeListener(this.setCurrentSteps);\n }\n\n disconnectedCallback() {\n removeMediaChangeListener(this.setCurrentSteps);\n }\n\n render() {\n const classes = {\n \"stzh-progressbar\": true,\n [`stzh-progressbar--index-${this.index}`]: !!this.index\n };\n\n return (\n <Host>\n <div class={classes}>\n <div\n class=\"stzh-progressbar__items\"\n role=\"list\"\n aria-label={this.localization.label}\n >\n {this._data.map((step, index) =>\n <stzh-progressbar-item\n {...this.getItemAttributes(index)}\n icon={step.icon}\n disabled={step.disabled}\n label={step.label}\n class=\"stzh-progressbar__item\"\n ></stzh-progressbar-item>\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"2GAAA,MAAMA,EAAqB,o8C,MC0BdC,EAAe,M,yBA0HlBC,KAAAC,gBAAkB,KACxB,GAAIC,EAAM,SAASC,SAAWH,KAAKI,WAAY,CAC7CJ,KAAKK,aAAeL,KAAKI,U,MACpB,GAAIF,EAAM,SAASC,SAAWH,KAAKM,WAA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