@duetds/components 4.32.0 → 4.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hydrate/index.js +2367 -244
- package/lib/cjs/{dom-a28e5c5f.js → dom-52a4f07a.js} +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +2 -2
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-caption_4.cjs.entry.js +18 -11
- package/lib/cjs/duet-card.cjs.entry.js +3 -3
- package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
- package/lib/cjs/duet-choice_2.cjs.entry.js +39 -18
- package/lib/cjs/duet-collapsible.cjs.entry.js +5 -450
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +7 -7
- 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-editable-table_4.cjs.entry.js +1520 -0
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +3 -3
- package/lib/cjs/duet-grid_2.cjs.entry.js +69 -4
- package/lib/cjs/duet-header_2.cjs.entry.js +216 -49
- package/lib/cjs/duet-hero.cjs.entry.js +2 -2
- package/lib/cjs/duet-icon.cjs.entry.js +8 -6
- package/lib/cjs/duet-input_2.cjs.entry.js +8 -9
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-modal.cjs.entry.js +3 -3
- package/lib/cjs/duet-notification_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-number-input.cjs.entry.js +2 -2
- package/lib/cjs/duet-progress.cjs.entry.js +75 -0
- package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
- package/lib/cjs/duet-select.cjs.entry.js +5 -5
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-tab_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-textarea.cjs.entry.js +5 -5
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +2 -2
- package/lib/cjs/duet-tray.cjs.entry.js +3 -3
- 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-55b5a616.js → focus-utils-480ea4e0.js} +1 -1
- package/lib/cjs/form-search-d61b2843.js +8 -0
- package/lib/cjs/{index-03ed1f55.js → index-6966a494.js} +5 -2
- package/lib/cjs/{language-utils-48b8860b.js → language-utils-aa282901.js} +6 -2
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{shadow-css-6560c90c.js → shadow-css-e1b62a99.js} +9 -10
- package/lib/cjs/token-utils-05bd23b4.js +77 -0
- package/lib/cjs/tokens-8596cece.js +459 -0
- package/lib/cjs/{tokens.module-53b3bd92.js → tokens.module-6b2df1c2.js} +2 -0
- package/lib/cjs/{watch-options-3877c082.js → watch-options-d88afac0.js} +29 -6
- package/lib/collection/collection-manifest.json +17 -3
- package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
- package/lib/collection/components/duet-choice/duet-choice.js +94 -21
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +4 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +9 -9
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +32 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +225 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +36 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +225 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +13 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table.css +16 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +404 -0
- package/lib/collection/components/duet-footer/duet-footer.css +1 -0
- package/lib/collection/components/duet-grid/duet-grid.js +74 -6
- 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 +310 -122
- package/lib/collection/components/duet-heading/duet-heading.css +3 -0
- package/lib/collection/components/duet-heading/duet-heading.js +7 -6
- package/lib/collection/components/duet-icon/duet-icon.js +5 -3
- package/lib/collection/components/duet-input/duet-input.css +15 -0
- package/lib/collection/components/duet-input/duet-input.js +4 -4
- 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-paragraph/duet-paragraph.css +6 -0
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +34 -3
- package/lib/collection/components/duet-progress/duet-progress.css +103 -0
- package/lib/collection/components/duet-progress/duet-progress.js +240 -0
- package/lib/collection/components/duet-select/duet-select.css +15 -0
- package/lib/collection/components/duet-select/duet-select.js +3 -3
- package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -2
- 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-textarea/duet-textarea.css +19 -0
- package/lib/collection/components/duet-textarea/duet-textarea.js +5 -4
- package/lib/collection/components/duet-upload/duet-upload.css +64 -0
- package/lib/collection/components/duet-upload/duet-upload.js +1885 -0
- package/lib/collection/components/duet-upload/errorcodes.utils.js +32 -0
- package/lib/collection/components/duet-upload/mock.helpers.js +91 -0
- package/lib/collection/components/duet-upload/upload-editable-item-error.js +16 -0
- package/lib/collection/components/duet-upload/upload-editable-item-inprogres.js +8 -0
- package/lib/collection/components/duet-upload/upload-editable-item-success.js +30 -0
- package/lib/collection/components/duet-upload/upload-validators.js +93 -0
- package/lib/collection/components/duet-upload/upload.helpers.js +13 -0
- package/lib/collection/components/duet-upload/xhr.helpers.js +30 -0
- package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +217 -0
- package/lib/collection/utils/js-utils.js +12 -0
- package/lib/collection/utils/language-utils.js +6 -3
- package/lib/collection/utils/template-utils.js +33 -0
- package/lib/collection/utils/token-utils.js +67 -14
- package/lib/collection/utils/watch-options.js +35 -6
- package/lib/custom-elements-bundle/index.d.ts +36 -0
- package/lib/custom-elements-bundle/index.js +2309 -334
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-92103298.system.entry.js → p-07f43530.system.entry.js} +1 -1
- package/lib/duet/{p-cc0bd28f.system.entry.js → p-093bca2f.system.entry.js} +1 -1
- package/lib/duet/{p-a678da8c.entry.js → p-0aaf86ba.entry.js} +1 -1
- package/lib/duet/{p-94a5fd74.system.entry.js → p-0b0a05ed.system.entry.js} +1 -1
- package/lib/duet/{p-00eac879.system.entry.js → p-0be1c660.system.entry.js} +1 -1
- package/lib/duet/{p-3b3bac3f.system.entry.js → p-0d66e11b.system.entry.js} +1 -1
- package/lib/duet/{p-7331f2fe.system.entry.js → p-0de430e1.system.entry.js} +1 -1
- package/lib/duet/{p-3618aaee.entry.js → p-0ef8d711.entry.js} +1 -1
- package/lib/duet/p-12721178.js +4 -0
- package/lib/duet/{p-c19094dd.entry.js → p-12a08d77.entry.js} +1 -1
- package/lib/duet/p-15c9a17c.entry.js +4 -0
- package/lib/duet/{p-9cdd361e.js → p-183726f7.js} +0 -0
- package/lib/duet/{p-b75c5f13.entry.js → p-18c3eb54.entry.js} +1 -1
- package/lib/duet/{p-9542c540.entry.js → p-1b591fa4.entry.js} +1 -1
- package/lib/duet/{p-f364ce8b.system.entry.js → p-1bd0f4eb.system.entry.js} +1 -1
- package/lib/duet/p-2764f081.js +4 -0
- package/lib/duet/p-27bd8744.system.entry.js +4 -0
- package/lib/duet/p-289a31cb.entry.js +4 -0
- package/lib/duet/{p-8c511832.system.entry.js → p-29b352db.system.entry.js} +1 -1
- package/lib/duet/p-2a00f231.system.entry.js +4 -0
- package/lib/duet/p-3215e07e.system.entry.js +4 -0
- package/lib/duet/{p-ed479d09.system.entry.js → p-338b9955.system.entry.js} +1 -1
- package/lib/duet/{p-8740fa38.entry.js → p-33de1029.entry.js} +1 -1
- package/lib/duet/p-34ebff3b.entry.js +4 -0
- package/lib/duet/{p-b6a0caf8.system.entry.js → p-379d416f.system.entry.js} +1 -1
- package/lib/duet/{p-0b9b6393.entry.js → p-39a12eb9.entry.js} +1 -1
- package/lib/duet/{p-8652a7ab.system.entry.js → p-39fd8b43.system.entry.js} +1 -1
- package/lib/duet/{p-ffc2ffff.entry.js → p-3bafdf7c.entry.js} +1 -1
- package/lib/duet/{p-4fcbcecd.system.entry.js → p-3c1ce7e2.system.entry.js} +1 -1
- package/lib/duet/p-3da6b84e.entry.js +4 -0
- package/lib/duet/p-43c49a72.entry.js +4 -0
- package/lib/duet/{p-9f0f5674.entry.js → p-44f4b8ff.entry.js} +1 -1
- package/lib/duet/{p-b0bbbdba.system.entry.js → p-4c5ac0c2.system.entry.js} +1 -1
- package/lib/duet/p-50b4fb2c.js +4 -0
- package/lib/duet/p-51f7ae72.entry.js +4 -0
- package/lib/duet/p-52621211.js +15 -0
- package/lib/duet/{p-2a3411b5.system.entry.js → p-5443c9ca.system.entry.js} +1 -1
- package/lib/duet/{p-abd3bfb4.system.entry.js → p-5610db77.system.entry.js} +1 -1
- package/lib/duet/{p-2c0dd9ba.system.entry.js → p-5b409bfb.system.entry.js} +1 -1
- package/lib/duet/{p-807b2087.entry.js → p-6353407f.entry.js} +1 -1
- package/lib/duet/{p-a89e88a3.js → p-64bf94ee.js} +1 -1
- package/lib/duet/{p-2c679963.entry.js → p-64e915ae.entry.js} +1 -1
- package/lib/duet/{p-432ba72e.system.entry.js → p-6c237f21.system.entry.js} +1 -1
- package/lib/duet/p-6c8521f6.system.entry.js +4 -0
- package/lib/duet/{p-a962c8c1.system.js → p-6e4fd6ba.system.js} +0 -0
- package/lib/duet/p-70fafc98.system.js +4 -0
- package/lib/duet/{p-8002a095.entry.js → p-7347f4ac.entry.js} +1 -1
- package/lib/duet/{p-d13874cb.entry.js → p-781bd6db.entry.js} +1 -1
- package/lib/duet/{p-5a817929.system.entry.js → p-78e8a689.system.entry.js} +1 -1
- package/lib/duet/p-8143f3de.js +4 -0
- package/lib/duet/p-81e855e4.system.js +4 -0
- package/lib/duet/{p-84ece735.entry.js → p-8224d768.entry.js} +1 -1
- package/lib/duet/{p-43dde575.system.entry.js → p-848bb1c2.system.entry.js} +1 -1
- package/lib/duet/{p-1391ec53.entry.js → p-880a4afe.entry.js} +1 -1
- package/lib/duet/p-8c375429.entry.js +4 -0
- package/lib/duet/p-8cb71174.system.entry.js +4 -0
- package/lib/duet/p-8d7b68c4.entry.js +4 -0
- package/lib/duet/p-8f477bd6.system.js +4 -0
- package/lib/duet/p-969c6395.system.entry.js +4 -0
- package/lib/duet/p-9c234242.system.entry.js +4 -0
- package/lib/duet/{p-f13a0883.entry.js → p-9d7b9084.entry.js} +1 -1
- package/lib/duet/p-a0544097.system.entry.js +4 -0
- package/lib/duet/p-a16a58c1.system.js +4 -0
- package/lib/duet/{p-fb898d94.system.entry.js → p-a4a16d03.system.entry.js} +1 -1
- package/lib/duet/p-a4e3b44b.entry.js +4 -0
- package/lib/duet/{p-977f2826.entry.js → p-a91673cf.entry.js} +1 -1
- package/lib/duet/p-a926944f.entry.js +4 -0
- package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
- package/lib/duet/p-b08bce4c.entry.js +4 -0
- package/lib/duet/{p-ec3eef3a.entry.js → p-b48a5f80.entry.js} +1 -1
- package/lib/duet/p-bb3e3777.entry.js +4 -0
- package/lib/duet/{p-fbb7d194.entry.js → p-bbe33d02.entry.js} +1 -1
- package/lib/duet/p-be8e1c48.system.entry.js +4 -0
- package/lib/duet/{p-68d09837.system.entry.js → p-c56c73ee.system.entry.js} +1 -1
- package/lib/duet/p-c63bdc6a.system.entry.js +4 -0
- package/lib/duet/{p-c723d36e.system.js → p-c83685a6.system.js} +1 -1
- package/lib/duet/p-c8dfc958.system.entry.js +4 -0
- package/lib/duet/{p-6cf41bfe.system.entry.js → p-c92f601f.system.entry.js} +1 -1
- package/lib/duet/p-d004da5f.js +4 -0
- package/lib/duet/p-d49416f8.entry.js +4 -0
- package/lib/duet/{p-7a868085.entry.js → p-d581d82d.entry.js} +1 -1
- package/lib/duet/p-d6bb4301.entry.js +4 -0
- package/lib/duet/p-d9aadc15.entry.js +4 -0
- package/lib/duet/p-ddb6344c.system.js +4 -0
- package/lib/duet/{p-3040debf.entry.js → p-dde63979.entry.js} +1 -1
- package/lib/duet/p-e15ccddc.system.entry.js +4 -0
- package/lib/duet/{p-0f2a478e.entry.js → p-e1be37a6.entry.js} +1 -1
- package/lib/duet/p-e5c1751e.system.js +16 -0
- package/lib/duet/{p-b9683731.entry.js → p-e9209e9f.entry.js} +1 -1
- package/lib/duet/p-eb55ccd2.system.js +4 -0
- package/lib/duet/{p-b374d7c2.system.js → p-ee1ba0d4.system.js} +1 -1
- package/lib/duet/{p-57cb58d4.system.entry.js → p-f4a29a8a.system.entry.js} +2 -2
- package/lib/duet/p-f8a0bd32.system.entry.js +4 -0
- package/lib/duet/p-f9599dd9.system.entry.js +4 -0
- package/lib/duet/p-fa99eaa4.system.js +4 -0
- package/lib/duet/p-fd7018e9.js +4 -0
- package/lib/duet/{p-19c28d99.system.entry.js → p-fe0cca67.system.entry.js} +1 -1
- package/lib/esm/{dom-8516b24e.js → dom-5d060ace.js} +1 -1
- package/lib/esm/duet-alert.entry.js +2 -2
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +4 -4
- package/lib/esm/duet-caption_4.entry.js +18 -11
- package/lib/esm/duet-card.entry.js +3 -3
- package/lib/esm/duet-checkbox.entry.js +2 -2
- package/lib/esm/duet-choice_2.entry.js +40 -19
- package/lib/esm/duet-collapsible.entry.js +4 -449
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +7 -7
- 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-editable-table_4.entry.js +1513 -0
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +3 -3
- package/lib/esm/duet-grid_2.entry.js +69 -4
- package/lib/esm/duet-header_2.entry.js +216 -49
- package/lib/esm/duet-hero.entry.js +2 -2
- package/lib/esm/duet-icon.entry.js +8 -6
- package/lib/esm/duet-input_2.entry.js +7 -8
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +3 -3
- package/lib/esm/duet-modal.entry.js +3 -3
- package/lib/esm/duet-notification_2.entry.js +3 -3
- package/lib/esm/duet-number-input.entry.js +2 -2
- package/lib/esm/duet-progress.entry.js +71 -0
- package/lib/esm/duet-radio_2.entry.js +2 -2
- package/lib/esm/duet-range-slider.entry.js +2 -2
- package/lib/esm/duet-select.entry.js +5 -5
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-tab_2.entry.js +3 -3
- package/lib/esm/duet-textarea.entry.js +5 -5
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +2 -2
- package/lib/esm/duet-tray.entry.js +3 -3
- 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-6a282066.js → focus-utils-48837cfa.js} +1 -1
- package/lib/esm/form-search-ea8e19ae.js +6 -0
- package/lib/esm/{index-3a265449.js → index-80be4170.js} +5 -2
- package/lib/esm/{language-utils-d5c38f65.js → language-utils-344d894c.js} +6 -3
- package/lib/esm/loader.js +3 -3
- package/lib/esm/{shadow-css-9178c864.js → shadow-css-13d024f4.js} +9 -10
- package/lib/esm/token-utils-75f78ca4.js +75 -0
- package/lib/esm/tokens-e110dc89.js +453 -0
- package/lib/esm/{tokens.module-edb66c04.js → tokens.module-49cbf963.js} +3 -1
- package/lib/esm/watch-options-dd55bce8.js +57 -0
- package/lib/esm-es5/{dom-8516b24e.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 +2 -2
- 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 +2 -2
- 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 +1 -1
- 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 +4 -0
- 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 +2 -2
- 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-48837cfa.js +4 -0
- package/lib/esm-es5/form-search-ea8e19ae.js +4 -0
- package/lib/esm-es5/index-80be4170.js +4 -0
- package/lib/esm-es5/{language-utils-d5c38f65.js → language-utils-344d894c.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/shadow-css-13d024f4.js +15 -0
- package/lib/esm-es5/token-utils-75f78ca4.js +4 -0
- package/lib/esm-es5/tokens-e110dc89.js +4 -0
- package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
- package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
- package/lib/types/common-types.d.ts +0 -1
- package/lib/types/components/duet-choice/duet-choice.d.ts +20 -1
- package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +3 -0
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +5 -5
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +73 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +76 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +8 -0
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +94 -0
- package/lib/types/components/duet-grid/duet-grid.d.ts +17 -2
- 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-heading/duet-heading.d.ts +2 -2
- package/lib/types/components/duet-link/duet-link.d.ts +3 -0
- package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +9 -1
- package/lib/types/components/duet-progress/duet-progress.d.ts +64 -0
- package/lib/types/components/duet-table/duet-table.d.ts +1 -1
- package/lib/types/components/duet-upload/duet-upload.d.ts +408 -0
- package/lib/types/components/duet-upload/errorcodes.utils.d.ts +8 -0
- package/lib/types/components/duet-upload/mock.helpers.d.ts +2 -0
- package/lib/types/components/duet-upload/upload-editable-item-error.d.ts +7 -0
- package/lib/types/components/duet-upload/upload-editable-item-inprogres.d.ts +7 -0
- package/lib/types/components/duet-upload/upload-editable-item-success.d.ts +8 -0
- package/lib/types/components/duet-upload/upload-validators.d.ts +12 -0
- package/lib/types/components/duet-upload/upload.helpers.d.ts +1 -0
- package/lib/types/components/duet-upload/xhr.helpers.d.ts +18 -0
- package/lib/types/components/duet-upload-aria-status/duet-upload-aria-status.d.ts +49 -0
- package/lib/types/components.d.ts +835 -29
- package/lib/types/stencil-public-runtime.d.ts +6 -4
- package/lib/types/utils/js-utils.d.ts +1 -0
- package/lib/types/utils/language-utils.d.ts +5 -1
- package/lib/types/utils/template-utils.d.ts +13 -0
- package/lib/types/utils/token-utils.d.ts +8 -2
- package/lib/types/utils/watch-options.d.ts +2 -0
- package/package.json +13 -13
- package/lib/cjs/duet-table.cjs.entry.js +0 -132
- package/lib/cjs/token-utils-13e5d13e.js +0 -30
- package/lib/duet/p-0058512b.js +0 -4
- package/lib/duet/p-08729381.entry.js +0 -4
- package/lib/duet/p-0b00e8d6.system.js +0 -16
- package/lib/duet/p-15922601.system.js +0 -4
- package/lib/duet/p-194e25ce.system.entry.js +0 -4
- package/lib/duet/p-1d87ea02.system.entry.js +0 -4
- package/lib/duet/p-2d1e2b23.system.entry.js +0 -4
- package/lib/duet/p-322d1c38.js +0 -4
- package/lib/duet/p-40d68321.entry.js +0 -4
- package/lib/duet/p-418b2ce7.system.js +0 -4
- package/lib/duet/p-43e39d98.system.js +0 -4
- package/lib/duet/p-4603830b.entry.js +0 -4
- package/lib/duet/p-52d7fbec.entry.js +0 -4
- package/lib/duet/p-60478325.system.entry.js +0 -4
- package/lib/duet/p-64ed7add.entry.js +0 -4
- package/lib/duet/p-6a356ab1.system.js +0 -4
- package/lib/duet/p-72fd384a.entry.js +0 -4
- package/lib/duet/p-753b406c.entry.js +0 -4
- package/lib/duet/p-76c00d0c.entry.js +0 -4
- package/lib/duet/p-85fe1132.js +0 -4
- package/lib/duet/p-8c8e82aa.system.js +0 -4
- package/lib/duet/p-9a89ec39.js +0 -4
- package/lib/duet/p-a11df1b6.js +0 -15
- package/lib/duet/p-a1eccee1.system.entry.js +0 -4
- package/lib/duet/p-ade33230.entry.js +0 -4
- package/lib/duet/p-b04d738f.system.entry.js +0 -4
- package/lib/duet/p-cb827bb7.entry.js +0 -4
- package/lib/duet/p-d85fba2c.system.entry.js +0 -4
- package/lib/duet/p-dfa90f8a.system.entry.js +0 -4
- package/lib/duet/p-e6b9bd1d.entry.js +0 -4
- package/lib/duet/p-ee64d6be.system.entry.js +0 -4
- package/lib/duet/p-f113671b.system.entry.js +0 -4
- package/lib/duet/p-f2f04396.entry.js +0 -4
- package/lib/duet/p-fc6624fe.system.entry.js +0 -4
- package/lib/esm/duet-table.entry.js +0 -128
- package/lib/esm/token-utils-5a35377f.js +0 -28
- package/lib/esm/watch-options-de55ea78.js +0 -35
- package/lib/esm-es5/duet-table.entry.js +0 -4
- package/lib/esm-es5/focus-utils-6a282066.js +0 -4
- package/lib/esm-es5/index-3a265449.js +0 -4
- package/lib/esm-es5/shadow-css-9178c864.js +0 -15
- package/lib/esm-es5/token-utils-5a35377f.js +0 -4
- package/lib/esm-es5/tokens.module-edb66c04.js +0 -4
- package/lib/esm-es5/watch-options-de55ea78.js +0 -4
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Host, Prop, State, Watch } from "@stencil/core";
|
|
5
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
6
|
+
import { TableData } from "./duet-editable-table-tabledata";
|
|
7
|
+
export class DuetEditableTableItem {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.isHovering = false;
|
|
10
|
+
/**
|
|
11
|
+
* Theme of the empty state component.
|
|
12
|
+
*/
|
|
13
|
+
this.theme = "";
|
|
14
|
+
/**
|
|
15
|
+
* Actions that can be performed on the element
|
|
16
|
+
*/
|
|
17
|
+
this.actions = undefined;
|
|
18
|
+
/**
|
|
19
|
+
* GroupId used to pierce the shadowdom - gets concatenated with "content & actions" and used as part="groupIDcontent/actions" to pierce the content/Action item
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
this.groupId = "";
|
|
23
|
+
/**
|
|
24
|
+
* Key used to set vertical alignment of action buttons
|
|
25
|
+
*/
|
|
26
|
+
this.alignment = "middle";
|
|
27
|
+
/**
|
|
28
|
+
* Key used to identify item, when running actions
|
|
29
|
+
*/
|
|
30
|
+
this.keyName = "";
|
|
31
|
+
/**
|
|
32
|
+
* Object of data itemsused to render the entire row
|
|
33
|
+
*/
|
|
34
|
+
this.data = undefined;
|
|
35
|
+
}
|
|
36
|
+
watchPropHandler(_newValue, _oldValue) {
|
|
37
|
+
// console.log("The new value of activated is: ", _newValue)
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
/**
|
|
41
|
+
* Component lifecycle events.
|
|
42
|
+
*/
|
|
43
|
+
componentWillLoad() {
|
|
44
|
+
inheritGlobalTheme(this);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
/**
|
|
48
|
+
* private functions
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* render() function
|
|
52
|
+
* Always the last one in the class.
|
|
53
|
+
*/
|
|
54
|
+
render() {
|
|
55
|
+
return (h(Host, { role: "row" },
|
|
56
|
+
h(TableData, { data: this.data.item, alignment: this.alignment, groupId: this.groupId }),
|
|
57
|
+
h("td", { class: "duet-editable-table-actions", style: { verticalAlign: this.alignment } },
|
|
58
|
+
h("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
|
|
59
|
+
const { map = undefined } = result;
|
|
60
|
+
// if map has been specified, only show the current action if groupID matches the map array
|
|
61
|
+
if (map && !map.includes(this.groupId)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
return (h("duet-editable-table-button", { keyName: this.keyName, group: this.data.group, uid: this.data.uid, actions: result, theme: this.theme }));
|
|
65
|
+
})))));
|
|
66
|
+
}
|
|
67
|
+
static get is() { return "duet-editable-table-item"; }
|
|
68
|
+
static get encapsulation() { return "shadow"; }
|
|
69
|
+
static get originalStyleUrls() { return {
|
|
70
|
+
"$": ["duet-editable-table-item.scss"]
|
|
71
|
+
}; }
|
|
72
|
+
static get styleUrls() { return {
|
|
73
|
+
"$": ["duet-editable-table-item.css"]
|
|
74
|
+
}; }
|
|
75
|
+
static get properties() { return {
|
|
76
|
+
"theme": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"mutable": true,
|
|
79
|
+
"complexType": {
|
|
80
|
+
"original": "DuetTheme",
|
|
81
|
+
"resolved": "\"\" | \"default\" | \"turva\"",
|
|
82
|
+
"references": {
|
|
83
|
+
"DuetTheme": {
|
|
84
|
+
"location": "import",
|
|
85
|
+
"path": "../../common-types"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": false,
|
|
90
|
+
"optional": false,
|
|
91
|
+
"docs": {
|
|
92
|
+
"tags": [],
|
|
93
|
+
"text": "Theme of the empty state component."
|
|
94
|
+
},
|
|
95
|
+
"attribute": "theme",
|
|
96
|
+
"reflect": false,
|
|
97
|
+
"defaultValue": "\"\""
|
|
98
|
+
},
|
|
99
|
+
"actions": {
|
|
100
|
+
"type": "unknown",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "DuetEditableTableActions",
|
|
104
|
+
"resolved": "{ icon: string; color: string; color_hover: string; id: string; map?: string[]; label?: DuetLangObject; }[]",
|
|
105
|
+
"references": {
|
|
106
|
+
"DuetEditableTableActions": {
|
|
107
|
+
"location": "local"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": false,
|
|
112
|
+
"optional": false,
|
|
113
|
+
"docs": {
|
|
114
|
+
"tags": [],
|
|
115
|
+
"text": "Actions that can be performed on the element"
|
|
116
|
+
},
|
|
117
|
+
"defaultValue": "undefined"
|
|
118
|
+
},
|
|
119
|
+
"groupId": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "string",
|
|
124
|
+
"resolved": "string",
|
|
125
|
+
"references": {}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": false,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [{
|
|
131
|
+
"name": "internal",
|
|
132
|
+
"text": undefined
|
|
133
|
+
}],
|
|
134
|
+
"text": "GroupId used to pierce the shadowdom - gets concatenated with \"content & actions\" and used as part=\"groupIDcontent/actions\" to pierce the content/Action item"
|
|
135
|
+
},
|
|
136
|
+
"attribute": "group-id",
|
|
137
|
+
"reflect": false,
|
|
138
|
+
"defaultValue": "\"\""
|
|
139
|
+
},
|
|
140
|
+
"alignment": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"mutable": false,
|
|
143
|
+
"complexType": {
|
|
144
|
+
"original": "string",
|
|
145
|
+
"resolved": "string",
|
|
146
|
+
"references": {}
|
|
147
|
+
},
|
|
148
|
+
"required": false,
|
|
149
|
+
"optional": false,
|
|
150
|
+
"docs": {
|
|
151
|
+
"tags": [],
|
|
152
|
+
"text": "Key used to set vertical alignment of action buttons"
|
|
153
|
+
},
|
|
154
|
+
"attribute": "alignment",
|
|
155
|
+
"reflect": false,
|
|
156
|
+
"defaultValue": "\"middle\""
|
|
157
|
+
},
|
|
158
|
+
"keyName": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"mutable": false,
|
|
161
|
+
"complexType": {
|
|
162
|
+
"original": "string",
|
|
163
|
+
"resolved": "string",
|
|
164
|
+
"references": {}
|
|
165
|
+
},
|
|
166
|
+
"required": false,
|
|
167
|
+
"optional": false,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": "Key used to identify item, when running actions"
|
|
171
|
+
},
|
|
172
|
+
"attribute": "key-name",
|
|
173
|
+
"reflect": false,
|
|
174
|
+
"defaultValue": "\"\""
|
|
175
|
+
},
|
|
176
|
+
"data": {
|
|
177
|
+
"type": "unknown",
|
|
178
|
+
"mutable": true,
|
|
179
|
+
"complexType": {
|
|
180
|
+
"original": "DuetEditableTableItemData",
|
|
181
|
+
"resolved": "{ uid: string; item: string | HTMLElement | Record<string, string>; group: string; }",
|
|
182
|
+
"references": {
|
|
183
|
+
"DuetEditableTableItemData": {
|
|
184
|
+
"location": "local"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"required": false,
|
|
189
|
+
"optional": false,
|
|
190
|
+
"docs": {
|
|
191
|
+
"tags": [],
|
|
192
|
+
"text": "Object of data itemsused to render the entire row"
|
|
193
|
+
},
|
|
194
|
+
"defaultValue": "undefined"
|
|
195
|
+
}
|
|
196
|
+
}; }
|
|
197
|
+
static get states() { return {
|
|
198
|
+
"isHovering": {}
|
|
199
|
+
}; }
|
|
200
|
+
static get events() { return [{
|
|
201
|
+
"method": "duetEditableItemAction",
|
|
202
|
+
"name": "duetEditableItemAction",
|
|
203
|
+
"bubbles": true,
|
|
204
|
+
"cancelable": true,
|
|
205
|
+
"composed": true,
|
|
206
|
+
"docs": {
|
|
207
|
+
"tags": [],
|
|
208
|
+
"text": "Emitted when any action is clicked"
|
|
209
|
+
},
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "DuetEditableTableItemEvent",
|
|
212
|
+
"resolved": "{ originalEvent?: Event; uid: string; keyName: string; action: string; group: string; component: \"duet-editable-table-item\"; }",
|
|
213
|
+
"references": {
|
|
214
|
+
"DuetEditableTableItemEvent": {
|
|
215
|
+
"location": "local"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}]; }
|
|
220
|
+
static get elementRef() { return "el"; }
|
|
221
|
+
static get watchers() { return [{
|
|
222
|
+
"propName": "data",
|
|
223
|
+
"methodName": "watchPropHandler"
|
|
224
|
+
}]; }
|
|
225
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { h } from "@stencil/core";
|
|
5
|
+
//simple functional component that renders the data in the table
|
|
6
|
+
export const TableData = ({ data, groupId, alignment }, _children) => {
|
|
7
|
+
if (typeof data === "string") {
|
|
8
|
+
return (h("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }));
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return (h("td", { class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }, data));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
duet-editable-table {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
padding: 0;
|
|
4
|
+
margin: 0;
|
|
5
|
+
background: transparent;
|
|
6
|
+
border: 0;
|
|
7
|
+
-moz-appearance: none;
|
|
8
|
+
-webkit-appearance: none;
|
|
9
|
+
appearance: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.duet-editable-table-header tr .duet-editable-table-header-hidden {
|
|
13
|
+
padding: 0 !important;
|
|
14
|
+
font-size: 0;
|
|
15
|
+
border-bottom: 0;
|
|
16
|
+
}
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, h, Host, Method, Prop, State } from "@stencil/core";
|
|
5
|
+
import { debounce } from "../../utils/js-utils";
|
|
6
|
+
import { getLocaleString, sanitizeString } from "../../utils/language-utils";
|
|
7
|
+
import { generateTemplateFn } from "../../utils/template-utils";
|
|
8
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
9
|
+
export class DuetEditableTable {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.template = undefined;
|
|
12
|
+
/**
|
|
13
|
+
* State() variables
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
this.tick = Date.now();
|
|
17
|
+
/**
|
|
18
|
+
* Map of items that contain list of things.
|
|
19
|
+
*/
|
|
20
|
+
this.items = new Map();
|
|
21
|
+
/**
|
|
22
|
+
* Key used to set vertical alignment of action buttons
|
|
23
|
+
*/
|
|
24
|
+
this.alignment = "middle";
|
|
25
|
+
/**
|
|
26
|
+
* Array of internationalized defaults for the default groups labels.
|
|
27
|
+
*/
|
|
28
|
+
this.groupsLabelDefaults = {
|
|
29
|
+
fi: "Kaikki",
|
|
30
|
+
en: "All items",
|
|
31
|
+
sv: "Alla objekt",
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Array of internationalized defaults for the default action labels.
|
|
35
|
+
*/
|
|
36
|
+
this.actionLabelDefaults = {
|
|
37
|
+
fi: "Toiminnot",
|
|
38
|
+
en: "Actions",
|
|
39
|
+
sv: "Handlingar",
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions).
|
|
43
|
+
* @default { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }.
|
|
44
|
+
* @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}].
|
|
45
|
+
*/
|
|
46
|
+
this.groups = [
|
|
47
|
+
{ id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
|
|
48
|
+
];
|
|
49
|
+
/**
|
|
50
|
+
* Array of actions that are mapped via the map variable to the various groups defined in group.
|
|
51
|
+
* @default undefined
|
|
52
|
+
* @example [{
|
|
53
|
+
variation: "default",
|
|
54
|
+
icon: "action-edit-2",
|
|
55
|
+
id: "edit",
|
|
56
|
+
map: ["success"],
|
|
57
|
+
label: {
|
|
58
|
+
fi: " Label",
|
|
59
|
+
en: " Label",
|
|
60
|
+
sv: " Label",
|
|
61
|
+
}
|
|
62
|
+
}]
|
|
63
|
+
*/
|
|
64
|
+
this.actions = undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Shows or hides the table labels.
|
|
67
|
+
*/
|
|
68
|
+
this.hideGroups = false;
|
|
69
|
+
/**
|
|
70
|
+
* Exposes the aria role for optimizing accessibility.
|
|
71
|
+
*/
|
|
72
|
+
this.accessibleRole = undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Theme of the table.
|
|
75
|
+
*/
|
|
76
|
+
this.theme = "";
|
|
77
|
+
/**
|
|
78
|
+
* Private methods.
|
|
79
|
+
*/
|
|
80
|
+
this.kick = debounce(() => {
|
|
81
|
+
this.tick = Date.now();
|
|
82
|
+
}, 100); // will trigger re-render
|
|
83
|
+
/**
|
|
84
|
+
* If a user defines a template section within editable table, try to read an use it.
|
|
85
|
+
*/
|
|
86
|
+
this.getTemplate = () => {
|
|
87
|
+
const templateDom = this.element.getElementsByTagName("template");
|
|
88
|
+
if (templateDom === null || templateDom === void 0 ? void 0 : templateDom.length) {
|
|
89
|
+
const templateString = templateDom[0].content.firstElementChild.outerHTML;
|
|
90
|
+
return generateTemplateFn(templateString);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
this.getItemData = (data) => {
|
|
97
|
+
const { item, group, uid } = data;
|
|
98
|
+
if (this.template) {
|
|
99
|
+
return {
|
|
100
|
+
group,
|
|
101
|
+
uid,
|
|
102
|
+
item: this.template(item),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return { item, group, uid };
|
|
106
|
+
};
|
|
107
|
+
this.filterMap = needle => {
|
|
108
|
+
if (needle === "all") {
|
|
109
|
+
return Array.from(this.items);
|
|
110
|
+
}
|
|
111
|
+
return Array.from(this.items).filter(item => needle === item[1].group);
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Component lifecycle events.
|
|
116
|
+
*/
|
|
117
|
+
componentWillLoad() {
|
|
118
|
+
// look for a <template> region in the duet-editable-table
|
|
119
|
+
this.template = this.getTemplate();
|
|
120
|
+
// take care of the case where groups and actions are defined as html properties instead of javascript objects
|
|
121
|
+
if (typeof this.groups === "string") {
|
|
122
|
+
this.internalGroupArray = sanitizeString(this.groups);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
this.internalGroupArray = this.groups;
|
|
126
|
+
}
|
|
127
|
+
if (typeof this.actions === "string") {
|
|
128
|
+
this.internalActionsArray = sanitizeString(this.actions);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
this.internalActionsArray = this.actions;
|
|
132
|
+
}
|
|
133
|
+
inheritGlobalTheme(this);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Method to force an update of a tabular data array.
|
|
137
|
+
* when called the method will rerender the entire tabular structure.
|
|
138
|
+
*/
|
|
139
|
+
async updateTable(passedItems = undefined) {
|
|
140
|
+
this.items = new Map(passedItems || this.items);
|
|
141
|
+
this.kick();
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
return (h(Host, { class: {
|
|
145
|
+
"duet-theme-turva": this.theme === "turva",
|
|
146
|
+
} }, this.internalGroupArray.map(group => {
|
|
147
|
+
const currentGroup = this.filterMap(group.id);
|
|
148
|
+
if (!currentGroup.length) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
return (h("duet-table", { variation: "plain", breakpoint: "none", role: "", margin: this.hideGroups ? "none" : "auto" },
|
|
152
|
+
h("table", { class: "duet-editable-table", "aria-role": this.accessibleRole },
|
|
153
|
+
h("thead", { class: "duet-editable-table-header" },
|
|
154
|
+
h("tr", null,
|
|
155
|
+
h("th", { class: {
|
|
156
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
157
|
+
} }, !this.hideGroups ? (getLocaleString(group.label)) : (h("duet-visually-hidden", null, getLocaleString(group.label)))),
|
|
158
|
+
h("th", { class: {
|
|
159
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
160
|
+
} },
|
|
161
|
+
h("duet-visually-hidden", null, group.actionLabel
|
|
162
|
+
? getLocaleString(group.actionLabel)
|
|
163
|
+
: getLocaleString(this.actionLabelDefaults))))),
|
|
164
|
+
h("tbody", null, currentGroup.map(dataAsArray => {
|
|
165
|
+
const [key, value] = dataAsArray;
|
|
166
|
+
return (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 }));
|
|
167
|
+
})))));
|
|
168
|
+
})));
|
|
169
|
+
}
|
|
170
|
+
static get is() { return "duet-editable-table"; }
|
|
171
|
+
static get encapsulation() { return "shadow"; }
|
|
172
|
+
static get originalStyleUrls() { return {
|
|
173
|
+
"$": ["duet-editable-table.scss"]
|
|
174
|
+
}; }
|
|
175
|
+
static get styleUrls() { return {
|
|
176
|
+
"$": ["duet-editable-table.css"]
|
|
177
|
+
}; }
|
|
178
|
+
static get properties() { return {
|
|
179
|
+
"items": {
|
|
180
|
+
"type": "unknown",
|
|
181
|
+
"mutable": true,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "DuetEditableTableItems",
|
|
184
|
+
"resolved": "Map<any, DuetEditableTableItemData>",
|
|
185
|
+
"references": {
|
|
186
|
+
"DuetEditableTableItems": {
|
|
187
|
+
"location": "local"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"required": false,
|
|
192
|
+
"optional": false,
|
|
193
|
+
"docs": {
|
|
194
|
+
"tags": [],
|
|
195
|
+
"text": "Map of items that contain list of things."
|
|
196
|
+
},
|
|
197
|
+
"defaultValue": "new Map()"
|
|
198
|
+
},
|
|
199
|
+
"alignment": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"mutable": false,
|
|
202
|
+
"complexType": {
|
|
203
|
+
"original": "string",
|
|
204
|
+
"resolved": "string",
|
|
205
|
+
"references": {}
|
|
206
|
+
},
|
|
207
|
+
"required": false,
|
|
208
|
+
"optional": false,
|
|
209
|
+
"docs": {
|
|
210
|
+
"tags": [],
|
|
211
|
+
"text": "Key used to set vertical alignment of action buttons"
|
|
212
|
+
},
|
|
213
|
+
"attribute": "alignment",
|
|
214
|
+
"reflect": false,
|
|
215
|
+
"defaultValue": "\"middle\""
|
|
216
|
+
},
|
|
217
|
+
"groupsLabelDefaults": {
|
|
218
|
+
"type": "unknown",
|
|
219
|
+
"mutable": false,
|
|
220
|
+
"complexType": {
|
|
221
|
+
"original": "DuetLangObject",
|
|
222
|
+
"resolved": "DuetLangObject",
|
|
223
|
+
"references": {
|
|
224
|
+
"DuetLangObject": {
|
|
225
|
+
"location": "import",
|
|
226
|
+
"path": "../../utils/language-utils"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": false,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": "Array of internationalized defaults for the default groups labels."
|
|
235
|
+
},
|
|
236
|
+
"defaultValue": "{\n fi: \"Kaikki\",\n en: \"All items\",\n sv: \"Alla objekt\",\n }"
|
|
237
|
+
},
|
|
238
|
+
"actionLabelDefaults": {
|
|
239
|
+
"type": "unknown",
|
|
240
|
+
"mutable": false,
|
|
241
|
+
"complexType": {
|
|
242
|
+
"original": "DuetLangObject",
|
|
243
|
+
"resolved": "DuetLangObject",
|
|
244
|
+
"references": {
|
|
245
|
+
"DuetLangObject": {
|
|
246
|
+
"location": "import",
|
|
247
|
+
"path": "../../utils/language-utils"
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"required": false,
|
|
252
|
+
"optional": false,
|
|
253
|
+
"docs": {
|
|
254
|
+
"tags": [],
|
|
255
|
+
"text": "Array of internationalized defaults for the default action labels."
|
|
256
|
+
},
|
|
257
|
+
"defaultValue": "{\n fi: \"Toiminnot\",\n en: \"Actions\",\n sv: \"Handlingar\",\n }"
|
|
258
|
+
},
|
|
259
|
+
"groups": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"mutable": false,
|
|
262
|
+
"complexType": {
|
|
263
|
+
"original": "DuetEditableTableGroupNames | string",
|
|
264
|
+
"resolved": "string | { id: string; label: DuetLangObject; actionLabel?: DuetLangObject; }[]",
|
|
265
|
+
"references": {
|
|
266
|
+
"DuetEditableTableGroupNames": {
|
|
267
|
+
"location": "local"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"required": false,
|
|
272
|
+
"optional": false,
|
|
273
|
+
"docs": {
|
|
274
|
+
"tags": [{
|
|
275
|
+
"name": "default",
|
|
276
|
+
"text": "{ id: \"all\", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }."
|
|
277
|
+
}, {
|
|
278
|
+
"name": "example",
|
|
279
|
+
"text": "[{ id: \"success\", label: {fi: \"Onnistunut\", en: \"Success\", sv: \"Alt klart\", }}]."
|
|
280
|
+
}],
|
|
281
|
+
"text": "Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions)."
|
|
282
|
+
},
|
|
283
|
+
"attribute": "groups",
|
|
284
|
+
"reflect": false,
|
|
285
|
+
"defaultValue": "[\n { id: \"all\", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },\n ]"
|
|
286
|
+
},
|
|
287
|
+
"actions": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "DuetEditableTableActions | string",
|
|
292
|
+
"resolved": "string | { icon: string; color: string; color_hover: string; id: string; map?: string[]; label?: DuetLangObject; }[]",
|
|
293
|
+
"references": {
|
|
294
|
+
"DuetEditableTableActions": {
|
|
295
|
+
"location": "import",
|
|
296
|
+
"path": "./duet-editable-table-item"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"required": false,
|
|
301
|
+
"optional": false,
|
|
302
|
+
"docs": {
|
|
303
|
+
"tags": [{
|
|
304
|
+
"name": "default",
|
|
305
|
+
"text": "undefined"
|
|
306
|
+
}, {
|
|
307
|
+
"name": "example",
|
|
308
|
+
"text": "[{\nvariation: \"default\",\nicon: \"action-edit-2\",\nid: \"edit\",\nmap: [\"success\"],\nlabel: {\n fi: \" Label\",\n en: \" Label\",\n sv: \" Label\",\n}\n}]"
|
|
309
|
+
}],
|
|
310
|
+
"text": "Array of actions that are mapped via the map variable to the various groups defined in group."
|
|
311
|
+
},
|
|
312
|
+
"attribute": "actions",
|
|
313
|
+
"reflect": false,
|
|
314
|
+
"defaultValue": "undefined"
|
|
315
|
+
},
|
|
316
|
+
"hideGroups": {
|
|
317
|
+
"type": "boolean",
|
|
318
|
+
"mutable": false,
|
|
319
|
+
"complexType": {
|
|
320
|
+
"original": "boolean",
|
|
321
|
+
"resolved": "boolean",
|
|
322
|
+
"references": {}
|
|
323
|
+
},
|
|
324
|
+
"required": false,
|
|
325
|
+
"optional": false,
|
|
326
|
+
"docs": {
|
|
327
|
+
"tags": [],
|
|
328
|
+
"text": "Shows or hides the table labels."
|
|
329
|
+
},
|
|
330
|
+
"attribute": "hide-table-labels",
|
|
331
|
+
"reflect": false,
|
|
332
|
+
"defaultValue": "false"
|
|
333
|
+
},
|
|
334
|
+
"accessibleRole": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"mutable": false,
|
|
337
|
+
"complexType": {
|
|
338
|
+
"original": "string",
|
|
339
|
+
"resolved": "string",
|
|
340
|
+
"references": {}
|
|
341
|
+
},
|
|
342
|
+
"required": false,
|
|
343
|
+
"optional": false,
|
|
344
|
+
"docs": {
|
|
345
|
+
"tags": [],
|
|
346
|
+
"text": "Exposes the aria role for optimizing accessibility."
|
|
347
|
+
},
|
|
348
|
+
"attribute": "accessible-role",
|
|
349
|
+
"reflect": false,
|
|
350
|
+
"defaultValue": "undefined"
|
|
351
|
+
},
|
|
352
|
+
"theme": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"mutable": true,
|
|
355
|
+
"complexType": {
|
|
356
|
+
"original": "DuetTheme",
|
|
357
|
+
"resolved": "\"\" | \"default\" | \"turva\"",
|
|
358
|
+
"references": {
|
|
359
|
+
"DuetTheme": {
|
|
360
|
+
"location": "import",
|
|
361
|
+
"path": "../../common-types"
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"required": false,
|
|
366
|
+
"optional": false,
|
|
367
|
+
"docs": {
|
|
368
|
+
"tags": [],
|
|
369
|
+
"text": "Theme of the table."
|
|
370
|
+
},
|
|
371
|
+
"attribute": "theme",
|
|
372
|
+
"reflect": false,
|
|
373
|
+
"defaultValue": "\"\""
|
|
374
|
+
}
|
|
375
|
+
}; }
|
|
376
|
+
static get states() { return {
|
|
377
|
+
"tick": {}
|
|
378
|
+
}; }
|
|
379
|
+
static get methods() { return {
|
|
380
|
+
"updateTable": {
|
|
381
|
+
"complexType": {
|
|
382
|
+
"signature": "(passedItems?: DuetEditableTableItems) => Promise<void>",
|
|
383
|
+
"parameters": [{
|
|
384
|
+
"tags": [],
|
|
385
|
+
"text": ""
|
|
386
|
+
}],
|
|
387
|
+
"references": {
|
|
388
|
+
"Promise": {
|
|
389
|
+
"location": "global"
|
|
390
|
+
},
|
|
391
|
+
"DuetEditableTableItems": {
|
|
392
|
+
"location": "local"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"return": "Promise<void>"
|
|
396
|
+
},
|
|
397
|
+
"docs": {
|
|
398
|
+
"text": "Method to force an update of a tabular data array.\nwhen called the method will rerender the entire tabular structure.",
|
|
399
|
+
"tags": []
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}; }
|
|
403
|
+
static get elementRef() { return "element"; }
|
|
404
|
+
}
|