@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { Component, Element, h, Host, Prop, State, Watch } from "@stencil/core";
|
|
4
|
+
import { Build, Component, Element, h, Host, Prop, State, Watch } from "@stencil/core";
|
|
5
5
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
6
6
|
import { getColorByName } from "../../utils/token-utils";
|
|
7
7
|
import { buildIconUrl, fetchIconByUrl } from "./icon-utils";
|
|
@@ -58,7 +58,7 @@ export class DuetIcon {
|
|
|
58
58
|
if (this.src && this.icon) {
|
|
59
59
|
console.warn("[DUET COMPONENTS]: <duet-icon> should have either have src or icon attributes, but not both. icon attribute will take precedence", "icon:", this.icon, "src:", this.src);
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
this.loadIcon();
|
|
62
62
|
}
|
|
63
63
|
async loadIcon() {
|
|
64
64
|
// static icon known at build-time, so we can set it synchronously
|
|
@@ -66,6 +66,10 @@ export class DuetIcon {
|
|
|
66
66
|
this.svgContent = this.icon;
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
+
// on server, don't make requests
|
|
70
|
+
if (!Build.isBrowser) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
69
73
|
// dynamically load icon from url
|
|
70
74
|
const src = this.src ? this.src : buildIconUrl(this.name);
|
|
71
75
|
try {
|
|
@@ -80,11 +84,13 @@ export class DuetIcon {
|
|
|
80
84
|
* Always the last one in the class.
|
|
81
85
|
*/
|
|
82
86
|
render() {
|
|
83
|
-
const color = this.color === "currentColor"
|
|
87
|
+
const color = this.color === "currentColor"
|
|
88
|
+
? "currentColor"
|
|
89
|
+
: getColorByName(this.color, this.theme) || getColorByName(this.outline, this.theme);
|
|
84
90
|
const styles = {
|
|
85
91
|
color,
|
|
86
|
-
background: getColorByName(this.background),
|
|
87
|
-
"border-color": getColorByName(this.outline),
|
|
92
|
+
background: getColorByName(this.background, this.theme),
|
|
93
|
+
"border-color": getColorByName(this.outline, this.theme),
|
|
88
94
|
};
|
|
89
95
|
return (h(Host, { class: {
|
|
90
96
|
"duet-m-0": this.margin === "none",
|
|
@@ -6,6 +6,9 @@ import { Build, Component, Fragment, h, Host, Method, Prop } from "@stencil/core
|
|
|
6
6
|
import { DuetStringsExternalDefaults } from "../../common-strings";
|
|
7
7
|
import { getLanguage, getLocaleString } from "../../utils/language-utils";
|
|
8
8
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
9
|
+
/**
|
|
10
|
+
* @part duet-link - piercing selector for styling the link
|
|
11
|
+
*/
|
|
9
12
|
export class DuetLink {
|
|
10
13
|
constructor() {
|
|
11
14
|
/**
|
|
@@ -61,7 +64,7 @@ export class DuetLink {
|
|
|
61
64
|
"duet-link": true,
|
|
62
65
|
"duet-link-is-external": this.external,
|
|
63
66
|
"duet-theme-turva": this.theme === "turva",
|
|
64
|
-
}, target: this.external ? "_blank" : "_self", "aria-label": this.accessibleLabel, id: this.identifier, ref: el => (this.nativeLink = el) },
|
|
67
|
+
}, target: this.external ? "_blank" : "_self", "aria-label": this.accessibleLabel, id: this.identifier, ref: el => (this.nativeLink = el), part: "duet-link" },
|
|
65
68
|
h("slot", null),
|
|
66
69
|
Build.isBrowser && this.external && (h(Fragment, null,
|
|
67
70
|
h("duet-visually-hidden", null, this.accessibleLabelExternal),
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
}
|
|
40
40
|
:host dt,
|
|
41
41
|
:host dd {
|
|
42
|
+
margin-inline-start: 0;
|
|
42
43
|
-webkit-hyphens: auto;
|
|
43
44
|
hyphens: auto;
|
|
44
45
|
text-align: left;
|
|
45
46
|
word-break: break-all;
|
|
46
47
|
word-break: break-word;
|
|
47
|
-
margin-inline-start: 0;
|
|
48
48
|
}
|
|
49
49
|
@media (max-width: 35.9375em) {
|
|
50
50
|
:host dt,
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
text-overflow: ellipsis;
|
|
53
53
|
white-space: nowrap;
|
|
54
54
|
cursor: pointer;
|
|
55
|
+
background-color: white;
|
|
55
56
|
border-bottom: 1px solid #e1e3e6;
|
|
56
57
|
border-radius: 0;
|
|
57
58
|
-webkit-appearance: none;
|
|
@@ -66,7 +67,6 @@
|
|
|
66
67
|
overflow: hidden;
|
|
67
68
|
font-size: 0.875rem;
|
|
68
69
|
line-height: 4rem;
|
|
69
|
-
background-color: white;
|
|
70
70
|
border: 0;
|
|
71
71
|
border-radius: 4px;
|
|
72
72
|
transition: border 300ms ease;
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
.duet-theme-turva .duet-drawer-toggle {
|
|
76
76
|
font-family: "turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
77
77
|
color: #171c3a;
|
|
78
|
+
background-color: white;
|
|
78
79
|
border-color: #e4e4e6;
|
|
79
80
|
}
|
|
80
81
|
.duet-drawer-toggle:active {
|
|
@@ -200,14 +201,14 @@
|
|
|
200
201
|
|
|
201
202
|
.duet-drawer-content {
|
|
202
203
|
display: none;
|
|
203
|
-
background-color:
|
|
204
|
+
background-color: white;
|
|
204
205
|
border-bottom: 1px solid #e1e3e6;
|
|
205
206
|
}
|
|
206
207
|
.duet-drawer-content:focus {
|
|
207
208
|
outline: 0;
|
|
208
209
|
}
|
|
209
210
|
.duet-theme-turva .duet-drawer-content {
|
|
210
|
-
background-color:
|
|
211
|
+
background-color: white;
|
|
211
212
|
border-color: #e1e3e6;
|
|
212
213
|
}
|
|
213
214
|
@media (min-width: 62em) {
|
|
@@ -177,59 +177,60 @@ duet-table.duet-theme-turva tbody th {
|
|
|
177
177
|
border-top-color: #e4e4e6;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
.duet-table-minimal th, .duet-table-plain th {
|
|
180
|
+
.duet-table-fixed th, .duet-table-minimal th, .duet-table-plain th {
|
|
181
181
|
padding: 16px !important;
|
|
182
182
|
border-bottom: 1px solid #657787;
|
|
183
183
|
}
|
|
184
|
-
.duet-table-minimal th:first-child, .duet-table-plain th:first-child {
|
|
184
|
+
.duet-table-fixed th:first-child, .duet-table-minimal th:first-child, .duet-table-plain th:first-child {
|
|
185
185
|
padding-left: 0 !important;
|
|
186
186
|
}
|
|
187
|
-
.duet-table-minimal th:last-child, .duet-table-plain th:last-child {
|
|
187
|
+
.duet-table-fixed th:last-child, .duet-table-minimal th:last-child, .duet-table-plain th:last-child {
|
|
188
188
|
padding-right: 0 !important;
|
|
189
189
|
}
|
|
190
|
-
.duet-theme-turva.duet-table-minimal th, .duet-theme-turva.duet-table-plain th {
|
|
190
|
+
.duet-theme-turva.duet-table-fixed th, .duet-theme-turva.duet-table-minimal th, .duet-theme-turva.duet-table-plain th {
|
|
191
191
|
border-bottom-color: #444445;
|
|
192
192
|
}
|
|
193
|
-
.duet-table-minimal tbody th, .duet-table-plain tbody th {
|
|
193
|
+
.duet-table-fixed tbody th, .duet-table-minimal tbody th, .duet-table-plain tbody th {
|
|
194
194
|
padding-top: 40px !important;
|
|
195
195
|
border-bottom-color: #e1e3e6;
|
|
196
196
|
}
|
|
197
|
-
.duet-theme-turva.duet-table-minimal tbody th, .duet-theme-turva.duet-table-plain tbody th {
|
|
197
|
+
.duet-theme-turva.duet-table-fixed tbody th, .duet-theme-turva.duet-table-minimal tbody th, .duet-theme-turva.duet-table-plain tbody th {
|
|
198
198
|
border-bottom-color: #e4e4e6;
|
|
199
199
|
}
|
|
200
|
-
.duet-table-minimal td, .duet-table-plain td {
|
|
200
|
+
.duet-table-fixed td, .duet-table-minimal td, .duet-table-plain td {
|
|
201
201
|
padding: 16px !important;
|
|
202
202
|
}
|
|
203
|
-
.duet-table-minimal td:first-child, .duet-table-plain td:first-child {
|
|
203
|
+
.duet-table-fixed td:first-child, .duet-table-minimal td:first-child, .duet-table-plain td:first-child {
|
|
204
204
|
padding-left: 0 !important;
|
|
205
205
|
}
|
|
206
|
-
.duet-table-minimal td:last-child, .duet-table-plain td:last-child {
|
|
206
|
+
.duet-table-fixed td:last-child, .duet-table-minimal td:last-child, .duet-table-plain td:last-child {
|
|
207
207
|
padding-right: 0 !important;
|
|
208
208
|
}
|
|
209
|
-
.duet-table-minimal tbody td, .duet-table-plain tbody td {
|
|
209
|
+
.duet-table-fixed tbody td, .duet-table-minimal tbody td, .duet-table-plain tbody td {
|
|
210
210
|
border-bottom: 1px solid #e1e3e6;
|
|
211
211
|
}
|
|
212
|
-
.duet-theme-turva.duet-table-minimal tbody td, .duet-theme-turva.duet-table-plain tbody td {
|
|
212
|
+
.duet-theme-turva.duet-table-fixed tbody td, .duet-theme-turva.duet-table-minimal tbody td, .duet-theme-turva.duet-table-plain tbody td {
|
|
213
213
|
border-bottom-color: #e4e4e6;
|
|
214
214
|
}
|
|
215
|
-
.duet-table-flattened.duet-table-minimal tbody:first-of-type th, .duet-table-flattened.duet-table-plain tbody:first-of-type th {
|
|
215
|
+
.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 {
|
|
216
216
|
padding-top: 0 !important;
|
|
217
217
|
}
|
|
218
|
-
.duet-table-flattened.duet-table-minimal td, .duet-table-flattened.duet-table-plain td,
|
|
218
|
+
.duet-table-flattened.duet-table-fixed td, .duet-table-flattened.duet-table-minimal td, .duet-table-flattened.duet-table-plain td,
|
|
219
|
+
.duet-table-flattened.duet-table-fixed tbody th,
|
|
219
220
|
.duet-table-flattened.duet-table-minimal tbody th,
|
|
220
221
|
.duet-table-flattened.duet-table-plain tbody th {
|
|
221
222
|
border-bottom: 0;
|
|
222
223
|
}
|
|
223
|
-
.duet-table-flattened.duet-table-minimal tr, .duet-table-flattened.duet-table-plain tr {
|
|
224
|
+
.duet-table-flattened.duet-table-fixed tr, .duet-table-flattened.duet-table-minimal tr, .duet-table-flattened.duet-table-plain tr {
|
|
224
225
|
padding: 20px 0 !important;
|
|
225
226
|
}
|
|
226
|
-
.duet-table-flattened.duet-table-minimal tbody th, .duet-table-flattened.duet-table-plain tbody th {
|
|
227
|
+
.duet-table-flattened.duet-table-fixed tbody th, .duet-table-flattened.duet-table-minimal tbody th, .duet-table-flattened.duet-table-plain tbody th {
|
|
227
228
|
padding-top: 20px !important;
|
|
228
229
|
}
|
|
229
|
-
.duet-table-flattened.duet-table-minimal tfoot td, .duet-table-flattened.duet-table-plain tfoot td {
|
|
230
|
+
.duet-table-flattened.duet-table-fixed tfoot td, .duet-table-flattened.duet-table-minimal tfoot td, .duet-table-flattened.duet-table-plain tfoot td {
|
|
230
231
|
margin-bottom: 4px !important;
|
|
231
232
|
}
|
|
232
|
-
.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 {
|
|
233
|
+
.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 {
|
|
233
234
|
border-bottom: 0;
|
|
234
235
|
}
|
|
235
236
|
|
|
@@ -263,6 +264,30 @@ duet-table.duet-theme-turva tbody th {
|
|
|
263
264
|
border-top-color: #e4e4e6;
|
|
264
265
|
}
|
|
265
266
|
|
|
267
|
+
.duet-table-fixed table {
|
|
268
|
+
table-layout: fixed;
|
|
269
|
+
}
|
|
270
|
+
.duet-table-fixed tbody tr,
|
|
271
|
+
.duet-table-fixed tbody tr td,
|
|
272
|
+
.duet-table-fixed tbody tr td:first-child {
|
|
273
|
+
padding: 4px !important;
|
|
274
|
+
vertical-align: text-bottom;
|
|
275
|
+
border-bottom: 0 none;
|
|
276
|
+
}
|
|
277
|
+
.duet-table-fixed thead {
|
|
278
|
+
display: none;
|
|
279
|
+
}
|
|
280
|
+
.duet-table-fixed tbody tr,
|
|
281
|
+
.duet-table-fixed tbody tr td {
|
|
282
|
+
border-bottom: 0 none;
|
|
283
|
+
}
|
|
284
|
+
.duet-table-fixed:not(.duet-table-flattened) tfoot {
|
|
285
|
+
border-top: 1px solid #e1e3e6;
|
|
286
|
+
}
|
|
287
|
+
.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot {
|
|
288
|
+
border-top-color: #e4e4e6;
|
|
289
|
+
}
|
|
290
|
+
|
|
266
291
|
.duet-table-scrollable {
|
|
267
292
|
position: relative;
|
|
268
293
|
width: 100%;
|
|
@@ -64,7 +64,7 @@ export class DuetTable {
|
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
this.mq = matchMedia(breakpointToToken[this.breakpoint]);
|
|
67
|
-
this.mq.
|
|
67
|
+
this.mq.addEventListener("change", this.handleMediaQueryChange);
|
|
68
68
|
this.handleMediaQueryChange(this.mq);
|
|
69
69
|
this.observer = new MutationObserver(() => this.copyHeadingsToCells());
|
|
70
70
|
this.observer.observe(this.element, {
|
|
@@ -185,7 +185,7 @@ export class DuetTable {
|
|
|
185
185
|
"mutable": false,
|
|
186
186
|
"complexType": {
|
|
187
187
|
"original": "DuetTableVariant",
|
|
188
|
-
"resolved": "\"plain\" | \"striped\"",
|
|
188
|
+
"resolved": "\"fixed\" | \"plain\" | \"striped\"",
|
|
189
189
|
"references": {
|
|
190
190
|
"DuetTableVariant": {
|
|
191
191
|
"location": "local"
|
|
@@ -4,18 +4,17 @@
|
|
|
4
4
|
import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from "@stencil/core";
|
|
5
5
|
import { createID } from "../../utils/create-id";
|
|
6
6
|
import { debounce } from "../../utils/js-utils";
|
|
7
|
-
import { getLocaleString } from "../../utils/language-utils";
|
|
7
|
+
import { getLocaleString, sanitizeString } from "../../utils/language-utils";
|
|
8
8
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
9
|
-
import { ErrorItem } from "./duet-upload-editable-item-error";
|
|
10
|
-
import { ProgressItem } from "./duet-upload-editable-item-inprogres";
|
|
11
|
-
import { SuccessItem } from "./duet-upload-editable-item-success";
|
|
12
|
-
import { validateFile, validateTotalAmountIsAboveMax, validateTotalSizeIsAboveMax } from "./duet-upload-validators";
|
|
13
9
|
import { getError, getI18nError } from "./errorcodes.utils";
|
|
10
|
+
import { ErrorItem } from "./upload-editable-item-error";
|
|
11
|
+
import { ProgressItem } from "./upload-editable-item-inprogres";
|
|
12
|
+
import { SuccessItem } from "./upload-editable-item-success";
|
|
13
|
+
import { validateFile, validateTotalAmountIsAboveMax, validateTotalSizeIsAboveMax } from "./upload-validators";
|
|
14
14
|
import { makeXhrRequest } from "./xhr.helpers";
|
|
15
15
|
/**
|
|
16
16
|
* @slot header - named slot - to place content after description / caption
|
|
17
17
|
* @slot fileheader - named slot - to place content above "filelist" (only displayed when "filelist" contains items)
|
|
18
|
-
* @slot filelist - named slot - should always contain a configurable duet-editable-table or a component that exposes the same functionality
|
|
19
18
|
* @slot filefooter - named slot - to place content below "filelist" (only displayed when "filelist" contains items)
|
|
20
19
|
*/
|
|
21
20
|
export class DuetUpload {
|
|
@@ -30,7 +29,7 @@ export class DuetUpload {
|
|
|
30
29
|
this.filesInProgress = new Map();
|
|
31
30
|
this.fileMaxReached = false;
|
|
32
31
|
this.bytesMaxReached = false;
|
|
33
|
-
|
|
32
|
+
this.internalStatusMessageLabel = undefined;
|
|
34
33
|
/**
|
|
35
34
|
* Properties
|
|
36
35
|
*/
|
|
@@ -49,18 +48,18 @@ export class DuetUpload {
|
|
|
49
48
|
*/
|
|
50
49
|
this.external = false;
|
|
51
50
|
/**
|
|
52
|
-
* If set the upload component will not display an upload button, you will have to create
|
|
53
|
-
* and call the exposed
|
|
51
|
+
* If set the upload component will not display an upload button, you will have to create one yourself
|
|
52
|
+
* and call the exposed method startUpload
|
|
54
53
|
*/
|
|
55
54
|
this.hideButton = false;
|
|
56
55
|
/**
|
|
57
|
-
* Default actions added to
|
|
56
|
+
* Default actions added to the internally used duet-editable-table
|
|
58
57
|
*/
|
|
59
58
|
this.actions = [
|
|
60
59
|
{
|
|
61
60
|
icon: "action-delete",
|
|
62
61
|
color: "color-danger",
|
|
63
|
-
color_hover: "
|
|
62
|
+
color_hover: "primary-dark",
|
|
64
63
|
id: "delete",
|
|
65
64
|
map: ["success", "failure"],
|
|
66
65
|
label: {
|
|
@@ -72,7 +71,7 @@ export class DuetUpload {
|
|
|
72
71
|
{
|
|
73
72
|
icon: "navigation-close",
|
|
74
73
|
color: "primary",
|
|
75
|
-
color_hover: "
|
|
74
|
+
color_hover: "primary-dark",
|
|
76
75
|
id: "cancel",
|
|
77
76
|
map: ["inprogress"],
|
|
78
77
|
label: {
|
|
@@ -83,17 +82,43 @@ export class DuetUpload {
|
|
|
83
82
|
},
|
|
84
83
|
];
|
|
85
84
|
/**
|
|
86
|
-
* If enabled the
|
|
85
|
+
* If enabled the editable-table will display links on successfully uploaded items,
|
|
87
86
|
* this requires the server can respond with link URIs in the correct format
|
|
87
|
+
* and that the files are accessible to the user
|
|
88
88
|
*/
|
|
89
89
|
this.showLinks = false;
|
|
90
90
|
/**
|
|
91
91
|
* Property to change the aria upload progress text read aloud by screenreaders
|
|
92
92
|
* @default {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
* fi: {
|
|
94
|
+
* inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
|
|
95
|
+
* inProgressWithErrors:
|
|
96
|
+
* "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
|
|
97
|
+
* done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
|
|
98
|
+
* doneWithErrors:
|
|
99
|
+
* "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
|
|
100
|
+
* files: "tiedostot",
|
|
101
|
+
* file: "tiedosto",
|
|
102
|
+
* },
|
|
103
|
+
* sv: {
|
|
104
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
105
|
+
* inProgressWithErrors:
|
|
106
|
+
* "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
|
|
107
|
+
* done: "Alla {filesTotal} har lagts till",
|
|
108
|
+
* doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
|
|
109
|
+
* files: "filer",
|
|
110
|
+
* file: "fil",
|
|
111
|
+
* },
|
|
112
|
+
* en: {
|
|
113
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
114
|
+
* inProgressWithErrors:
|
|
115
|
+
* "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
116
|
+
* done: "All {filesTotal} added successfully",
|
|
117
|
+
* doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
118
|
+
* files: "tiedostoa",
|
|
119
|
+
* file: "tiedosto",
|
|
120
|
+
* },
|
|
121
|
+
* }
|
|
97
122
|
*/
|
|
98
123
|
this.statusLabelDefaults = {
|
|
99
124
|
fi: {
|
|
@@ -126,8 +151,7 @@ export class DuetUpload {
|
|
|
126
151
|
*/
|
|
127
152
|
this.statusMessageLabel = getLocaleString(this.statusLabelDefaults);
|
|
128
153
|
/**
|
|
129
|
-
* Property to change
|
|
130
|
-
* normally you would handle these strings on an application level and override @label when needed
|
|
154
|
+
* Property to change button label defaults on the component.
|
|
131
155
|
* @default {
|
|
132
156
|
fi: "Lisää liite",
|
|
133
157
|
sv: "Lägg till en bilaga",
|
|
@@ -145,7 +169,7 @@ export class DuetUpload {
|
|
|
145
169
|
*/
|
|
146
170
|
this.buttonLabel = getLocaleString(this.buttonLabelDefaults);
|
|
147
171
|
/**
|
|
148
|
-
* accessible Label of button
|
|
172
|
+
* accessible aria-Label of button
|
|
149
173
|
*/
|
|
150
174
|
this.accessibleButtonLabel = undefined;
|
|
151
175
|
/**
|
|
@@ -168,6 +192,10 @@ export class DuetUpload {
|
|
|
168
192
|
* browser from displaying its own validation errors.
|
|
169
193
|
*/
|
|
170
194
|
this.required = false;
|
|
195
|
+
/**
|
|
196
|
+
* Key used to set vertical alignment of action buttons
|
|
197
|
+
*/
|
|
198
|
+
this.alignment = "middle";
|
|
171
199
|
/**
|
|
172
200
|
* Visually hides the groups labels in the editable table list used to display the list of files
|
|
173
201
|
*/
|
|
@@ -177,7 +205,7 @@ export class DuetUpload {
|
|
|
177
205
|
*/
|
|
178
206
|
this.files = new Map();
|
|
179
207
|
/**
|
|
180
|
-
* Property to read if
|
|
208
|
+
* Property to read if the internally used editable-table contains errors or not
|
|
181
209
|
*/
|
|
182
210
|
this.valid = !this.required;
|
|
183
211
|
/**
|
|
@@ -197,7 +225,6 @@ export class DuetUpload {
|
|
|
197
225
|
this.label = getLocaleString(this.labelDefaults);
|
|
198
226
|
/**
|
|
199
227
|
* Property to change descriptionDefaults defaults on the component.
|
|
200
|
-
* normally you would handle these strings on an application level and override @label when needed
|
|
201
228
|
* @default {
|
|
202
229
|
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.",
|
|
203
230
|
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.",
|
|
@@ -271,7 +298,6 @@ export class DuetUpload {
|
|
|
271
298
|
* by default this is off, setting this to true will limit the users choices to what has been explicitly set
|
|
272
299
|
*/
|
|
273
300
|
this.limitSelection = false;
|
|
274
|
-
//region Private functions
|
|
275
301
|
/**
|
|
276
302
|
* Private functions
|
|
277
303
|
*/
|
|
@@ -370,7 +396,6 @@ export class DuetUpload {
|
|
|
370
396
|
}
|
|
371
397
|
};
|
|
372
398
|
this.updateProgress = (ev, name) => {
|
|
373
|
-
console.log(this.filesInProgress.size);
|
|
374
399
|
const updateProgressHelper = percentComplete => {
|
|
375
400
|
this.updateValueInMap(name, "progress", percentComplete);
|
|
376
401
|
this.onProgress(name, percentComplete, ev);
|
|
@@ -414,6 +439,10 @@ export class DuetUpload {
|
|
|
414
439
|
* We reset the form fields to always be able to re-upload files
|
|
415
440
|
* and because we handle all uploads and states internally in the component (not relying on native form elements)
|
|
416
441
|
*/
|
|
442
|
+
/* TODO: it may be a good idea to just update the list so that this always matches what is in the files map,
|
|
443
|
+
* 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
|
|
444
|
+
* TODO: but for now we'll just reset the form fields
|
|
445
|
+
*/
|
|
417
446
|
this.nativeInput.value = "";
|
|
418
447
|
};
|
|
419
448
|
this.startUpload = async (ev, metaData = undefined) => {
|
|
@@ -425,8 +454,6 @@ export class DuetUpload {
|
|
|
425
454
|
ev.preventDefault();
|
|
426
455
|
return;
|
|
427
456
|
};
|
|
428
|
-
//endregion
|
|
429
|
-
//region Eventlisteners for the XHR requests
|
|
430
457
|
/**
|
|
431
458
|
* Eventlisteners for the XHR requests
|
|
432
459
|
*/
|
|
@@ -555,11 +582,16 @@ export class DuetUpload {
|
|
|
555
582
|
this.kick();
|
|
556
583
|
}
|
|
557
584
|
}
|
|
558
|
-
//endregion
|
|
559
585
|
/**
|
|
560
586
|
* Component lifecycle events.
|
|
561
587
|
*/
|
|
562
588
|
componentWillLoad() {
|
|
589
|
+
if (typeof this.statusMessageLabel === "string") {
|
|
590
|
+
this.internalStatusMessageLabel = sanitizeString(this.groups);
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
this.internalStatusMessageLabel = this.statusMessageLabel;
|
|
594
|
+
}
|
|
563
595
|
inheritGlobalTheme(this);
|
|
564
596
|
this.listenForActionEvents();
|
|
565
597
|
}
|
|
@@ -567,8 +599,6 @@ export class DuetUpload {
|
|
|
567
599
|
// listen to the events from the component
|
|
568
600
|
this.verifyValidity();
|
|
569
601
|
}
|
|
570
|
-
//endregion
|
|
571
|
-
//region XHR requests
|
|
572
602
|
/**
|
|
573
603
|
* XHR request utilities
|
|
574
604
|
*/
|
|
@@ -616,8 +646,6 @@ export class DuetUpload {
|
|
|
616
646
|
onProgress: this.trackProgress,
|
|
617
647
|
});
|
|
618
648
|
}
|
|
619
|
-
//endregion
|
|
620
|
-
//region EventHandlers
|
|
621
649
|
/**
|
|
622
650
|
* Component event handling.
|
|
623
651
|
*/
|
|
@@ -692,7 +720,6 @@ export class DuetUpload {
|
|
|
692
720
|
component: "duet-upload",
|
|
693
721
|
});
|
|
694
722
|
}
|
|
695
|
-
//endregion
|
|
696
723
|
/**
|
|
697
724
|
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
698
725
|
* `input.focus()`.
|
|
@@ -722,7 +749,7 @@ export class DuetUpload {
|
|
|
722
749
|
return this.getFilesAsArray();
|
|
723
750
|
}
|
|
724
751
|
/**
|
|
725
|
-
* Convenience method for updating
|
|
752
|
+
* Convenience method for updating the value of a key:value inside an item in the files attribute
|
|
726
753
|
*/
|
|
727
754
|
async updateValue(item, key, value) {
|
|
728
755
|
this.updateValueInMap(item, key, value);
|
|
@@ -745,8 +772,8 @@ export class DuetUpload {
|
|
|
745
772
|
"duet-upload-filelist-filled": this.files.size,
|
|
746
773
|
}, id: this.labelId, for: identifier }, this.fileListEmpty)),
|
|
747
774
|
!!this.files.size && h("slot", { name: "fileheader" }),
|
|
748
|
-
!!this.files.size && (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.
|
|
749
|
-
!!this.files.size && (h("duet-editable-table", { "aria-live": "polite", "aria-relevant": "removals", accessibleRole: "log", id: this.editableTableId, groups: this.groups, actions: this.actions, hideGroups: this.hideGroups, items: this.convertToDuetEditableTableItems() })),
|
|
775
|
+
!!this.files.size && (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 })),
|
|
776
|
+
!!this.files.size && (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() })),
|
|
750
777
|
!!this.files.size && h("slot", { name: "filefooter" }),
|
|
751
778
|
h("duet-spacer", { size: "large" }),
|
|
752
779
|
!this.hideButton && (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)),
|
|
@@ -869,7 +896,7 @@ export class DuetUpload {
|
|
|
869
896
|
"optional": false,
|
|
870
897
|
"docs": {
|
|
871
898
|
"tags": [],
|
|
872
|
-
"text": "If set the upload component will not display an upload button, you will have to create
|
|
899
|
+
"text": "If set the upload component will not display an upload button, you will have to create one yourself\nand call the exposed method startUpload"
|
|
873
900
|
},
|
|
874
901
|
"attribute": "hide-upload-button",
|
|
875
902
|
"reflect": false,
|
|
@@ -892,11 +919,11 @@ export class DuetUpload {
|
|
|
892
919
|
"optional": false,
|
|
893
920
|
"docs": {
|
|
894
921
|
"tags": [],
|
|
895
|
-
"text": "Default actions added to
|
|
922
|
+
"text": "Default actions added to the internally used duet-editable-table"
|
|
896
923
|
},
|
|
897
924
|
"attribute": "actions",
|
|
898
925
|
"reflect": false,
|
|
899
|
-
"defaultValue": "[\n {\n icon: \"action-delete\",\n color: \"color-danger\",\n color_hover: \"
|
|
926
|
+
"defaultValue": "[\n {\n icon: \"action-delete\",\n color: \"color-danger\",\n color_hover: \"primary-dark\",\n id: \"delete\",\n map: [\"success\", \"failure\"],\n label: {\n fi: \"Poista tiedosto\",\n en: \"Poista tiedosto\",\n sv: \"Ta bort filen\",\n },\n },\n {\n icon: \"navigation-close\",\n color: \"primary\",\n color_hover: \"primary-dark\",\n id: \"cancel\",\n map: [\"inprogress\"],\n label: {\n fi: \"Keskeyt\u00E4 l\u00E4hetys\",\n en: \"Cancel the upload\",\n sv: \"Stop \u00F6verf\u00F6ringen\",\n },\n },\n ]"
|
|
900
927
|
},
|
|
901
928
|
"uri": {
|
|
902
929
|
"type": "string",
|
|
@@ -927,7 +954,7 @@ export class DuetUpload {
|
|
|
927
954
|
"optional": false,
|
|
928
955
|
"docs": {
|
|
929
956
|
"tags": [],
|
|
930
|
-
"text": "If enabled the
|
|
957
|
+
"text": "If enabled the editable-table will display links on successfully uploaded items,\nthis requires the server can respond with link URIs in the correct format\nand that the files are accessible to the user"
|
|
931
958
|
},
|
|
932
959
|
"attribute": "show-links",
|
|
933
960
|
"reflect": false,
|
|
@@ -968,7 +995,7 @@ export class DuetUpload {
|
|
|
968
995
|
"docs": {
|
|
969
996
|
"tags": [{
|
|
970
997
|
"name": "default",
|
|
971
|
-
"text": "{\nfi: \"
|
|
998
|
+
"text": "{\nfi: {\ninProgress: \"L\u00E4hetet\u00E4\u00E4n {filesUploaded} l\u00E4hetett\u00E4v\u00E4st\u00E4 {filesTotal} tiedostosta\",\ninProgressWithErrors:\n\"L\u00E4hetet\u00E4\u00E4n {filesInProgress} tiedostoa, l\u00E4hetetty {filesUploaded} l\u00E4hetett\u00E4v\u00E4st\u00E4 {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheit\u00E4\",\ndone: \"Kaikki {filesTotal} tiedostoa l\u00E4hetetty onnistuneesti\",\ndoneWithErrors:\n\"L\u00E4hetys valmis, {filesUploaded} tiedostoa on l\u00E4hetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheit\u00E4\",\nfiles: \"tiedostot\",\nfile: \"tiedosto\",\n},\nsv: {\ninProgress: \"Adding {filesUploaded} of {filesTotal}\",\ninProgressWithErrors:\n\"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades\",\ndone: \"Alla {filesTotal} har lagts till\",\ndoneWithErrors: \"Handling slutf\u00F6rd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades\",\nfiles: \"filer\",\nfile: \"fil\",\n},\nen: {\ninProgress: \"Adding {filesUploaded} of {filesTotal}\",\ninProgressWithErrors:\n\"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed\",\ndone: \"All {filesTotal} added successfully\",\ndoneWithErrors: \"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors\",\nfiles: \"tiedostoa\",\nfile: \"tiedosto\",\n},\n}"
|
|
972
999
|
}],
|
|
973
1000
|
"text": "Property to change the aria upload progress text read aloud by screenreaders"
|
|
974
1001
|
},
|
|
@@ -977,15 +1004,15 @@ export class DuetUpload {
|
|
|
977
1004
|
"defaultValue": "{\n fi: {\n inProgress: \"L\u00E4hetet\u00E4\u00E4n {filesUploaded} l\u00E4hetett\u00E4v\u00E4st\u00E4 {filesTotal} tiedostosta\",\n inProgressWithErrors:\n \"L\u00E4hetet\u00E4\u00E4n {filesInProgress} tiedostoa, l\u00E4hetetty {filesUploaded} l\u00E4hetett\u00E4v\u00E4st\u00E4 {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheit\u00E4\",\n done: \"Kaikki {filesTotal} tiedostoa l\u00E4hetetty onnistuneesti\",\n doneWithErrors:\n \"L\u00E4hetys valmis, {filesUploaded} tiedostoa on l\u00E4hetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheit\u00E4\",\n files: \"tiedostot\",\n file: \"tiedosto\",\n },\n sv: {\n inProgress: \"Adding {filesUploaded} of {filesTotal}\",\n inProgressWithErrors:\n \"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades\",\n done: \"Alla {filesTotal} har lagts till\",\n doneWithErrors: \"Handling slutf\u00F6rd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades\",\n files: \"filer\",\n file: \"fil\",\n },\n en: {\n inProgress: \"Adding {filesUploaded} of {filesTotal}\",\n inProgressWithErrors:\n \"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed\",\n done: \"All {filesTotal} added successfully\",\n doneWithErrors: \"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors\",\n files: \"tiedostoa\",\n file: \"tiedosto\",\n },\n }"
|
|
978
1005
|
},
|
|
979
1006
|
"statusMessageLabel": {
|
|
980
|
-
"type": "
|
|
1007
|
+
"type": "string",
|
|
981
1008
|
"mutable": false,
|
|
982
1009
|
"complexType": {
|
|
983
|
-
"original": "StatusMessage",
|
|
984
|
-
"resolved": "{ inProgress: string; inProgressWithErrors: string; done: string; doneWithErrors: string; file: string; files: string; }",
|
|
1010
|
+
"original": "StatusMessage | string",
|
|
1011
|
+
"resolved": "string | { inProgress: string; inProgressWithErrors: string; done: string; doneWithErrors: string; file: string; files: string; }",
|
|
985
1012
|
"references": {
|
|
986
1013
|
"StatusMessage": {
|
|
987
1014
|
"location": "import",
|
|
988
|
-
"path": "
|
|
1015
|
+
"path": "../duet-upload-aria-status/duet-upload-aria-status"
|
|
989
1016
|
}
|
|
990
1017
|
}
|
|
991
1018
|
},
|
|
@@ -995,7 +1022,9 @@ export class DuetUpload {
|
|
|
995
1022
|
"tags": [],
|
|
996
1023
|
"text": "Strings used for the status aria-label"
|
|
997
1024
|
},
|
|
998
|
-
"
|
|
1025
|
+
"attribute": "status-message-label",
|
|
1026
|
+
"reflect": false,
|
|
1027
|
+
"defaultValue": "getLocaleString(\n this.statusLabelDefaults\n )"
|
|
999
1028
|
},
|
|
1000
1029
|
"buttonLabelDefaults": {
|
|
1001
1030
|
"type": "string",
|
|
@@ -1017,7 +1046,7 @@ export class DuetUpload {
|
|
|
1017
1046
|
"name": "default",
|
|
1018
1047
|
"text": "{\nfi: \"Lis\u00E4\u00E4 liite\",\nsv: \"L\u00E4gg till en bilaga\",\nen: \"Add an attachment\",\n}"
|
|
1019
1048
|
}],
|
|
1020
|
-
"text": "Property to change
|
|
1049
|
+
"text": "Property to change button label defaults on the component."
|
|
1021
1050
|
},
|
|
1022
1051
|
"attribute": "button-label-default",
|
|
1023
1052
|
"reflect": false,
|
|
@@ -1056,7 +1085,7 @@ export class DuetUpload {
|
|
|
1056
1085
|
"optional": false,
|
|
1057
1086
|
"docs": {
|
|
1058
1087
|
"tags": [],
|
|
1059
|
-
"text": "accessible Label of button"
|
|
1088
|
+
"text": "accessible aria-Label of button"
|
|
1060
1089
|
},
|
|
1061
1090
|
"attribute": "accessible-button-label",
|
|
1062
1091
|
"reflect": false,
|
|
@@ -1184,11 +1213,29 @@ export class DuetUpload {
|
|
|
1184
1213
|
"name": "example",
|
|
1185
1214
|
"text": "[{ id: \"success\", label: {fi: \"Onnistunut\", en: \"Success\", sv: \"Alt klart\", }}]"
|
|
1186
1215
|
}],
|
|
1187
|
-
"text": "Array of group names that you want the editable table
|
|
1216
|
+
"text": "Array of group names that you want the editable table to use to display files"
|
|
1188
1217
|
},
|
|
1189
1218
|
"attribute": "groups",
|
|
1190
1219
|
"reflect": false
|
|
1191
1220
|
},
|
|
1221
|
+
"alignment": {
|
|
1222
|
+
"type": "string",
|
|
1223
|
+
"mutable": false,
|
|
1224
|
+
"complexType": {
|
|
1225
|
+
"original": "string",
|
|
1226
|
+
"resolved": "string",
|
|
1227
|
+
"references": {}
|
|
1228
|
+
},
|
|
1229
|
+
"required": false,
|
|
1230
|
+
"optional": false,
|
|
1231
|
+
"docs": {
|
|
1232
|
+
"tags": [],
|
|
1233
|
+
"text": "Key used to set vertical alignment of action buttons"
|
|
1234
|
+
},
|
|
1235
|
+
"attribute": "alignment",
|
|
1236
|
+
"reflect": false,
|
|
1237
|
+
"defaultValue": "\"middle\""
|
|
1238
|
+
},
|
|
1192
1239
|
"hideGroups": {
|
|
1193
1240
|
"type": "boolean",
|
|
1194
1241
|
"mutable": false,
|
|
@@ -1239,7 +1286,7 @@ export class DuetUpload {
|
|
|
1239
1286
|
"optional": false,
|
|
1240
1287
|
"docs": {
|
|
1241
1288
|
"tags": [],
|
|
1242
|
-
"text": "Property to read if
|
|
1289
|
+
"text": "Property to read if the internally used editable-table contains errors or not"
|
|
1243
1290
|
},
|
|
1244
1291
|
"attribute": "valid",
|
|
1245
1292
|
"reflect": true,
|
|
@@ -1312,7 +1359,7 @@ export class DuetUpload {
|
|
|
1312
1359
|
"name": "default",
|
|
1313
1360
|
"text": "{\nfi: \"Voit liitt\u00E4\u00E4 {filetypes}-muotoisia tiedostoja sek\u00E4 yleisimpi\u00E4 videotiedostoja. Voit l\u00E4hett\u00E4\u00E4 {maxbytes} verran tiedostoja yhdell\u00E4 kertaa, ja lis\u00E4t\u00E4 enint\u00E4\u00E4n {maxfiles} liitett\u00E4 kerrallaan.\",\nsv: \"Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer \u00E5t g\u00E5ngen och l\u00E4gga till upp till {maxfiles} bilagor \u00E5t g\u00E5ngen.\",\nen: \"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time.\",\n}"
|
|
1314
1361
|
}],
|
|
1315
|
-
"text": "Property to change descriptionDefaults defaults on the component
|
|
1362
|
+
"text": "Property to change descriptionDefaults defaults on the component."
|
|
1316
1363
|
},
|
|
1317
1364
|
"attribute": "description-default",
|
|
1318
1365
|
"reflect": false,
|
|
@@ -1825,7 +1872,7 @@ export class DuetUpload {
|
|
|
1825
1872
|
"return": "Promise<void>"
|
|
1826
1873
|
},
|
|
1827
1874
|
"docs": {
|
|
1828
|
-
"text": "Convenience method for updating
|
|
1875
|
+
"text": "Convenience method for updating the value of a key:value inside an item in the files attribute",
|
|
1829
1876
|
"tags": []
|
|
1830
1877
|
}
|
|
1831
1878
|
}
|
|
File without changes
|