@duetds/components 4.32.0 → 4.33.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 +1933 -87
- package/lib/cjs/{dom-a28e5c5f.js → dom-c850c8d7.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 +17 -10
- 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 +40 -18
- package/lib/cjs/duet-collapsible.cjs.entry.js +4 -1
- 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_3.cjs.entry.js +232 -0
- package/lib/cjs/{duet-table.cjs.entry.js → duet-editable-table_3.cjs.entry.js} +206 -2
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +2 -2
- package/lib/cjs/duet-grid_2.cjs.entry.js +52 -4
- package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-hero.cjs.entry.js +2 -2
- package/lib/cjs/duet-icon.cjs.entry.js +4 -4
- package/lib/cjs/duet-input_2.cjs.entry.js +6 -6
- 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 +3 -3
- package/lib/cjs/duet-notification_2.cjs.entry.js +2 -2
- 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.cjs.entry.js +1089 -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-a7a1fb8b.js} +1 -1
- package/lib/cjs/{index-03ed1f55.js → index-b724d698.js} +5 -2
- package/lib/cjs/js-utils-33a9dbe3.js +16 -0
- 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-e3edeed1.js} +9 -10
- package/lib/cjs/{token-utils-13e5d13e.js → token-utils-63a9c8dc.js} +1 -1
- 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 +15 -2
- package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
- package/lib/collection/components/duet-choice/duet-choice.js +95 -21
- 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 +218 -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 +203 -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 +348 -0
- package/lib/collection/components/duet-grid/duet-grid.js +57 -6
- 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 +2 -6
- 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-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-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-aria-status.js +217 -0
- package/lib/collection/components/duet-upload/duet-upload-editable-item-error.js +16 -0
- package/lib/collection/components/duet-upload/duet-upload-editable-item-inprogres.js +8 -0
- package/lib/collection/components/duet-upload/duet-upload-editable-item-success.js +30 -0
- package/lib/collection/components/duet-upload/duet-upload-validators.js +93 -0
- package/lib/collection/components/duet-upload/duet-upload.css +64 -0
- package/lib/collection/components/duet-upload/duet-upload.js +1838 -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.helpers.js +13 -0
- package/lib/collection/components/duet-upload/xhr.helpers.js +30 -0
- package/lib/collection/utils/js-utils.js +12 -0
- package/lib/collection/utils/language-utils.js +6 -3
- 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 +1917 -277
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-1391ec53.entry.js → p-00735436.entry.js} +1 -1
- package/lib/duet/p-060d79be.entry.js +4 -0
- package/lib/duet/p-0d22396e.system.js +16 -0
- package/lib/duet/p-10deead0.system.js +4 -0
- package/lib/duet/{p-72fd384a.entry.js → p-1208c84f.entry.js} +1 -1
- package/lib/duet/p-12721178.js +4 -0
- package/lib/duet/p-155ef581.system.entry.js +4 -0
- package/lib/duet/{p-08729381.entry.js → p-16c48c5d.entry.js} +1 -1
- package/lib/duet/p-1797df7b.system.entry.js +4 -0
- package/lib/duet/p-1a08fc22.system.entry.js +4 -0
- package/lib/duet/{p-b6a0caf8.system.entry.js → p-237e47b4.system.entry.js} +1 -1
- package/lib/duet/{p-4fcbcecd.system.entry.js → p-2443bdca.system.entry.js} +1 -1
- package/lib/duet/{p-432ba72e.system.entry.js → p-263bc9cd.system.entry.js} +1 -1
- package/lib/duet/p-2764f081.js +4 -0
- package/lib/duet/{p-b0bbbdba.system.entry.js → p-27d80cef.system.entry.js} +1 -1
- package/lib/duet/p-28e02c08.entry.js +4 -0
- package/lib/duet/{p-8740fa38.entry.js → p-2bb1460c.entry.js} +1 -1
- package/lib/duet/p-33c58756.entry.js +4 -0
- package/lib/duet/{p-9cdd361e.js → p-35a3794e.js} +0 -0
- package/lib/duet/{p-8c511832.system.entry.js → p-374fb7e6.system.entry.js} +1 -1
- package/lib/duet/{p-5a817929.system.entry.js → p-387823af.system.entry.js} +1 -1
- package/lib/duet/{p-a678da8c.entry.js → p-3af5d66f.entry.js} +1 -1
- package/lib/duet/{p-322d1c38.js → p-3c1971d8.js} +1 -1
- package/lib/duet/{p-d13874cb.entry.js → p-4607af59.entry.js} +1 -1
- package/lib/duet/{p-2c0dd9ba.system.entry.js → p-48d1eb1f.system.entry.js} +1 -1
- package/lib/duet/p-4a87e9ab.system.entry.js +4 -0
- package/lib/duet/{p-92103298.system.entry.js → p-4b6ebe40.system.entry.js} +1 -1
- package/lib/duet/{p-6cf41bfe.system.entry.js → p-4e28da18.system.entry.js} +1 -1
- package/lib/duet/p-548d484e.js +4 -0
- package/lib/duet/{p-2c679963.entry.js → p-5826523b.entry.js} +1 -1
- package/lib/duet/{p-7331f2fe.system.entry.js → p-58750bae.system.entry.js} +1 -1
- package/lib/duet/{p-7a868085.entry.js → p-597d99c7.entry.js} +1 -1
- package/lib/duet/p-5ea0cd19.entry.js +4 -0
- package/lib/duet/p-63d5bf73.system.entry.js +4 -0
- package/lib/duet/{p-68d09837.system.entry.js → p-67d9a9a9.system.entry.js} +1 -1
- package/lib/duet/{p-9542c540.entry.js → p-6a19b5ec.entry.js} +1 -1
- package/lib/duet/p-6cc3be76.system.entry.js +4 -0
- package/lib/duet/p-6e363557.system.js +4 -0
- package/lib/duet/{p-3b3bac3f.system.entry.js → p-6e6e76db.system.entry.js} +1 -1
- package/lib/duet/p-70fafc98.system.js +4 -0
- package/lib/duet/{p-2d1e2b23.system.entry.js → p-7368b14e.system.entry.js} +1 -1
- package/lib/duet/{p-2a3411b5.system.entry.js → p-751542a0.system.entry.js} +1 -1
- package/lib/duet/{p-b75c5f13.entry.js → p-794659ac.entry.js} +1 -1
- package/lib/duet/{p-b04d738f.system.entry.js → p-7e8d5bb9.system.entry.js} +1 -1
- package/lib/duet/p-7fee0d23.system.entry.js +4 -0
- package/lib/duet/p-81867417.system.js +4 -0
- package/lib/duet/{p-84ece735.entry.js → p-86daec1c.entry.js} +1 -1
- package/lib/duet/{p-94a5fd74.system.entry.js → p-8b5ca0e7.system.entry.js} +1 -1
- package/lib/duet/{p-ffc2ffff.entry.js → p-8cb7416d.entry.js} +1 -1
- package/lib/duet/p-8f826843.system.entry.js +4 -0
- package/lib/duet/p-94169303.entry.js +4 -0
- package/lib/duet/{p-807b2087.entry.js → p-9481e312.entry.js} +1 -1
- package/lib/duet/{p-977f2826.entry.js → p-984576c9.entry.js} +1 -1
- package/lib/duet/p-987edcd0.js +15 -0
- package/lib/duet/p-9d73343a.entry.js +4 -0
- package/lib/duet/{p-8652a7ab.system.entry.js → p-9dca5c22.system.entry.js} +1 -1
- package/lib/duet/p-a207b008.entry.js +4 -0
- package/lib/duet/p-a5b9c192.system.entry.js +4 -0
- package/lib/duet/p-a6a84ec6.entry.js +4 -0
- package/lib/duet/{p-9f0f5674.entry.js → p-a890da72.entry.js} +1 -1
- package/lib/duet/{p-0f2a478e.entry.js → p-a9859a82.entry.js} +1 -1
- package/lib/duet/{p-3040debf.entry.js → p-aba68b7b.entry.js} +1 -1
- package/lib/duet/p-acc57c77.entry.js +4 -0
- package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
- package/lib/duet/{p-fb898d94.system.entry.js → p-aee24388.system.entry.js} +1 -1
- package/lib/duet/p-aef1b720.system.entry.js +4 -0
- package/lib/duet/{p-00eac879.system.entry.js → p-af41d894.system.entry.js} +1 -1
- package/lib/duet/p-b25d3769.js +4 -0
- package/lib/duet/{p-43dde575.system.entry.js → p-b32224fe.system.entry.js} +1 -1
- package/lib/duet/{p-f13a0883.entry.js → p-b3744481.entry.js} +1 -1
- package/lib/duet/{p-b374d7c2.system.js → p-b42d81c3.system.js} +1 -1
- package/lib/duet/{p-ed479d09.system.entry.js → p-b4e87f02.system.entry.js} +1 -1
- package/lib/duet/{p-b9683731.entry.js → p-bf93a991.entry.js} +1 -1
- package/lib/duet/{p-a962c8c1.system.js → p-c18a599e.system.js} +0 -0
- package/lib/duet/p-c2e77278.entry.js +4 -0
- package/lib/duet/p-c34329f3.entry.js +4 -0
- package/lib/duet/{p-c19094dd.entry.js → p-c36b4da0.entry.js} +1 -1
- package/lib/duet/{p-8002a095.entry.js → p-cdd70b93.entry.js} +1 -1
- package/lib/duet/p-d1c19f04.system.entry.js +4 -0
- package/lib/duet/{p-cc0bd28f.system.entry.js → p-d3a3c3c7.system.entry.js} +1 -1
- package/lib/duet/{p-19c28d99.system.entry.js → p-d4118b6e.system.entry.js} +1 -1
- package/lib/duet/{p-abd3bfb4.system.entry.js → p-d744d188.system.entry.js} +1 -1
- package/lib/duet/p-ddb6344c.system.js +4 -0
- package/lib/duet/p-de07c7d7.entry.js +4 -0
- package/lib/duet/{p-57cb58d4.system.entry.js → p-dfe79666.system.entry.js} +1 -1
- package/lib/duet/{p-c723d36e.system.js → p-e12f2b8b.system.js} +1 -1
- package/lib/duet/p-e2a44156.js +4 -0
- package/lib/duet/p-e76b722f.entry.js +4 -0
- package/lib/duet/{p-0b9b6393.entry.js → p-e964d062.entry.js} +1 -1
- package/lib/duet/p-eb55ccd2.system.js +4 -0
- package/lib/duet/p-f0a4b68d.system.entry.js +4 -0
- package/lib/duet/p-f364eb96.entry.js +4 -0
- package/lib/duet/{p-fbb7d194.entry.js → p-f8ce39fb.entry.js} +1 -1
- package/lib/esm/{dom-8516b24e.js → dom-58cd15f6.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 +17 -10
- 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 +41 -19
- package/lib/esm/duet-collapsible.entry.js +4 -1
- 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_3.entry.js +226 -0
- package/lib/esm/{duet-table.entry.js → duet-editable-table_3.entry.js} +205 -3
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +2 -2
- package/lib/esm/duet-grid_2.entry.js +52 -4
- package/lib/esm/duet-header_2.entry.js +3 -3
- package/lib/esm/duet-hero.entry.js +2 -2
- package/lib/esm/duet-icon.entry.js +4 -4
- package/lib/esm/duet-input_2.entry.js +6 -6
- 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 +3 -3
- package/lib/esm/duet-notification_2.entry.js +2 -2
- 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.entry.js +1085 -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-1fe0dcd0.js} +1 -1
- package/lib/esm/{index-3a265449.js → index-84d97bd1.js} +5 -2
- package/lib/esm/js-utils-b69f17df.js +14 -0
- 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-7c726abb.js} +9 -10
- package/lib/esm/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
- 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-58cd15f6.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 +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table-button_3.entry.js +4 -0
- package/lib/esm-es5/duet-editable-table_3.entry.js +4 -0
- package/lib/esm-es5/duet-empty-state.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 +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-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.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-6a282066.js → focus-utils-1fe0dcd0.js} +1 -1
- package/lib/esm-es5/index-84d97bd1.js +4 -0
- package/lib/esm-es5/js-utils-b69f17df.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-7c726abb.js +15 -0
- package/lib/esm-es5/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
- package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
- package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
- package/lib/types/components/duet-choice/duet-choice.d.ts +20 -1
- 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 +72 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +72 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +7 -0
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +84 -0
- package/lib/types/components/duet-grid/duet-grid.d.ts +16 -2
- package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
- package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
- 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-upload/duet-upload-aria-status.d.ts +49 -0
- package/lib/types/components/duet-upload/duet-upload-editable-item-error.d.ts +7 -0
- package/lib/types/components/duet-upload/duet-upload-editable-item-inprogres.d.ts +7 -0
- package/lib/types/components/duet-upload/duet-upload-editable-item-success.d.ts +8 -0
- package/lib/types/components/duet-upload/duet-upload-validators.d.ts +12 -0
- package/lib/types/components/duet-upload/duet-upload.d.ts +380 -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.helpers.d.ts +1 -0
- package/lib/types/components/duet-upload/xhr.helpers.d.ts +18 -0
- package/lib/types/components.d.ts +789 -19
- package/lib/types/utils/js-utils.d.ts +1 -0
- package/lib/types/utils/language-utils.d.ts +5 -1
- package/lib/types/utils/watch-options.d.ts +2 -0
- package/package.json +6 -6
- package/lib/cjs/duet-fieldset.cjs.entry.js +0 -62
- package/lib/duet/p-0058512b.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-3618aaee.entry.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-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-a89e88a3.js +0 -4
- package/lib/duet/p-ade33230.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-ec3eef3a.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-f364ce8b.system.entry.js +0 -4
- package/lib/duet/p-fc6624fe.system.entry.js +0 -4
- package/lib/esm/duet-fieldset.entry.js +0 -58
- package/lib/esm/watch-options-de55ea78.js +0 -35
- package/lib/esm-es5/duet-fieldset.entry.js +0 -4
- package/lib/esm-es5/duet-table.entry.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/tokens.module-edb66c04.js +0 -4
- package/lib/esm-es5/watch-options-de55ea78.js +0 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { getLocaleString } from "../../utils/language-utils";
|
|
5
|
+
import errorCodes from "./errorcodes.json";
|
|
6
|
+
export const getError = (code) => {
|
|
7
|
+
let error = {
|
|
8
|
+
type: undefined,
|
|
9
|
+
system_message: undefined,
|
|
10
|
+
message: undefined,
|
|
11
|
+
};
|
|
12
|
+
error = errorCodes.filter(errorItem => {
|
|
13
|
+
// the == is intentional we may be comparing numbers to strings - and that is ok here
|
|
14
|
+
return errorItem.type == code;
|
|
15
|
+
})[0];
|
|
16
|
+
if (!error) {
|
|
17
|
+
error = errorCodes.filter(errorItem => {
|
|
18
|
+
return errorItem.type === "default";
|
|
19
|
+
})[0];
|
|
20
|
+
}
|
|
21
|
+
return error;
|
|
22
|
+
};
|
|
23
|
+
export const getI18nError = (errorCode) => {
|
|
24
|
+
const errorFromJson = getError(errorCode);
|
|
25
|
+
const i18String = getLocaleString(errorFromJson.message);
|
|
26
|
+
if (i18String === "" || !i18String) {
|
|
27
|
+
return errorFromJson.system_message;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return i18String;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
/** list of mock File elements to pass the duet-upload component */
|
|
5
|
+
//mock functions to show uploaded file state
|
|
6
|
+
export function getBrowsedFiles() {
|
|
7
|
+
return fileListFromArray([
|
|
8
|
+
mockFileCreator({
|
|
9
|
+
name: "action-add-circle.svg",
|
|
10
|
+
type: "image/svg",
|
|
11
|
+
size: 234 * 1000,
|
|
12
|
+
lastModified: new Date(),
|
|
13
|
+
error: "400",
|
|
14
|
+
}),
|
|
15
|
+
mockFileCreator({
|
|
16
|
+
name: "action-arrow-down.svg",
|
|
17
|
+
type: "image/svg",
|
|
18
|
+
size: 56 * 10000,
|
|
19
|
+
lastModified: new Date(),
|
|
20
|
+
error: "401",
|
|
21
|
+
}),
|
|
22
|
+
mockFileCreator({
|
|
23
|
+
name: "action-car-transfer.svg",
|
|
24
|
+
type: "image/svg",
|
|
25
|
+
size: 56 * 100,
|
|
26
|
+
lastModified: new Date(),
|
|
27
|
+
error: "403",
|
|
28
|
+
}),
|
|
29
|
+
mockFileCreator({
|
|
30
|
+
name: "action-car-enable.svg",
|
|
31
|
+
type: "image/svg",
|
|
32
|
+
size: 12 * 100000,
|
|
33
|
+
lastModified: new Date(),
|
|
34
|
+
error: "413",
|
|
35
|
+
}),
|
|
36
|
+
mockFileCreator({ name: "action-car-disable.svg", type: "image/svg", size: 23 * 1000, lastModified: new Date() }),
|
|
37
|
+
mockFileCreator({
|
|
38
|
+
name: "action-buy-insurance.svg",
|
|
39
|
+
type: "image/svg",
|
|
40
|
+
size: 11 * 1000,
|
|
41
|
+
lastModified: new Date(),
|
|
42
|
+
error: "duet-upload-101",
|
|
43
|
+
}),
|
|
44
|
+
mockFileCreator({
|
|
45
|
+
name: "category-detached-house.svg",
|
|
46
|
+
type: "image/svg",
|
|
47
|
+
size: 78 * 1000,
|
|
48
|
+
lastModified: new Date(),
|
|
49
|
+
}),
|
|
50
|
+
]);
|
|
51
|
+
}
|
|
52
|
+
function mockFileCreator({ name, size, type, lastModified, error = undefined }) {
|
|
53
|
+
var file;
|
|
54
|
+
try {
|
|
55
|
+
const blob = new Blob(["a".repeat(size)], { type });
|
|
56
|
+
blob["lastModifiedDate"] = lastModified;
|
|
57
|
+
var file = new File([blob], name, { type });
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
try {
|
|
61
|
+
var file = new File(["foo"], name, { type });
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
var file = { name, size };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return { file, error };
|
|
68
|
+
}
|
|
69
|
+
function fileListFromArray(files) {
|
|
70
|
+
const fileMap = new Map();
|
|
71
|
+
files.forEach(obj => {
|
|
72
|
+
const isValid = !obj.error;
|
|
73
|
+
const fileItem = {
|
|
74
|
+
uid: `${Date.now()}-${Math.random()}`,
|
|
75
|
+
item: obj.file,
|
|
76
|
+
size: obj.file.size,
|
|
77
|
+
valid: isValid,
|
|
78
|
+
error: {
|
|
79
|
+
type: isValid ? undefined : obj.error,
|
|
80
|
+
message: isValid ? undefined : "Random error message",
|
|
81
|
+
system_message: isValid ? undefined : "Random system error message",
|
|
82
|
+
},
|
|
83
|
+
progress: 100,
|
|
84
|
+
deleted: false,
|
|
85
|
+
xhr: false,
|
|
86
|
+
url: `https://cdn.duetds.com/api/icons/2.1.12/lib/assets/${obj.file.name}`,
|
|
87
|
+
};
|
|
88
|
+
fileMap.set(obj.file.name, fileItem);
|
|
89
|
+
});
|
|
90
|
+
return fileMap;
|
|
91
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
export const formatBytes = (bytes, decimals = 2) => {
|
|
5
|
+
if (bytes === 0) {
|
|
6
|
+
return "0 Bytes";
|
|
7
|
+
}
|
|
8
|
+
const k = 1024;
|
|
9
|
+
const dm = decimals < 0 ? 0 : decimals;
|
|
10
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
11
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
12
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
13
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
export const makeXhrRequest = ({ payload, options, onFailure, onSuccess, onProgress }) => {
|
|
5
|
+
const { type = "POST", xhr, uri, argument = null, headers = null } = options;
|
|
6
|
+
xhr.open(type, `${uri}${argument || ""}`, true);
|
|
7
|
+
const { data, name } = payload;
|
|
8
|
+
// headers must be added after open
|
|
9
|
+
if (headers) {
|
|
10
|
+
Object.keys(headers).forEach(key => {
|
|
11
|
+
xhr.setRequestHeader(key, headers[key]);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
if (type === "POST") {
|
|
15
|
+
xhr.onreadystatechange = () => {
|
|
16
|
+
// Call a function when the state changes.
|
|
17
|
+
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status >= 200 && xhr.status < 300) {
|
|
18
|
+
// Request finished without errors
|
|
19
|
+
onSuccess(xhr, name, xhr.status);
|
|
20
|
+
}
|
|
21
|
+
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status >= 300 && xhr.status < 999) {
|
|
22
|
+
// Request finished with errors
|
|
23
|
+
onFailure(xhr, name, xhr.status);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
onProgress(name);
|
|
27
|
+
}
|
|
28
|
+
xhr.send(data);
|
|
29
|
+
return xhr;
|
|
30
|
+
};
|
|
@@ -54,14 +54,17 @@ export const getLocale = (lang) => {
|
|
|
54
54
|
}
|
|
55
55
|
throw new Error(`Locale for "${lang}" not found`);
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Takes any json object that is passed and/or htmlencoded and converts it to proper json
|
|
59
|
+
*/
|
|
60
|
+
export const sanitizeString = (string) => {
|
|
58
61
|
const argIsString = typeof string === "string";
|
|
59
62
|
if (argIsString) {
|
|
60
63
|
try {
|
|
61
64
|
return JSON.parse(convertHtmlQuotes(string));
|
|
62
65
|
}
|
|
63
66
|
catch (e) {
|
|
64
|
-
console.log("
|
|
67
|
+
console.log("sanitizeString received a string, that didnt parse to json object", string, e);
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
return string;
|
|
@@ -73,7 +76,7 @@ const sanitizeString = (string) => {
|
|
|
73
76
|
* @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"} | string will get JSON.parsed
|
|
74
77
|
* @param {boolean} languageOverride = false - in case you want to override the actual language set in html tag
|
|
75
78
|
* @default {object} {locale: "fi-FI", money: "€"}
|
|
76
|
-
* @returns {(string|Object)} given example contains {fi:"something"} and
|
|
79
|
+
* @returns {(string|Object)} given example contains {fi:"something"} and language===fi this will return "something"
|
|
77
80
|
*/
|
|
78
81
|
export const getLocaleString = (langObject, languageOverride) => {
|
|
79
82
|
const obj = sanitizeString(langObject);
|
|
@@ -1,19 +1,41 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
const watchFor = (containerEl, tagName, onChange, changeHandler, options = {
|
|
5
|
+
childList: true,
|
|
6
|
+
subtree: true,
|
|
7
|
+
}) => {
|
|
5
8
|
let mutation;
|
|
6
9
|
if (typeof MutationObserver !== "undefined") {
|
|
7
10
|
mutation = new MutationObserver(mutationList => {
|
|
8
|
-
onChange(
|
|
9
|
-
});
|
|
10
|
-
mutation.observe(containerEl, {
|
|
11
|
-
childList: true,
|
|
12
|
-
subtree: true,
|
|
11
|
+
onChange(changeHandler(mutationList, tagName));
|
|
13
12
|
});
|
|
13
|
+
mutation.observe(containerEl, options);
|
|
14
14
|
}
|
|
15
15
|
return mutation;
|
|
16
16
|
};
|
|
17
|
+
export const watchForOptions = (containerEl, tagName, onChange) => {
|
|
18
|
+
return watchFor(containerEl, tagName, onChange, getSelectedOption);
|
|
19
|
+
};
|
|
20
|
+
export const watchForElement = (containerEl, tagName, onChange) => {
|
|
21
|
+
return watchFor(containerEl, tagName, onChange, getElementItem, {
|
|
22
|
+
childList: true,
|
|
23
|
+
subtree: true,
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const getElementItem = (mutationList) => {
|
|
27
|
+
let addedNode = false;
|
|
28
|
+
let removedNode = false;
|
|
29
|
+
mutationList.forEach(mut => {
|
|
30
|
+
if (mut.addedNodes.length) {
|
|
31
|
+
addedNode = true;
|
|
32
|
+
}
|
|
33
|
+
if (mut.removedNodes.length) {
|
|
34
|
+
removedNode = true;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return { addedNode, removedNode, mutationList };
|
|
38
|
+
};
|
|
17
39
|
const getSelectedOption = (mutationList, tagName) => {
|
|
18
40
|
let newOption;
|
|
19
41
|
mutationList.forEach(mut => {
|
|
@@ -31,3 +53,10 @@ export const findCheckedOption = (el, tagName) => {
|
|
|
31
53
|
const options = el.tagName === tagName.toUpperCase() ? [el] : Array.from(el.querySelectorAll(tagName));
|
|
32
54
|
return options.find((o) => o.checked === true);
|
|
33
55
|
};
|
|
56
|
+
export const findErrorItems = (el, tagName) => {
|
|
57
|
+
if (el.nodeType !== 1) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
const options = el.tagName === tagName.toUpperCase() ? [el] : Array.from(el.querySelectorAll(tagName));
|
|
61
|
+
return options.find((o) => o.checked === true);
|
|
62
|
+
};
|
|
@@ -74,6 +74,24 @@ export const DuetDivider: {
|
|
|
74
74
|
new (): DuetDivider;
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
+
interface DuetEditableTable extends Components.DuetEditableTable, HTMLElement {}
|
|
78
|
+
export const DuetEditableTable: {
|
|
79
|
+
prototype: DuetEditableTable;
|
|
80
|
+
new (): DuetEditableTable;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
interface DuetEditableTableButton extends Components.DuetEditableTableButton, HTMLElement {}
|
|
84
|
+
export const DuetEditableTableButton: {
|
|
85
|
+
prototype: DuetEditableTableButton;
|
|
86
|
+
new (): DuetEditableTableButton;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
interface DuetEditableTableItem extends Components.DuetEditableTableItem, HTMLElement {}
|
|
90
|
+
export const DuetEditableTableItem: {
|
|
91
|
+
prototype: DuetEditableTableItem;
|
|
92
|
+
new (): DuetEditableTableItem;
|
|
93
|
+
};
|
|
94
|
+
|
|
77
95
|
interface DuetEmptyState extends Components.DuetEmptyState, HTMLElement {}
|
|
78
96
|
export const DuetEmptyState: {
|
|
79
97
|
prototype: DuetEmptyState;
|
|
@@ -200,6 +218,12 @@ export const DuetParagraph: {
|
|
|
200
218
|
new (): DuetParagraph;
|
|
201
219
|
};
|
|
202
220
|
|
|
221
|
+
interface DuetProgress extends Components.DuetProgress, HTMLElement {}
|
|
222
|
+
export const DuetProgress: {
|
|
223
|
+
prototype: DuetProgress;
|
|
224
|
+
new (): DuetProgress;
|
|
225
|
+
};
|
|
226
|
+
|
|
203
227
|
interface DuetRadio extends Components.DuetRadio, HTMLElement {}
|
|
204
228
|
export const DuetRadio: {
|
|
205
229
|
prototype: DuetRadio;
|
|
@@ -290,6 +314,18 @@ export const DuetTray: {
|
|
|
290
314
|
new (): DuetTray;
|
|
291
315
|
};
|
|
292
316
|
|
|
317
|
+
interface DuetUpload extends Components.DuetUpload, HTMLElement {}
|
|
318
|
+
export const DuetUpload: {
|
|
319
|
+
prototype: DuetUpload;
|
|
320
|
+
new (): DuetUpload;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
interface DuetUploadAriaStatus extends Components.DuetUploadAriaStatus, HTMLElement {}
|
|
324
|
+
export const DuetUploadAriaStatus: {
|
|
325
|
+
prototype: DuetUploadAriaStatus;
|
|
326
|
+
new (): DuetUploadAriaStatus;
|
|
327
|
+
};
|
|
328
|
+
|
|
293
329
|
interface DuetVisuallyHidden extends Components.DuetVisuallyHidden, HTMLElement {}
|
|
294
330
|
export const DuetVisuallyHidden: {
|
|
295
331
|
prototype: DuetVisuallyHidden;
|