@duetds/components 6.4.0 → 6.5.0
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 +120 -118
- package/lib/cjs/duet-action-button.cjs.entry.js +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +1 -1
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
- package/lib/cjs/duet-card.cjs.entry.js +1 -1
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
- package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +1 -1
- package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +1 -1
- package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-menu-bar-button.cjs.entry.js +79 -0
- 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-link.cjs.entry.js +2 -16
- package/lib/cjs/duet-menu-bar.cjs.entry.js +2 -2
- package/lib/cjs/duet-modal.cjs.entry.js +2 -2
- package/lib/cjs/duet-multiselect.cjs.entry.js +1 -1
- package/lib/cjs/duet-nav.cjs.entry.js +1 -1
- package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
- package/lib/cjs/duet-pagination_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-progress.cjs.entry.js +1 -1
- package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-slideout-lang.cjs.entry.js +2 -2
- package/lib/cjs/duet-slideout-link.cjs.entry.js +5 -4
- package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +6 -2
- package/lib/cjs/duet-slideout-panel.cjs.entry.js +5 -4
- package/lib/cjs/duet-slideout.cjs.entry.js +18 -7
- 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-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 +1 -1
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- 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-link.cjs.entry.js +1 -1
- package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
- package/lib/cjs/duet-tray.cjs.entry.js +1 -1
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +2 -2
- package/lib/cjs/{focus-utils-2b652cc4.js → focus-utils-91717ff5.js} +1 -1
- package/lib/cjs/{index-164ccd93.js → index-5a5b5fb6.js} +1 -1
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/collection/collection-manifest.json +1 -2
- package/lib/collection/components/duet-menu-bar/duet-menu-bar.css +22 -0
- package/lib/collection/components/{duet-slideout-panel-link/duet-slideout-panel-link.css → duet-menu-bar-button/duet-menu-bar-button.css} +23 -13
- package/lib/collection/components/duet-menu-bar-button/duet-menu-bar-button.js +156 -0
- package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.css +6 -33
- package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.js +0 -14
- package/lib/collection/components/duet-slideout/duet-slideout.css +27 -34
- package/lib/collection/components/duet-slideout/duet-slideout.js +45 -5
- package/lib/collection/components/duet-slideout-lang/duet-slideout-lang.css +1 -0
- package/lib/collection/components/duet-slideout-link/duet-slideout-link.css +9 -7
- package/lib/collection/components/duet-slideout-link/duet-slideout-link.js +27 -5
- package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.css +35 -5
- package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.js +20 -1
- package/lib/collection/components/duet-slideout-panel-dropdown/duet-slideout-panel-dropdown.css +21 -5
- package/lib/collection/components/duet-slideout-panel-dropdown/duet-slideout-panel-dropdown.js +4 -0
- 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-breadcrumb.js +2 -2
- package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
- package/lib/dist-custom-elements/duet-button.js +1 -1
- 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-choice-group.js +6 -6
- package/lib/dist-custom-elements/duet-choice.js +5 -5
- package/lib/dist-custom-elements/duet-collapsible.js +2 -2
- package/lib/dist-custom-elements/duet-combobox.js +2 -2
- package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
- package/lib/dist-custom-elements/duet-date-picker.js +8 -8
- package/lib/dist-custom-elements/duet-divider.js +1 -1
- package/lib/dist-custom-elements/duet-editable-table.js +1 -1
- 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-footer.js +4 -4
- 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 +1 -1
- 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.d.ts +11 -0
- package/lib/dist-custom-elements/duet-menu-bar-button.js +104 -0
- 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-link.js +3 -17
- package/lib/dist-custom-elements/duet-menu-bar.js +3 -3
- package/lib/dist-custom-elements/duet-modal.js +7 -7
- 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 +7 -7
- package/lib/dist-custom-elements/duet-pagination.js +7 -7
- package/lib/dist-custom-elements/duet-paragraph.js +1 -1
- package/lib/dist-custom-elements/duet-progress.js +1 -1
- package/lib/dist-custom-elements/duet-radio-group.js +6 -6
- package/lib/dist-custom-elements/duet-radio.js +1 -1
- package/lib/dist-custom-elements/duet-range-slider.js +2 -2
- 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 +1 -1
- package/lib/dist-custom-elements/duet-select.js +1 -1
- package/lib/dist-custom-elements/duet-slideout-lang.js +4 -4
- package/lib/dist-custom-elements/duet-slideout-link.js +8 -6
- package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +7 -3
- package/lib/dist-custom-elements/duet-slideout-panel.js +6 -4
- package/lib/dist-custom-elements/duet-slideout.js +19 -7
- 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-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-link.js +2 -2
- package/lib/dist-custom-elements/duet-submenu-bar.js +2 -2
- package/lib/dist-custom-elements/duet-tab-group.js +8 -8
- 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 +8 -8
- package/lib/dist-custom-elements/duet-toggle.js +2 -2
- 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-link.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar.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.js +18 -18
- package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
- package/lib/dist-custom-elements/index.d.ts +1 -2
- package/lib/dist-custom-elements/index.js +2 -3
- package/lib/dist-custom-elements/{p-9ead813e.js → p-0e46bc2c.js} +4 -4
- package/lib/dist-custom-elements/{p-154a3f1c.js → p-1772b598.js} +1 -1
- package/lib/dist-custom-elements/{p-ff6fc54f.js → p-1b31e0ac.js} +1 -1
- package/lib/dist-custom-elements/{p-7cb3ff25.js → p-1e3f421f.js} +1 -1
- package/lib/dist-custom-elements/{p-5f1ada5a.js → p-22b0a23d.js} +1 -1
- package/lib/dist-custom-elements/{p-c2463a4d.js → p-26fb2022.js} +1 -1
- package/lib/dist-custom-elements/{p-2836cc93.js → p-4804e790.js} +6 -6
- package/lib/dist-custom-elements/{p-322d1aa1.js → p-4f709f28.js} +3 -3
- package/lib/dist-custom-elements/{p-979e0325.js → p-5ac75d16.js} +1 -1
- package/lib/dist-custom-elements/{p-b4d8113c.js → p-6709c2d5.js} +1 -1
- package/lib/dist-custom-elements/{p-4e60ac5b.js → p-6b914cdc.js} +3 -3
- package/lib/dist-custom-elements/{p-882a5cfe.js → p-6f9f5b04.js} +3 -3
- package/lib/dist-custom-elements/{p-1fdcf20f.js → p-7266af0a.js} +1 -1
- package/lib/dist-custom-elements/{p-605b6117.js → p-7c5907e5.js} +6 -6
- package/lib/dist-custom-elements/{p-bd2b0442.js → p-86994a58.js} +1 -1
- package/lib/dist-custom-elements/{p-5ebb99dd.js → p-9038500b.js} +5 -5
- package/lib/dist-custom-elements/{p-4516d226.js → p-9041d5c6.js} +7 -7
- package/lib/dist-custom-elements/{p-d0e0ef81.js → p-97f674f0.js} +2 -2
- package/lib/dist-custom-elements/{p-905a69b9.js → p-9b3047d2.js} +1 -1
- package/lib/dist-custom-elements/{p-7f93146e.js → p-a213fc78.js} +1 -1
- package/lib/dist-custom-elements/{p-a9ca4b1a.js → p-a3d1df89.js} +1 -1
- package/lib/dist-custom-elements/{p-0046bd9c.js → p-b34f2a20.js} +2 -2
- package/lib/dist-custom-elements/{p-3e96f1ea.js → p-b7a2cf37.js} +1 -1
- package/lib/dist-custom-elements/{p-ad412049.js → p-c7567c65.js} +1 -1
- package/lib/dist-custom-elements/{p-66c822ff.js → p-ca879759.js} +2 -2
- package/lib/dist-custom-elements/{p-5bcd669c.js → p-cab9eb97.js} +2 -2
- package/lib/dist-custom-elements/{p-671e7f8b.js → p-d36aab71.js} +1 -1
- package/lib/dist-custom-elements/{p-6be9ba98.js → p-d501f01d.js} +1 -1
- package/lib/dist-custom-elements/{p-69e61cbd.js → p-e7845c13.js} +1 -1
- package/lib/dist-custom-elements/{p-d2401c36.js → p-f3b86e69.js} +2 -2
- package/lib/dist-custom-elements/{p-532c54fb.js → p-f61f0fcc.js} +1 -1
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-246da892.entry.js → p-0127ce48.entry.js} +1 -1
- package/lib/duet/p-03c351bf.js +4 -0
- package/lib/duet/{p-cd9d47f5.system.entry.js → p-04263611.system.entry.js} +1 -1
- package/lib/duet/{p-21124c1f.entry.js → p-04a3dfa0.entry.js} +1 -1
- package/lib/duet/p-04d51c20.entry.js +4 -0
- package/lib/duet/{p-1317aa26.system.entry.js → p-06657f21.system.entry.js} +1 -1
- package/lib/duet/p-071f0c01.system.entry.js +4 -0
- package/lib/duet/{p-c40ee0fe.js → p-08219217.js} +1 -1
- package/lib/duet/{p-56c12873.system.entry.js → p-08a74979.system.entry.js} +1 -1
- package/lib/duet/{p-ba5d5cd0.entry.js → p-0a7c904c.entry.js} +1 -1
- package/lib/duet/{p-6953d6e1.entry.js → p-0c15b8bb.entry.js} +1 -1
- package/lib/duet/{p-5cd03fcc.system.entry.js → p-0f31e470.system.entry.js} +1 -1
- package/lib/duet/{p-a87d96ef.entry.js → p-10596532.entry.js} +1 -1
- package/lib/duet/{p-836893af.system.entry.js → p-158837f1.system.entry.js} +1 -1
- package/lib/duet/p-1863f126.system.entry.js +4 -0
- package/lib/duet/{p-28e309cf.entry.js → p-1b594ed7.entry.js} +1 -1
- package/lib/duet/{p-729b0d66.system.entry.js → p-1b6b316a.system.entry.js} +1 -1
- package/lib/duet/{p-e18b47a1.entry.js → p-1b6c34b9.entry.js} +1 -1
- package/lib/duet/{p-6d4cfcb6.entry.js → p-1b80ae9f.entry.js} +1 -1
- package/lib/duet/{p-e7bdc3e3.entry.js → p-1bbf4ae6.entry.js} +1 -1
- package/lib/duet/{p-3bbf5056.entry.js → p-1d83148d.entry.js} +1 -1
- package/lib/duet/{p-5e330ea8.entry.js → p-1df84690.entry.js} +1 -1
- package/lib/duet/{p-27a4c915.entry.js → p-1df9e04d.entry.js} +1 -1
- package/lib/duet/{p-c6780fab.entry.js → p-1e0269a9.entry.js} +1 -1
- package/lib/duet/p-1e27b8b3.system.entry.js +4 -0
- package/lib/duet/{p-f4b76c99.system.entry.js → p-20c58c8b.system.entry.js} +1 -1
- package/lib/duet/p-22e118f2.entry.js +4 -0
- package/lib/duet/{p-1754b0d2.entry.js → p-23300bbc.entry.js} +1 -1
- package/lib/duet/{p-a5a295c0.system.entry.js → p-28257788.system.entry.js} +1 -1
- package/lib/duet/{p-b16d25ab.entry.js → p-2c1c686d.entry.js} +1 -1
- package/lib/duet/p-2efa4bb4.system.entry.js +4 -0
- package/lib/duet/{p-c69632a2.system.entry.js → p-313b153a.system.entry.js} +1 -1
- package/lib/duet/{p-b294e39d.system.entry.js → p-3147ad7d.system.entry.js} +1 -1
- package/lib/duet/{p-2edff55b.entry.js → p-37d39983.entry.js} +1 -1
- package/lib/duet/{p-29f05da5.system.entry.js → p-38524ca2.system.entry.js} +1 -1
- package/lib/duet/{p-aa7238b4.system.entry.js → p-3ba892fc.system.entry.js} +1 -1
- package/lib/duet/{p-25ae871d.system.entry.js → p-426eb658.system.entry.js} +1 -1
- package/lib/duet/{p-1b441904.system.entry.js → p-45ed2dcd.system.entry.js} +1 -1
- package/lib/duet/{p-ebf1699f.system.entry.js → p-4680e39d.system.entry.js} +1 -1
- package/lib/duet/{p-ac049db3.entry.js → p-4817aff7.entry.js} +1 -1
- package/lib/duet/{p-51cab7d1.system.entry.js → p-4989c194.system.entry.js} +1 -1
- package/lib/duet/{p-0a343e6c.system.entry.js → p-5021b17f.system.entry.js} +1 -1
- package/lib/duet/{p-e798f1ed.system.entry.js → p-54c11f40.system.entry.js} +1 -1
- package/lib/duet/{p-b0b27e49.entry.js → p-5519f08b.entry.js} +1 -1
- package/lib/duet/p-56f86438.system.js +4 -0
- package/lib/duet/{p-26fa8de6.entry.js → p-590f0cd4.entry.js} +1 -1
- package/lib/duet/{p-d79ac44b.system.entry.js → p-59a58ae9.system.entry.js} +1 -1
- package/lib/duet/p-5adfe2ac.system.entry.js +4 -0
- package/lib/duet/{p-4c71d0e1.entry.js → p-5db551e7.entry.js} +1 -1
- package/lib/duet/{p-e968004c.entry.js → p-6003ca10.entry.js} +1 -1
- package/lib/duet/{p-6af671d6.system.js → p-601cc7ed.system.js} +1 -1
- package/lib/duet/{p-af157cd4.system.entry.js → p-613320e2.system.entry.js} +1 -1
- package/lib/duet/{p-3117deb6.entry.js → p-613e6a9a.entry.js} +1 -1
- package/lib/duet/{p-f8f307f4.system.entry.js → p-61a73f4c.system.entry.js} +1 -1
- package/lib/duet/{p-be05eaac.system.entry.js → p-62523c5e.system.entry.js} +1 -1
- package/lib/duet/{p-38dc7f9b.entry.js → p-6663ee53.entry.js} +1 -1
- package/lib/duet/{p-72d0199b.system.entry.js → p-67e31104.system.entry.js} +1 -1
- package/lib/duet/{p-9b2b98f1.entry.js → p-682c835a.entry.js} +1 -1
- package/lib/duet/{p-a140fdcb.system.entry.js → p-68a49822.system.entry.js} +1 -1
- package/lib/duet/{p-129bb559.system.entry.js → p-6be4b41a.system.entry.js} +1 -1
- package/lib/duet/{p-09438348.entry.js → p-6c8a4d6d.entry.js} +1 -1
- package/lib/duet/{p-cf9c0ba9.entry.js → p-6f22bbbe.entry.js} +1 -1
- package/lib/duet/{p-a3d9704b.system.entry.js → p-7261288d.system.entry.js} +1 -1
- package/lib/duet/{p-1f202456.system.entry.js → p-742ad989.system.entry.js} +1 -1
- package/lib/duet/{p-6917abaf.entry.js → p-7629e252.entry.js} +1 -1
- package/lib/duet/{p-9d2eddb6.entry.js → p-7712404e.entry.js} +1 -1
- package/lib/duet/{p-ce29e9a8.system.entry.js → p-783b5f4b.system.entry.js} +1 -1
- package/lib/duet/{p-a205042e.system.entry.js → p-7b2c1d94.system.entry.js} +1 -1
- package/lib/duet/{p-15739a81.system.entry.js → p-7c982e4b.system.entry.js} +1 -1
- package/lib/duet/{p-3ff9ea7b.entry.js → p-81852379.entry.js} +1 -1
- package/lib/duet/{p-047f5071.system.entry.js → p-81d37c17.system.entry.js} +1 -1
- package/lib/duet/{p-2052a736.entry.js → p-8654ea51.entry.js} +1 -1
- package/lib/duet/{p-46c1d349.system.entry.js → p-8933bd6c.system.entry.js} +1 -1
- package/lib/duet/{p-1373f6ca.entry.js → p-8a99c10b.entry.js} +1 -1
- package/lib/duet/{p-a9465ece.system.entry.js → p-8af2618e.system.entry.js} +1 -1
- package/lib/duet/{p-651fafda.system.entry.js → p-8bf6bbdf.system.entry.js} +1 -1
- package/lib/duet/p-8c6d4c6b.system.entry.js +4 -0
- package/lib/duet/{p-3e278513.entry.js → p-8cb76b58.entry.js} +1 -1
- package/lib/duet/p-8cd0074b.entry.js +4 -0
- package/lib/duet/{p-2eb091c9.system.entry.js → p-8cf5421a.system.entry.js} +1 -1
- package/lib/duet/{p-3cf79f67.system.entry.js → p-91636321.system.entry.js} +1 -1
- package/lib/duet/{p-ff5d1690.entry.js → p-94618159.entry.js} +1 -1
- package/lib/duet/{p-4235cfd4.entry.js → p-9569e6a7.entry.js} +1 -1
- package/lib/duet/{p-68837c63.entry.js → p-9864dd9e.entry.js} +1 -1
- package/lib/duet/p-9903eb4f.system.entry.js +4 -0
- package/lib/duet/{p-020ca1b6.system.entry.js → p-9d12c99f.system.entry.js} +1 -1
- package/lib/duet/{p-80129dd8.entry.js → p-9e792bdc.entry.js} +1 -1
- package/lib/duet/{p-8810b6a2.entry.js → p-a454c2b7.entry.js} +1 -1
- package/lib/duet/{p-83d8e53e.system.entry.js → p-a633d2ad.system.entry.js} +1 -1
- package/lib/duet/{p-0fc9f792.entry.js → p-a69712cf.entry.js} +1 -1
- package/lib/duet/{p-ce68689b.entry.js → p-a7dec361.entry.js} +1 -1
- package/lib/duet/{p-f7391f5a.system.entry.js → p-a947aafd.system.entry.js} +2 -2
- package/lib/duet/p-a96a177f.entry.js +4 -0
- package/lib/duet/{p-03ff3ed6.system.entry.js → p-a9b3ad66.system.entry.js} +2 -2
- package/lib/duet/p-aa4d9b23.entry.js +4 -0
- package/lib/duet/{p-602376c0.system.entry.js → p-add7f641.system.entry.js} +1 -1
- package/lib/duet/{p-7dfd3e05.entry.js → p-ae9bbd6d.entry.js} +1 -1
- package/lib/duet/{p-e6f05953.system.entry.js → p-b0e5927f.system.entry.js} +1 -1
- package/lib/duet/{p-448aa1de.system.entry.js → p-b2d2ab88.system.entry.js} +1 -1
- package/lib/duet/{p-d6ecfe56.system.entry.js → p-b6c553e1.system.entry.js} +1 -1
- package/lib/duet/{p-e0a8bb43.entry.js → p-b9e25d51.entry.js} +1 -1
- package/lib/duet/{p-a360fd9e.system.entry.js → p-bc6be1c8.system.entry.js} +1 -1
- package/lib/duet/{p-88822dbd.system.entry.js → p-bdec8e3b.system.entry.js} +1 -1
- package/lib/duet/{p-f3e34507.entry.js → p-be3f2b2d.entry.js} +1 -1
- package/lib/duet/{p-f68637c0.entry.js → p-c2b81607.entry.js} +1 -1
- package/lib/duet/{p-42733735.entry.js → p-c466d748.entry.js} +1 -1
- package/lib/duet/{p-3526ba4d.system.entry.js → p-c5a51107.system.entry.js} +1 -1
- package/lib/duet/{p-e8a0df5a.entry.js → p-c791e6a4.entry.js} +1 -1
- package/lib/duet/{p-ecc5f30c.entry.js → p-ca0a286e.entry.js} +1 -1
- package/lib/duet/{p-6d8e829d.entry.js → p-cc28ff9e.entry.js} +1 -1
- package/lib/duet/{p-76835261.system.entry.js → p-cdd084c6.system.entry.js} +1 -1
- package/lib/duet/{p-02332064.entry.js → p-ce7ffc0e.entry.js} +1 -1
- package/lib/duet/{p-933f25ba.entry.js → p-cedd3eb4.entry.js} +1 -1
- package/lib/duet/{p-e788148c.entry.js → p-cf2207c3.entry.js} +1 -1
- package/lib/duet/{p-43c7a428.system.entry.js → p-cf62ea4b.system.entry.js} +1 -1
- package/lib/duet/{p-c3a7e038.system.entry.js → p-d0bc8d40.system.entry.js} +1 -1
- package/lib/duet/{p-3782e7bd.system.js → p-d40c59fd.system.js} +1 -1
- package/lib/duet/{p-831f1019.system.entry.js → p-daa2fb6c.system.entry.js} +1 -1
- package/lib/duet/{p-48e43d00.entry.js → p-db5b5696.entry.js} +1 -1
- package/lib/duet/{p-201d6ec1.system.entry.js → p-dce7becd.system.entry.js} +1 -1
- package/lib/duet/{p-12cdb87f.entry.js → p-dd167a8a.entry.js} +1 -1
- package/lib/duet/{p-4a282246.system.entry.js → p-e00149ea.system.entry.js} +1 -1
- package/lib/duet/{p-d25b4394.entry.js → p-e456ee37.entry.js} +1 -1
- package/lib/duet/{p-ea91bf03.system.entry.js → p-eb9681e7.system.entry.js} +1 -1
- package/lib/duet/{p-7c34ca99.system.entry.js → p-ecbe9c68.system.entry.js} +1 -1
- package/lib/duet/p-ecce887f.entry.js +4 -0
- package/lib/duet/{p-954415a2.entry.js → p-ee21e6b2.entry.js} +1 -1
- package/lib/duet/{p-27103116.entry.js → p-f02dcba6.entry.js} +1 -1
- package/lib/duet/{p-363d64ad.entry.js → p-fdd7fa66.entry.js} +1 -1
- package/lib/duet/{p-0aa05098.entry.js → p-fe1f5f17.entry.js} +1 -1
- package/lib/duet/p-ffa9c9da.system.entry.js +4 -0
- package/lib/esm/duet-action-button.entry.js +1 -1
- package/lib/esm/duet-alert.entry.js +1 -1
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-breadcrumb.entry.js +1 -1
- package/lib/esm/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +1 -1
- package/lib/esm/duet-caption_4.entry.js +1 -1
- package/lib/esm/duet-card.entry.js +1 -1
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +2 -2
- package/lib/esm/duet-collapsible.entry.js +1 -1
- package/lib/esm/duet-combobox.entry.js +1 -1
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +2 -2
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table_3.entry.js +1 -1
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +1 -1
- package/lib/esm/duet-grid_2.entry.js +1 -1
- package/lib/esm/duet-header_2.entry.js +1 -1
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +1 -1
- package/lib/esm/duet-input_2.entry.js +1 -1
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-menu-bar-button.entry.js +75 -0
- 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-link.entry.js +2 -16
- package/lib/esm/duet-menu-bar.entry.js +2 -2
- package/lib/esm/duet-modal.entry.js +2 -2
- package/lib/esm/duet-multiselect.entry.js +1 -1
- package/lib/esm/duet-nav.entry.js +1 -1
- package/lib/esm/duet-notification_2.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +1 -1
- package/lib/esm/duet-pagination_2.entry.js +1 -1
- package/lib/esm/duet-progress.entry.js +1 -1
- package/lib/esm/duet-radio_2.entry.js +1 -1
- package/lib/esm/duet-range-slider.entry.js +1 -1
- package/lib/esm/duet-scrollable_3.entry.js +1 -1
- package/lib/esm/duet-section-layout.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +1 -1
- package/lib/esm/duet-slideout-lang.entry.js +2 -2
- package/lib/esm/duet-slideout-link.entry.js +5 -4
- package/lib/esm/duet-slideout-panel-dropdown.entry.js +6 -2
- package/lib/esm/duet-slideout-panel.entry.js +5 -4
- package/lib/esm/duet-slideout.entry.js +18 -7
- 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-link.entry.js +1 -1
- package/lib/esm/duet-submenu-bar.entry.js +1 -1
- package/lib/esm/duet-textarea.entry.js +1 -1
- package/lib/esm/duet-toggle.entry.js +1 -1
- 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-link.entry.js +1 -1
- package/lib/esm/duet-toolbar.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +1 -1
- package/lib/esm/duet-tray.entry.js +1 -1
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +2 -2
- package/lib/esm/{focus-utils-2902ad62.js → focus-utils-5c59278b.js} +1 -1
- package/lib/esm/{index-2315b38f.js → index-1279f177.js} +1 -1
- package/lib/esm/loader.js +2 -2
- 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-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-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-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-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-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 +4 -0
- 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-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-pagination_2.entry.js +1 -1
- package/lib/esm-es5/duet-progress.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-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 +2 -2
- 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-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-link.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar.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-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{focus-utils-2902ad62.js → focus-utils-5c59278b.js} +1 -1
- package/lib/esm-es5/{index-2315b38f.js → index-1279f177.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/types/components/{duet-slideout-panel-link/duet-slideout-panel-link.d.ts → duet-menu-bar-button/duet-menu-bar-button.d.ts} +13 -9
- package/lib/types/components/duet-menu-bar-link/duet-menu-bar-link.d.ts +0 -1
- package/lib/types/components/duet-slideout/duet-slideout.d.ts +5 -1
- package/lib/types/components/duet-slideout-link/duet-slideout-link.d.ts +6 -1
- package/lib/types/components/duet-slideout-panel/duet-slideout-panel.d.ts +4 -0
- package/lib/types/components.d.ts +52 -92
- package/package.json +5 -5
- package/lib/cjs/duet-slideout-panel-dropdown-link.cjs.entry.js +0 -41
- package/lib/cjs/duet-slideout-panel-link.cjs.entry.js +0 -41
- package/lib/collection/components/duet-slideout-panel-dropdown-link/duet-slideout-panel-dropdown-link.css +0 -47
- package/lib/collection/components/duet-slideout-panel-dropdown-link/duet-slideout-panel-dropdown-link.js +0 -123
- package/lib/collection/components/duet-slideout-panel-link/duet-slideout-panel-link.js +0 -123
- package/lib/dist-custom-elements/duet-slideout-panel-dropdown-link.d.ts +0 -11
- package/lib/dist-custom-elements/duet-slideout-panel-dropdown-link.js +0 -66
- package/lib/dist-custom-elements/duet-slideout-panel-link.d.ts +0 -11
- package/lib/dist-custom-elements/duet-slideout-panel-link.js +0 -66
- package/lib/duet/p-0452c32b.system.entry.js +0 -4
- package/lib/duet/p-0a47a876.entry.js +0 -4
- package/lib/duet/p-29dc425b.system.entry.js +0 -4
- package/lib/duet/p-35d94a81.js +0 -4
- package/lib/duet/p-3c2f1eae.system.entry.js +0 -4
- package/lib/duet/p-6cb90c42.system.entry.js +0 -4
- package/lib/duet/p-70187927.system.js +0 -4
- package/lib/duet/p-77743d03.entry.js +0 -4
- package/lib/duet/p-90530e4b.system.entry.js +0 -4
- package/lib/duet/p-a1dcbcdc.entry.js +0 -4
- package/lib/duet/p-a513fa02.system.entry.js +0 -4
- package/lib/duet/p-b0a49e56.entry.js +0 -4
- package/lib/duet/p-b2e4b3df.system.entry.js +0 -4
- package/lib/duet/p-bc2b248c.entry.js +0 -4
- package/lib/duet/p-c61601cd.system.entry.js +0 -4
- package/lib/duet/p-c832245b.entry.js +0 -4
- package/lib/duet/p-d3a1ec04.entry.js +0 -4
- package/lib/duet/p-dd11bb38.system.entry.js +0 -4
- package/lib/esm/duet-slideout-panel-dropdown-link.entry.js +0 -37
- package/lib/esm/duet-slideout-panel-link.entry.js +0 -37
- package/lib/esm-es5/duet-slideout-panel-dropdown-link.entry.js +0 -4
- package/lib/esm-es5/duet-slideout-panel-link.entry.js +0 -4
- package/lib/types/components/duet-slideout-panel-dropdown-link/duet-slideout-panel-dropdown-link.d.ts +0 -36
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,c as t,h as c,H as i,g as o}from"./p-c40ee0fe.js";import{i as h}from"./p-4ebf1618.js";import{D as d}from"./p-76f00bd5.js";import{c as s}from"./p-c1325e35.js";import{F as a}from"./p-35d94a81.js";import{i as r,h as u,f as n}from"./p-54f35a79.js";import{g as l,a as p}from"./p-ede854e1.js";import{f as b,w as m}from"./p-12721178.js";import"./p-5a9d75e1.js";const g=class{constructor(c){e(this,c),this.duetChange=t(this,"duetChange",7),this.duetFocus=t(this,"duetFocus",7),this.duetBlur=t(this,"duetBlur",7),this.hasHeader=!1,this.choiceId=s("DuetChoice"),this.expandId=s("DuetChoiceExpand"),this.headerId=s("DuetChoiceHeader"),this.infoButtonId=s("DuetChoiceInfoButton"),this.onMouseEnter=()=>{this.isHovering=!0},this.onMouseLeave=()=>{this.isHovering=!1},this.onClick=e=>{this.toggleChecked(e)},this.handleKeyDown=e=>{r(e)&&this.toggleChecked(e),u(e)&&this.hasInfo&&this.toggleInfo()},this.onChange=()=>{this.checked=this.nativeInput.checked||!1,this.duetChange.emit({checked:this.checked,value:this.value,component:"duet-choice"})},this.onBlur=e=>{this.duetBlur.emit({originalEvent:e,checked:this.checked,value:this.value,component:"duet-choice"})},this.onFocus=e=>{this.duetFocus.emit({originalEvent:e,checked:this.checked,value:this.value,component:"duet-choice"})},this.toggleChecked=e=>{e.preventDefault(),e.stopPropagation(),this.disabled||this.groupDisabled||(this.isInfoOpen=!1,"radio"===this.type&&this.checked||(this.checked=!this.checked,this.duetChange.emit({originalEvent:e,checked:this.checked,value:this.value,component:"duet-choice"})))},this.toggleInfo=()=>{this.isInfoOpen=!this.isInfoOpen},this.isHovering=!1,this.isInfoOpen=!1,this.isBlurred=!1,this.theme="",this.label="label",this.accessibleLabelInfoButtonDefaults=d,this.accessibleLabelInfoButton=l(this.accessibleLabelInfoButtonDefaults),this.accessibleActiveDescendant=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.caption="",this.value=void 0,this.type="checkbox",this.name=void 0,this.checked=!1,this.collapsible=!1,this.margin="auto",this.icon="",this.expand=!1,this.padding="auto",this.identifier=void 0,this.groupDirection=void 0,this.groupDisabled=void 0,this.groupResponsive=void 0,this.disabled=!1,this.required=!1,this.infoLabelDefaults={fi:"Lisätietoja",en:"More information about",sv:"Mera information om"},this.infoLabel=l(this.infoLabelDefaults,p())}componentWillLoad(){h(this),this.hasInfo=!!this.element.querySelector("[slot='info']"),this.hasHeader=!!this.element.querySelector('[slot="header"]'),this.hasAdditional=!!this.element.querySelector(":scope > [slot='additional']"),this.hasLabel=!!this.element.querySelector(":scope > [slot='label']"),this.hasBeforeText=!!this.element.querySelector("[slot='before-text']")}handleHostBlur(e){this.hasInfo&&this.isInfoOpen&&this.isKeyDown&&(this.element.contains(null==e?void 0:e.relatedTarget)||this.toggleInfo())}handleHostKeyDown(){this.isKeyDown=!0}handleHostKeyUp(e){this.isKeyDown=!1,n(e)&&this.isInfoOpen&&this.toggleInfo()}async setFocus(e){this.nativeInput.focus(e)}getAriaDescribedby(){return this.accessibleDescribedBy?this.accessibleDescribedBy:this.collapsible||this.hasInfo?this.hasHeader?this.headerId:this.expandId:null}getClassNames(){return this.hasInfo&&!this.collapsible?{"duet-choice-card-info":!0,"duet-choice-card-info-expanded":this.isInfoOpen,"duet-choice-card-collapsed":!this.isInfoOpen,"duet-theme-turva":"turva"===this.theme}:!this.hasInfo&&this.collapsible?{"duet-choice-card-collapsible":!0,"duet-choice-card-collapsible-expanded":this.checked,"duet-choice-card-collapsed":!this.checked,"duet-choice-card-collapsible-disabled":!(!this.disabled&&!this.groupDisabled),"duet-theme-turva":"turva"===this.theme}:{"duet-choice-default-slot":!0}}render(){const e=this.identifier||this.choiceId;return c(i,{class:{horizontal:"horizontal"===this.groupDirection&&!this.groupResponsive,"horizontal-responsive":"horizontal"===this.groupDirection&&this.groupResponsive,"duet-m-0":"none"===this.margin,"duet-expand":this.expand,"duet-theme-turva":"turva"===this.theme}},c("div",{class:{"duet-choice-card-flextainer":!0,"duet-theme-turva":"turva"===this.theme}},c("div",{class:{"duet-choice-card":!0,"has-icon":!!this.icon,"has-info":this.hasInfo,checked:this.checked,info:this.isInfoOpen,collapsible:this.collapsible,"duet-p-0":"none"===this.padding}},c("input",{class:"duet-choice-input",type:this.type,onFocus:this.onFocus,onBlur:this.onBlur,onChange:this.onChange,disabled:this.disabled||this.groupDisabled,required:this.required,id:e,name:this.name,value:this.value,checked:this.checked,"aria-controls":this.accessibleControls,"aria-activedescendant":this.accessibleActiveDescendant,"aria-labelledby":this.accessibleLabelledBy,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,"aria-owns":this.accessibleOwns,"aria-describedby":this.getAriaDescribedby(),onKeyDown:this.handleKeyDown,ref:e=>this.nativeInput=e}),c("label",{htmlFor:e,class:{"duet-choice-label":!0,"no-hover":this.isHovering,"has-before-text":this.hasBeforeText},onClick:this.onClick},this.hasBeforeText&&c("slot",{name:"before-text"}),this.icon&&c("div",{class:"duet-choice-card-icon"},c("duet-icon",{margin:"none",size:"small",name:this.icon,color:"currentColor"})),c("div",{class:"duet-choice-card-text"},c("div",null,this.hasLabel?c("slot",{name:"label"}):this.label),this.caption&&c("div",null,c("duet-spacer",{size:"xx-small"}),c("duet-caption",{margin:"none",selected:this.checked},this.caption)),this.hasAdditional&&c("div",null,c("duet-spacer",{size:"xx-small"}),c("slot",{name:"additional"}))),c("div",null,c("div",{class:{"duet-checkmark-container":!0,"duet-checkmark-radio":"radio"===this.type}},this.checked&&c("div",{class:"duet-checkmark"}))))),this.hasInfo&&!this.collapsible&&c("button",{ref:e=>this.infoButtonEl=e,id:this.infoButtonId,class:{"duet-choice-info-toggle":!0,"duet-theme-turva":"turva"===this.theme},onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.toggleInfo,disabled:this.disabled||this.groupDisabled,"aria-expanded":this.isInfoOpen?"true":"false","aria-label":`${this.infoLabel} ${this.label}`,"aria-controls":this.expandId,"aria-flowto":this.expandId,tabindex:"radio"!==this.type||this.checked?"0":"-1",type:"button"},c("duet-visually-hidden",{"aria-hidden":this.isBlurred?"false":"true"},this.accessibleLabelInfoButton),c("div",{class:"duet-choice-info-icon"},c("duet-icon",{icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M13.5 17.25A2.252 2.252 0 0 1 11.25 15v-3.75h-.75a.75.75 0 0 1 0-1.5h.75c.827 0 1.5.673 1.5 1.5V15c0 .414.336.75.75.75h.75a.75.75 0 0 1 0 1.5z"/><circle cx="11.625" cy="7.125" r="1.125"/><path d="M12 24C5.383 24 0 18.617 0 12S5.383 0 12 0s12 5.383 12 12-5.383 12-12 12zm0-22.5C6.21 1.5 1.5 6.21 1.5 12S6.21 22.5 12 22.5 22.5 17.79 22.5 12 17.79 1.5 12 1.5z"/></svg>',margin:"none",size:"small",color:"currentColor"})))),this.collapsible||this.hasInfo?c("div",{class:this.getClassNames(),id:this.expandId},c("span",{class:{"duet-choice-section-visible":this.collapsible?this.checked:this.isInfoOpen,"duet-choice-section-hidden":this.collapsible?!this.checked:!this.isInfoOpen}},c("span",{id:this.headerId},c("slot",{name:"header"})),this.hasInfo?c("span",null,c("span",{"aria-relevant":"all","aria-atomic":"true","aria-live":this.isInfoOpen?"polite":"off"},c("slot",{name:"info"})),c("slot",null)):c("span",null,c("slot",null))),this.isInfoOpen&&c(a,{moveFocusTo:this.infoButtonEl})):null)}get element(){return o(this)}};g.style='*.sc-duet-choice,*.sc-duet-choice::after,*.sc-duet-choice::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;flex-direction:column;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-choice-h:last-child,.sc-duet-choice-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){.sc-duet-choice-h{width:100%}}.duet-expand.sc-duet-choice-h{width:100% !important}.duet-m-0.sc-duet-choice-h{margin:0 !important}.duet-fixed.sc-duet-choice-h{width:auto !important}.vertical.sc-duet-choice-h{margin-right:0 !important}.horizontal.sc-duet-choice-h{margin-bottom:0 !important}@media (min-width: 48em){.horizontal-responsive.sc-duet-choice-h{margin-bottom:0 !important;margin-right:16px !important}.horizontal-responsive.sc-duet-choice-h:last-child,.horizontal-responsive.sc-duet-choice-h:last-of-type{margin-right:0 !important}}.sc-duet-choice-h:last-child:not(:only-child){margin-right:0 !important}.duet-choice-card.sc-duet-choice{position:relative;display:block;width:100%;min-width:8rem;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;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#00294d !important;text-align:left;background:white;border-width:2px}.duet-choice-card.duet-p-0.sc-duet-choice{padding:0 !important}.duet-choice-card.duet-m-0.sc-duet-choice{margin:0 !important}.duet-theme-turva.sc-duet-choice .duet-choice-card.sc-duet-choice{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a !important}.duet-choice-card-flextainer.sc-duet-choice{display:flex}.duet-choice-label.sc-duet-choice{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:flex;gap:1rem;align-items:center;justify-content:flex-start;width:100%;height:100%;min-height:3.875rem;padding:1rem;font-size:1rem;font-weight:600;text-decoration:none;word-break:break-word;cursor:pointer;border:2px solid #e1e3e6;border-radius:4px;transition:background-color 150ms ease}.duet-choice-label.has-before-text.sc-duet-choice .duet-choice-card-icon.sc-duet-choice,.duet-choice-label.has-before-text.sc-duet-choice .duet-choice-card-text.sc-duet-choice{align-self:flex-start;margin-top:0.25rem}.duet-choice-label.sc-duet-choice>div.sc-duet-choice:last-child{flex:1;align-self:flex-start;justify-self:flex-end;margin-top:0.25rem}.has-info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-top-right-radius:0;border-bottom-right-radius:0}.info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom-right-radius:0;border-bottom-left-radius:0}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#909599}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#909599}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#747475}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-choice-label.sc-duet-choice:active{opacity:0.75;transition:none !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#0077b3 !important;background:#f3f9fc;border-color:#0077b3 !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#0077b3}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#171c3a !important;background:#f5f5f7;border-color:#171c3a !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#c60c30}.checked.collapsible.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom:0 !important;border-bottom-right-radius:0;border-bottom-left-radius:0}input.sc-duet-choice:focus{outline:0}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3)}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2)}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#e1e3e6 !important}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#657787 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#747475 !important;background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#747475 !important}.checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e1e3e6 !important;border-color:#e1e3e6 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-checkmark-container.sc-duet-choice{position:relative;width:20px;height:20px;margin-left:auto;border:1px solid #909599;border-radius:4px;transition:border 300ms ease}.duet-theme-turva.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#747475}.checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#0077b3;border-color:#0077b3;transition:none}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#171c3a;border-color:#171c3a !important}.duet-checkmark-container.duet-checkmark-radio.sc-duet-choice{border-radius:50%}[disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfcfd1 !important}.checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfcfd1 !important}.duet-checkmark.sc-duet-choice{position:absolute;top:10px;left:3px;width:5.3333333333px;height:11.8518518519px;border-top:2px solid white;border-right:2px solid white;opacity:1;transform:scaleX(-1) rotate(135deg) translateZ(0);transform-origin:left top;animation-name:duet-checkmark;animation-duration:600ms;animation-timing-function:ease-out;animation-fill-mode:forwards}@keyframes duet-checkmark{0%{width:0;height:0;opacity:1}20%{width:5.3333333333px;height:0;opacity:1}40%,100%{width:5.3333333333px;height:11.8518518519px;opacity:1}}.duet-choice-card-icon.sc-duet-choice{position:relative}.duet-choice-card-icon.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-section-hidden.sc-duet-choice{display:none}.duet-choice-card-info.duet-choice-card-collapsed.sc-duet-choice,.duet-choice-card-collapsed.duet-choice-card-collapsible.sc-duet-choice{position:relative;width:auto;padding:0 !important;background:unset !important;border:0;border-radius:0}.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:20px !important;position:relative;z-index:200;width:100%;font-weight:400;color:#00294d;border:2px solid #e1e3e6;border-top:0;border-radius:0 0 4px 4px}@media (min-width: 36em){.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:28px !important}}.duet-theme-turva.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.duet-theme-turva.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{color:#171c3a;border-color:#171c3a}.checked.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.checked.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{display:block}.duet-choice-card-info-expanded.sc-duet-choice,.duet-choice-card-collapsible-expanded.sc-duet-choice{display:block}.duet-choice-card-collapsible.sc-duet-choice{background:white;border:2px solid #0077b3;border-top:0}.duet-choice-card-collapsible.duet-theme-turva.sc-duet-choice{background:white;border-color:#171c3a}.duet-choice-card-collapsible-disabled.sc-duet-choice{background:#f5f8fa;border-color:#e1e3e6}.duet-choice-card-collapsible-disabled.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-card-info.sc-duet-choice{font-size:0.875rem;line-height:1.5;background:#f5f8fa;transition:150ms ease-out}.duet-choice-card-info.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-info-toggle.sc-duet-choice{display:flex;flex-shrink:0;align-items:flex-start;justify-content:center;width:57.6px;padding-top:1.25rem;cursor:pointer;background:white;border:2px solid #e1e3e6;border-left:0 none;border-top-right-radius:4px;border-bottom-right-radius:4px;-webkit-appearance:none;appearance:none}.duet-choice-info-toggle[aria-expanded=true].sc-duet-choice{background:#f5f8fa;border-bottom-color:transparent;border-bottom-right-radius:0}.duet-choice-info-toggle[disabled].sc-duet-choice{pointer-events:none;background:#f5f8fa !important;border-color:#e1e3e6 !important}.duet-choice-info-toggle[disabled].sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#909599 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice{background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#747475 !important}.duet-choice-info-toggle.sc-duet-choice:focus{outline:none}.user-is-tabbing.sc-duet-choice-h .duet-choice-info-toggle.sc-duet-choice:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-choice-info-toggle.sc-duet-choice{border-left-color:#909599}.checked.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice{border-left-color:#0077b3 !important}.duet-choice-info-toggle.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#0077b3}.duet-theme-turva.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#c60c30}.duet-choice-input.sc-duet-choice{position:absolute !important;width:100%;height:100%;opacity:0}';const f=":scope duet-choice:not(:scope duet-choice duet-choice-group duet-choice):not(:scope duet-choice duet-fieldset duet-choice)",v=class{constructor(t){e(this,t),this.choiceGroupName="duet-choice-group",this.getChoices=()=>Array.from(this.element.querySelectorAll(f)),this.isMyChoice=e=>this.getChoices().includes(e),this.onSelect=e=>{if("duet-choice"!==e.detail.component)return;const t=e.target;t&&this.isMyChoice(t)&&(this.value=t.value),e.cancelBubble=!0},this.direction="vertical",this.margin="auto",this.theme="",this.error="",this.name=void 0,this.label="Label",this.labelHidden=!1,this.caption=void 0,this.tooltip=void 0,this.tooltipDirection="auto",this.responsive=!1,this.value=void 0,this.disabled=void 0}async connectedCallback(){const e=this.element;if(void 0===this.value){const t=b(e,f);void 0!==t&&(await t.componentOnReady(),void 0===this.value&&(this.value=t.value))}this.mutationO=m(e,f,(e=>{void 0!==e?e.componentOnReady().then((()=>{this.isMyChoice(e)&&(this.value=e.value)})):this.updateChoices()})),this.updateChoices()}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0)}componentWillLoad(){h(this)}async updateChoices(){const e=this.getChoices(),{value:t}=this;let c=!1;for(const i of e)i.name=this.name,i.groupDisabled=this.disabled,i.groupDirection=this.direction,i.groupResponsive=this.responsive,c||i.value!==t?i.checked=!1:(c=!0,i.checked=!0);c||(this.value=void 0)}render(){return c(i,{onDuetChange:this.onSelect,class:{horizontal:"horizontal"===this.direction}},c("duet-fieldset",{label:this.label,labelHidden:this.labelHidden,caption:this.caption,error:this.error,margin:this.margin,theme:this.theme},this.tooltip&&c("duet-tooltip",{slot:"tooltip",direction:this.tooltipDirection,accessibleInputLabel:this.label},this.tooltip),c("div",{class:{[this.choiceGroupName]:!0,"duet-no-stacking":!this.responsive}},c("slot",null))))}get element(){return o(this)}static get watchers(){return{value:["updateChoices"],disabled:["updateChoices"],name:["updateChoices"],direction:["updateChoices"],responsive:["updateChoices"]}}};v.style="*.sc-duet-choice-group,*.sc-duet-choice-group::after,*.sc-duet-choice-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:flex;margin-bottom:0}}.horizontal.sc-duet-choice-group-h .duet-choice-group.duet-no-stacking.sc-duet-choice-group{display:flex}.duet-choice-group.sc-duet-choice-group{position:relative;width:100%;margin-bottom:-12px}";export{g as duet_choice,v as duet_choice_group}
|
|
4
|
+
import{r as e,c as t,h as c,H as i,g as o}from"./p-08219217.js";import{i as h}from"./p-4ebf1618.js";import{D as s}from"./p-76f00bd5.js";import{c as d}from"./p-c1325e35.js";import{F as a}from"./p-03c351bf.js";import{i as r,h as u,f as n}from"./p-54f35a79.js";import{g as l,a as p}from"./p-ede854e1.js";import{f as b,w as m}from"./p-12721178.js";import"./p-5a9d75e1.js";const g=class{constructor(c){e(this,c),this.duetChange=t(this,"duetChange",7),this.duetFocus=t(this,"duetFocus",7),this.duetBlur=t(this,"duetBlur",7),this.hasHeader=!1,this.choiceId=d("DuetChoice"),this.expandId=d("DuetChoiceExpand"),this.headerId=d("DuetChoiceHeader"),this.infoButtonId=d("DuetChoiceInfoButton"),this.onMouseEnter=()=>{this.isHovering=!0},this.onMouseLeave=()=>{this.isHovering=!1},this.onClick=e=>{this.toggleChecked(e)},this.handleKeyDown=e=>{r(e)&&this.toggleChecked(e),u(e)&&this.hasInfo&&this.toggleInfo()},this.onChange=()=>{this.checked=this.nativeInput.checked||!1,this.duetChange.emit({checked:this.checked,value:this.value,component:"duet-choice"})},this.onBlur=e=>{this.duetBlur.emit({originalEvent:e,checked:this.checked,value:this.value,component:"duet-choice"})},this.onFocus=e=>{this.duetFocus.emit({originalEvent:e,checked:this.checked,value:this.value,component:"duet-choice"})},this.toggleChecked=e=>{e.preventDefault(),e.stopPropagation(),this.disabled||this.groupDisabled||(this.isInfoOpen=!1,"radio"===this.type&&this.checked||(this.checked=!this.checked,this.duetChange.emit({originalEvent:e,checked:this.checked,value:this.value,component:"duet-choice"})))},this.toggleInfo=()=>{this.isInfoOpen=!this.isInfoOpen},this.isHovering=!1,this.isInfoOpen=!1,this.isBlurred=!1,this.theme="",this.label="label",this.accessibleLabelInfoButtonDefaults=s,this.accessibleLabelInfoButton=l(this.accessibleLabelInfoButtonDefaults),this.accessibleActiveDescendant=void 0,this.accessibleControls=void 0,this.accessibleOwns=void 0,this.accessibleDescribedBy=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.caption="",this.value=void 0,this.type="checkbox",this.name=void 0,this.checked=!1,this.collapsible=!1,this.margin="auto",this.icon="",this.expand=!1,this.padding="auto",this.identifier=void 0,this.groupDirection=void 0,this.groupDisabled=void 0,this.groupResponsive=void 0,this.disabled=!1,this.required=!1,this.infoLabelDefaults={fi:"Lisätietoja",en:"More information about",sv:"Mera information om"},this.infoLabel=l(this.infoLabelDefaults,p())}componentWillLoad(){h(this),this.hasInfo=!!this.element.querySelector("[slot='info']"),this.hasHeader=!!this.element.querySelector('[slot="header"]'),this.hasAdditional=!!this.element.querySelector(":scope > [slot='additional']"),this.hasLabel=!!this.element.querySelector(":scope > [slot='label']"),this.hasBeforeText=!!this.element.querySelector("[slot='before-text']")}handleHostBlur(e){this.hasInfo&&this.isInfoOpen&&this.isKeyDown&&(this.element.contains(null==e?void 0:e.relatedTarget)||this.toggleInfo())}handleHostKeyDown(){this.isKeyDown=!0}handleHostKeyUp(e){this.isKeyDown=!1,n(e)&&this.isInfoOpen&&this.toggleInfo()}async setFocus(e){this.nativeInput.focus(e)}getAriaDescribedby(){return this.accessibleDescribedBy?this.accessibleDescribedBy:this.collapsible||this.hasInfo?this.hasHeader?this.headerId:this.expandId:null}getClassNames(){return this.hasInfo&&!this.collapsible?{"duet-choice-card-info":!0,"duet-choice-card-info-expanded":this.isInfoOpen,"duet-choice-card-collapsed":!this.isInfoOpen,"duet-theme-turva":"turva"===this.theme}:!this.hasInfo&&this.collapsible?{"duet-choice-card-collapsible":!0,"duet-choice-card-collapsible-expanded":this.checked,"duet-choice-card-collapsed":!this.checked,"duet-choice-card-collapsible-disabled":!(!this.disabled&&!this.groupDisabled),"duet-theme-turva":"turva"===this.theme}:{"duet-choice-default-slot":!0}}render(){const e=this.identifier||this.choiceId;return c(i,{class:{horizontal:"horizontal"===this.groupDirection&&!this.groupResponsive,"horizontal-responsive":"horizontal"===this.groupDirection&&this.groupResponsive,"duet-m-0":"none"===this.margin,"duet-expand":this.expand,"duet-theme-turva":"turva"===this.theme}},c("div",{class:{"duet-choice-card-flextainer":!0,"duet-theme-turva":"turva"===this.theme}},c("div",{class:{"duet-choice-card":!0,"has-icon":!!this.icon,"has-info":this.hasInfo,checked:this.checked,info:this.isInfoOpen,collapsible:this.collapsible,"duet-p-0":"none"===this.padding}},c("input",{class:"duet-choice-input",type:this.type,onFocus:this.onFocus,onBlur:this.onBlur,onChange:this.onChange,disabled:this.disabled||this.groupDisabled,required:this.required,id:e,name:this.name,value:this.value,checked:this.checked,"aria-controls":this.accessibleControls,"aria-activedescendant":this.accessibleActiveDescendant,"aria-labelledby":this.accessibleLabelledBy,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,"aria-owns":this.accessibleOwns,"aria-describedby":this.getAriaDescribedby(),onKeyDown:this.handleKeyDown,ref:e=>this.nativeInput=e}),c("label",{htmlFor:e,class:{"duet-choice-label":!0,"no-hover":this.isHovering,"has-before-text":this.hasBeforeText},onClick:this.onClick},this.hasBeforeText&&c("slot",{name:"before-text"}),this.icon&&c("div",{class:"duet-choice-card-icon"},c("duet-icon",{margin:"none",size:"small",name:this.icon,color:"currentColor"})),c("div",{class:"duet-choice-card-text"},c("div",null,this.hasLabel?c("slot",{name:"label"}):this.label),this.caption&&c("div",null,c("duet-spacer",{size:"xx-small"}),c("duet-caption",{margin:"none",selected:this.checked},this.caption)),this.hasAdditional&&c("div",null,c("duet-spacer",{size:"xx-small"}),c("slot",{name:"additional"}))),c("div",null,c("div",{class:{"duet-checkmark-container":!0,"duet-checkmark-radio":"radio"===this.type}},this.checked&&c("div",{class:"duet-checkmark"}))))),this.hasInfo&&!this.collapsible&&c("button",{ref:e=>this.infoButtonEl=e,id:this.infoButtonId,class:{"duet-choice-info-toggle":!0,"duet-theme-turva":"turva"===this.theme},onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.toggleInfo,disabled:this.disabled||this.groupDisabled,"aria-expanded":this.isInfoOpen?"true":"false","aria-label":`${this.infoLabel} ${this.label}`,"aria-controls":this.expandId,"aria-flowto":this.expandId,tabindex:"radio"!==this.type||this.checked?"0":"-1",type:"button"},c("duet-visually-hidden",{"aria-hidden":this.isBlurred?"false":"true"},this.accessibleLabelInfoButton),c("div",{class:"duet-choice-info-icon"},c("duet-icon",{icon:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M13.5 17.25A2.252 2.252 0 0 1 11.25 15v-3.75h-.75a.75.75 0 0 1 0-1.5h.75c.827 0 1.5.673 1.5 1.5V15c0 .414.336.75.75.75h.75a.75.75 0 0 1 0 1.5z"/><circle cx="11.625" cy="7.125" r="1.125"/><path d="M12 24C5.383 24 0 18.617 0 12S5.383 0 12 0s12 5.383 12 12-5.383 12-12 12zm0-22.5C6.21 1.5 1.5 6.21 1.5 12S6.21 22.5 12 22.5 22.5 17.79 22.5 12 17.79 1.5 12 1.5z"/></svg>',margin:"none",size:"small",color:"currentColor"})))),this.collapsible||this.hasInfo?c("div",{class:this.getClassNames(),id:this.expandId},c("span",{class:{"duet-choice-section-visible":this.collapsible?this.checked:this.isInfoOpen,"duet-choice-section-hidden":this.collapsible?!this.checked:!this.isInfoOpen}},c("span",{id:this.headerId},c("slot",{name:"header"})),this.hasInfo?c("span",null,c("span",{"aria-relevant":"all","aria-atomic":"true","aria-live":this.isInfoOpen?"polite":"off"},c("slot",{name:"info"})),c("slot",null)):c("span",null,c("slot",null))),this.isInfoOpen&&c(a,{moveFocusTo:this.infoButtonEl})):null)}get element(){return o(this)}};g.style='*.sc-duet-choice,*.sc-duet-choice::after,*.sc-duet-choice::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;flex-direction:column;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-choice-h:last-child,.sc-duet-choice-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){.sc-duet-choice-h{width:100%}}.duet-expand.sc-duet-choice-h{width:100% !important}.duet-m-0.sc-duet-choice-h{margin:0 !important}.duet-fixed.sc-duet-choice-h{width:auto !important}.vertical.sc-duet-choice-h{margin-right:0 !important}.horizontal.sc-duet-choice-h{margin-bottom:0 !important}@media (min-width: 48em){.horizontal-responsive.sc-duet-choice-h{margin-bottom:0 !important;margin-right:16px !important}.horizontal-responsive.sc-duet-choice-h:last-child,.horizontal-responsive.sc-duet-choice-h:last-of-type{margin-right:0 !important}}.sc-duet-choice-h:last-child:not(:only-child){margin-right:0 !important}.duet-choice-card.sc-duet-choice{position:relative;display:block;width:100%;min-width:8rem;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;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#00294d !important;text-align:left;background:white;border-width:2px}.duet-choice-card.duet-p-0.sc-duet-choice{padding:0 !important}.duet-choice-card.duet-m-0.sc-duet-choice{margin:0 !important}.duet-theme-turva.sc-duet-choice .duet-choice-card.sc-duet-choice{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a !important}.duet-choice-card-flextainer.sc-duet-choice{display:flex}.duet-choice-label.sc-duet-choice{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:flex;gap:1rem;align-items:center;justify-content:flex-start;width:100%;height:100%;min-height:3.875rem;padding:1rem;font-size:1rem;font-weight:600;text-decoration:none;word-break:break-word;cursor:pointer;border:2px solid #e1e3e6;border-radius:4px;transition:background-color 150ms ease}.duet-choice-label.has-before-text.sc-duet-choice .duet-choice-card-icon.sc-duet-choice,.duet-choice-label.has-before-text.sc-duet-choice .duet-choice-card-text.sc-duet-choice{align-self:flex-start;margin-top:0.25rem}.duet-choice-label.sc-duet-choice>div.sc-duet-choice:last-child{flex:1;align-self:flex-start;justify-self:flex-end;margin-top:0.25rem}.has-info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-top-right-radius:0;border-bottom-right-radius:0}.info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom-right-radius:0;border-bottom-left-radius:0}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#909599}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#909599}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#747475}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-choice-label.sc-duet-choice:active{opacity:0.75;transition:none !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#0077b3 !important;background:#f3f9fc;border-color:#0077b3 !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#0077b3}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#171c3a !important;background:#f5f5f7;border-color:#171c3a !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#c60c30}.checked.collapsible.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom:0 !important;border-bottom-right-radius:0;border-bottom-left-radius:0}input.sc-duet-choice:focus{outline:0}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3)}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2)}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#e1e3e6 !important}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#657787 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#747475 !important;background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#747475 !important}.checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e1e3e6 !important;border-color:#e1e3e6 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-checkmark-container.sc-duet-choice{position:relative;width:20px;height:20px;margin-left:auto;border:1px solid #909599;border-radius:4px;transition:border 300ms ease}.duet-theme-turva.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#747475}.checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#0077b3;border-color:#0077b3;transition:none}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#171c3a;border-color:#171c3a !important}.duet-checkmark-container.duet-checkmark-radio.sc-duet-choice{border-radius:50%}[disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfcfd1 !important}.checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfcfd1 !important}.duet-checkmark.sc-duet-choice{position:absolute;top:10px;left:3px;width:5.3333333333px;height:11.8518518519px;border-top:2px solid white;border-right:2px solid white;opacity:1;transform:scaleX(-1) rotate(135deg) translateZ(0);transform-origin:left top;animation-name:duet-checkmark;animation-duration:600ms;animation-timing-function:ease-out;animation-fill-mode:forwards}@keyframes duet-checkmark{0%{width:0;height:0;opacity:1}20%{width:5.3333333333px;height:0;opacity:1}40%,100%{width:5.3333333333px;height:11.8518518519px;opacity:1}}.duet-choice-card-icon.sc-duet-choice{position:relative}.duet-choice-card-icon.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-section-hidden.sc-duet-choice{display:none}.duet-choice-card-info.duet-choice-card-collapsed.sc-duet-choice,.duet-choice-card-collapsed.duet-choice-card-collapsible.sc-duet-choice{position:relative;width:auto;padding:0 !important;background:unset !important;border:0;border-radius:0}.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:20px !important;position:relative;z-index:200;width:100%;font-weight:400;color:#00294d;border:2px solid #e1e3e6;border-top:0;border-radius:0 0 4px 4px}@media (min-width: 36em){.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:28px !important}}.duet-theme-turva.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.duet-theme-turva.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{color:#171c3a;border-color:#171c3a}.checked.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.checked.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{display:block}.duet-choice-card-info-expanded.sc-duet-choice,.duet-choice-card-collapsible-expanded.sc-duet-choice{display:block}.duet-choice-card-collapsible.sc-duet-choice{background:white;border:2px solid #0077b3;border-top:0}.duet-choice-card-collapsible.duet-theme-turva.sc-duet-choice{background:white;border-color:#171c3a}.duet-choice-card-collapsible-disabled.sc-duet-choice{background:#f5f8fa;border-color:#e1e3e6}.duet-choice-card-collapsible-disabled.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-card-info.sc-duet-choice{font-size:0.875rem;line-height:1.5;background:#f5f8fa;transition:150ms ease-out}.duet-choice-card-info.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-info-toggle.sc-duet-choice{display:flex;flex-shrink:0;align-items:flex-start;justify-content:center;width:57.6px;padding-top:1.25rem;cursor:pointer;background:white;border:2px solid #e1e3e6;border-left:0 none;border-top-right-radius:4px;border-bottom-right-radius:4px;-webkit-appearance:none;appearance:none}.duet-choice-info-toggle[aria-expanded=true].sc-duet-choice{background:#f5f8fa;border-bottom-color:transparent;border-bottom-right-radius:0}.duet-choice-info-toggle[disabled].sc-duet-choice{pointer-events:none;background:#f5f8fa !important;border-color:#e1e3e6 !important}.duet-choice-info-toggle[disabled].sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#909599 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice{background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#747475 !important}.duet-choice-info-toggle.sc-duet-choice:focus{outline:none}.user-is-tabbing.sc-duet-choice-h .duet-choice-info-toggle.sc-duet-choice:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-choice-info-toggle.sc-duet-choice{border-left-color:#909599}.checked.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice{border-left-color:#0077b3 !important}.duet-choice-info-toggle.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#0077b3}.duet-theme-turva.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#c60c30}.duet-choice-input.sc-duet-choice{position:absolute !important;width:100%;height:100%;opacity:0}';const f=":scope duet-choice:not(:scope duet-choice duet-choice-group duet-choice):not(:scope duet-choice duet-fieldset duet-choice)",v=class{constructor(t){e(this,t),this.choiceGroupName="duet-choice-group",this.getChoices=()=>Array.from(this.element.querySelectorAll(f)),this.isMyChoice=e=>this.getChoices().includes(e),this.onSelect=e=>{if("duet-choice"!==e.detail.component)return;const t=e.target;t&&this.isMyChoice(t)&&(this.value=t.value),e.cancelBubble=!0},this.direction="vertical",this.margin="auto",this.theme="",this.error="",this.name=void 0,this.label="Label",this.labelHidden=!1,this.caption=void 0,this.tooltip=void 0,this.tooltipDirection="auto",this.responsive=!1,this.value=void 0,this.disabled=void 0}async connectedCallback(){const e=this.element;if(void 0===this.value){const t=b(e,f);void 0!==t&&(await t.componentOnReady(),void 0===this.value&&(this.value=t.value))}this.mutationO=m(e,f,(e=>{void 0!==e?e.componentOnReady().then((()=>{this.isMyChoice(e)&&(this.value=e.value)})):this.updateChoices()})),this.updateChoices()}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0)}componentWillLoad(){h(this)}async updateChoices(){const e=this.getChoices(),{value:t}=this;let c=!1;for(const i of e)i.name=this.name,i.groupDisabled=this.disabled,i.groupDirection=this.direction,i.groupResponsive=this.responsive,c||i.value!==t?i.checked=!1:(c=!0,i.checked=!0);c||(this.value=void 0)}render(){return c(i,{onDuetChange:this.onSelect,class:{horizontal:"horizontal"===this.direction}},c("duet-fieldset",{label:this.label,labelHidden:this.labelHidden,caption:this.caption,error:this.error,margin:this.margin,theme:this.theme},this.tooltip&&c("duet-tooltip",{slot:"tooltip",direction:this.tooltipDirection,accessibleInputLabel:this.label},this.tooltip),c("div",{class:{[this.choiceGroupName]:!0,"duet-no-stacking":!this.responsive}},c("slot",null))))}get element(){return o(this)}static get watchers(){return{value:["updateChoices"],disabled:["updateChoices"],name:["updateChoices"],direction:["updateChoices"],responsive:["updateChoices"]}}};v.style="*.sc-duet-choice-group,*.sc-duet-choice-group::after,*.sc-duet-choice-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:flex;margin-bottom:0}}.horizontal.sc-duet-choice-group-h .duet-choice-group.duet-no-stacking.sc-duet-choice-group{display:flex}.duet-choice-group.sc-duet-choice-group{position:relative;width:100%;margin-bottom:-12px}";export{g as duet_choice,v as duet_choice_group}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
4
|
+
System.register(["./p-601cc7ed.system.js","./p-8078b081.system.js","./p-33b3aba4.system.js"],(function(e){"use strict";var t,n,o,i,a,r;return{setters:[function(e){t=e.r;n=e.h;o=e.H;i=e.g},function(e){a=e.m},function(e){r=e.i}],execute:function(){var s='*,*::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;width:100%;height:100%}@media (min-width: 62em){:host{width:auto}}.duet-submenu-bar-dropdown{position:relative;height:100%}.duet-submenu-bar-dropdown button{position:relative;display:flex;flex-direction:row;gap:16px;align-items:center;justify-content:flex-start;width:100%;height:100%;padding:12px 1.5rem;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.25;color:#00294d;text-align:center;text-decoration:none;cursor:pointer}@media (min-width: 62em){.duet-submenu-bar-dropdown button{flex-direction:column;gap:5px;align-items:center;justify-content:center;width:auto;font-size:0.875rem;color:#004d80}}.duet-submenu-bar-dropdown button .label{display:flex;gap:5px;align-items:center;justify-content:center}.duet-submenu-bar-dropdown button.active .caret{transform:rotate(180deg)}@media (min-width: 62em){.duet-submenu-bar-dropdown button .caret{position:absolute;right:12px}.duet-submenu-bar-dropdown button:hover{color:#00294d;background:#e6f2f8}.duet-submenu-bar-dropdown button:hover.active{color:#0077b3}.duet-submenu-bar-dropdown button.active{color:#0077b3}.duet-theme-turva .duet-submenu-bar-dropdown button.active{color:#c60c30}.duet-submenu-bar-dropdown button.active::after{position:absolute;top:auto;bottom:0;left:0;display:block;width:100%;height:1px;content:"";background:#0077b3;transition:300ms ease;transform:translateY(1px)}.duet-theme-turva .duet-submenu-bar-dropdown button.active::after{background:#c60c30}}.duet-submenu-bar-dropdown .items{display:flex;flex-direction:column;align-items:center;justify-content:center;max-height:1000px;padding:0 0 16px;overflow-y:auto;color:#00294d;visibility:visible;transition:max-height 0.3s ease-in, padding 0.3s ease-in}@media (min-width: 62em){.duet-submenu-bar-dropdown .items{position:absolute;top:102%;z-index:600;min-width:320px;padding:0;background:white;border-radius:0 0 4px 4px;box-shadow:0 6px 6px 0 rgba(0, 41, 77, 0.1);transition:none}}.duet-submenu-bar-dropdown .items.hidden{max-height:0;padding:0;overflow:hidden;visibility:hidden;transition:max-height 0.3s ease-out, padding 0.3s ease-out}.duet-submenu-bar-dropdown.duet-theme-turva button{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}@media (min-width: 62em){.duet-submenu-bar-dropdown.duet-theme-turva button{color:#940925}.duet-submenu-bar-dropdown.duet-theme-turva button:hover{color:#171c3a;background:#e4e4e6}}.duet-submenu-bar-dropdown.duet-theme-turva button.active{color:#c60c30}.duet-submenu-bar-dropdown.duet-theme-turva button.active::after{background:#c60c30}.duet-submenu-bar-dropdown.duet-theme-turva .items{background:#f5f5f7}';var u=e("duet_submenu_bar_dropdown",function(){function e(e){var n=this;t(this,e);this.mql=[window.matchMedia(a.replace(/'/g,""))];this.boundMqlFunctions=[];this.changeIconSize=function(){if(n.mql[0].matches){n.iconSize="x-small"}else{n.iconSize="small"}};this.onClick=function(){n.open=!n.open};this.iconSize="small";this.theme="";this.open=false;this.icon=undefined}e.prototype.handleFocus=function(e){var t=this;var n=e.composedPath().every((function(e){return e!==t.element}));if(n){this.open=false}};e.prototype.componentWillLoad=function(){r(this)};e.prototype.connectedCallback=function(){this.changeIconSize();for(var e=0;e<this.mql.length;e++){if(this.mql[e].addEventListener){var t=this.changeIconSize.bind(this);this.mql[e].addEventListener("change",t);this.boundMqlFunctions[e]=t}}};e.prototype.disconnectedCallback=function(){for(var e=0;e<this.mql.length;e++){if(this.mql[e].removeEventListener){this.mql[e].removeEventListener("change",this.boundMqlFunctions[e])}}this.boundMqlFunctions=[]};e.prototype.render=function(){return n(o,null,n("div",{class:{"duet-submenu-bar-dropdown":true,"duet-theme-turva":this.theme==="turva",active:this.open}},n("button",{"aria-haspopup":"menu","aria-controls":"menu","aria-expanded":this.open?"true":"false",id:"button",type:"button",class:{active:this.open},onClick:this.onClick},this.icon&&n("duet-icon",{name:this.icon,size:this.iconSize,margin:"none"}),n("div",{class:"label"},n("slot",{name:"label"}),n("duet-icon",{class:"caret",name:"action-arrow-down-small",margin:"none",size:"xxx-small"}))),n("div",{tabindex:"-1",role:"menu",id:"menu","aria-labelledby":"button",class:{items:true,hidden:!this.open}},n("slot",null))))};Object.defineProperty(e.prototype,"element",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());u.style=s}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,e,o,i){function n(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,r){function a(t){try{s(i.next(t))}catch(e){r(e)}}function l(t){try{s(i["throw"](t))}catch(e){r(e)}}function s(t){t.done?o(t.value):n(t.value).then(a,l)}s((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(e){return s([t,e])}}function s(a){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(a[0]===6&&o.label<r[1]){o.label=r[1];r=a;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(a);break}if(r[2])o.ops.pop();o.trys.pop();continue}a=e.call(t,o)}catch(l){a=[6,l];n=0}finally{i=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/System.register(["./p-6af671d6.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js","./p-f69b64c9.system.js","./p-b6d51921.system.js"],(function(t){"use strict";var e,o,i,n,r,a,l,s;return{setters:[function(t){e=t.r;o=t.h;i=t.H;n=t.g},function(t){r=t.i},function(t){a=t.c},function(t){l=t.a;s=t.g},function(){}],execute:function(){var p='*,*::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;position:relative;z-index:200;display:inline-flex;width:auto;margin-top:-16px !important;margin-left:-3px !important;-webkit-tap-highlight-color:transparent}.duet-tooltip{position:absolute;right:-141px;bottom:100%;z-index:950;display:block;width:282px;min-height:48px;max-height:340px;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:#00294d;visibility:hidden;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0, 41, 77, 0.07);opacity:0;transition:300ms ease;transform:scale(0.9) translateZ(0) translateY(20px);transform-origin:100% 100%}.duet-tooltip.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:#171c3a;border-color:#e4e4e6;box-shadow:0 2px 10px 0 rgba(117, 117, 117, 0.13)}.duet-tooltip::after{position:absolute;right:142px;bottom:-20px;z-index:200;width:0;height:0;content:"";border:10px solid transparent;border-top:10px solid white}.duet-tooltip::before{position:absolute;right:141px;bottom:-22px;z-index:100;width:0;height:0;content:"";border:11px solid transparent;border-top:11px solid #e1e3e6}.duet-theme-turva .duet-tooltip::before{border-top:11px solid #e4e4e6}.duet-tooltip.duet-tooltip-down{top:100%;bottom:auto;transform:scale(0.9) translateZ(0) translateY(-20px);transform-origin:100% 0}.duet-tooltip.duet-tooltip-down::after{top:-20px;bottom:auto;border:10px solid transparent;border-bottom:10px solid white}.duet-tooltip.duet-tooltip-down::before{top:-22px;bottom:auto;border:11px solid transparent;border-bottom:11px solid #e1e3e6}.duet-theme-turva .duet-tooltip.duet-tooltip-down::before{border-bottom:11px solid #e4e4e6}.duet-tooltip.duet-tooltip-left{right:-21px !important;transform-origin:100% 100% !important}.duet-tooltip.duet-tooltip-left::after{right:22px !important;transform:none !important}.duet-tooltip.duet-tooltip-left::before{right:21px !important;transform:none !important}.duet-tooltip.duet-tooltip-right{right:auto !important;left:-9px !important;transform-origin:100% 100% !important}.duet-tooltip.duet-tooltip-right::after{right:auto !important;left:22px !important;transform:none !important}.duet-tooltip.duet-tooltip-right::before{right:auto !important;left:21px !important;transform:none !important}.duet-tooltip.duet-tooltip-has-label{right:auto !important;left:0;width:282px !important;transform-origin:0 0 !important}.duet-tooltip.duet-tooltip-has-label::after{right:auto !important;left:1px !important;transform:none !important}.duet-tooltip.duet-tooltip-has-label::before{right:auto !important;left:0 !important;transform:none !important}.duet-tooltip.duet-tooltip-active{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(-8px)}.duet-tooltip.duet-tooltip-active.duet-tooltip-down{transform:scale(1.0001) translateZ(0) translateY(8px)}.duet-tooltip-button{z-index:100;display:inline-block;align-items:center;justify-content:center;min-width:48px;height:48px;padding:0 !important;margin-right:-12px;line-height:normal !important;color:#0077b3;white-space:nowrap;cursor:pointer;background:transparent !important;border-radius:4px}.duet-tooltip-button.duet-theme-turva{color:#c60c30}.duet-tooltip-button:hover{color:#004d80}.duet-tooltip-button:hover.duet-theme-turva{color:#940925}.duet-tooltip-button:focus{background:transparent !important;outline:0}:host(.user-is-tabbing) .duet-tooltip-button:focus{background:transparent !important;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}:host(.user-is-tabbing) .duet-tooltip-button.duet-theme-turva:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}.duet-tooltip-button svg{width:20px;height:20px;pointer-events:none}.duet-tooltip-button-has-label{margin-right:0}.duet-tooltip-scrollable{padding:20px !important;width:100%;max-height:250px;padding-right:25px !important;overflow-y:auto;-webkit-hyphens:auto;hyphens:auto;border-radius:4px;-webkit-overflow-scrolling:touch}.duet-tooltip-scrollable:focus{outline:none}:host(.user-is-tabbing) .duet-tooltip-scrollable: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 .duet-tooltip-scrollable:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tooltip-scrollable::-webkit-scrollbar{width:4px}.duet-tooltip-scrollable::-webkit-scrollbar-track{border-radius:4px}.duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:#e1e3e6;border-radius:4px}.duet-theme-turva .duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:#e4e4e6}.duet-tooltip-label{position:relative;z-index:100;display:inline-block;max-width:calc(100% - 30px);margin-left:12px !important;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.25;text-align:left;white-space:normal;vertical-align:top}.duet-theme-turva .duet-tooltip-label{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.duet-tooltip-close{position:absolute;top:8px;right:8px;display:flex;align-items:center;justify-content:center;width:17px;height:17px;min-height:0 !important;padding:0 !important;margin:0 !important;line-height:normal;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;-webkit-appearance:none;appearance:none}.duet-tooltip-close:focus{outline:none;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva .duet-tooltip-close:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}@media (min-width: 48em){.duet-tooltip.duet-mq-medium{right:-148px;width:320px;transform-origin:50% 100%}.duet-tooltip.duet-mq-medium::after{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-medium::before{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-medium.duet-tooltip-down{transform-origin:50% 0}}@media (min-width: 62em){.duet-tooltip.duet-mq-large{right:-148px;width:320px;transform-origin:50% 100%}.duet-tooltip.duet-mq-large::after{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-large::before{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-large.duet-tooltip-down{transform-origin:50% 0}}';var u=t("duet_tooltip",function(){function t(t){var o=this;e(this,t);this.tooltipId=a("DuetTooltip");this.lastScrollTop=0;this.openTooltip=function(){o.focusTarget="tooltip";o.active=true};this.closeTooltip=function(t){if(t===void 0){t=false}if(t){o.focusTarget="trigger"}o.active=false};this.toggleOpen=function(){o.active?o.closeTooltip():o.openTooltip()};this.handleFocusOut=function(t){if(!o.active){return}var e=t.relatedTarget;if(e==null||o.element.shadowRoot.contains(e)||o.element.contains(e)){return}o.closeTooltip()};this.handleKeyDown=function(t){var e=t.keyCode===27;var i=t.target===o.scrollableEl&&t.shiftKey&&t.keyCode===9;if(e||i){o.closeTooltip(true)}};this.handleCloseClick=function(){o.closeTooltip(true)};this.isElementInViewportVertically=function(){if(!o.tooltipEl){return false}var t=o.tooltipEl.getBoundingClientRect();return t.top>=100&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)};this.handleVerticalVisibility=function(){var t=window.pageYOffset||document.documentElement.scrollTop;if(!o.isElementInViewportVertically()){o.openDown=t>o.lastScrollTop}o.lastScrollTop=Math.max(0,t)};this.handleHorizontalVisibility=function(){var t=o.tooltipEl.getBoundingClientRect();var e=t.left>=0;var i=t.right<(window.innerWidth||document.documentElement.clientWidth);if(!e||o.direction!=="right"&&o.openRight){o.openRight=true}else{o.openRight=o.direction==="right"}if(!i||o.direction!=="left"&&o.openLeft){o.openLeft=true}else{o.openLeft=o.direction==="left"}};this.openDown=false;this.openLeft=false;this.openRight=false;this.theme="";this.language=l();this.accessibleLabelDefault={fi:"Näytä lisätietoja",en:"Show more information",sv:"Visa mer tilläggsuppgifter"};this.accessibleLabel=s(this.accessibleLabelDefault,this.language);this.accessibleInputLabel=undefined;this.accessibleCloseLabelDefault={fi:"Sulje lisätiedot",en:"Close details",sv:"Stäng tilläggsuppgifter"};this.accessibleCloseLabel=s(this.accessibleCloseLabelDefault,this.language);this.label="";this.breakpoint="medium";this.direction="auto";this.positionVertical="0";this.positionHorizontal="0";this.active=false}t.prototype.componentWillLoad=function(){r(this)};t.prototype.componentDidUpdate=function(){switch(this.focusTarget){case"tooltip":this.scrollableEl.focus({preventScroll:true});break;case"trigger":this.buttonEl.focus({preventScroll:true});break}this.focusTarget=null};t.prototype.onScroll=function(){var t=this;clearTimeout(this.scrollTimer);this.scrollTimer=setTimeout((function(){if(t.active){t.handleHorizontalVisibility();t.handleVerticalVisibility()}}),100)};t.prototype.handleDocumentClick=function(t){var e=this;if(!this.active){return}var o=t.composedPath();var i=o.every((function(t){return t!==e.element}));if(i){this.closeTooltip()}};t.prototype.handleActiveChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(o){if(t){this.handleHorizontalVisibility();this.openDown=!this.isElementInViewportVertically()}else{setTimeout((function(){return e.openDown=false}),300)}return[2]}))}))};t.prototype.render=function(){var t=this;var e={transform:"translateY(".concat(this.positionVertical,") translateX(").concat(this.positionHorizontal,")"),zIndex:this.active?"201":""};return o(i,{style:e},o("button",{ref:function(e){return t.buttonEl=e},"aria-controls":this.tooltipId,"aria-expanded":this.active?"true":"false",onClick:this.toggleOpen,type:"button",class:{"duet-tooltip-button":true,"duet-tooltip-button-has-label":!!this.label,"duet-theme-turva":this.theme==="turva"}},o("svg",{"aria-hidden":"true",role:"img",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"m13.5 17.25c-1.241 0-2.25-1.009-2.25-2.25v-3.75h-.75c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h.75c.827 0 1.5.673 1.5 1.5v3.75c0 .414.336.75.75.75h.75c.414 0 .75.336.75.75s-.336.75-.75.75z"}),o("circle",{cx:"11.625",cy:"7.125",r:"1.125"}),o("path",{d:"m12 24c-6.617 0-12-5.383-12-12s5.383-12 12-12 12 5.383 12 12-5.383 12-12 12zm0-22.5c-5.79 0-10.5 4.71-10.5 10.5s4.71 10.5 10.5 10.5 10.5-4.71 10.5-10.5-4.71-10.5-10.5-10.5z"})),this.label?o("span",{class:"duet-tooltip-label"},this.label):o("duet-visually-hidden",null,this.accessibleInputLabel?"".concat(this.accessibleInputLabel,", ").concat(this.accessibleLabel):this.accessibleLabel)),o("div",{ref:function(e){return t.tooltipEl=e},class:{"duet-tooltip":true,"duet-mq-large":this.breakpoint==="large","duet-mq-medium":this.breakpoint==="medium","duet-theme-turva":this.theme==="turva","duet-tooltip-down":this.openDown,"duet-tooltip-has-label":!!this.label,"duet-tooltip-left":this.openLeft,"duet-tooltip-right":this.openRight,"duet-tooltip-active":this.active===true},onClick:function(t){return t.stopPropagation()},onKeyDown:this.handleKeyDown,onFocusout:this.handleFocusOut},o("div",{ref:function(e){return t.scrollableEl=e},class:"duet-tooltip-scrollable",tabindex:"0",id:this.tooltipId},o("slot",null)),o("button",{type:"button",class:"duet-tooltip-close",onClick:this.handleCloseClick},o("duet-icon",{name:"navigation-close-small",margin:"none",color:"currentColor",size:"xxx-small"}),o("duet-visually-hidden",null,this.accessibleCloseLabel))))};Object.defineProperty(t.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{active:["handleActiveChange"]}},enumerable:false,configurable:true});return t}());u.style=p}}}));
|
|
4
|
+
*/System.register(["./p-601cc7ed.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js","./p-f69b64c9.system.js","./p-b6d51921.system.js"],(function(t){"use strict";var e,o,i,n,r,a,l,s;return{setters:[function(t){e=t.r;o=t.h;i=t.H;n=t.g},function(t){r=t.i},function(t){a=t.c},function(t){l=t.a;s=t.g},function(){}],execute:function(){var p='*,*::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;position:relative;z-index:200;display:inline-flex;width:auto;margin-top:-16px !important;margin-left:-3px !important;-webkit-tap-highlight-color:transparent}.duet-tooltip{position:absolute;right:-141px;bottom:100%;z-index:950;display:block;width:282px;min-height:48px;max-height:340px;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:#00294d;visibility:hidden;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0, 41, 77, 0.07);opacity:0;transition:300ms ease;transform:scale(0.9) translateZ(0) translateY(20px);transform-origin:100% 100%}.duet-tooltip.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:#171c3a;border-color:#e4e4e6;box-shadow:0 2px 10px 0 rgba(117, 117, 117, 0.13)}.duet-tooltip::after{position:absolute;right:142px;bottom:-20px;z-index:200;width:0;height:0;content:"";border:10px solid transparent;border-top:10px solid white}.duet-tooltip::before{position:absolute;right:141px;bottom:-22px;z-index:100;width:0;height:0;content:"";border:11px solid transparent;border-top:11px solid #e1e3e6}.duet-theme-turva .duet-tooltip::before{border-top:11px solid #e4e4e6}.duet-tooltip.duet-tooltip-down{top:100%;bottom:auto;transform:scale(0.9) translateZ(0) translateY(-20px);transform-origin:100% 0}.duet-tooltip.duet-tooltip-down::after{top:-20px;bottom:auto;border:10px solid transparent;border-bottom:10px solid white}.duet-tooltip.duet-tooltip-down::before{top:-22px;bottom:auto;border:11px solid transparent;border-bottom:11px solid #e1e3e6}.duet-theme-turva .duet-tooltip.duet-tooltip-down::before{border-bottom:11px solid #e4e4e6}.duet-tooltip.duet-tooltip-left{right:-21px !important;transform-origin:100% 100% !important}.duet-tooltip.duet-tooltip-left::after{right:22px !important;transform:none !important}.duet-tooltip.duet-tooltip-left::before{right:21px !important;transform:none !important}.duet-tooltip.duet-tooltip-right{right:auto !important;left:-9px !important;transform-origin:100% 100% !important}.duet-tooltip.duet-tooltip-right::after{right:auto !important;left:22px !important;transform:none !important}.duet-tooltip.duet-tooltip-right::before{right:auto !important;left:21px !important;transform:none !important}.duet-tooltip.duet-tooltip-has-label{right:auto !important;left:0;width:282px !important;transform-origin:0 0 !important}.duet-tooltip.duet-tooltip-has-label::after{right:auto !important;left:1px !important;transform:none !important}.duet-tooltip.duet-tooltip-has-label::before{right:auto !important;left:0 !important;transform:none !important}.duet-tooltip.duet-tooltip-active{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(-8px)}.duet-tooltip.duet-tooltip-active.duet-tooltip-down{transform:scale(1.0001) translateZ(0) translateY(8px)}.duet-tooltip-button{z-index:100;display:inline-block;align-items:center;justify-content:center;min-width:48px;height:48px;padding:0 !important;margin-right:-12px;line-height:normal !important;color:#0077b3;white-space:nowrap;cursor:pointer;background:transparent !important;border-radius:4px}.duet-tooltip-button.duet-theme-turva{color:#c60c30}.duet-tooltip-button:hover{color:#004d80}.duet-tooltip-button:hover.duet-theme-turva{color:#940925}.duet-tooltip-button:focus{background:transparent !important;outline:0}:host(.user-is-tabbing) .duet-tooltip-button:focus{background:transparent !important;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}:host(.user-is-tabbing) .duet-tooltip-button.duet-theme-turva:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}.duet-tooltip-button svg{width:20px;height:20px;pointer-events:none}.duet-tooltip-button-has-label{margin-right:0}.duet-tooltip-scrollable{padding:20px !important;width:100%;max-height:250px;padding-right:25px !important;overflow-y:auto;-webkit-hyphens:auto;hyphens:auto;border-radius:4px;-webkit-overflow-scrolling:touch}.duet-tooltip-scrollable:focus{outline:none}:host(.user-is-tabbing) .duet-tooltip-scrollable: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 .duet-tooltip-scrollable:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-tooltip-scrollable::-webkit-scrollbar{width:4px}.duet-tooltip-scrollable::-webkit-scrollbar-track{border-radius:4px}.duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:#e1e3e6;border-radius:4px}.duet-theme-turva .duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:#e4e4e6}.duet-tooltip-label{position:relative;z-index:100;display:inline-block;max-width:calc(100% - 30px);margin-left:12px !important;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.25;text-align:left;white-space:normal;vertical-align:top}.duet-theme-turva .duet-tooltip-label{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.duet-tooltip-close{position:absolute;top:8px;right:8px;display:flex;align-items:center;justify-content:center;width:17px;height:17px;min-height:0 !important;padding:0 !important;margin:0 !important;line-height:normal;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;-webkit-appearance:none;appearance:none}.duet-tooltip-close:focus{outline:none;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva .duet-tooltip-close:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}@media (min-width: 48em){.duet-tooltip.duet-mq-medium{right:-148px;width:320px;transform-origin:50% 100%}.duet-tooltip.duet-mq-medium::after{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-medium::before{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-medium.duet-tooltip-down{transform-origin:50% 0}}@media (min-width: 62em){.duet-tooltip.duet-mq-large{right:-148px;width:320px;transform-origin:50% 100%}.duet-tooltip.duet-mq-large::after{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-large::before{right:50%;transform:translateX(50%)}.duet-tooltip.duet-mq-large.duet-tooltip-down{transform-origin:50% 0}}';var u=t("duet_tooltip",function(){function t(t){var o=this;e(this,t);this.tooltipId=a("DuetTooltip");this.lastScrollTop=0;this.openTooltip=function(){o.focusTarget="tooltip";o.active=true};this.closeTooltip=function(t){if(t===void 0){t=false}if(t){o.focusTarget="trigger"}o.active=false};this.toggleOpen=function(){o.active?o.closeTooltip():o.openTooltip()};this.handleFocusOut=function(t){if(!o.active){return}var e=t.relatedTarget;if(e==null||o.element.shadowRoot.contains(e)||o.element.contains(e)){return}o.closeTooltip()};this.handleKeyDown=function(t){var e=t.keyCode===27;var i=t.target===o.scrollableEl&&t.shiftKey&&t.keyCode===9;if(e||i){o.closeTooltip(true)}};this.handleCloseClick=function(){o.closeTooltip(true)};this.isElementInViewportVertically=function(){if(!o.tooltipEl){return false}var t=o.tooltipEl.getBoundingClientRect();return t.top>=100&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)};this.handleVerticalVisibility=function(){var t=window.pageYOffset||document.documentElement.scrollTop;if(!o.isElementInViewportVertically()){o.openDown=t>o.lastScrollTop}o.lastScrollTop=Math.max(0,t)};this.handleHorizontalVisibility=function(){var t=o.tooltipEl.getBoundingClientRect();var e=t.left>=0;var i=t.right<(window.innerWidth||document.documentElement.clientWidth);if(!e||o.direction!=="right"&&o.openRight){o.openRight=true}else{o.openRight=o.direction==="right"}if(!i||o.direction!=="left"&&o.openLeft){o.openLeft=true}else{o.openLeft=o.direction==="left"}};this.openDown=false;this.openLeft=false;this.openRight=false;this.theme="";this.language=l();this.accessibleLabelDefault={fi:"Näytä lisätietoja",en:"Show more information",sv:"Visa mer tilläggsuppgifter"};this.accessibleLabel=s(this.accessibleLabelDefault,this.language);this.accessibleInputLabel=undefined;this.accessibleCloseLabelDefault={fi:"Sulje lisätiedot",en:"Close details",sv:"Stäng tilläggsuppgifter"};this.accessibleCloseLabel=s(this.accessibleCloseLabelDefault,this.language);this.label="";this.breakpoint="medium";this.direction="auto";this.positionVertical="0";this.positionHorizontal="0";this.active=false}t.prototype.componentWillLoad=function(){r(this)};t.prototype.componentDidUpdate=function(){switch(this.focusTarget){case"tooltip":this.scrollableEl.focus({preventScroll:true});break;case"trigger":this.buttonEl.focus({preventScroll:true});break}this.focusTarget=null};t.prototype.onScroll=function(){var t=this;clearTimeout(this.scrollTimer);this.scrollTimer=setTimeout((function(){if(t.active){t.handleHorizontalVisibility();t.handleVerticalVisibility()}}),100)};t.prototype.handleDocumentClick=function(t){var e=this;if(!this.active){return}var o=t.composedPath();var i=o.every((function(t){return t!==e.element}));if(i){this.closeTooltip()}};t.prototype.handleActiveChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(o){if(t){this.handleHorizontalVisibility();this.openDown=!this.isElementInViewportVertically()}else{setTimeout((function(){return e.openDown=false}),300)}return[2]}))}))};t.prototype.render=function(){var t=this;var e={transform:"translateY(".concat(this.positionVertical,") translateX(").concat(this.positionHorizontal,")"),zIndex:this.active?"201":""};return o(i,{style:e},o("button",{ref:function(e){return t.buttonEl=e},"aria-controls":this.tooltipId,"aria-expanded":this.active?"true":"false",onClick:this.toggleOpen,type:"button",class:{"duet-tooltip-button":true,"duet-tooltip-button-has-label":!!this.label,"duet-theme-turva":this.theme==="turva"}},o("svg",{"aria-hidden":"true",role:"img",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"m13.5 17.25c-1.241 0-2.25-1.009-2.25-2.25v-3.75h-.75c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h.75c.827 0 1.5.673 1.5 1.5v3.75c0 .414.336.75.75.75h.75c.414 0 .75.336.75.75s-.336.75-.75.75z"}),o("circle",{cx:"11.625",cy:"7.125",r:"1.125"}),o("path",{d:"m12 24c-6.617 0-12-5.383-12-12s5.383-12 12-12 12 5.383 12 12-5.383 12-12 12zm0-22.5c-5.79 0-10.5 4.71-10.5 10.5s4.71 10.5 10.5 10.5 10.5-4.71 10.5-10.5-4.71-10.5-10.5-10.5z"})),this.label?o("span",{class:"duet-tooltip-label"},this.label):o("duet-visually-hidden",null,this.accessibleInputLabel?"".concat(this.accessibleInputLabel,", ").concat(this.accessibleLabel):this.accessibleLabel)),o("div",{ref:function(e){return t.tooltipEl=e},class:{"duet-tooltip":true,"duet-mq-large":this.breakpoint==="large","duet-mq-medium":this.breakpoint==="medium","duet-theme-turva":this.theme==="turva","duet-tooltip-down":this.openDown,"duet-tooltip-has-label":!!this.label,"duet-tooltip-left":this.openLeft,"duet-tooltip-right":this.openRight,"duet-tooltip-active":this.active===true},onClick:function(t){return t.stopPropagation()},onKeyDown:this.handleKeyDown,onFocusout:this.handleFocusOut},o("div",{ref:function(e){return t.scrollableEl=e},class:"duet-tooltip-scrollable",tabindex:"0",id:this.tooltipId},o("slot",null)),o("button",{type:"button",class:"duet-tooltip-close",onClick:this.handleCloseClick},o("duet-icon",{name:"navigation-close-small",margin:"none",color:"currentColor",size:"xxx-small"}),o("duet-visually-hidden",null,this.accessibleCloseLabel))))};Object.defineProperty(t.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{active:["handleActiveChange"]}},enumerable:false,configurable:true});return t}());u.style=p}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,a,i){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,r){function l(e){try{s(i.next(e))}catch(t){r(t)}}function o(e){try{s(i["throw"](e))}catch(t){r(t)}}function s(e){e.done?a(e.value):n(e.value).then(l,o)}s((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,l;return l={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(t){return s([e,t])}}function s(l){if(i)throw new TypeError("Generator is already executing.");while(a)try{if(i=1,n&&(r=l[0]&2?n["return"]:l[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,l[1])).done)return r;if(n=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:a.label++;return{value:l[1],done:false};case 5:a.label++;n=l[1];l=[0];continue;case 7:l=a.ops.pop();a.trys.pop();continue;default:if(!(r=a.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){a.label=l[1];break}if(l[0]===6&&a.label<r[1]){a.label=r[1];r=l;break}if(r&&a.label<r[2]){a.label=r[2];a.ops.push(l);break}if(r[2])a.ops.pop();a.trys.pop();continue}l=t.call(e,a)}catch(o){l=[6,o];n=0}finally{i=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,a){if(a||arguments.length===2)for(var i=0,n=t.length,r;i<n;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/System.register(["./p-6af671d6.system.js","./p-33b3aba4.system.js","./p-34ea0849.system.js","./p-a63f753e.system.js","./p-f69b64c9.system.js","./p-17063917.system.js","./p-5d46f619.system.js","./p-5f6bd5db.system.js","./p-b6d51921.system.js"],(function(e){"use strict";var t,a,i,n,r,l,o,s,d,u,p,f,c,h,b,m;return{setters:[function(e){t=e.h;a=e.r;i=e.c;n=e.H;r=e.g},function(e){l=e.i},function(e){o=e.f;s=e.d},function(e){d=e.i},function(e){u=e.g;p=e.s},function(e){f=e.q;c=e.s},function(e){h=e.b},function(e){b=e.c},function(e){m=e.p}],execute:function(){var g=function(e,a){var i=e.data,n=e.groupId,r=e.alignment;var l="duet-editable-table duet-editable-table-content-".concat(n);if(typeof i==="string"){return t("td",{innerHTML:i,class:l,part:"".concat(n,"content"),style:{verticalAlign:r}})}else{return t("td",{class:l,part:"".concat(n,"content"),style:{verticalAlign:r}},i)}};var y=".sc-duet-editable-table-h{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.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";var v=e("duet_editable_table",function(){function e(e){var t=this;a(this,e);this.duetTableToggle=i(this,"duetTableToggle",7);this.duetMenuClick=i(this,"duetMenuClick",7);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,a){a.preventDefault();var i=e.sort_order,n=e.direction,r=e.index,l=e.key;t.duetTableToggle.emit({sort_order:i,index:r,direction:n,key:l,component:"duet-editable-table",originalEvent:a})};this.handleKeyDown=function(e,a){if(d(a)){t.toggleColumn(e,a)}};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}e.prototype.componentWillLoad=function(){l(this)};e.prototype.createLabel=function(e){var a=this;var i=e.sort_order,n=e.direction,r=e.index,l=e.label;var o=u(l);if(!this.sortable){return o}var s=function(){if(!!i&&n===1){return"action-arrow-down-small"}else if(!!i&&n===-1){return"action-arrow-up-small"}return"action-subtract-small"};return t("span",{class:"duet-table-label","data-index":r},t("duet-button",{size:"small",icon:s(),"icon-size":"medium-small","accessible-label":u(this.sortableDefaultLabel),variation:"plain",margin:"none","icon-right":true,onClick:function(t){return a.toggleColumn(e,t)},onKeyDown:function(t){return a.handleKeyDown(e,t)}},o))};e.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(o(["index"]))};e.prototype.getRowSortOrder=function(){var e=__spreadArray([],this.columns,true).sort(o(["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 a=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},a.map((function(a){if(a.display!==false){var i=e.createLabel(a);return i!==""?t("th",{scope:"col"},i):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,u(this.actionColumnLabel))))};e.prototype.renderActions=function(e,a){var i=this;if(!this.actions){return}return t("td",{class:"duet-text-right"},this.actions.map((function(n){return t("duet-action-button",{actionMeta:Object.assign({},(e===null||e===void 0?void 0:e.meta)||{},{index:a}),actionId:(e===null||e===void 0?void 0:e.uid)||(e===null||e===void 0?void 0:e.id)||null,actionName:n.name,theme:i.theme,iconName:n.icon,iconColor:n.color,iconSize:n.size,background:n.background,"accessible-label":"".concat(u(n.label)," ").concat(e.name||"")})})))};e.prototype.renderTableBody=function(){var e=this;var a=this.getSortedColumns();var i=this.getRowSortOrder();var n=__spreadArray([],this.rows,true).sort(o(i));return n.map((function(i,n){var r;return t("tr",{class:(r={"duet-table-action-row":!!e.actions,"duet-editable-table-row":true},r["duet-editable-table-row-".concat(e.groupId)]=true,r),"data-meta":JSON.stringify(i.meta)},a.map((function(a){var n=i[a.key]?i[a.key]:i.item;if(a.display!==false){return t(g,{data:n,groupId:e.groupId})}})),e.actions&&e.renderActions(i,n))}))};e.prototype.render=function(){var e;return t(n,{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)},t("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),t("tfoot",null,t("tr",null,t("th",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());v.style=y;var x='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{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;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{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-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;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%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';var k={none:0,"with-links":parseFloat(f)*16,"without-links":parseFloat(c)*16};var w=e("duet_table",function(){function e(e){var t=this;a(this,e);this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu";this.handleMediaQueryChange=function(e){t.matchesBreakpoint=e.matches};this.matchesBreakpoint=true;this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small"}e.prototype.connectedCallback=function(){var e=this;var t=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":h[this.breakpoint];this.mq=matchMedia(t);this.mq.addEventListener("change",s(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return s(e.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){l(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=k[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};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll(this.headingSelector);var t=this.element.querySelectorAll("tbody tr");var a=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(a[t]){e.dataset.heading=a[t]}}))}))};e.prototype.render=function(){var e;return t(n,{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)},t("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());w.style=x;var D=[{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-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."}}];var M=function(e,t){var a={type:undefined,system_message:undefined,message:undefined};t=m(t);a=t.filter((function(t){return t.type==e}))[0];if(!a){a=t.filter((function(e){return e.type==="default"}))[0]}return a};var _=function(e,t){var a=M(e,t);var i=u(a.message);if(i===""||!i){return a.system_message}else{return i}};var I=function(e){var a=e.data,i=e.errorCodes;var n=a.item,r=a.error;var l=n.name;var o=r.type;return t("span",{class:"duet-upload-item-error",role:"status"},t("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),l),t("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},_(o,i)))};var z=function(e){var a=e.progress,i=e.name;return t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),i,t("br",null),t("duet-progress",{progress:Math.ceil(a),"aria-hidden":true}))};var F=function(e){var a=e.name;return t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),a)};var E=function(e,t){if(t===void 0){t=2}if(e===0){return"0 Bytes"}var a=1024;var i=t<0?0:t;var n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var r=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,r)).toFixed(i))+" "+n[r]};var T=function(e){var a=e.data,i=e.showLinks;var n=a.item,r=a.size,l=a.uploaded,o=a.url,s=a.meta;var d=n.name;var u=t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),d);var p=t("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",E(r),")");var f=l&&o&&i?t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},t("duet-link",{url:o,external:true},u),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),p):t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},u,t("duet-spacer",{size:"xx-small",direction:"horizontal"}),p);var c=s&&s.badges?t("span",null,t("duet-spacer",{size:"xx-small"}),s.badges.map((function(e){return t("duet-badge",{color:"primary"},e)}))):undefined;return t("span",{class:"duet-upload-item-success"},t("div",null,f),c)};var S=function(e,t){if(!t){return true}var a=e.split(".");var i=t.split(",");var n=a[a.length-1];return i.includes(n)};var L=function(e,t){if(!t||!e){return true}var a=t.split(",");var i=false;a.forEach((function(t){var a=t.split("/");var n=e.split("/");if(a[0]===n[0]&&(a[1]===n[1]||a[1]==="*")){i=true}}));return i};var C=function(e,t){if(!t||!e){return true}return t>=e};var A=function(e,t,a){var i=t.allowedMimetypes,n=t.allowedExtensions,r=t.maxBytes;var l=false;var o=M("default",a);if(e){var s=e.name,d=e.type,p=e.size;var f=L(d,i);var c=n==="all"||n===""||n===" "||n===undefined?true:S(s.toLowerCase(),n);var h=C(p,r);if(!f){o=M("duet-upload-101",a)}if(!c){o=M("duet-upload-100",a)}if(!h){o=M("duet-upload-201",a)}l=f&&c&&h}else{l=false}return{valid:l,errorMessage:l?undefined:u(o.message),errorSystem:l?undefined:o.system_message,errorType:l?undefined:o.type}};var P=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));if(a>t){return true}}return false};var B=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid){a++}}));if(a>t){return true}}return false};var R=function(e){var t=e.payload,a=e.options,i=e.onFailure,n=e.onSuccess,r=e.onProgress;var l=a.type,o=l===void 0?"POST":l,s=a.xhr,d=a.uri,u=a.argument,p=u===void 0?null:u,f=a.headers,c=f===void 0?null:f;s.open(o,"".concat(d).concat(p||""),true);var h=t.data,b=t.name;if(c){Object.keys(c).forEach((function(e){s.setRequestHeader(e,c[e])}))}if(o==="POST"){s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&s.status>=200&&s.status<300){n(s,b,s.status)}if(s.readyState===XMLHttpRequest.DONE&&s.status>=300&&s.status<999){i(s,b,s.status)}};r(b)}s.send(h);return s};var j="*,*::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}.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:#f5f8fa}.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-upload-editable-table .duet-upload-item-name duet-icon{position:relative;top:2px}duet-paragraph::part(duet-paragraph){word-break:break-word}";var V=e("duet_upload",function(){function e(e){var n=this;a(this,e);this.duetChange=i(this,"duetChange",3);this.duetBlur=i(this,"duetBlur",7);this.duetFocus=i(this,"duetFocus",7);this.duetReady=i(this,"duetReady",7);this.duetDone=i(this,"duetDone",3);this.duetState=i(this,"duetState",3);this.duetDelete=i(this,"duetDelete",3);this.duetCancel=i(this,"duetCancel",3);this.duetProgress=i(this,"duetProgress",3);this.duetUpload=i(this,"duetUpload",3);this.buttonId=b("DuetButton");this.labelId=b("DuetLabel");this.uploadId=b("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.internalStatusMessageLabel=undefined;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=s((function(){n.tick=Date.now()}),30);this.listenForActionEvents=function(){n.element.addEventListener("duetActionEvent",(function(e){var t=e.detail;var a=t.action,i=t.id,r=t.originalEvent;switch(a){case"delete":n.onDelete(i,r);break;case"cancel":n.onCancel(i,r);break}}))};this.verifyValidity=function(){var e=n.getFilesAsArray(),t=e.invalid,a=e.valid;var i=n.valid;n.valid=t.length===0&&a.length!==0;if(n.valid!==i){n.duetState.emit({originalEvent:undefined,data:{valid:n.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){return n.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return n.DefaultGroups.inprogress}else if(!e.valid){return n.DefaultGroups.failure}else if(e.pending){return n.DefaultGroups.pending}else if(e.group){return e.group}else{return"none"}};this.getItemHTMLFromItemData=function(e,a){if(a===n.DefaultGroups.success){return t(T,{data:e,showLinks:n.showLinks})}else if(a===n.DefaultGroups.inprogress){return t(z,{progress:e.progress,name:e.item.name})}else if(a===n.DefaultGroups.pending){return t(F,{name:e.item.name})}else if(a===n.DefaultGroups.failure){return t(I,{data:e,errorCodes:n.errorCodes})}else if(e.group){return e.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,t,a,i){if(i===void 0){i=true}try{var r=n.files.get(e);r[t]=a;n.files.set(e,r)}catch(l){}if(i){n.kick()}};this.updateProgress=function(e,t){var a=function(a){n.updateValueInMap(t,"progress",a);n.onProgress(t,a,e)};if(e.lengthComputable){var i=e.loaded/e.total*100;a(i)}else{console.log("cant read progress")}};this.trackProgress=function(e,t){if(t===void 0){t=false}if(t){n.filesInProgress.delete(e)}else{n.filesInProgress.set(e,"inprogress")}if(n.filesInProgress.size===0){n.onDone()}};this.getFilesAsArray=function(){var e=[];var t=[];n.files.forEach((function(a){if(a.valid&&!a.deleted){e.push(a)}else if(!a.valid&&!a.deleted){t.push(a)}}));return{valid:e,invalid:t}};this.resetFormFields=function(){n.nativeInput.value=""};this.startUpload=function(e,t){if(t===void 0){t=undefined}return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(a){this.metaData=t;this.nativeInput.click();this.onUpload(e,t);e.stopPropagation();e.preventDefault();return[2]}))}))};this.transferComplete=function(e){n.updateValueInMap(e,"progress",100,false);n.trackProgress(e,true)};this.transferDone=function(e,t,a){n.updateValueInMap(t,"status",a,false);n.updateValueInMap(t,"uploaded",true,false);try{var i=JSON.parse(e.response);n.updateValueInMap(t,"url",i.url)}catch(r){n.updateValueInMap(t,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,t,a){try{var i=JSON.parse(e.response).error;n.updateValueInMap(t,"error",{message:i.message,type:i.type},false)}catch(r){console.error("Server did not respond with expected response error:{message: string, type: int}");n.updateValueInMap(t,"error",{type:a},false)}n.updateValueInMap(t,"valid",false,true)};this.transferFailed=function(e){n.updateValueInMap(e,"error",_("duet-upload-001",n.errorCodes))};this.transferCanceled=function(e){n.files.delete(e);n.validateTotals(e);n.kick()};this.validateTotals=function(e){var t=P(n.files,n.maxBytesTotal);var a=B(n.files,n.maxFiles);if(t&&e){n.updateValueInMap(e,"error",_("duet-upload-202",n.errorCodes),false)}if(a&&e){n.updateValueInMap(e,"error",_("duet-upload-301",n.errorCodes),false)}n.bytesMaxReached=t;n.fileMaxReached=a;return{bytesMaxReached:t,fileMaxReached:a}};this.uploadFile=function(e,t,a){if(t===void 0){t=false}return __awaiter(n,void 0,void 0,(function(){var i,n,r;return __generator(this,(function(l){switch(l.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)}l.label=1;case 1:l.trys.push([1,4,,5]);if(!(!this.deferUpload||t))return[3,3];i=new FormData;i.append("file",e.item);if(a){i.append("key",a)}i.append("uid",e.uid);i.append("name",e.item.name);i.append("metadata",JSON.stringify({uid:e.uid,url:this.uri,size:e.item.size,meta:e.meta}));n=e;return[4,this.makeXHRPostRequest(i)];case 2:n.xhr=l.sent();l.label=3;case 3:return[3,5];case 4:r=l.sent();this.updateValueInMap(e.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var e=0,t=n.files.entries();e<t.length;e++){var a=t[e],i=a[0],r=a[1];if(r.group==="pending"&&r.pending===true){n.uploadFile(r,true,i)}}};this.getItemFromUID=function(e){for(var t=0,a=n.files.entries();t<a.length;t++){var i=a[t],r=i[0],l=i[1];if(l.uid===e){return{value:l,key:r}}}return null};this.onDelete=function(e,t){var a=n.getItemFromUID(e);var i=a.key;var r=n.files.get(i);n.files.delete(i);n.validateTotals();n.kick();n.duetDelete.emit({originalEvent:t,data:{deletion:r},component:"duet-upload"});if(!n.external&&!r.pending){n.makeXHRDeleteRequest(r)}n.resetFormFields()};this.onCancel=function(e,t){var a=n.getItemFromUID(e).key;var i=n.files.get(a);n.files.delete(a);if(!n.external){var r=i.xhr;if(r){r.abort()}}else{n.kick()}n.resetFormFields();n.duetCancel.emit({originalEvent:t,data:{cancelled:i},component:"duet-upload"})};this.onUpload=function(e,t){n.duetUpload.emit({originalEvent:e,metaData:t,component:"duet-upload"})};this.onBlur=function(e){n.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,t,a){n.duetChange.emit({originalEvent:a,data:{key:e,percentComplete:t},component:"duet-upload"})};this.onFocus=function(e){n.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onReady=function(){n.duetReady.emit({component:"duet-upload"})};this.onDone=function(){n.duetDone.emit({component:"duet-upload",data:{files:n.files}})};this.filterMap=function(){var e=__spreadArray([],n.files.values(),true);var t=[];var a=[];var i=[];var r=[];e.forEach((function(e){var l=n.getGroupFromItemData(e);var o=n.getItemHTMLFromItemData(e,l);if(l===n.DefaultGroups.success){r.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===n.DefaultGroups.inprogress){t.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===n.DefaultGroups.pending){i.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===n.DefaultGroups.failure){a.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(e.group){t.push({uid:e.uid,item:o,group:e.group,name:e.item.name})}}));return{pending:i,failure:a,success:r,inprogress:t}};this.getColumns=function(e){return[{sort_order:1,direction:-1,index:0,key:e.id,label:e.label}]};this.getActions=function(e){return n.actions.filter((function(t){return t.map.includes(e)}))};this.renderEditableTableGroups=function(){var e=n.filterMap();var a=n.groups.map((function(a){var i=e[a.id];if(!(i===null||i===void 0?void 0:i.length)){return}return t("duet-table",{variation:"plain",breakpoint:"none",role:"log",margin:n.hideGroups?"none":"auto"},t("table",{class:"duet-upload-editable-table"},t("thead",{class:"duet-upload-editable-table-header"},t("tr",null,t("th",{class:{"duet-upload-editable-table-header-hidden":n.hideGroups}},!n.hideGroups?u(a.label):t("duet-visually-hidden",null,u(a.label))))),t("tbody",null,t("tr",null,t("td",{class:"duet-upload-editable-table-data"},t("duet-editable-table",{breakpoint:"none",variation:"plain",groupId:a.id,columns:n.getColumns(a),actions:n.getActions(a.id),margin:"none",rows:i}))))))}));return a};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} lähetettävästä {filesTotal} tiedostosta",inProgressWithErrors:"Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",done:"Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",files:"tiedostot",file:"tiedosto"},sv:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Alla {filesTotal} har lagts till",doneWithErrors:"Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"All {filesTotal} added successfully",doneWithErrors:"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",files:"File",file:"file"}};this.statusMessageLabel=u(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=u(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=u(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=u(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=u(this.fileListEmptyDefaults);this.error="";this.errorCodes=D;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="*";this.multiple=true;this.limitSelection=false;this.value=undefined;this.groups=[{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}},{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"}}]}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=p(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}l(this);this.listenForActionEvents();this.onReady()};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(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setFocus()];case 1:t.sent();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,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(e,t,a);return[2]}))}))};e.prototype.render=function(){var e=this;var a=this.identifier||this.uploadId;var i=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var r=Math.round(this.maxBytes/1024/1024);var l=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());l=l.replace(/{maxbytes}/g,"".concat(r.toString()," MB"));l=l.replace(/{maxbytestotal}/g,"".concat(i.toString()," MB"));l=l.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));return t(n,{class:{"duet-m-0":this.margin==="none"}},t("duet-fieldset",{label:this.label,caption:l},t("slot",{name:"header"}),!this.files.size&&t("duet-label",{part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",theme:this.theme==="turva"?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":true,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:a},t("span",{class:{"duet-upload-filelist-empty-label":!this.files.size}},this.fileListEmpty)),!!this.files.size&&t("slot",{name:"fileheader"}),!!this.files.size&&t("duet-upload-aria-status",{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.renderEditableTableGroups(),!!this.files.size&&t("slot",{name:"filefooter"}),t("duet-spacer",{size:"large"}),!this.hideButton&&t("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":a,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":a,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?"".concat(this.identifier,"-button-upload"):"duet-upload-button-upload"},this.buttonLabel),t("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&t("duet-alert",{part:this.identifier?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&_("duet-upload-301",this.errorCodes),this.bytesMaxReached&&_("duet-upload-202",this.errorCodes)),t("duet-spacer",{size:"medium"}),t("duet-visually-hidden",{"aria-hidden":"true"},t("input",{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 a=new XMLHttpRequest;var i=e.get("name");a.upload.addEventListener("progress",(function(e){t.updateProgress(e,i)}));a.upload.addEventListener("load",(function(){t.transferComplete(i)}));a.upload.addEventListener("error",(function(){t.transferFailed(i)}));a.upload.addEventListener("abort",(function(){t.transferCanceled(i)}));var n={payload:{data:e,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){n=this.middleware(n)}return R(n)};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,a=e.item;var i=new XMLHttpRequest;var n={"x-fileuid":t,"x-filename":a.name};var r={payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:"?key=".concat(t,"&name=").concat(a.name),headers:n},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return R(r)};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,a,i,n,r,l,o,s,d,u,p,f,c,h,b;return __generator(this,(function(m){switch(m.label){case 0:a=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);if(!a)return[3,8];i=0,n=a;m.label=1;case 1:if(!(i<n.length))return[3,8];r=n[i];l=A(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),o=l.valid,s=l.errorMessage,d=l.errorType,u=l.errorSystem;p=this.genHashName();f={uid:p,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:d,message:o?undefined:s,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,f);c=this.validateTotals(r.name),h=c.bytesMaxReached,b=c.fileMaxReached;if(!h)return[3,2];this.updateValueInMap(r.name,"valid",false,false);return[3,6];case 2:if(!b)return[3,3];this.updateValueInMap(r.name,"valid",false,false);return[3,6];case 3:if(!(o&&!this.external))return[3,5];return[4,this.uploadFile(f)];case 4:m.sent();return[3,6];case 5:if(o&&this.external){this.updateValueInMap(f.item.name,"pending",true,false);this.updateValueInMap(f.item.name,"group","pending",true)}else if(!o){this.updateValueInMap(r.name,"valid",false,true)}m.label=6;case 6:this.kick();m.label=7;case 7:i++;return[3,1];case 8: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 r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}());V.style=j}}}));
|
|
4
|
+
*/System.register(["./p-601cc7ed.system.js","./p-33b3aba4.system.js","./p-34ea0849.system.js","./p-a63f753e.system.js","./p-f69b64c9.system.js","./p-17063917.system.js","./p-5d46f619.system.js","./p-5f6bd5db.system.js","./p-b6d51921.system.js"],(function(e){"use strict";var t,a,i,n,r,l,o,s,d,u,p,f,c,h,b,m;return{setters:[function(e){t=e.h;a=e.r;i=e.c;n=e.H;r=e.g},function(e){l=e.i},function(e){o=e.f;s=e.d},function(e){d=e.i},function(e){u=e.g;p=e.s},function(e){f=e.q;c=e.s},function(e){h=e.b},function(e){b=e.c},function(e){m=e.p}],execute:function(){var g=function(e,a){var i=e.data,n=e.groupId,r=e.alignment;var l="duet-editable-table duet-editable-table-content-".concat(n);if(typeof i==="string"){return t("td",{innerHTML:i,class:l,part:"".concat(n,"content"),style:{verticalAlign:r}})}else{return t("td",{class:l,part:"".concat(n,"content"),style:{verticalAlign:r}},i)}};var y=".sc-duet-editable-table-h{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.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";var v=e("duet_editable_table",function(){function e(e){var t=this;a(this,e);this.duetTableToggle=i(this,"duetTableToggle",7);this.duetMenuClick=i(this,"duetMenuClick",7);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,a){a.preventDefault();var i=e.sort_order,n=e.direction,r=e.index,l=e.key;t.duetTableToggle.emit({sort_order:i,index:r,direction:n,key:l,component:"duet-editable-table",originalEvent:a})};this.handleKeyDown=function(e,a){if(d(a)){t.toggleColumn(e,a)}};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}e.prototype.componentWillLoad=function(){l(this)};e.prototype.createLabel=function(e){var a=this;var i=e.sort_order,n=e.direction,r=e.index,l=e.label;var o=u(l);if(!this.sortable){return o}var s=function(){if(!!i&&n===1){return"action-arrow-down-small"}else if(!!i&&n===-1){return"action-arrow-up-small"}return"action-subtract-small"};return t("span",{class:"duet-table-label","data-index":r},t("duet-button",{size:"small",icon:s(),"icon-size":"medium-small","accessible-label":u(this.sortableDefaultLabel),variation:"plain",margin:"none","icon-right":true,onClick:function(t){return a.toggleColumn(e,t)},onKeyDown:function(t){return a.handleKeyDown(e,t)}},o))};e.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(o(["index"]))};e.prototype.getRowSortOrder=function(){var e=__spreadArray([],this.columns,true).sort(o(["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 a=this.getSortedColumns();return t("tr",{class:{"duet-table-action-header":!!this.actions}},a.map((function(a){if(a.display!==false){var i=e.createLabel(a);return i!==""?t("th",{scope:"col"},i):t("td",null)}})),this.actions&&t("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&t("duet-visually-hidden",null,u(this.actionColumnLabel))))};e.prototype.renderActions=function(e,a){var i=this;if(!this.actions){return}return t("td",{class:"duet-text-right"},this.actions.map((function(n){return t("duet-action-button",{actionMeta:Object.assign({},(e===null||e===void 0?void 0:e.meta)||{},{index:a}),actionId:(e===null||e===void 0?void 0:e.uid)||(e===null||e===void 0?void 0:e.id)||null,actionName:n.name,theme:i.theme,iconName:n.icon,iconColor:n.color,iconSize:n.size,background:n.background,"accessible-label":"".concat(u(n.label)," ").concat(e.name||"")})})))};e.prototype.renderTableBody=function(){var e=this;var a=this.getSortedColumns();var i=this.getRowSortOrder();var n=__spreadArray([],this.rows,true).sort(o(i));return n.map((function(i,n){var r;return t("tr",{class:(r={"duet-table-action-row":!!e.actions,"duet-editable-table-row":true},r["duet-editable-table-row-".concat(e.groupId)]=true,r),"data-meta":JSON.stringify(i.meta)},a.map((function(a){var n=i[a.key]?i[a.key]:i.item;if(a.display!==false){return t(g,{data:n,groupId:e.groupId})}})),e.actions&&e.renderActions(i,n))}))};e.prototype.render=function(){var e;return t(n,{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)},t("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint},t("table",{role:this.accessibleRole},t("caption",null,t("slot",{name:"tcaption"})),t("thead",null,t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-first"}))),this.renderTableHeader(),t("tr",null,t("td",{class:"duet-editable-table-actions-menu",colSpan:99},t("slot",{name:"thead-last"})))),t("tbody",null,this.renderTableBody()),t("tfoot",null,t("tr",null,t("th",{class:"duet-editable-table-footer-menu",colSpan:99},t("slot",{name:"tfoot"})))))))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());v.style=y;var x='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{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;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{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-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;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%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';var k={none:0,"with-links":parseFloat(f)*16,"without-links":parseFloat(c)*16};var w=e("duet_table",function(){function e(e){var t=this;a(this,e);this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu";this.handleMediaQueryChange=function(e){t.matchesBreakpoint=e.matches};this.matchesBreakpoint=true;this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small"}e.prototype.connectedCallback=function(){var e=this;var t=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":h[this.breakpoint];this.mq=matchMedia(t);this.mq.addEventListener("change",s(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return s(e.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){l(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=k[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};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll(this.headingSelector);var t=this.element.querySelectorAll("tbody tr");var a=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(a[t]){e.dataset.heading=a[t]}}))}))};e.prototype.render=function(){var e;return t(n,{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)},t("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());w.style=x;var D=[{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-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."}}];var M=function(e,t){var a={type:undefined,system_message:undefined,message:undefined};t=m(t);a=t.filter((function(t){return t.type==e}))[0];if(!a){a=t.filter((function(e){return e.type==="default"}))[0]}return a};var _=function(e,t){var a=M(e,t);var i=u(a.message);if(i===""||!i){return a.system_message}else{return i}};var I=function(e){var a=e.data,i=e.errorCodes;var n=a.item,r=a.error;var l=n.name;var o=r.type;return t("span",{class:"duet-upload-item-error",role:"status"},t("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),l),t("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},_(o,i)))};var z=function(e){var a=e.progress,i=e.name;return t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),i,t("br",null),t("duet-progress",{progress:Math.ceil(a),"aria-hidden":true}))};var F=function(e){var a=e.name;return t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),a)};var E=function(e,t){if(t===void 0){t=2}if(e===0){return"0 Bytes"}var a=1024;var i=t<0?0:t;var n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var r=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,r)).toFixed(i))+" "+n[r]};var T=function(e){var a=e.data,i=e.showLinks;var n=a.item,r=a.size,l=a.uploaded,o=a.url,s=a.meta;var d=n.name;var u=t("span",{class:"duet-upload-item-name"},t("duet-icon",{margin:"none",size:"x-small",name:"messaging-attachment"}),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),d);var p=t("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",E(r),")");var f=l&&o&&i?t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},t("duet-link",{url:o,external:true},u),t("duet-spacer",{size:"xx-small",direction:"horizontal"}),p):t("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},u,t("duet-spacer",{size:"xx-small",direction:"horizontal"}),p);var c=s&&s.badges?t("span",null,t("duet-spacer",{size:"xx-small"}),s.badges.map((function(e){return t("duet-badge",{color:"primary"},e)}))):undefined;return t("span",{class:"duet-upload-item-success"},t("div",null,f),c)};var S=function(e,t){if(!t){return true}var a=e.split(".");var i=t.split(",");var n=a[a.length-1];return i.includes(n)};var L=function(e,t){if(!t||!e){return true}var a=t.split(",");var i=false;a.forEach((function(t){var a=t.split("/");var n=e.split("/");if(a[0]===n[0]&&(a[1]===n[1]||a[1]==="*")){i=true}}));return i};var C=function(e,t){if(!t||!e){return true}return t>=e};var A=function(e,t,a){var i=t.allowedMimetypes,n=t.allowedExtensions,r=t.maxBytes;var l=false;var o=M("default",a);if(e){var s=e.name,d=e.type,p=e.size;var f=L(d,i);var c=n==="all"||n===""||n===" "||n===undefined?true:S(s.toLowerCase(),n);var h=C(p,r);if(!f){o=M("duet-upload-101",a)}if(!c){o=M("duet-upload-100",a)}if(!h){o=M("duet-upload-201",a)}l=f&&c&&h}else{l=false}return{valid:l,errorMessage:l?undefined:u(o.message),errorSystem:l?undefined:o.system_message,errorType:l?undefined:o.type}};var P=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));if(a>t){return true}}return false};var B=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid){a++}}));if(a>t){return true}}return false};var R=function(e){var t=e.payload,a=e.options,i=e.onFailure,n=e.onSuccess,r=e.onProgress;var l=a.type,o=l===void 0?"POST":l,s=a.xhr,d=a.uri,u=a.argument,p=u===void 0?null:u,f=a.headers,c=f===void 0?null:f;s.open(o,"".concat(d).concat(p||""),true);var h=t.data,b=t.name;if(c){Object.keys(c).forEach((function(e){s.setRequestHeader(e,c[e])}))}if(o==="POST"){s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&s.status>=200&&s.status<300){n(s,b,s.status)}if(s.readyState===XMLHttpRequest.DONE&&s.status>=300&&s.status<999){i(s,b,s.status)}};r(b)}s.send(h);return s};var j="*,*::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}.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:#f5f8fa}.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-upload-editable-table .duet-upload-item-name duet-icon{position:relative;top:2px}duet-paragraph::part(duet-paragraph){word-break:break-word}";var V=e("duet_upload",function(){function e(e){var n=this;a(this,e);this.duetChange=i(this,"duetChange",3);this.duetBlur=i(this,"duetBlur",7);this.duetFocus=i(this,"duetFocus",7);this.duetReady=i(this,"duetReady",7);this.duetDone=i(this,"duetDone",3);this.duetState=i(this,"duetState",3);this.duetDelete=i(this,"duetDelete",3);this.duetCancel=i(this,"duetCancel",3);this.duetProgress=i(this,"duetProgress",3);this.duetUpload=i(this,"duetUpload",3);this.buttonId=b("DuetButton");this.labelId=b("DuetLabel");this.uploadId=b("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.internalStatusMessageLabel=undefined;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=s((function(){n.tick=Date.now()}),30);this.listenForActionEvents=function(){n.element.addEventListener("duetActionEvent",(function(e){var t=e.detail;var a=t.action,i=t.id,r=t.originalEvent;switch(a){case"delete":n.onDelete(i,r);break;case"cancel":n.onCancel(i,r);break}}))};this.verifyValidity=function(){var e=n.getFilesAsArray(),t=e.invalid,a=e.valid;var i=n.valid;n.valid=t.length===0&&a.length!==0;if(n.valid!==i){n.duetState.emit({originalEvent:undefined,data:{valid:n.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){return n.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return n.DefaultGroups.inprogress}else if(!e.valid){return n.DefaultGroups.failure}else if(e.pending){return n.DefaultGroups.pending}else if(e.group){return e.group}else{return"none"}};this.getItemHTMLFromItemData=function(e,a){if(a===n.DefaultGroups.success){return t(T,{data:e,showLinks:n.showLinks})}else if(a===n.DefaultGroups.inprogress){return t(z,{progress:e.progress,name:e.item.name})}else if(a===n.DefaultGroups.pending){return t(F,{name:e.item.name})}else if(a===n.DefaultGroups.failure){return t(I,{data:e,errorCodes:n.errorCodes})}else if(e.group){return e.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,t,a,i){if(i===void 0){i=true}try{var r=n.files.get(e);r[t]=a;n.files.set(e,r)}catch(l){}if(i){n.kick()}};this.updateProgress=function(e,t){var a=function(a){n.updateValueInMap(t,"progress",a);n.onProgress(t,a,e)};if(e.lengthComputable){var i=e.loaded/e.total*100;a(i)}else{console.log("cant read progress")}};this.trackProgress=function(e,t){if(t===void 0){t=false}if(t){n.filesInProgress.delete(e)}else{n.filesInProgress.set(e,"inprogress")}if(n.filesInProgress.size===0){n.onDone()}};this.getFilesAsArray=function(){var e=[];var t=[];n.files.forEach((function(a){if(a.valid&&!a.deleted){e.push(a)}else if(!a.valid&&!a.deleted){t.push(a)}}));return{valid:e,invalid:t}};this.resetFormFields=function(){n.nativeInput.value=""};this.startUpload=function(e,t){if(t===void 0){t=undefined}return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(a){this.metaData=t;this.nativeInput.click();this.onUpload(e,t);e.stopPropagation();e.preventDefault();return[2]}))}))};this.transferComplete=function(e){n.updateValueInMap(e,"progress",100,false);n.trackProgress(e,true)};this.transferDone=function(e,t,a){n.updateValueInMap(t,"status",a,false);n.updateValueInMap(t,"uploaded",true,false);try{var i=JSON.parse(e.response);n.updateValueInMap(t,"url",i.url)}catch(r){n.updateValueInMap(t,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,t,a){try{var i=JSON.parse(e.response).error;n.updateValueInMap(t,"error",{message:i.message,type:i.type},false)}catch(r){console.error("Server did not respond with expected response error:{message: string, type: int}");n.updateValueInMap(t,"error",{type:a},false)}n.updateValueInMap(t,"valid",false,true)};this.transferFailed=function(e){n.updateValueInMap(e,"error",_("duet-upload-001",n.errorCodes))};this.transferCanceled=function(e){n.files.delete(e);n.validateTotals(e);n.kick()};this.validateTotals=function(e){var t=P(n.files,n.maxBytesTotal);var a=B(n.files,n.maxFiles);if(t&&e){n.updateValueInMap(e,"error",_("duet-upload-202",n.errorCodes),false)}if(a&&e){n.updateValueInMap(e,"error",_("duet-upload-301",n.errorCodes),false)}n.bytesMaxReached=t;n.fileMaxReached=a;return{bytesMaxReached:t,fileMaxReached:a}};this.uploadFile=function(e,t,a){if(t===void 0){t=false}return __awaiter(n,void 0,void 0,(function(){var i,n,r;return __generator(this,(function(l){switch(l.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)}l.label=1;case 1:l.trys.push([1,4,,5]);if(!(!this.deferUpload||t))return[3,3];i=new FormData;i.append("file",e.item);if(a){i.append("key",a)}i.append("uid",e.uid);i.append("name",e.item.name);i.append("metadata",JSON.stringify({uid:e.uid,url:this.uri,size:e.item.size,meta:e.meta}));n=e;return[4,this.makeXHRPostRequest(i)];case 2:n.xhr=l.sent();l.label=3;case 3:return[3,5];case 4:r=l.sent();this.updateValueInMap(e.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var e=0,t=n.files.entries();e<t.length;e++){var a=t[e],i=a[0],r=a[1];if(r.group==="pending"&&r.pending===true){n.uploadFile(r,true,i)}}};this.getItemFromUID=function(e){for(var t=0,a=n.files.entries();t<a.length;t++){var i=a[t],r=i[0],l=i[1];if(l.uid===e){return{value:l,key:r}}}return null};this.onDelete=function(e,t){var a=n.getItemFromUID(e);var i=a.key;var r=n.files.get(i);n.files.delete(i);n.validateTotals();n.kick();n.duetDelete.emit({originalEvent:t,data:{deletion:r},component:"duet-upload"});if(!n.external&&!r.pending){n.makeXHRDeleteRequest(r)}n.resetFormFields()};this.onCancel=function(e,t){var a=n.getItemFromUID(e).key;var i=n.files.get(a);n.files.delete(a);if(!n.external){var r=i.xhr;if(r){r.abort()}}else{n.kick()}n.resetFormFields();n.duetCancel.emit({originalEvent:t,data:{cancelled:i},component:"duet-upload"})};this.onUpload=function(e,t){n.duetUpload.emit({originalEvent:e,metaData:t,component:"duet-upload"})};this.onBlur=function(e){n.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,t,a){n.duetChange.emit({originalEvent:a,data:{key:e,percentComplete:t},component:"duet-upload"})};this.onFocus=function(e){n.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onReady=function(){n.duetReady.emit({component:"duet-upload"})};this.onDone=function(){n.duetDone.emit({component:"duet-upload",data:{files:n.files}})};this.filterMap=function(){var e=__spreadArray([],n.files.values(),true);var t=[];var a=[];var i=[];var r=[];e.forEach((function(e){var l=n.getGroupFromItemData(e);var o=n.getItemHTMLFromItemData(e,l);if(l===n.DefaultGroups.success){r.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===n.DefaultGroups.inprogress){t.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===n.DefaultGroups.pending){i.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(l===n.DefaultGroups.failure){a.push({uid:e.uid,item:o,group:l,name:e.item.name})}else if(e.group){t.push({uid:e.uid,item:o,group:e.group,name:e.item.name})}}));return{pending:i,failure:a,success:r,inprogress:t}};this.getColumns=function(e){return[{sort_order:1,direction:-1,index:0,key:e.id,label:e.label}]};this.getActions=function(e){return n.actions.filter((function(t){return t.map.includes(e)}))};this.renderEditableTableGroups=function(){var e=n.filterMap();var a=n.groups.map((function(a){var i=e[a.id];if(!(i===null||i===void 0?void 0:i.length)){return}return t("duet-table",{variation:"plain",breakpoint:"none",role:"log",margin:n.hideGroups?"none":"auto"},t("table",{class:"duet-upload-editable-table"},t("thead",{class:"duet-upload-editable-table-header"},t("tr",null,t("th",{class:{"duet-upload-editable-table-header-hidden":n.hideGroups}},!n.hideGroups?u(a.label):t("duet-visually-hidden",null,u(a.label))))),t("tbody",null,t("tr",null,t("td",{class:"duet-upload-editable-table-data"},t("duet-editable-table",{breakpoint:"none",variation:"plain",groupId:a.id,columns:n.getColumns(a),actions:n.getActions(a.id),margin:"none",rows:i}))))))}));return a};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} lähetettävästä {filesTotal} tiedostosta",inProgressWithErrors:"Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",done:"Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",files:"tiedostot",file:"tiedosto"},sv:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Alla {filesTotal} har lagts till",doneWithErrors:"Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Adding {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"All {filesTotal} added successfully",doneWithErrors:"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",files:"File",file:"file"}};this.statusMessageLabel=u(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=u(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=u(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=u(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=u(this.fileListEmptyDefaults);this.error="";this.errorCodes=D;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="*";this.multiple=true;this.limitSelection=false;this.value=undefined;this.groups=[{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}},{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"}}]}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=p(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}l(this);this.listenForActionEvents();this.onReady()};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(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setFocus()];case 1:t.sent();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,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(e,t,a);return[2]}))}))};e.prototype.render=function(){var e=this;var a=this.identifier||this.uploadId;var i=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var r=Math.round(this.maxBytes/1024/1024);var l=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());l=l.replace(/{maxbytes}/g,"".concat(r.toString()," MB"));l=l.replace(/{maxbytestotal}/g,"".concat(i.toString()," MB"));l=l.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));return t(n,{class:{"duet-m-0":this.margin==="none"}},t("duet-fieldset",{label:this.label,caption:l},t("slot",{name:"header"}),!this.files.size&&t("duet-label",{part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",theme:this.theme==="turva"?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":true,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:a},t("span",{class:{"duet-upload-filelist-empty-label":!this.files.size}},this.fileListEmpty)),!!this.files.size&&t("slot",{name:"fileheader"}),!!this.files.size&&t("duet-upload-aria-status",{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.renderEditableTableGroups(),!!this.files.size&&t("slot",{name:"filefooter"}),t("duet-spacer",{size:"large"}),!this.hideButton&&t("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":a,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":a,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?"".concat(this.identifier,"-button-upload"):"duet-upload-button-upload"},this.buttonLabel),t("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&t("duet-alert",{part:this.identifier?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&_("duet-upload-301",this.errorCodes),this.bytesMaxReached&&_("duet-upload-202",this.errorCodes)),t("duet-spacer",{size:"medium"}),t("duet-visually-hidden",{"aria-hidden":"true"},t("input",{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 a=new XMLHttpRequest;var i=e.get("name");a.upload.addEventListener("progress",(function(e){t.updateProgress(e,i)}));a.upload.addEventListener("load",(function(){t.transferComplete(i)}));a.upload.addEventListener("error",(function(){t.transferFailed(i)}));a.upload.addEventListener("abort",(function(){t.transferCanceled(i)}));var n={payload:{data:e,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){n=this.middleware(n)}return R(n)};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,a=e.item;var i=new XMLHttpRequest;var n={"x-fileuid":t,"x-filename":a.name};var r={payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:"?key=".concat(t,"&name=").concat(a.name),headers:n},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return R(r)};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,a,i,n,r,l,o,s,d,u,p,f,c,h,b;return __generator(this,(function(m){switch(m.label){case 0:a=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);if(!a)return[3,8];i=0,n=a;m.label=1;case 1:if(!(i<n.length))return[3,8];r=n[i];l=A(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),o=l.valid,s=l.errorMessage,d=l.errorType,u=l.errorSystem;p=this.genHashName();f={uid:p,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:d,message:o?undefined:s,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,f);c=this.validateTotals(r.name),h=c.bytesMaxReached,b=c.fileMaxReached;if(!h)return[3,2];this.updateValueInMap(r.name,"valid",false,false);return[3,6];case 2:if(!b)return[3,3];this.updateValueInMap(r.name,"valid",false,false);return[3,6];case 3:if(!(o&&!this.external))return[3,5];return[4,this.uploadFile(f)];case 4:m.sent();return[3,6];case 5:if(o&&this.external){this.updateValueInMap(f.item.name,"pending",true,false);this.updateValueInMap(f.item.name,"group","pending",true)}else if(!o){this.updateValueInMap(r.name,"valid",false,true)}m.label=6;case 6:this.kick();m.label=7;case 7:i++;return[3,1];case 8: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 r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}());V.style=j}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as t,H as n,g as a}from"./p-
|
|
4
|
+
import{r as e,h as t,H as n,g as a}from"./p-08219217.js";import{i as o}from"./p-4ebf1618.js";const r=class{constructor(t){e(this,t),this.theme=""}componentWillLoad(){o(this)}render(){return t(n,null,t("div",{class:{"duet-toolbar":!0,"duet-theme-turva":"turva"===this.theme},role:"menubar"},t("div",{class:"container"},t("slot",{name:"left"}),t("slot",{name:"right"}))))}get element(){return a(this)}};r.style="*,*::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;width:100%}.duet-toolbar{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;background:white}.duet-toolbar .container{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:1440px;height:36px;padding:0 28px;border-bottom:1px solid #e1e3e6}.duet-toolbar ::slotted(*){display:flex;align-items:center;justify-content:center;height:100%}.duet-toolbar.duet-theme-turva{background:white}.duet-toolbar.duet-theme-turva .container{border-bottom:1px solid #e4e4e6}";export{r as duet_toolbar}
|