@duetds/components 4.33.0 → 4.34.1
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 +487 -198
- package/lib/cjs/{dom-c850c8d7.js → dom-52a4f07a.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-button_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
- package/lib/cjs/duet-card.cjs.entry.js +2 -2
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +2 -3
- package/lib/cjs/duet-collapsible.cjs.entry.js +5 -453
- 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-button.cjs.entry.js +96 -0
- package/lib/cjs/{duet-upload.cjs.entry.js → duet-editable-table_4.cjs.entry.js} +463 -32
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +62 -0
- package/lib/cjs/duet-footer.cjs.entry.js +2 -2
- package/lib/cjs/duet-grid_2.cjs.entry.js +26 -3
- package/lib/cjs/duet-header_2.cjs.entry.js +220 -47
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +8 -6
- package/lib/cjs/duet-input_2.cjs.entry.js +3 -4
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-modal.cjs.entry.js +2 -2
- package/lib/cjs/duet-notification_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-number-input.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-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-tab_2.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-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 +100 -0
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +4 -4
- package/lib/cjs/{focus-utils-a7a1fb8b.js → focus-utils-30f5dc06.js} +1 -1
- package/lib/cjs/form-search-d61b2843.js +8 -0
- package/lib/cjs/{index-b724d698.js → index-1c10bbfb.js} +2 -2
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{shadow-css-e3edeed1.js → shadow-css-e1b62a99.js} +1 -1
- package/lib/cjs/token-utils-05bd23b4.js +77 -0
- package/lib/cjs/tokens-8596cece.js +459 -0
- package/lib/collection/collection-manifest.json +11 -10
- package/lib/collection/components/duet-choice/duet-choice.js +0 -1
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +4 -1
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +13 -6
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +25 -3
- package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +3 -3
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +58 -2
- package/lib/collection/components/duet-footer/duet-footer.css +1 -0
- package/lib/collection/components/duet-grid/duet-grid.js +25 -2
- package/lib/collection/components/duet-header/duet-header-dropdown.js +27 -0
- package/lib/collection/components/duet-header/duet-header-hamburger.js +9 -0
- package/lib/collection/components/duet-header/duet-header-icon.js +9 -0
- package/lib/collection/components/duet-header/duet-header.css +272 -39
- package/lib/collection/components/duet-header/duet-header.js +316 -122
- package/lib/collection/components/duet-icon/duet-icon.js +11 -5
- package/lib/collection/components/duet-link/duet-link.js +4 -1
- package/lib/collection/components/duet-list-item/duet-list-item.css +1 -1
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.css +4 -3
- package/lib/collection/components/duet-table/duet-table.css +42 -17
- package/lib/collection/components/duet-table/duet-table.js +2 -2
- package/lib/collection/components/duet-upload/duet-upload.js +98 -51
- package/lib/collection/components/duet-upload/{duet-upload-editable-item-error.js → upload-editable-item-error.js} +0 -0
- package/lib/collection/components/duet-upload/{duet-upload-editable-item-inprogres.js → upload-editable-item-inprogres.js} +0 -0
- package/lib/collection/components/duet-upload/{duet-upload-editable-item-success.js → upload-editable-item-success.js} +0 -0
- package/lib/collection/components/duet-upload/{duet-upload-validators.js → upload-validators.js} +0 -0
- package/lib/collection/components/{duet-upload → duet-upload-aria-status}/duet-upload-aria-status.js +3 -3
- package/lib/collection/utils/template-utils.js +33 -0
- package/lib/collection/utils/token-utils.js +67 -14
- package/lib/custom-elements-bundle/index.js +468 -121
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-060d79be.entry.js → p-08498e46.entry.js} +1 -1
- package/lib/duet/p-0bb75f62.system.entry.js +4 -0
- package/lib/duet/p-0d546cd6.system.entry.js +4 -0
- package/lib/duet/{p-263bc9cd.system.entry.js → p-1164a119.system.entry.js} +1 -1
- package/lib/duet/{p-a890da72.entry.js → p-13f72df0.entry.js} +1 -1
- package/lib/duet/{p-387823af.system.entry.js → p-15945ba7.system.entry.js} +1 -1
- package/lib/duet/{p-35a3794e.js → p-183726f7.js} +0 -0
- package/lib/duet/{p-7fee0d23.system.entry.js → p-1842a4db.system.entry.js} +1 -1
- package/lib/duet/{p-4607af59.entry.js → p-1a4204b7.entry.js} +1 -1
- package/lib/duet/{p-b4e87f02.system.entry.js → p-1d8d319c.system.entry.js} +1 -1
- package/lib/duet/{p-9dca5c22.system.entry.js → p-2b1707bd.system.entry.js} +1 -1
- package/lib/duet/{p-8b5ca0e7.system.entry.js → p-2c89e016.system.entry.js} +1 -1
- package/lib/duet/p-309f9094.entry.js +4 -0
- package/lib/duet/{p-67d9a9a9.system.entry.js → p-30f15c84.system.entry.js} +1 -1
- package/lib/duet/p-39cd816e.entry.js +4 -0
- package/lib/duet/{p-86daec1c.entry.js → p-3d47d6d4.entry.js} +1 -1
- package/lib/duet/{p-d744d188.system.entry.js → p-3e9fe1c7.system.entry.js} +1 -1
- package/lib/duet/{p-a9859a82.entry.js → p-3ff50cee.entry.js} +1 -1
- package/lib/duet/{p-b42d81c3.system.js → p-41938e76.system.js} +1 -1
- package/lib/duet/p-420c000b.entry.js +4 -0
- package/lib/duet/{p-cdd70b93.entry.js → p-477c6c71.entry.js} +1 -1
- package/lib/duet/p-478d2995.entry.js +4 -0
- package/lib/duet/p-4b400f7d.system.entry.js +4 -0
- package/lib/duet/p-4b480fdc.entry.js +4 -0
- package/lib/duet/p-50b4fb2c.js +4 -0
- package/lib/duet/{p-987edcd0.js → p-52621211.js} +0 -0
- package/lib/duet/{p-94169303.entry.js → p-545dcb04.entry.js} +1 -1
- package/lib/duet/{p-8f826843.system.entry.js → p-571015b8.system.entry.js} +1 -1
- package/lib/duet/{p-9481e312.entry.js → p-580c57ea.entry.js} +1 -1
- package/lib/duet/{p-2bb1460c.entry.js → p-5cf1d847.entry.js} +1 -1
- package/lib/duet/{p-c2e77278.entry.js → p-5d2ddf99.entry.js} +1 -1
- package/lib/duet/{p-af41d894.system.entry.js → p-5db0676e.system.entry.js} +1 -1
- package/lib/duet/p-603a61dc.system.entry.js +4 -0
- package/lib/duet/{p-aba68b7b.entry.js → p-6b1b2655.entry.js} +1 -1
- package/lib/duet/{p-597d99c7.entry.js → p-6bb9a991.entry.js} +1 -1
- package/lib/duet/p-6dc026cf.system.entry.js +4 -0
- package/lib/duet/{p-c18a599e.system.js → p-6e4fd6ba.system.js} +0 -0
- package/lib/duet/p-71261eb7.entry.js +4 -0
- package/lib/duet/{p-751542a0.system.entry.js → p-71a94fb9.system.entry.js} +1 -1
- package/lib/duet/{p-e12f2b8b.system.js → p-76b98e4d.system.js} +1 -1
- package/lib/duet/{p-f8ce39fb.entry.js → p-80d40375.entry.js} +1 -1
- package/lib/duet/{p-548d484e.js → p-80f90fef.js} +1 -1
- package/lib/duet/p-8143f3de.js +4 -0
- package/lib/duet/{p-bf93a991.entry.js → p-87703af9.entry.js} +1 -1
- package/lib/duet/p-8ad673ef.entry.js +4 -0
- package/lib/duet/{p-d4118b6e.system.entry.js → p-8adcc2f9.system.entry.js} +1 -1
- package/lib/duet/{p-4a87e9ab.system.entry.js → p-8e478364.system.entry.js} +1 -1
- package/lib/duet/p-8f477bd6.system.js +4 -0
- package/lib/duet/{p-00735436.entry.js → p-8fcaeb1b.entry.js} +1 -1
- package/lib/duet/p-93a51797.entry.js +4 -0
- package/lib/duet/{p-a5b9c192.system.entry.js → p-95edfcb8.system.entry.js} +1 -1
- package/lib/duet/p-97dc72c2.system.entry.js +4 -0
- package/lib/duet/p-99cd16d8.system.entry.js +4 -0
- package/lib/duet/{p-e964d062.entry.js → p-9c3b48fc.entry.js} +1 -1
- package/lib/duet/{p-5826523b.entry.js → p-9dad09a8.entry.js} +1 -1
- package/lib/duet/{p-8cb7416d.entry.js → p-9db71699.entry.js} +1 -1
- package/lib/duet/{p-b32224fe.system.entry.js → p-a0129887.system.entry.js} +1 -1
- package/lib/duet/p-a16a58c1.system.js +4 -0
- package/lib/duet/{p-2443bdca.system.entry.js → p-a4c0ce83.system.entry.js} +1 -1
- package/lib/duet/{p-48d1eb1f.system.entry.js → p-a9dc4dd9.system.entry.js} +1 -1
- package/lib/duet/p-aa5ba0fd.entry.js +4 -0
- package/lib/duet/{p-d3a3c3c7.system.entry.js → p-af7685aa.system.entry.js} +1 -1
- package/lib/duet/{p-6e6e76db.system.entry.js → p-b061516e.system.entry.js} +1 -1
- package/lib/duet/{p-58750bae.system.entry.js → p-b1401fd8.system.entry.js} +1 -1
- package/lib/duet/{p-b3744481.entry.js → p-b71cbe4b.entry.js} +1 -1
- package/lib/duet/p-c0472744.system.entry.js +4 -0
- package/lib/duet/{p-27d80cef.system.entry.js → p-c04ca724.system.entry.js} +1 -1
- package/lib/duet/{p-e2a44156.js → p-c33d1202.js} +1 -1
- package/lib/duet/{p-374fb7e6.system.entry.js → p-c85583d4.system.entry.js} +1 -1
- package/lib/duet/{p-aef1b720.system.entry.js → p-ca2b3f6a.system.entry.js} +1 -1
- package/lib/duet/{p-3af5d66f.entry.js → p-ca68c8f0.entry.js} +1 -1
- package/lib/duet/{p-acc57c77.entry.js → p-cecdebf3.entry.js} +1 -1
- package/lib/duet/p-d004da5f.js +4 -0
- package/lib/duet/{p-984576c9.entry.js → p-d1d6dc7a.entry.js} +1 -1
- package/lib/duet/{p-794659ac.entry.js → p-d9a93e45.entry.js} +1 -1
- package/lib/duet/{p-d1c19f04.system.entry.js → p-dc27e127.system.entry.js} +1 -1
- package/lib/duet/p-df37c5cd.entry.js +4 -0
- package/lib/duet/{p-6a19b5ec.entry.js → p-e10f1828.entry.js} +1 -1
- package/lib/duet/{p-a207b008.entry.js → p-e5120c30.entry.js} +1 -1
- package/lib/duet/p-e54705b2.system.js +4 -0
- package/lib/duet/{p-0d22396e.system.js → p-e5c1751e.system.js} +0 -0
- package/lib/duet/{p-dfe79666.system.entry.js → p-f1c7f166.system.entry.js} +2 -2
- package/lib/duet/p-f1dbb4ec.entry.js +4 -0
- package/lib/duet/{p-aee24388.system.entry.js → p-f3cd9499.system.entry.js} +1 -1
- package/lib/duet/{p-4b6ebe40.system.entry.js → p-f55ea1cc.system.entry.js} +1 -1
- package/lib/duet/{p-e76b722f.entry.js → p-f7700f25.entry.js} +1 -1
- package/lib/duet/p-fa99eaa4.system.js +4 -0
- package/lib/duet/{p-c36b4da0.entry.js → p-fd009368.entry.js} +1 -1
- package/lib/duet/{p-237e47b4.system.entry.js → p-fe1a2f0d.system.entry.js} +1 -1
- package/lib/duet/p-fe3806e2.system.entry.js +4 -0
- package/lib/duet/{p-4e28da18.system.entry.js → p-ffcfbd7a.system.entry.js} +1 -1
- package/lib/esm/{dom-58cd15f6.js → dom-5d060ace.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-button_2.entry.js +2 -2
- package/lib/esm/duet-caption_4.entry.js +3 -3
- package/lib/esm/duet-card.entry.js +2 -2
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +2 -3
- package/lib/esm/duet-collapsible.entry.js +4 -452
- 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-button.entry.js +92 -0
- package/lib/esm/{duet-upload.entry.js → duet-editable-table_4.entry.js} +461 -33
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +58 -0
- package/lib/esm/duet-footer.entry.js +2 -2
- package/lib/esm/duet-grid_2.entry.js +26 -3
- package/lib/esm/duet-header_2.entry.js +220 -47
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +8 -6
- package/lib/esm/duet-input_2.entry.js +2 -3
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +2 -2
- package/lib/esm/duet-modal.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +2 -2
- package/lib/esm/duet-number-input.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-select.entry.js +1 -1
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-tab_2.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-tooltip.entry.js +1 -1
- package/lib/esm/duet-tray.entry.js +1 -1
- package/lib/esm/duet-upload-aria-status.entry.js +96 -0
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{focus-utils-1fe0dcd0.js → focus-utils-bf7d1e80.js} +1 -1
- package/lib/esm/form-search-ea8e19ae.js +6 -0
- package/lib/esm/{index-84d97bd1.js → index-f813a624.js} +2 -2
- package/lib/esm/loader.js +3 -3
- package/lib/esm/{shadow-css-7c726abb.js → shadow-css-13d024f4.js} +1 -1
- package/lib/esm/token-utils-75f78ca4.js +75 -0
- package/lib/esm/tokens-e110dc89.js +453 -0
- package/lib/esm-es5/{dom-58cd15f6.js → dom-5d060ace.js} +0 -0
- 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-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 +2 -2
- 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-button.entry.js +4 -0
- package/lib/esm-es5/duet-editable-table_4.entry.js +4 -0
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +4 -0
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +2 -2
- package/lib/esm-es5/duet-header_2.entry.js +2 -2
- 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-modal.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-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-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-tab_2.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-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 +4 -0
- 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-1fe0dcd0.js → focus-utils-bf7d1e80.js} +1 -1
- package/lib/esm-es5/form-search-ea8e19ae.js +4 -0
- package/lib/esm-es5/{index-84d97bd1.js → index-f813a624.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{shadow-css-7c726abb.js → shadow-css-13d024f4.js} +0 -0
- package/lib/esm-es5/token-utils-75f78ca4.js +4 -0
- package/lib/esm-es5/tokens-e110dc89.js +4 -0
- package/lib/html.html-data.json +4925 -0
- package/lib/types/common-types.d.ts +0 -1
- package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +3 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +1 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +5 -1
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +1 -0
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +10 -0
- package/lib/types/components/duet-grid/duet-grid.d.ts +1 -0
- package/lib/types/components/duet-header/duet-header-dropdown.d.ts +16 -0
- package/lib/types/components/duet-header/duet-header-hamburger.d.ts +2 -0
- package/lib/types/components/duet-header/duet-header-icon.d.ts +8 -0
- package/lib/types/components/duet-header/duet-header.d.ts +41 -4
- package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
- package/lib/types/components/duet-link/duet-link.d.ts +3 -0
- package/lib/types/components/duet-table/duet-table.d.ts +1 -1
- package/lib/types/components/duet-upload/duet-upload.d.ts +46 -18
- package/lib/types/components/duet-upload/{duet-upload-editable-item-error.d.ts → upload-editable-item-error.d.ts} +0 -0
- package/lib/types/components/duet-upload/{duet-upload-editable-item-inprogres.d.ts → upload-editable-item-inprogres.d.ts} +0 -0
- package/lib/types/components/duet-upload/{duet-upload-editable-item-success.d.ts → upload-editable-item-success.d.ts} +0 -0
- package/lib/types/components/duet-upload/{duet-upload-validators.d.ts → upload-validators.d.ts} +0 -0
- package/lib/types/components/{duet-upload → duet-upload-aria-status}/duet-upload-aria-status.d.ts +2 -2
- package/lib/types/components.d.ts +71 -35
- package/lib/types/stencil-public-runtime.d.ts +6 -4
- package/lib/types/utils/template-utils.d.ts +13 -0
- package/lib/types/utils/token-utils.d.ts +8 -2
- package/package.json +13 -13
- package/lib/cjs/duet-editable-table-button_3.cjs.entry.js +0 -232
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +0 -336
- package/lib/cjs/js-utils-33a9dbe3.js +0 -16
- package/lib/cjs/token-utils-63a9c8dc.js +0 -30
- package/lib/duet/p-10deead0.system.js +0 -4
- package/lib/duet/p-1208c84f.entry.js +0 -4
- package/lib/duet/p-155ef581.system.entry.js +0 -4
- package/lib/duet/p-16c48c5d.entry.js +0 -4
- package/lib/duet/p-1797df7b.system.entry.js +0 -4
- package/lib/duet/p-1a08fc22.system.entry.js +0 -4
- package/lib/duet/p-28e02c08.entry.js +0 -4
- package/lib/duet/p-33c58756.entry.js +0 -4
- package/lib/duet/p-3c1971d8.js +0 -4
- package/lib/duet/p-5ea0cd19.entry.js +0 -4
- package/lib/duet/p-63d5bf73.system.entry.js +0 -4
- package/lib/duet/p-6cc3be76.system.entry.js +0 -4
- package/lib/duet/p-6e363557.system.js +0 -4
- package/lib/duet/p-7368b14e.system.entry.js +0 -4
- package/lib/duet/p-7e8d5bb9.system.entry.js +0 -4
- package/lib/duet/p-81867417.system.js +0 -4
- package/lib/duet/p-9d73343a.entry.js +0 -4
- package/lib/duet/p-a6a84ec6.entry.js +0 -4
- package/lib/duet/p-b25d3769.js +0 -4
- package/lib/duet/p-c34329f3.entry.js +0 -4
- package/lib/duet/p-de07c7d7.entry.js +0 -4
- package/lib/duet/p-f0a4b68d.system.entry.js +0 -4
- package/lib/duet/p-f364eb96.entry.js +0 -4
- package/lib/esm/duet-editable-table-button_3.entry.js +0 -226
- package/lib/esm/duet-editable-table_3.entry.js +0 -330
- package/lib/esm/js-utils-b69f17df.js +0 -14
- package/lib/esm/token-utils-590d9413.js +0 -28
- package/lib/esm-es5/duet-editable-table-button_3.entry.js +0 -4
- package/lib/esm-es5/duet-editable-table_3.entry.js +0 -4
- package/lib/esm-es5/duet-upload.entry.js +0 -4
- package/lib/esm-es5/js-utils-b69f17df.js +0 -4
- package/lib/esm-es5/token-utils-590d9413.js +0 -4
|
@@ -5,13 +5,413 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
9
|
-
const createId = require('./create-id-c3b984b1.js');
|
|
10
|
-
const jsUtils = require('./js-utils-33a9dbe3.js');
|
|
8
|
+
const index = require('./index-1c10bbfb.js');
|
|
11
9
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
12
10
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
|
+
const tokens_module = require('./tokens.module-6b2df1c2.js');
|
|
12
|
+
const createId = require('./create-id-c3b984b1.js');
|
|
13
13
|
require('./string-utils-267e3dbb.js');
|
|
14
14
|
|
|
15
|
+
const debounce = (func, timeout = 50) => {
|
|
16
|
+
let timer;
|
|
17
|
+
return (...args) => {
|
|
18
|
+
clearTimeout(timer);
|
|
19
|
+
timer = setTimeout(() => {
|
|
20
|
+
func.apply(undefined, args);
|
|
21
|
+
}, timeout);
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Produces a function which uses template strings to do simple interpolation from objects.
|
|
27
|
+
*
|
|
28
|
+
* Usage:
|
|
29
|
+
* var makeMeKing = generateTemplateFn('${name} is now the king of ${country}!');
|
|
30
|
+
*
|
|
31
|
+
* console.log(makeMeKing({ name: 'Bryan', country: 'Scotland'}));
|
|
32
|
+
* // Logs 'Bryan is now the king of Scotland!'
|
|
33
|
+
*/
|
|
34
|
+
const generateTemplateFn = (function () {
|
|
35
|
+
const cache = {};
|
|
36
|
+
function generateTemplate(template) {
|
|
37
|
+
if (typeof template !== "string") {
|
|
38
|
+
template = template.outerHTML;
|
|
39
|
+
}
|
|
40
|
+
let fn = cache[template];
|
|
41
|
+
if (!fn) {
|
|
42
|
+
// Replace ${expressions} (etc) with ${map.expressions}.
|
|
43
|
+
const sanitized = template
|
|
44
|
+
.replace(/\$\{([\s]*[^;\s\{]+[\s]*)\}/g, function (_, match) {
|
|
45
|
+
return `\$\{map.${match.trim()}\}`;
|
|
46
|
+
})
|
|
47
|
+
// Afterwards, replace anything that's not ${map.expressions}' (etc) with a blank string.
|
|
48
|
+
.replace(/(\$\{(?!map\.)[^}]+\})/g, "");
|
|
49
|
+
fn = Function("map", `return \`${sanitized}\``);
|
|
50
|
+
}
|
|
51
|
+
return fn;
|
|
52
|
+
}
|
|
53
|
+
return generateTemplate;
|
|
54
|
+
})();
|
|
55
|
+
|
|
56
|
+
const duetEditableTableCss = "duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-header tr .duet-editable-table-header-hidden{padding:0 !important;font-size:0;border-bottom:0}";
|
|
57
|
+
|
|
58
|
+
let DuetEditableTable = class {
|
|
59
|
+
constructor(hostRef) {
|
|
60
|
+
index.registerInstance(this, hostRef);
|
|
61
|
+
this.template = undefined;
|
|
62
|
+
/**
|
|
63
|
+
* State() variables
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
this.tick = Date.now();
|
|
67
|
+
/**
|
|
68
|
+
* Map of items that contain list of things.
|
|
69
|
+
*/
|
|
70
|
+
this.items = new Map();
|
|
71
|
+
/**
|
|
72
|
+
* Key used to set vertical alignment of action buttons
|
|
73
|
+
*/
|
|
74
|
+
this.alignment = "middle";
|
|
75
|
+
/**
|
|
76
|
+
* Array of internationalized defaults for the default groups labels.
|
|
77
|
+
*/
|
|
78
|
+
this.groupsLabelDefaults = {
|
|
79
|
+
fi: "Kaikki",
|
|
80
|
+
en: "All items",
|
|
81
|
+
sv: "Alla objekt",
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Array of internationalized defaults for the default action labels.
|
|
85
|
+
*/
|
|
86
|
+
this.actionLabelDefaults = {
|
|
87
|
+
fi: "Toiminnot",
|
|
88
|
+
en: "Actions",
|
|
89
|
+
sv: "Handlingar",
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions).
|
|
93
|
+
* @default { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }.
|
|
94
|
+
* @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}].
|
|
95
|
+
*/
|
|
96
|
+
this.groups = [
|
|
97
|
+
{ id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
|
|
98
|
+
];
|
|
99
|
+
/**
|
|
100
|
+
* Array of actions that are mapped via the map variable to the various groups defined in group.
|
|
101
|
+
* @default undefined
|
|
102
|
+
* @example [{
|
|
103
|
+
variation: "default",
|
|
104
|
+
icon: "action-edit-2",
|
|
105
|
+
id: "edit",
|
|
106
|
+
map: ["success"],
|
|
107
|
+
label: {
|
|
108
|
+
fi: " Label",
|
|
109
|
+
en: " Label",
|
|
110
|
+
sv: " Label",
|
|
111
|
+
}
|
|
112
|
+
}]
|
|
113
|
+
*/
|
|
114
|
+
this.actions = undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Shows or hides the table labels.
|
|
117
|
+
*/
|
|
118
|
+
this.hideGroups = false;
|
|
119
|
+
/**
|
|
120
|
+
* Exposes the aria role for optimizing accessibility.
|
|
121
|
+
*/
|
|
122
|
+
this.accessibleRole = undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Theme of the table.
|
|
125
|
+
*/
|
|
126
|
+
this.theme = "";
|
|
127
|
+
/**
|
|
128
|
+
* Private methods.
|
|
129
|
+
*/
|
|
130
|
+
this.kick = debounce(() => {
|
|
131
|
+
this.tick = Date.now();
|
|
132
|
+
}, 100); // will trigger re-render
|
|
133
|
+
/**
|
|
134
|
+
* If a user defines a template section within editable table, try to read an use it.
|
|
135
|
+
*/
|
|
136
|
+
this.getTemplate = () => {
|
|
137
|
+
const templateDom = this.element.getElementsByTagName("template");
|
|
138
|
+
if (templateDom === null || templateDom === void 0 ? void 0 : templateDom.length) {
|
|
139
|
+
const templateString = templateDom[0].content.firstElementChild.outerHTML;
|
|
140
|
+
return generateTemplateFn(templateString);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
this.getItemData = (data) => {
|
|
147
|
+
const { item, group, uid } = data;
|
|
148
|
+
if (this.template) {
|
|
149
|
+
return {
|
|
150
|
+
group,
|
|
151
|
+
uid,
|
|
152
|
+
item: this.template(item),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return { item, group, uid };
|
|
156
|
+
};
|
|
157
|
+
this.filterMap = needle => {
|
|
158
|
+
if (needle === "all") {
|
|
159
|
+
return Array.from(this.items);
|
|
160
|
+
}
|
|
161
|
+
return Array.from(this.items).filter(item => needle === item[1].group);
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Component lifecycle events.
|
|
166
|
+
*/
|
|
167
|
+
componentWillLoad() {
|
|
168
|
+
// look for a <template> region in the duet-editable-table
|
|
169
|
+
this.template = this.getTemplate();
|
|
170
|
+
// take care of the case where groups and actions are defined as html properties instead of javascript objects
|
|
171
|
+
if (typeof this.groups === "string") {
|
|
172
|
+
this.internalGroupArray = languageUtils.sanitizeString(this.groups);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
this.internalGroupArray = this.groups;
|
|
176
|
+
}
|
|
177
|
+
if (typeof this.actions === "string") {
|
|
178
|
+
this.internalActionsArray = languageUtils.sanitizeString(this.actions);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this.internalActionsArray = this.actions;
|
|
182
|
+
}
|
|
183
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Method to force an update of a tabular data array.
|
|
187
|
+
* when called the method will rerender the entire tabular structure.
|
|
188
|
+
*/
|
|
189
|
+
async updateTable(passedItems = undefined) {
|
|
190
|
+
this.items = new Map(passedItems || this.items);
|
|
191
|
+
this.kick();
|
|
192
|
+
}
|
|
193
|
+
render() {
|
|
194
|
+
return (index.h(index.Host, { class: {
|
|
195
|
+
"duet-theme-turva": this.theme === "turva",
|
|
196
|
+
} }, this.internalGroupArray.map(group => {
|
|
197
|
+
const currentGroup = this.filterMap(group.id);
|
|
198
|
+
if (!currentGroup.length) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
return (index.h("duet-table", { variation: "plain", breakpoint: "none", role: "", margin: this.hideGroups ? "none" : "auto" }, index.h("table", { class: "duet-editable-table", "aria-role": this.accessibleRole }, index.h("thead", { class: "duet-editable-table-header" }, index.h("tr", null, index.h("th", { class: {
|
|
202
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
203
|
+
} }, !this.hideGroups ? (languageUtils.getLocaleString(group.label)) : (index.h("duet-visually-hidden", null, languageUtils.getLocaleString(group.label)))), index.h("th", { class: {
|
|
204
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
205
|
+
} }, index.h("duet-visually-hidden", null, group.actionLabel
|
|
206
|
+
? languageUtils.getLocaleString(group.actionLabel)
|
|
207
|
+
: languageUtils.getLocaleString(this.actionLabelDefaults))))), index.h("tbody", null, currentGroup.map(dataAsArray => {
|
|
208
|
+
const [key, value] = dataAsArray;
|
|
209
|
+
return (index.h("duet-editable-table-item", { theme: this.theme, keyName: key, data: this.getItemData(value), groupId: group.id, part: group.id, alignment: this.alignment, actions: this.internalActionsArray }));
|
|
210
|
+
})))));
|
|
211
|
+
})));
|
|
212
|
+
}
|
|
213
|
+
get element() { return index.getElement(this); }
|
|
214
|
+
};
|
|
215
|
+
DuetEditableTable.style = duetEditableTableCss;
|
|
216
|
+
|
|
217
|
+
//simple functional component that renders the data in the table
|
|
218
|
+
const TableData = ({ data, groupId, alignment }, _children) => {
|
|
219
|
+
if (typeof data === "string") {
|
|
220
|
+
return (index.h("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }));
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
return (index.h("td", { class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }, data));
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const duetEditableTableItemCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{display:table-row;height:32px}.duet-editable-table-content,.duet-editable-table-actions{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}.duet-editable-table-actions-items{display:flex;justify-content:flex-end}.duet-editable-table-actions-items duet-editable-table-button{padding-left:8px}.duet-editable-table .editable-item-small{font-size:0.75rem;font-weight:400}";
|
|
228
|
+
|
|
229
|
+
let DuetEditableTableItem = class {
|
|
230
|
+
constructor(hostRef) {
|
|
231
|
+
index.registerInstance(this, hostRef);
|
|
232
|
+
this.duetEditableItemAction = index.createEvent(this, "duetEditableItemAction", 7);
|
|
233
|
+
this.isHovering = false;
|
|
234
|
+
/**
|
|
235
|
+
* Theme of the empty state component.
|
|
236
|
+
*/
|
|
237
|
+
this.theme = "";
|
|
238
|
+
/**
|
|
239
|
+
* Actions that can be performed on the element
|
|
240
|
+
*/
|
|
241
|
+
this.actions = undefined;
|
|
242
|
+
/**
|
|
243
|
+
* GroupId used to pierce the shadowdom - gets concatenated with "content & actions" and used as part="groupIDcontent/actions" to pierce the content/Action item
|
|
244
|
+
* @internal
|
|
245
|
+
*/
|
|
246
|
+
this.groupId = "";
|
|
247
|
+
/**
|
|
248
|
+
* Key used to set vertical alignment of action buttons
|
|
249
|
+
*/
|
|
250
|
+
this.alignment = "middle";
|
|
251
|
+
/**
|
|
252
|
+
* Key used to identify item, when running actions
|
|
253
|
+
*/
|
|
254
|
+
this.keyName = "";
|
|
255
|
+
/**
|
|
256
|
+
* Object of data itemsused to render the entire row
|
|
257
|
+
*/
|
|
258
|
+
this.data = undefined;
|
|
259
|
+
}
|
|
260
|
+
watchPropHandler(_newValue, _oldValue) {
|
|
261
|
+
// console.log("The new value of activated is: ", _newValue)
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
/**
|
|
265
|
+
* Component lifecycle events.
|
|
266
|
+
*/
|
|
267
|
+
componentWillLoad() {
|
|
268
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
/**
|
|
272
|
+
* private functions
|
|
273
|
+
*/
|
|
274
|
+
/**
|
|
275
|
+
* render() function
|
|
276
|
+
* Always the last one in the class.
|
|
277
|
+
*/
|
|
278
|
+
render() {
|
|
279
|
+
return (index.h(index.Host, { role: "row" }, index.h(TableData, { data: this.data.item, alignment: this.alignment, groupId: this.groupId }), index.h("td", { class: "duet-editable-table-actions", style: { verticalAlign: this.alignment } }, index.h("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
|
|
280
|
+
const { map = undefined } = result;
|
|
281
|
+
// if map has been specified, only show the current action if groupID matches the map array
|
|
282
|
+
if (map && !map.includes(this.groupId)) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
return (index.h("duet-editable-table-button", { keyName: this.keyName, group: this.data.group, uid: this.data.uid, actions: result, theme: this.theme }));
|
|
286
|
+
})))));
|
|
287
|
+
}
|
|
288
|
+
get el() { return index.getElement(this); }
|
|
289
|
+
static get watchers() { return {
|
|
290
|
+
"data": ["watchPropHandler"]
|
|
291
|
+
}; }
|
|
292
|
+
};
|
|
293
|
+
DuetEditableTableItem.style = duetEditableTableItemCss;
|
|
294
|
+
|
|
295
|
+
const duetTableCss = "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-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)}";
|
|
296
|
+
|
|
297
|
+
// remove wrapping speech marks.
|
|
298
|
+
// media query tokens are wrapped in speech marks,
|
|
299
|
+
// which need to be removed before use with matchMedia.
|
|
300
|
+
const unwrap = (str) => str.substring(1, str.length - 1);
|
|
301
|
+
const breakpointToToken = {
|
|
302
|
+
none: "all",
|
|
303
|
+
"none-scrollable": "all",
|
|
304
|
+
small: unwrap(tokens_module.mediaQuerySmall),
|
|
305
|
+
medium: unwrap(tokens_module.mediaQueryMedium),
|
|
306
|
+
large: unwrap(tokens_module.mediaQueryLarge),
|
|
307
|
+
"x-large": unwrap(tokens_module.mediaQueryXLarge),
|
|
308
|
+
"xx-large": unwrap(tokens_module.mediaQueryXxLarge),
|
|
309
|
+
"xxx-large": unwrap(tokens_module.mediaQueryXxxLarge),
|
|
310
|
+
};
|
|
311
|
+
const stickyTopValues = {
|
|
312
|
+
none: 0,
|
|
313
|
+
"with-links": parseFloat(tokens_module.sizeNavigation) * 16,
|
|
314
|
+
"without-links": parseFloat(tokens_module.sizeHeader) * 16,
|
|
315
|
+
};
|
|
316
|
+
let DuetTable = class {
|
|
317
|
+
constructor(hostRef) {
|
|
318
|
+
index.registerInstance(this, hostRef);
|
|
319
|
+
/**
|
|
320
|
+
* Tracks whether the breakpoint is matched. This is set to true by default so that JavaScript disabled in SSR mode we get accessible table data first.
|
|
321
|
+
*/
|
|
322
|
+
this.matchesBreakpoint = true;
|
|
323
|
+
/**
|
|
324
|
+
* Controls the margin of the component.
|
|
325
|
+
*/
|
|
326
|
+
this.margin = "auto";
|
|
327
|
+
/**
|
|
328
|
+
* Style variation of the table.
|
|
329
|
+
*/
|
|
330
|
+
this.variation = "striped";
|
|
331
|
+
/**
|
|
332
|
+
* Controls whether the table has a sticky header.
|
|
333
|
+
* Sticky headers are not compatible with breakpoint="none-scrollable".
|
|
334
|
+
*/
|
|
335
|
+
this.sticky = false;
|
|
336
|
+
/**
|
|
337
|
+
* Adjust the distance from top of the viewport (in pixels) when the
|
|
338
|
+
* table header becomes sticky.
|
|
339
|
+
*/
|
|
340
|
+
this.stickyDistance = "with-links";
|
|
341
|
+
/**
|
|
342
|
+
* By default the table is responsive - it will be flattened at narrow viewport widths.
|
|
343
|
+
* This prop controls the breakpoint at which the table should be rendered as a _regular_ table.
|
|
344
|
+
* Set to "none" to disable the responsive functionality.
|
|
345
|
+
* Set to "none-scrollable" to disable responsive functionality _and_ allow horizontal scrolling -
|
|
346
|
+
* this is useful for comparison tables where it's important to maintain column and row layout.
|
|
347
|
+
*/
|
|
348
|
+
this.breakpoint = "small";
|
|
349
|
+
this.handleMediaQueryChange = (mq) => {
|
|
350
|
+
this.matchesBreakpoint = mq.matches;
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
connectedCallback() {
|
|
354
|
+
this.mq = matchMedia(breakpointToToken[this.breakpoint]);
|
|
355
|
+
this.mq.addEventListener("change", this.handleMediaQueryChange);
|
|
356
|
+
this.handleMediaQueryChange(this.mq);
|
|
357
|
+
this.observer = new MutationObserver(() => this.copyHeadingsToCells());
|
|
358
|
+
this.observer.observe(this.element, {
|
|
359
|
+
childList: true,
|
|
360
|
+
subtree: true,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
componentWillLoad() {
|
|
364
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
365
|
+
this.copyHeadingsToCells();
|
|
366
|
+
if (this.sticky && this.breakpoint === "none-scrollable") {
|
|
367
|
+
console.warn(`[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence`);
|
|
368
|
+
}
|
|
369
|
+
if (this.sticky) {
|
|
370
|
+
const stickyTop = stickyTopValues[this.stickyDistance];
|
|
371
|
+
const headingElements = this.element.querySelectorAll("thead th");
|
|
372
|
+
headingElements.forEach(th => (th.style.top = `${stickyTop}px`));
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
componentDidLoad() {
|
|
376
|
+
// this clears all pending mutations,
|
|
377
|
+
// that way we avoid dealing with any initial changes
|
|
378
|
+
// and only get genuine mutations as rows are added/removed
|
|
379
|
+
this.observer.takeRecords();
|
|
380
|
+
}
|
|
381
|
+
disconnectedCallback() {
|
|
382
|
+
this.observer.disconnect();
|
|
383
|
+
this.observer = null;
|
|
384
|
+
this.mq.removeListener(this.handleMediaQueryChange);
|
|
385
|
+
this.mq = null;
|
|
386
|
+
this.matchesBreakpoint = true;
|
|
387
|
+
}
|
|
388
|
+
copyHeadingsToCells() {
|
|
389
|
+
const headingElements = this.element.querySelectorAll("thead th");
|
|
390
|
+
const rowElements = this.element.querySelectorAll("tbody tr");
|
|
391
|
+
const headings = Array.from(headingElements).map(th => th.textContent.trim());
|
|
392
|
+
rowElements.forEach(tr => {
|
|
393
|
+
tr.querySelectorAll("td").forEach((td, i) => {
|
|
394
|
+
if (headings[i]) {
|
|
395
|
+
td.dataset.heading = headings[i];
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
render() {
|
|
401
|
+
return (index.h(index.Host, { class: {
|
|
402
|
+
[`duet-table-${this.variation}`]: true,
|
|
403
|
+
"duet-table-flattened": !this.matchesBreakpoint,
|
|
404
|
+
// sticky only valid when in regular table layout
|
|
405
|
+
"duet-table-sticky": this.matchesBreakpoint && this.sticky,
|
|
406
|
+
"duet-table-scrollable": this.breakpoint === "none-scrollable",
|
|
407
|
+
"duet-m-0": this.margin === "none",
|
|
408
|
+
"duet-theme-turva": this.theme === "turva",
|
|
409
|
+
} }, index.h("slot", null)));
|
|
410
|
+
}
|
|
411
|
+
get element() { return index.getElement(this); }
|
|
412
|
+
};
|
|
413
|
+
DuetTable.style = duetTableCss;
|
|
414
|
+
|
|
15
415
|
const errorCodes = [
|
|
16
416
|
{
|
|
17
417
|
type: "default",
|
|
@@ -364,7 +764,7 @@ let DuetUpload = class {
|
|
|
364
764
|
this.filesInProgress = new Map();
|
|
365
765
|
this.fileMaxReached = false;
|
|
366
766
|
this.bytesMaxReached = false;
|
|
367
|
-
|
|
767
|
+
this.internalStatusMessageLabel = undefined;
|
|
368
768
|
/**
|
|
369
769
|
* Properties
|
|
370
770
|
*/
|
|
@@ -383,18 +783,18 @@ let DuetUpload = class {
|
|
|
383
783
|
*/
|
|
384
784
|
this.external = false;
|
|
385
785
|
/**
|
|
386
|
-
* If set the upload component will not display an upload button, you will have to create
|
|
387
|
-
* and call the exposed
|
|
786
|
+
* If set the upload component will not display an upload button, you will have to create one yourself
|
|
787
|
+
* and call the exposed method startUpload
|
|
388
788
|
*/
|
|
389
789
|
this.hideButton = false;
|
|
390
790
|
/**
|
|
391
|
-
* Default actions added to
|
|
791
|
+
* Default actions added to the internally used duet-editable-table
|
|
392
792
|
*/
|
|
393
793
|
this.actions = [
|
|
394
794
|
{
|
|
395
795
|
icon: "action-delete",
|
|
396
796
|
color: "color-danger",
|
|
397
|
-
color_hover: "
|
|
797
|
+
color_hover: "primary-dark",
|
|
398
798
|
id: "delete",
|
|
399
799
|
map: ["success", "failure"],
|
|
400
800
|
label: {
|
|
@@ -406,7 +806,7 @@ let DuetUpload = class {
|
|
|
406
806
|
{
|
|
407
807
|
icon: "navigation-close",
|
|
408
808
|
color: "primary",
|
|
409
|
-
color_hover: "
|
|
809
|
+
color_hover: "primary-dark",
|
|
410
810
|
id: "cancel",
|
|
411
811
|
map: ["inprogress"],
|
|
412
812
|
label: {
|
|
@@ -417,17 +817,43 @@ let DuetUpload = class {
|
|
|
417
817
|
},
|
|
418
818
|
];
|
|
419
819
|
/**
|
|
420
|
-
* If enabled the
|
|
820
|
+
* If enabled the editable-table will display links on successfully uploaded items,
|
|
421
821
|
* this requires the server can respond with link URIs in the correct format
|
|
822
|
+
* and that the files are accessible to the user
|
|
422
823
|
*/
|
|
423
824
|
this.showLinks = false;
|
|
424
825
|
/**
|
|
425
826
|
* Property to change the aria upload progress text read aloud by screenreaders
|
|
426
827
|
* @default {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
828
|
+
* fi: {
|
|
829
|
+
* inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
|
|
830
|
+
* inProgressWithErrors:
|
|
831
|
+
* "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
|
|
832
|
+
* done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
|
|
833
|
+
* doneWithErrors:
|
|
834
|
+
* "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
|
|
835
|
+
* files: "tiedostot",
|
|
836
|
+
* file: "tiedosto",
|
|
837
|
+
* },
|
|
838
|
+
* sv: {
|
|
839
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
840
|
+
* inProgressWithErrors:
|
|
841
|
+
* "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
|
|
842
|
+
* done: "Alla {filesTotal} har lagts till",
|
|
843
|
+
* doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
|
|
844
|
+
* files: "filer",
|
|
845
|
+
* file: "fil",
|
|
846
|
+
* },
|
|
847
|
+
* en: {
|
|
848
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
849
|
+
* inProgressWithErrors:
|
|
850
|
+
* "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
851
|
+
* done: "All {filesTotal} added successfully",
|
|
852
|
+
* doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
853
|
+
* files: "tiedostoa",
|
|
854
|
+
* file: "tiedosto",
|
|
855
|
+
* },
|
|
856
|
+
* }
|
|
431
857
|
*/
|
|
432
858
|
this.statusLabelDefaults = {
|
|
433
859
|
fi: {
|
|
@@ -460,8 +886,7 @@ let DuetUpload = class {
|
|
|
460
886
|
*/
|
|
461
887
|
this.statusMessageLabel = languageUtils.getLocaleString(this.statusLabelDefaults);
|
|
462
888
|
/**
|
|
463
|
-
* Property to change
|
|
464
|
-
* normally you would handle these strings on an application level and override @label when needed
|
|
889
|
+
* Property to change button label defaults on the component.
|
|
465
890
|
* @default {
|
|
466
891
|
fi: "Lisää liite",
|
|
467
892
|
sv: "Lägg till en bilaga",
|
|
@@ -479,7 +904,7 @@ let DuetUpload = class {
|
|
|
479
904
|
*/
|
|
480
905
|
this.buttonLabel = languageUtils.getLocaleString(this.buttonLabelDefaults);
|
|
481
906
|
/**
|
|
482
|
-
* accessible Label of button
|
|
907
|
+
* accessible aria-Label of button
|
|
483
908
|
*/
|
|
484
909
|
this.accessibleButtonLabel = undefined;
|
|
485
910
|
/**
|
|
@@ -502,6 +927,10 @@ let DuetUpload = class {
|
|
|
502
927
|
* browser from displaying its own validation errors.
|
|
503
928
|
*/
|
|
504
929
|
this.required = false;
|
|
930
|
+
/**
|
|
931
|
+
* Key used to set vertical alignment of action buttons
|
|
932
|
+
*/
|
|
933
|
+
this.alignment = "middle";
|
|
505
934
|
/**
|
|
506
935
|
* Visually hides the groups labels in the editable table list used to display the list of files
|
|
507
936
|
*/
|
|
@@ -511,7 +940,7 @@ let DuetUpload = class {
|
|
|
511
940
|
*/
|
|
512
941
|
this.files = new Map();
|
|
513
942
|
/**
|
|
514
|
-
* Property to read if
|
|
943
|
+
* Property to read if the internally used editable-table contains errors or not
|
|
515
944
|
*/
|
|
516
945
|
this.valid = !this.required;
|
|
517
946
|
/**
|
|
@@ -531,7 +960,6 @@ let DuetUpload = class {
|
|
|
531
960
|
this.label = languageUtils.getLocaleString(this.labelDefaults);
|
|
532
961
|
/**
|
|
533
962
|
* Property to change descriptionDefaults defaults on the component.
|
|
534
|
-
* normally you would handle these strings on an application level and override @label when needed
|
|
535
963
|
* @default {
|
|
536
964
|
fi: "Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",
|
|
537
965
|
sv: "Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer åt gången och lägga till upp till {maxfiles} bilagor åt gången.",
|
|
@@ -605,7 +1033,6 @@ let DuetUpload = class {
|
|
|
605
1033
|
* by default this is off, setting this to true will limit the users choices to what has been explicitly set
|
|
606
1034
|
*/
|
|
607
1035
|
this.limitSelection = false;
|
|
608
|
-
//region Private functions
|
|
609
1036
|
/**
|
|
610
1037
|
* Private functions
|
|
611
1038
|
*/
|
|
@@ -690,7 +1117,7 @@ let DuetUpload = class {
|
|
|
690
1117
|
});
|
|
691
1118
|
return itemData;
|
|
692
1119
|
};
|
|
693
|
-
this.kick =
|
|
1120
|
+
this.kick = debounce(() => {
|
|
694
1121
|
this.tick = Date.now();
|
|
695
1122
|
}, 30); // will trigger re-render
|
|
696
1123
|
this.genHashName = () => Date.now().toString(36) + Math.random();
|
|
@@ -703,7 +1130,6 @@ let DuetUpload = class {
|
|
|
703
1130
|
}
|
|
704
1131
|
};
|
|
705
1132
|
this.updateProgress = (ev, name) => {
|
|
706
|
-
console.log(this.filesInProgress.size);
|
|
707
1133
|
const updateProgressHelper = percentComplete => {
|
|
708
1134
|
this.updateValueInMap(name, "progress", percentComplete);
|
|
709
1135
|
this.onProgress(name, percentComplete, ev);
|
|
@@ -747,6 +1173,10 @@ let DuetUpload = class {
|
|
|
747
1173
|
* We reset the form fields to always be able to re-upload files
|
|
748
1174
|
* and because we handle all uploads and states internally in the component (not relying on native form elements)
|
|
749
1175
|
*/
|
|
1176
|
+
/* TODO: it may be a good idea to just update the list so that this always matches what is in the files map,
|
|
1177
|
+
* TODO: this would remove the capability of Re-uploading, unless we can catch and remove the user file from the form filelist before the upload is canceled by the browser
|
|
1178
|
+
* TODO: but for now we'll just reset the form fields
|
|
1179
|
+
*/
|
|
750
1180
|
this.nativeInput.value = "";
|
|
751
1181
|
};
|
|
752
1182
|
this.startUpload = async (ev, metaData = undefined) => {
|
|
@@ -758,8 +1188,6 @@ let DuetUpload = class {
|
|
|
758
1188
|
ev.preventDefault();
|
|
759
1189
|
return;
|
|
760
1190
|
};
|
|
761
|
-
//endregion
|
|
762
|
-
//region Eventlisteners for the XHR requests
|
|
763
1191
|
/**
|
|
764
1192
|
* Eventlisteners for the XHR requests
|
|
765
1193
|
*/
|
|
@@ -888,11 +1316,16 @@ let DuetUpload = class {
|
|
|
888
1316
|
this.kick();
|
|
889
1317
|
}
|
|
890
1318
|
}
|
|
891
|
-
//endregion
|
|
892
1319
|
/**
|
|
893
1320
|
* Component lifecycle events.
|
|
894
1321
|
*/
|
|
895
1322
|
componentWillLoad() {
|
|
1323
|
+
if (typeof this.statusMessageLabel === "string") {
|
|
1324
|
+
this.internalStatusMessageLabel = languageUtils.sanitizeString(this.groups);
|
|
1325
|
+
}
|
|
1326
|
+
else {
|
|
1327
|
+
this.internalStatusMessageLabel = this.statusMessageLabel;
|
|
1328
|
+
}
|
|
896
1329
|
themeableComponent.inheritGlobalTheme(this);
|
|
897
1330
|
this.listenForActionEvents();
|
|
898
1331
|
}
|
|
@@ -900,8 +1333,6 @@ let DuetUpload = class {
|
|
|
900
1333
|
// listen to the events from the component
|
|
901
1334
|
this.verifyValidity();
|
|
902
1335
|
}
|
|
903
|
-
//endregion
|
|
904
|
-
//region XHR requests
|
|
905
1336
|
/**
|
|
906
1337
|
* XHR request utilities
|
|
907
1338
|
*/
|
|
@@ -949,8 +1380,6 @@ let DuetUpload = class {
|
|
|
949
1380
|
onProgress: this.trackProgress,
|
|
950
1381
|
});
|
|
951
1382
|
}
|
|
952
|
-
//endregion
|
|
953
|
-
//region EventHandlers
|
|
954
1383
|
/**
|
|
955
1384
|
* Component event handling.
|
|
956
1385
|
*/
|
|
@@ -1025,7 +1454,6 @@ let DuetUpload = class {
|
|
|
1025
1454
|
component: "duet-upload",
|
|
1026
1455
|
});
|
|
1027
1456
|
}
|
|
1028
|
-
//endregion
|
|
1029
1457
|
/**
|
|
1030
1458
|
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
1031
1459
|
* `input.focus()`.
|
|
@@ -1055,7 +1483,7 @@ let DuetUpload = class {
|
|
|
1055
1483
|
return this.getFilesAsArray();
|
|
1056
1484
|
}
|
|
1057
1485
|
/**
|
|
1058
|
-
* Convenience method for updating
|
|
1486
|
+
* Convenience method for updating the value of a key:value inside an item in the files attribute
|
|
1059
1487
|
*/
|
|
1060
1488
|
async updateValue(item, key, value) {
|
|
1061
1489
|
this.updateValueInMap(item, key, value);
|
|
@@ -1073,7 +1501,7 @@ let DuetUpload = class {
|
|
|
1073
1501
|
"duet-upload-filelist-empty": !this.files.size,
|
|
1074
1502
|
"duet-upload-filelist": true,
|
|
1075
1503
|
"duet-upload-filelist-filled": this.files.size,
|
|
1076
|
-
}, id: this.labelId, for: identifier }, this.fileListEmpty)), !!this.files.size && index.h("slot", { name: "fileheader" }), !!this.files.size && (index.h("duet-upload-aria-status", { invalid: this.getFilesAsArray().invalid.length, valid: this.getFilesAsArray().valid.length, inprogress: this.filesInProgress.size, total: this.files.size, statusMessageLabel: this.
|
|
1504
|
+
}, id: this.labelId, for: identifier }, this.fileListEmpty)), !!this.files.size && index.h("slot", { name: "fileheader" }), !!this.files.size && (index.h("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 && (index.h("duet-editable-table", { "aria-live": "polite", "aria-relevant": "removals", accessibleRole: "log", id: this.editableTableId, groups: this.groups, actions: this.actions, hideGroups: this.hideGroups, alignment: this.alignment, items: this.convertToDuetEditableTableItems() })), !!this.files.size && index.h("slot", { name: "filefooter" }), index.h("duet-spacer", { size: "large" }), !this.hideButton && (index.h("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle" }, this.buttonLabel)), index.h("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (index.h("duet-alert", null, this.fileMaxReached && getI18nError("duet-upload-301"), this.bytesMaxReached && getI18nError("duet-upload-202"))), index.h("duet-spacer", { size: "medium" }), index.h("duet-visually-hidden", null, index.h("input", { ref: input => {
|
|
1077
1505
|
this.nativeInput = input;
|
|
1078
1506
|
}, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
1079
1507
|
"duet-upload": true,
|
|
@@ -1086,4 +1514,7 @@ let DuetUpload = class {
|
|
|
1086
1514
|
};
|
|
1087
1515
|
DuetUpload.style = duetUploadCss;
|
|
1088
1516
|
|
|
1517
|
+
exports.duet_editable_table = DuetEditableTable;
|
|
1518
|
+
exports.duet_editable_table_item = DuetEditableTableItem;
|
|
1519
|
+
exports.duet_table = DuetTable;
|
|
1089
1520
|
exports.duet_upload = DuetUpload;
|