@oiz/stzh-components 3.1.0 → 3.2.0-beta1
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-0699ef40.js → app-globals-efe6d21d.js} +2 -2
- package/dist/cjs/{app-globals-0699ef40.js.map → app-globals-efe6d21d.js.map} +1 -1
- package/dist/cjs/index-92254d32.js +28 -16
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-accordion_3.cjs.entry.js +24 -8
- package/dist/cjs/stzh-accordion_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-actions.cjs.entry.js +1 -1
- package/dist/cjs/stzh-anchornav.cjs.entry.js +4 -3
- package/dist/cjs/stzh-anchornav.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-app-bar.cjs.entry.js +48 -0
- package/dist/cjs/stzh-app-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-appointments.cjs.entry.js +1 -1
- package/dist/cjs/stzh-audio.cjs.entry.js +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-card-navigation.cjs.entry.js +1 -1
- package/dist/cjs/stzh-card-searchresult.cjs.entry.js +1 -1
- package/dist/cjs/stzh-card-superteaser.cjs.entry.js +1 -1
- package/dist/cjs/stzh-card_2.cjs.entry.js +8 -2
- package/dist/cjs/stzh-card_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-carousel.cjs.entry.js +1 -1
- package/dist/cjs/stzh-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +1 -1
- package/dist/cjs/stzh-chip.cjs.entry.js +22 -32
- package/dist/cjs/stzh-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-contact-cv.cjs.entry.js +63 -0
- package/dist/cjs/stzh-contact-cv.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-contact.cjs.entry.js +5 -3
- package/dist/cjs/stzh-contact.cjs.entry.js.map +1 -1
- 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-cspace.cjs.entry.js +2 -2
- package/dist/cjs/stzh-cspace.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datatable.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-daterange.cjs.entry.js +1 -1
- package/dist/cjs/stzh-details.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dialog.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-disturber.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/stzh-eventinfo.cjs.entry.js +1 -1
- package/dist/cjs/stzh-figure.cjs.entry.js +1 -1
- package/dist/cjs/stzh-footer.cjs.entry.js +2 -2
- package/dist/cjs/stzh-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-ghettobox_3.cjs.entry.js +27 -19
- package/dist/cjs/stzh-ghettobox_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js +2 -2
- package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js +1 -1
- package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-iframe.cjs.entry.js +2881 -24
- package/dist/cjs/stzh-iframe.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-input.cjs.entry.js +8 -4
- package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-link.cjs.entry.js +1 -1
- package/dist/cjs/{stzh-list.cjs.entry.js → stzh-list_2.cjs.entry.js} +20 -1
- package/dist/cjs/stzh-list_2.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagecontent.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagetitle-hero.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagetitle-home.cjs.entry.js +2 -2
- package/dist/cjs/stzh-pagetitle-home.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-pagetitle.cjs.entry.js +2 -2
- package/dist/cjs/stzh-pagetitle.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-panorama.cjs.entry.js +1 -1
- package/dist/cjs/stzh-panorama.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-pi-content-navigation.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pi-pagetitle.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pi-teaser.cjs.entry.js +1 -1
- package/dist/cjs/stzh-popover_2.cjs.entry.js +90 -67
- package/dist/cjs/stzh-popover_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-print_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-ratio.cjs.entry.js +1 -1
- package/dist/cjs/stzh-ratio.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-readspeaker.cjs.entry.js +1 -1
- package/dist/cjs/stzh-scrollup.cjs.entry.js +6 -6
- package/dist/cjs/stzh-scrollup.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-search.cjs.entry.js +1 -1
- package/dist/cjs/stzh-section.cjs.entry.js +1 -1
- package/dist/cjs/stzh-section.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-sticky-actions.cjs.entry.js +9 -8
- package/dist/cjs/stzh-sticky-actions.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-sticky.cjs.entry.js +1 -1
- package/dist/cjs/stzh-table.cjs.entry.js +1 -1
- package/dist/cjs/stzh-textandimage.cjs.entry.js +1 -1
- package/dist/cjs/stzh-timeline-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-toast.cjs.entry.js +1 -1
- package/dist/cjs/stzh-toggle.cjs.entry.js +1 -1
- package/dist/cjs/stzh-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/stzh-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-twocolumns.cjs.entry.js +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +3101 -7
- package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-vbz-carousel.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-carousel.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js +25 -0
- package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-vbz-intro.cjs.entry.js +58 -0
- package/dist/cjs/stzh-vbz-intro.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-vbz-linechip.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-linechip.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +33 -44
- package/dist/cjs/stzh-vbz-ticker.cjs.entry.js.map +1 -1
- package/dist/cjs/{utils-d0fff87f.js → utils-d091c010.js} +40 -9
- package/dist/cjs/utils-d091c010.js.map +1 -0
- package/dist/collection/assets/i18n/de.json +22 -7
- package/dist/collection/assets/i18n/en.json +22 -7
- package/dist/collection/assets/media/icons/mono/construction.svg +1 -1
- package/dist/collection/assets/media/icons/mono/crop.svg +1 -0
- package/dist/collection/assets/meta/icons-preview.html +6 -1
- package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/image/retreive-pdf +5 -0
- package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/ping +3 -0
- package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/url +3 -0
- package/dist/collection/assets/mock/appl/mobiscan/rs/auth +4 -0
- package/dist/collection/assets/mock/appl/mobiscan/rs/config +5 -0
- package/dist/collection/assets/vendors/iframe-resizer/iframeResizer.contentWindow.js +1311 -0
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/stzh-accordion/stzh-accordion.css +39 -0
- package/dist/collection/components/stzh-accordion/stzh-accordion.js +20 -0
- package/dist/collection/components/stzh-accordion/stzh-accordion.js.map +1 -1
- package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.css +5 -0
- package/dist/collection/components/stzh-anchornav/stzh-anchornav.js +5 -4
- package/dist/collection/components/stzh-anchornav/stzh-anchornav.js.map +1 -1
- package/dist/collection/components/stzh-app-bar/stzh-app-bar.css +253 -0
- package/dist/collection/components/stzh-app-bar/stzh-app-bar.e2e.js +16 -0
- package/dist/collection/components/stzh-app-bar/stzh-app-bar.e2e.js.map +1 -0
- package/dist/collection/components/stzh-app-bar/stzh-app-bar.js +54 -0
- package/dist/collection/components/stzh-app-bar/stzh-app-bar.js.map +1 -0
- package/dist/collection/components/stzh-app-bar/stzh-app-bar.stories.js +45 -0
- package/dist/collection/components/stzh-cardlist/stzh-cardlist.css +5 -0
- package/dist/collection/components/stzh-cardlist/stzh-cardlist.js +9 -2
- package/dist/collection/components/stzh-cardlist/stzh-cardlist.js.map +1 -1
- package/dist/collection/components/stzh-chip/stzh-chip.js +23 -33
- package/dist/collection/components/stzh-chip/stzh-chip.js.map +1 -1
- package/dist/collection/components/stzh-contact/stzh-contact.css +47 -15
- package/dist/collection/components/stzh-contact/stzh-contact.js +21 -1
- package/dist/collection/components/stzh-contact/stzh-contact.js.map +1 -1
- package/dist/collection/components/stzh-contact/stzh-contact.stories.js +68 -49
- package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.css +196 -0
- package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.e2e.js +16 -0
- package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.e2e.js.map +1 -0
- package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.js +163 -0
- package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.js.map +1 -0
- package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.localization.js +2 -0
- package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.localization.js.map +1 -0
- package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.stories.js +52 -0
- package/dist/collection/components/stzh-container/stzh-container.css +2 -1
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +53 -0
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +1 -1
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
- package/dist/collection/components/stzh-footer/stzh-footer.css +10 -2
- package/dist/collection/components/stzh-header/stzh-header.css +19 -3
- package/dist/collection/components/stzh-homepage-service-highlights/stzh-homepage-service-highlights.css +14 -3
- package/dist/collection/components/stzh-homepage-service-highlights/stzh-homepage-service-highlights.stories.js +1 -1
- package/dist/collection/components/stzh-iframe/stzh-iframe.css +8 -1
- package/dist/collection/components/stzh-iframe/stzh-iframe.js +139 -26
- package/dist/collection/components/stzh-iframe/stzh-iframe.js.map +1 -1
- package/dist/collection/components/stzh-iframe/stzh-iframe.stories.js +30 -11
- package/dist/collection/components/stzh-input/stzh-input.css +1 -1
- package/dist/collection/components/stzh-input/stzh-input.js +8 -3
- package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
- package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.css +2 -1
- package/dist/collection/components/stzh-pagetitle-home/stzh-pagetitle-home.css +19 -0
- package/dist/collection/components/stzh-pagination/stzh-pagination.css +11 -1
- package/dist/collection/components/stzh-pagination/stzh-pagination.js +43 -6
- package/dist/collection/components/stzh-pagination/stzh-pagination.js.map +1 -1
- package/dist/collection/components/stzh-panorama/stzh-panorama.js +1 -1
- package/dist/collection/components/stzh-panorama/stzh-panorama.js.map +1 -1
- package/dist/collection/components/stzh-popover/stzh-popover.js +101 -75
- package/dist/collection/components/stzh-popover/stzh-popover.js.map +1 -1
- package/dist/collection/components/stzh-ratio/stzh-ratio.css +6 -0
- package/dist/collection/components/stzh-richtext/stzh-richtext.js +28 -20
- package/dist/collection/components/stzh-richtext/stzh-richtext.js.map +1 -1
- package/dist/collection/components/stzh-richtext/stzh-richtext.stories.js +15 -6
- package/dist/collection/components/stzh-scrollup/stzh-scrollup.js +6 -6
- package/dist/collection/components/stzh-scrollup/stzh-scrollup.js.map +1 -1
- package/dist/collection/components/stzh-section/stzh-section.css +134 -1
- package/dist/collection/components/stzh-section/stzh-section.js +2 -2
- package/dist/collection/components/stzh-section/stzh-section.js.map +1 -1
- package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +206 -22
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.css +4 -0
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js +11 -9
- package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js.map +1 -1
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.css +8 -4
- package/dist/collection/components/stzh-upload/models/stzh-photographing-configuration.dto.js +2 -0
- package/dist/collection/components/stzh-upload/models/stzh-photographing-configuration.dto.js.map +1 -0
- package/dist/collection/components/stzh-upload/models/stzh-photographing-pdf-file.dto.js +3 -0
- package/dist/collection/components/stzh-upload/models/stzh-photographing-pdf-file.dto.js.map +1 -0
- package/dist/collection/components/stzh-upload/models/stzh-photographing-url-details.dto.js +2 -0
- package/dist/collection/components/stzh-upload/models/stzh-photographing-url-details.dto.js.map +1 -0
- package/dist/collection/components/stzh-upload/stzh-upload.css +84 -11
- package/dist/collection/components/stzh-upload/stzh-upload.js +274 -4
- package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.localization.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.stories.js +13 -7
- package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.css +6 -4
- package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.stories.js +2 -5
- package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.css +192 -0
- package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.e2e.js +18 -0
- package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.e2e.js.map +1 -0
- package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js +26 -0
- package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js.map +1 -0
- package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.stories.js +39 -0
- package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.css +341 -0
- package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.e2e.js +16 -0
- package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.e2e.js.map +1 -0
- package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.js +110 -0
- package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.js.map +1 -0
- package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.localization.js +2 -0
- package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.localization.js.map +1 -0
- package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.stories.js +75 -0
- package/dist/collection/components/stzh-vbz-linechip/stzh-vbz-linechip.css +3 -3
- package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.stories.js +8 -10
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.css +17 -21
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +34 -45
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js.map +1 -1
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.localization.js.map +1 -1
- package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.stories.js +10 -12
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/pages/mkz/mkz.e2e.js +16 -0
- package/dist/collection/pages/mkz/mkz.e2e.js.map +1 -0
- package/dist/collection/pages/upload-photographing/upload-photographing.e2e.js +16 -0
- package/dist/collection/pages/upload-photographing/upload-photographing.e2e.js.map +1 -0
- package/dist/collection/patterns/contact-accordion/contact-accordion.e2e.js +21 -0
- package/dist/collection/patterns/contact-accordion/contact-accordion.e2e.js.map +1 -0
- package/dist/collection/patterns/poi/poi.e2e.js +21 -0
- package/dist/collection/patterns/poi/poi.e2e.js.map +1 -0
- package/dist/collection/utils/utils.js +38 -8
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-accordion-item2.js +1 -1
- package/dist/components/stzh-accordion-item2.js.map +1 -1
- package/dist/components/stzh-accordion2.js +17 -1
- package/dist/components/stzh-accordion2.js.map +1 -1
- package/dist/components/stzh-anchornav.js +4 -3
- package/dist/components/stzh-anchornav.js.map +1 -1
- package/dist/components/stzh-app-bar.d.ts +11 -0
- package/dist/components/stzh-app-bar.js +60 -0
- package/dist/components/stzh-app-bar.js.map +1 -0
- package/dist/components/stzh-cardlist2.js +9 -2
- package/dist/components/stzh-cardlist2.js.map +1 -1
- package/dist/components/stzh-chip2.js +22 -32
- package/dist/components/stzh-chip2.js.map +1 -1
- package/dist/components/stzh-contact-cv.d.ts +11 -0
- package/dist/components/stzh-contact-cv.js +102 -0
- package/dist/components/stzh-contact-cv.js.map +1 -0
- package/dist/components/stzh-contact.js +5 -2
- package/dist/components/stzh-contact.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-cspace.js +1 -1
- package/dist/components/stzh-cspace.js.map +1 -1
- package/dist/components/stzh-datepicker2.js.map +1 -1
- package/dist/components/stzh-dialog.js +1 -226
- package/dist/components/stzh-dialog.js.map +1 -1
- package/dist/components/stzh-dialog2.js +230 -0
- package/dist/components/stzh-dialog2.js.map +1 -0
- package/dist/components/stzh-footer.js +1 -1
- package/dist/components/stzh-footer.js.map +1 -1
- package/dist/components/stzh-header.js +1 -1
- package/dist/components/stzh-header.js.map +1 -1
- package/dist/components/stzh-homepage-service-highlights.js +1 -1
- package/dist/components/stzh-homepage-service-highlights.js.map +1 -1
- package/dist/components/stzh-iframe2.js +2883 -23
- package/dist/components/stzh-iframe2.js.map +1 -1
- package/dist/components/stzh-input2.js +9 -4
- package/dist/components/stzh-input2.js.map +1 -1
- package/dist/components/stzh-list-item.js +1 -34
- package/dist/components/stzh-list-item.js.map +1 -1
- package/dist/{esm/stzh-list-item.entry.js → components/stzh-list-item2.js} +24 -9
- package/dist/components/stzh-list-item2.js.map +1 -0
- package/dist/components/stzh-list.js +1 -36
- package/dist/components/stzh-list.js.map +1 -1
- package/dist/{esm/stzh-list.entry.js → components/stzh-list2.js} +26 -9
- package/dist/components/stzh-list2.js.map +1 -0
- package/dist/components/stzh-pagetitle-home.js +1 -1
- package/dist/components/stzh-pagetitle-home.js.map +1 -1
- package/dist/components/stzh-pagetitle.js +1 -1
- package/dist/components/stzh-pagetitle.js.map +1 -1
- package/dist/components/stzh-pagination2.js +9 -6
- package/dist/components/stzh-pagination2.js.map +1 -1
- package/dist/components/stzh-panorama.js +1 -1
- package/dist/components/stzh-panorama.js.map +1 -1
- package/dist/components/stzh-popover2.js +93 -67
- package/dist/components/stzh-popover2.js.map +1 -1
- package/dist/components/stzh-ratio2.js +1 -1
- package/dist/components/stzh-ratio2.js.map +1 -1
- package/dist/components/stzh-richtext2.js +26 -18
- package/dist/components/stzh-richtext2.js.map +1 -1
- package/dist/components/stzh-scrollup.js +5 -5
- package/dist/components/stzh-scrollup.js.map +1 -1
- package/dist/components/stzh-section.js +1 -1
- package/dist/components/stzh-section.js.map +1 -1
- package/dist/components/stzh-share2.js +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
- package/dist/components/stzh-sticky-actions.js +10 -8
- package/dist/components/stzh-sticky-actions.js.map +1 -1
- package/dist/components/stzh-tooltip2.js +1 -1
- package/dist/components/stzh-tooltip2.js.map +1 -1
- package/dist/components/stzh-upload.js +3127 -6
- package/dist/components/stzh-upload.js.map +1 -1
- package/dist/components/stzh-vbz-carousel.js +1 -1
- package/dist/components/stzh-vbz-carousel.js.map +1 -1
- package/dist/components/stzh-vbz-connection-finder.d.ts +11 -0
- package/dist/components/stzh-vbz-connection-finder.js +38 -0
- package/dist/components/stzh-vbz-connection-finder.js.map +1 -0
- package/dist/components/stzh-vbz-intro.d.ts +11 -0
- package/dist/components/stzh-vbz-intro.js +100 -0
- package/dist/components/stzh-vbz-intro.js.map +1 -0
- package/dist/components/stzh-vbz-linechip2.js +1 -1
- package/dist/components/stzh-vbz-linechip2.js.map +1 -1
- package/dist/components/stzh-vbz-majorticker.js +1 -1
- package/dist/components/stzh-vbz-ticker.js +33 -44
- package/dist/components/stzh-vbz-ticker.js.map +1 -1
- package/dist/components/utils.js +39 -9
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/{app-globals-ab5b077d.js → app-globals-93678901.js} +2 -2
- package/dist/esm/{app-globals-ab5b077d.js.map → app-globals-93678901.js.map} +1 -1
- package/dist/esm/index-e3050b18.js +28 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-accordion_3.entry.js +25 -9
- package/dist/esm/stzh-accordion_3.entry.js.map +1 -1
- package/dist/esm/stzh-actions.entry.js +1 -1
- package/dist/esm/stzh-anchornav.entry.js +4 -3
- package/dist/esm/stzh-anchornav.entry.js.map +1 -1
- package/dist/esm/stzh-app-bar.entry.js +44 -0
- package/dist/esm/stzh-app-bar.entry.js.map +1 -0
- package/dist/esm/stzh-appointments.entry.js +1 -1
- package/dist/esm/stzh-audio.entry.js +1 -1
- package/dist/esm/stzh-badge_3.entry.js +1 -1
- package/dist/esm/stzh-card-navigation.entry.js +1 -1
- package/dist/esm/stzh-card-searchresult.entry.js +1 -1
- package/dist/esm/stzh-card-superteaser.entry.js +1 -1
- package/dist/esm/stzh-card_2.entry.js +8 -2
- package/dist/esm/stzh-card_2.entry.js.map +1 -1
- package/dist/esm/stzh-carousel.entry.js +1 -1
- package/dist/esm/stzh-checkbox.entry.js +1 -1
- package/dist/esm/stzh-checkboxgroup.entry.js +1 -1
- package/dist/esm/stzh-chip.entry.js +22 -32
- package/dist/esm/stzh-chip.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-contact-cv.entry.js +59 -0
- package/dist/esm/stzh-contact-cv.entry.js.map +1 -0
- package/dist/esm/stzh-contact.entry.js +5 -3
- package/dist/esm/stzh-contact.entry.js.map +1 -1
- package/dist/esm/stzh-container.entry.js +1 -1
- package/dist/esm/stzh-container.entry.js.map +1 -1
- package/dist/esm/stzh-cspace.entry.js +2 -2
- package/dist/esm/stzh-cspace.entry.js.map +1 -1
- package/dist/esm/stzh-cta.entry.js +1 -1
- package/dist/esm/stzh-datatable.entry.js +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm/stzh-daterange.entry.js +1 -1
- package/dist/esm/stzh-details.entry.js +1 -1
- package/dist/esm/stzh-dialog.entry.js +1 -1
- package/dist/esm/stzh-dialog.entry.js.map +1 -1
- package/dist/esm/stzh-disturber.entry.js +1 -1
- package/dist/esm/stzh-dropdown.entry.js +1 -1
- package/dist/esm/stzh-eventinfo.entry.js +1 -1
- package/dist/esm/stzh-figure.entry.js +1 -1
- package/dist/esm/stzh-footer.entry.js +2 -2
- package/dist/esm/stzh-footer.entry.js.map +1 -1
- package/dist/esm/stzh-ghettobox_3.entry.js +27 -19
- package/dist/esm/stzh-ghettobox_3.entry.js.map +1 -1
- package/dist/esm/stzh-header.entry.js +2 -2
- package/dist/esm/stzh-header.entry.js.map +1 -1
- package/dist/esm/stzh-homepage-service-highlights.entry.js +1 -1
- package/dist/esm/stzh-homepage-service-highlights.entry.js.map +1 -1
- package/dist/esm/stzh-iframe.entry.js +2881 -24
- package/dist/esm/stzh-iframe.entry.js.map +1 -1
- package/dist/esm/stzh-input.entry.js +8 -4
- package/dist/esm/stzh-input.entry.js.map +1 -1
- package/dist/esm/stzh-link.entry.js +1 -1
- package/dist/esm/stzh-list_2.entry.js +41 -0
- package/dist/esm/stzh-list_2.entry.js.map +1 -0
- package/dist/esm/stzh-menu_2.entry.js +1 -1
- package/dist/esm/stzh-pagecontent.entry.js +1 -1
- package/dist/esm/stzh-pagetitle-hero.entry.js +1 -1
- package/dist/esm/stzh-pagetitle-home.entry.js +2 -2
- package/dist/esm/stzh-pagetitle-home.entry.js.map +1 -1
- package/dist/esm/stzh-pagetitle.entry.js +2 -2
- package/dist/esm/stzh-pagetitle.entry.js.map +1 -1
- package/dist/esm/stzh-panorama.entry.js +1 -1
- package/dist/esm/stzh-panorama.entry.js.map +1 -1
- package/dist/esm/stzh-pi-content-navigation.entry.js +1 -1
- package/dist/esm/stzh-pi-pagetitle.entry.js +1 -1
- package/dist/esm/stzh-pi-teaser.entry.js +1 -1
- package/dist/esm/stzh-popover_2.entry.js +91 -68
- package/dist/esm/stzh-popover_2.entry.js.map +1 -1
- package/dist/esm/stzh-print_2.entry.js +1 -1
- package/dist/esm/stzh-ratio.entry.js +1 -1
- package/dist/esm/stzh-ratio.entry.js.map +1 -1
- package/dist/esm/stzh-readspeaker.entry.js +1 -1
- package/dist/esm/stzh-scrollup.entry.js +6 -6
- package/dist/esm/stzh-scrollup.entry.js.map +1 -1
- package/dist/esm/stzh-search.entry.js +1 -1
- package/dist/esm/stzh-section.entry.js +1 -1
- package/dist/esm/stzh-section.entry.js.map +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/esm/stzh-sticky-actions.entry.js +9 -8
- package/dist/esm/stzh-sticky-actions.entry.js.map +1 -1
- package/dist/esm/stzh-sticky.entry.js +1 -1
- package/dist/esm/stzh-table.entry.js +1 -1
- package/dist/esm/stzh-textandimage.entry.js +1 -1
- package/dist/esm/stzh-timeline-item.entry.js +1 -1
- package/dist/esm/stzh-toast.entry.js +1 -1
- package/dist/esm/stzh-toggle.entry.js +1 -1
- package/dist/esm/stzh-tooltip.entry.js +2 -2
- package/dist/esm/stzh-tooltip.entry.js.map +1 -1
- package/dist/esm/stzh-twocolumns.entry.js +1 -1
- package/dist/esm/stzh-upload.entry.js +3098 -4
- package/dist/esm/stzh-upload.entry.js.map +1 -1
- package/dist/esm/stzh-vbz-carousel.entry.js +1 -1
- package/dist/esm/stzh-vbz-carousel.entry.js.map +1 -1
- package/dist/esm/stzh-vbz-connection-finder.entry.js +21 -0
- package/dist/esm/stzh-vbz-connection-finder.entry.js.map +1 -0
- package/dist/esm/stzh-vbz-intro.entry.js +54 -0
- package/dist/esm/stzh-vbz-intro.entry.js.map +1 -0
- package/dist/esm/stzh-vbz-linechip.entry.js +1 -1
- package/dist/esm/stzh-vbz-linechip.entry.js.map +1 -1
- package/dist/esm/stzh-vbz-ticker.entry.js +33 -44
- package/dist/esm/stzh-vbz-ticker.entry.js.map +1 -1
- package/dist/esm/{utils-54aead01.js → utils-90658cfe.js} +40 -10
- package/dist/esm/utils-90658cfe.js.map +1 -0
- package/dist/stzh-components/assets/i18n/de.json +22 -7
- package/dist/stzh-components/assets/i18n/en.json +22 -7
- package/dist/stzh-components/assets/media/icons/mono/construction.svg +1 -1
- package/dist/stzh-components/assets/media/icons/mono/crop.svg +1 -0
- package/dist/stzh-components/assets/meta/icons-preview.html +6 -1
- package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/image/retreive-pdf +5 -0
- package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/ping +3 -0
- package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/url +3 -0
- package/dist/stzh-components/assets/mock/appl/mobiscan/rs/auth +4 -0
- package/dist/stzh-components/assets/mock/appl/mobiscan/rs/config +5 -0
- package/dist/stzh-components/assets/vendors/iframe-resizer/iframeResizer.contentWindow.js +1311 -0
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/p-05127d71.entry.js +2 -0
- package/dist/stzh-components/p-05127d71.entry.js.map +1 -0
- package/dist/stzh-components/{p-9684b22d.entry.js → p-09480ffe.entry.js} +2 -2
- package/dist/stzh-components/{p-c877d32c.entry.js → p-0b0c7cb8.entry.js} +2 -2
- package/dist/stzh-components/p-0b0c7cb8.entry.js.map +1 -0
- package/dist/stzh-components/{p-161ae3d1.entry.js → p-0b15d79b.entry.js} +2 -2
- package/dist/stzh-components/p-109a885b.entry.js +2 -0
- package/dist/stzh-components/{p-2d7966cf.entry.js.map → p-109a885b.entry.js.map} +1 -1
- package/dist/stzh-components/{p-c1cd45e1.entry.js → p-12bffe97.entry.js} +2 -2
- package/dist/stzh-components/p-13cd7748.entry.js +2 -0
- package/dist/stzh-components/p-13cd7748.entry.js.map +1 -0
- package/dist/stzh-components/{p-27d5ad01.entry.js → p-16a2675e.entry.js} +2 -2
- package/dist/stzh-components/{p-75b79adf.entry.js → p-1cbf5c84.entry.js} +2 -2
- package/dist/stzh-components/p-1cbf5c84.entry.js.map +1 -0
- package/dist/stzh-components/{p-20db8d01.entry.js → p-1fd858a2.entry.js} +2 -2
- package/dist/stzh-components/p-1fd858a2.entry.js.map +1 -0
- package/dist/stzh-components/p-21c351b4.entry.js +2 -0
- package/dist/stzh-components/p-21c351b4.entry.js.map +1 -0
- package/dist/stzh-components/{p-59a1a257.entry.js → p-21f7064d.entry.js} +2 -2
- package/dist/stzh-components/p-21f7064d.entry.js.map +1 -0
- package/dist/stzh-components/p-23de5712.entry.js +2 -0
- package/dist/stzh-components/p-23de5712.entry.js.map +1 -0
- package/dist/stzh-components/{p-0fb40e48.entry.js → p-24ea178a.entry.js} +2 -2
- package/dist/stzh-components/{p-3f0d3919.entry.js → p-2812752a.entry.js} +2 -2
- package/dist/stzh-components/{p-68d33cd3.entry.js → p-29c1cb5c.entry.js} +2 -2
- package/dist/stzh-components/p-2d405b51.js +2 -0
- package/dist/stzh-components/{p-cc1f8acc.js.map → p-2d405b51.js.map} +1 -1
- package/dist/stzh-components/{p-801af922.entry.js → p-30a522e0.entry.js} +2 -2
- package/dist/stzh-components/{p-d10a6897.entry.js → p-30a7c058.entry.js} +2 -2
- package/dist/stzh-components/{p-7ca981d1.entry.js → p-3261eab4.entry.js} +2 -2
- package/dist/stzh-components/{p-5d4a2df0.entry.js → p-32cb5b94.entry.js} +2 -2
- package/dist/stzh-components/{p-97df1d9f.entry.js → p-346d2f3d.entry.js} +2 -2
- package/dist/stzh-components/p-346f8661.entry.js +2 -0
- package/dist/stzh-components/p-346f8661.entry.js.map +1 -0
- package/dist/stzh-components/{p-8f1dbd3b.entry.js → p-3912a256.entry.js} +2 -2
- package/dist/stzh-components/{p-6fdc4c74.entry.js → p-39acdb68.entry.js} +2 -2
- package/dist/stzh-components/p-3cc6f193.entry.js +2 -0
- package/dist/stzh-components/p-3cc6f193.entry.js.map +1 -0
- package/dist/stzh-components/{p-204a6e41.entry.js → p-466263ff.entry.js} +2 -2
- package/dist/stzh-components/p-466263ff.entry.js.map +1 -0
- package/dist/stzh-components/p-49d356da.entry.js +2 -0
- package/dist/stzh-components/p-49d356da.entry.js.map +1 -0
- package/dist/stzh-components/p-585551c1.entry.js +2 -0
- package/dist/stzh-components/p-585551c1.entry.js.map +1 -0
- package/dist/stzh-components/{p-edf77853.entry.js → p-63c76fd5.entry.js} +2 -2
- package/dist/stzh-components/{p-533fea0b.entry.js → p-67e61035.entry.js} +2 -2
- package/dist/stzh-components/p-6e0c8764.entry.js +2 -0
- package/dist/stzh-components/p-6e0c8764.entry.js.map +1 -0
- package/dist/stzh-components/{p-80fafa1d.entry.js → p-6fffe2c8.entry.js} +2 -2
- package/dist/stzh-components/p-7b14ef7a.entry.js +2 -0
- package/dist/stzh-components/p-7b14ef7a.entry.js.map +1 -0
- package/dist/stzh-components/{p-eb79f3ed.entry.js → p-82c53e4f.entry.js} +2 -2
- package/dist/stzh-components/p-85143b35.entry.js +2 -0
- package/dist/stzh-components/p-85143b35.entry.js.map +1 -0
- package/dist/stzh-components/{p-8e0a2441.entry.js → p-87f3052b.entry.js} +2 -2
- package/dist/stzh-components/{p-b566a2c0.entry.js → p-8a82bf60.entry.js} +2 -2
- package/dist/stzh-components/{p-9b43127f.entry.js → p-8b04698a.entry.js} +2 -2
- package/dist/stzh-components/p-8b3828e7.entry.js +2 -0
- package/dist/stzh-components/p-8b3828e7.entry.js.map +1 -0
- package/dist/stzh-components/{p-4db427d5.entry.js → p-8c4d543d.entry.js} +2 -2
- package/dist/stzh-components/p-8c4d543d.entry.js.map +1 -0
- package/dist/stzh-components/p-90772ec6.entry.js +2 -0
- package/dist/stzh-components/p-90772ec6.entry.js.map +1 -0
- package/dist/stzh-components/p-9bc12eff.entry.js +2 -0
- package/dist/stzh-components/p-9bc12eff.entry.js.map +1 -0
- package/dist/stzh-components/{p-7754870d.entry.js → p-9c1b3929.entry.js} +2 -2
- package/dist/stzh-components/{p-5c3fddec.entry.js → p-9c643610.entry.js} +2 -2
- package/dist/stzh-components/{p-5c3fddec.entry.js.map → p-9c643610.entry.js.map} +1 -1
- package/dist/stzh-components/{p-4f49450d.entry.js → p-9e4f0532.entry.js} +2 -2
- package/dist/stzh-components/p-9e4f0532.entry.js.map +1 -0
- package/dist/stzh-components/{p-cff05968.entry.js → p-a249f3f6.entry.js} +2 -2
- package/dist/stzh-components/{p-a2e9723b.entry.js → p-aa3e4203.entry.js} +2 -2
- package/dist/stzh-components/{p-f5821678.entry.js → p-ab5ee55b.entry.js} +2 -2
- package/dist/stzh-components/{p-ce99f5e8.entry.js → p-acef653a.entry.js} +2 -2
- package/dist/stzh-components/{p-c5dbf7ad.entry.js → p-b03f41c3.entry.js} +2 -2
- package/dist/stzh-components/p-b273f95c.entry.js +2 -0
- package/dist/stzh-components/p-b273f95c.entry.js.map +1 -0
- package/dist/stzh-components/{p-72c375c7.entry.js → p-b397337c.entry.js} +2 -2
- package/dist/stzh-components/p-b397337c.entry.js.map +1 -0
- package/dist/stzh-components/{p-ef21f4dc.entry.js → p-ba716237.entry.js} +2 -2
- package/dist/stzh-components/p-ba716237.entry.js.map +1 -0
- package/dist/stzh-components/p-bcaef6d7.entry.js +2 -0
- package/dist/stzh-components/{p-012dc71e.entry.js.map → p-bcaef6d7.entry.js.map} +1 -1
- package/dist/stzh-components/p-bdff55a6.entry.js +2 -0
- package/dist/stzh-components/{p-78a16599.entry.js.map → p-bdff55a6.entry.js.map} +1 -1
- package/dist/stzh-components/{p-ee82f53c.entry.js → p-c169f243.entry.js} +2 -2
- package/dist/stzh-components/{p-7d030c40.entry.js → p-c3816fd3.entry.js} +2 -2
- package/dist/stzh-components/{p-7aac960b.entry.js → p-ce6dbd52.entry.js} +2 -2
- package/dist/stzh-components/{p-50c1632e.entry.js → p-d0ecdd5b.entry.js} +2 -2
- package/dist/stzh-components/{p-50c1632e.entry.js.map → p-d0ecdd5b.entry.js.map} +1 -1
- package/dist/stzh-components/{p-722b9e40.entry.js → p-d46bbc8c.entry.js} +2 -2
- package/dist/stzh-components/{p-c9eecee7.entry.js → p-d48ecb2f.entry.js} +2 -2
- package/dist/stzh-components/{p-ea152ff3.entry.js → p-d7697cf8.entry.js} +2 -2
- package/dist/stzh-components/p-d789647a.entry.js +2 -0
- package/dist/stzh-components/p-d789647a.entry.js.map +1 -0
- package/dist/stzh-components/{p-472b3327.entry.js → p-d7f1ed07.entry.js} +2 -2
- package/dist/stzh-components/{p-afde3fcd.entry.js → p-d8265b82.entry.js} +2 -2
- package/dist/stzh-components/{p-afde3fcd.entry.js.map → p-d8265b82.entry.js.map} +1 -1
- package/dist/stzh-components/{p-56346206.entry.js → p-d9fa718c.entry.js} +2 -2
- package/dist/stzh-components/p-e30a5acc.js +2 -0
- package/dist/stzh-components/p-e30a5acc.js.map +1 -0
- package/dist/stzh-components/{p-f4ed8d7e.entry.js → p-ef47c976.entry.js} +2 -2
- package/dist/stzh-components/p-ef47c976.entry.js.map +1 -0
- package/dist/stzh-components/{p-66007952.entry.js → p-f34720e2.entry.js} +2 -2
- package/dist/stzh-components/p-f34720e2.entry.js.map +1 -0
- package/dist/stzh-components/p-ffbb7594.entry.js +2 -0
- package/dist/stzh-components/p-ffbb7594.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.css +206 -22
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/types/components/stzh-accordion/stzh-accordion.d.ts +3 -0
- package/dist/types/components/stzh-app-bar/stzh-app-bar.d.ts +15 -0
- package/dist/types/components/stzh-cardlist/stzh-cardlist.d.ts +1 -0
- package/dist/types/components/stzh-chip/stzh-chip.d.ts +1 -1
- package/dist/types/components/stzh-contact/stzh-contact.d.ts +2 -0
- package/dist/types/components/stzh-contact-cv/stzh-contact-cv.d.ts +23 -0
- package/dist/types/components/stzh-contact-cv/stzh-contact-cv.localization.d.ts +8 -0
- package/dist/types/components/stzh-datepicker/stzh-datepicker.d.ts +1 -1
- package/dist/types/components/stzh-iframe/stzh-iframe.d.ts +9 -1
- package/dist/types/components/stzh-input/stzh-input.d.ts +3 -0
- package/dist/types/components/stzh-pagination/stzh-pagination.d.ts +4 -0
- package/dist/types/components/stzh-popover/stzh-popover.d.ts +12 -3
- package/dist/types/components/stzh-section/stzh-section.d.ts +1 -1
- package/dist/types/components/stzh-sticky-actions/stzh-sticky-actions.d.ts +1 -0
- package/dist/types/components/stzh-upload/models/stzh-photographing-configuration.dto.d.ts +5 -0
- package/dist/types/components/stzh-upload/models/stzh-photographing-pdf-file.dto.d.ts +5 -0
- package/dist/types/components/stzh-upload/models/stzh-photographing-url-details.dto.d.ts +4 -0
- package/dist/types/components/stzh-upload/stzh-upload.d.ts +36 -0
- package/dist/types/components/stzh-upload/stzh-upload.localization.d.ts +6 -0
- package/dist/types/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.d.ts +7 -0
- package/dist/types/components/stzh-vbz-intro/stzh-vbz-intro.d.ts +15 -0
- package/dist/types/components/stzh-vbz-intro/stzh-vbz-intro.localization.d.ts +4 -0
- package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.d.ts +2 -1
- package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.localization.d.ts +1 -2
- package/dist/types/components.d.ts +186 -10
- package/dist/types/index.d.ts +4 -0
- package/dist/types/utils/utils.d.ts +7 -0
- package/dist/vscode-data.json +120 -1
- package/package.json +3 -1
- package/dist/cjs/stzh-list-item.cjs.entry.js +0 -27
- package/dist/cjs/stzh-list-item.cjs.entry.js.map +0 -1
- package/dist/cjs/stzh-list.cjs.entry.js.map +0 -1
- package/dist/cjs/utils-d0fff87f.js.map +0 -1
- package/dist/esm/stzh-list-item.entry.js.map +0 -1
- package/dist/esm/stzh-list.entry.js.map +0 -1
- package/dist/esm/utils-54aead01.js.map +0 -1
- package/dist/stzh-components/p-012dc71e.entry.js +0 -2
- package/dist/stzh-components/p-100d4052.entry.js +0 -2
- package/dist/stzh-components/p-100d4052.entry.js.map +0 -1
- package/dist/stzh-components/p-1f0e8499.entry.js +0 -2
- package/dist/stzh-components/p-1f0e8499.entry.js.map +0 -1
- package/dist/stzh-components/p-204a6e41.entry.js.map +0 -1
- package/dist/stzh-components/p-20db8d01.entry.js.map +0 -1
- package/dist/stzh-components/p-2d7966cf.entry.js +0 -2
- package/dist/stzh-components/p-4db427d5.entry.js.map +0 -1
- package/dist/stzh-components/p-4f49450d.entry.js.map +0 -1
- package/dist/stzh-components/p-523c0bb1.entry.js +0 -2
- package/dist/stzh-components/p-523c0bb1.entry.js.map +0 -1
- package/dist/stzh-components/p-52a914cd.entry.js +0 -2
- package/dist/stzh-components/p-52a914cd.entry.js.map +0 -1
- package/dist/stzh-components/p-59a1a257.entry.js.map +0 -1
- package/dist/stzh-components/p-648b7232.entry.js +0 -2
- package/dist/stzh-components/p-648b7232.entry.js.map +0 -1
- package/dist/stzh-components/p-66007952.entry.js.map +0 -1
- package/dist/stzh-components/p-6ab9dee8.entry.js +0 -2
- package/dist/stzh-components/p-6ab9dee8.entry.js.map +0 -1
- package/dist/stzh-components/p-6c2289da.entry.js +0 -2
- package/dist/stzh-components/p-6c2289da.entry.js.map +0 -1
- package/dist/stzh-components/p-72c375c7.entry.js.map +0 -1
- package/dist/stzh-components/p-75b79adf.entry.js.map +0 -1
- package/dist/stzh-components/p-771d370d.entry.js +0 -2
- package/dist/stzh-components/p-771d370d.entry.js.map +0 -1
- package/dist/stzh-components/p-77ba1f21.entry.js +0 -2
- package/dist/stzh-components/p-77ba1f21.entry.js.map +0 -1
- package/dist/stzh-components/p-78a16599.entry.js +0 -2
- package/dist/stzh-components/p-7e304ea3.js +0 -2
- package/dist/stzh-components/p-7e304ea3.js.map +0 -1
- package/dist/stzh-components/p-7efbb643.entry.js +0 -2
- package/dist/stzh-components/p-7efbb643.entry.js.map +0 -1
- package/dist/stzh-components/p-991309dd.entry.js +0 -2
- package/dist/stzh-components/p-991309dd.entry.js.map +0 -1
- package/dist/stzh-components/p-af7855ff.entry.js +0 -2
- package/dist/stzh-components/p-af7855ff.entry.js.map +0 -1
- package/dist/stzh-components/p-c877d32c.entry.js.map +0 -1
- package/dist/stzh-components/p-cc1f8acc.js +0 -2
- package/dist/stzh-components/p-cf856610.entry.js +0 -2
- package/dist/stzh-components/p-cf856610.entry.js.map +0 -1
- package/dist/stzh-components/p-ef21f4dc.entry.js.map +0 -1
- package/dist/stzh-components/p-f4ed8d7e.entry.js.map +0 -1
- package/dist/stzh-components/p-fdd6e755.entry.js +0 -2
- package/dist/stzh-components/p-fdd6e755.entry.js.map +0 -1
- /package/dist/stzh-components/{p-9684b22d.entry.js.map → p-09480ffe.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-161ae3d1.entry.js.map → p-0b15d79b.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c1cd45e1.entry.js.map → p-12bffe97.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-27d5ad01.entry.js.map → p-16a2675e.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-0fb40e48.entry.js.map → p-24ea178a.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-3f0d3919.entry.js.map → p-2812752a.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-68d33cd3.entry.js.map → p-29c1cb5c.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-801af922.entry.js.map → p-30a522e0.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-d10a6897.entry.js.map → p-30a7c058.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-7ca981d1.entry.js.map → p-3261eab4.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-5d4a2df0.entry.js.map → p-32cb5b94.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-97df1d9f.entry.js.map → p-346d2f3d.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-8f1dbd3b.entry.js.map → p-3912a256.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-6fdc4c74.entry.js.map → p-39acdb68.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-edf77853.entry.js.map → p-63c76fd5.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-533fea0b.entry.js.map → p-67e61035.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-80fafa1d.entry.js.map → p-6fffe2c8.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-eb79f3ed.entry.js.map → p-82c53e4f.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-8e0a2441.entry.js.map → p-87f3052b.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-b566a2c0.entry.js.map → p-8a82bf60.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-9b43127f.entry.js.map → p-8b04698a.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-7754870d.entry.js.map → p-9c1b3929.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-cff05968.entry.js.map → p-a249f3f6.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-a2e9723b.entry.js.map → p-aa3e4203.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-f5821678.entry.js.map → p-ab5ee55b.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-ce99f5e8.entry.js.map → p-acef653a.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c5dbf7ad.entry.js.map → p-b03f41c3.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-ee82f53c.entry.js.map → p-c169f243.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-7d030c40.entry.js.map → p-c3816fd3.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-7aac960b.entry.js.map → p-ce6dbd52.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-722b9e40.entry.js.map → p-d46bbc8c.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c9eecee7.entry.js.map → p-d48ecb2f.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-ea152ff3.entry.js.map → p-d7697cf8.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-472b3327.entry.js.map → p-d7f1ed07.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-56346206.entry.js.map → p-d9fa718c.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-iframe.js","sourceRoot":"","sources":["../../../../src/components/stzh-iframe/stzh-iframe.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,GAEN,MAAM,eAAe,CAAC;AASvB,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,qBAAqB,GAAG,gCAAgC,CAAC;AAE/D,IAAI,aAAa,GAAG,CAAC,CAAC;AAEtB;;;;GAIG;AAMH,MAAM,OAAO,UAAU;;IAiDb,SAAI,GAAkB,IAAI,CAAC;IAkE3B,gBAAW,GAAY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AAC,IAAI,CAAC,oBAAoB,GAAG,EAA2B,CAAC,EACtE,KAAK,EAAC,gCAAgC,EACtC,IAAI,EAAC,OAAO,EACZ,eAAe,EAAE,GAAG,IAAI,CAAC,UAAU,kBAAkB,EACrD,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAC5B,KAAK,EAAE,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,YAAY,CAAC,mBAAmB,EACvE,OAAO,EAAE,IAAI,CAAC,4BAA4B,GAC7B,CACX;YAEL,CAAC,IAAI,CAAC,WAAW;cAChB,cACE,KAAK,EAAC,+BAA+B,EACrC,OAAO,EAAE,IAAI,CAAC,0BAA0B,gBAC5B,IAAI,CAAC,YAAY,CAAC,iBAAiB;gBAE/C,iBAAW,KAAK,EAAC,oCAAoC,EAAC,IAAI,EAAC,OAAO,GAAa,CACxE,CAEP,CAEJ,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Watch,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\n\nimport {\n StzhIframeView,\n StzhIframePreviewSkipEvent,\n StzhIframeViewChangeEvent,\n} from \"../../index\";\nimport { StzhIframeLocalizedText } from \"./stzh-iframe.localization\";\n\nimport Cookies from \"js-cookie\";\n\nconst COOKIE_PREFIX_CONFIRM = \"stzh-components-iframe-confirm\";\n\nlet iframeCounter = 0;\n\n/**\n * @slot preview-logo - Slot for logo\n * @slot preview-image - Slot for preview image\n * @slot cookiewall-text - Slot for cookiewall text\n */\n@Component({\n tag: \"stzh-iframe\",\n styleUrl: \"stzh-iframe.scss\",\n scoped: true\n})\nexport class StzhIframe {\n /** Translation strings */\n @Prop() localization: StzhIframeLocalizedText;\n\n /** Id of iframe */\n @Prop() iframeId: string;\n\n /** Error text of iframe if couldn't be loaded */\n @Prop() iframeErrorText: string;\n\n /**\n * Name of iframe\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe?retiredLocale=de#name\n */\n @Prop() name: string;\n\n /**\n * Sandbox of iframe\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe?retiredLocale=de#sandbox\n */\n @Prop() sandbox: string;\n\n /**\n * ReferrerPolicy of Iframe\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe?retiredLocale=de#referrerpolicy\n */\n @Prop() referrerpolicy: \"no-referrer\"\n | \"no-referrer-when-downgrade\"\n | \"origin\"\n | \"origin-when-cross-origin\"\n | \"same-origin\"\n | \"strict-origin\"\n | \"strict-origin-when-cross-origin\"\n | \"unsafe-url\";\n\n /**\n * Allow of Iframe\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe?retiredLocale=de#allow\n */\n @Prop() allow: string = \"autoplay; fullscreen\";\n\n /** Width of iframe */\n @Prop() width: string;\n\n /** Width of iframe */\n @Prop() height: string;\n\n /** `src` of iframe */\n @Prop() src: string = \"\";\n private _src: string | null = null;\n\n /**\n * Cookie name (if not empty, the user will be shown a cookie wall)\n * Will be prefixed with `stzh-components-iframe-confirm-`.\n */\n @Prop() cookie: string;\n\n /**\n * Number of days the cookie is valid for.\n * If omitted or set to null, the cookie expires when browser is closed.\n * Maximum is on year (365 days, is default).\n */\n @Prop() cookieExpires: number | null = 365;\n\n /** Confirm button icon */\n @Prop() cookieConfirmIcon: string;\n\n /** Confirm button label */\n @Prop() cookieConfirmLabel: string;\n\n /** Confirm text (use instead of `cookiewall-text` slot) */\n @Prop() cookieConfirmText: string;\n\n /** Preview label */\n @Prop() previewLabel: string;\n\n /** Preview icon */\n @Prop() previewIcon: string = \"external-link\";\n\n /** Whether preview should be skipped, if user has passed the cookiewall before */\n @Prop() skipPreviewIfCookieAccepted: boolean = false;\n\n /** Whether preview should always be skipped */\n @Prop() skipPreview: boolean = false;\n\n @Element() element: HTMLStzhIframeElement;\n\n @State() view: StzhIframeView = \"preview\";\n\n /** Preview skip (only gets executed if it goes directly to iframe and not cookiewall) */\n @Event() stzhPreviewSkip: EventEmitter<StzhIframePreviewSkipEvent>;\n\n /** View change */\n @Event() stzhViewChange: EventEmitter<StzhIframeViewChangeEvent>;\n\n @Watch(\"src\")\n srcWatcher(newValue: string) {\n if (this.view === \"iframe\") {\n this._src = newValue;\n }\n }\n\n @Watch(\"view\")\n viewWatcher(newValue: StzhIframeView) {\n if (newValue === \"iframe\") {\n this._src = this.src;\n } else {\n this._src = null;\n }\n }\n\n private internalId: string;\n private iframeElement: HTMLIFrameElement;\n private previewButtonElement: HTMLButtonElement;\n private confirmButtonElement: HTMLStzhButtonElement;\n private updateFocus: boolean = false;\n\n private handleIframeLoad = () => {\n if (this.updateFocus) {\n this.iframeElement.focus();\n this.updateFocus = false;\n }\n }\n\n private handleCookiewallCloseClick = () => {\n this.updateFocus = true;\n this.view = \"preview\";\n\n this.stzhViewChange.emit({\n component: \"stzh-iframe\",\n value: this.view\n });\n }\n\n private handleCookiewallConfirmClick = () => {\n Cookies.set(`${COOKIE_PREFIX_CONFIRM}-${this.cookie}`, \"1\", {\n expires: this.cookieExpires || null\n });\n\n this.updateFocus = true;\n this.view = \"iframe\";\n\n this.stzhViewChange.emit({\n component: \"stzh-iframe\",\n value: this.view\n });\n }\n\n private handlePreviewClick = () => {\n\t\tconst cookieAccepted = Cookies.get(`${COOKIE_PREFIX_CONFIRM}-${this.cookie}`) || false;\n this.updateFocus = true;\n\n if (!this.cookie || cookieAccepted) {\n this.view = \"iframe\";\n } else {\n this.view = \"cookiewall\";\n }\n\n this.stzhViewChange.emit({\n component: \"stzh-iframe\",\n value: this.view\n });\n }\n\n async componentWillLoad() {\n this.internalId = `stzh-iframe-${iframeCounter++}`;\n\n\t\tconst cookieAccepted = Cookies.get(`${COOKIE_PREFIX_CONFIRM}-${this.cookie}`) || false;\n\n if (\n ((!this.cookie || cookieAccepted) && (this.skipPreviewIfCookieAccepted || this.skipPreview))\n || (!this.cookie && this.skipPreview)\n ) {\n this.stzhPreviewSkip.emit({\n component: \"stzh-iframe\"\n });\n\n this.view = \"iframe\";\n } else if (this.cookie && this.skipPreview) {\n this.view = \"cookiewall\";\n }\n\n this.viewWatcher(this.view);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"iframe\");\n }\n }\n\n async componentDidRender() {\n if (this.updateFocus) {\n if (this.view === \"iframe\") {\n // wait for iframe load event (handleIframeLoad)\n } else if (this.view === \"preview\") {\n this.previewButtonElement.focus();\n this.updateFocus = false;\n } else if (this.view === \"cookiewall\") {\n this.confirmButtonElement.focus();\n this.updateFocus = false;\n }\n }\n }\n\n render() {\n const classes = {\n \"stzh-iframe\": true,\n };\n\n return (\n <Host>\n <div class={classes}>\n {this.view === \"iframe\" &&\n <iframe\n id={this.iframeId}\n name={this.name}\n sandbox={this.sandbox}\n referrerPolicy={this.referrerpolicy}\n width={this.width}\n height={this.height}\n ref={(el) => (this.iframeElement = el as HTMLIFrameElement)}\n class=\"stzh-iframe__iframe\"\n src={this._src}\n allow={this.allow}\n onLoad={this.handleIframeLoad}\n >{this.iframeErrorText}</iframe>\n }\n\n <button\n ref={(el) => (this.previewButtonElement = el as HTMLButtonElement)}\n onClick={this.handlePreviewClick}\n aria-label={this.previewLabel || this.localization.defaultPreviewLabel}\n // disabled={this.view === \"cookiewall\"}\n class={{\n \"stzh-iframe__preview\": true,\n \"is-visible\": this.view === \"preview\" || this.view === \"cookiewall\"\n }}\n >\n <div class=\"stzh-iframe__preview-image-wrapper\">\n <slot name=\"preview-image\"></slot>\n </div>\n\n <div class=\"stzh-iframe__preview-logo-wrapper\">\n <slot name=\"preview-logo\"></slot>\n </div>\n\n {this.previewIcon &&\n <div class={{\n \"stzh-iframe__preview-run\": true,\n \"is-visible\": this.view === \"preview\"\n }}>\n <stzh-icon class=\"stzh-iframe__preview-run-icon\" name={this.previewIcon}></stzh-icon>\n </div>\n }\n </button>\n\n {this.cookie &&\n <div\n class={{\n \"stzh-iframe__cookiewall\": true,\n \"is-visible\": this.view === \"cookiewall\"\n }}\n >\n <div class=\"stzh-iframe__cookiewall-content\">\n <div\n class=\"stzh-iframe__cookiewall-text\"\n id={`${this.internalId}-cookiewall-text`}\n >\n {this.cookieConfirmText ? this.cookieConfirmText : <slot name=\"cookiewall-text\"></slot>}\n </div>\n\n <stzh-button\n ref={(el) => (this.confirmButtonElement = el as HTMLStzhButtonElement)}\n class=\"stzh-iframe__cookiewall-button\"\n size=\"small\"\n a11yDescribedby={`${this.internalId}-cookiewall-text`}\n icon={this.cookieConfirmIcon}\n label={this.cookieConfirmLabel || this.localization.defaultConfirmLabel}\n onClick={this.handleCookiewallConfirmClick}\n ></stzh-button>\n </div>\n\n {!this.skipPreview &&\n <button\n class=\"stzh-iframe__cookiewall-close\"\n onClick={this.handleCookiewallCloseClick}\n aria-label={this.localization.confirmCloseLabel}\n >\n <stzh-icon class=\"stzh-iframe__cookiewall-close-icon\" name=\"close\"></stzh-icon>\n </button>\n }\n </div>\n }\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"stzh-iframe.js","sourceRoot":"","sources":["../../../../src/components/stzh-iframe/stzh-iframe.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK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State, Watch } from \"@stencil/core\";\n\nimport { StzhIframePreviewSkipEvent, StzhIframeView, StzhIframeViewChangeEvent } from \"../../index\";\nimport { StzhIframeLocalizedText } from \"./stzh-iframe.localization\";\n\nimport Cookies from \"js-cookie\";\nimport iFrameResizeModule from \"iframe-resizer\";\nimport { getStzhEnvironment, StzhEnvironmentEnum } from \"../../utils/utils\";\n\nconst COOKIE_PREFIX_CONFIRM = \"stzh-components-iframe-confirm\";\n\nlet iframeCounter = 0;\n\n/**\n * @slot preview-logo - Slot for logo\n * @slot preview-image - Slot for preview image\n * @slot cookiewall-text - Slot for cookiewall text\n */\n@Component({\n tag: \"stzh-iframe\",\n styleUrl: \"stzh-iframe.scss\",\n scoped: true,\n})\nexport class StzhIframe {\n /** Translation strings */\n @Prop() localization: StzhIframeLocalizedText;\n\n /** Id of iframe */\n @Prop() iframeId: string;\n\n /** Error text of iframe if couldn't be loaded */\n @Prop() iframeErrorText: string;\n\n /** Automatic height resizing of iFrame */\n @Prop() iframeResizerVariant: \"None\" | \"PostMessage\" | \"SameSecondLevelDomain\" = \"None\";\n\n /** Height correction for automatically resized iFrames */\n @Prop() iframeResizerHeightCorrection: number;\n\n /** Second level domain for automatically resized iFrames */\n @Prop() iframeResizerSecondlevelDomain: string;\n\n /**\n * Name of iframe\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe?retiredLocale=de#name\n */\n @Prop() name: string;\n\n /**\n * Sandbox of iframe\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe?retiredLocale=de#sandbox\n */\n @Prop() sandbox: string;\n\n /**\n * ReferrerPolicy of Iframe\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe?retiredLocale=de#referrerpolicy\n */\n @Prop() referrerpolicy:\n | \"no-referrer\"\n | \"no-referrer-when-downgrade\"\n | \"origin\"\n | \"origin-when-cross-origin\"\n | \"same-origin\"\n | \"strict-origin\"\n | \"strict-origin-when-cross-origin\"\n | \"unsafe-url\";\n\n /**\n * Allow of Iframe\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe?retiredLocale=de#allow\n */\n @Prop() allow: string = \"autoplay; fullscreen\";\n\n /** Width of iframe */\n @Prop() width: string = \"100%\";\n\n /** Width of iframe */\n @Prop() height: string = \"100%\";\n\n /** `src` of iframe */\n @Prop() src: string = \"\";\n private _src: string | null = null;\n\n /**\n * Cookie name (if not empty, the user will be shown a cookie wall)\n * Will be prefixed with `stzh-components-iframe-confirm-`.\n */\n @Prop() cookie: string;\n\n /**\n * Number of days the cookie is valid for.\n * If omitted or set to null, the cookie expires when browser is closed.\n * Maximum is on year (365 days, is default).\n */\n @Prop() cookieExpires: number | null = 365;\n\n /** Confirm button icon */\n @Prop() cookieConfirmIcon: string;\n\n /** Confirm button label */\n @Prop() cookieConfirmLabel: string;\n\n /** Confirm text (use instead of `cookiewall-text` slot) */\n @Prop() cookieConfirmText: string;\n\n /** Preview label */\n @Prop() previewLabel: string;\n\n /** Preview icon */\n @Prop() previewIcon: string = \"external-link\";\n\n /** Whether preview should be skipped, if user has passed the cookiewall before */\n @Prop() skipPreviewIfCookieAccepted: boolean = false;\n\n /** Whether preview should always be skipped */\n @Prop() skipPreview: boolean = false;\n\n @Element() element: HTMLStzhIframeElement;\n\n @State() view: StzhIframeView = \"preview\";\n\n /** Preview skip (only gets executed if it goes directly to iframe and not cookiewall) */\n @Event() stzhPreviewSkip: EventEmitter<StzhIframePreviewSkipEvent>;\n\n /** View change */\n @Event() stzhViewChange: EventEmitter<StzhIframeViewChangeEvent>;\n\n @Watch(\"src\")\n srcWatcher(newValue: string) {\n if (this.view === \"iframe\") {\n this._src = newValue;\n }\n }\n\n @Watch(\"view\")\n viewWatcher(newValue: StzhIframeView) {\n if (newValue === \"iframe\") {\n this._src = this.src;\n } else {\n this._src = null;\n }\n }\n\n private internalId: string;\n private iframeElement: HTMLIFrameElement;\n private previewButtonElement: HTMLButtonElement;\n private confirmButtonElement: HTMLStzhButtonElement;\n private updateFocus: boolean = false;\n\n private handleIframeLoad = () => {\n if (this.updateFocus) {\n this.iframeElement.focus();\n this.updateFocus = false;\n }\n this.initializeIframeResizing();\n };\n\n private initializeIframeResizing() {\n switch (this.iframeResizerVariant) {\n case \"None\":\n return;\n case \"PostMessage\":\n console.log(\"iFrameResizeModule\", iFrameResizeModule);\n iFrameResizeModule.iframeResize(\n { log: getStzhEnvironment() !== StzhEnvironmentEnum.PROD, checkOrigin: false },\n this.iframeElement\n );\n break;\n case \"SameSecondLevelDomain\":\n if (!this.iframeResizerSecondlevelDomain) {\n console.log(\"stzh-iframe:\", \"property 'iframeSecondlevelDomain' not filled out.\");\n }\n this.setupIframeAutoSizing({\n frameId: this.iframeId,\n heightCorrection: this.iframeResizerHeightCorrection || 0,\n hasSameDomain: false,\n secondLevelDomain: this.iframeResizerSecondlevelDomain,\n });\n break;\n }\n }\n\n private setupIframeAutoSizing(config: {\n frameId: string;\n heightCorrection: number;\n hasSameDomain: boolean;\n secondLevelDomain: string;\n }) {\n const createResizer = (iframe: HTMLIFrameElement, config: { heightCorrection: number }) => {\n return () => {\n try {\n const newHeight = iframe.contentWindow?.document.body.scrollHeight || 0;\n if (newHeight > 0) {\n iframe.style.height = `${newHeight + config.heightCorrection}px`;\n }\n } catch (error) {\n console.warn(\"stzh-iframe:\", \"Resizing not possible, perhaps due to cross-domain restrictions:\", error);\n }\n };\n };\n\n if (!config.hasSameDomain) {\n document.domain = config.secondLevelDomain;\n }\n\n const iframe = document.getElementById(config.frameId) as HTMLIFrameElement;\n if (!iframe) {\n console.error(`Iframe with ID ${config.frameId} not found`);\n return;\n }\n\n const resizer = createResizer(iframe, config);\n window.addEventListener(\"resize\", resizer);\n iframe.addEventListener(\"load\", resizer);\n iframe.addEventListener(\"blur\", resizer);\n iframe.addEventListener(\"readystatechange\", resizer); // hack for internet explorer...\n\n try {\n // this might go wrong on IE, if iframe hasn't fully loaded yet, but it doesn't matter.\n resizer();\n } catch (error) {\n console.warn(\"Initial resize failed, likely due to iframe not being fully loaded yet:\", error);\n }\n }\n\n private handleCookiewallCloseClick = () => {\n this.updateFocus = true;\n this.view = \"preview\";\n\n this.stzhViewChange.emit({\n component: \"stzh-iframe\",\n value: this.view,\n });\n };\n\n private handleCookiewallConfirmClick = () => {\n Cookies.set(`${COOKIE_PREFIX_CONFIRM}-${this.cookie}`, \"1\", {\n expires: this.cookieExpires || null,\n });\n\n this.updateFocus = true;\n this.view = \"iframe\";\n\n this.stzhViewChange.emit({\n component: \"stzh-iframe\",\n value: this.view,\n });\n };\n\n private handlePreviewClick = () => {\n const cookieAccepted = Cookies.get(`${COOKIE_PREFIX_CONFIRM}-${this.cookie}`) || false;\n this.updateFocus = true;\n\n if (!this.cookie || cookieAccepted) {\n this.view = \"iframe\";\n } else {\n this.view = \"cookiewall\";\n }\n\n this.stzhViewChange.emit({\n component: \"stzh-iframe\",\n value: this.view,\n });\n };\n\n async componentWillLoad() {\n this.internalId = `stzh-iframe-${iframeCounter++}`;\n\n const cookieAccepted = Cookies.get(`${COOKIE_PREFIX_CONFIRM}-${this.cookie}`) || false;\n\n if (\n ((!this.cookie || cookieAccepted) && (this.skipPreviewIfCookieAccepted || this.skipPreview)) ||\n (!this.cookie && this.skipPreview)\n ) {\n this.stzhPreviewSkip.emit({\n component: \"stzh-iframe\",\n });\n\n this.view = \"iframe\";\n } else if (this.cookie && this.skipPreview) {\n this.view = \"cookiewall\";\n }\n\n this.viewWatcher(this.view);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"iframe\");\n }\n }\n\n async componentDidRender() {\n if (this.updateFocus) {\n if (this.view === \"iframe\") {\n // wait for iframe load event (handleIframeLoad)\n } else if (this.view === \"preview\") {\n this.previewButtonElement.focus();\n this.updateFocus = false;\n } else if (this.view === \"cookiewall\") {\n this.confirmButtonElement.focus();\n this.updateFocus = false;\n }\n }\n }\n\n render() {\n const classes = {\n \"stzh-iframe\": true,\n };\n\n return (\n <Host>\n <div class={classes}>\n {this.view === \"iframe\" && (\n <iframe\n id={this.iframeId}\n name={this.name}\n sandbox={this.sandbox}\n referrerPolicy={this.referrerpolicy}\n width={this.width}\n height={this.height}\n ref={el => (this.iframeElement = el as HTMLIFrameElement)}\n class=\"stzh-iframe__iframe\"\n src={this._src}\n allow={this.allow}\n onLoad={this.handleIframeLoad}\n >\n {this.iframeErrorText}\n </iframe>\n )}\n\n <button\n ref={el => (this.previewButtonElement = el as HTMLButtonElement)}\n onClick={this.handlePreviewClick}\n aria-label={this.previewLabel || this.localization.defaultPreviewLabel}\n // disabled={this.view === \"cookiewall\"}\n class={{\n \"stzh-iframe__preview\": true,\n \"is-visible\": this.view === \"preview\" || this.view === \"cookiewall\",\n }}\n >\n <div class=\"stzh-iframe__preview-image-wrapper\">\n <slot name=\"preview-image\"></slot>\n </div>\n\n <div class=\"stzh-iframe__preview-logo-wrapper\">\n <slot name=\"preview-logo\"></slot>\n </div>\n\n {this.previewIcon && (\n <div\n class={{\n \"stzh-iframe__preview-run\": true,\n \"is-visible\": this.view === \"preview\",\n }}\n >\n <stzh-icon class=\"stzh-iframe__preview-run-icon\" name={this.previewIcon}></stzh-icon>\n </div>\n )}\n </button>\n\n {this.cookie && (\n <div\n class={{\n \"stzh-iframe__cookiewall\": true,\n \"is-visible\": this.view === \"cookiewall\",\n }}\n >\n <div class=\"stzh-iframe__cookiewall-content\">\n <div class=\"stzh-iframe__cookiewall-text\" id={`${this.internalId}-cookiewall-text`}>\n {this.cookieConfirmText ? this.cookieConfirmText : <slot name=\"cookiewall-text\"></slot>}\n </div>\n\n <stzh-button\n ref={el => (this.confirmButtonElement = el as HTMLStzhButtonElement)}\n class=\"stzh-iframe__cookiewall-button\"\n size=\"small\"\n a11yDescribedby={`${this.internalId}-cookiewall-text`}\n icon={this.cookieConfirmIcon}\n label={this.cookieConfirmLabel || this.localization.defaultConfirmLabel}\n onClick={this.handleCookiewallConfirmClick}\n ></stzh-button>\n </div>\n\n {!this.skipPreview && (\n <button\n class=\"stzh-iframe__cookiewall-close\"\n onClick={this.handleCookiewallCloseClick}\n aria-label={this.localization.confirmCloseLabel}\n >\n <stzh-icon class=\"stzh-iframe__cookiewall-close-icon\" name=\"close\"></stzh-icon>\n </button>\n )}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -41,6 +41,10 @@ const TEMPLATE_NO_PREVIEW = `
|
|
|
41
41
|
</stzh-ratio>
|
|
42
42
|
`;
|
|
43
43
|
|
|
44
|
+
const TEMPLATE_EMPTY = `
|
|
45
|
+
<stzh-iframe></stzh-iframe>
|
|
46
|
+
`;
|
|
47
|
+
|
|
44
48
|
export default {
|
|
45
49
|
title: 'Components/Iframe',
|
|
46
50
|
component: COMPONENT_NAME,
|
|
@@ -60,33 +64,30 @@ export default {
|
|
|
60
64
|
allowFullscreen: true
|
|
61
65
|
}
|
|
62
66
|
},
|
|
63
|
-
decorators: [
|
|
64
|
-
withActions,
|
|
65
|
-
withDesign
|
|
66
|
-
]
|
|
67
|
+
decorators: [withActions, withDesign]
|
|
67
68
|
};
|
|
68
69
|
|
|
69
70
|
export const Default = {
|
|
70
71
|
render: (args) => story(args, TEMPLATE),
|
|
71
72
|
args: {
|
|
72
|
-
src:
|
|
73
|
+
src: 'https://example.com'
|
|
73
74
|
}
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
export const WithPreviewImage = {
|
|
77
78
|
render: (args) => story(args, TEMPLATE_PREVIEW_IMAGE),
|
|
78
79
|
args: {
|
|
79
|
-
src:
|
|
80
|
+
src: 'https://example.com'
|
|
80
81
|
}
|
|
81
82
|
};
|
|
82
83
|
|
|
83
84
|
export const WithCookieWall = {
|
|
84
85
|
render: (args) => story(args, TEMPLATE_WITH_COOKIEWALL),
|
|
85
86
|
args: {
|
|
86
|
-
src:
|
|
87
|
-
cookie:
|
|
88
|
-
'cookie-confirm-icon':
|
|
89
|
-
'cookie-confirm-label':
|
|
87
|
+
src: 'https://example.com',
|
|
88
|
+
cookie: 'example-app',
|
|
89
|
+
'cookie-confirm-icon': 'checkmark-circle',
|
|
90
|
+
'cookie-confirm-label': 'Confirm',
|
|
90
91
|
'cookie-expires': 0
|
|
91
92
|
}
|
|
92
93
|
};
|
|
@@ -94,7 +95,25 @@ export const WithCookieWall = {
|
|
|
94
95
|
export const NoPreview = {
|
|
95
96
|
render: (args) => story(args, TEMPLATE_PREVIEW_IMAGE),
|
|
96
97
|
args: {
|
|
97
|
-
src:
|
|
98
|
+
src: 'https://example.com',
|
|
99
|
+
'skip-preview': true
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const FixedHeight = {
|
|
104
|
+
render: (args) => story(args, TEMPLATE_EMPTY),
|
|
105
|
+
args: {
|
|
106
|
+
src: 'https://example.com',
|
|
107
|
+
'skip-preview': true,
|
|
108
|
+
height: '300'
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const ResizerPostMessage = {
|
|
113
|
+
render: (args) => story(args, TEMPLATE_EMPTY),
|
|
114
|
+
args: {
|
|
115
|
+
src: 'https://stzh-desi-unic-iframe.netlify.app',
|
|
98
116
|
'skip-preview': true,
|
|
117
|
+
'iframe-resizer-variant': 'PostMessage'
|
|
99
118
|
}
|
|
100
119
|
};
|
|
@@ -475,7 +475,7 @@
|
|
|
475
475
|
line-height: var(--stzh-font-nano-text-line-height);
|
|
476
476
|
margin-left: calc(-0.25em + var(--stzh-space-xsmall));
|
|
477
477
|
}
|
|
478
|
-
.stzh-input--type-password.stzh-input--is-not-
|
|
478
|
+
.stzh-input--type-password.stzh-input--is-not-filled .stzh-input__button-right, .stzh-input--type-password.stzh-input--is-readonly .stzh-input__button-right, .stzh-input--type-password.stzh-input--is-disabled .stzh-input__button-right, .stzh-input--type-search.stzh-input--is-not-clearable .stzh-input__button-right, .stzh-input--type-search.stzh-input--is-not-filled .stzh-input__button-right, .stzh-input--type-search.stzh-input--is-readonly .stzh-input__button-right, .stzh-input--type-search.stzh-input--is-disabled .stzh-input__button-right {
|
|
479
479
|
pointer-events: none;
|
|
480
480
|
}
|
|
481
481
|
.stzh-input--has-button-right .stzh-input__input {
|
|
@@ -28,6 +28,9 @@ export class StzhInput {
|
|
|
28
28
|
value: this.value,
|
|
29
29
|
});
|
|
30
30
|
};
|
|
31
|
+
this.onTogglePasswordVisibilityClick = async () => {
|
|
32
|
+
this.showPassword = !this.showPassword;
|
|
33
|
+
};
|
|
31
34
|
this.handleReset = async () => {
|
|
32
35
|
this.value = this.defaultValue;
|
|
33
36
|
// we also update value, since render doesn't get executed sometimes
|
|
@@ -120,6 +123,7 @@ export class StzhInput {
|
|
|
120
123
|
this.size = "default";
|
|
121
124
|
this.a11yDescribedby = "";
|
|
122
125
|
this.filled = undefined;
|
|
126
|
+
this.showPassword = undefined;
|
|
123
127
|
}
|
|
124
128
|
resetListener(event) {
|
|
125
129
|
if (event.target.contains(this.element)) {
|
|
@@ -165,7 +169,7 @@ export class StzhInput {
|
|
|
165
169
|
return (h("textarea", { class: "stzh-input__input stzh-input__input--textarea", ref: el => (this.input = el), id: this.inputId, name: this.name, value: this.value, rows: this.rows, disabled: this.disabled, readonly: this.readonly, minlength: this.minlength, maxlength: this.maxlength, "aria-describedby": `${this.inputId}-description ${this.a11yDescribedby}`, "aria-required": this.required ? "true" : "false", "aria-invalid": this.invalid ? "true" : "false", onChange: this.onChange, onInput: this.onInput, onFocus: this.onFocus, onBlur: this.onBlur }));
|
|
166
170
|
}
|
|
167
171
|
renderInput() {
|
|
168
|
-
return (h("input", { class: "stzh-input__input stzh-input__input--input", ref: el => (this.input = el), id: this.inputId, type: this.type, name: this.name, value: this.value, defaultValue: this.defaultValue, min: this.min, max: this.max, step: this.step, inputmode: this.inputmode, disabled: this.disabled, readonly: this.readonly, minlength: this.minlength, maxlength: this.maxlength, autocomplete: this.noAutocomplete ? "off" : this.autocomplete, "aria-autocomplete": this.noAutocomplete ? "none" : undefined, "aria-describedby": `${this.inputId}-description ${this.a11yDescribedby}`, "aria-required": this.required ? "true" : "false", "aria-invalid": this.invalid ? "true" : "false", onChange: this.onChange, onInput: this.onInput, onFocus: this.onFocus, onBlur: this.onBlur }));
|
|
172
|
+
return (h("input", { class: "stzh-input__input stzh-input__input--input", ref: el => (this.input = el), id: this.inputId, type: this.showPassword ? "text" : this.type, name: this.name, value: this.value, defaultValue: this.defaultValue, min: this.min, max: this.max, step: this.step, inputmode: this.inputmode, disabled: this.disabled, readonly: this.readonly, minlength: this.minlength, maxlength: this.maxlength, autocomplete: this.noAutocomplete ? "off" : this.autocomplete, "aria-autocomplete": this.noAutocomplete ? "none" : undefined, "aria-describedby": `${this.inputId}-description ${this.a11yDescribedby}`, "aria-required": this.required ? "true" : "false", "aria-invalid": this.invalid ? "true" : "false", onChange: this.onChange, onInput: this.onInput, onFocus: this.onFocus, onBlur: this.onBlur }));
|
|
169
173
|
}
|
|
170
174
|
componentDidRender() {
|
|
171
175
|
if (this.renderPromiseResolve) {
|
|
@@ -214,7 +218,7 @@ export class StzhInput {
|
|
|
214
218
|
: this.localization.$globals.optionalFieldMarker), h("span", { class: "stzh-input__marker-text" }, this.required
|
|
215
219
|
? this.localization.$globals.requiredFieldText
|
|
216
220
|
: this.localization.$globals.optionalFieldText)))), h("div", { class: "stzh-input__field-wrapper" }, this.multiline ? this.renderTextarea() : this.renderInput(), this.clearable || this.type === "search" || this.type === "password" ? ((!this.clearable || this.disabled || this.readonly || !this.filled) &&
|
|
217
|
-
(this.type === "search" || this.type === "password") ? (h("stzh-button", { class: "stzh-input__button-right", icon: this.type === "search" ? "search" : "view", size: this.size, iconOnly: true, disabled:
|
|
221
|
+
(this.type === "search" || this.type === "password") ? (h("stzh-button", { class: "stzh-input__button-right", icon: this.type === "search" ? "search" : "view", size: this.size, iconOnly: true, onClick: this.onTogglePasswordVisibilityClick, disabled: this.disabled || this.readonly })) : this.filled ? (h("stzh-button", { class: "stzh-input__button-right", icon: "close", size: this.size, iconOnly: true, onClick: this.onClearClick, a11yLabel: this.localization.$globals.clearButtonLabel, "aria-controls": this.inputId })) : (h("slot", { name: "button-right" }))) : (h("slot", { name: "button-right" }))), (((_b = this._error) === null || _b === void 0 ? void 0 : _b.length) > 0 || this.description) && (h(StzhInputDescription, { classPrefix: "stzh-input", id: `${this.inputId}-description`, error: this._error, description: this.description, descriptionLong: this.descriptionLong, descriptionLongTitle: this.descriptionLongTitle, descriptionLongUsed: descriptionLongUsed, moreInfoButtonLabel: this.localization.$globals.moreInfoButtonLabel })))));
|
|
218
222
|
}
|
|
219
223
|
static get is() { return "stzh-input"; }
|
|
220
224
|
static get encapsulation() { return "scoped"; }
|
|
@@ -766,7 +770,8 @@ export class StzhInput {
|
|
|
766
770
|
}
|
|
767
771
|
static get states() {
|
|
768
772
|
return {
|
|
769
|
-
"filled": {}
|
|
773
|
+
"filled": {},
|
|
774
|
+
"showPassword": {}
|
|
770
775
|
};
|
|
771
776
|
}
|
|
772
777
|
static get events() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-input.js","sourceRoot":"","sources":["../../../../src/components/stzh-input/stzh-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAI7G,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;;;;;;;GAOG;AAMH,MAAM,OAAO,SAAS;;IAgKZ,mBAAc,GAAY,KAAK,CAAC;IAOhC,iBAAY,GAAG,KAAK,EAAE,KAAiB,EAAE,EAAE;MACjD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;MAChB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;MAEnB,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;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Host, Listen, Prop, State, Watch } from \"@stencil/core\";\n\nimport { StzhInputBlurEvent, StzhInputChangedEvent, StzhInputChangeEvent, StzhInputFocusEvent } from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"./stzh-input-description\";\n\nlet inputCounter = 0;\n\n/**\n * @slot - Slot for label content\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n * @slot button-right - Slot for right button\n */\n@Component({\n tag: \"stzh-input\",\n styleUrl: \"stzh-input.scss\",\n scoped: true,\n})\nexport class StzhInput {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the input is a textarea or an input field */\n @Prop() multiline: boolean = false;\n\n /** Rows attribute if input element is textarea */\n @Prop() rows: number;\n\n /** If input field, this defines the type (if `search`, a search icon will be displayed) */\n @Prop({ reflect: true }) type: \"text\" | \"search\" | \"password\" | \"email\" | \"url\" | \"tel\" | \"number\" | \"hidden\" =\n \"text\";\n\n /** If input type is number, this will be the step size */\n @Prop() step: number = 1;\n\n /** If input type is number, this will be the minimum step number */\n @Prop() min: number;\n\n /** If input type is number, this will be the maximum step number */\n @Prop() max: number;\n\n /** If input type is number and this property is true, this will show the spin buttons on hover/focus */\n @Prop({ reflect: true }) showSpin: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether clearable button is showing when input field has value and is enabled (button-right slot not usable anymore when true) */\n @Prop({ reflect: true }) clearable: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Minimum of characters */\n @Prop() minlength: number;\n\n /** Maxlength of characters */\n @Prop() maxlength: number;\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Specify inputmode.\n * See [MDN](https://developer.mozilla.org/de/docs/Web/HTML/Global_attributes/inputmode) for possible values\n */\n @Prop() inputmode: string;\n\n /**\n * Specify what the user agent has to provide as automated assistance.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for possible values\n */\n @Prop() autocomplete: string = \"on\";\n\n /** Whether autocomplete should be turned off */\n @Prop() noAutocomplete: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label should be visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Whether the input is filled or not */\n @State() filled: boolean;\n\n @Element() element: HTMLStzhInputElement;\n\n /** Input change event */\n @Event() stzhChange: EventEmitter<StzhInputChangeEvent>;\n\n /** Input changed event */\n @Event() stzhChanged: EventEmitter<StzhInputChangedEvent>;\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhInputFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhInputBlurEvent>;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Watch(\"value\")\n valueWatcher(newValue: string) {\n this.filled = newValue !== \"\";\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n @Watch(\"type\")\n typeWatcher(newValue: string) {\n const types = [\"text\", \"search\", \"password\", \"email\", \"url\", \"tel\", \"number\", \"hidden\"];\n\n if (!this.multiline && !types.includes(newValue)) {\n throw new Error(`Type ${newValue} not supported`);\n }\n }\n\n private input: HTMLInputElement | HTMLTextAreaElement;\n private inputId: string;\n private focusedByInput: boolean = false;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => (this.renderPromiseResolve = resolve));\n }\n\n private onClearClick = async (event: MouseEvent) => {\n this.value = \"\";\n this.input.focus();\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n // we also update value, since render doesn't get executed sometimes\n this.input.value = this.defaultValue;\n\n // TODO: check if we need own reset event or trigger the change event\n // (custom browser behaviour doesn't send change event, when reset is executed)\n // this.stzhChange.emit({\n // component: \"stzh-input\",\n // originalEvent: event,\n // value: this.value\n // });\n };\n\n private onInput = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onChange = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.input.focus();\n }\n\n this.focusedByInput = false;\n };\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false,\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-input\",\n originalEvent: event,\n });\n };\n\n private onBlur = (event: FocusEvent) => {\n // fixes weird bug where autofill selection doesn't get removed\n this.input.value = this.input.value;\n\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false,\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-input\",\n originalEvent: event,\n });\n };\n\n private renderTextarea(): HTMLTextAreaElement {\n return (\n <textarea\n class=\"stzh-input__input stzh-input__input--textarea\"\n ref={el => (this.input = el as HTMLTextAreaElement)}\n id={this.inputId}\n name={this.name}\n value={this.value}\n rows={this.rows}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ></textarea>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n class=\"stzh-input__input stzh-input__input--input\"\n ref={el => (this.input = el as HTMLInputElement)}\n id={this.inputId}\n type={this.type}\n name={this.name}\n value={this.value}\n defaultValue={this.defaultValue}\n min={this.min}\n max={this.max}\n step={this.step}\n inputmode={this.inputmode}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n autocomplete={this.noAutocomplete ? \"off\" : this.autocomplete}\n aria-autocomplete={this.noAutocomplete ? \"none\" : undefined}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n );\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.inputId = `stzh-input-${inputCounter++}`;\n this.typeWatcher(this.type);\n this.valueWatcher(this.value);\n this.errorWatcher(this.error);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"input\");\n }\n }\n\n render() {\n const buttonRightSlotUsed = hasSlot(this.element, \"button-right\");\n const descriptionUsed = hasSlot(this.element, \"description\") || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, \"description-long\") || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, \"error\") || this._error?.length > 0;\n\n const classes = {\n \"stzh-input\": true,\n \"stzh-input--has-button-right\":\n buttonRightSlotUsed ||\n this.type === \"search\" ||\n (this.clearable && this.filled && !this.readonly && !this.disabled),\n \"stzh-input--has-description\": descriptionUsed,\n \"stzh-input--has-description-long\": descriptionLongUsed,\n \"stzh-input--has-error\": errorUsed,\n \"stzh-input--has-spin\": this.showSpin,\n \"stzh-input--is-invalid\": this.invalid || errorUsed,\n \"stzh-input--is-disabled\": this.disabled,\n \"stzh-input--is-readonly\": this.readonly,\n \"stzh-input--is-required\": this.required,\n \"stzh-input--is-filled\": this.filled,\n \"stzh-input--is-not-filled\": !this.filled,\n \"stzh-input--is-clearable\": this.clearable,\n \"stzh-input--is-not-clearable\": !this.clearable,\n \"stzh-input--has-label-hidden\": this.labelHidden,\n [`stzh-input--size-${this.size}`]: !!this.size,\n [`stzh-input--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host\n is-invalid={this.invalid || errorUsed}\n tabindex={this.disabled ? null : \"-1\"}\n onFocus={this.onRootFocus}\n is-filled={this.filled}\n >\n <div class={classes}>\n <label class=\"stzh-input__label\" htmlFor={this.inputId}>\n {this.label ? this.label : <slot></slot>}\n {!this.hideOptional && (\n <span class=\"stzh-input__marker\">\n <span class=\"stzh-input__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker}\n </span>\n <span class=\"stzh-input__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText}\n </span>\n </span>\n )}\n </label>\n <div class=\"stzh-input__field-wrapper\">\n {this.multiline ? this.renderTextarea() : this.renderInput()}\n {this.clearable || this.type === \"search\" || this.type === \"password\" ? (\n (!this.clearable || this.disabled || this.readonly || !this.filled) &&\n (this.type === \"search\" || this.type === \"password\") ? (\n <stzh-button\n class=\"stzh-input__button-right\"\n icon={this.type === \"search\" ? \"search\" : \"view\"}\n size={this.size}\n iconOnly={true}\n disabled={true}\n ></stzh-button>\n ) : this.filled ? (\n <stzh-button\n class=\"stzh-input__button-right\"\n icon=\"close\"\n size={this.size}\n iconOnly={true}\n onClick={this.onClearClick}\n a11yLabel={this.localization.$globals.clearButtonLabel}\n aria-controls={this.inputId}\n ></stzh-button>\n ) : (\n <slot name=\"button-right\"></slot>\n )\n ) : (\n <slot name=\"button-right\"></slot>\n )}\n </div>\n {(this._error?.length > 0 || this.description) && (\n <StzhInputDescription\n classPrefix=\"stzh-input\"\n id={`${this.inputId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"stzh-input.js","sourceRoot":"","sources":["../../../../src/components/stzh-input/stzh-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from \"@stencil/core\";\n\nimport { StzhInputBlurEvent, StzhInputChangedEvent, StzhInputChangeEvent, StzhInputFocusEvent } from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"./stzh-input-description\";\n\nlet inputCounter = 0;\n\n/**\n * @slot - Slot for label content\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n * @slot button-right - Slot for right button\n */\n@Component({\n tag: \"stzh-input\",\n styleUrl: \"stzh-input.scss\",\n scoped: true,\n})\nexport class StzhInput {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the input is a textarea or an input field */\n @Prop() multiline: boolean = false;\n\n /** Rows attribute if input element is textarea */\n @Prop() rows: number;\n\n /** If input field, this defines the type (if `search`, a search icon will be displayed) */\n @Prop({ reflect: true }) type: \"text\" | \"search\" | \"password\" | \"email\" | \"url\" | \"tel\" | \"number\" | \"hidden\" =\n \"text\";\n\n /** If input type is number, this will be the step size */\n @Prop() step: number = 1;\n\n /** If input type is number, this will be the minimum step number */\n @Prop() min: number;\n\n /** If input type is number, this will be the maximum step number */\n @Prop() max: number;\n\n /** If input type is number and this property is true, this will show the spin buttons on hover/focus */\n @Prop({ reflect: true }) showSpin: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether clearable button is showing when input field has value and is enabled (button-right slot not usable anymore when true) */\n @Prop({ reflect: true }) clearable: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Minimum of characters */\n @Prop() minlength: number;\n\n /** Maxlength of characters */\n @Prop() maxlength: number;\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Specify inputmode.\n * See [MDN](https://developer.mozilla.org/de/docs/Web/HTML/Global_attributes/inputmode) for possible values\n */\n @Prop() inputmode: string;\n\n /**\n * Specify what the user agent has to provide as automated assistance.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for possible values\n */\n @Prop() autocomplete: string = \"on\";\n\n /** Whether autocomplete should be turned off */\n @Prop() noAutocomplete: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label should be visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Whether the input is filled or not */\n @State() filled: boolean;\n\n /** Whether to show the password or not */\n @State() showPassword: boolean;\n\n @Element() element: HTMLStzhInputElement;\n\n /** Input change event */\n @Event() stzhChange: EventEmitter<StzhInputChangeEvent>;\n\n /** Input changed event */\n @Event() stzhChanged: EventEmitter<StzhInputChangedEvent>;\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhInputFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhInputBlurEvent>;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Watch(\"value\")\n valueWatcher(newValue: string) {\n this.filled = newValue !== \"\";\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n @Watch(\"type\")\n typeWatcher(newValue: string) {\n const types = [\"text\", \"search\", \"password\", \"email\", \"url\", \"tel\", \"number\", \"hidden\"];\n\n if (!this.multiline && !types.includes(newValue)) {\n throw new Error(`Type ${newValue} not supported`);\n }\n }\n\n private input: HTMLInputElement | HTMLTextAreaElement;\n private inputId: string;\n private focusedByInput: boolean = false;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => (this.renderPromiseResolve = resolve));\n }\n\n private onClearClick = async (event: MouseEvent) => {\n this.value = \"\";\n this.input.focus();\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onTogglePasswordVisibilityClick = async () => {\n this.showPassword = !this.showPassword;\n };\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n // we also update value, since render doesn't get executed sometimes\n this.input.value = this.defaultValue;\n\n // TODO: check if we need own reset event or trigger the change event\n // (custom browser behaviour doesn't send change event, when reset is executed)\n // this.stzhChange.emit({\n // component: \"stzh-input\",\n // originalEvent: event,\n // value: this.value\n // });\n };\n\n private onInput = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onChange = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value,\n });\n };\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.input.focus();\n }\n\n this.focusedByInput = false;\n };\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false,\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-input\",\n originalEvent: event,\n });\n };\n\n private onBlur = (event: FocusEvent) => {\n // fixes weird bug where autofill selection doesn't get removed\n this.input.value = this.input.value;\n\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false,\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-input\",\n originalEvent: event,\n });\n };\n\n private renderTextarea(): HTMLTextAreaElement {\n return (\n <textarea\n class=\"stzh-input__input stzh-input__input--textarea\"\n ref={el => (this.input = el as HTMLTextAreaElement)}\n id={this.inputId}\n name={this.name}\n value={this.value}\n rows={this.rows}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ></textarea>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n class=\"stzh-input__input stzh-input__input--input\"\n ref={el => (this.input = el as HTMLInputElement)}\n id={this.inputId}\n type={this.showPassword ? \"text\" : this.type}\n name={this.name}\n value={this.value}\n defaultValue={this.defaultValue}\n min={this.min}\n max={this.max}\n step={this.step}\n inputmode={this.inputmode}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n autocomplete={this.noAutocomplete ? \"off\" : this.autocomplete}\n aria-autocomplete={this.noAutocomplete ? \"none\" : undefined}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n );\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.inputId = `stzh-input-${inputCounter++}`;\n this.typeWatcher(this.type);\n this.valueWatcher(this.value);\n this.errorWatcher(this.error);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"input\");\n }\n }\n\n render() {\n const buttonRightSlotUsed = hasSlot(this.element, \"button-right\");\n const descriptionUsed = hasSlot(this.element, \"description\") || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, \"description-long\") || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, \"error\") || this._error?.length > 0;\n\n const classes = {\n \"stzh-input\": true,\n \"stzh-input--has-button-right\":\n buttonRightSlotUsed ||\n this.type === \"search\" ||\n (this.clearable && this.filled && !this.readonly && !this.disabled),\n \"stzh-input--has-description\": descriptionUsed,\n \"stzh-input--has-description-long\": descriptionLongUsed,\n \"stzh-input--has-error\": errorUsed,\n \"stzh-input--has-spin\": this.showSpin,\n \"stzh-input--is-invalid\": this.invalid || errorUsed,\n \"stzh-input--is-disabled\": this.disabled,\n \"stzh-input--is-readonly\": this.readonly,\n \"stzh-input--is-required\": this.required,\n \"stzh-input--is-filled\": this.filled,\n \"stzh-input--is-not-filled\": !this.filled,\n \"stzh-input--is-clearable\": this.clearable,\n \"stzh-input--is-not-clearable\": !this.clearable,\n \"stzh-input--has-label-hidden\": this.labelHidden,\n [`stzh-input--size-${this.size}`]: !!this.size,\n [`stzh-input--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host\n is-invalid={this.invalid || errorUsed}\n tabindex={this.disabled ? null : \"-1\"}\n onFocus={this.onRootFocus}\n is-filled={this.filled}\n >\n <div class={classes}>\n <label class=\"stzh-input__label\" htmlFor={this.inputId}>\n {this.label ? this.label : <slot></slot>}\n {!this.hideOptional && (\n <span class=\"stzh-input__marker\">\n <span class=\"stzh-input__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker}\n </span>\n <span class=\"stzh-input__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText}\n </span>\n </span>\n )}\n </label>\n <div class=\"stzh-input__field-wrapper\">\n {this.multiline ? this.renderTextarea() : this.renderInput()}\n {this.clearable || this.type === \"search\" || this.type === \"password\" ? (\n (!this.clearable || this.disabled || this.readonly || !this.filled) &&\n (this.type === \"search\" || this.type === \"password\") ? (\n <stzh-button\n class=\"stzh-input__button-right\"\n icon={this.type === \"search\" ? \"search\" : \"view\"}\n size={this.size}\n iconOnly={true}\n onClick={this.onTogglePasswordVisibilityClick}\n disabled={this.disabled || this.readonly}\n ></stzh-button>\n ) : this.filled ? (\n <stzh-button\n class=\"stzh-input__button-right\"\n icon=\"close\"\n size={this.size}\n iconOnly={true}\n onClick={this.onClearClick}\n a11yLabel={this.localization.$globals.clearButtonLabel}\n aria-controls={this.inputId}\n ></stzh-button>\n ) : (\n <slot name=\"button-right\"></slot>\n )\n ) : (\n <slot name=\"button-right\"></slot>\n )}\n </div>\n {(this._error?.length > 0 || this.description) && (\n <StzhInputDescription\n classPrefix=\"stzh-input\"\n id={`${this.inputId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -170,9 +170,10 @@
|
|
|
170
170
|
* @prop --stzh-pagetitle-disturber-stuck-height: Global: Disturber height when sticky (below medium breakpoint)
|
|
171
171
|
* @prop --stzh-pagetitle-disturber-is-stuck: **Global**: Whether disturber is currently sticky (readonly variable on `<html>`)
|
|
172
172
|
* @prop --stzh-pagetitle-disturber-is-not-stuck: **Global**: Whether disturber is currently not sticky (readonly variable on `<html>`)
|
|
173
|
+
* @prop --stzh-pagetitle-background-color: **Global**: Background color of pagetitle.
|
|
173
174
|
*/
|
|
174
175
|
:host {
|
|
175
|
-
--background-color: var(--stzh-pagetitle-background-color);
|
|
176
|
+
--background-color: var(--stzh-pagetitle-background-color, var(--stzh-pagetitle-background-color));
|
|
176
177
|
--image-background-color: var(--stzh-ratio-background-color);
|
|
177
178
|
}
|
|
178
179
|
:host ::slotted([slot=image]) {
|
|
@@ -359,6 +359,21 @@
|
|
|
359
359
|
background: linear-gradient(270deg, rgba(0, 0, 0, 0) 31.21%, rgba(0, 0, 0, 0.5) 91.45%);
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
+
@media screen and (min-width: 1600px) {
|
|
363
|
+
.stzh-pagetitle-home__image-gradient {
|
|
364
|
+
left: calc((100vw - 84.25rem) / 2);
|
|
365
|
+
}
|
|
366
|
+
.stzh-pagetitle-home__image-gradient:before {
|
|
367
|
+
content: "";
|
|
368
|
+
position: absolute;
|
|
369
|
+
background: rgba(0, 0, 0, 0.5);
|
|
370
|
+
top: 0;
|
|
371
|
+
right: calc((100vw - 84.25rem) / 2 + 84.25rem - var(--stzh-scrollbar-width, 0px));
|
|
372
|
+
bottom: 0;
|
|
373
|
+
left: calc((100vw - 84.25rem) / 2 * -1 - var(--stzh-scrollbar-width, 0px));
|
|
374
|
+
z-index: 1;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
362
377
|
.stzh-pagetitle-home__meta {
|
|
363
378
|
display: flex;
|
|
364
379
|
flex-direction: column-reverse;
|
|
@@ -415,6 +430,10 @@
|
|
|
415
430
|
grid-column: 1/span 10;
|
|
416
431
|
}
|
|
417
432
|
}
|
|
433
|
+
.stzh-pagetitle-home__ratio {
|
|
434
|
+
--max-height: 42.5rem;
|
|
435
|
+
--overflow: hidden;
|
|
436
|
+
}
|
|
418
437
|
.stzh-pagetitle-home--has-no-image .stzh-pagetitle-home__ratio {
|
|
419
438
|
display: none;
|
|
420
439
|
}
|
|
@@ -162,12 +162,22 @@
|
|
|
162
162
|
border: 0 !important;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
:host {
|
|
166
|
+
--justify-content: inherit;
|
|
167
|
+
--padding-left: calc(var(--stzh-form-input-height) + var(--stzh-space-medium));
|
|
168
|
+
}
|
|
169
|
+
:host[width=full] {
|
|
170
|
+
--justify-content: space-between;
|
|
171
|
+
--padding-left: 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
165
174
|
.stzh-pagination {
|
|
166
175
|
position: relative;
|
|
167
176
|
display: flex;
|
|
168
177
|
align-items: center;
|
|
169
178
|
gap: var(--stzh-space-medium);
|
|
170
|
-
padding-left:
|
|
179
|
+
padding-left: var(--padding-left);
|
|
180
|
+
justify-content: var(--justify-content);
|
|
171
181
|
}
|
|
172
182
|
.stzh-pagination__input {
|
|
173
183
|
--text-align: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment, h, Host } from "@stencil/core";
|
|
2
2
|
/**
|
|
3
3
|
*/
|
|
4
4
|
export class StzhPagination {
|
|
@@ -17,7 +17,7 @@ export class StzhPagination {
|
|
|
17
17
|
if (previous !== this.value) {
|
|
18
18
|
this.stzhChange.emit({
|
|
19
19
|
component: "stzh-pagination",
|
|
20
|
-
page: Number(this.value)
|
|
20
|
+
page: Number(this.value),
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
};
|
|
@@ -37,13 +37,15 @@ export class StzhPagination {
|
|
|
37
37
|
this.labelHidden = false;
|
|
38
38
|
this.readonly = false;
|
|
39
39
|
this.disabled = false;
|
|
40
|
+
this.allowManualInput = true;
|
|
40
41
|
this.description = undefined;
|
|
41
42
|
this.descriptionLong = undefined;
|
|
42
43
|
this.error = undefined;
|
|
43
44
|
this.invalid = false;
|
|
44
45
|
this.required = false;
|
|
45
46
|
this.size = "default";
|
|
46
|
-
this.
|
|
47
|
+
this.width = "default";
|
|
48
|
+
this.a11yDescribedby = "";
|
|
47
49
|
this.localization = undefined;
|
|
48
50
|
}
|
|
49
51
|
/** Set current page to previous */
|
|
@@ -65,8 +67,7 @@ export class StzhPagination {
|
|
|
65
67
|
"stzh-pagination": true,
|
|
66
68
|
[`stzh-pagination--size-${this.size}`]: !!this.size,
|
|
67
69
|
};
|
|
68
|
-
return (h(Host, { tabindex: this.disabled ? null : "-1", onFocus: this.onRootFocus }, h("div", { class: classes }, h("stzh-input", { class: "stzh-pagination__input", type: "number", min: 1, max: this.total, label: this.label || this.localization.label, labelHidden: true, ref:
|
|
69
|
-
.replace(/\{total\}/gi, this.total.toString())), h("stzh-buttongroup", null, h("stzh-button", { variant: "tertiary", icon: "angle-left", "icon-only": true, size: this.size, a11yDisabled: this.value <= 1, a11yDescribedby: this.a11yDescribedby, a11yLabel: `${this.label || this.localization.label}, ${this.localization.prevLabel}, ${this.localization.selectedPageLabel} ${this.value}`, disabled: this.disabled, onClick: () => this.prev() }), h("stzh-button", { variant: "tertiary", icon: "angle-right", "icon-only": true, size: this.size, a11yDisabled: this.value >= this.total, a11yDescribedby: this.a11yDescribedby, a11yLabel: `${this.label || this.localization.label}, ${this.localization.nextLabel}, ${this.localization.selectedPageLabel} ${this.value}`, disabled: this.disabled, onClick: () => this.next() })))));
|
|
70
|
+
return (h(Host, { tabindex: this.disabled ? null : "-1", onFocus: this.onRootFocus, width: this.width }, h("div", { class: classes }, this.allowManualInput ? (h(Fragment, null, h("stzh-input", { class: "stzh-pagination__input", type: "number", min: 1, max: this.total, label: this.label || this.localization.label, labelHidden: true, ref: el => (this.input = el), onStzhChange: this.onInputChange, value: ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString()) || "", required: this.required, disabled: this.disabled, description: this.description, descriptionLong: this.descriptionLong, error: this.error, a11yDescribedby: this.a11yDescribedby, name: this.name, size: this.size, invalid: this.invalid, hideOptional: true, noAutocomplete: true }), h("div", { class: "stzh-pagination__total" }, this.localization.totalLabel.replace(/\{total\}/gi, this.total.toString())))) : (h("div", { class: "stzh-pagination__total" }, this.value, " ", this.localization.totalLabel.replace(/\{total\}/gi, this.total.toString()))), h("stzh-buttongroup", null, h("stzh-button", { variant: "tertiary", icon: "angle-left", "icon-only": true, size: this.size, a11yDisabled: this.value <= 1, a11yDescribedby: this.a11yDescribedby, a11yLabel: `${this.label || this.localization.label}, ${this.localization.prevLabel}, ${this.localization.selectedPageLabel} ${this.value}`, disabled: this.disabled, onClick: () => this.prev() }), h("stzh-button", { variant: "tertiary", icon: "angle-right", "icon-only": true, size: this.size, a11yDisabled: this.value >= this.total, a11yDescribedby: this.a11yDescribedby, a11yLabel: `${this.label || this.localization.label}, ${this.localization.nextLabel}, ${this.localization.selectedPageLabel} ${this.value}`, disabled: this.disabled, onClick: () => this.next() })))));
|
|
70
71
|
}
|
|
71
72
|
static get is() { return "stzh-pagination"; }
|
|
72
73
|
static get encapsulation() { return "scoped"; }
|
|
@@ -208,6 +209,24 @@ export class StzhPagination {
|
|
|
208
209
|
"reflect": true,
|
|
209
210
|
"defaultValue": "false"
|
|
210
211
|
},
|
|
212
|
+
"allowManualInput": {
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"mutable": false,
|
|
215
|
+
"complexType": {
|
|
216
|
+
"original": "boolean",
|
|
217
|
+
"resolved": "boolean",
|
|
218
|
+
"references": {}
|
|
219
|
+
},
|
|
220
|
+
"required": false,
|
|
221
|
+
"optional": false,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [],
|
|
224
|
+
"text": "Whether the current page is mutable via input"
|
|
225
|
+
},
|
|
226
|
+
"attribute": "allow-manual-input",
|
|
227
|
+
"reflect": true,
|
|
228
|
+
"defaultValue": "true"
|
|
229
|
+
},
|
|
211
230
|
"description": {
|
|
212
231
|
"type": "string",
|
|
213
232
|
"mutable": false,
|
|
@@ -313,6 +332,24 @@ export class StzhPagination {
|
|
|
313
332
|
"reflect": true,
|
|
314
333
|
"defaultValue": "\"default\""
|
|
315
334
|
},
|
|
335
|
+
"width": {
|
|
336
|
+
"type": "string",
|
|
337
|
+
"mutable": false,
|
|
338
|
+
"complexType": {
|
|
339
|
+
"original": "\"default\" | \"full\"",
|
|
340
|
+
"resolved": "\"default\" | \"full\"",
|
|
341
|
+
"references": {}
|
|
342
|
+
},
|
|
343
|
+
"required": false,
|
|
344
|
+
"optional": false,
|
|
345
|
+
"docs": {
|
|
346
|
+
"tags": [],
|
|
347
|
+
"text": "Width variant"
|
|
348
|
+
},
|
|
349
|
+
"attribute": "width",
|
|
350
|
+
"reflect": true,
|
|
351
|
+
"defaultValue": "\"default\""
|
|
352
|
+
},
|
|
316
353
|
"a11yDescribedby": {
|
|
317
354
|
"type": "string",
|
|
318
355
|
"mutable": false,
|
|
@@ -329,7 +366,7 @@ export class StzhPagination {
|
|
|
329
366
|
},
|
|
330
367
|
"attribute": "a11y-describedby",
|
|
331
368
|
"reflect": false,
|
|
332
|
-
"defaultValue": "
|
|
369
|
+
"defaultValue": "\"\""
|
|
333
370
|
},
|
|
334
371
|
"localization": {
|
|
335
372
|
"type": "unknown",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-pagination.js","sourceRoot":"","sources":["../../../../src/components/stzh-pagination/stzh-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,CAAC,EACD,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAC;AASvB;GACG;AAMH,MAAM,OAAO,cAAc;;IAiEjB,aAAQ,GAAG,CAAC,OAAe,EAAE,EAAE;MACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC;MAE5B,IAAI,OAAO,IAAI,CAAC,IAAI,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE;QACzC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;OACtB;WAAM,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE;QAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;OACzB;WAAM;QACL,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;OAChB;MAED,IAAI,QAAQ,KAAK,IAAI,CAAC,KAAK,EAAE;QAC3B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;UACnB,SAAS,EAAE,iBAAiB;UAC5B,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SACzB,C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n Prop,\n Host,\n Element,\n h,\n Event,\n EventEmitter,\n Method,\n} from \"@stencil/core\";\n\nimport {\n StzhInputChangeEvent,\n StzhPaginationChangeEvent\n} from \"../../index\";\n\nimport { StzhPaginationLocalizedText } from \"./stzh-pagination.localization\";\n\n/**\n */\n@Component({\n tag: \"stzh-pagination\",\n styleUrl: \"stzh-pagination.scss\",\n scoped: true\n})\nexport class StzhPagination {\n /** Total pages available. */\n @Prop() total: number = 1;\n\n /** Name of the hidden date picker input. */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** Current page. */\n @Prop({ mutable: true }) value: number = 1;\n\n /** Label for dropdown */\n @Prop() label: string = \"\";\n\n /** Whether label is hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Id of the element which describes the input */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = '';\n\n /** Translation strings. */\n @Prop() localization: StzhPaginationLocalizedText;\n\n /** Pagination change event */\n @Event() stzhChange: EventEmitter<StzhPaginationChangeEvent>;\n\n @Element() element: HTMLStzhPaginationElement;\n\n /** Set current page to previous */\n @Method()\n async prev() {\n this.gotoPage(this.value - 1);\n }\n\n /** Set current page to next */\n @Method()\n async next() {\n this.gotoPage(this.value + 1);\n }\n\n private input: HTMLStzhInputElement;\n\n private gotoPage = (newPage: number) => {\n const previous = this.value;\n\n if (newPage >= 1 && newPage <= this.total) {\n this.value = newPage;\n } else if (newPage > this.total) {\n this.value = this.total;\n } else {\n this.value = 1;\n }\n\n if (previous !== this.value) {\n this.stzhChange.emit({\n component: \"stzh-pagination\",\n page: Number(this.value)\n });\n }\n }\n\n private onRootFocus = () => {\n if (this.input) {\n this.input.focus();\n }\n }\n\n private onInputChange = (event: CustomEvent<StzhInputChangeEvent>) => {\n const newPage = Number(event.detail.value) || 1;\n this.gotoPage(newPage);\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"pagination\");\n }\n }\n\n render() {\n const classes = {\n \"stzh-pagination\": true,\n [`stzh-pagination--size-${this.size}`]: !!this.size,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n <stzh-input\n class=\"stzh-pagination__input\"\n type=\"number\"\n min={1}\n max={this.total}\n label={this.label || this.localization.label}\n labelHidden={true}\n ref={(el) => (this.input = el as HTMLStzhInputElement)}\n onStzhChange={this.onInputChange}\n value={this.value?.toString() || ''}\n required={this.required}\n disabled={this.disabled}\n description={this.description}\n descriptionLong={this.descriptionLong}\n error={this.error}\n a11yDescribedby={this.a11yDescribedby}\n name={this.name}\n size={this.size}\n invalid={this.invalid}\n hideOptional={true}\n noAutocomplete={true}\n ></stzh-input>\n <div class=\"stzh-pagination__total\">\n {this.localization.totalLabel\n .replace(/\\{total\\}/gi, this.total.toString())}\n </div>\n <stzh-buttongroup>\n <stzh-button\n variant=\"tertiary\"\n icon=\"angle-left\"\n icon-only\n size={this.size}\n a11yDisabled={this.value <= 1}\n a11yDescribedby={this.a11yDescribedby}\n a11yLabel={`${this.label || this.localization.label}, ${this.localization.prevLabel}, ${this.localization.selectedPageLabel} ${this.value}`}\n disabled={this.disabled}\n onClick={() => this.prev()}\n ></stzh-button>\n <stzh-button\n variant=\"tertiary\"\n icon=\"angle-right\"\n icon-only\n size={this.size}\n a11yDisabled={this.value >= this.total}\n a11yDescribedby={this.a11yDescribedby}\n a11yLabel={`${this.label || this.localization.label}, ${this.localization.nextLabel}, ${this.localization.selectedPageLabel} ${this.value}`}\n disabled={this.disabled}\n onClick={() => this.next()}\n ></stzh-button>\n </stzh-buttongroup>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"stzh-pagination.js","sourceRoot":"","sources":["../../../../src/components/stzh-pagination/stzh-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAMzG;GACG;AAMH,MAAM,OAAO,cAAc;;IAuEjB,aAAQ,GAAG,CAAC,OAAe,EAAE,EAAE;MACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC;MAE5B,IAAI,OAAO,IAAI,CAAC,IAAI,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE;QACzC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;OACtB;WAAM,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE;QAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;OACzB;WAAM;QACL,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;OAChB;MAED,IAAI,QAAQ,KAAK,IAAI,CAAC,KAAK,EAAE;QAC3B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;UACnB,SAAS,EAAE,iBAAiB;UAC5B,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SACzB,CAAC,CAAC;OACJ;IACH,CAAC,CAAC;IAEM,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,IAAI,CAAC,KAAK,EAAE;QACd,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;OACpB;IACH,CAAC,CAAC;IAEM,kBAAa,GAAG,CAAC,KAAwC,EAAE,EAAE;MACnE,MAAM,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Fragment, h, Host, Method, Prop } from \"@stencil/core\";\n\nimport { StzhInputChangeEvent, StzhPaginationChangeEvent } from \"../../index\";\n\nimport { StzhPaginationLocalizedText } from \"./stzh-pagination.localization\";\n\n/**\n */\n@Component({\n tag: \"stzh-pagination\",\n styleUrl: \"stzh-pagination.scss\",\n scoped: true,\n})\nexport class StzhPagination {\n /** Total pages available. */\n @Prop() total: number = 1;\n\n /** Name of the hidden date picker input. */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** Current page. */\n @Prop({ mutable: true }) value: number = 1;\n\n /** Label for dropdown */\n @Prop() label: string = \"\";\n\n /** Whether label is hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether the current page is mutable via input */\n @Prop({ reflect: true }) allowManualInput: boolean = true;\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Width variant */\n @Prop({ reflect: true }) width: \"default\" | \"full\" = \"default\";\n\n /** Id of the element which describes the input */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Translation strings. */\n @Prop() localization: StzhPaginationLocalizedText;\n\n /** Pagination change event */\n @Event() stzhChange: EventEmitter<StzhPaginationChangeEvent>;\n\n @Element() element: HTMLStzhPaginationElement;\n\n /** Set current page to previous */\n @Method()\n async prev() {\n this.gotoPage(this.value - 1);\n }\n\n /** Set current page to next */\n @Method()\n async next() {\n this.gotoPage(this.value + 1);\n }\n\n private input: HTMLStzhInputElement;\n\n private gotoPage = (newPage: number) => {\n const previous = this.value;\n\n if (newPage >= 1 && newPage <= this.total) {\n this.value = newPage;\n } else if (newPage > this.total) {\n this.value = this.total;\n } else {\n this.value = 1;\n }\n\n if (previous !== this.value) {\n this.stzhChange.emit({\n component: \"stzh-pagination\",\n page: Number(this.value),\n });\n }\n };\n\n private onRootFocus = () => {\n if (this.input) {\n this.input.focus();\n }\n };\n\n private onInputChange = (event: CustomEvent<StzhInputChangeEvent>) => {\n const newPage = Number(event.detail.value) || 1;\n this.gotoPage(newPage);\n };\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"pagination\");\n }\n }\n\n render() {\n const classes = {\n \"stzh-pagination\": true,\n [`stzh-pagination--size-${this.size}`]: !!this.size,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus} width={this.width}>\n <div class={classes}>\n {this.allowManualInput ? (\n <Fragment>\n <stzh-input\n class=\"stzh-pagination__input\"\n type=\"number\"\n min={1}\n max={this.total}\n label={this.label || this.localization.label}\n labelHidden={true}\n ref={el => (this.input = el as HTMLStzhInputElement)}\n onStzhChange={this.onInputChange}\n value={this.value?.toString() || \"\"}\n required={this.required}\n disabled={this.disabled}\n description={this.description}\n descriptionLong={this.descriptionLong}\n error={this.error}\n a11yDescribedby={this.a11yDescribedby}\n name={this.name}\n size={this.size}\n invalid={this.invalid}\n hideOptional={true}\n noAutocomplete={true}\n ></stzh-input>\n <div class=\"stzh-pagination__total\">\n {this.localization.totalLabel.replace(/\\{total\\}/gi, this.total.toString())}\n </div>\n </Fragment>\n ) : (\n <div class=\"stzh-pagination__total\">\n {this.value} {this.localization.totalLabel.replace(/\\{total\\}/gi, this.total.toString())}\n </div>\n )}\n <stzh-buttongroup>\n <stzh-button\n variant=\"tertiary\"\n icon=\"angle-left\"\n icon-only\n size={this.size}\n a11yDisabled={this.value <= 1}\n a11yDescribedby={this.a11yDescribedby}\n a11yLabel={`${this.label || this.localization.label}, ${this.localization.prevLabel}, ${\n this.localization.selectedPageLabel\n } ${this.value}`}\n disabled={this.disabled}\n onClick={() => this.prev()}\n ></stzh-button>\n <stzh-button\n variant=\"tertiary\"\n icon=\"angle-right\"\n icon-only\n size={this.size}\n a11yDisabled={this.value >= this.total}\n a11yDescribedby={this.a11yDescribedby}\n a11yLabel={`${this.label || this.localization.label}, ${this.localization.nextLabel}, ${\n this.localization.selectedPageLabel\n } ${this.value}`}\n disabled={this.disabled}\n onClick={() => this.next()}\n ></stzh-button>\n </stzh-buttongroup>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -307,7 +307,7 @@ export class StzhPanorama {
|
|
|
307
307
|
text: imageTitle,
|
|
308
308
|
}));
|
|
309
309
|
const currentScene = this._scenes.find(({ sceneId }) => sceneId === this.scene);
|
|
310
|
-
return (h(Host, null, h("div", { class: classes }, h("stzh-figure", { class: "stzh-panorama__figure", heading: this.heading, caption: currentScene.caption || this.caption, copyright: currentScene.copyright || this.copyright }, h("stzh-ratio", null, h("div", { ref: el => (this.containerElement = el), class: "stzh-panorama__container", tabindex: "0" }, h("div", { class: "stzh-panorama__sceneselector" }, sceneOptions.length > 1 && (h("stzh-dropdown", { class: "stzh-panorama__sceneselector-dropdown", size: "small", popoverPlacement: "top", label: this.localization.sceneLabel, labelHidden: true, noSearch: true, items: [this.scene], options: sceneOptions, onStzhChange: this.handleSceneDropdownChange })), h("div", { class: "stzh-panorama__copyright" }, currentScene.imageAuthor || currentScene.copyright || this.copyright)), h("div", { class: "stzh-panorama__controls", onKeyDown: this.handleControlsKeydown }, this.showControls && (h(Fragment, null, h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.panLeft, variant: "secondary", icon: "arrow-left", size: "small", onClick: () => this.action("panLeft") }), h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.panRight, variant: "secondary", icon: "arrow-right", size: "small", onClick: () => this.action("panRight") }), h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.panUp, variant: "secondary", icon: "arrow-up", size: "small", onClick: () => this.action("panUp") }), h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.panDown, variant: "secondary", icon: "arrow-down", size: "small", onClick: () => this.action("panDown") }), h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.zoomIn, variant: "secondary", icon: "plus", size: "small", onClick: () => this.action("zoomIn") }), h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.zoomOut, variant: "secondary", icon: "minus", size: "small", onClick: () => this.action("zoomOut") }))), this.isOrientationSupported && (h("stzh-button", { class: "stzh-panorama__control", variant: "secondary", a11yLabel: this.isOrientationActive
|
|
310
|
+
return (h(Host, null, h("div", { class: classes }, h("stzh-figure", { class: "stzh-panorama__figure", heading: this.heading, caption: currentScene.caption || this.caption, copyright: currentScene.copyright || this.copyright }, h("stzh-ratio", null, h("div", { ref: el => (this.containerElement = el), class: "stzh-panorama__container", tabindex: "0" }, h("div", { class: "stzh-panorama__sceneselector" }, sceneOptions.length > 1 && (h("stzh-dropdown", { class: "stzh-panorama__sceneselector-dropdown", size: "small", popoverPlacement: "top", label: this.localization.sceneLabel, labelHidden: true, noSearch: true, items: [this.scene], options: sceneOptions, onStzhChange: this.handleSceneDropdownChange })), (currentScene.imageAuthor || currentScene.copyright || this.copyright) && (h("div", { class: "stzh-panorama__copyright" }, currentScene.imageAuthor || currentScene.copyright || this.copyright))), h("div", { class: "stzh-panorama__controls", onKeyDown: this.handleControlsKeydown }, this.showControls && (h(Fragment, null, h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.panLeft, variant: "secondary", icon: "arrow-left", size: "small", onClick: () => this.action("panLeft") }), h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.panRight, variant: "secondary", icon: "arrow-right", size: "small", onClick: () => this.action("panRight") }), h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.panUp, variant: "secondary", icon: "arrow-up", size: "small", onClick: () => this.action("panUp") }), h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.panDown, variant: "secondary", icon: "arrow-down", size: "small", onClick: () => this.action("panDown") }), h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.zoomIn, variant: "secondary", icon: "plus", size: "small", onClick: () => this.action("zoomIn") }), h("stzh-button", { class: "stzh-panorama__control stzh-panorama__control--show-medium", iconOnly: true, "a11y-label": this.localization.zoomOut, variant: "secondary", icon: "minus", size: "small", onClick: () => this.action("zoomOut") }))), this.isOrientationSupported && (h("stzh-button", { class: "stzh-panorama__control", variant: "secondary", a11yLabel: this.isOrientationActive
|
|
311
311
|
? this.localization.stopOrientation
|
|
312
312
|
: this.localization.startOrientation, icon: this.isOrientationActive ? "target-bullet" : "target", iconOnly: true, size: "small", onClick: () => this.action(this.isOrientationActive ? "stopOrientation" : "startOrientation") })), h("stzh-button", { class: "stzh-panorama__control", variant: "secondary", a11yLabel: this.isFullscreen
|
|
313
313
|
? this.localization.disableFullscreenLabel
|