@duetds/components 10.0.0-alpha.7 → 10.0.0-alpha.8
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/hydrate/index.js +23 -17
- package/lib/cjs/{a11y-utils-660f6fc9.js → a11y-utils-e921b85d.js} +1 -1
- package/lib/cjs/{app-globals-041a56ca.js → app-globals-99f2f39f.js} +1 -1
- package/lib/cjs/duet-action-button.cjs.entry.js +2 -2
- package/lib/cjs/duet-alert.cjs.entry.js +3 -3
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-banner.cjs.entry.js +2 -2
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +2 -2
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +2 -2
- package/lib/cjs/duet-button_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-callout.cjs.entry.js +2 -2
- package/lib/cjs/duet-caption_4.cjs.entry.js +4 -4
- package/lib/cjs/duet-card.cjs.entry.js +2 -2
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-checkmark.cjs.entry.js +1 -1
- package/lib/cjs/duet-chip_3.cjs.entry.js +9 -7
- package/lib/cjs/duet-choice_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-collapsible.cjs.entry.js +2 -2
- package/lib/cjs/duet-combobox.cjs.entry.js +3 -3
- package/lib/cjs/duet-contact-card.cjs.entry.js +2 -2
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +5 -5
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +3 -3
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +2 -2
- package/lib/cjs/duet-file-chooser.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +3 -3
- package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-hero.cjs.entry.js +3 -3
- package/lib/cjs/duet-icon.cjs.entry.js +1 -1
- package/lib/cjs/duet-input_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-layout.cjs.entry.js +3 -3
- package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar-button.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar-item.cjs.entry.js +4 -4
- package/lib/cjs/duet-menu-bar-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar.cjs.entry.js +6 -5
- package/lib/cjs/duet-modal.cjs.entry.js +4 -4
- package/lib/cjs/duet-multiselect.cjs.entry.js +4 -4
- package/lib/cjs/duet-nav.cjs.entry.js +1 -1
- package/lib/cjs/duet-notification_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-number-input.cjs.entry.js +3 -3
- package/lib/cjs/duet-overlay.cjs.entry.js +1 -1
- package/lib/cjs/duet-page-heading.cjs.entry.js +1 -1
- package/lib/cjs/duet-pagination_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-progress.cjs.entry.js +2 -2
- package/lib/cjs/duet-promo-card.cjs.entry.js +2 -2
- package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-range-slider.cjs.entry.js +3 -3
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +14 -11
- package/lib/cjs/duet-section-layout.cjs.entry.js +2 -2
- package/lib/cjs/duet-select.cjs.entry.js +3 -3
- package/lib/cjs/duet-shaped-image.cjs.entry.js +1 -1
- package/lib/cjs/duet-show-more.cjs.entry.js +2 -2
- package/lib/cjs/duet-slideout-lang.cjs.entry.js +2 -2
- package/lib/cjs/duet-slideout-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +1 -1
- package/lib/cjs/duet-slideout-panel.cjs.entry.js +4 -4
- package/lib/cjs/duet-slideout.cjs.entry.js +4 -4
- package/lib/cjs/duet-status-icon.cjs.entry.js +1 -1
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +1 -1
- package/lib/cjs/duet-submenu-bar-item.cjs.entry.js +4 -4
- package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-submenu-bar.cjs.entry.js +1 -1
- package/lib/cjs/duet-textarea.cjs.entry.js +4 -4
- package/lib/cjs/duet-toggle.cjs.entry.js +3 -3
- package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
- package/lib/cjs/duet-toolbar-item.cjs.entry.js +4 -4
- package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip-button_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-tooltip.cjs.entry.js +3 -3
- package/lib/cjs/duet-tray.cjs.entry.js +2 -2
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
- package/lib/cjs/duet-upload-item.cjs.entry.js +3 -3
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +2 -2
- package/lib/cjs/{errorcodes.utils-381e59b0.js → errorcodes.utils-2db03da6.js} +1 -1
- package/lib/cjs/{focus-utils-8b057c75.js → focus-utils-5578a0a5.js} +1 -1
- package/lib/cjs/{index-0885358e.js → index-9c3aea30.js} +331 -2
- package/lib/cjs/{label-0db337c3.js → label-a742a2d5.js} +1 -1
- package/lib/cjs/{language-utils-ae5d768d.js → language-utils-9499975c.js} +1 -1
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/cjs/{slot-utils-7cc4f68b.js → slot-utils-799906b5.js} +1 -1
- package/lib/collection/components/duet-layout/duet-layout.css +0 -3
- package/lib/collection/components/duet-menu-bar/duet-menu-bar.css +2 -2
- package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +3 -2
- package/lib/collection/components/duet-popup-menu/duet-popup-menu.js +6 -4
- package/lib/collection/components/duet-scrollable/duet-scrollable.css +13 -5
- package/lib/collection/components/duet-scrollable/duet-scrollable.js +10 -7
- package/lib/collection/components/duet-section-layout/duet-section-layout.css +0 -3
- package/lib/dist-custom-elements/duet-action-button.js +1 -1
- package/lib/dist-custom-elements/duet-alert.js +1 -1
- package/lib/dist-custom-elements/duet-badge.js +1 -1
- package/lib/dist-custom-elements/duet-banner.js +3 -3
- package/lib/dist-custom-elements/duet-breadcrumb.js +3 -3
- package/lib/dist-custom-elements/duet-breadcrumbs.js +1 -1
- package/lib/dist-custom-elements/duet-button.js +1 -1
- package/lib/dist-custom-elements/duet-callout.js +2 -2
- package/lib/dist-custom-elements/duet-caption.js +1 -1
- package/lib/dist-custom-elements/duet-card.js +3 -3
- package/lib/dist-custom-elements/duet-checkbox.js +1 -1
- package/lib/dist-custom-elements/duet-checkmark.js +1 -1
- package/lib/dist-custom-elements/duet-chip.js +1 -1
- package/lib/dist-custom-elements/duet-choice-group.js +8 -8
- package/lib/dist-custom-elements/duet-choice.js +4 -4
- package/lib/dist-custom-elements/duet-collapsible.js +3 -3
- package/lib/dist-custom-elements/duet-combobox.js +14 -14
- package/lib/dist-custom-elements/duet-contact-card.js +8 -8
- package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
- package/lib/dist-custom-elements/duet-date-picker.js +12 -12
- package/lib/dist-custom-elements/duet-divider.js +1 -1
- package/lib/dist-custom-elements/duet-editable-table.js +7 -7
- package/lib/dist-custom-elements/duet-empty-state.js +1 -1
- package/lib/dist-custom-elements/duet-fieldset.js +1 -1
- package/lib/dist-custom-elements/duet-file-chooser.js +2 -2
- package/lib/dist-custom-elements/duet-footer.js +7 -7
- package/lib/dist-custom-elements/duet-grid-item.js +1 -1
- package/lib/dist-custom-elements/duet-grid.js +1 -1
- package/lib/dist-custom-elements/duet-header.js +8 -8
- package/lib/dist-custom-elements/duet-heading.js +1 -1
- package/lib/dist-custom-elements/duet-hero.js +9 -9
- package/lib/dist-custom-elements/duet-icon.js +1 -1
- package/lib/dist-custom-elements/duet-input.js +1 -1
- package/lib/dist-custom-elements/duet-label.js +1 -1
- package/lib/dist-custom-elements/duet-layout.js +2 -2
- package/lib/dist-custom-elements/duet-link.js +1 -1
- package/lib/dist-custom-elements/duet-list-item.js +1 -1
- package/lib/dist-custom-elements/duet-list.js +1 -1
- package/lib/dist-custom-elements/duet-logo.js +1 -1
- package/lib/dist-custom-elements/duet-menu-bar-button.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar-item.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar-link.js +2 -2
- package/lib/dist-custom-elements/duet-menu-bar.js +6 -5
- package/lib/dist-custom-elements/duet-modal.js +8 -8
- package/lib/dist-custom-elements/duet-multiselect.js +8 -8
- package/lib/dist-custom-elements/duet-nav.js +1 -1
- package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
- package/lib/dist-custom-elements/duet-notification.js +2 -2
- package/lib/dist-custom-elements/duet-number-input.js +10 -10
- package/lib/dist-custom-elements/duet-overlay.js +1 -1
- package/lib/dist-custom-elements/duet-page-heading.js +3 -3
- package/lib/dist-custom-elements/duet-pagination.js +12 -12
- package/lib/dist-custom-elements/duet-paragraph.js +1 -1
- package/lib/dist-custom-elements/duet-popup-menu-item.js +1 -1
- package/lib/dist-custom-elements/duet-popup-menu.js +1 -1
- package/lib/dist-custom-elements/duet-progress.js +1 -1
- package/lib/dist-custom-elements/duet-promo-card.js +3 -3
- package/lib/dist-custom-elements/duet-radio-group.js +8 -8
- package/lib/dist-custom-elements/duet-radio.js +1 -1
- package/lib/dist-custom-elements/duet-range-slider.js +1 -1
- package/lib/dist-custom-elements/duet-range-stepper.js +4 -4
- package/lib/dist-custom-elements/duet-scrollable.js +1 -1
- package/lib/dist-custom-elements/duet-section-layout.js +2 -2
- package/lib/dist-custom-elements/duet-select.js +1 -1
- package/lib/dist-custom-elements/duet-shaped-image.js +1 -1
- package/lib/dist-custom-elements/duet-show-more.js +1 -1
- package/lib/dist-custom-elements/duet-slideout-lang.js +2 -2
- package/lib/dist-custom-elements/duet-slideout-link.js +2 -2
- package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +2 -2
- package/lib/dist-custom-elements/duet-slideout-panel.js +2 -2
- package/lib/dist-custom-elements/duet-slideout.js +3 -3
- package/lib/dist-custom-elements/duet-spacer.js +1 -1
- package/lib/dist-custom-elements/duet-spinner.js +1 -1
- package/lib/dist-custom-elements/duet-status-icon.js +2 -2
- package/lib/dist-custom-elements/duet-step.js +4 -4
- package/lib/dist-custom-elements/duet-stepper.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar-item.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar.js +3 -3
- package/lib/dist-custom-elements/duet-tab-group.js +7 -7
- package/lib/dist-custom-elements/duet-tab.js +1 -1
- package/lib/dist-custom-elements/duet-table.js +1 -1
- package/lib/dist-custom-elements/duet-textarea.js +9 -9
- package/lib/dist-custom-elements/duet-toggle.js +1 -1
- package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar-item.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip-button.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip-popup.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip.js +1 -1
- package/lib/dist-custom-elements/duet-tray.js +3 -3
- package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
- package/lib/dist-custom-elements/duet-upload-item.js +1 -1
- package/lib/dist-custom-elements/duet-upload.js +19 -19
- package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
- package/lib/dist-custom-elements/index.js +1 -1
- package/lib/dist-custom-elements/{p-6560b415.js → p-0ccb587d.js} +2 -2
- package/lib/dist-custom-elements/{p-7a8ebdb7.js → p-1080a6c7.js} +1 -1
- package/lib/dist-custom-elements/{p-4f9c1a9a.js → p-10cd2c68.js} +10 -10
- package/lib/dist-custom-elements/{p-3e99b7b2.js → p-1892dc7c.js} +1 -1
- package/lib/dist-custom-elements/{p-08eb05f7.js → p-1a58f15b.js} +1 -1
- package/lib/dist-custom-elements/{p-e9666ab6.js → p-297845c1.js} +3 -3
- package/lib/dist-custom-elements/{p-eddef302.js → p-2d798e15.js} +1 -1
- package/lib/dist-custom-elements/{p-90aadff1.js → p-34a901da.js} +1 -1
- package/lib/dist-custom-elements/{p-55b83dec.js → p-3bea94c3.js} +16 -13
- package/lib/dist-custom-elements/{p-f2b84f7d.js → p-4c3d0ee5.js} +1 -1
- package/lib/dist-custom-elements/{p-fbf01fef.js → p-530451fd.js} +1 -1
- package/lib/dist-custom-elements/{p-a2ab7458.js → p-5ad0aa2d.js} +1 -1
- package/lib/dist-custom-elements/{p-7cebe2aa.js → p-6e12d8f9.js} +1 -1
- package/lib/dist-custom-elements/{p-b5147f77.js → p-77fe0881.js} +5 -5
- package/lib/dist-custom-elements/{p-e000047c.js → p-7ef7ecb2.js} +9 -9
- package/lib/dist-custom-elements/{p-87c8a780.js → p-846239a5.js} +7 -5
- package/lib/dist-custom-elements/{p-4dd6ec0e.js → p-88a11eef.js} +1 -1
- package/lib/dist-custom-elements/{p-b49e2890.js → p-9f10e30c.js} +1 -1
- package/lib/dist-custom-elements/{p-9bbe7263.js → p-a2d287b0.js} +4 -4
- package/lib/dist-custom-elements/{p-46aa070f.js → p-b2db5fb1.js} +5 -5
- package/lib/dist-custom-elements/{p-5d29fcaa.js → p-b662900e.js} +2 -2
- package/lib/dist-custom-elements/{p-66f05bd2.js → p-bae3d92e.js} +1 -1
- package/lib/dist-custom-elements/{p-f32d4b93.js → p-bf91603e.js} +1 -1
- package/lib/dist-custom-elements/{p-d18fbbfb.js → p-c84c39d8.js} +1 -1
- package/lib/dist-custom-elements/{p-f4511d6b.js → p-d07ce35f.js} +1 -1
- package/lib/dist-custom-elements/{p-e8d53fc5.js → p-d1aca1bf.js} +7 -7
- package/lib/dist-custom-elements/{p-7e262927.js → p-d4202ee8.js} +2 -2
- package/lib/dist-custom-elements/{p-958921e7.js → p-d74ee462.js} +1 -1
- package/lib/dist-custom-elements/{p-9a2ea7dc.js → p-d8e88497.js} +1 -1
- package/lib/dist-custom-elements/{p-5882e967.js → p-db1a07f5.js} +2 -2
- package/lib/dist-custom-elements/{p-46a8132e.js → p-df9299e6.js} +1 -1
- package/lib/dist-custom-elements/{p-1a76b580.js → p-e96839f2.js} +2 -2
- package/lib/dist-custom-elements/{p-5e2fd812.js → p-ed2d40fe.js} +1 -1
- package/lib/dist-custom-elements/{p-4006af44.js → p-f0d82988.js} +6 -6
- package/lib/dist-custom-elements/{p-076458c1.js → p-f4e71ced.js} +3 -3
- package/lib/dist-custom-elements/{p-d2e75481.js → p-f611b32e.js} +2 -2
- package/lib/dist-custom-elements/{p-df4b16da.js → p-f86f4403.js} +2 -2
- package/lib/dist-custom-elements/{p-d2152803.js → p-faa49d55.js} +2 -2
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-3a1a4161.entry.js → p-038bb299.entry.js} +1 -1
- package/lib/duet/p-03bfd386.system.js +4 -0
- package/lib/duet/{p-289e20a4.entry.js → p-050923e5.entry.js} +1 -1
- package/lib/duet/{p-8296c9c2.system.js → p-054f5ec6.system.js} +1 -1
- package/lib/duet/{p-5488c7f0.entry.js → p-05aec682.entry.js} +1 -1
- package/lib/duet/{p-c81c688f.system.entry.js → p-06995c4e.system.entry.js} +1 -1
- package/lib/duet/{p-f8c6c87c.system.entry.js → p-08344bda.system.entry.js} +1 -1
- package/lib/duet/{p-505ef540.entry.js → p-0846f883.entry.js} +1 -1
- package/lib/duet/{p-2b1be22e.system.entry.js → p-08f3a77e.system.entry.js} +1 -1
- package/lib/duet/{p-c779e3e1.entry.js → p-091ce42a.entry.js} +1 -1
- package/lib/duet/{p-8f5c12c8.system.entry.js → p-0998026d.system.entry.js} +1 -1
- package/lib/duet/{p-c9fd4929.entry.js → p-0a4b0639.entry.js} +1 -1
- package/lib/duet/p-0a675075.js +4 -0
- package/lib/duet/{p-87a8eb57.entry.js → p-0b818355.entry.js} +1 -1
- package/lib/duet/{p-3042a585.entry.js → p-0bcc93b7.entry.js} +1 -1
- package/lib/duet/{p-acba28ca.system.entry.js → p-0c4708c0.system.entry.js} +1 -1
- package/lib/duet/{p-4ce70915.entry.js → p-0cbec7c8.entry.js} +1 -1
- package/lib/duet/{p-41f062e2.system.entry.js → p-0d334c84.system.entry.js} +1 -1
- package/lib/duet/{p-8688d2ab.system.entry.js → p-0d7369ef.system.entry.js} +1 -1
- package/lib/duet/{p-b8dbb46c.entry.js → p-10b1f772.entry.js} +1 -1
- package/lib/duet/{p-78aa46d5.system.entry.js → p-12b25cdd.system.entry.js} +1 -1
- package/lib/duet/{p-6b8e825d.entry.js → p-145d2c10.entry.js} +1 -1
- package/lib/duet/{p-38e2ca53.system.entry.js → p-15d66914.system.entry.js} +1 -1
- package/lib/duet/p-15ecb8d0.entry.js +4 -0
- package/lib/duet/{p-59be5b66.entry.js → p-166d19ac.entry.js} +1 -1
- package/lib/duet/{p-7433065d.system.entry.js → p-178b8a47.system.entry.js} +1 -1
- package/lib/duet/{p-273ee825.entry.js → p-17bfda66.entry.js} +1 -1
- package/lib/duet/{p-8625602d.system.entry.js → p-18463379.system.entry.js} +1 -1
- package/lib/duet/{p-29d53ea5.system.entry.js → p-1a65974d.system.entry.js} +1 -1
- package/lib/duet/{p-28aee391.entry.js → p-1cc7a137.entry.js} +1 -1
- package/lib/duet/{p-9da6fbd0.system.entry.js → p-1d1198dd.system.entry.js} +1 -1
- package/lib/duet/{p-28275d12.system.entry.js → p-1dff1118.system.entry.js} +1 -1
- package/lib/duet/{p-724d1682.entry.js → p-1ed2ef65.entry.js} +1 -1
- package/lib/duet/{p-a81137d2.entry.js → p-20a1c9ac.entry.js} +1 -1
- package/lib/duet/{p-cae73efd.system.entry.js → p-21dd3dba.system.entry.js} +1 -1
- package/lib/duet/{p-b53f2401.entry.js → p-22d16f94.entry.js} +1 -1
- package/lib/duet/{p-e24b7d0e.entry.js → p-2667d9dc.entry.js} +1 -1
- package/lib/duet/{p-ead29805.entry.js → p-2aa130a2.entry.js} +1 -1
- package/lib/duet/{p-01ebc478.entry.js → p-2ae03409.entry.js} +1 -1
- package/lib/duet/{p-2f715679.system.entry.js → p-2afb5bf3.system.entry.js} +1 -1
- package/lib/duet/{p-6d1f7659.system.entry.js → p-2d6171e9.system.entry.js} +1 -1
- package/lib/duet/{p-d65bf655.entry.js → p-2dcc7b0c.entry.js} +1 -1
- package/lib/duet/{p-b6859e60.system.entry.js → p-31e19362.system.entry.js} +1 -1
- package/lib/duet/{p-74214cc5.system.entry.js → p-330a4b1f.system.entry.js} +1 -1
- package/lib/duet/{p-ab1b2d93.entry.js → p-374599c9.entry.js} +1 -1
- package/lib/duet/{p-de9c27d0.system.entry.js → p-38b22704.system.entry.js} +1 -1
- package/lib/duet/{p-c2f9a318.system.entry.js → p-3948c738.system.entry.js} +1 -1
- package/lib/duet/{p-65d0162b.system.entry.js → p-3b15bdda.system.entry.js} +1 -1
- package/lib/duet/{p-01264667.entry.js → p-3c2b3349.entry.js} +1 -1
- package/lib/duet/{p-0bd8ca70.entry.js → p-3ca8e462.entry.js} +1 -1
- package/lib/duet/{p-b3302c2f.system.entry.js → p-41d03609.system.entry.js} +1 -1
- package/lib/duet/{p-2cdacb01.system.js → p-4289c19b.system.js} +1 -1
- package/lib/duet/p-45c37e01.system.entry.js +4 -0
- package/lib/duet/{p-af13cb98.entry.js → p-473b8661.entry.js} +1 -1
- package/lib/duet/{p-db44b3b4.entry.js → p-485832e7.entry.js} +1 -1
- package/lib/duet/{p-8406ca8e.entry.js → p-4a2af66f.entry.js} +1 -1
- package/lib/duet/{p-3afaf734.js → p-4d06fd44.js} +1 -1
- package/lib/duet/{p-43415ad8.entry.js → p-4d496fbd.entry.js} +1 -1
- package/lib/duet/p-4d8a5d37.entry.js +4 -0
- package/lib/duet/{p-924eebeb.system.entry.js → p-4dc15982.system.entry.js} +1 -1
- package/lib/duet/{p-e7c85aa3.entry.js → p-53604f23.entry.js} +1 -1
- package/lib/duet/{p-7980c7c7.system.entry.js → p-53c2006e.system.entry.js} +1 -1
- package/lib/duet/{p-10ae39d7.system.entry.js → p-53fc94a0.system.entry.js} +1 -1
- package/lib/duet/{p-7792b99b.system.entry.js → p-54704ee1.system.entry.js} +1 -1
- package/lib/duet/{p-ecceed3c.system.entry.js → p-56f40850.system.entry.js} +1 -1
- package/lib/duet/p-59f0bbf0.entry.js +4 -0
- package/lib/duet/{p-ce2dd921.entry.js → p-5a0482d3.entry.js} +1 -1
- package/lib/duet/{p-7ba22ad5.system.entry.js → p-5a72f8b5.system.entry.js} +1 -1
- package/lib/duet/{p-761c3bab.entry.js → p-5c026823.entry.js} +1 -1
- package/lib/duet/{p-5c6fe96f.js → p-5e9210a0.js} +1 -1
- package/lib/duet/{p-56860e41.entry.js → p-5ff95850.entry.js} +1 -1
- package/lib/duet/{p-cc2912ff.system.entry.js → p-60734222.system.entry.js} +1 -1
- package/lib/duet/{p-d5299653.entry.js → p-6138ae4f.entry.js} +1 -1
- package/lib/duet/p-62a7d1e0.system.entry.js +4 -0
- package/lib/duet/{p-b3f0b1df.system.entry.js → p-652ef5c4.system.entry.js} +1 -1
- package/lib/duet/{p-dea429f9.entry.js → p-65d9b543.entry.js} +1 -1
- package/lib/duet/{p-b4d7d067.system.entry.js → p-66dfb534.system.entry.js} +1 -1
- package/lib/duet/{p-3c1abeed.system.entry.js → p-6880e7e4.system.entry.js} +1 -1
- package/lib/duet/{p-adba09a3.entry.js → p-69dda5cf.entry.js} +1 -1
- package/lib/duet/{p-7e8e5ce0.system.entry.js → p-6e5dbf3f.system.entry.js} +1 -1
- package/lib/duet/{p-2bc7bfb8.system.entry.js → p-6f878638.system.entry.js} +1 -1
- package/lib/duet/{p-07da24e7.system.entry.js → p-70a6edcd.system.entry.js} +1 -1
- package/lib/duet/{p-7610cf8a.system.entry.js → p-70ea5a26.system.entry.js} +1 -1
- package/lib/duet/{p-a011272e.entry.js → p-72767ad2.entry.js} +1 -1
- package/lib/duet/{p-713fb177.entry.js → p-739ffce8.entry.js} +1 -1
- package/lib/duet/{p-447e1392.system.js → p-74aa0f9d.system.js} +1 -1
- package/lib/duet/{p-c44fa6da.system.js → p-7648f559.system.js} +1 -1
- package/lib/duet/p-77bbd147.entry.js +4 -0
- package/lib/duet/{p-9ba5dbb7.entry.js → p-77f01407.entry.js} +1 -1
- package/lib/duet/{p-a090e7f0.entry.js → p-7931d6b8.entry.js} +1 -1
- package/lib/duet/{p-982c17df.entry.js → p-798942ab.entry.js} +1 -1
- package/lib/duet/{p-1977033e.system.entry.js → p-7b2d2e4d.system.entry.js} +1 -1
- package/lib/duet/{p-031cd628.system.entry.js → p-7bbf3a3b.system.entry.js} +1 -1
- package/lib/duet/{p-e1287a80.entry.js → p-7dfee16a.entry.js} +1 -1
- package/lib/duet/{p-7f60def8.entry.js → p-7f16d0df.entry.js} +1 -1
- package/lib/duet/{p-024c9ef9.entry.js → p-7f22291f.entry.js} +1 -1
- package/lib/duet/{p-841673c0.system.entry.js → p-81cde516.system.entry.js} +1 -1
- package/lib/duet/{p-f2d13294.system.entry.js → p-8228f180.system.entry.js} +1 -1
- package/lib/duet/{p-35d862a1.entry.js → p-84835d40.entry.js} +1 -1
- package/lib/duet/{p-2f701bd3.system.entry.js → p-874f4064.system.entry.js} +1 -1
- package/lib/duet/{p-36602fe4.entry.js → p-897e6941.entry.js} +1 -1
- package/lib/duet/{p-6833a13e.system.entry.js → p-8a970f0a.system.entry.js} +1 -1
- package/lib/duet/{p-d1d1e439.system.entry.js → p-8b1c69f9.system.entry.js} +1 -1
- package/lib/duet/{p-9c08f843.entry.js → p-8baeb065.entry.js} +1 -1
- package/lib/duet/{p-55183c9c.entry.js → p-8eea942e.entry.js} +1 -1
- package/lib/duet/{p-17676f8d.entry.js → p-8f871c29.entry.js} +1 -1
- package/lib/duet/{p-0e3bcaa9.entry.js → p-90999186.entry.js} +1 -1
- package/lib/duet/{p-ca22effd.entry.js → p-979fb2cf.entry.js} +1 -1
- package/lib/duet/{p-0278c664.system.entry.js → p-97b3fb78.system.entry.js} +1 -1
- package/lib/duet/{p-73695b8f.entry.js → p-97eb9b2e.entry.js} +1 -1
- package/lib/duet/{p-4dcb6a39.js → p-97fe4968.js} +1 -1
- package/lib/duet/{p-7ff7d213.entry.js → p-98c15b83.entry.js} +1 -1
- package/lib/duet/{p-e99d4ab0.system.entry.js → p-9fab0a1d.system.entry.js} +1 -1
- package/lib/duet/{p-794f26b0.system.entry.js → p-a0a59034.system.entry.js} +1 -1
- package/lib/duet/{p-b1ac6254.system.entry.js → p-a1a0370a.system.entry.js} +1 -1
- package/lib/duet/{p-b0ef5620.js → p-a20ed47c.js} +1 -1
- package/lib/duet/{p-a2eb63af.system.entry.js → p-a4dbef0b.system.entry.js} +1 -1
- package/lib/duet/{p-a27457ec.system.entry.js → p-a54c3c58.system.entry.js} +1 -1
- package/lib/duet/{p-61a0ad44.entry.js → p-a6bb7eb0.entry.js} +1 -1
- package/lib/duet/{p-57daa78e.system.entry.js → p-ac21f1dc.system.entry.js} +1 -1
- package/lib/duet/p-ac7ef7e2.js +4 -0
- package/lib/duet/{p-5c3bb425.entry.js → p-aca1538e.entry.js} +1 -1
- package/lib/duet/{p-d60846a0.entry.js → p-ae19da09.entry.js} +1 -1
- package/lib/duet/{p-1798db32.system.js → p-b2d5f07c.system.js} +1 -1
- package/lib/duet/{p-c5e2f011.system.entry.js → p-b2f3287a.system.entry.js} +1 -1
- package/lib/duet/p-b5b8973c.js +4 -0
- package/lib/duet/{p-4d46054e.system.entry.js → p-b6366830.system.entry.js} +1 -1
- package/lib/duet/{p-9d15f354.system.entry.js → p-b8d342d1.system.entry.js} +1 -1
- package/lib/duet/{p-846abd90.system.entry.js → p-bd3c7c60.system.entry.js} +1 -1
- package/lib/duet/{p-b7b88f43.system.entry.js → p-be8044cb.system.entry.js} +1 -1
- package/lib/duet/{p-6a255600.entry.js → p-bf85a8c6.entry.js} +1 -1
- package/lib/duet/p-bfafaac4.entry.js +4 -0
- package/lib/duet/{p-ea2e8887.system.entry.js → p-bfe1d1d1.system.entry.js} +1 -1
- package/lib/duet/p-c2308ebd.entry.js +4 -0
- package/lib/duet/{p-e622420a.entry.js → p-c47bc68e.entry.js} +1 -1
- package/lib/duet/{p-a94536d7.entry.js → p-c5b6d9ed.entry.js} +1 -1
- package/lib/duet/{p-0e12e3b8.entry.js → p-c93daa4f.entry.js} +1 -1
- package/lib/duet/{p-eb28342c.system.entry.js → p-cc6e2037.system.entry.js} +1 -1
- package/lib/duet/{p-36009a0d.entry.js → p-cd4cd328.entry.js} +1 -1
- package/lib/duet/{p-6ab7c8ae.entry.js → p-cf3dbdbe.entry.js} +1 -1
- package/lib/duet/{p-5013078d.system.entry.js → p-cf6a502f.system.entry.js} +1 -1
- package/lib/duet/{p-9f1f30d1.entry.js → p-cfb501bd.entry.js} +1 -1
- package/lib/duet/{p-3986c681.system.js → p-d080e1b9.system.js} +1 -1
- package/lib/duet/{p-361371c0.entry.js → p-d159daa2.entry.js} +1 -1
- package/lib/duet/{p-a4170fe7.system.js → p-d3960f14.system.js} +1 -1
- package/lib/duet/{p-42542284.entry.js → p-d4f2abe8.entry.js} +1 -1
- package/lib/duet/{p-619a6ecf.js → p-d5a87e9a.js} +1 -1
- package/lib/duet/{p-cb6f8369.entry.js → p-d6b00137.entry.js} +1 -1
- package/lib/duet/{p-4d8136a6.system.entry.js → p-d7b8ea98.system.entry.js} +1 -1
- package/lib/duet/{p-8e2ad162.entry.js → p-dc68fee2.entry.js} +1 -1
- package/lib/duet/{p-0887bb20.system.entry.js → p-e05cecd0.system.entry.js} +2 -2
- package/lib/duet/{p-ca8df590.system.entry.js → p-e0b5d41a.system.entry.js} +1 -1
- package/lib/duet/{p-d6568e05.entry.js → p-e1c5ef00.entry.js} +1 -1
- package/lib/duet/{p-ad6532e2.entry.js → p-e21018b3.entry.js} +1 -1
- package/lib/duet/{p-29b17590.entry.js → p-e263283f.entry.js} +1 -1
- package/lib/duet/{p-0e32e0f3.entry.js → p-e4a0a1b3.entry.js} +1 -1
- package/lib/duet/{p-28e4efe1.system.entry.js → p-e513c4ca.system.entry.js} +1 -1
- package/lib/duet/{p-5ce6dbbb.system.entry.js → p-e6f7a7fd.system.entry.js} +1 -1
- package/lib/duet/p-e8f8aae8.system.js +4 -0
- package/lib/duet/{p-357c0e81.system.entry.js → p-e93169b0.system.entry.js} +1 -1
- package/lib/duet/{p-569d1162.entry.js → p-eb425c47.entry.js} +1 -1
- package/lib/duet/{p-804d9390.system.entry.js → p-edcdd3e6.system.entry.js} +1 -1
- package/lib/duet/{p-20b6ae5f.system.entry.js → p-efa05a47.system.entry.js} +1 -1
- package/lib/duet/{p-a8ed2473.system.entry.js → p-efe71c0a.system.entry.js} +1 -1
- package/lib/duet/{p-1b64118e.system.entry.js → p-f065f062.system.entry.js} +1 -1
- package/lib/duet/{p-3e294789.system.entry.js → p-f23de827.system.entry.js} +1 -1
- package/lib/duet/{p-36282ff0.system.entry.js → p-f4df9001.system.entry.js} +1 -1
- package/lib/duet/{p-f3463af2.entry.js → p-f5a0878c.entry.js} +1 -1
- package/lib/duet/{p-793a7e00.system.entry.js → p-f5b6fd8e.system.entry.js} +1 -1
- package/lib/duet/{p-343293f9.system.entry.js → p-f785408c.system.entry.js} +1 -1
- package/lib/duet/{p-610bd1be.entry.js → p-f892350a.entry.js} +1 -1
- package/lib/duet/{p-f1083113.system.entry.js → p-f966e96a.system.entry.js} +1 -1
- package/lib/duet/p-fc06b1eb.system.entry.js +4 -0
- package/lib/duet/{p-aac4f547.system.entry.js → p-fcc0e0bf.system.entry.js} +2 -2
- package/lib/duet/{p-3f295c07.entry.js → p-fd376e7c.entry.js} +1 -1
- package/lib/duet/p-fe13effe.system.entry.js +4 -0
- package/lib/duet/{p-694cb5c7.system.entry.js → p-ffb9535d.system.entry.js} +1 -1
- package/lib/esm/{a11y-utils-7f48d84a.js → a11y-utils-9f6bee96.js} +1 -1
- package/lib/esm/{app-globals-8f12ab47.js → app-globals-f12e0500.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +2 -2
- package/lib/esm/duet-alert.entry.js +3 -3
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-banner.entry.js +2 -2
- package/lib/esm/duet-breadcrumb.entry.js +2 -2
- package/lib/esm/duet-breadcrumbs.entry.js +2 -2
- package/lib/esm/duet-button_2.entry.js +2 -2
- package/lib/esm/duet-callout.entry.js +2 -2
- package/lib/esm/duet-caption_4.entry.js +4 -4
- package/lib/esm/duet-card.entry.js +2 -2
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-checkmark.entry.js +1 -1
- package/lib/esm/duet-chip_3.entry.js +9 -7
- package/lib/esm/duet-choice_2.entry.js +3 -3
- package/lib/esm/duet-collapsible.entry.js +2 -2
- package/lib/esm/duet-combobox.entry.js +3 -3
- package/lib/esm/duet-contact-card.entry.js +2 -2
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +5 -5
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table_3.entry.js +3 -3
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +2 -2
- package/lib/esm/duet-file-chooser.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +3 -3
- package/lib/esm/duet-grid_2.entry.js +1 -1
- package/lib/esm/duet-header_2.entry.js +2 -2
- package/lib/esm/duet-hero.entry.js +3 -3
- package/lib/esm/duet-icon.entry.js +1 -1
- package/lib/esm/duet-input_2.entry.js +4 -4
- package/lib/esm/duet-layout.entry.js +3 -3
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-menu-bar-button.entry.js +1 -1
- package/lib/esm/duet-menu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm/duet-menu-bar-dropdown.entry.js +1 -1
- package/lib/esm/duet-menu-bar-item.entry.js +4 -4
- package/lib/esm/duet-menu-bar-link.entry.js +1 -1
- package/lib/esm/duet-menu-bar.entry.js +6 -5
- package/lib/esm/duet-modal.entry.js +4 -4
- package/lib/esm/duet-multiselect.entry.js +4 -4
- package/lib/esm/duet-nav.entry.js +1 -1
- package/lib/esm/duet-notification_2.entry.js +2 -2
- package/lib/esm/duet-number-input.entry.js +3 -3
- package/lib/esm/duet-overlay.entry.js +1 -1
- package/lib/esm/duet-page-heading.entry.js +1 -1
- package/lib/esm/duet-pagination_2.entry.js +2 -2
- package/lib/esm/duet-progress.entry.js +2 -2
- package/lib/esm/duet-promo-card.entry.js +2 -2
- package/lib/esm/duet-radio_2.entry.js +2 -2
- package/lib/esm/duet-range-slider.entry.js +3 -3
- package/lib/esm/duet-scrollable_3.entry.js +14 -11
- package/lib/esm/duet-section-layout.entry.js +2 -2
- package/lib/esm/duet-select.entry.js +3 -3
- package/lib/esm/duet-shaped-image.entry.js +1 -1
- package/lib/esm/duet-show-more.entry.js +2 -2
- package/lib/esm/duet-slideout-lang.entry.js +2 -2
- package/lib/esm/duet-slideout-link.entry.js +1 -1
- package/lib/esm/duet-slideout-panel-dropdown.entry.js +1 -1
- package/lib/esm/duet-slideout-panel.entry.js +4 -4
- package/lib/esm/duet-slideout.entry.js +4 -4
- package/lib/esm/duet-status-icon.entry.js +1 -1
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm/duet-submenu-bar-dropdown.entry.js +1 -1
- package/lib/esm/duet-submenu-bar-item.entry.js +4 -4
- package/lib/esm/duet-submenu-bar-link.entry.js +1 -1
- package/lib/esm/duet-submenu-bar.entry.js +1 -1
- package/lib/esm/duet-textarea.entry.js +4 -4
- package/lib/esm/duet-toggle.entry.js +3 -3
- package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
- package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
- package/lib/esm/duet-toolbar-item.entry.js +4 -4
- package/lib/esm/duet-toolbar-link.entry.js +1 -1
- package/lib/esm/duet-toolbar.entry.js +1 -1
- package/lib/esm/duet-tooltip-button_2.entry.js +2 -2
- package/lib/esm/duet-tooltip.entry.js +3 -3
- package/lib/esm/duet-tray.entry.js +2 -2
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-upload-item.entry.js +3 -3
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +3 -3
- package/lib/esm/{errorcodes.utils-66d99a23.js → errorcodes.utils-d594aed8.js} +1 -1
- package/lib/esm/{focus-utils-b48493c9.js → focus-utils-fc101536.js} +1 -1
- package/lib/esm/{index-5a27eaf5.js → index-fa810c91.js} +331 -2
- package/lib/esm/{label-00d35a2b.js → label-b3694b48.js} +1 -1
- package/lib/esm/{language-utils-2c1dd412.js → language-utils-35eb1c9f.js} +1 -1
- package/lib/esm/loader.js +3 -3
- package/lib/esm/{slot-utils-8fc9fbbf.js → slot-utils-b2101c56.js} +1 -1
- package/lib/esm-es5/{a11y-utils-7f48d84a.js → a11y-utils-9f6bee96.js} +1 -1
- package/lib/esm-es5/{app-globals-8f12ab47.js → app-globals-f12e0500.js} +1 -1
- package/lib/esm-es5/duet-action-button.entry.js +1 -1
- package/lib/esm-es5/duet-alert.entry.js +1 -1
- package/lib/esm-es5/duet-badge.entry.js +1 -1
- package/lib/esm-es5/duet-banner.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm-es5/duet-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-callout.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-checkmark.entry.js +1 -1
- package/lib/esm-es5/duet-chip_3.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +1 -1
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-combobox.entry.js +1 -1
- package/lib/esm-es5/duet-contact-card.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-file-chooser.entry.js +2 -2
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +1 -1
- package/lib/esm-es5/duet-header_2.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-button.entry.js +2 -2
- package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-item.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-multiselect.entry.js +1 -1
- package/lib/esm-es5/duet-nav.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +1 -1
- package/lib/esm-es5/duet-overlay.entry.js +1 -1
- package/lib/esm-es5/duet-page-heading.entry.js +1 -1
- package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-promo-card.entry.js +1 -1
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
- package/lib/esm-es5/duet-section-layout.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-shaped-image.entry.js +1 -1
- package/lib/esm-es5/duet-show-more.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-panel.entry.js +1 -1
- package/lib/esm-es5/duet-slideout.entry.js +1 -1
- package/lib/esm-es5/duet-status-icon.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-item.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-item.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm-es5/duet-upload-item.entry.js +2 -2
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{errorcodes.utils-66d99a23.js → errorcodes.utils-d594aed8.js} +1 -1
- package/lib/esm-es5/focus-utils-fc101536.js +4 -0
- package/lib/esm-es5/index-fa810c91.js +4 -0
- package/lib/esm-es5/{label-00d35a2b.js → label-b3694b48.js} +1 -1
- package/lib/esm-es5/{language-utils-2c1dd412.js → language-utils-35eb1c9f.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{slot-utils-8fc9fbbf.js → slot-utils-b2101c56.js} +1 -1
- package/package.json +3 -3
- package/lib/duet/p-0d6ace6f.js +0 -4
- package/lib/duet/p-15a35870.system.entry.js +0 -4
- package/lib/duet/p-22a95bff.system.js +0 -4
- package/lib/duet/p-3a8e181e.entry.js +0 -4
- package/lib/duet/p-402af830.js +0 -4
- package/lib/duet/p-4a4d949c.entry.js +0 -4
- package/lib/duet/p-654a4d24.entry.js +0 -4
- package/lib/duet/p-663d1dbe.system.entry.js +0 -4
- package/lib/duet/p-6791f33a.system.entry.js +0 -4
- package/lib/duet/p-7094e51e.js +0 -4
- package/lib/duet/p-97f1f446.system.entry.js +0 -4
- package/lib/duet/p-b85f2a7b.entry.js +0 -4
- package/lib/duet/p-be334873.system.js +0 -4
- package/lib/duet/p-c4150af0.entry.js +0 -4
- package/lib/duet/p-d0d6ecb5.entry.js +0 -4
- package/lib/esm-es5/focus-utils-b48493c9.js +0 -4
- package/lib/esm-es5/index-5a27eaf5.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,n,a){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function o(e){try{d(a.next(e))}catch(e){r(e)}}function s(e){try{d(a["throw"](e))}catch(e){r(e)}}function d(e){e.done?n(e.value):i(e.value).then(o,s)}d((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,i,r,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return d([e,t])}}function d(s){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(n=0)),n)try{if(a=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{a=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var a=0,i=t.length,r;a<i;a++){if(r||!(a in t)){if(!r)r=Array.prototype.slice.call(t,0,a);r[a]=t[a]}}return e.concat(r||Array.prototype.slice.call(t))};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{h,r as registerInstance,c as createEvent,H as Host,g as getElement,F as Fragment}from"./index-5a27eaf5.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{f as fieldSorter,d as debounce}from"./js-utils-9b9e0039.js";import{i as isKeyboardClick}from"./keyboard-utils-daf80d44.js";import{a as getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver,g as getLocaleString,s as sanitizeString}from"./language-utils-2c1dd412.js";import{p as spaceLarge,q as fontFamilyText,r as fontSizeMedium,u as fontFamilyTextTurva,v as colorSecondary,w as colorSecondaryTurva,x as fontWeightSemiBold,y as lineHeightSmall,z as colorGrayDarker,A as colorGrayDarkTurva,B as spaceMedium,C as spaceXxSmall,n as colorGrayLightest,a as mediaQueryXSmall,D as spaceSmall,E as colorGrayLight,F as colorGrayLightTurva,G as colorGrayDarkerTurva,k as colorPrimary,H as sizeNavigation,s as sizeHeader}from"./tokens.module-2d02f5ff.js";import{b as breakpointTokensUpTo,a as breakpointToToken}from"./token-utils-b9ba8c5e.js";import{c as createID}from"./create-id-149a1b6d.js";import{p as parsePossibleJSON}from"./string-utils-192eb3c8.js";import{g as getError,a as getI18nError}from"./errorcodes.utils-66d99a23.js";var TableData=function(e,t){var n=e.data,a=e.groupId,i=e.alignment;var r="duet-editable-table duet-editable-table-content-".concat(a);if(typeof n==="string"){return h("td",{innerHTML:n,class:r,part:"".concat(a,"content"),style:{verticalAlign:i}})}else{return h("td",{class:r,part:"".concat(a,"content"),style:{verticalAlign:i}},n)}};var duetEditableTableCss=":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu,td.duet-editable-table-actions-menu{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon .duet-icon{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row .duet-text-right{text-align:right}.duet-editable-table-header tr .duet-editable-table-header-hidden{padding:0 !important;font-size:0;border-bottom:0}";var DuetEditableTableStyle0=duetEditableTableCss;var DuetEditableTable=function(){function e(e){var t=this;registerInstance(this,e);this.duetTableToggle=createEvent(this,"duetTableToggle",7);this.duetMenuClick=createEvent(this,"duetMenuClick",7);this.hasHeadSlotFirst=false;this.hasHeadSlotLast=false;this.hasFootSlot=false;this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"};this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"};this.toggleColumn=function(e,n){n.preventDefault();var a=e.sort_order,i=e.direction,r=e.index,o=e.key;t.duetTableToggle.emit({sort_order:a,index:r,direction:i,key:o,component:"duet-editable-table",originalEvent:n})};this.handleKeyDown=function(e,n){if(isKeyboardClick(n)){t.toggleColumn(e,n)}};this.language=getLanguage();this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.actions=undefined;this.columns=undefined;this.rows=undefined;this.sortable=false;this.groupId="";this.theme="";this.accessibleRole=undefined;this.hideHeadVisually=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']");this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']");this.hasFootSlot=!!this.element.querySelector("[slot='tfoot']")};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};e.prototype.createLabel=function(e){var t=this;var n=e.sort_order,a=e.direction,i=e.index,r=e.label;var o=getLocaleString(r);if(!this.sortable){return o}var s=function(){if(!!n&&a===1){return"action-arrow-down-small"}else if(!!n&&a===-1){return"action-arrow-up-small"}return"action-subtract-small"};return h("span",{class:"duet-table-label","data-index":i},h("duet-button",{size:"small",icon:s(),"icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":true,onClick:function(n){return t.toggleColumn(e,n)},onKeyDown:function(n){return t.handleKeyDown(e,n)}},o))};e.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(fieldSorter(["index"]))};e.prototype.getRowSortOrder=function(){var e=__spreadArray([],this.columns,true).sort(fieldSorter(["sort_order"]));return e.filter((function(e){return e.sort_order})).map((function(e){return e.direction===-1?"-".concat(e.key):e.key}))};e.prototype.renderTableHeader=function(){var e=this;if(!this.columns){return}var t=this.getSortedColumns();return h("tr",{class:{"duet-table-action-header":!!this.actions}},t.map((function(t){if(t.display!==false){var n=e.createLabel(t);return n!==""?h("th",{scope:"col"},n):h("td",null)}})),this.actions&&h("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&h("duet-visually-hidden",null,this.actionColumnLabel[this.language])))};e.prototype.renderActions=function(e,t){var n=this;if(!this.actions){return}return h("td",{class:"duet-text-right"},this.actions.map((function(a){return h("duet-action-button",{actionMeta:Object.assign({},(e===null||e===void 0?void 0:e.meta)||{},{index:t}),actionId:(e===null||e===void 0?void 0:e.uid)||(e===null||e===void 0?void 0:e.id)||null,actionName:a.name,theme:n.theme,iconName:a.icon,iconColor:a.color,iconSize:a.size,background:a.background,"accessible-label":"".concat(e.actionDescription||""," ").concat(getLocaleString(a.label)," ")})})))};e.prototype.renderTableBody=function(){var e=this;var t=this.getSortedColumns();var n=this.getRowSortOrder();var a=__spreadArray([],this.rows,true).sort(fieldSorter(n));return a.map((function(n,a){var i;return h("tr",{class:(i={"duet-table-action-row":!!e.actions,"duet-editable-table-row":true},i["duet-editable-table-row-".concat(e.groupId)]=true,i),"data-meta":JSON.stringify(n.meta)},t.map((function(t){var a=n[t.key]?n[t.key]:n.item;if(t.display!==false){return h(TableData,{data:a,groupId:e.groupId})}})),e.actions&&e.renderActions(n,a))}))};e.prototype.render=function(){var e;return h(Host,{key:"170a18bded5a1eefa62aabdfe9cbec40ebb9ad51",class:(e={},e["duet-editable-table-".concat(this.variation)]=true,e["duet-editable-table"]=true,e["duet-editable-table-".concat(this.theme)]=true,e["duet-editable-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-editable-table-sortable"]=this.sortable,e["duet-editable-table-actions"]=!!this.actions,e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},h("duet-table",{key:"2282f3b54102b8fd06bbfb8c1158e54f400a21cc",class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint,"hide-head-visually":this.hideHeadVisually},h("table",{key:"dda2ea49bff29277445de50a779df0434e35d620",role:this.accessibleRole},h("caption",{key:"bb4633c4947dbfe2c9b8148688d1f03c67d94188"},h("slot",{key:"471406fee4b4173e29abf754212355814f591266",name:"tcaption"})),h("thead",{key:"f907958d599c07d6f220bc3159e8efa0ba85feb5"},this.hasHeadSlotFirst&&h("tr",{key:"32803f29a816f2abe67aa8b2dbfd99fdff7c9e5b"},h("td",{key:"634ee6e9a8b53e9610a7cbd0e5a536bcaf654207",class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{key:"444de221a86d743d36598d71fc3256c0aa16d034",name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&h("tr",{key:"a2c9f9914ab42a5421daac067472db45f6d680a7"},h("td",{key:"0edd405623af60d014f509636fad5cf2f53f86a5",class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{key:"84f0e807a4ddf22910655aad0de2dcd7fd93973c",name:"thead-last"})))),h("tbody",{key:"7b4413d38b050b69a0a71bcca7a8200d1f480d43"},this.renderTableBody()),this.hasFootSlot&&h("tfoot",{key:"a7096789b2fc5615b7a9622df8de361ea486bb69"},h("tr",{key:"52afc13a557588195883a16b10b308b6c1062232"},h("td",{key:"a231e63b19ed8c96aec86973242e07c07506547d",class:"duet-editable-table-footer-menu",colSpan:99},h("slot",{key:"152c200e205eb63fff18df14c4ded8ea67a340d5",name:"tfoot"})))))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetEditableTable.style=DuetEditableTableStyle0;var styles="\nduet-table {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n -moz-appearance: none;\n -webkit-appearance: none;\n appearance: none;\n margin-bottom: ".concat(spaceLarge," !important;\n display: block;\n font-variant-numeric: tabular-nums;\n\n table,\n thead,\n tbody,\n tfoot,\n th,\n td,\n tr {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n -moz-appearance: none;\n -webkit-appearance: none;\n appearance: none;\n }\n\n &.duet-m-0 {\n margin: 0 !important;\n }\n\n table {\n width: 100%;\n font-family: ").concat(fontFamilyText,";\n font-size: ").concat(fontSizeMedium,";\n text-align: left;\n border-spacing: 0;\n border-collapse: separate;\n }\n\n &.duet-table-hide-head-visually.duet-table-hide-head-visually {\n thead,\n thead * {\n position: absolute !important;\n top: 0;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n overflow: hidden !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n border: 0 !important;\n }\n }\n\n &.duet-theme-turva table {\n font-family: ").concat(fontFamilyTextTurva,";\n }\n\n td {\n -webkit-hyphens: auto;\n hyphens: auto;\n color: ").concat(colorSecondary,";\n }\n\n &.duet-theme-turva td {\n color: ").concat(colorSecondaryTurva,";\n }\n\n th {\n font-weight: ").concat(fontWeightSemiBold,";\n line-height: ").concat(lineHeightSmall,";\n color: ").concat(colorGrayDarker,";\n text-align: left;\n }\n\n &.duet-theme-turva th {\n color: ").concat(colorGrayDarkTurva,";\n }\n\n tbody th {\n font-weight: ").concat(fontWeightSemiBold,";\n color: ").concat(colorSecondary,";\n }\n\n &.duet-theme-turva tbody th {\n color: ").concat(colorSecondaryTurva,";\n }\n\n & .duet-table-action-row {\n & td:last-child {\n justify-self: end;\n padding-right: ").concat(spaceLarge," !important;\n white-space: nowrap;\n }\n }\n\n span.duet-table-cell-heading {\n display: none;\n }\n}\n\n.duet-table-flattened {\n table,\n thead,\n tbody,\n tfoot,\n th,\n td,\n tr {\n display: block;\n }\n\n thead tr {\n position: absolute !important;\n top: 0;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n overflow: hidden !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n border: 0 !important;\n }\n\n td {\n line-height: ").concat(lineHeightSmall,";\n\n &:not(:last-child) {\n margin-bottom: ").concat(spaceMedium,";\n }\n\n span.duet-table-cell-heading {\n margin-bottom: ").concat(spaceXxSmall,";\n display: block;\n font-size: ").concat(fontSizeMedium,";\n font-weight: ").concat(fontWeightSemiBold,";\n color: ").concat(colorSecondary,";\n }\n }\n\n &.duet-theme-turva td span.duet-table-cell-heading {\n color: ").concat(colorSecondaryTurva,";\n }\n\n tbody td,\n tbody th,\n tfoot td {\n padding: 0 !important;\n text-align: left !important;\n }\n\n tbody th {\n font-weight: ").concat(fontWeightSemiBold,";\n line-height: ").concat(lineHeightSmall,";\n color: ").concat(colorGrayDarker,";\n text-align: left;\n }\n}\n\n.duet-table-sticky thead th {\n position: sticky;\n top: 0;\n background: ").concat(colorGrayLightest,";\n}\n\n.duet-table-striped {\n td,\n th {\n padding: ").concat(spaceLarge," !important;\n @media ").concat(mediaQueryXSmall.replace("'","").replace("'","")," {\n padding: ").concat(spaceLarge," ").concat(spaceSmall," !important;\n }\n }\n\n tbody th {\n background: ").concat(colorGrayLightest,";\n }\n\n &.duet-table-sticky {\n thead th {\n border-bottom: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva thead th {\n border-bottom-color: ").concat(colorGrayLightTurva,";\n }\n }\n\n tbody:not(:first-of-type) th {\n padding-top: calc(").concat(spaceLarge," * 2) !important;\n }\n\n tbody:only-of-type tr:nth-of-type(odd) {\n background: rgba(4, 81, 128, 0.04);\n }\n\n &.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd) {\n background: rgba(").concat(colorSecondaryTurva,", 0.04);\n }\n\n tbody:not(:only-of-type) tr:nth-of-type(even) {\n background: rgba(4, 81, 128, 0.04);\n }\n\n &.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even) {\n background: rgba(").concat(colorSecondaryTurva,", 0.04);\n }\n\n tfoot td {\n border-top: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tfoot td {\n border-top-color: ").concat(colorGrayLightTurva,";\n }\n\n &.duet-table-flattened {\n tbody:not(:first-of-type) th {\n padding-top: ").concat(spaceLarge," !important;\n }\n\n tr {\n padding: ").concat(spaceLarge," !important;\n }\n\n tfoot {\n td {\n border-top: 0;\n }\n\n tr {\n border-top: 1px solid ").concat(colorGrayLight,";\n }\n }\n\n &.duet-theme-turva tfoot tr {\n border-top-color: ").concat(colorGrayLightTurva,";\n }\n }\n}\n\n.duet-table-plain, .duet-table-fixed, .duet-table-minimal {\n th {\n padding: ").concat(spaceMedium," !important;\n border-bottom: 1px solid ").concat(colorGrayDarker,";\n\n &:first-child {\n padding-left: 0 !important;\n }\n\n &:last-child {\n padding-right: 0 !important;\n }\n }\n\n &.duet-theme-turva th {\n border-bottom-color: ").concat(colorGrayDarkerTurva,";\n }\n\n tbody th {\n padding-top: calc(").concat(spaceLarge," * 2) !important;\n border-bottom-color: ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tbody th {\n border-bottom-color: ").concat(colorGrayLightTurva,";\n }\n\n td {\n padding: ").concat(spaceMedium," !important;\n\n &:first-child {\n padding-left: 0 !important;\n }\n\n &:last-child {\n padding-right: 0 !important;\n }\n }\n\n tbody td {\n border-bottom: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tbody td {\n border-bottom-color: ").concat(colorGrayLightTurva,";\n }\n\n &.duet-table-flattened {\n tbody:first-of-type th {\n padding-top: 0 !important;\n }\n\n td,\n tbody th {\n border-bottom: 0;\n }\n\n tr {\n padding: ").concat(spaceLarge," 0 !important;\n }\n\n tbody th {\n padding-top: ").concat(spaceLarge," !important;\n }\n\n tfoot td {\n margin-bottom: ").concat(spaceXxSmall," !important;\n }\n\n tbody:not(:only-of-type) tr:first-child {\n border-bottom: 0;\n }\n }\n}\n\n.duet-table-plain {\n\n &.duet-table-flattened {\n tbody tr {\n border-bottom: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tbody tr {\n border-bottom-color: ").concat(colorGrayLightTurva,";\n }\n }\n}\n\n.duet-table-minimal {\n\n tbody tr,\n tbody tr td {\n vertical-align: top;\n border-bottom: 0 none;\n }\n\n tbody tr:last-of-type,\n tbody tr:last-of-type td {\n border-bottom: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-table-flattened {\n tbody tr,\n tbody tr td {\n border-bottom: 0 none;\n }\n\n tbody tr td[data-heading]::before {\n display: none;\n }\n\n tfoot {\n border-top: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tfoot {\n border-top-color: ").concat(colorGrayLightTurva,";\n }\n }\n}\n\n.duet-table-fixed {\n\n table {\n table-layout: fixed;\n }\n\n tbody tr,\n tbody tr td,\n tbody tr td:first-child {\n padding: 4px !important;\n vertical-align: text-bottom;\n border-bottom: 0 none;\n }\n\n thead {\n display: none;\n }\n\n tbody tr,\n tbody tr td {\n border-bottom: 0 none;\n }\n\n &:not(.duet-table-flattened) {\n tfoot {\n border-top: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tfoot {\n border-top-color: ").concat(colorGrayLightTurva,";\n }\n }\n}\n.duet-table-scrollable {\n position: relative;\n width: 100%;\n overflow-x: auto;\n background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;\n background-repeat: no-repeat;\n background-attachment: local, local, scroll, scroll;\n background-size: 100px 100%, 100px 100%, 12px 100%, 12px 100%;\n}\n\n.duet-table-selected-column {\n background: rgba(").concat(colorPrimary,", 0.08);\n\n .duet-theme-turva & {\n background: rgba(").concat(colorGrayDarkerTurva,", 0.08);\n }\n}\n\n.duet-table-sortable {\n tbody tr td:first-child,\n thead tr th:first-child {\n padding: ").concat(spaceLarge,";\n }\n\n &:not(.duet-table-flattened) {\n tfoot {\n border-top: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tfoot {\n border-top-color: ").concat(colorGrayLightTurva,';\n }\n }\n}\n\n\n.duet-table-actions {\n table {\n table-layout: auto;\n }\n\n thead {\n & th:last-child {\n width: 1px;\n white-space: nowrap;\n }\n }\n}\n\n.duet-editable-table-table.duet-table-flattened {\n tr {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-auto-rows: auto;\n gap: 10px;\n\n &.duet-table-action-row td:last-child::before {\n padding: 0;\n content: "";\n }\n }\n\n td {\n grid-column: 1 / 2;\n\n &:first-child {\n grid-row: 1;\n grid-column: 1;\n }\n\n &:last-child {\n grid-row: 1;\n grid-column: 2;\n }\n }\n}\n').replace(/[\n\r\t]/gm,"");function createStyles(e){var t=e.getRootNode();var n=t instanceof ShadowRoot;if(n){var a=new CSSStyleSheet;a.replace(styles).then((function(){t.adoptedStyleSheets.push(a)}))}else{var i=document.querySelector("style#duet-table-styles");if(i){return}var r=document.createElement("style");r.id="duet-table-styles";r.innerHTML=styles;document.head.append(r)}}var stickyTopValues={none:0,"with-links":parseFloat(sizeNavigation)*16,"without-links":parseFloat(sizeHeader)*16};var DuetTable=function(){function e(e){var t=this;registerInstance(this,e);this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)";this.handleMediaQueryChange=function(e){t.matchesBreakpoint=breakpointTokensUpTo.includes(t.breakpoint)?!e.matches:e.matches};this.matchesBreakpoint=true;this.language=getLanguage();this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.hideHeadVisually=false}e.prototype.watchLanguageStateHandler=function(e,t){var n=this;if(e!==t){setTimeout((function(){return n.copyHeadingsToCells()}),50)}};e.prototype.connectedCallback=function(){var e=this;createStyles(this.element);var t=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":breakpointToToken[this.breakpoint];this.mq=matchMedia(t);this.mq.addEventListener("change",debounce(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return debounce(e.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var e=stickyTopValues[this.stickyDistance];var t=this.element.querySelectorAll(this.headingSelector);t.forEach((function(t){return t.style.top="".concat(e,"px")}))}};e.prototype.componentDidLoad=function(){this.observer?this.observer.takeRecords():null;connectLanguageChangeObserver(this)};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true;disconnectLanguageChangeObserver(this)};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll(this.headingSelector);var t=this.element.querySelectorAll("tbody tr");var n=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(n[t]){var a=e.querySelector(".duet-table-cell-heading");if(!a||a.textContent!==n[t]){a===null||a===void 0?void 0:a.remove();var i=document.createElement("span");i.textContent=n[t];i.classList.add("duet-table-cell-heading");i.setAttribute("aria-hidden","true");i.inert=true;e.prepend(i)}}}))}))};e.prototype.render=function(){var e;return h(Host,{key:"fcdd601ace6ef28821198d34d85eb3dc94b73aa3",class:(e={},e["duet-table-".concat(this.variation)]=true,e["duet-table-flattened"]=!this.matchesBreakpoint,e["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,e["duet-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e["duet-table-hide-head-visually"]=this.hideHeadVisually,e)},h("slot",{key:"35cef7a6450ff5dc1e34cda94637a50dec7860a8"}))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{language:["watchLanguageStateHandler"]}},enumerable:false,configurable:true});return e}();var errorCodes=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-203",system_message:"Files to upload exceed total byte size limit",message:{fi:"Yritit lisätä tiedostoja, jotka ylittäisivät suurimman sallitun yhteenlasketun koon.",sv:"Du försökte lägga till filer som skulle överskrida den maximala kombinerade storleken.",en:"You tried to add files that would exceed the maximum combined size."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}},{type:"duet-upload-302",system_message:"Files to upload exceeds limits",message:{fi:"Et voi lähettää enempää kuin enimmäismäärän liitteitä.",sv:"Du kan inte ladda upp fler än det maximala antalet bilagor.",en:"You can't upload more than maximum number of attachments."}}];var headerAriaLabel={fi:"Liiteluettelo",sv:"Lista över bilagor",en:"Attachments list"};var UploadItemHeader=function(e){var t=e.label,n=e.categoryLabel;return h("div",{class:"items-header",tabindex:"-1","aria-label":getLocaleString(headerAriaLabel)},n&&h("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},getLocaleString(n)),h("duet-heading",{class:{"filename-header":true,"no-category":!n},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},getLocaleString(t)))};var validateFileExtension=function(e,t){if(!t){return true}var n=e.split(".");var a=t.split(",");var i=n[n.length-1];return a.includes(i)};var validateFileMime=function(e,t){if(!t||!e){return true}var n=t.split(",");var a=false;n.forEach((function(t){var n=t.split("/");var i=e.split("/");if(n[0]===i[0]&&(n[1]===i[1]||n[1]==="*")){a=true}}));return a};var validateFileSize=function(e,t){if(!t||!e){return true}return t>=e};var validateFile=function(e,t,n){var a=t.allowedMimetypes,i=t.allowedExtensions,r=t.maxBytes;var o=false;var s=getError("default",n);if(e){var d=e.name,l=e.type,u=e.size;var h=validateFileMime(l,a);var c=i==="all"||i===""||i===" "||i===undefined?true:validateFileExtension(d.toLowerCase(),i);var f=validateFileSize(u,r);if(!h){s=getError("duet-upload-101",n)}if(!c){s=getError("duet-upload-100",n)}if(!f){s=getError("duet-upload-201",n)}o=h&&c&&f}else{o=false}return{valid:o,errorMessage:o?undefined:getLocaleString(s.message),errorSystem:o?undefined:s.system_message,errorType:o?undefined:s.type}};var validateTotalSizeIsAboveMax=function(e,t){var n=0;if(t){e.forEach((function(e){if(e.valid&&e.size){n+=e.size}}));if(n>=t){return true}}return false};var validateTotalAmountIsAboveMax=function(e,t){var n=0;if(t){e.forEach((function(e){if(e.valid){n++}}));if(n>=t){return true}}return false};var filesToUploadCountAboveMax=function(e,t,n){if(e+t>n){return true}return false};var filesToUploadTotalSizeIsAboveMax=function(e,t,n){var a=0;if(n){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));t.forEach((function(e){if(e.size){a+=e.size}}));if(a>=n){return true}}return false};var makeXhrRequest=function(e){var t=e.payload,n=e.options,a=e.onFailure,i=e.onSuccess,r=e.onProgress;var o=n.type,s=o===void 0?"POST":o,d=n.xhr,l=n.uri,u=n.argument,h=u===void 0?null:u,c=n.headers,f=c===void 0?null:c;d.open(s,"".concat(l).concat(h||""),true);var p=t.data,b=t.name;if(f){Object.keys(f).forEach((function(e){d.setRequestHeader(e,f[e])}))}if(s==="POST"){d.onreadystatechange=function(){if(d.readyState===XMLHttpRequest.DONE&&d.status>=200&&d.status<300){i(d,b,d.status)}if(d.readyState===XMLHttpRequest.DONE&&d.status>=300&&d.status<999){a(d,b,d.status)}};r(b)}d.send(p);return d};var duetUploadCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}::slotted([slot=uploadfooter]){margin-top:20px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:rgb(245, 248, 250)}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}duet-paragraph::part(duet-paragraph){word-break:break-word}duet-editable-table tfoot{display:none}.upload-bottom-caption{margin-top:12px;margin-bottom:16px;line-height:1.4rem}.items-header{display:none;flex-direction:row;margin-bottom:0}@media (min-width: 36em){.items-header{display:flex}}.items-header:not(:last-child),.items-header:not(:first-child){margin-top:12px}.items-header .category-header{width:35%}.items-header .filename-header{width:65%}.items-header .filename-header.no-category{width:100%}.upload-item-row{display:flex;flex-direction:column;gap:16px;align-content:center;align-items:center;padding:16px 0 16px 0;border-bottom:1px solid rgb(212, 223, 229)}@media (min-width: 36em){.upload-item-row{flex-direction:row;gap:10px}}.upload-item-row .item-categories{width:100%}@media (min-width: 36em){.upload-item-row .item-categories{width:35%}}.upload-item-row .item-name{position:relative;bottom:2px;width:100%;text-align:left}@media (min-width: 36em){.upload-item-row .item-name{width:50%}.upload-item-row .item-name.no-category{width:85%}}.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:block}@media (min-width: 36em){.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:none}}.upload-item-row .item-actions{width:100%;margin-left:-8px;text-align:left}@media (min-width: 36em){.upload-item-row .item-actions{width:15%;padding-top:0;margin-left:auto;text-align:right}}.upload-item-row .duet-upload-item-name duet-icon{position:relative;top:4px}.upload-item-row .duet-upload-item-name duet-progress{display:block;margin-top:16px}";var DuetUploadStyle0=duetUploadCss;var DuetUpload=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",3);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.duetReady=createEvent(this,"duetReady",7);this.duetDone=createEvent(this,"duetDone",3);this.duetState=createEvent(this,"duetState",3);this.duetDelete=createEvent(this,"duetDelete",3);this.duetCancel=createEvent(this,"duetCancel",3);this.duetProgress=createEvent(this,"duetProgress",3);this.duetUpload=createEvent(this,"duetUpload",3);this.linkClick=createEvent(this,"linkClick",3);this.buttonId=createID("DuetButton");this.labelId=createID("DuetLabel");this.uploadId=createID("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.filesToUploadExceedsLimit=false;this.filesToUploadTotalSizeIsAboveMax=false;this.internalStatusMessageLabel=undefined;this.itemRefs=new Map;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=debounce((function(){t.tick=Date.now()}),30);this.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"};this.listenForActionEvents=function(){t.element.addEventListener("duetActionEvent",(function(e){var n=e.detail;var a=n.action,i=n.id,r=n.originalEvent;switch(a){case"delete":t.onDelete(i,r);break;case"cancel":t.onCancel(i,r);break}}))};this.verifyValidity=function(){var e=t.getFilesAsArray(),n=e.invalid,a=e.valid;var i=t.valid;t.valid=n.length===0&&a.length!==0;if(t.valid!==i){t.duetState.emit({originalEvent:undefined,data:{valid:t.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){return t.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return t.DefaultGroups.inprogress}else if(!e.valid){return t.DefaultGroups.failure}else if(e.pending){return t.DefaultGroups.pending}else if(e.group){return e.group}else{return"none"}};this.mapFilesToUploadItems=function(e,n,a,i){if(n===t.DefaultGroups.success){return h("duet-upload-item",{theme:t.theme,actions:t.getActions(n,i),type:"success",data:e,showLinks:t.showLinks,linkClickEvent:t.emitEvent?t.linkClick:undefined,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:t.processedButtonTitles,ref:function(n){t.itemRefs.set(e.uid,n)}})}else if(n===t.DefaultGroups.inprogress){return h("duet-upload-item",{theme:t.theme,actions:t.getActions(n,i),type:"inprogress",data:e,showLinks:t.showLinks,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:t.processedButtonTitles,ref:function(n){t.itemRefs.set(e.uid,n)}})}else if(n===t.DefaultGroups.pending){return h("duet-upload-item",{theme:t.theme,actions:t.getActions(n,i),type:"pending",data:e,showLinks:t.showLinks,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:t.processedButtonTitles,ref:function(n){t.itemRefs.set(e.uid,n)}})}else if(n===t.DefaultGroups.failure){return h("duet-upload-item",{theme:t.theme,actions:t.getActions(n,i),type:"failure",data:e,showLinks:t.showLinks,errorCodes:t.errorCodes,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:t.processedButtonTitles,ref:function(n){t.itemRefs.set(e.uid,n)}})}else if(e.group){return e.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,n,a,i){if(i===void 0){i=true}try{var r=t.files.get(e);r[n]=a;t.files.set(e,r);if(t.external&&n!=="url"){t.trackProgress(e,n==="uploaded")}}catch(e){}if(i){t.kick()}};this.updateProgress=function(e,n){var a=function(a){t.updateValueInMap(n,"progress",a);t.onProgress(n,a,e)};if(e.lengthComputable){var i=e.loaded/e.total*100;a(i)}else{console.log("cant read progress")}};this.trackProgress=function(e,n){if(n===void 0){n=false}if(n){t.filesInProgress.delete(e)}else{t.filesInProgress.set(e,"inprogress")}if(t.filesInProgress.size===0){t.onDone()}};this.getFilesAsArray=function(){var e=[];var n=[];t.files.forEach((function(t){if(t.valid&&!t.deleted){e.push(t)}else if(!t.valid&&!t.deleted){n.push(t)}}));return{valid:e,invalid:n}};this.resetFormFields=function(){t.nativeInput.value=""};this.startUpload=function(e){var n=[];for(var a=1;a<arguments.length;a++){n[a-1]=arguments[a]}return __awaiter(t,__spreadArray([e],n,true),void 0,(function(e,t){var n,a,i;if(t===void 0){t=undefined}return __generator(this,(function(r){n=this.validateTotals(),a=n.bytesMaxReached,i=n.fileMaxReached;if(a||i){this.kick();return[2]}this.metaData=t;this.nativeInput.click();this.onUpload(e,t);e.stopPropagation();e.preventDefault();return[2]}))}))};this.transferComplete=function(e){t.updateValueInMap(e,"progress",100,false);t.trackProgress(e,true)};this.transferDone=function(e,n,a){t.updateValueInMap(n,"status",a,false);t.updateValueInMap(n,"uploaded",true,false);try{var i=JSON.parse(e.response);t.updateValueInMap(n,"url",i.url)}catch(e){t.updateValueInMap(n,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,n,a){try{var i=JSON.parse(e.response).error;t.updateValueInMap(n,"error",{message:i.message,type:i.type},false)}catch(e){console.error("Server did not respond with expected response error:{message: string, type: int}");t.updateValueInMap(n,"error",{type:a},false)}t.updateValueInMap(n,"valid",false,true)};this.transferFailed=function(e){t.updateValueInMap(e,"error",getI18nError("duet-upload-001",t.errorCodes))};this.transferCanceled=function(e){t.files.delete(e);t.validateTotals(e);t.kick()};this.validateTotals=function(e){var n=validateTotalSizeIsAboveMax(t.files,t.maxBytesTotal);var a=validateTotalAmountIsAboveMax(t.files,t.maxFiles);if(n&&e){t.updateValueInMap(e,"error",getI18nError("duet-upload-202",t.errorCodes),false)}if(a&&e){t.updateValueInMap(e,"error",getI18nError("duet-upload-301",t.errorCodes),false)}t.bytesMaxReached=n;t.fileMaxReached=a;return{bytesMaxReached:n,fileMaxReached:a}};this.uploadFile=function(e){var n=[];for(var a=1;a<arguments.length;a++){n[a-1]=arguments[a]}return __awaiter(t,__spreadArray([e],n,true),void 0,(function(e,t,n){var a,i,r;if(t===void 0){t=false}return __generator(this,(function(o){switch(o.label){case 0:if(!t&&this.deferUpload){this.updateValueInMap(e.item.name,"pending",true,false);this.updateValueInMap(e.item.name,"group","pending",true)}else if(t){this.updateValueInMap(e.item.name,"pending",false,false);this.updateValueInMap(e.item.name,"group",undefined,true)}o.label=1;case 1:o.trys.push([1,4,,5]);if(!(!this.deferUpload||t))return[3,3];a=new FormData;a.append("file",e.item);if(n){a.append("key",n)}a.append("uid",e.uid);a.append("name",e.item.name);a.append("metadata",JSON.stringify({uid:e.uid,url:this.uri,size:e.item.size,meta:e.meta}));i=e;return[4,this.makeXHRPostRequest(a)];case 2:i.xhr=o.sent();o.label=3;case 3:return[3,5];case 4:r=o.sent();this.updateValueInMap(e.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var e=0,n=Array.from(t.files.entries());e<n.length;e++){var a=n[e],i=a[0],r=a[1];if(r.group==="pending"&&r.pending===true){t.uploadFile(r,true,i)}}};this.getItemFromUID=function(e){for(var n=0,a=Array.from(t.files.entries());n<a.length;n++){var i=a[n],r=i[0],o=i[1];if(o.uid===e){return{value:o,key:r}}}return null};this.handleExternalUploadButton=function(e,n){if(t.externalUploadButton){if(e||n){t.externalUploadButton.disabled=true}else{t.externalUploadButton.disabled=false}}};this.onDelete=function(e,n){var a=t.getItemFromUID(e);var i=a.key;var r=t.files.get(i);t.files.delete(i);var o=t.validateTotals(),s=o.bytesMaxReached,d=o.fileMaxReached;t.handleExternalUploadButton(s,d);t.kick();t.duetDelete.emit({originalEvent:n,data:{deletion:r},component:"duet-upload"});if(!t.external&&!r.pending){t.makeXHRDeleteRequest(r)}t.resetFormFields()};this.onCancel=function(e,n){var a=t.getItemFromUID(e).key;var i=t.files.get(a);t.files.delete(a);var r=t.validateTotals(),o=r.bytesMaxReached,s=r.fileMaxReached;t.handleExternalUploadButton(o,s);if(!t.external){var d=i.xhr;if(d){d.abort()}}t.kick();t.resetFormFields();t.duetCancel.emit({originalEvent:n,data:{cancelled:i},component:"duet-upload"})};this.onUpload=function(e,n){t.duetUpload.emit({originalEvent:e,metaData:n,component:"duet-upload"})};this.onBlur=function(e){t.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,n,a){t.duetChange.emit({originalEvent:a,data:{key:e,percentComplete:n},component:"duet-upload"})};this.onFocus=function(e){t.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onReady=function(){t.duetReady.emit({component:"duet-upload"})};this.onDone=function(){t.duetDone.emit({component:"duet-upload",data:{files:t.files}})};this.filterMap=function(){var e=Array.from(t.files.values());var n=[];var a=[];var i=[];var r=[];var o=false;e.forEach((function(e){var s=t.getGroupFromItemData(e);if(e.meta&&!!e.meta.badges){o=true}if(s===t.DefaultGroups.success){r.push({uid:e.uid,data:e})}else if(s===t.DefaultGroups.inprogress){n.push({uid:e.uid,data:e})}else if(s===t.DefaultGroups.pending){i.push({uid:e.uid,data:e})}else if(s===t.DefaultGroups.failure){a.push({uid:e.uid,data:e})}else if(e.group){n.push({uid:e.uid,data:e})}}));return{pending:i,failure:a,success:r,inprogress:n,hasCategory:o}};this.getActions=function(e,t){return t.filter((function(t){return t.map.includes(e)}))};this.renderUploadedItems=function(){t.itemRefs.clear();var e=t.filterMap();var n=e.hasCategory;var a=t.hideCancelButton?t.actions.filter((function(e){return e.name!=="cancel"})):t.actions;var i=t.groups.map((function(i){var r=e[i.id];if(!(r===null||r===void 0?void 0:r.length)){return}return h(Fragment,null,!t.hideGroups&&h(UploadItemHeader,{categoryLabel:n?t.categoryLabel:undefined,label:i.label}),r.map((function(e){return t.mapFilesToUploadItems(e.data,i.id,n,a)})))}));return h(Fragment,null,t.showUploadedItemsHeader&&h(UploadItemHeader,{categoryLabel:n?t.categoryLabel:undefined,label:t.uploadedItemsHeaderLabel}),i)};this.tick=Date.now();this.accessibleActiveDescendant=undefined;this.accessibleDescribedBy=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.external=false;this.middleware=null;this.deferUpload=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Delete the file",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",size:"x-small",background:"gray-lightest",name:"cancel",map:["inprogress","pending"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}];this.uri=undefined;this.showLinks=false;this.caption=undefined;this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",inProgressWithErrors:"Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",done:"Lähetys valmis, {filesTotal} lisätty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",files:"tiedostoa",file:"tiedosto"},sv:{inProgress:"Laddar upp {filesUploaded} av {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Uppladdningen slutförd, {filesTotal} har lagts till",doneWithErrors:"Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Uploading {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"Upload completed, {filesTotal} added successfully",doneWithErrors:"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",files:"files",file:"file"}};this.statusMessageLabel=getLocaleString(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=getLocaleString(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.identifier=undefined;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=getLocaleString(this.labelDefaults);this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."};this.description=getLocaleString(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=getLocaleString(this.fileListEmptyDefaults);this.error="";this.errorCodes=errorCodes;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="";this.multiple=true;this.limitSelection=false;this.hideCancelButton=false;this.value=undefined;this.externalUploadButtonId=undefined;this.captionOnBottom=false;this.showUploadedItemsHeader=false;this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"};this.headerHeadingLevel="h3";this.hideHeader=false;this.emitEvent=false;this.actionButtonTitles={cancel:false,delete:false};this.renameDuplicates=false;this.groups=[{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}},{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}}]}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=sanitizeString(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}inheritGlobalTheme(this);this.listenForActionEvents();this.onReady();this.externalUploadButton=document.querySelector("#".concat(this.externalUploadButtonId));this.processedButtonTitles=parsePossibleJSON(this.actionButtonTitles)};e.prototype.componentWillRender=function(){this.verifyValidity()};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus(e)}return[2]}))}))};e.prototype.upload=function(){return __awaiter(this,arguments,void 0,(function(e){var t,n,a;if(e===void 0){e=undefined}return __generator(this,(function(i){t=this.validateTotals(),n=t.bytesMaxReached,a=t.fileMaxReached;if(n||a){this.handleExternalUploadButton(n,a);this.kick();return[2]}this.metaData=e;this.nativeInput.click();return[2]}))}))};e.prototype.uploadPending=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.uploadPendingFiles();return[2]}))}))};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.kick();return[4,this.setFocus()];case 1:e.sent();return[2]}}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};e.prototype.updateValue=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){this.updateValueInMap(e,t,n);return[2]}))}))};e.prototype.focusActionButton=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,(t=this.itemRefs.get(e))===null||t===void 0?void 0:t.focusActionButton()];case 1:n.sent();return[2]}}))}))};e.prototype.render=function(){var e=this;var t=this.identifier||this.uploadId;var n=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var a=Math.round(this.maxBytes/1024/1024);var i=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());i=i.replace(/{maxbytes}/g,"".concat(a.toString()," MB"));i=i.replace(/{maxbytestotal}/g,"".concat(n.toString()," MB"));i=i.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));if(this.externalUploadButton){this.externalUploadButton.accessibleLabel="".concat(this.externalUploadButton.innerText,". ").concat(i)}return h(Host,{key:"dd2d8df45d7b1e8526fc08809e07f4cb33685750",class:{"duet-m-0":this.margin==="none"}},h("duet-fieldset",{key:"5763ea920a4090ca67c77c4408df558a1381a4ea","label-heading-level":this.headerHeadingLevel,"label-hidden":this.hideHeader,label:this.label},h("slot",{key:"c156b40628ec1b5d9270df434022ed16e8946eae",name:"header"}),!this.files.size&&h("duet-empty-state",{key:"ad1d9f14e0c17f73b93aa3989fbd6105e5668a11",id:this.labelId,part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",icon:"messaging-attachment"},h("duet-paragraph",{key:"aa1475ad4c73fd61976e8ba408d76f1b55b850cb",margin:"none"},this.fileListEmpty)),!!this.files.size&&h("slot",{key:"a4dd57cd140b091b2bd5622b5fc5c55dc567e144",name:"fileheader"}),!!this.files.size&&h("duet-upload-aria-status",{key:"8f5beb8ce03d9b4f1b7df6d01ba707485daecf5a",invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderUploadedItems(),!!this.files.size&&h("slot",{key:"0432c1b02bcc36c239b05c5b4aa260ce4392c5cd",name:"filefooter"}),h("slot",{key:"dd19564b15aad3cc65396121f3862ee1275e3da6",name:"uploadfooter"}),this.captionOnBottom&&h("duet-caption",{key:"388956db21f30c93c685fac7b11604932baf6ab1",margin:"none",size:"small"},h("div",{key:"24766af55c816957c30880f6ccf31c2c8d24cebe",class:"upload-bottom-caption"},i)),h("slot",{key:"bb6a994d5c65c0d3514a304eb2547a2f81d3feb3",name:"afterfooter"}),!this.hideButton&&h(Fragment,{key:"0028099baf1d0d8224d5549a16c663005fb78875"},h("duet-spacer",{key:"295a793dcf0cff48d7b3b211984a44a68aff5a1c",size:"large"}),h("duet-button",{key:"7375e766eac86aee16440e44c9645173ad2a8d1e",id:this.buttonId,onClick:this.startUpload,"accessible-controls":t,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel||"".concat(this.buttonLabel,". ").concat(i),"accessible-owns":t,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?"".concat(this.identifier,"-button-upload"):"duet-upload-button-upload"},this.buttonLabel)),(this.fileMaxReached||this.bytesMaxReached||this.filesToUploadExceedsLimit||this.filesToUploadTotalSizeIsAboveMax)&&h(Fragment,{key:"30cbbe58d5267a103f6aecf7dad5481c878d7662"},h("duet-spacer",{key:"a18c694807a23f24ffaa895874546efb8864602d",size:"medium"}),h("duet-alert",{key:"db0280069c76343b698ee84899d829c257558f7a",part:this.identifier?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&getI18nError("duet-upload-301",this.errorCodes),this.bytesMaxReached&&getI18nError("duet-upload-202",this.errorCodes),this.filesToUploadExceedsLimit&&getI18nError("duet-upload-302",this.errorCodes),this.filesToUploadTotalSizeIsAboveMax&&getI18nError("duet-upload-203",this.errorCodes))),h("duet-visually-hidden",{key:"5f2458287c90d4c906fe6366bf9fa42a844cf8f9","aria-hidden":"true"},h("input",{key:"6d5180b885ae0c13c8c06118084bb49d0df0c989",ref:function(t){e.nativeInput=t},accept:!this.limitSelection?undefined:"".concat(this.allowedMimetypes,",").concat(this.allowedExtensions),onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(t){return e.onChange(t)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))};e.prototype.makeXHRPostRequest=function(e){var t=this;var n=new XMLHttpRequest;var a=e.get("name");n.upload.addEventListener("progress",(function(e){t.updateProgress(e,a)}));n.upload.addEventListener("load",(function(){t.transferComplete(a)}));n.upload.addEventListener("error",(function(){t.transferFailed(a)}));n.upload.addEventListener("abort",(function(){t.transferCanceled(a)}));var i={payload:{data:e,name:a},options:{type:"POST",uri:this.uri,xhr:n,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){i=this.middleware(i)}return makeXhrRequest(i)};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,n=e.item;var a=new XMLHttpRequest;var i={"x-fileuid":t,"x-filename":n.name};var r={payload:{data:null,name:name},options:{type:"DELETE",xhr:a,uri:this.uri,argument:"?key=".concat(t,"&name=").concat(n.name),headers:i},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return makeXhrRequest(r)};e.prototype.escapeSpecialCharacters=function(e){return(e+"").replace(/[\\"'(){}\[\]*?$^+]/g,"\\$&").replace(/\u0000/g,"\\0")};e.prototype.getRenamedFileName=function(e,t){var n=new RegExp("".concat(this.escapeSpecialCharacters(e)," \\(\\d+\\).").concat(t));var a=Array.from(this.files.entries()).map((function(e){var t=e[0],n=e[1];return t})).filter((function(a){return n.test(a)||a==="".concat(e,".").concat(t)})).sort((function(e,t){return e.split(".").slice(0,-1).join(".")>t.split(".").slice(0,-1).join(".")?1:-1})).pop().split(".").slice(0,-1).join(".");if(a===e){return"".concat(e," (1).").concat(t)}var i=parseInt(a.split("(").pop().slice(0,-1));return"".concat(e," (").concat(i+1,").").concat(t)};e.prototype.renameFiles=function(e){var t=this;return e.map((function(e){if(t.files.get(e.name)){var n=e.name.split(".");var a=n.pop();var i=n.join(".");var r=t.getRenamedFileName(i,a);return new File([e],r,{type:e.type,lastModified:e.lastModified})}else{return e}}))};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,a,i,r,o,s,d,l,u,h,c;return __generator(this,(function(f){switch(f.label){case 0:n=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);this.filesToUploadExceedsLimit=false;if(filesToUploadCountAboveMax(this.files.size,n.length,this.maxFiles)){this.filesToUploadExceedsLimit=true;this.kick();return[2]}this.filesToUploadTotalSizeIsAboveMax=false;if(filesToUploadTotalSizeIsAboveMax(this.files,n,this.maxBytesTotal)){this.filesToUploadTotalSizeIsAboveMax=true;this.kick();return[2]}if(!n)return[3,6];if(this.renameDuplicates){n=this.renameFiles(n)}a=0,i=n;f.label=1;case 1:if(!(a<i.length))return[3,6];r=i[a];o=validateFile(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),s=o.valid,d=o.errorMessage,l=o.errorType,u=o.errorSystem;h=this.genHashName();c={uid:h,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:s,error:{type:s?undefined:l,message:s?undefined:d,system_message:s?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,c);if(!(s&&!this.external))return[3,3];return[4,this.uploadFile(c)];case 2:f.sent();return[3,4];case 3:if(s&&this.external){this.updateValueInMap(c.item.name,"pending",true,false);this.updateValueInMap(c.item.name,"group","pending",true)}else if(!s){this.updateValueInMap(r.name,"valid",false,true)}f.label=4;case 4:this.kick();f.label=5;case 5:a++;return[3,1];case 6:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:e,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}();DuetUpload.style=DuetUploadStyle0;export{DuetEditableTable as duet_editable_table,DuetTable as duet_table,DuetUpload as duet_upload};
|
|
4
|
+
*/import{h,r as registerInstance,c as createEvent,H as Host,g as getElement,F as Fragment}from"./index-fa810c91.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{f as fieldSorter,d as debounce}from"./js-utils-9b9e0039.js";import{i as isKeyboardClick}from"./keyboard-utils-daf80d44.js";import{a as getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver,g as getLocaleString,s as sanitizeString}from"./language-utils-35eb1c9f.js";import{p as spaceLarge,q as fontFamilyText,r as fontSizeMedium,u as fontFamilyTextTurva,v as colorSecondary,w as colorSecondaryTurva,x as fontWeightSemiBold,y as lineHeightSmall,z as colorGrayDarker,A as colorGrayDarkTurva,B as spaceMedium,C as spaceXxSmall,n as colorGrayLightest,a as mediaQueryXSmall,D as spaceSmall,E as colorGrayLight,F as colorGrayLightTurva,G as colorGrayDarkerTurva,k as colorPrimary,H as sizeNavigation,s as sizeHeader}from"./tokens.module-2d02f5ff.js";import{b as breakpointTokensUpTo,a as breakpointToToken}from"./token-utils-b9ba8c5e.js";import{c as createID}from"./create-id-149a1b6d.js";import{p as parsePossibleJSON}from"./string-utils-192eb3c8.js";import{g as getError,a as getI18nError}from"./errorcodes.utils-d594aed8.js";var TableData=function(e,t){var n=e.data,a=e.groupId,i=e.alignment;var r="duet-editable-table duet-editable-table-content-".concat(a);if(typeof n==="string"){return h("td",{innerHTML:n,class:r,part:"".concat(a,"content"),style:{verticalAlign:i}})}else{return h("td",{class:r,part:"".concat(a,"content"),style:{verticalAlign:i}},n)}};var duetEditableTableCss=":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu,td.duet-editable-table-actions-menu{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon .duet-icon{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row .duet-text-right{text-align:right}.duet-editable-table-header tr .duet-editable-table-header-hidden{padding:0 !important;font-size:0;border-bottom:0}";var DuetEditableTableStyle0=duetEditableTableCss;var DuetEditableTable=function(){function e(e){var t=this;registerInstance(this,e);this.duetTableToggle=createEvent(this,"duetTableToggle",7);this.duetMenuClick=createEvent(this,"duetMenuClick",7);this.hasHeadSlotFirst=false;this.hasHeadSlotLast=false;this.hasFootSlot=false;this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"};this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"};this.toggleColumn=function(e,n){n.preventDefault();var a=e.sort_order,i=e.direction,r=e.index,o=e.key;t.duetTableToggle.emit({sort_order:a,index:r,direction:i,key:o,component:"duet-editable-table",originalEvent:n})};this.handleKeyDown=function(e,n){if(isKeyboardClick(n)){t.toggleColumn(e,n)}};this.language=getLanguage();this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.actions=undefined;this.columns=undefined;this.rows=undefined;this.sortable=false;this.groupId="";this.theme="";this.accessibleRole=undefined;this.hideHeadVisually=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']");this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']");this.hasFootSlot=!!this.element.querySelector("[slot='tfoot']")};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};e.prototype.createLabel=function(e){var t=this;var n=e.sort_order,a=e.direction,i=e.index,r=e.label;var o=getLocaleString(r);if(!this.sortable){return o}var s=function(){if(!!n&&a===1){return"action-arrow-down-small"}else if(!!n&&a===-1){return"action-arrow-up-small"}return"action-subtract-small"};return h("span",{class:"duet-table-label","data-index":i},h("duet-button",{size:"small",icon:s(),"icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":true,onClick:function(n){return t.toggleColumn(e,n)},onKeyDown:function(n){return t.handleKeyDown(e,n)}},o))};e.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(fieldSorter(["index"]))};e.prototype.getRowSortOrder=function(){var e=__spreadArray([],this.columns,true).sort(fieldSorter(["sort_order"]));return e.filter((function(e){return e.sort_order})).map((function(e){return e.direction===-1?"-".concat(e.key):e.key}))};e.prototype.renderTableHeader=function(){var e=this;if(!this.columns){return}var t=this.getSortedColumns();return h("tr",{class:{"duet-table-action-header":!!this.actions}},t.map((function(t){if(t.display!==false){var n=e.createLabel(t);return n!==""?h("th",{scope:"col"},n):h("td",null)}})),this.actions&&h("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&h("duet-visually-hidden",null,this.actionColumnLabel[this.language])))};e.prototype.renderActions=function(e,t){var n=this;if(!this.actions){return}return h("td",{class:"duet-text-right"},this.actions.map((function(a){return h("duet-action-button",{actionMeta:Object.assign({},(e===null||e===void 0?void 0:e.meta)||{},{index:t}),actionId:(e===null||e===void 0?void 0:e.uid)||(e===null||e===void 0?void 0:e.id)||null,actionName:a.name,theme:n.theme,iconName:a.icon,iconColor:a.color,iconSize:a.size,background:a.background,"accessible-label":"".concat(e.actionDescription||""," ").concat(getLocaleString(a.label)," ")})})))};e.prototype.renderTableBody=function(){var e=this;var t=this.getSortedColumns();var n=this.getRowSortOrder();var a=__spreadArray([],this.rows,true).sort(fieldSorter(n));return a.map((function(n,a){var i;return h("tr",{class:(i={"duet-table-action-row":!!e.actions,"duet-editable-table-row":true},i["duet-editable-table-row-".concat(e.groupId)]=true,i),"data-meta":JSON.stringify(n.meta)},t.map((function(t){var a=n[t.key]?n[t.key]:n.item;if(t.display!==false){return h(TableData,{data:a,groupId:e.groupId})}})),e.actions&&e.renderActions(n,a))}))};e.prototype.render=function(){var e;return h(Host,{key:"170a18bded5a1eefa62aabdfe9cbec40ebb9ad51",class:(e={},e["duet-editable-table-".concat(this.variation)]=true,e["duet-editable-table"]=true,e["duet-editable-table-".concat(this.theme)]=true,e["duet-editable-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-editable-table-sortable"]=this.sortable,e["duet-editable-table-actions"]=!!this.actions,e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},h("duet-table",{key:"2282f3b54102b8fd06bbfb8c1158e54f400a21cc",class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint,"hide-head-visually":this.hideHeadVisually},h("table",{key:"dda2ea49bff29277445de50a779df0434e35d620",role:this.accessibleRole},h("caption",{key:"bb4633c4947dbfe2c9b8148688d1f03c67d94188"},h("slot",{key:"471406fee4b4173e29abf754212355814f591266",name:"tcaption"})),h("thead",{key:"f907958d599c07d6f220bc3159e8efa0ba85feb5"},this.hasHeadSlotFirst&&h("tr",{key:"32803f29a816f2abe67aa8b2dbfd99fdff7c9e5b"},h("td",{key:"634ee6e9a8b53e9610a7cbd0e5a536bcaf654207",class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{key:"444de221a86d743d36598d71fc3256c0aa16d034",name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&h("tr",{key:"a2c9f9914ab42a5421daac067472db45f6d680a7"},h("td",{key:"0edd405623af60d014f509636fad5cf2f53f86a5",class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{key:"84f0e807a4ddf22910655aad0de2dcd7fd93973c",name:"thead-last"})))),h("tbody",{key:"7b4413d38b050b69a0a71bcca7a8200d1f480d43"},this.renderTableBody()),this.hasFootSlot&&h("tfoot",{key:"a7096789b2fc5615b7a9622df8de361ea486bb69"},h("tr",{key:"52afc13a557588195883a16b10b308b6c1062232"},h("td",{key:"a231e63b19ed8c96aec86973242e07c07506547d",class:"duet-editable-table-footer-menu",colSpan:99},h("slot",{key:"152c200e205eb63fff18df14c4ded8ea67a340d5",name:"tfoot"})))))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetEditableTable.style=DuetEditableTableStyle0;var styles="\nduet-table {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n -moz-appearance: none;\n -webkit-appearance: none;\n appearance: none;\n margin-bottom: ".concat(spaceLarge," !important;\n display: block;\n font-variant-numeric: tabular-nums;\n\n table,\n thead,\n tbody,\n tfoot,\n th,\n td,\n tr {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n -moz-appearance: none;\n -webkit-appearance: none;\n appearance: none;\n }\n\n &.duet-m-0 {\n margin: 0 !important;\n }\n\n table {\n width: 100%;\n font-family: ").concat(fontFamilyText,";\n font-size: ").concat(fontSizeMedium,";\n text-align: left;\n border-spacing: 0;\n border-collapse: separate;\n }\n\n &.duet-table-hide-head-visually.duet-table-hide-head-visually {\n thead,\n thead * {\n position: absolute !important;\n top: 0;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n overflow: hidden !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n border: 0 !important;\n }\n }\n\n &.duet-theme-turva table {\n font-family: ").concat(fontFamilyTextTurva,";\n }\n\n td {\n -webkit-hyphens: auto;\n hyphens: auto;\n color: ").concat(colorSecondary,";\n }\n\n &.duet-theme-turva td {\n color: ").concat(colorSecondaryTurva,";\n }\n\n th {\n font-weight: ").concat(fontWeightSemiBold,";\n line-height: ").concat(lineHeightSmall,";\n color: ").concat(colorGrayDarker,";\n text-align: left;\n }\n\n &.duet-theme-turva th {\n color: ").concat(colorGrayDarkTurva,";\n }\n\n tbody th {\n font-weight: ").concat(fontWeightSemiBold,";\n color: ").concat(colorSecondary,";\n }\n\n &.duet-theme-turva tbody th {\n color: ").concat(colorSecondaryTurva,";\n }\n\n & .duet-table-action-row {\n & td:last-child {\n justify-self: end;\n padding-right: ").concat(spaceLarge," !important;\n white-space: nowrap;\n }\n }\n\n span.duet-table-cell-heading {\n display: none;\n }\n}\n\n.duet-table-flattened {\n table,\n thead,\n tbody,\n tfoot,\n th,\n td,\n tr {\n display: block;\n }\n\n thead tr {\n position: absolute !important;\n top: 0;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n overflow: hidden !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n border: 0 !important;\n }\n\n td {\n line-height: ").concat(lineHeightSmall,";\n\n &:not(:last-child) {\n margin-bottom: ").concat(spaceMedium,";\n }\n\n span.duet-table-cell-heading {\n margin-bottom: ").concat(spaceXxSmall,";\n display: block;\n font-size: ").concat(fontSizeMedium,";\n font-weight: ").concat(fontWeightSemiBold,";\n color: ").concat(colorSecondary,";\n }\n }\n\n &.duet-theme-turva td span.duet-table-cell-heading {\n color: ").concat(colorSecondaryTurva,";\n }\n\n tbody td,\n tbody th,\n tfoot td {\n padding: 0 !important;\n text-align: left !important;\n }\n\n tbody th {\n font-weight: ").concat(fontWeightSemiBold,";\n line-height: ").concat(lineHeightSmall,";\n color: ").concat(colorGrayDarker,";\n text-align: left;\n }\n}\n\n.duet-table-sticky thead th {\n position: sticky;\n top: 0;\n background: ").concat(colorGrayLightest,";\n}\n\n.duet-table-striped {\n td,\n th {\n padding: ").concat(spaceLarge," !important;\n @media ").concat(mediaQueryXSmall.replace("'","").replace("'","")," {\n padding: ").concat(spaceLarge," ").concat(spaceSmall," !important;\n }\n }\n\n tbody th {\n background: ").concat(colorGrayLightest,";\n }\n\n &.duet-table-sticky {\n thead th {\n border-bottom: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva thead th {\n border-bottom-color: ").concat(colorGrayLightTurva,";\n }\n }\n\n tbody:not(:first-of-type) th {\n padding-top: calc(").concat(spaceLarge," * 2) !important;\n }\n\n tbody:only-of-type tr:nth-of-type(odd) {\n background: rgba(4, 81, 128, 0.04);\n }\n\n &.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd) {\n background: rgba(").concat(colorSecondaryTurva,", 0.04);\n }\n\n tbody:not(:only-of-type) tr:nth-of-type(even) {\n background: rgba(4, 81, 128, 0.04);\n }\n\n &.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even) {\n background: rgba(").concat(colorSecondaryTurva,", 0.04);\n }\n\n tfoot td {\n border-top: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tfoot td {\n border-top-color: ").concat(colorGrayLightTurva,";\n }\n\n &.duet-table-flattened {\n tbody:not(:first-of-type) th {\n padding-top: ").concat(spaceLarge," !important;\n }\n\n tr {\n padding: ").concat(spaceLarge," !important;\n }\n\n tfoot {\n td {\n border-top: 0;\n }\n\n tr {\n border-top: 1px solid ").concat(colorGrayLight,";\n }\n }\n\n &.duet-theme-turva tfoot tr {\n border-top-color: ").concat(colorGrayLightTurva,";\n }\n }\n}\n\n.duet-table-plain, .duet-table-fixed, .duet-table-minimal {\n th {\n padding: ").concat(spaceMedium," !important;\n border-bottom: 1px solid ").concat(colorGrayDarker,";\n\n &:first-child {\n padding-left: 0 !important;\n }\n\n &:last-child {\n padding-right: 0 !important;\n }\n }\n\n &.duet-theme-turva th {\n border-bottom-color: ").concat(colorGrayDarkerTurva,";\n }\n\n tbody th {\n padding-top: calc(").concat(spaceLarge," * 2) !important;\n border-bottom-color: ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tbody th {\n border-bottom-color: ").concat(colorGrayLightTurva,";\n }\n\n td {\n padding: ").concat(spaceMedium," !important;\n\n &:first-child {\n padding-left: 0 !important;\n }\n\n &:last-child {\n padding-right: 0 !important;\n }\n }\n\n tbody td {\n border-bottom: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tbody td {\n border-bottom-color: ").concat(colorGrayLightTurva,";\n }\n\n &.duet-table-flattened {\n tbody:first-of-type th {\n padding-top: 0 !important;\n }\n\n td,\n tbody th {\n border-bottom: 0;\n }\n\n tr {\n padding: ").concat(spaceLarge," 0 !important;\n }\n\n tbody th {\n padding-top: ").concat(spaceLarge," !important;\n }\n\n tfoot td {\n margin-bottom: ").concat(spaceXxSmall," !important;\n }\n\n tbody:not(:only-of-type) tr:first-child {\n border-bottom: 0;\n }\n }\n}\n\n.duet-table-plain {\n\n &.duet-table-flattened {\n tbody tr {\n border-bottom: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tbody tr {\n border-bottom-color: ").concat(colorGrayLightTurva,";\n }\n }\n}\n\n.duet-table-minimal {\n\n tbody tr,\n tbody tr td {\n vertical-align: top;\n border-bottom: 0 none;\n }\n\n tbody tr:last-of-type,\n tbody tr:last-of-type td {\n border-bottom: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-table-flattened {\n tbody tr,\n tbody tr td {\n border-bottom: 0 none;\n }\n\n tbody tr td[data-heading]::before {\n display: none;\n }\n\n tfoot {\n border-top: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tfoot {\n border-top-color: ").concat(colorGrayLightTurva,";\n }\n }\n}\n\n.duet-table-fixed {\n\n table {\n table-layout: fixed;\n }\n\n tbody tr,\n tbody tr td,\n tbody tr td:first-child {\n padding: 4px !important;\n vertical-align: text-bottom;\n border-bottom: 0 none;\n }\n\n thead {\n display: none;\n }\n\n tbody tr,\n tbody tr td {\n border-bottom: 0 none;\n }\n\n &:not(.duet-table-flattened) {\n tfoot {\n border-top: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tfoot {\n border-top-color: ").concat(colorGrayLightTurva,";\n }\n }\n}\n.duet-table-scrollable {\n position: relative;\n width: 100%;\n overflow-x: auto;\n background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;\n background-repeat: no-repeat;\n background-attachment: local, local, scroll, scroll;\n background-size: 100px 100%, 100px 100%, 12px 100%, 12px 100%;\n}\n\n.duet-table-selected-column {\n background: rgba(").concat(colorPrimary,", 0.08);\n\n .duet-theme-turva & {\n background: rgba(").concat(colorGrayDarkerTurva,", 0.08);\n }\n}\n\n.duet-table-sortable {\n tbody tr td:first-child,\n thead tr th:first-child {\n padding: ").concat(spaceLarge,";\n }\n\n &:not(.duet-table-flattened) {\n tfoot {\n border-top: 1px solid ").concat(colorGrayLight,";\n }\n\n &.duet-theme-turva tfoot {\n border-top-color: ").concat(colorGrayLightTurva,';\n }\n }\n}\n\n\n.duet-table-actions {\n table {\n table-layout: auto;\n }\n\n thead {\n & th:last-child {\n width: 1px;\n white-space: nowrap;\n }\n }\n}\n\n.duet-editable-table-table.duet-table-flattened {\n tr {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-auto-rows: auto;\n gap: 10px;\n\n &.duet-table-action-row td:last-child::before {\n padding: 0;\n content: "";\n }\n }\n\n td {\n grid-column: 1 / 2;\n\n &:first-child {\n grid-row: 1;\n grid-column: 1;\n }\n\n &:last-child {\n grid-row: 1;\n grid-column: 2;\n }\n }\n}\n').replace(/[\n\r\t]/gm,"");function createStyles(e){var t=e.getRootNode();var n=t instanceof ShadowRoot;if(n){var a=new CSSStyleSheet;a.replace(styles).then((function(){t.adoptedStyleSheets.push(a)}))}else{var i=document.querySelector("style#duet-table-styles");if(i){return}var r=document.createElement("style");r.id="duet-table-styles";r.innerHTML=styles;document.head.append(r)}}var stickyTopValues={none:0,"with-links":parseFloat(sizeNavigation)*16,"without-links":parseFloat(sizeHeader)*16};var DuetTable=function(){function e(e){var t=this;registerInstance(this,e);this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)";this.handleMediaQueryChange=function(e){t.matchesBreakpoint=breakpointTokensUpTo.includes(t.breakpoint)?!e.matches:e.matches};this.matchesBreakpoint=true;this.language=getLanguage();this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.hideHeadVisually=false}e.prototype.watchLanguageStateHandler=function(e,t){var n=this;if(e!==t){setTimeout((function(){return n.copyHeadingsToCells()}),50)}};e.prototype.connectedCallback=function(){var e=this;createStyles(this.element);var t=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":breakpointToToken[this.breakpoint];this.mq=matchMedia(t);this.mq.addEventListener("change",debounce(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return debounce(e.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var e=stickyTopValues[this.stickyDistance];var t=this.element.querySelectorAll(this.headingSelector);t.forEach((function(t){return t.style.top="".concat(e,"px")}))}};e.prototype.componentDidLoad=function(){this.observer?this.observer.takeRecords():null;connectLanguageChangeObserver(this)};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true;disconnectLanguageChangeObserver(this)};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll(this.headingSelector);var t=this.element.querySelectorAll("tbody tr");var n=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(n[t]){var a=e.querySelector(".duet-table-cell-heading");if(!a||a.textContent!==n[t]){a===null||a===void 0?void 0:a.remove();var i=document.createElement("span");i.textContent=n[t];i.classList.add("duet-table-cell-heading");i.setAttribute("aria-hidden","true");i.inert=true;e.prepend(i)}}}))}))};e.prototype.render=function(){var e;return h(Host,{key:"fcdd601ace6ef28821198d34d85eb3dc94b73aa3",class:(e={},e["duet-table-".concat(this.variation)]=true,e["duet-table-flattened"]=!this.matchesBreakpoint,e["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,e["duet-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e["duet-table-hide-head-visually"]=this.hideHeadVisually,e)},h("slot",{key:"35cef7a6450ff5dc1e34cda94637a50dec7860a8"}))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{language:["watchLanguageStateHandler"]}},enumerable:false,configurable:true});return e}();var errorCodes=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-203",system_message:"Files to upload exceed total byte size limit",message:{fi:"Yritit lisätä tiedostoja, jotka ylittäisivät suurimman sallitun yhteenlasketun koon.",sv:"Du försökte lägga till filer som skulle överskrida den maximala kombinerade storleken.",en:"You tried to add files that would exceed the maximum combined size."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}},{type:"duet-upload-302",system_message:"Files to upload exceeds limits",message:{fi:"Et voi lähettää enempää kuin enimmäismäärän liitteitä.",sv:"Du kan inte ladda upp fler än det maximala antalet bilagor.",en:"You can't upload more than maximum number of attachments."}}];var headerAriaLabel={fi:"Liiteluettelo",sv:"Lista över bilagor",en:"Attachments list"};var UploadItemHeader=function(e){var t=e.label,n=e.categoryLabel;return h("div",{class:"items-header",tabindex:"-1","aria-label":getLocaleString(headerAriaLabel)},n&&h("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},getLocaleString(n)),h("duet-heading",{class:{"filename-header":true,"no-category":!n},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},getLocaleString(t)))};var validateFileExtension=function(e,t){if(!t){return true}var n=e.split(".");var a=t.split(",");var i=n[n.length-1];return a.includes(i)};var validateFileMime=function(e,t){if(!t||!e){return true}var n=t.split(",");var a=false;n.forEach((function(t){var n=t.split("/");var i=e.split("/");if(n[0]===i[0]&&(n[1]===i[1]||n[1]==="*")){a=true}}));return a};var validateFileSize=function(e,t){if(!t||!e){return true}return t>=e};var validateFile=function(e,t,n){var a=t.allowedMimetypes,i=t.allowedExtensions,r=t.maxBytes;var o=false;var s=getError("default",n);if(e){var d=e.name,l=e.type,u=e.size;var h=validateFileMime(l,a);var c=i==="all"||i===""||i===" "||i===undefined?true:validateFileExtension(d.toLowerCase(),i);var f=validateFileSize(u,r);if(!h){s=getError("duet-upload-101",n)}if(!c){s=getError("duet-upload-100",n)}if(!f){s=getError("duet-upload-201",n)}o=h&&c&&f}else{o=false}return{valid:o,errorMessage:o?undefined:getLocaleString(s.message),errorSystem:o?undefined:s.system_message,errorType:o?undefined:s.type}};var validateTotalSizeIsAboveMax=function(e,t){var n=0;if(t){e.forEach((function(e){if(e.valid&&e.size){n+=e.size}}));if(n>=t){return true}}return false};var validateTotalAmountIsAboveMax=function(e,t){var n=0;if(t){e.forEach((function(e){if(e.valid){n++}}));if(n>=t){return true}}return false};var filesToUploadCountAboveMax=function(e,t,n){if(e+t>n){return true}return false};var filesToUploadTotalSizeIsAboveMax=function(e,t,n){var a=0;if(n){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));t.forEach((function(e){if(e.size){a+=e.size}}));if(a>=n){return true}}return false};var makeXhrRequest=function(e){var t=e.payload,n=e.options,a=e.onFailure,i=e.onSuccess,r=e.onProgress;var o=n.type,s=o===void 0?"POST":o,d=n.xhr,l=n.uri,u=n.argument,h=u===void 0?null:u,c=n.headers,f=c===void 0?null:c;d.open(s,"".concat(l).concat(h||""),true);var p=t.data,b=t.name;if(f){Object.keys(f).forEach((function(e){d.setRequestHeader(e,f[e])}))}if(s==="POST"){d.onreadystatechange=function(){if(d.readyState===XMLHttpRequest.DONE&&d.status>=200&&d.status<300){i(d,b,d.status)}if(d.readyState===XMLHttpRequest.DONE&&d.status>=300&&d.status<999){a(d,b,d.status)}};r(b)}d.send(p);return d};var duetUploadCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}::slotted([slot=uploadfooter]){margin-top:20px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:rgb(245, 248, 250)}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}duet-paragraph::part(duet-paragraph){word-break:break-word}duet-editable-table tfoot{display:none}.upload-bottom-caption{margin-top:12px;margin-bottom:16px;line-height:1.4rem}.items-header{display:none;flex-direction:row;margin-bottom:0}@media (min-width: 36em){.items-header{display:flex}}.items-header:not(:last-child),.items-header:not(:first-child){margin-top:12px}.items-header .category-header{width:35%}.items-header .filename-header{width:65%}.items-header .filename-header.no-category{width:100%}.upload-item-row{display:flex;flex-direction:column;gap:16px;align-content:center;align-items:center;padding:16px 0 16px 0;border-bottom:1px solid rgb(212, 223, 229)}@media (min-width: 36em){.upload-item-row{flex-direction:row;gap:10px}}.upload-item-row .item-categories{width:100%}@media (min-width: 36em){.upload-item-row .item-categories{width:35%}}.upload-item-row .item-name{position:relative;bottom:2px;width:100%;text-align:left}@media (min-width: 36em){.upload-item-row .item-name{width:50%}.upload-item-row .item-name.no-category{width:85%}}.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:block}@media (min-width: 36em){.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:none}}.upload-item-row .item-actions{width:100%;margin-left:-8px;text-align:left}@media (min-width: 36em){.upload-item-row .item-actions{width:15%;padding-top:0;margin-left:auto;text-align:right}}.upload-item-row .duet-upload-item-name duet-icon{position:relative;top:4px}.upload-item-row .duet-upload-item-name duet-progress{display:block;margin-top:16px}";var DuetUploadStyle0=duetUploadCss;var DuetUpload=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",3);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.duetReady=createEvent(this,"duetReady",7);this.duetDone=createEvent(this,"duetDone",3);this.duetState=createEvent(this,"duetState",3);this.duetDelete=createEvent(this,"duetDelete",3);this.duetCancel=createEvent(this,"duetCancel",3);this.duetProgress=createEvent(this,"duetProgress",3);this.duetUpload=createEvent(this,"duetUpload",3);this.linkClick=createEvent(this,"linkClick",3);this.buttonId=createID("DuetButton");this.labelId=createID("DuetLabel");this.uploadId=createID("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.filesToUploadExceedsLimit=false;this.filesToUploadTotalSizeIsAboveMax=false;this.internalStatusMessageLabel=undefined;this.itemRefs=new Map;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=debounce((function(){t.tick=Date.now()}),30);this.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"};this.listenForActionEvents=function(){t.element.addEventListener("duetActionEvent",(function(e){var n=e.detail;var a=n.action,i=n.id,r=n.originalEvent;switch(a){case"delete":t.onDelete(i,r);break;case"cancel":t.onCancel(i,r);break}}))};this.verifyValidity=function(){var e=t.getFilesAsArray(),n=e.invalid,a=e.valid;var i=t.valid;t.valid=n.length===0&&a.length!==0;if(t.valid!==i){t.duetState.emit({originalEvent:undefined,data:{valid:t.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){return t.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return t.DefaultGroups.inprogress}else if(!e.valid){return t.DefaultGroups.failure}else if(e.pending){return t.DefaultGroups.pending}else if(e.group){return e.group}else{return"none"}};this.mapFilesToUploadItems=function(e,n,a,i){if(n===t.DefaultGroups.success){return h("duet-upload-item",{theme:t.theme,actions:t.getActions(n,i),type:"success",data:e,showLinks:t.showLinks,linkClickEvent:t.emitEvent?t.linkClick:undefined,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:t.processedButtonTitles,ref:function(n){t.itemRefs.set(e.uid,n)}})}else if(n===t.DefaultGroups.inprogress){return h("duet-upload-item",{theme:t.theme,actions:t.getActions(n,i),type:"inprogress",data:e,showLinks:t.showLinks,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:t.processedButtonTitles,ref:function(n){t.itemRefs.set(e.uid,n)}})}else if(n===t.DefaultGroups.pending){return h("duet-upload-item",{theme:t.theme,actions:t.getActions(n,i),type:"pending",data:e,showLinks:t.showLinks,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:t.processedButtonTitles,ref:function(n){t.itemRefs.set(e.uid,n)}})}else if(n===t.DefaultGroups.failure){return h("duet-upload-item",{theme:t.theme,actions:t.getActions(n,i),type:"failure",data:e,showLinks:t.showLinks,errorCodes:t.errorCodes,categoryLabel:t.categoryLabel,label:t.uploadedItemsHeaderLabel,showCategory:a,buttonTitles:t.processedButtonTitles,ref:function(n){t.itemRefs.set(e.uid,n)}})}else if(e.group){return e.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,n,a,i){if(i===void 0){i=true}try{var r=t.files.get(e);r[n]=a;t.files.set(e,r);if(t.external&&n!=="url"){t.trackProgress(e,n==="uploaded")}}catch(e){}if(i){t.kick()}};this.updateProgress=function(e,n){var a=function(a){t.updateValueInMap(n,"progress",a);t.onProgress(n,a,e)};if(e.lengthComputable){var i=e.loaded/e.total*100;a(i)}else{console.log("cant read progress")}};this.trackProgress=function(e,n){if(n===void 0){n=false}if(n){t.filesInProgress.delete(e)}else{t.filesInProgress.set(e,"inprogress")}if(t.filesInProgress.size===0){t.onDone()}};this.getFilesAsArray=function(){var e=[];var n=[];t.files.forEach((function(t){if(t.valid&&!t.deleted){e.push(t)}else if(!t.valid&&!t.deleted){n.push(t)}}));return{valid:e,invalid:n}};this.resetFormFields=function(){t.nativeInput.value=""};this.startUpload=function(e){var n=[];for(var a=1;a<arguments.length;a++){n[a-1]=arguments[a]}return __awaiter(t,__spreadArray([e],n,true),void 0,(function(e,t){var n,a,i;if(t===void 0){t=undefined}return __generator(this,(function(r){n=this.validateTotals(),a=n.bytesMaxReached,i=n.fileMaxReached;if(a||i){this.kick();return[2]}this.metaData=t;this.nativeInput.click();this.onUpload(e,t);e.stopPropagation();e.preventDefault();return[2]}))}))};this.transferComplete=function(e){t.updateValueInMap(e,"progress",100,false);t.trackProgress(e,true)};this.transferDone=function(e,n,a){t.updateValueInMap(n,"status",a,false);t.updateValueInMap(n,"uploaded",true,false);try{var i=JSON.parse(e.response);t.updateValueInMap(n,"url",i.url)}catch(e){t.updateValueInMap(n,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,n,a){try{var i=JSON.parse(e.response).error;t.updateValueInMap(n,"error",{message:i.message,type:i.type},false)}catch(e){console.error("Server did not respond with expected response error:{message: string, type: int}");t.updateValueInMap(n,"error",{type:a},false)}t.updateValueInMap(n,"valid",false,true)};this.transferFailed=function(e){t.updateValueInMap(e,"error",getI18nError("duet-upload-001",t.errorCodes))};this.transferCanceled=function(e){t.files.delete(e);t.validateTotals(e);t.kick()};this.validateTotals=function(e){var n=validateTotalSizeIsAboveMax(t.files,t.maxBytesTotal);var a=validateTotalAmountIsAboveMax(t.files,t.maxFiles);if(n&&e){t.updateValueInMap(e,"error",getI18nError("duet-upload-202",t.errorCodes),false)}if(a&&e){t.updateValueInMap(e,"error",getI18nError("duet-upload-301",t.errorCodes),false)}t.bytesMaxReached=n;t.fileMaxReached=a;return{bytesMaxReached:n,fileMaxReached:a}};this.uploadFile=function(e){var n=[];for(var a=1;a<arguments.length;a++){n[a-1]=arguments[a]}return __awaiter(t,__spreadArray([e],n,true),void 0,(function(e,t,n){var a,i,r;if(t===void 0){t=false}return __generator(this,(function(o){switch(o.label){case 0:if(!t&&this.deferUpload){this.updateValueInMap(e.item.name,"pending",true,false);this.updateValueInMap(e.item.name,"group","pending",true)}else if(t){this.updateValueInMap(e.item.name,"pending",false,false);this.updateValueInMap(e.item.name,"group",undefined,true)}o.label=1;case 1:o.trys.push([1,4,,5]);if(!(!this.deferUpload||t))return[3,3];a=new FormData;a.append("file",e.item);if(n){a.append("key",n)}a.append("uid",e.uid);a.append("name",e.item.name);a.append("metadata",JSON.stringify({uid:e.uid,url:this.uri,size:e.item.size,meta:e.meta}));i=e;return[4,this.makeXHRPostRequest(a)];case 2:i.xhr=o.sent();o.label=3;case 3:return[3,5];case 4:r=o.sent();this.updateValueInMap(e.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var e=0,n=Array.from(t.files.entries());e<n.length;e++){var a=n[e],i=a[0],r=a[1];if(r.group==="pending"&&r.pending===true){t.uploadFile(r,true,i)}}};this.getItemFromUID=function(e){for(var n=0,a=Array.from(t.files.entries());n<a.length;n++){var i=a[n],r=i[0],o=i[1];if(o.uid===e){return{value:o,key:r}}}return null};this.handleExternalUploadButton=function(e,n){if(t.externalUploadButton){if(e||n){t.externalUploadButton.disabled=true}else{t.externalUploadButton.disabled=false}}};this.onDelete=function(e,n){var a=t.getItemFromUID(e);var i=a.key;var r=t.files.get(i);t.files.delete(i);var o=t.validateTotals(),s=o.bytesMaxReached,d=o.fileMaxReached;t.handleExternalUploadButton(s,d);t.kick();t.duetDelete.emit({originalEvent:n,data:{deletion:r},component:"duet-upload"});if(!t.external&&!r.pending){t.makeXHRDeleteRequest(r)}t.resetFormFields()};this.onCancel=function(e,n){var a=t.getItemFromUID(e).key;var i=t.files.get(a);t.files.delete(a);var r=t.validateTotals(),o=r.bytesMaxReached,s=r.fileMaxReached;t.handleExternalUploadButton(o,s);if(!t.external){var d=i.xhr;if(d){d.abort()}}t.kick();t.resetFormFields();t.duetCancel.emit({originalEvent:n,data:{cancelled:i},component:"duet-upload"})};this.onUpload=function(e,n){t.duetUpload.emit({originalEvent:e,metaData:n,component:"duet-upload"})};this.onBlur=function(e){t.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,n,a){t.duetChange.emit({originalEvent:a,data:{key:e,percentComplete:n},component:"duet-upload"})};this.onFocus=function(e){t.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onReady=function(){t.duetReady.emit({component:"duet-upload"})};this.onDone=function(){t.duetDone.emit({component:"duet-upload",data:{files:t.files}})};this.filterMap=function(){var e=Array.from(t.files.values());var n=[];var a=[];var i=[];var r=[];var o=false;e.forEach((function(e){var s=t.getGroupFromItemData(e);if(e.meta&&!!e.meta.badges){o=true}if(s===t.DefaultGroups.success){r.push({uid:e.uid,data:e})}else if(s===t.DefaultGroups.inprogress){n.push({uid:e.uid,data:e})}else if(s===t.DefaultGroups.pending){i.push({uid:e.uid,data:e})}else if(s===t.DefaultGroups.failure){a.push({uid:e.uid,data:e})}else if(e.group){n.push({uid:e.uid,data:e})}}));return{pending:i,failure:a,success:r,inprogress:n,hasCategory:o}};this.getActions=function(e,t){return t.filter((function(t){return t.map.includes(e)}))};this.renderUploadedItems=function(){t.itemRefs.clear();var e=t.filterMap();var n=e.hasCategory;var a=t.hideCancelButton?t.actions.filter((function(e){return e.name!=="cancel"})):t.actions;var i=t.groups.map((function(i){var r=e[i.id];if(!(r===null||r===void 0?void 0:r.length)){return}return h(Fragment,null,!t.hideGroups&&h(UploadItemHeader,{categoryLabel:n?t.categoryLabel:undefined,label:i.label}),r.map((function(e){return t.mapFilesToUploadItems(e.data,i.id,n,a)})))}));return h(Fragment,null,t.showUploadedItemsHeader&&h(UploadItemHeader,{categoryLabel:n?t.categoryLabel:undefined,label:t.uploadedItemsHeaderLabel}),i)};this.tick=Date.now();this.accessibleActiveDescendant=undefined;this.accessibleDescribedBy=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.external=false;this.middleware=null;this.deferUpload=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Delete the file",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",size:"x-small",background:"gray-lightest",name:"cancel",map:["inprogress","pending"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}];this.uri=undefined;this.showLinks=false;this.caption=undefined;this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",inProgressWithErrors:"Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",done:"Lähetys valmis, {filesTotal} lisätty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",files:"tiedostoa",file:"tiedosto"},sv:{inProgress:"Laddar upp {filesUploaded} av {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Uppladdningen slutförd, {filesTotal} har lagts till",doneWithErrors:"Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Uploading {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"Upload completed, {filesTotal} added successfully",doneWithErrors:"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",files:"files",file:"file"}};this.statusMessageLabel=getLocaleString(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=getLocaleString(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.identifier=undefined;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=getLocaleString(this.labelDefaults);this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."};this.description=getLocaleString(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=getLocaleString(this.fileListEmptyDefaults);this.error="";this.errorCodes=errorCodes;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="";this.multiple=true;this.limitSelection=false;this.hideCancelButton=false;this.value=undefined;this.externalUploadButtonId=undefined;this.captionOnBottom=false;this.showUploadedItemsHeader=false;this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"};this.headerHeadingLevel="h3";this.hideHeader=false;this.emitEvent=false;this.actionButtonTitles={cancel:false,delete:false};this.renameDuplicates=false;this.groups=[{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}},{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}}]}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=sanitizeString(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}inheritGlobalTheme(this);this.listenForActionEvents();this.onReady();this.externalUploadButton=document.querySelector("#".concat(this.externalUploadButtonId));this.processedButtonTitles=parsePossibleJSON(this.actionButtonTitles)};e.prototype.componentWillRender=function(){this.verifyValidity()};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus(e)}return[2]}))}))};e.prototype.upload=function(){return __awaiter(this,arguments,void 0,(function(e){var t,n,a;if(e===void 0){e=undefined}return __generator(this,(function(i){t=this.validateTotals(),n=t.bytesMaxReached,a=t.fileMaxReached;if(n||a){this.handleExternalUploadButton(n,a);this.kick();return[2]}this.metaData=e;this.nativeInput.click();return[2]}))}))};e.prototype.uploadPending=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.uploadPendingFiles();return[2]}))}))};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.kick();return[4,this.setFocus()];case 1:e.sent();return[2]}}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};e.prototype.updateValue=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){this.updateValueInMap(e,t,n);return[2]}))}))};e.prototype.focusActionButton=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,(t=this.itemRefs.get(e))===null||t===void 0?void 0:t.focusActionButton()];case 1:n.sent();return[2]}}))}))};e.prototype.render=function(){var e=this;var t=this.identifier||this.uploadId;var n=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var a=Math.round(this.maxBytes/1024/1024);var i=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());i=i.replace(/{maxbytes}/g,"".concat(a.toString()," MB"));i=i.replace(/{maxbytestotal}/g,"".concat(n.toString()," MB"));i=i.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));if(this.externalUploadButton){this.externalUploadButton.accessibleLabel="".concat(this.externalUploadButton.innerText,". ").concat(i)}return h(Host,{key:"dd2d8df45d7b1e8526fc08809e07f4cb33685750",class:{"duet-m-0":this.margin==="none"}},h("duet-fieldset",{key:"5763ea920a4090ca67c77c4408df558a1381a4ea","label-heading-level":this.headerHeadingLevel,"label-hidden":this.hideHeader,label:this.label},h("slot",{key:"c156b40628ec1b5d9270df434022ed16e8946eae",name:"header"}),!this.files.size&&h("duet-empty-state",{key:"ad1d9f14e0c17f73b93aa3989fbd6105e5668a11",id:this.labelId,part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",icon:"messaging-attachment"},h("duet-paragraph",{key:"aa1475ad4c73fd61976e8ba408d76f1b55b850cb",margin:"none"},this.fileListEmpty)),!!this.files.size&&h("slot",{key:"a4dd57cd140b091b2bd5622b5fc5c55dc567e144",name:"fileheader"}),!!this.files.size&&h("duet-upload-aria-status",{key:"8f5beb8ce03d9b4f1b7df6d01ba707485daecf5a",invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderUploadedItems(),!!this.files.size&&h("slot",{key:"0432c1b02bcc36c239b05c5b4aa260ce4392c5cd",name:"filefooter"}),h("slot",{key:"dd19564b15aad3cc65396121f3862ee1275e3da6",name:"uploadfooter"}),this.captionOnBottom&&h("duet-caption",{key:"388956db21f30c93c685fac7b11604932baf6ab1",margin:"none",size:"small"},h("div",{key:"24766af55c816957c30880f6ccf31c2c8d24cebe",class:"upload-bottom-caption"},i)),h("slot",{key:"bb6a994d5c65c0d3514a304eb2547a2f81d3feb3",name:"afterfooter"}),!this.hideButton&&h(Fragment,{key:"0028099baf1d0d8224d5549a16c663005fb78875"},h("duet-spacer",{key:"295a793dcf0cff48d7b3b211984a44a68aff5a1c",size:"large"}),h("duet-button",{key:"7375e766eac86aee16440e44c9645173ad2a8d1e",id:this.buttonId,onClick:this.startUpload,"accessible-controls":t,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel||"".concat(this.buttonLabel,". ").concat(i),"accessible-owns":t,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?"".concat(this.identifier,"-button-upload"):"duet-upload-button-upload"},this.buttonLabel)),(this.fileMaxReached||this.bytesMaxReached||this.filesToUploadExceedsLimit||this.filesToUploadTotalSizeIsAboveMax)&&h(Fragment,{key:"30cbbe58d5267a103f6aecf7dad5481c878d7662"},h("duet-spacer",{key:"a18c694807a23f24ffaa895874546efb8864602d",size:"medium"}),h("duet-alert",{key:"db0280069c76343b698ee84899d829c257558f7a",part:this.identifier?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&getI18nError("duet-upload-301",this.errorCodes),this.bytesMaxReached&&getI18nError("duet-upload-202",this.errorCodes),this.filesToUploadExceedsLimit&&getI18nError("duet-upload-302",this.errorCodes),this.filesToUploadTotalSizeIsAboveMax&&getI18nError("duet-upload-203",this.errorCodes))),h("duet-visually-hidden",{key:"5f2458287c90d4c906fe6366bf9fa42a844cf8f9","aria-hidden":"true"},h("input",{key:"6d5180b885ae0c13c8c06118084bb49d0df0c989",ref:function(t){e.nativeInput=t},accept:!this.limitSelection?undefined:"".concat(this.allowedMimetypes,",").concat(this.allowedExtensions),onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(t){return e.onChange(t)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))};e.prototype.makeXHRPostRequest=function(e){var t=this;var n=new XMLHttpRequest;var a=e.get("name");n.upload.addEventListener("progress",(function(e){t.updateProgress(e,a)}));n.upload.addEventListener("load",(function(){t.transferComplete(a)}));n.upload.addEventListener("error",(function(){t.transferFailed(a)}));n.upload.addEventListener("abort",(function(){t.transferCanceled(a)}));var i={payload:{data:e,name:a},options:{type:"POST",uri:this.uri,xhr:n,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){i=this.middleware(i)}return makeXhrRequest(i)};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,n=e.item;var a=new XMLHttpRequest;var i={"x-fileuid":t,"x-filename":n.name};var r={payload:{data:null,name:name},options:{type:"DELETE",xhr:a,uri:this.uri,argument:"?key=".concat(t,"&name=").concat(n.name),headers:i},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return makeXhrRequest(r)};e.prototype.escapeSpecialCharacters=function(e){return(e+"").replace(/[\\"'(){}\[\]*?$^+]/g,"\\$&").replace(/\u0000/g,"\\0")};e.prototype.getRenamedFileName=function(e,t){var n=new RegExp("".concat(this.escapeSpecialCharacters(e)," \\(\\d+\\).").concat(t));var a=Array.from(this.files.entries()).map((function(e){var t=e[0],n=e[1];return t})).filter((function(a){return n.test(a)||a==="".concat(e,".").concat(t)})).sort((function(e,t){return e.split(".").slice(0,-1).join(".")>t.split(".").slice(0,-1).join(".")?1:-1})).pop().split(".").slice(0,-1).join(".");if(a===e){return"".concat(e," (1).").concat(t)}var i=parseInt(a.split("(").pop().slice(0,-1));return"".concat(e," (").concat(i+1,").").concat(t)};e.prototype.renameFiles=function(e){var t=this;return e.map((function(e){if(t.files.get(e.name)){var n=e.name.split(".");var a=n.pop();var i=n.join(".");var r=t.getRenamedFileName(i,a);return new File([e],r,{type:e.type,lastModified:e.lastModified})}else{return e}}))};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,a,i,r,o,s,d,l,u,h,c;return __generator(this,(function(f){switch(f.label){case 0:n=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);this.filesToUploadExceedsLimit=false;if(filesToUploadCountAboveMax(this.files.size,n.length,this.maxFiles)){this.filesToUploadExceedsLimit=true;this.kick();return[2]}this.filesToUploadTotalSizeIsAboveMax=false;if(filesToUploadTotalSizeIsAboveMax(this.files,n,this.maxBytesTotal)){this.filesToUploadTotalSizeIsAboveMax=true;this.kick();return[2]}if(!n)return[3,6];if(this.renameDuplicates){n=this.renameFiles(n)}a=0,i=n;f.label=1;case 1:if(!(a<i.length))return[3,6];r=i[a];o=validateFile(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),s=o.valid,d=o.errorMessage,l=o.errorType,u=o.errorSystem;h=this.genHashName();c={uid:h,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:s,error:{type:s?undefined:l,message:s?undefined:d,system_message:s?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,c);if(!(s&&!this.external))return[3,3];return[4,this.uploadFile(c)];case 2:f.sent();return[3,4];case 3:if(s&&this.external){this.updateValueInMap(c.item.name,"pending",true,false);this.updateValueInMap(c.item.name,"group","pending",true)}else if(!s){this.updateValueInMap(r.name,"valid",false,true)}f.label=4;case 4:this.kick();f.label=5;case 5:a++;return[3,1];case 6:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:e,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}();DuetUpload.style=DuetUploadStyle0;export{DuetEditableTable as duet_editable_table,DuetTable as duet_table,DuetUpload as duet_upload};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-
|
|
4
|
+
import{r as registerInstance,h,H as Host,g as getElement}from"./index-fa810c91.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";var duetEmptyStateCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:rgb(8, 42, 77);text-align:center;background:rgb(245, 248, 250);border-radius:4px}.duet-empty-state.duet-theme-turva{color:rgb(23, 28, 58);background:rgb(245, 247, 250)}";var DuetEmptyStateStyle0=duetEmptyStateCss;var DuetEmptyState=function(){function e(e){registerInstance(this,e);this.theme="";this.icon="messaging-question";this.size="medium"}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){return h(Host,{key:"1f6624730e50ba1915eab79ea13c33134dff9119"},h("div",{key:"066811ce2abe630a698cdc92b45e461bf50779be",class:{"duet-empty-state":true,"duet-theme-turva":this.theme==="turva","duet-is-small":this.size==="small"}},h("duet-icon",{key:"143baa7a70df678984547409c3d8bff636a7043c",color:"currentColor",name:this.icon,size:this.size==="small"?"large":"x-large"}),h("div",{key:"000ac5797e6617cec3318a31ec186c4d9f93af0d"},h("slot",{key:"4e389d93ba161ff558782fbafe1b60a9e883f6b1"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetEmptyState.style=DuetEmptyStateStyle0;export{DuetEmptyState as duet_empty_state};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-
|
|
4
|
+
import{r as registerInstance,h,H as Host,g as getElement}from"./index-fa810c91.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{c as createID}from"./create-id-149a1b6d.js";import{h as hasSlot}from"./slot-utils-b2101c56.js";var duetFieldsetCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{position:relative;width:100%;min-width:0;border:0}fieldset legend{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-legend-wrapper{position:relative;display:block;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:rgb(8, 42, 77);text-align:left;background:transparent}.duet-legend-wrapper.duet-legend-compact:not(.duet-legend-has-caption){line-height:1.25}.duet-theme-turva .duet-legend-wrapper{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;line-height:1.25;color:rgb(214, 28, 82);border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(214, 28, 82)}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}';var DuetFieldsetStyle0=duetFieldsetCss;var DuetFieldset=function(){function e(e){var t=this;registerInstance(this,e);this.errorId=createID("DuetError");this.labelId=createID("DuetLabel");this.checkHasTooltip=function(){t.hasTooltip=hasSlot(t.element,"tooltip")};this.hasTooltip=false;this.theme="";this.margin="auto";this.caption=undefined;this.label=undefined;this.compactLabel=false;this.error=undefined;this.accessibleLiveError="polite";this.labelHeadingLevel="span";this.labelHidden=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.checkHasTooltip()};e.prototype.render=function(){return h(Host,{key:"f6aef2c47f5c6b8e6d2c1bdb46d519f4ed458718",class:{"duet-m-0":this.margin==="none"}},h("fieldset",{key:"a54d512a17e071942ee5f0fabf5390e6f1bcac32","aria-labelledby":this.labelId,"aria-describedby":this.error?this.errorId:null,class:{"duet-fieldset":true,"duet-theme-turva":this.theme==="turva"}},h("legend",{key:"afd55670461e38468717fa4d4c897d92333c3986",id:this.labelId},h(this.labelHeadingLevel,{key:"d66a45591d9ea38ece746276f752a1dc9f470060"},this.label),this.caption&&h("span",{key:"2e6451284012b3f76c5ddb452e8c54c8902ba222"},this.caption)),h("div",{key:"f4a921c9f6fad1e6bc70e5c6e50c7e17378664b7",class:{"duet-legend-wrapper":true,"duet-legend-has-caption":!!this.caption,"duet-legend-has-tooltip":this.hasTooltip,"duet-legend-hidden":this.labelHidden,"duet-legend-compact":this.compactLabel}},h("div",{key:"9fb2004e0c5810ba28adbf0b2f1cf222c255f7e3",class:"duet-fieldset-label"},h("span",{key:"d043219b465141ce2a6d6dbba38f6233560a6e3e","aria-hidden":"true"},this.label),h("slot",{key:"ae5535898568b419d0534a1105878d2ddb784ff8",onSlotchange:this.checkHasTooltip,name:"tooltip"})),this.caption&&h("div",{key:"6c68d9a518f408a460e2346cdc30342606cb133d",class:"duet-fieldset-caption","aria-hidden":"true"},h("duet-caption",{key:"198623e298175cfa825ccbc9b70ba3a25f577d2a",theme:this.theme,margin:"none"},this.caption))),h("slot",{key:"a80181d8476bb6387cb5d76cce99d4617cac8734"}),h("span",{key:"be4bff117193cceb7517dbef02403f231ed3f263",class:"duet-fieldset-help",id:this.errorId,"aria-atomic":"true","aria-live":this.accessibleLiveError,"aria-relevant":"additions removals"},this.error&&h("span",{key:"08312b9df002b520950d3119195c811cb2504e83"},this.error))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetFieldset.style=DuetFieldsetStyle0;export{DuetFieldset as duet_fieldset};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function u(e){try{c(i["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):r(e.value).then(a,u)}c((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(e){return function(t){return c([e,t])}}function c(u){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(n=0)),n)try{if(i=1,r&&(o=u[0]&2?r["return"]:u[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;if(r=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;r=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1];o=u;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(u);break}if(o[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];r=0}finally{i=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{r as registerInstance,c as createEvent,h,H as Host}from"./index-
|
|
4
|
+
*/import{r as registerInstance,c as createEvent,h,H as Host}from"./index-fa810c91.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";var duetFileChooserCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.container{display:flex;flex-direction:row;gap:8px;align-items:center}.container .label{margin-bottom:8px}";var DuetFileChooserStyle0=duetFileChooserCss;var DuetUploadItem=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",3);this.onChange=function(e){e.preventDefault();e.stopPropagation();t.duetChange.emit({originalEvent:e,data:{files:t.nativeInput.files},component:"duet-file-chooser"})};this.theme="";this.multiple=false;this.accept=undefined}e.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){(e=this.nativeInput)===null||e===void 0?void 0:e.click();return[2]}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.nativeInput.files]}))}))};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){var e=this;return h(Host,{key:"fa488300deb51d9bc5eb5bbe2ad484047f82eaee"},h("duet-visually-hidden",{key:"b6eaeee61a64ae8c9e872c909f73e1cb3d8b4ac4","aria-hidden":"true"},h("input",{key:"f5107c8dd70020263f0d4f06b4c5b1ff1d4c9936",ref:function(t){e.nativeInput=t},type:"file",class:{"duet-upload":true},"aria-hidden":"true",tabIndex:-1,onChange:this.onChange,multiple:this.multiple,accept:this.accept})))};return e}();DuetUploadItem.style=DuetFileChooserStyle0;export{DuetUploadItem as duet_file_chooser};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,o,i){function r(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function a(e){try{u(i.next(e))}catch(e){n(e)}}function d(e){try{u(i["throw"](e))}catch(e){n(e)}}function u(e){e.done?o(e.value):r(e.value).then(a,d)}u((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,r,n,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(e){return function(t){return u([e,t])}}function u(d){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,d[0]&&(o=0)),o)try{if(i=1,r&&(n=d[0]&2?r["return"]:d[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,d[1])).done)return n;if(r=0,n)d=[d[0]&2,n.value];switch(d[0]){case 0:case 1:n=d;break;case 4:o.label++;return{value:d[1],done:false};case 5:o.label++;r=d[1];d=[0];continue;case 7:d=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(d[0]===6||d[0]===2)){o=0;continue}if(d[0]===3&&(!n||d[1]>n[0]&&d[1]<n[3])){o.label=d[1];break}if(d[0]===6&&o.label<n[1]){o.label=n[1];n=d;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(d);break}if(n[2])o.ops.pop();o.trys.pop();continue}d=t.call(e,o)}catch(e){d=[6,e];r=0}finally{i=n=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{r as registerInstance,c as createEvent$1,h,F as Fragment,g as getElement}from"./index-5a27eaf5.js";import{a as actionNewWindowSmall}from"./action-new-window-small-1945be91.js";import{D as DuetStringsExternalDefaults}from"./common-strings-af765cad.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{s as subscribeTabbingChange,u as unsubscribeTabbingChange}from"./keyboard-utils-daf80d44.js";import{a as getLanguage,g as getLocaleString,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-2c1dd412.js";import{h as hasSlot}from"./slot-utils-8fc9fbbf.js";import{p as parsePossibleJSON}from"./string-utils-192eb3c8.js";var duetFooterCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex-shrink:0;width:100%}::slotted([slot=info]){padding:0 28px;margin-top:0;margin-bottom:16px}@media (min-width: 62em){::slotted([slot=info]){padding:0;margin-top:calc(20px - 0.5em);margin-bottom:0}}.duet-footer{display:block;width:100%;padding-top:24px;padding-bottom:16px;margin-top:48px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(255, 255, 255);text-align:left;background:rgb(8, 42, 77)}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background:rgb(198, 12, 48)}.duet-footer a{color:rgb(255, 255, 255);text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center}.duet-footer-top.duet-has-info{align-items:flex-start}}.duet-footer-top .footer-top-logo{flex-grow:1}.duet-footer-top .footer-top-right-container{flex-grow:1}@media (min-width: 62em){.duet-footer-top .footer-top-right-container{text-align:right}}.duet-footer-top .footer-top-items{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding-left:28px}@media (min-width: 62em){.duet-footer-top .footer-top-items{flex-direction:row;justify-content:flex-end}}duet-logo{margin-bottom:24px;margin-left:16px !important}@media (min-width: 62em){duet-logo{margin-bottom:0;margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-menu{padding:20px !important;display:flex;gap:2rem;padding-left:28px !important;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-right:0 !important;padding-left:8px !important}}.duet-footer-menu a{display:inline-block;text-decoration:none;overflow-wrap:break-word}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu .duet-footer-divider-copyright{display:none}.duet-footer-menu .duet-footer-menu-links{display:block;flex:1}@media (min-width: 62em){.duet-footer-menu .duet-footer-menu-links{text-align:right}}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{display:none;font-size:0.875rem;color:rgb(255, 255, 255)}@media (min-width: 62em){.duet-footer-copyright{display:inline}}.duet-footer-copyright.duet-footer-copyright-mobile{display:block;padding-top:0.5rem;padding-bottom:1.25rem;padding-left:28px;text-align:left}@media (min-width: 62em){.duet-footer-copyright.duet-footer-copyright-mobile{display:none}}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:rgb(8, 42, 77);background:transparent !important;border-top:1px solid rgb(212, 223, 229)}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:rgb(8, 42, 77)}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple .duet-footer-copyright-mobile{padding-left:0}.duet-footer-simple.duet-theme-turva{color:rgb(23, 28, 58);border-color:rgb(222, 224, 228)}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:rgb(23, 28, 58)}.duet-footer-external{display:inline-block;margin-left:4px;color:rgb(0, 119, 179)}.duet-theme-turva .duet-footer-external{color:rgb(255, 255, 255)}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:rgb(198, 12, 48)}';var DuetFooterStyle0=duetFooterCss;var i18n={fi:{lahi:"© LähiTapiola",turva:"© Turva"},sv:{lahi:"© LokalTapiola",turva:"© Turva"},en:{lahi:"© LocalTapiola",turva:"© Turva"}};var createEvent=function(e,t){return{component:"duet-footer",data:t,originalEvent:e}};var DuetFooter=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent$1(this,"duetChange",3);this.duetLogoClick=createEvent$1(this,"duetLogoClick",7);this.duetMenuClick=createEvent$1(this,"duetMenuClick",7);this.duetItemClick=createEvent$1(this,"duetItemClick",7);this.duetAnalytics=createEvent$1(this,"duetAnalytics",7);this.duetEvent=createEvent$1(this,"duetEvent",7);this.handleClick=function(e){if(e.data.analyticsId){t.duetAnalytics.emit({component:"duet-footer",analyticsId:e.data.analyticsId})}t.duetChange.emit(e)};this.handleLogoClick=function(e){var o=createEvent(e,{href:t.logoHref,label:"logo"});t.duetLogoClick.emit(o);t.handleClick(o)};this.handleMenuClick=function(e,o){var i=createEvent(e,o);t.handleClick(i);t.duetMenuClick.emit(i)};this.handleItemClick=function(e,o){var i=createEvent(e,o);t.handleClick(i);t.duetItemClick.emit(i)};this.emitDuetEvent=function(e,o){t.duetEvent.emit({component:"duet-footer",data:o,originalEvent:e})};this.setDataAttributes=function(e,t){if(!t.data){return}for(var o in t.data){e.dataset[o]=t.data[o]}};this.processedMainItem=null;this.processedItems=null;this.processedMenu=null;this.theme="";this.variation="default";this.margin="auto";this.logoHref="/";this.language=getLanguage();this.items=undefined;this.accessibleLabel=undefined;this.accessibleLabelExternalDefaults=DuetStringsExternalDefaults;this.accessibleLabelExternal=getLocaleString(this.accessibleLabelExternalDefaults);this.menu=undefined}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.refresh();this.hasInfoSlot=hasSlot(this.element,"info")};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"accessibleLabelExternal",defaults:"accessibleLabelExternalDefaults"});subscribeTabbingChange(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this);unsubscribeTabbingChange(this)};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.processedItems=parsePossibleJSON(this.items);this.processedMenu=parsePossibleJSON(this.menu);return[2]}))}))};e.prototype.render=function(){var e=this;var t=getLocaleString(i18n,this.language);var o=this.theme==="turva"?t.turva:t.lahi;return h("footer",{key:"c09536e13ed896c7c3eb2ce3d3b48529049a3fa8",class:{"duet-footer":true,"duet-m-0":this.margin==="none","duet-theme-turva":this.theme==="turva","duet-footer-simple":this.variation==="simple"},"aria-label":this.accessibleLabel},h("div",{key:"4c6a795fb654c90c687e15b81071b76b9697548b",class:"duet-footer-wrapper"},this.variation!=="simple"&&h("div",{key:"ddd298007bd561bd321c9c542450c74c2998da89",class:{"duet-footer-top":true,"duet-has-info":this.hasInfoSlot},part:"top"},h("div",{key:"27e2f926b9e8922978d22782c86a5e99b38c1486",class:"footer-top-logo"},h("duet-logo",{key:"a297517a74d2d7b29d2e983829cd045cddca5682",href:this.logoHref,onClick:this.handleLogoClick,size:"large",inverse:true,language:this.language,theme:this.theme})),h("div",{key:"3ffc24afa25aaa0c1987b9fd6ad08a352a43d6ff",class:"footer-top-right-container"},h("slot",{key:"98c0a86faf2101a5ae372e12375a76b9b812d4db",name:"info"}),h("div",{key:"f1edd105fbf081e3d85a7db3df9830520d6814f7",class:"footer-top-items"},this.processedItems&&this.processedItems.map((function(t,o){var i,r,n,a,d,u;return h(Fragment,null,o>0&&h("duet-spacer",{size:"x-large",direction:"horizontal"}),h("duet-button",{ref:function(o){return e.setDataAttributes(o,t)},theme:e.theme,id:t.id,class:"duet-footer-link",variation:"plain",margin:"none",fixed:true,negative:true,url:t.href,external:t.external,icon:((i=t.href)===null||i===void 0?void 0:i.startsWith("tel:"))?"form-tel":((r=t.href)===null||r===void 0?void 0:r.startsWith("mailto:"))?"navigation-message":"navigation-arrow-right","icon-right":!((n=t.href)===null||n===void 0?void 0:n.startsWith("tel:"))&&!((a=t.href)===null||a===void 0?void 0:a.startsWith("mailto:")),"icon-size":((d=t.href)===null||d===void 0?void 0:d.startsWith("tel:"))||((u=t.href)===null||u===void 0?void 0:u.startsWith("mailto:"))?"medium":"medium-small",onClick:function(o){return e.handleItemClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},t.label))}))))),h("slot",{key:"3108d57df772399e2ec83e3819a277cf877f5898",name:"extra"}),h("p",{key:"ea96247cc266efc7e209acc8281b7a207b6d8ab1",class:"duet-footer-menu",part:"menu"},h("span",{key:"6f10b09142cf13f2168c4d1a37f6784167fff1f7",class:"duet-footer-copyright"},"".concat(o," ").concat((new Date).getFullYear())),h("span",{key:"def1a300fe8794d3ac068b575a0e74343ddcf53d",class:"duet-footer-menu-links"},this.processedMenu&&h(Fragment,{key:"88c8f59560a9d329cebcd88a6bae635a63e95681"},this.processedMenu.map((function(t){return h("a",{ref:function(o){return e.setDataAttributes(o,t)},href:t.href,id:t.id,target:t.external?"_blank":"_self",onClick:function(o){return e.handleMenuClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},t.label,t.external&&h(Fragment,null,h("duet-visually-hidden",null,", ",e.accessibleLabelExternal),h("span",{class:"duet-footer-external"},h("duet-icon",{icon:actionNewWindowSmall.svg,size:"xx-small",margin:"none",color:"currentColor"}))),h("span",{class:"duet-footer-divider",role:"presentation","aria-hidden":"true"},"/"))}))))),h("p",{key:"121abcf17a5b8eb8f04e3c8ee2ffef57d725c8aa",class:"duet-footer-copyright duet-footer-copyright-mobile"},"".concat(o," ").concat((new Date).getFullYear()))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{menu:["refresh"],items:["refresh"]}},enumerable:false,configurable:true});return e}();DuetFooter.style=DuetFooterStyle0;export{DuetFooter as duet_footer};
|
|
4
|
+
*/import{r as registerInstance,c as createEvent$1,h,F as Fragment,g as getElement}from"./index-fa810c91.js";import{a as actionNewWindowSmall}from"./action-new-window-small-1945be91.js";import{D as DuetStringsExternalDefaults}from"./common-strings-af765cad.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{s as subscribeTabbingChange,u as unsubscribeTabbingChange}from"./keyboard-utils-daf80d44.js";import{a as getLanguage,g as getLocaleString,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-35eb1c9f.js";import{h as hasSlot}from"./slot-utils-b2101c56.js";import{p as parsePossibleJSON}from"./string-utils-192eb3c8.js";var duetFooterCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex-shrink:0;width:100%}::slotted([slot=info]){padding:0 28px;margin-top:0;margin-bottom:16px}@media (min-width: 62em){::slotted([slot=info]){padding:0;margin-top:calc(20px - 0.5em);margin-bottom:0}}.duet-footer{display:block;width:100%;padding-top:24px;padding-bottom:16px;margin-top:48px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(255, 255, 255);text-align:left;background:rgb(8, 42, 77)}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background:rgb(198, 12, 48)}.duet-footer a{color:rgb(255, 255, 255);text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center}.duet-footer-top.duet-has-info{align-items:flex-start}}.duet-footer-top .footer-top-logo{flex-grow:1}.duet-footer-top .footer-top-right-container{flex-grow:1}@media (min-width: 62em){.duet-footer-top .footer-top-right-container{text-align:right}}.duet-footer-top .footer-top-items{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding-left:28px}@media (min-width: 62em){.duet-footer-top .footer-top-items{flex-direction:row;justify-content:flex-end}}duet-logo{margin-bottom:24px;margin-left:16px !important}@media (min-width: 62em){duet-logo{margin-bottom:0;margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-menu{padding:20px !important;display:flex;gap:2rem;padding-left:28px !important;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-right:0 !important;padding-left:8px !important}}.duet-footer-menu a{display:inline-block;text-decoration:none;overflow-wrap:break-word}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu .duet-footer-divider-copyright{display:none}.duet-footer-menu .duet-footer-menu-links{display:block;flex:1}@media (min-width: 62em){.duet-footer-menu .duet-footer-menu-links{text-align:right}}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{display:none;font-size:0.875rem;color:rgb(255, 255, 255)}@media (min-width: 62em){.duet-footer-copyright{display:inline}}.duet-footer-copyright.duet-footer-copyright-mobile{display:block;padding-top:0.5rem;padding-bottom:1.25rem;padding-left:28px;text-align:left}@media (min-width: 62em){.duet-footer-copyright.duet-footer-copyright-mobile{display:none}}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:rgb(8, 42, 77);background:transparent !important;border-top:1px solid rgb(212, 223, 229)}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:rgb(8, 42, 77)}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple .duet-footer-copyright-mobile{padding-left:0}.duet-footer-simple.duet-theme-turva{color:rgb(23, 28, 58);border-color:rgb(222, 224, 228)}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:rgb(23, 28, 58)}.duet-footer-external{display:inline-block;margin-left:4px;color:rgb(0, 119, 179)}.duet-theme-turva .duet-footer-external{color:rgb(255, 255, 255)}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:rgb(198, 12, 48)}';var DuetFooterStyle0=duetFooterCss;var i18n={fi:{lahi:"© LähiTapiola",turva:"© Turva"},sv:{lahi:"© LokalTapiola",turva:"© Turva"},en:{lahi:"© LocalTapiola",turva:"© Turva"}};var createEvent=function(e,t){return{component:"duet-footer",data:t,originalEvent:e}};var DuetFooter=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent$1(this,"duetChange",3);this.duetLogoClick=createEvent$1(this,"duetLogoClick",7);this.duetMenuClick=createEvent$1(this,"duetMenuClick",7);this.duetItemClick=createEvent$1(this,"duetItemClick",7);this.duetAnalytics=createEvent$1(this,"duetAnalytics",7);this.duetEvent=createEvent$1(this,"duetEvent",7);this.handleClick=function(e){if(e.data.analyticsId){t.duetAnalytics.emit({component:"duet-footer",analyticsId:e.data.analyticsId})}t.duetChange.emit(e)};this.handleLogoClick=function(e){var o=createEvent(e,{href:t.logoHref,label:"logo"});t.duetLogoClick.emit(o);t.handleClick(o)};this.handleMenuClick=function(e,o){var i=createEvent(e,o);t.handleClick(i);t.duetMenuClick.emit(i)};this.handleItemClick=function(e,o){var i=createEvent(e,o);t.handleClick(i);t.duetItemClick.emit(i)};this.emitDuetEvent=function(e,o){t.duetEvent.emit({component:"duet-footer",data:o,originalEvent:e})};this.setDataAttributes=function(e,t){if(!t.data){return}for(var o in t.data){e.dataset[o]=t.data[o]}};this.processedMainItem=null;this.processedItems=null;this.processedMenu=null;this.theme="";this.variation="default";this.margin="auto";this.logoHref="/";this.language=getLanguage();this.items=undefined;this.accessibleLabel=undefined;this.accessibleLabelExternalDefaults=DuetStringsExternalDefaults;this.accessibleLabelExternal=getLocaleString(this.accessibleLabelExternalDefaults);this.menu=undefined}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.refresh();this.hasInfoSlot=hasSlot(this.element,"info")};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"accessibleLabelExternal",defaults:"accessibleLabelExternalDefaults"});subscribeTabbingChange(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this);unsubscribeTabbingChange(this)};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.processedItems=parsePossibleJSON(this.items);this.processedMenu=parsePossibleJSON(this.menu);return[2]}))}))};e.prototype.render=function(){var e=this;var t=getLocaleString(i18n,this.language);var o=this.theme==="turva"?t.turva:t.lahi;return h("footer",{key:"c09536e13ed896c7c3eb2ce3d3b48529049a3fa8",class:{"duet-footer":true,"duet-m-0":this.margin==="none","duet-theme-turva":this.theme==="turva","duet-footer-simple":this.variation==="simple"},"aria-label":this.accessibleLabel},h("div",{key:"4c6a795fb654c90c687e15b81071b76b9697548b",class:"duet-footer-wrapper"},this.variation!=="simple"&&h("div",{key:"ddd298007bd561bd321c9c542450c74c2998da89",class:{"duet-footer-top":true,"duet-has-info":this.hasInfoSlot},part:"top"},h("div",{key:"27e2f926b9e8922978d22782c86a5e99b38c1486",class:"footer-top-logo"},h("duet-logo",{key:"a297517a74d2d7b29d2e983829cd045cddca5682",href:this.logoHref,onClick:this.handleLogoClick,size:"large",inverse:true,language:this.language,theme:this.theme})),h("div",{key:"3ffc24afa25aaa0c1987b9fd6ad08a352a43d6ff",class:"footer-top-right-container"},h("slot",{key:"98c0a86faf2101a5ae372e12375a76b9b812d4db",name:"info"}),h("div",{key:"f1edd105fbf081e3d85a7db3df9830520d6814f7",class:"footer-top-items"},this.processedItems&&this.processedItems.map((function(t,o){var i,r,n,a,d,u;return h(Fragment,null,o>0&&h("duet-spacer",{size:"x-large",direction:"horizontal"}),h("duet-button",{ref:function(o){return e.setDataAttributes(o,t)},theme:e.theme,id:t.id,class:"duet-footer-link",variation:"plain",margin:"none",fixed:true,negative:true,url:t.href,external:t.external,icon:((i=t.href)===null||i===void 0?void 0:i.startsWith("tel:"))?"form-tel":((r=t.href)===null||r===void 0?void 0:r.startsWith("mailto:"))?"navigation-message":"navigation-arrow-right","icon-right":!((n=t.href)===null||n===void 0?void 0:n.startsWith("tel:"))&&!((a=t.href)===null||a===void 0?void 0:a.startsWith("mailto:")),"icon-size":((d=t.href)===null||d===void 0?void 0:d.startsWith("tel:"))||((u=t.href)===null||u===void 0?void 0:u.startsWith("mailto:"))?"medium":"medium-small",onClick:function(o){return e.handleItemClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},t.label))}))))),h("slot",{key:"3108d57df772399e2ec83e3819a277cf877f5898",name:"extra"}),h("p",{key:"ea96247cc266efc7e209acc8281b7a207b6d8ab1",class:"duet-footer-menu",part:"menu"},h("span",{key:"6f10b09142cf13f2168c4d1a37f6784167fff1f7",class:"duet-footer-copyright"},"".concat(o," ").concat((new Date).getFullYear())),h("span",{key:"def1a300fe8794d3ac068b575a0e74343ddcf53d",class:"duet-footer-menu-links"},this.processedMenu&&h(Fragment,{key:"88c8f59560a9d329cebcd88a6bae635a63e95681"},this.processedMenu.map((function(t){return h("a",{ref:function(o){return e.setDataAttributes(o,t)},href:t.href,id:t.id,target:t.external?"_blank":"_self",onClick:function(o){return e.handleMenuClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},t.label,t.external&&h(Fragment,null,h("duet-visually-hidden",null,", ",e.accessibleLabelExternal),h("span",{class:"duet-footer-external"},h("duet-icon",{icon:actionNewWindowSmall.svg,size:"xx-small",margin:"none",color:"currentColor"}))),h("span",{class:"duet-footer-divider",role:"presentation","aria-hidden":"true"},"/"))}))))),h("p",{key:"121abcf17a5b8eb8f04e3c8ee2ffef57d725c8aa",class:"duet-footer-copyright duet-footer-copyright-mobile"},"".concat(o," ").concat((new Date).getFullYear()))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{menu:["refresh"],items:["refresh"]}},enumerable:false,configurable:true});return e}();DuetFooter.style=DuetFooterStyle0;export{DuetFooter as duet_footer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,i,n,e){function d(t){return t instanceof n?t:new n((function(i){i(t)}))}return new(n||(n=Promise))((function(n,r){function a(t){try{m(e.next(t))}catch(t){r(t)}}function o(t){try{m(e["throw"](t))}catch(t){r(t)}}function m(t){t.done?n(t.value):d(t.value).then(a,o)}m((e=e.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,d,r,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(t){return function(i){return m([t,i])}}function m(o){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(n=0)),n)try{if(e=1,d&&(r=o[0]&2?d["return"]:o[0]?d["throw"]||((r=d["return"])&&r.call(d),0):d.next)&&!(r=r.call(d,o[1])).done)return r;if(d=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;d=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1];r=o;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(o);break}if(r[2])n.ops.pop();n.trys.pop();continue}o=i.call(t,n)}catch(t){o=[6,t];d=0}finally{e=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{r as registerInstance,h,H as Host,g as getElement}from"./index-5a27eaf5.js";import{a as media_query_large,m as media_query_medium,b as media_query_small}from"./tokens-84fb2357.js";import{w as watchForOptions,a as watchForElement}from"./watch-options-e96ecd92.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";var duetGridCss=":host {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n -moz-appearance: none;\n -webkit-appearance: none;\n appearance: none;\n}\n\n:host(.duet-grid-variation-flex) {\n display: flex !important;\n flex-direction: column !important;\n align-items: flex-start !important;\n justify-content: flex-start !important;\n width: 100%;\n max-width: 100%;\n height: auto;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small) {\n flex-direction: row !important;\n}\n@media (max-width: 22.5em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-small) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-small.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-medium) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-medium.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-large) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-large.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-large) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-large.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-wrap) {\n flex-wrap: wrap !important;\n}\n\n:host(.duet-grid-variation-flex.duet-no-stacking) {\n flex-direction: row !important;\n}\n\n:host(.duet-grid-variation-flex.duet-no-stacking.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n}\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-small) {\n flex-direction: column !important;\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-medium) {\n flex-direction: column !important;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-medium) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-large) {\n flex-direction: column !important;\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-large) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-large) {\n flex-direction: column !important;\n}\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-large) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-top.duet-no-stacking) {\n align-items: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-no-stacking) {\n align-items: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-center.duet-no-stacking) {\n align-items: center !important;\n}\n\n.duet-grid-align-stretch.duet-no-stacking {\n align-items: stretch !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-no-stacking) {\n align-items: baseline !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-x-small) {\n align-items: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-x-small) {\n align-items: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-x-small) {\n align-items: center !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-x-small) {\n align-items: stretch !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-x-small) {\n align-items: baseline !important;\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-small) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-small) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-small) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-small) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-small) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-medium) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-medium) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-medium) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-medium) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-medium) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-large) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-large) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-large) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-large) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-large) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-x-large) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-x-large) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-x-large) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-x-large) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-x-large) {\n align-items: baseline !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-left) {\n justify-content: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-right) {\n justify-content: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-center) {\n justify-content: center !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-between) {\n justify-content: space-between !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-around) {\n justify-content: space-around !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-evenly) {\n justify-content: space-evenly !important;\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-left) {\n align-items: flex-start !important;\n justify-content: flex-start !important;\n text-align: left !important;\n }\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-center) {\n align-items: center !important;\n justify-content: center !important;\n text-align: center !important;\n }\n :host(.duet-grid-variation-flex.duet-grid-mobile-center) * {\n text-align: center !important;\n }\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-right) {\n align-items: flex-end !important;\n justify-content: flex-end !important;\n text-align: right !important;\n }\n :host(.duet-grid-variation-flex.duet-grid-mobile-right) * {\n text-align: right !important;\n }\n}\n\n:host(.duet-grid-variation-grid) {\n display: grid;\n grid-template-rows: repeat(1, 1fr);\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: 16px;\n align-items: flex-start;\n justify-content: center;\n padding: 0 20px;\n container-type: inline-size;\n overflow-x: clip;\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-grid) {\n gap: 24px;\n padding: 0 40px;\n }\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(8, 55px);\n gap: 24px 32px;\n padding: 0;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(12, minmax(0, 1fr));\n padding: 0 64px;\n }\n}\n@media (min-width: 76.25em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(12, 55px);\n gap: 40px;\n padding: 0;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 3/span 8;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 2/span 10;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 12;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 9/span 4;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 5/span 8;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 6;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 5/span 4;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 7/span 6;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 5/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 9/span 4;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n grid-template-columns: minmax(0, 1fr);\n gap: 12px;\n padding: 0;\n /* stylelint-disable */\n /* stylelint-disable */\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n gap: 16px;\n }\n}\n@container (min-width: 664px) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n /* stylelint-enable */\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n@container (min-width: 1100px) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n /* stylelint-enable */\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n}";var DuetGridStyle0=duetGridCss;function isGridItem(t){return t.tagName.toLowerCase()==="duet-grid-item"}var DuetGrid=function(){function t(t){registerInstance(this,t);this.mql=[window.matchMedia(media_query_large.replace(/'/g,"")),window.matchMedia(media_query_medium.replace(/'/g,"")),window.matchMedia(media_query_small.replace(/'/g,""))];this.distributeFormElement=false;this.responsive=false;this.breakpoint="small";this.direction="horizontal";this.rowReverse=false;this.alignment="top";this.distribution="default";this.mobile="";this.gridTemplate=null}t.prototype.outerHeight=function(t){var i=t.offsetHeight,n=window.getComputedStyle(t);return["top","bottom"].map((function(t){return parseInt(n["margin-".concat(t)])})).reduce((function(t,i){return t+i}),i)};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,i;var n=this;return __generator(this,(function(e){t=this.element;this.distributeFormElement=this.alignment==="form_distribute";this.mutationO=watchForOptions(t,"duet-grid-item",(function(){n.updateGridItems()}));if(this.distributeFormElement){this.mutation1=watchForElement(t,"duet-input",(function(){n.updateGridItemsWithInputFields()}));for(i=0;i<this.mql.length;i++){if(this.mql[i].addEventListener){this.mql[i].addEventListener("change",this.updateGridItemsWithInputFields.bind(this))}}}this.updateGridItems();return[2]}))}))};t.prototype.disconnectedCallback=function(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}if(this.mutation1){this.mutation1.disconnect();this.mutation1=undefined}for(var t=0;t<this.mql.length;t++){if(this.mql[t].removeEventListener){this.mql[t].removeEventListener("change",this.updateGridItemsWithInputFields.bind(this))}}};t.prototype.updateGridItems=function(){return __awaiter(this,void 0,void 0,(function(){var t;var i=this;return __generator(this,(function(n){t=Array.from(this.element.children).filter(isGridItem);t.forEach((function(t){t.responsive=i.responsive;t.breakpoint=i.breakpoint;t.direction=i.direction;t.rowReverse=i.rowReverse}));return[2]}))}))};t.prototype.updateGridItemsWithInputFields=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,n,e;var d=this;return __generator(this,(function(r){t=Array.from(this.element.children).filter(isGridItem);i=window?window.getComputedStyle(this.element).flexDirection==="column":false;n=0;e=[];t.forEach((function(t){var i=t.querySelector("span.duet-input-error");var n=i?d.outerHeight(i):0;e.push(n)}));n=Math.max.apply(Math,e);t.forEach((function(t){var e=t.querySelector("span.duet-input-error");var r=e?d.outerHeight(e):0;if(r<n&&!i){t.setAttribute("style","padding-bottom: ".concat(n-r,"px;"))}else if(r===n||i){t.setAttribute("style","padding-bottom: 0px;")}}));return[2]}))}))};t.prototype.render=function(){var t;return h(Host,{key:"61087a3ab642d3184a0cb007b0903780e021d05b",class:(t={"duet-grid":true,"duet-no-stacking":!this.responsive,"duet-grid-align-top":this.alignment==="top","duet-grid-align-bottom":this.alignment==="bottom"||this.alignment==="form_distribute","duet-grid-align-center":this.alignment==="center","duet-grid-align-stretch":this.alignment==="stretch","duet-grid-align-baseline":this.alignment==="baseline","duet-grid-distribution-left":this.distribution==="left","duet-grid-distribution-right":this.distribution==="right","duet-grid-distribution-center":this.distribution==="center","duet-grid-distribution-between":this.distribution==="space-between","duet-grid-distribution-around":this.distribution==="space-around","duet-grid-distribution-evenly":this.distribution==="space-evenly","duet-grid-mobile-left":this.mobile==="left","duet-grid-mobile-center":this.mobile==="center","duet-grid-mobile-right":this.mobile==="right","duet-grid-direction-horizontal":this.direction==="horizontal","duet-grid-direction-vertical":this.direction==="vertical","duet-grid-breakpoint-x-small":this.breakpoint==="x-small","duet-grid-breakpoint-small":this.breakpoint==="small","duet-grid-breakpoint-medium":this.breakpoint==="medium","duet-grid-breakpoint-large":this.breakpoint==="large","duet-grid-breakpoint-x-large":this.breakpoint==="x-large","duet-grid-row-reverse":this.rowReverse},t["duet-grid-variation-".concat(this.gridTemplate?"grid":"flex")]=true,t["duet-grid-template-".concat(this.gridTemplate)]=true,t)},h("slot",{key:"47742bf4547f236c38667b70243eba88739ea81d"}))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{responsive:["updateGridItems"],breakpoint:["updateGridItems"],direction:["updateGridItems"]}},enumerable:false,configurable:true});return t}();DuetGrid.style=DuetGridStyle0;var duetGridItemCss=':host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;min-width:0;max-width:100%;flex:0 0 auto;padding-right:8px;padding-left:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:rgb(8, 42, 77)}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):first-child){padding-left:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):first-of-type){padding-left:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):last-child){padding-right:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):last-of-type){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:first-child){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:first-of-type){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:last-child){padding-left:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:last-of-type){padding-left:0}@media (max-width: 35.9375em){:host(.duet-grid-item-responsive){width:100% !important;min-width:0 !important;max-width:100% !important;padding-right:0;padding-left:0}}@media screen and (max-width: 47.9375em){:host(.duet-grid-item-br-medium){width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 47.9375em){:host(.duet-grid-item-responsive.duet-grid-item-br-medium){padding-right:0;padding-left:0}}@media screen and (max-width: 64em){:host(.duet-grid-item-br-x-large){width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 64em){:host(.duet-grid-item-responsive.duet-grid-item-br-x-large){padding-right:0;padding-left:0}}:host(.duet-grid-item-fill){flex:1 1 auto;width:100%}:host(.duet-theme-turva){font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}:host(.duet-m-0){padding:0 !important;margin:0 !important}';var DuetGridItemStyle0=duetGridItemCss;var DuetGridItem=function(){function t(t){registerInstance(this,t);this.fill=false;this.maxWidth=undefined;this.minWidth=undefined;this.theme="";this.margin="auto";this.responsive=false;this.direction="horizontal";this.breakpoint="small";this.rowReverse=false}t.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};t.prototype.render=function(){return h(Host,{key:"10b2af6baec36dcf39e1ea5af5efdef0e279f38f",style:{"min-width":this.minWidth,"max-width":this.maxWidth},class:{"duet-m-0":this.margin==="none","duet-theme-turva":this.theme==="turva","duet-grid-item":true,"duet-grid-item-fill":this.fill,"duet-grid-item-responsive":this.responsive,"duet-grid-item-row-reverse":this.rowReverse,"duet-grid-direction-horizontal":this.direction==="horizontal","duet-grid-direction-vertical":this.direction==="vertical","duet-grid-item-br-x-small":this.breakpoint==="x-small","duet-grid-item-br-small":this.breakpoint==="small","duet-grid-item-br-medium":this.breakpoint==="medium","duet-grid-item-br-large":this.breakpoint==="large","duet-grid-item-br-x-large":this.breakpoint==="x-large"}},h("slot",{key:"d5f3dfa412c5a3bdd7f9082d07f8ae2ca85a2b44"}))};return t}();DuetGridItem.style=DuetGridItemStyle0;export{DuetGrid as duet_grid,DuetGridItem as duet_grid_item};
|
|
4
|
+
*/import{r as registerInstance,h,H as Host,g as getElement}from"./index-fa810c91.js";import{a as media_query_large,m as media_query_medium,b as media_query_small}from"./tokens-84fb2357.js";import{w as watchForOptions,a as watchForElement}from"./watch-options-e96ecd92.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";var duetGridCss=":host {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n -moz-appearance: none;\n -webkit-appearance: none;\n appearance: none;\n}\n\n:host(.duet-grid-variation-flex) {\n display: flex !important;\n flex-direction: column !important;\n align-items: flex-start !important;\n justify-content: flex-start !important;\n width: 100%;\n max-width: 100%;\n height: auto;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small) {\n flex-direction: row !important;\n}\n@media (max-width: 22.5em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-breakpoint-x-small.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-small) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-small.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-medium) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-medium.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-large) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-large.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-large) {\n flex-direction: row !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-breakpoint-x-large.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-wrap) {\n flex-wrap: wrap !important;\n}\n\n:host(.duet-grid-variation-flex.duet-no-stacking) {\n flex-direction: row !important;\n}\n\n:host(.duet-grid-variation-flex.duet-no-stacking.duet-grid-row-reverse) {\n flex-direction: row-reverse !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n}\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-small) {\n flex-direction: column !important;\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-small) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-medium) {\n flex-direction: column !important;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-medium) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-large) {\n flex-direction: column !important;\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-large) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-large) {\n flex-direction: column !important;\n}\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-direction-vertical.duet-grid-breakpoint-x-large) {\n flex-direction: column !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-top.duet-no-stacking) {\n align-items: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-no-stacking) {\n align-items: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-center.duet-no-stacking) {\n align-items: center !important;\n}\n\n.duet-grid-align-stretch.duet-no-stacking {\n align-items: stretch !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-no-stacking) {\n align-items: baseline !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-x-small) {\n align-items: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-x-small) {\n align-items: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-x-small) {\n align-items: center !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-x-small) {\n align-items: stretch !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-x-small) {\n align-items: baseline !important;\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-small) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-small) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-small) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-small) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 36em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-small) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-medium) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-medium) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-medium) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-medium) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 48em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-medium) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-large) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-large) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-large) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-large) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 62em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-large) {\n align-items: baseline !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-top.duet-grid-breakpoint-x-large) {\n align-items: flex-start !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-bottom.duet-grid-breakpoint-x-large) {\n align-items: flex-end !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-center.duet-grid-breakpoint-x-large) {\n align-items: center !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-stretch.duet-grid-breakpoint-x-large) {\n align-items: stretch !important;\n }\n}\n\n@media (min-width: 64.0625em) {\n :host(.duet-grid-variation-flex.duet-grid-align-baseline.duet-grid-breakpoint-x-large) {\n align-items: baseline !important;\n }\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-left) {\n justify-content: flex-start !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-right) {\n justify-content: flex-end !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-center) {\n justify-content: center !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-between) {\n justify-content: space-between !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-around) {\n justify-content: space-around !important;\n}\n\n:host(.duet-grid-variation-flex.duet-grid-distribution-evenly) {\n justify-content: space-evenly !important;\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-left) {\n align-items: flex-start !important;\n justify-content: flex-start !important;\n text-align: left !important;\n }\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-center) {\n align-items: center !important;\n justify-content: center !important;\n text-align: center !important;\n }\n :host(.duet-grid-variation-flex.duet-grid-mobile-center) * {\n text-align: center !important;\n }\n}\n\n@media (max-width: 35.9375em) {\n :host(.duet-grid-variation-flex.duet-grid-mobile-right) {\n align-items: flex-end !important;\n justify-content: flex-end !important;\n text-align: right !important;\n }\n :host(.duet-grid-variation-flex.duet-grid-mobile-right) * {\n text-align: right !important;\n }\n}\n\n:host(.duet-grid-variation-grid) {\n display: grid;\n grid-template-rows: repeat(1, 1fr);\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: 16px;\n align-items: flex-start;\n justify-content: center;\n padding: 0 20px;\n container-type: inline-size;\n overflow-x: clip;\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-grid) {\n gap: 24px;\n padding: 0 40px;\n }\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(8, 55px);\n gap: 24px 32px;\n padding: 0;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(12, minmax(0, 1fr));\n padding: 0 64px;\n }\n}\n@media (min-width: 76.25em) {\n :host(.duet-grid-variation-grid) {\n grid-template-columns: repeat(12, 55px);\n gap: 40px;\n padding: 0;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-small) ::slotted(*) {\n grid-column: 3/span 8;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-medium) ::slotted(*) {\n grid-column: 2/span 10;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-large) ::slotted(*) {\n grid-column: 1/span 12;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-right) ::slotted(:nth-child(even)) {\n grid-column: 9/span 4;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-sidebar-left) ::slotted(:nth-child(even)) {\n grid-column: 5/span 8;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 4;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(odd)) {\n grid-column: 1/span 6;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 5/span 4;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-two-columns) ::slotted(:nth-child(even)) {\n grid-column: 7/span 6;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+1)) {\n grid-column: 1/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+2)) {\n grid-column: 5/span 4;\n }\n}\n:host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 1/span 4;\n}\n@media (min-width: 48em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 1/span 8;\n }\n}\n@media (min-width: 62em) {\n :host(.duet-grid-variation-grid.duet-grid-template-three-columns) ::slotted(:nth-child(3n+3)) {\n grid-column: 9/span 4;\n }\n}\n\n:host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n grid-template-columns: minmax(0, 1fr);\n gap: 12px;\n padding: 0;\n /* stylelint-disable */\n /* stylelint-disable */\n}\n@media (min-width: 36em) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n gap: 16px;\n }\n}\n@container (min-width: 664px) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n /* stylelint-enable */\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n@container (min-width: 1100px) {\n :host(.duet-grid-variation-grid.duet-grid-template-button-grid) {\n /* stylelint-enable */\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n}";var DuetGridStyle0=duetGridCss;function isGridItem(t){return t.tagName.toLowerCase()==="duet-grid-item"}var DuetGrid=function(){function t(t){registerInstance(this,t);this.mql=[window.matchMedia(media_query_large.replace(/'/g,"")),window.matchMedia(media_query_medium.replace(/'/g,"")),window.matchMedia(media_query_small.replace(/'/g,""))];this.distributeFormElement=false;this.responsive=false;this.breakpoint="small";this.direction="horizontal";this.rowReverse=false;this.alignment="top";this.distribution="default";this.mobile="";this.gridTemplate=null}t.prototype.outerHeight=function(t){var i=t.offsetHeight,n=window.getComputedStyle(t);return["top","bottom"].map((function(t){return parseInt(n["margin-".concat(t)])})).reduce((function(t,i){return t+i}),i)};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,i;var n=this;return __generator(this,(function(e){t=this.element;this.distributeFormElement=this.alignment==="form_distribute";this.mutationO=watchForOptions(t,"duet-grid-item",(function(){n.updateGridItems()}));if(this.distributeFormElement){this.mutation1=watchForElement(t,"duet-input",(function(){n.updateGridItemsWithInputFields()}));for(i=0;i<this.mql.length;i++){if(this.mql[i].addEventListener){this.mql[i].addEventListener("change",this.updateGridItemsWithInputFields.bind(this))}}}this.updateGridItems();return[2]}))}))};t.prototype.disconnectedCallback=function(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}if(this.mutation1){this.mutation1.disconnect();this.mutation1=undefined}for(var t=0;t<this.mql.length;t++){if(this.mql[t].removeEventListener){this.mql[t].removeEventListener("change",this.updateGridItemsWithInputFields.bind(this))}}};t.prototype.updateGridItems=function(){return __awaiter(this,void 0,void 0,(function(){var t;var i=this;return __generator(this,(function(n){t=Array.from(this.element.children).filter(isGridItem);t.forEach((function(t){t.responsive=i.responsive;t.breakpoint=i.breakpoint;t.direction=i.direction;t.rowReverse=i.rowReverse}));return[2]}))}))};t.prototype.updateGridItemsWithInputFields=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,n,e;var d=this;return __generator(this,(function(r){t=Array.from(this.element.children).filter(isGridItem);i=window?window.getComputedStyle(this.element).flexDirection==="column":false;n=0;e=[];t.forEach((function(t){var i=t.querySelector("span.duet-input-error");var n=i?d.outerHeight(i):0;e.push(n)}));n=Math.max.apply(Math,e);t.forEach((function(t){var e=t.querySelector("span.duet-input-error");var r=e?d.outerHeight(e):0;if(r<n&&!i){t.setAttribute("style","padding-bottom: ".concat(n-r,"px;"))}else if(r===n||i){t.setAttribute("style","padding-bottom: 0px;")}}));return[2]}))}))};t.prototype.render=function(){var t;return h(Host,{key:"61087a3ab642d3184a0cb007b0903780e021d05b",class:(t={"duet-grid":true,"duet-no-stacking":!this.responsive,"duet-grid-align-top":this.alignment==="top","duet-grid-align-bottom":this.alignment==="bottom"||this.alignment==="form_distribute","duet-grid-align-center":this.alignment==="center","duet-grid-align-stretch":this.alignment==="stretch","duet-grid-align-baseline":this.alignment==="baseline","duet-grid-distribution-left":this.distribution==="left","duet-grid-distribution-right":this.distribution==="right","duet-grid-distribution-center":this.distribution==="center","duet-grid-distribution-between":this.distribution==="space-between","duet-grid-distribution-around":this.distribution==="space-around","duet-grid-distribution-evenly":this.distribution==="space-evenly","duet-grid-mobile-left":this.mobile==="left","duet-grid-mobile-center":this.mobile==="center","duet-grid-mobile-right":this.mobile==="right","duet-grid-direction-horizontal":this.direction==="horizontal","duet-grid-direction-vertical":this.direction==="vertical","duet-grid-breakpoint-x-small":this.breakpoint==="x-small","duet-grid-breakpoint-small":this.breakpoint==="small","duet-grid-breakpoint-medium":this.breakpoint==="medium","duet-grid-breakpoint-large":this.breakpoint==="large","duet-grid-breakpoint-x-large":this.breakpoint==="x-large","duet-grid-row-reverse":this.rowReverse},t["duet-grid-variation-".concat(this.gridTemplate?"grid":"flex")]=true,t["duet-grid-template-".concat(this.gridTemplate)]=true,t)},h("slot",{key:"47742bf4547f236c38667b70243eba88739ea81d"}))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{responsive:["updateGridItems"],breakpoint:["updateGridItems"],direction:["updateGridItems"]}},enumerable:false,configurable:true});return t}();DuetGrid.style=DuetGridStyle0;var duetGridItemCss=':host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;min-width:0;max-width:100%;flex:0 0 auto;padding-right:8px;padding-left:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:rgb(8, 42, 77)}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):first-child){padding-left:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):first-of-type){padding-left:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):last-child){padding-right:0}:host(.duet-grid-direction-horizontal:not(.duet-grid-item-row-reverse):last-of-type){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:first-child){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:first-of-type){padding-right:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:last-child){padding-left:0}:host(.duet-grid-direction-horizontal.duet-grid-item-row-reverse:last-of-type){padding-left:0}@media (max-width: 35.9375em){:host(.duet-grid-item-responsive){width:100% !important;min-width:0 !important;max-width:100% !important;padding-right:0;padding-left:0}}@media screen and (max-width: 47.9375em){:host(.duet-grid-item-br-medium){width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 47.9375em){:host(.duet-grid-item-responsive.duet-grid-item-br-medium){padding-right:0;padding-left:0}}@media screen and (max-width: 64em){:host(.duet-grid-item-br-x-large){width:100% !important;min-width:0 !important;max-width:100% !important}}@media screen and (max-width: 64em){:host(.duet-grid-item-responsive.duet-grid-item-br-x-large){padding-right:0;padding-left:0}}:host(.duet-grid-item-fill){flex:1 1 auto;width:100%}:host(.duet-theme-turva){font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}:host(.duet-m-0){padding:0 !important;margin:0 !important}';var DuetGridItemStyle0=duetGridItemCss;var DuetGridItem=function(){function t(t){registerInstance(this,t);this.fill=false;this.maxWidth=undefined;this.minWidth=undefined;this.theme="";this.margin="auto";this.responsive=false;this.direction="horizontal";this.breakpoint="small";this.rowReverse=false}t.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};t.prototype.render=function(){return h(Host,{key:"10b2af6baec36dcf39e1ea5af5efdef0e279f38f",style:{"min-width":this.minWidth,"max-width":this.maxWidth},class:{"duet-m-0":this.margin==="none","duet-theme-turva":this.theme==="turva","duet-grid-item":true,"duet-grid-item-fill":this.fill,"duet-grid-item-responsive":this.responsive,"duet-grid-item-row-reverse":this.rowReverse,"duet-grid-direction-horizontal":this.direction==="horizontal","duet-grid-direction-vertical":this.direction==="vertical","duet-grid-item-br-x-small":this.breakpoint==="x-small","duet-grid-item-br-small":this.breakpoint==="small","duet-grid-item-br-medium":this.breakpoint==="medium","duet-grid-item-br-large":this.breakpoint==="large","duet-grid-item-br-x-large":this.breakpoint==="x-large"}},h("slot",{key:"d5f3dfa412c5a3bdd7f9082d07f8ae2ca85a2b44"}))};return t}();DuetGridItem.style=DuetGridItemStyle0;export{DuetGrid as duet_grid,DuetGridItem as duet_grid_item};
|