@duetds/components 4.31.0 → 4.33.2
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 +1895 -77
- package/lib/cjs/{dom-e89ebf90.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 +5 -5
- package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
- package/lib/cjs/duet-choice_2.cjs.entry.js +53 -24
- package/lib/cjs/duet-collapsible.cjs.entry.js +4 -449
- 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 +89 -0
- package/lib/cjs/duet-editable-table_4.cjs.entry.js +1445 -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 +2 -2
- package/lib/cjs/duet-grid_2.cjs.entry.js +69 -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 +5 -13
- 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-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-bd331feb.js → focus-utils-27c696bb.js} +1 -1
- package/lib/cjs/{index-113c2add.js → index-18b0f43a.js} +91 -77
- 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-0c8c175b.js → shadow-css-e3edeed1.js} +9 -10
- package/lib/cjs/{token-utils-13e5d13e.js → token-utils-63a9c8dc.js} +1 -1
- 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-alert/duet-alert.js +4 -4
- package/lib/collection/components/duet-button/duet-button.js +10 -10
- package/lib/collection/components/duet-card/duet-card.css +20 -0
- package/lib/collection/components/duet-card/duet-card.js +4 -1
- package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
- package/lib/collection/components/duet-choice/duet-choice.css +16 -3
- package/lib/collection/components/duet-choice/duet-choice.js +117 -33
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +4 -4
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +16 -16
- 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-footer/duet-footer.js +10 -10
- package/lib/collection/components/duet-grid/duet-grid.js +74 -6
- package/lib/collection/components/duet-grid-item/duet-grid-item.js +4 -4
- package/lib/collection/components/duet-header/duet-header.js +16 -16
- 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-hero/duet-hero.js +8 -8
- package/lib/collection/components/duet-icon/icon-utils.js +5 -8
- 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 +8 -8
- package/lib/collection/components/duet-logo/duet-logo.js +4 -4
- package/lib/collection/components/duet-modal/duet-modal.js +8 -8
- package/lib/collection/components/duet-notification/duet-notification.js +8 -8
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +8 -8
- package/lib/collection/components/duet-number-input/duet-number-input.js +20 -20
- 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-radio/duet-radio.js +6 -6
- 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-step/duet-step.js +8 -8
- package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -2
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +10 -10
- 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-tooltip/duet-tooltip.js +14 -14
- package/lib/collection/components/duet-tray/duet-tray.js +12 -12
- package/lib/collection/components/duet-upload/duet-upload.css +64 -0
- package/lib/collection/components/duet-upload/duet-upload.js +1863 -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/watch-options.js +35 -6
- package/lib/custom-elements-bundle/index.d.ts +36 -0
- package/lib/custom-elements-bundle/index.js +2014 -322
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-60ab57d4.entry.js → p-042ec8b1.entry.js} +1 -1
- package/lib/duet/{p-bcae23fc.system.entry.js → p-0435b54a.system.entry.js} +1 -1
- package/lib/duet/{p-dc85d2a4.entry.js → p-04b3e682.entry.js} +1 -1
- package/lib/duet/p-0ac2e60d.system.entry.js +4 -0
- package/lib/duet/p-0d22396e.system.js +16 -0
- package/lib/duet/p-1082d9f2.system.entry.js +4 -0
- package/lib/duet/p-12721178.js +4 -0
- package/lib/duet/{p-7d080785.system.entry.js → p-12fc4849.system.entry.js} +1 -1
- package/lib/duet/{p-c4737f88.entry.js → p-15fae689.entry.js} +1 -1
- package/lib/duet/p-1ad58142.entry.js +4 -0
- package/lib/duet/{p-c5f10483.system.entry.js → p-1c7d7cdd.system.entry.js} +1 -1
- package/lib/duet/p-1cf8dbc7.system.js +4 -0
- package/lib/duet/p-1dcbd837.system.entry.js +4 -0
- package/lib/duet/{p-fdecaf46.entry.js → p-1ecddc1d.entry.js} +1 -1
- package/lib/duet/p-2764f081.js +4 -0
- package/lib/duet/p-2b4bd1b2.system.entry.js +4 -0
- package/lib/duet/p-2d8e0faa.system.entry.js +4 -0
- package/lib/duet/{p-453955cc.system.entry.js → p-33538e90.system.entry.js} +1 -1
- package/lib/duet/{p-b1b8e510.entry.js → p-3364cfd2.entry.js} +1 -1
- package/lib/duet/p-350cea4e.system.entry.js +4 -0
- package/lib/duet/{p-bd9a7d8f.js → p-35a3794e.js} +0 -0
- package/lib/duet/p-39e9d638.entry.js +4 -0
- package/lib/duet/{p-1e7222c2.entry.js → p-3a7e519e.entry.js} +1 -1
- package/lib/duet/{p-9ce1baab.system.entry.js → p-3bcf2054.system.entry.js} +1 -1
- package/lib/duet/{p-322d1c38.js → p-3c1971d8.js} +1 -1
- package/lib/duet/{p-ef45cfe9.system.entry.js → p-3cad13af.system.entry.js} +1 -1
- package/lib/duet/p-408e8cdb.system.js +4 -0
- package/lib/duet/p-4a14da52.entry.js +4 -0
- package/lib/duet/{p-f96c4093.system.entry.js → p-4e17a6cb.system.entry.js} +1 -1
- package/lib/duet/{p-fbd83d67.entry.js → p-50b796eb.entry.js} +1 -1
- package/lib/duet/{p-22f56356.system.entry.js → p-5727cd82.system.entry.js} +1 -1
- package/lib/duet/{p-9c94be45.entry.js → p-582f3a2c.entry.js} +1 -1
- package/lib/duet/{p-e39471b6.entry.js → p-5b9621e2.entry.js} +1 -1
- package/lib/duet/{p-3e1ef509.system.entry.js → p-5f79eff8.system.entry.js} +1 -1
- package/lib/duet/{p-95626e7e.system.entry.js → p-60e721aa.system.entry.js} +1 -1
- package/lib/duet/{p-b03a46b6.entry.js → p-60ef3d05.entry.js} +1 -1
- package/lib/duet/{p-57ea2576.system.js → p-61fc3872.system.js} +1 -1
- package/lib/duet/{p-1cd7177f.entry.js → p-637df820.entry.js} +1 -1
- package/lib/duet/{p-07263910.system.entry.js → p-6402041d.system.entry.js} +1 -1
- package/lib/duet/p-64c0aa2a.entry.js +4 -0
- package/lib/duet/{p-28b67b94.entry.js → p-65451003.entry.js} +1 -1
- package/lib/duet/{p-1bfbc988.entry.js → p-659d6cb7.entry.js} +1 -1
- package/lib/duet/{p-91fa68a5.js → p-66fdebc5.js} +1 -1
- package/lib/duet/p-6708db8a.entry.js +4 -0
- package/lib/duet/{p-e08b8909.entry.js → p-68635a1c.entry.js} +1 -1
- package/lib/duet/p-6e363557.system.js +4 -0
- package/lib/duet/p-70fafc98.system.js +4 -0
- package/lib/duet/p-720a36f2.entry.js +4 -0
- package/lib/duet/{p-f53c8019.entry.js → p-72629304.entry.js} +1 -1
- package/lib/duet/p-75a104e3.entry.js +4 -0
- package/lib/duet/{p-02ad46a0.system.entry.js → p-75e5d4d1.system.entry.js} +1 -1
- package/lib/duet/{p-33cf6ed1.entry.js → p-7ab0bad8.entry.js} +1 -1
- package/lib/duet/{p-e834c8d5.system.entry.js → p-7ceaf4ef.system.entry.js} +1 -1
- package/lib/duet/{p-a1d12e94.system.entry.js → p-7f8cce41.system.entry.js} +1 -1
- package/lib/duet/{p-6d2da245.entry.js → p-7fed7f57.entry.js} +1 -1
- package/lib/duet/p-8143f3de.js +4 -0
- package/lib/duet/p-8c2f14d8.system.entry.js +4 -0
- package/lib/duet/{p-4670a654.entry.js → p-8c730326.entry.js} +1 -1
- package/lib/duet/{p-de093c16.entry.js → p-9125ed25.entry.js} +1 -1
- package/lib/duet/p-933c2774.system.entry.js +4 -0
- package/lib/duet/{p-b7e50cfa.entry.js → p-9584411c.entry.js} +1 -1
- package/lib/duet/p-987edcd0.js +15 -0
- package/lib/duet/p-9930e52e.entry.js +4 -0
- package/lib/duet/p-9a09ac2b.system.entry.js +4 -0
- package/lib/duet/{p-64109493.entry.js → p-a09ddd8f.entry.js} +1 -1
- package/lib/duet/{p-504dbf8f.system.entry.js → p-a2b2fa13.system.entry.js} +1 -1
- package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
- package/lib/duet/{p-605bc214.system.entry.js → p-b1ad7a52.system.entry.js} +1 -1
- package/lib/duet/{p-f0b1850a.system.entry.js → p-b5dc29b8.system.entry.js} +1 -1
- package/lib/duet/p-ba6214be.entry.js +4 -0
- package/lib/duet/{p-92d38668.system.entry.js → p-be349a3d.system.entry.js} +1 -1
- package/lib/duet/{p-56e172f5.system.entry.js → p-c0f3f60f.system.entry.js} +1 -1
- package/lib/duet/{p-fd98468a.system.js → p-c18a599e.system.js} +0 -0
- package/lib/duet/p-c3c95a34.system.entry.js +4 -0
- package/lib/duet/{p-d4b4bfa6.entry.js → p-c506017d.entry.js} +1 -1
- package/lib/duet/p-c74cecf2.system.entry.js +4 -0
- package/lib/duet/p-c9a11360.entry.js +4 -0
- package/lib/duet/p-cd21755b.entry.js +4 -0
- package/lib/duet/p-cd597d62.system.entry.js +4 -0
- package/lib/duet/p-cff461b6.entry.js +4 -0
- package/lib/duet/{p-7b6db837.system.entry.js → p-d0fb19f7.system.entry.js} +1 -1
- package/lib/duet/{p-69a5dc6b.entry.js → p-d1dfa30e.entry.js} +1 -1
- package/lib/duet/{p-1cec5a70.system.entry.js → p-d4e706ac.system.entry.js} +1 -1
- package/lib/duet/{p-8cb47a70.system.entry.js → p-d5e2bb48.system.entry.js} +1 -1
- package/lib/duet/p-dd79932a.entry.js +4 -0
- package/lib/duet/p-dd9b8fcb.system.entry.js +4 -0
- package/lib/duet/p-ddb6344c.system.js +4 -0
- package/lib/duet/{p-47645ea8.system.entry.js → p-de43620d.system.entry.js} +1 -1
- package/lib/duet/p-e038da47.system.entry.js +4 -0
- package/lib/duet/p-eb55ccd2.system.js +4 -0
- package/lib/duet/p-ebc4e334.js +4 -0
- package/lib/duet/{p-5fc7e1f7.system.entry.js → p-f37ffb6f.system.entry.js} +1 -1
- package/lib/duet/p-f8744611.entry.js +4 -0
- package/lib/duet/p-fa99eaa4.system.js +4 -0
- package/lib/duet/{p-746655ba.entry.js → p-fd00b025.entry.js} +1 -1
- package/lib/esm/{dom-21034390.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 +5 -5
- package/lib/esm/duet-checkbox.entry.js +2 -2
- package/lib/esm/duet-choice_2.entry.js +54 -25
- package/lib/esm/duet-collapsible.entry.js +3 -448
- 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 +85 -0
- package/lib/esm/duet-editable-table_4.entry.js +1438 -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 +2 -2
- package/lib/esm/duet-grid_2.entry.js +69 -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 +5 -13
- 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-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-1995e5a9.js → focus-utils-c1fa24c4.js} +1 -1
- package/lib/esm/{index-6e246691.js → index-05e43a37.js} +91 -78
- 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-31e2d504.js → shadow-css-7c726abb.js} +9 -10
- package/lib/esm/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
- 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-21034390.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 +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 +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 +2 -2
- 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-1995e5a9.js → focus-utils-c1fa24c4.js} +1 -1
- package/lib/esm-es5/index-05e43a37.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-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/html.html-data.json +427 -10
- package/lib/types/components/duet-choice/duet-choice.d.ts +23 -4
- 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 +17 -2
- package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
- 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.d.ts +404 -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 +791 -21
- 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-table.cjs.entry.js +0 -132
- package/lib/duet/p-0058512b.js +0 -4
- package/lib/duet/p-0224db45.entry.js +0 -4
- package/lib/duet/p-15c15c6a.js +0 -15
- package/lib/duet/p-202bbd70.entry.js +0 -4
- package/lib/duet/p-33426ddc.entry.js +0 -4
- package/lib/duet/p-3d3f773d.system.entry.js +0 -4
- package/lib/duet/p-3f78a826.system.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-44ffb960.entry.js +0 -4
- package/lib/duet/p-5230ee3c.system.entry.js +0 -4
- package/lib/duet/p-5aa0d34d.entry.js +0 -4
- package/lib/duet/p-6a230911.system.entry.js +0 -4
- package/lib/duet/p-6a356ab1.system.js +0 -4
- package/lib/duet/p-6a760b8a.entry.js +0 -4
- package/lib/duet/p-712e7dde.system.entry.js +0 -4
- package/lib/duet/p-82dc2e0b.entry.js +0 -4
- package/lib/duet/p-8c8e82aa.system.js +0 -4
- package/lib/duet/p-8c980350.system.entry.js +0 -4
- package/lib/duet/p-8f03c3eb.entry.js +0 -4
- package/lib/duet/p-96808a2e.system.entry.js +0 -4
- package/lib/duet/p-96c103b2.system.entry.js +0 -4
- package/lib/duet/p-9a89ec39.js +0 -4
- package/lib/duet/p-9ff25646.entry.js +0 -4
- package/lib/duet/p-b694cbf5.system.js +0 -4
- package/lib/duet/p-b82927b0.system.entry.js +0 -4
- package/lib/duet/p-ba205dca.entry.js +0 -4
- package/lib/duet/p-be19c57b.system.entry.js +0 -4
- package/lib/duet/p-c5beceed.js +0 -4
- package/lib/duet/p-d35fd913.system.entry.js +0 -4
- package/lib/duet/p-d7623eb8.system.entry.js +0 -4
- package/lib/duet/p-de842863.entry.js +0 -4
- package/lib/duet/p-e58ca7af.system.js +0 -16
- package/lib/esm/duet-table.entry.js +0 -128
- package/lib/esm/watch-options-de55ea78.js +0 -35
- package/lib/esm-es5/duet-table.entry.js +0 -4
- package/lib/esm-es5/index-6e246691.js +0 -4
- package/lib/esm-es5/shadow-css-31e2d504.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,404 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
import { DuetMargin, DuetTheme } from "../../common-types";
|
|
3
|
+
import { FormComponent } from "../../utils/form-components";
|
|
4
|
+
import { DuetLangObject } from "../../utils/language-utils";
|
|
5
|
+
import { ThemeableComponent } from "../../utils/themeable-component";
|
|
6
|
+
import { DuetEditableTableGroupNames } from "../duet-editable-table/duet-editable-table";
|
|
7
|
+
import { DuetEditableTableActions } from "../duet-editable-table/duet-editable-table-item";
|
|
8
|
+
import { StatusMessage } from "../duet-upload-aria-status/duet-upload-aria-status";
|
|
9
|
+
import { DuetUploadErrorCode } from "./errorcodes.utils";
|
|
10
|
+
import { DuetXhrRequest } from "./xhr.helpers";
|
|
11
|
+
export declare type DuetUploadEvent = {
|
|
12
|
+
originalEvent?: Event;
|
|
13
|
+
data?: Record<string, any>;
|
|
14
|
+
metaData?: Record<string, any>;
|
|
15
|
+
component: "duet-upload";
|
|
16
|
+
};
|
|
17
|
+
export declare type DuetFileListItem = {
|
|
18
|
+
uid: string;
|
|
19
|
+
item: File | null;
|
|
20
|
+
size: number;
|
|
21
|
+
meta?: Record<string, any>;
|
|
22
|
+
uploaded: boolean;
|
|
23
|
+
error: DuetUploadErrorCode;
|
|
24
|
+
progress: number;
|
|
25
|
+
deleted: boolean;
|
|
26
|
+
valid: boolean;
|
|
27
|
+
xhr: DuetXhrRequest | false;
|
|
28
|
+
url: string | false;
|
|
29
|
+
group?: string;
|
|
30
|
+
html?: string;
|
|
31
|
+
status?: number;
|
|
32
|
+
};
|
|
33
|
+
export interface StringMap {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @slot header - named slot - to place content after description / caption
|
|
38
|
+
* @slot fileheader - named slot - to place content above "filelist" (only displayed when "filelist" contains items)
|
|
39
|
+
* @slot filefooter - named slot - to place content below "filelist" (only displayed when "filelist" contains items)
|
|
40
|
+
*/
|
|
41
|
+
export declare class DuetUpload implements ThemeableComponent, FormComponent {
|
|
42
|
+
/**
|
|
43
|
+
* Own Properties
|
|
44
|
+
*/
|
|
45
|
+
private buttonId;
|
|
46
|
+
private labelId;
|
|
47
|
+
private uploadId;
|
|
48
|
+
private editableTableId;
|
|
49
|
+
private filesInProgress;
|
|
50
|
+
private fileMaxReached;
|
|
51
|
+
private bytesMaxReached;
|
|
52
|
+
private internalStatusMessageLabel;
|
|
53
|
+
private metaData;
|
|
54
|
+
private nativeInput?;
|
|
55
|
+
/**
|
|
56
|
+
* Properties
|
|
57
|
+
*/
|
|
58
|
+
private DefaultGroups;
|
|
59
|
+
/**
|
|
60
|
+
* Reference to host HTML element.
|
|
61
|
+
*/
|
|
62
|
+
element: HTMLElement;
|
|
63
|
+
/**
|
|
64
|
+
* State() variables
|
|
65
|
+
*/
|
|
66
|
+
tick: number;
|
|
67
|
+
/**
|
|
68
|
+
* Indicates the id of a related component’s visually focused element.
|
|
69
|
+
*/
|
|
70
|
+
accessibleActiveDescendant: string;
|
|
71
|
+
/**
|
|
72
|
+
* Indicates the id of a component that describes the upload component.
|
|
73
|
+
*/
|
|
74
|
+
accessibleDescribedBy: string;
|
|
75
|
+
/**
|
|
76
|
+
* Use this prop to add an aria-controls attribute. Use the attribute to
|
|
77
|
+
* indicate the id of a component controlled by this component.
|
|
78
|
+
*/
|
|
79
|
+
accessibleControls: string;
|
|
80
|
+
/**
|
|
81
|
+
* Indicates the id of a component owned by the input.
|
|
82
|
+
*/
|
|
83
|
+
accessibleOwns: string;
|
|
84
|
+
/**
|
|
85
|
+
* If external is set to true, the upload component will not actually upload the files, but only keep states
|
|
86
|
+
* it will be up to you to handle the upload and return progress information to the upload-component
|
|
87
|
+
*/
|
|
88
|
+
external: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* If set the upload component will not display an upload button, you will have to create one yourself
|
|
91
|
+
* and call the exposed method startUpload
|
|
92
|
+
*/
|
|
93
|
+
hideButton: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Default actions added to the internally used duet-editable-table
|
|
96
|
+
*/
|
|
97
|
+
actions: DuetEditableTableActions | string;
|
|
98
|
+
/**
|
|
99
|
+
* Endpoint URI that is capable of receiving the files
|
|
100
|
+
*/
|
|
101
|
+
uri: string;
|
|
102
|
+
/**
|
|
103
|
+
* If enabled the editable-table will display links on successfully uploaded items,
|
|
104
|
+
* this requires the server can respond with link URIs in the correct format
|
|
105
|
+
* and that the files are accessible to the user
|
|
106
|
+
*/
|
|
107
|
+
showLinks: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Caption (underneath label) that can be set as a way of adding extra information
|
|
110
|
+
*/
|
|
111
|
+
caption: string;
|
|
112
|
+
/**
|
|
113
|
+
* Property to change the aria upload progress text read aloud by screenreaders
|
|
114
|
+
* @default {
|
|
115
|
+
* fi: {
|
|
116
|
+
* inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
|
|
117
|
+
* inProgressWithErrors:
|
|
118
|
+
* "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
|
|
119
|
+
* done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
|
|
120
|
+
* doneWithErrors:
|
|
121
|
+
* "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
|
|
122
|
+
* files: "tiedostot",
|
|
123
|
+
* file: "tiedosto",
|
|
124
|
+
* },
|
|
125
|
+
* sv: {
|
|
126
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
127
|
+
* inProgressWithErrors:
|
|
128
|
+
* "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
|
|
129
|
+
* done: "Alla {filesTotal} har lagts till",
|
|
130
|
+
* doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
|
|
131
|
+
* files: "filer",
|
|
132
|
+
* file: "fil",
|
|
133
|
+
* },
|
|
134
|
+
* en: {
|
|
135
|
+
* inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
136
|
+
* inProgressWithErrors:
|
|
137
|
+
* "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
138
|
+
* done: "All {filesTotal} added successfully",
|
|
139
|
+
* doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
140
|
+
* files: "tiedostoa",
|
|
141
|
+
* file: "tiedosto",
|
|
142
|
+
* },
|
|
143
|
+
* }
|
|
144
|
+
*/
|
|
145
|
+
statusLabelDefaults: DuetLangObject | string;
|
|
146
|
+
/**
|
|
147
|
+
* Strings used for the status aria-label
|
|
148
|
+
*/
|
|
149
|
+
statusMessageLabel: StatusMessage | string;
|
|
150
|
+
/**
|
|
151
|
+
* Property to change button label defaults on the component.
|
|
152
|
+
* @default {
|
|
153
|
+
fi: "Lisää liite",
|
|
154
|
+
sv: "Lägg till en bilaga",
|
|
155
|
+
en: "Add an attachment",
|
|
156
|
+
}
|
|
157
|
+
*/
|
|
158
|
+
buttonLabelDefaults: DuetLangObject | string;
|
|
159
|
+
/**
|
|
160
|
+
* Label of button
|
|
161
|
+
* @default { fi: "Lisää liite", sv: "Lägg till en bilaga", en: "Add an attachment" }
|
|
162
|
+
*/
|
|
163
|
+
buttonLabel: string;
|
|
164
|
+
/**
|
|
165
|
+
* accessible aria-Label of button
|
|
166
|
+
*/
|
|
167
|
+
accessibleButtonLabel: string;
|
|
168
|
+
/**
|
|
169
|
+
* Theme of the input.
|
|
170
|
+
*/
|
|
171
|
+
theme: DuetTheme;
|
|
172
|
+
/**
|
|
173
|
+
* Makes the input component disabled. This prevents users from being able to
|
|
174
|
+
* interact with the upload component, and conveys its inactive state to assistive technologies.
|
|
175
|
+
*/
|
|
176
|
+
disabled: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Adds a unique identifier for the upload component.
|
|
179
|
+
*/
|
|
180
|
+
identifier: string;
|
|
181
|
+
/**
|
|
182
|
+
* Controls the margin of the component.
|
|
183
|
+
*/
|
|
184
|
+
margin: DuetMargin;
|
|
185
|
+
/**
|
|
186
|
+
* Set whether the input is required or not. Please note that this is necessary for
|
|
187
|
+
* accessible inputs when the user is required to fill them. When using this property
|
|
188
|
+
* you need to also set “novalidate” attribute to your form element to prevent
|
|
189
|
+
* browser from displaying its own validation errors.
|
|
190
|
+
*/
|
|
191
|
+
required: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Array of group names that you want the editable table to use to display files
|
|
194
|
+
* @required
|
|
195
|
+
* @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}]
|
|
196
|
+
*/
|
|
197
|
+
groups: DuetEditableTableGroupNames | string;
|
|
198
|
+
/**
|
|
199
|
+
* Visually hides the groups labels in the editable table list used to display the list of files
|
|
200
|
+
*/
|
|
201
|
+
hideGroups: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Map of string that contain list of uploaded files.
|
|
204
|
+
*/
|
|
205
|
+
files: StringMap;
|
|
206
|
+
/**
|
|
207
|
+
* Property to read if the internally used editable-table contains errors or not
|
|
208
|
+
*/
|
|
209
|
+
valid: boolean;
|
|
210
|
+
watchValidHandler(newValue: boolean, oldValue: boolean): void;
|
|
211
|
+
/**
|
|
212
|
+
* Property to change labelDefaults defaults on the component.
|
|
213
|
+
* normally you would handle these strings on an application level and override @label when needed
|
|
214
|
+
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
215
|
+
*/
|
|
216
|
+
labelDefaults: DuetLangObject | string;
|
|
217
|
+
/**
|
|
218
|
+
* Label for the input.
|
|
219
|
+
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
220
|
+
*/
|
|
221
|
+
label: string;
|
|
222
|
+
/**
|
|
223
|
+
* Property to change descriptionDefaults defaults on the component.
|
|
224
|
+
* @default {
|
|
225
|
+
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.",
|
|
226
|
+
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.",
|
|
227
|
+
en: "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.",
|
|
228
|
+
}
|
|
229
|
+
*/
|
|
230
|
+
descriptionDefaults: DuetLangObject | string;
|
|
231
|
+
/**
|
|
232
|
+
* Description for the upload component.
|
|
233
|
+
* @default {
|
|
234
|
+
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.",
|
|
235
|
+
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.",
|
|
236
|
+
en: "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.",
|
|
237
|
+
}
|
|
238
|
+
*/
|
|
239
|
+
description: string;
|
|
240
|
+
/**
|
|
241
|
+
* Defaults for the filelist's empty state.
|
|
242
|
+
* @default {
|
|
243
|
+
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
244
|
+
sv: "Inga filer har lagts till ännu.",
|
|
245
|
+
en: "No files added yet.",
|
|
246
|
+
}
|
|
247
|
+
*/
|
|
248
|
+
fileListEmptyDefaults: DuetLangObject | string;
|
|
249
|
+
/**
|
|
250
|
+
* Label for the filelist's empty state.
|
|
251
|
+
* @default { fi: "Ei vielä lisättyjä tiedostoja.",sv: "Inga filer har lagts till ännu.",en: "No files added yet."}
|
|
252
|
+
*/
|
|
253
|
+
fileListEmpty: string;
|
|
254
|
+
/**
|
|
255
|
+
* Display the input in error state along with an error message.
|
|
256
|
+
*/
|
|
257
|
+
error: string;
|
|
258
|
+
/**
|
|
259
|
+
* Name of the upload component.
|
|
260
|
+
*/
|
|
261
|
+
name: string;
|
|
262
|
+
/**
|
|
263
|
+
* Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded.
|
|
264
|
+
*/
|
|
265
|
+
maxBytes: number;
|
|
266
|
+
/**
|
|
267
|
+
* Use maxBytesTotal to specify the maximum size in Bytes of All files combined that can be uploaded.
|
|
268
|
+
*/
|
|
269
|
+
maxBytesTotal: number;
|
|
270
|
+
/**
|
|
271
|
+
* Use maxFiles to specify the maximum amount of files that can be uploaded
|
|
272
|
+
*/
|
|
273
|
+
maxFiles: number;
|
|
274
|
+
/**
|
|
275
|
+
* A string of commaseperated file type values that are allowed
|
|
276
|
+
* @example: .pdf,.doc,.docx
|
|
277
|
+
*/
|
|
278
|
+
allowedExtensions: string;
|
|
279
|
+
/**
|
|
280
|
+
* A string of commaseperated mime type values that are allowed
|
|
281
|
+
* @example: image/*,application/msword,
|
|
282
|
+
*/
|
|
283
|
+
allowedMimetypes: string;
|
|
284
|
+
/**
|
|
285
|
+
* Use multiple to allow the user to select multiple files when uploading
|
|
286
|
+
*/
|
|
287
|
+
multiple: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* Use limitSelection to enforce the value in allowedExtension & allowedMimetypes when selecting files,
|
|
290
|
+
* by default this is off, setting this to true will limit the users choices to what has been explicitly set
|
|
291
|
+
*/
|
|
292
|
+
limitSelection: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Value of the input.
|
|
295
|
+
*/
|
|
296
|
+
value: string;
|
|
297
|
+
/**
|
|
298
|
+
* Emitted when the value has changed.
|
|
299
|
+
*/
|
|
300
|
+
duetChange: EventEmitter<DuetUploadEvent>;
|
|
301
|
+
/**
|
|
302
|
+
* Emitted when the input loses focus.
|
|
303
|
+
*/
|
|
304
|
+
duetBlur: EventEmitter<DuetUploadEvent>;
|
|
305
|
+
/**
|
|
306
|
+
* Emitted when the input has focus.
|
|
307
|
+
*/
|
|
308
|
+
duetFocus: EventEmitter<DuetUploadEvent>;
|
|
309
|
+
/**
|
|
310
|
+
* Emitted when the current upload batch finishes
|
|
311
|
+
*/
|
|
312
|
+
duetDone: EventEmitter<DuetUploadEvent>;
|
|
313
|
+
/**
|
|
314
|
+
* Emitted when the current validation state changes internally
|
|
315
|
+
*/
|
|
316
|
+
duetState: EventEmitter<DuetUploadEvent>;
|
|
317
|
+
/**
|
|
318
|
+
* Emitted when a user clicks delete to delete an uploaded file, or a file entry with error
|
|
319
|
+
*/
|
|
320
|
+
duetDelete: EventEmitter<DuetUploadEvent>;
|
|
321
|
+
/**
|
|
322
|
+
* Emitted when a user clicks cancel on an upload in progress
|
|
323
|
+
*/
|
|
324
|
+
duetCancel: EventEmitter<DuetUploadEvent>;
|
|
325
|
+
/**
|
|
326
|
+
* Emitted when the file progress is updated.
|
|
327
|
+
*/
|
|
328
|
+
duetProgress: EventEmitter<DuetUploadEvent>;
|
|
329
|
+
/**
|
|
330
|
+
* Emitted when the user clicks the upload button
|
|
331
|
+
*/
|
|
332
|
+
duetUpload: EventEmitter<DuetUploadEvent>;
|
|
333
|
+
/**
|
|
334
|
+
* Component lifecycle events.
|
|
335
|
+
*/
|
|
336
|
+
componentWillLoad(): void;
|
|
337
|
+
componentWillRender(): void;
|
|
338
|
+
/**
|
|
339
|
+
* Private functions
|
|
340
|
+
*/
|
|
341
|
+
private listenForActionEvents;
|
|
342
|
+
private verifyValidity;
|
|
343
|
+
private getGroupFromItemData;
|
|
344
|
+
private getItemHTMLFromItemData;
|
|
345
|
+
private convertToDuetEditableTableItems;
|
|
346
|
+
private kick;
|
|
347
|
+
private genHashName;
|
|
348
|
+
private updateValueInMap;
|
|
349
|
+
private updateProgress;
|
|
350
|
+
private trackProgress;
|
|
351
|
+
private getFilesAsArray;
|
|
352
|
+
private resetFormFields;
|
|
353
|
+
private startUpload;
|
|
354
|
+
/**
|
|
355
|
+
* Eventlisteners for the XHR requests
|
|
356
|
+
*/
|
|
357
|
+
private transferComplete;
|
|
358
|
+
private transferDone;
|
|
359
|
+
private transferDoneWithFailure;
|
|
360
|
+
private transferFailed;
|
|
361
|
+
private transferCanceled;
|
|
362
|
+
private validateTotals;
|
|
363
|
+
/**
|
|
364
|
+
* XHR request utilities
|
|
365
|
+
*/
|
|
366
|
+
private makeXHRPostRequest;
|
|
367
|
+
private makeXHRDeleteRequest;
|
|
368
|
+
/**
|
|
369
|
+
* Component event handling.
|
|
370
|
+
*/
|
|
371
|
+
private onChange;
|
|
372
|
+
private onDelete;
|
|
373
|
+
private onCancel;
|
|
374
|
+
private onUpload;
|
|
375
|
+
private onBlur;
|
|
376
|
+
private onProgress;
|
|
377
|
+
private onFocus;
|
|
378
|
+
private onDone;
|
|
379
|
+
/**
|
|
380
|
+
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
381
|
+
* `input.focus()`.
|
|
382
|
+
*/
|
|
383
|
+
setFocus(options?: FocusOptions): Promise<void>;
|
|
384
|
+
/**
|
|
385
|
+
* Method for invoking the upload sequence
|
|
386
|
+
*/
|
|
387
|
+
upload(metaData?: any | undefined): Promise<void>;
|
|
388
|
+
/**
|
|
389
|
+
* Get list of files, divided in errors and valid sections
|
|
390
|
+
*/
|
|
391
|
+
getFiles(): Promise<false | {
|
|
392
|
+
valid: any[];
|
|
393
|
+
invalid: any[];
|
|
394
|
+
}>;
|
|
395
|
+
/**
|
|
396
|
+
* Convenience method for updating the value of a key:value inside an item in the files attribute
|
|
397
|
+
*/
|
|
398
|
+
updateValue(item: string, key: string, value: any): Promise<void>;
|
|
399
|
+
/**
|
|
400
|
+
* render() function
|
|
401
|
+
* Always the last one in the class.
|
|
402
|
+
*/
|
|
403
|
+
render(): any;
|
|
404
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DuetLangObject } from "../../utils/language-utils";
|
|
2
|
+
export declare type DuetUploadErrorCode = {
|
|
3
|
+
type: string | undefined;
|
|
4
|
+
system_message: string | undefined;
|
|
5
|
+
message: DuetLangObject | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare const getError: (code: string) => DuetUploadErrorCode;
|
|
8
|
+
export declare const getI18nError: (errorCode: string) => any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FunctionalComponent } from "../../stencil-public-runtime";
|
|
2
|
+
import { DuetFileListItem } from "./duet-upload";
|
|
3
|
+
interface SuccessProps {
|
|
4
|
+
data: DuetFileListItem;
|
|
5
|
+
showLinks: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const SuccessItem: FunctionalComponent<SuccessProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StringMap } from "./duet-upload";
|
|
2
|
+
export declare const validateFileExtension: (name: string, allowedExtensions: string) => boolean;
|
|
3
|
+
export declare const validateFileMime: (type: any, allowedMimetypes: string) => boolean;
|
|
4
|
+
export declare const validateFileSize: (size: any, maxBytes: any) => boolean;
|
|
5
|
+
export declare const validateFile: (item: any, validators: Record<string, any>) => {
|
|
6
|
+
valid: boolean;
|
|
7
|
+
errorMessage: any;
|
|
8
|
+
errorSystem: string;
|
|
9
|
+
errorType: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const validateTotalSizeIsAboveMax: (filelist: StringMap, maxTotalBytes: number) => boolean;
|
|
12
|
+
export declare const validateTotalAmountIsAboveMax: (filelist: StringMap, maxFiles: number) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatBytes: (bytes: any, decimals?: number) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare type DuetXhrRequestOptions = {
|
|
2
|
+
type: "POST" | "DELETE";
|
|
3
|
+
xhr: XMLHttpRequest;
|
|
4
|
+
argument: string | null;
|
|
5
|
+
uri: string;
|
|
6
|
+
headers: Record<string, string> | null;
|
|
7
|
+
};
|
|
8
|
+
export declare type failureHandler = (xhr: XMLHttpRequest, name: string, status: XMLHttpRequest["status"]) => void;
|
|
9
|
+
export declare type successHandler = (xhr: XMLHttpRequest, name: string, status: XMLHttpRequest["status"]) => void;
|
|
10
|
+
export declare type progressTracker = (name: string) => void;
|
|
11
|
+
export declare type DuetXhrRequest = (payload: Record<string, any>, options: Partial<DuetXhrRequestOptions>, onFailure: failureHandler, onSuccess: successHandler, onProgress: progressTracker) => XMLHttpRequest;
|
|
12
|
+
export declare const makeXhrRequest: ({ payload, options, onFailure, onSuccess, onProgress }: {
|
|
13
|
+
payload: any;
|
|
14
|
+
options: any;
|
|
15
|
+
onFailure: any;
|
|
16
|
+
onSuccess: any;
|
|
17
|
+
onProgress: any;
|
|
18
|
+
}) => DuetXhrRequest;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare type StatusMessage = {
|
|
2
|
+
inProgress: string;
|
|
3
|
+
inProgressWithErrors: string;
|
|
4
|
+
done: string;
|
|
5
|
+
doneWithErrors: string;
|
|
6
|
+
file: string;
|
|
7
|
+
files: string;
|
|
8
|
+
};
|
|
9
|
+
export declare class DuetUploadAriaStatus {
|
|
10
|
+
/**
|
|
11
|
+
* State() variables
|
|
12
|
+
*/
|
|
13
|
+
statusMessage: string;
|
|
14
|
+
/**
|
|
15
|
+
* Status labels used in the component
|
|
16
|
+
*/
|
|
17
|
+
statusMessageLabel: StatusMessage;
|
|
18
|
+
/**
|
|
19
|
+
* Adds accessible label that is read aloud
|
|
20
|
+
*/
|
|
21
|
+
accessibleAriaLive: "off" | "polite" | "assertive";
|
|
22
|
+
/**
|
|
23
|
+
* valid file amount
|
|
24
|
+
*/
|
|
25
|
+
valid: number;
|
|
26
|
+
/**
|
|
27
|
+
* total files
|
|
28
|
+
*/
|
|
29
|
+
total: number;
|
|
30
|
+
/**
|
|
31
|
+
* invalid file amount
|
|
32
|
+
*/
|
|
33
|
+
invalid: number;
|
|
34
|
+
/**
|
|
35
|
+
* valid file amount
|
|
36
|
+
*/
|
|
37
|
+
inprogress: number;
|
|
38
|
+
watchHandler(newValue: boolean, oldValue: boolean): void;
|
|
39
|
+
/**
|
|
40
|
+
* Private functions
|
|
41
|
+
*/
|
|
42
|
+
private replacePlaceHolders;
|
|
43
|
+
private getStatusMessage;
|
|
44
|
+
/**
|
|
45
|
+
* render() function
|
|
46
|
+
* Always the last one in the class.
|
|
47
|
+
*/
|
|
48
|
+
render(): any;
|
|
49
|
+
}
|