@duetds/components 4.30.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 +1481 -434
- package/lib/cjs/{dom-e89ebf90.js → dom-c850c8d7.js} +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +4 -2
- package/lib/cjs/duet-badge.cjs.entry.js +2 -2
- package/lib/cjs/duet-button_2.cjs.entry.js +6 -5
- package/lib/cjs/duet-caption_4.cjs.entry.js +21 -15
- package/lib/cjs/duet-card.cjs.entry.js +6 -6
- package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
- package/lib/cjs/duet-choice_2.cjs.entry.js +56 -25
- package/lib/cjs/duet-collapsible.cjs.entry.js +5 -2
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +23 -13
- 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 +4 -4
- package/lib/cjs/duet-grid_2.cjs.entry.js +52 -4
- package/lib/cjs/duet-header_2.cjs.entry.js +26 -10
- package/lib/cjs/duet-hero.cjs.entry.js +6 -6
- package/lib/cjs/duet-icon.cjs.entry.js +6 -14
- package/lib/cjs/duet-input_2.cjs.entry.js +7 -7
- 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 +8 -7
- package/lib/cjs/duet-notification_2.cjs.entry.js +6 -5
- package/lib/cjs/duet-number-input.cjs.entry.js +36 -15
- 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 +6 -6
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-tab_2.cjs.entry.js +12 -6
- 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 +21 -10
- package/lib/cjs/duet-tray.cjs.entry.js +21 -10
- package/lib/cjs/duet-upload.cjs.entry.js +403 -180
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +4 -4
- package/lib/cjs/{focus-utils-7605778f.js → focus-utils-a7a1fb8b.js} +1 -1
- package/lib/cjs/{index-0c949193.js → index-b724d698.js} +88 -77
- package/lib/cjs/js-utils-33a9dbe3.js +16 -0
- package/lib/cjs/{language-utils-70d6a9a4.js → language-utils-aa282901.js} +28 -9
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{shadow-css-0c8c175b.js → shadow-css-e3edeed1.js} +9 -10
- package/lib/cjs/{string-utils-a6de43d8.js → string-utils-267e3dbb.js} +7 -0
- 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 -8
- package/lib/collection/components/duet-alert/duet-alert.js +12 -6
- package/lib/collection/components/duet-badge/duet-badge.css +1 -0
- package/lib/collection/components/duet-button/duet-button.js +17 -15
- package/lib/collection/components/duet-card/duet-card.css +30 -7
- package/lib/collection/components/duet-card/duet-card.js +4 -3
- 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 +123 -36
- package/lib/collection/components/duet-choice-group/duet-choice-group.css +1 -0
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +4 -4
- package/lib/collection/components/duet-date-picker/duet-date-picker.css +1 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +78 -43
- 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 +17 -15
- package/lib/collection/components/duet-grid/duet-grid.js +57 -6
- package/lib/collection/components/duet-grid-item/duet-grid-item.js +4 -4
- package/lib/collection/components/duet-header/duet-header.js +60 -35
- package/lib/collection/components/duet-heading/duet-heading.css +4 -0
- package/lib/collection/components/duet-heading/duet-heading.js +7 -6
- package/lib/collection/components/duet-hero/duet-hero.js +20 -15
- package/lib/collection/components/duet-icon/duet-icon.js +2 -6
- 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-label/duet-label.css +2 -0
- package/lib/collection/components/duet-link/duet-link.js +18 -19
- package/lib/collection/components/duet-logo/duet-logo.js +4 -4
- package/lib/collection/components/duet-modal/duet-modal.js +22 -17
- package/lib/collection/components/duet-notification/duet-notification.js +8 -8
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +20 -15
- package/lib/collection/components/duet-number-input/duet-number-input.js +153 -29
- 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 +43 -12
- 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 +82 -20
- package/lib/collection/components/duet-tray/duet-tray.js +79 -17
- 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.css +17 -86
- package/lib/collection/components/duet-upload/duet-upload.js +551 -153
- package/lib/collection/components/duet-upload/errorcodes.utils.js +16 -4
- package/lib/collection/components/duet-upload/xhr.helpers.js +2 -6
- package/lib/collection/utils/fixture-utils.js +7 -5
- package/lib/collection/utils/js-utils.js +12 -0
- package/lib/collection/utils/language-utils.js +26 -9
- package/lib/collection/utils/string-utils.js +6 -0
- package/lib/collection/utils/watch-options.js +35 -6
- package/lib/custom-elements-bundle/index.d.ts +30 -0
- package/lib/custom-elements-bundle/index.js +1603 -721
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-4a7911fd.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-1208c84f.entry.js +4 -0
- package/lib/duet/p-12721178.js +4 -0
- package/lib/duet/p-155ef581.system.entry.js +4 -0
- package/lib/duet/p-16c48c5d.entry.js +4 -0
- package/lib/duet/p-1797df7b.system.entry.js +4 -0
- package/lib/duet/p-1a08fc22.system.entry.js +4 -0
- package/lib/duet/{p-d1817efe.system.entry.js → p-237e47b4.system.entry.js} +1 -1
- package/lib/duet/p-2443bdca.system.entry.js +4 -0
- package/lib/duet/p-263bc9cd.system.entry.js +4 -0
- package/lib/duet/p-2764f081.js +4 -0
- package/lib/duet/p-27d80cef.system.entry.js +4 -0
- package/lib/duet/p-28e02c08.entry.js +4 -0
- package/lib/duet/{p-f81d8534.entry.js → p-2bb1460c.entry.js} +1 -1
- package/lib/duet/p-33c58756.entry.js +4 -0
- package/lib/duet/{p-bd9a7d8f.js → p-35a3794e.js} +0 -0
- package/lib/duet/{p-bbc229d8.system.entry.js → p-374fb7e6.system.entry.js} +1 -1
- package/lib/duet/p-387823af.system.entry.js +4 -0
- package/lib/duet/p-3af5d66f.entry.js +4 -0
- package/lib/duet/{p-322d1c38.js → p-3c1971d8.js} +1 -1
- package/lib/duet/{p-7e108b7e.entry.js → p-4607af59.entry.js} +1 -1
- package/lib/duet/p-48d1eb1f.system.entry.js +4 -0
- package/lib/duet/p-4a87e9ab.system.entry.js +4 -0
- package/lib/duet/{p-031c2cd8.system.entry.js → p-4b6ebe40.system.entry.js} +1 -1
- package/lib/duet/p-4e28da18.system.entry.js +4 -0
- package/lib/duet/p-548d484e.js +4 -0
- package/lib/duet/p-5826523b.entry.js +4 -0
- package/lib/duet/{p-ce1374a4.system.entry.js → p-58750bae.system.entry.js} +1 -1
- package/lib/duet/p-597d99c7.entry.js +4 -0
- package/lib/duet/p-5ea0cd19.entry.js +4 -0
- package/lib/duet/p-63d5bf73.system.entry.js +4 -0
- package/lib/duet/p-67d9a9a9.system.entry.js +4 -0
- package/lib/duet/p-6a19b5ec.entry.js +4 -0
- package/lib/duet/p-6cc3be76.system.entry.js +4 -0
- package/lib/duet/p-6e363557.system.js +4 -0
- package/lib/duet/p-6e6e76db.system.entry.js +4 -0
- package/lib/duet/p-70fafc98.system.js +4 -0
- package/lib/duet/p-7368b14e.system.entry.js +4 -0
- package/lib/duet/p-751542a0.system.entry.js +4 -0
- package/lib/duet/p-794659ac.entry.js +4 -0
- package/lib/duet/p-7e8d5bb9.system.entry.js +4 -0
- package/lib/duet/p-7fee0d23.system.entry.js +4 -0
- package/lib/duet/p-81867417.system.js +4 -0
- package/lib/duet/p-86daec1c.entry.js +4 -0
- package/lib/duet/{p-4265de16.system.entry.js → p-8b5ca0e7.system.entry.js} +1 -1
- package/lib/duet/{p-66dde4d2.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-36007600.entry.js → p-9481e312.entry.js} +1 -1
- package/lib/duet/{p-f82709ba.entry.js → p-984576c9.entry.js} +1 -1
- package/lib/duet/p-986779fb.js +4 -0
- package/lib/duet/p-987edcd0.js +15 -0
- package/lib/duet/{p-35e45c19.system.js → p-9a945278.system.js} +1 -1
- package/lib/duet/p-9d73343a.entry.js +4 -0
- package/lib/duet/{p-e26116e0.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-2d2c45f9.entry.js → p-a890da72.entry.js} +1 -1
- package/lib/duet/p-a9859a82.entry.js +4 -0
- package/lib/duet/p-aba68b7b.entry.js +4 -0
- package/lib/duet/p-acc57c77.entry.js +4 -0
- package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
- package/lib/duet/p-aee24388.system.entry.js +4 -0
- package/lib/duet/p-aef1b720.system.entry.js +4 -0
- package/lib/duet/{p-62806bb6.system.entry.js → p-af41d894.system.entry.js} +1 -1
- package/lib/duet/p-b25d3769.js +4 -0
- package/lib/duet/{p-dee41056.system.entry.js → p-b32224fe.system.entry.js} +1 -1
- package/lib/duet/p-b3744481.entry.js +4 -0
- package/lib/duet/{p-de2be65b.system.js → p-b42d81c3.system.js} +1 -1
- package/lib/duet/{p-27d538f7.system.entry.js → p-b4e87f02.system.entry.js} +1 -1
- package/lib/duet/{p-f71f12ed.entry.js → p-bf93a991.entry.js} +1 -1
- package/lib/duet/{p-fd98468a.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-59a07cf9.entry.js → p-c36b4da0.entry.js} +1 -1
- package/lib/duet/{p-a321a98c.entry.js → p-cdd70b93.entry.js} +1 -1
- package/lib/duet/p-d1c19f04.system.entry.js +4 -0
- package/lib/duet/{p-f71e337e.system.entry.js → p-d3a3c3c7.system.entry.js} +1 -1
- package/lib/duet/{p-345ea4f2.system.entry.js → p-d4118b6e.system.entry.js} +1 -1
- package/lib/duet/{p-3dc9d15d.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-dfe79666.system.entry.js +4 -0
- package/lib/duet/p-e12f2b8b.system.js +4 -0
- package/lib/duet/p-e2a44156.js +4 -0
- package/lib/duet/p-e76b722f.entry.js +4 -0
- package/lib/duet/p-e964d062.entry.js +4 -0
- 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-a88df408.entry.js → p-f8ce39fb.entry.js} +1 -1
- package/lib/esm/{dom-21034390.js → dom-58cd15f6.js} +1 -1
- package/lib/esm/duet-alert.entry.js +4 -2
- package/lib/esm/duet-badge.entry.js +2 -2
- package/lib/esm/duet-button_2.entry.js +6 -5
- package/lib/esm/duet-caption_4.entry.js +21 -15
- package/lib/esm/duet-card.entry.js +6 -6
- package/lib/esm/duet-checkbox.entry.js +2 -2
- package/lib/esm/duet-choice_2.entry.js +57 -26
- package/lib/esm/duet-collapsible.entry.js +5 -2
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +23 -13
- 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 +4 -4
- package/lib/esm/duet-grid_2.entry.js +52 -4
- package/lib/esm/duet-header_2.entry.js +26 -10
- package/lib/esm/duet-hero.entry.js +6 -6
- package/lib/esm/duet-icon.entry.js +6 -14
- package/lib/esm/duet-input_2.entry.js +7 -7
- 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 +8 -7
- package/lib/esm/duet-notification_2.entry.js +6 -5
- package/lib/esm/duet-number-input.entry.js +36 -15
- 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 +6 -6
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-tab_2.entry.js +12 -6
- 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 +21 -10
- package/lib/esm/duet-tray.entry.js +21 -10
- package/lib/esm/duet-upload.entry.js +403 -180
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{focus-utils-0b12f0df.js → focus-utils-1fe0dcd0.js} +1 -1
- package/lib/esm/{index-f70ddc7f.js → index-84d97bd1.js} +88 -78
- package/lib/esm/js-utils-b69f17df.js +14 -0
- package/lib/esm/{language-utils-ab9c3afc.js → language-utils-344d894c.js} +28 -10
- package/lib/esm/loader.js +3 -3
- package/lib/esm/{shadow-css-31e2d504.js → shadow-css-7c726abb.js} +9 -10
- package/lib/esm/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +7 -1
- 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-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 +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 +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 +2 -2
- 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 +2 -2
- 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-0b12f0df.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-344d894c.js +4 -0
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/shadow-css-7c726abb.js +15 -0
- package/lib/esm-es5/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +1 -1
- 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-alert/duet-alert.d.ts +2 -1
- package/lib/types/components/duet-button/duet-button.d.ts +1 -1
- package/lib/types/components/duet-choice/duet-choice.d.ts +24 -5
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +15 -9
- 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-footer/duet-footer.d.ts +1 -1
- package/lib/types/components/duet-grid/duet-grid.d.ts +16 -2
- package/lib/types/components/duet-header/duet-header.d.ts +21 -5
- package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
- package/lib/types/components/duet-hero/duet-hero.d.ts +3 -3
- package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
- package/lib/types/components/duet-link/duet-link.d.ts +2 -3
- package/lib/types/components/duet-modal/duet-modal.d.ts +3 -3
- package/lib/types/components/duet-notification-drawer/duet-notification-drawer.d.ts +3 -3
- package/lib/types/components/duet-number-input/duet-number-input.d.ts +21 -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-tab-group/duet-tab-group.d.ts +6 -0
- package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +11 -0
- package/lib/types/components/duet-tray/duet-tray.d.ts +11 -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.d.ts +94 -25
- package/lib/types/components/duet-upload/errorcodes.utils.d.ts +1 -0
- package/lib/types/components/duet-upload/xhr.helpers.d.ts +7 -1
- package/lib/types/components.d.ts +611 -79
- package/lib/types/utils/js-utils.d.ts +1 -0
- package/lib/types/utils/language-utils.d.ts +8 -3
- package/lib/types/utils/string-utils.d.ts +1 -0
- package/lib/types/utils/watch-options.d.ts +2 -0
- package/package.json +19 -15
- package/hydrate/package.json +0 -6
- package/lib/cjs/duet-fieldset.cjs.entry.js +0 -62
- package/lib/collection/components/duet-upload/duet-upload-file-list.js +0 -49
- package/lib/duet/p-0733c303.system.entry.js +0 -4
- package/lib/duet/p-095060cc.js +0 -4
- package/lib/duet/p-156864a1.system.entry.js +0 -4
- package/lib/duet/p-15c15c6a.js +0 -15
- package/lib/duet/p-1911dfe7.system.entry.js +0 -4
- package/lib/duet/p-1c41525a.entry.js +0 -4
- package/lib/duet/p-1cfe38b1.system.entry.js +0 -4
- package/lib/duet/p-2834a302.entry.js +0 -4
- package/lib/duet/p-28a3d38f.system.entry.js +0 -4
- package/lib/duet/p-2a1a9f9f.entry.js +0 -4
- package/lib/duet/p-2a4d7c5b.system.entry.js +0 -4
- package/lib/duet/p-3eb36e3d.entry.js +0 -4
- package/lib/duet/p-4095dba5.entry.js +0 -4
- package/lib/duet/p-418b2ce7.system.js +0 -4
- package/lib/duet/p-4289b543.entry.js +0 -4
- package/lib/duet/p-43e39d98.system.js +0 -4
- package/lib/duet/p-46a3ae43.system.js +0 -4
- package/lib/duet/p-4a38cf9d.entry.js +0 -4
- package/lib/duet/p-4be8e814.entry.js +0 -4
- package/lib/duet/p-4dcea8fb.system.entry.js +0 -4
- package/lib/duet/p-591b2137.entry.js +0 -4
- package/lib/duet/p-5c5bdb06.system.entry.js +0 -4
- package/lib/duet/p-5f70e318.entry.js +0 -4
- package/lib/duet/p-62c294d6.system.entry.js +0 -4
- package/lib/duet/p-6a356ab1.system.js +0 -4
- package/lib/duet/p-6c2729da.js +0 -4
- package/lib/duet/p-6f107847.system.entry.js +0 -4
- package/lib/duet/p-77a5fe4c.system.js +0 -4
- package/lib/duet/p-7809e78b.system.entry.js +0 -4
- package/lib/duet/p-7a36d76f.system.entry.js +0 -4
- package/lib/duet/p-7ee52f58.entry.js +0 -4
- package/lib/duet/p-884693f1.entry.js +0 -4
- package/lib/duet/p-89db3b94.entry.js +0 -4
- package/lib/duet/p-8cfce39e.system.entry.js +0 -4
- package/lib/duet/p-8ffe1461.system.entry.js +0 -4
- package/lib/duet/p-9381c2d4.entry.js +0 -4
- package/lib/duet/p-9a450c9a.entry.js +0 -4
- package/lib/duet/p-9a89ec39.js +0 -4
- package/lib/duet/p-9bbfe606.system.entry.js +0 -4
- package/lib/duet/p-a6096b05.system.entry.js +0 -4
- package/lib/duet/p-a89d5d7c.entry.js +0 -4
- package/lib/duet/p-b07055fd.system.entry.js +0 -4
- package/lib/duet/p-b4374f0e.entry.js +0 -4
- package/lib/duet/p-b456d684.system.entry.js +0 -4
- package/lib/duet/p-bd18c93f.js +0 -4
- package/lib/duet/p-bddb1c15.system.entry.js +0 -4
- package/lib/duet/p-c0b95b58.entry.js +0 -4
- package/lib/duet/p-c3688975.entry.js +0 -4
- package/lib/duet/p-c4d183e6.entry.js +0 -4
- package/lib/duet/p-c9303f9a.entry.js +0 -4
- package/lib/duet/p-cd4e8ccf.js +0 -4
- package/lib/duet/p-ceb75b35.system.entry.js +0 -4
- package/lib/duet/p-cf243bcb.system.entry.js +0 -4
- package/lib/duet/p-d37c8a05.system.js +0 -4
- package/lib/duet/p-d989af11.entry.js +0 -4
- package/lib/duet/p-e58ca7af.system.js +0 -16
- package/lib/duet/p-e6128d82.system.entry.js +0 -4
- package/lib/duet/p-e86cdc17.entry.js +0 -4
- package/lib/duet/p-eadb29c7.entry.js +0 -4
- package/lib/duet/p-f30b14d6.system.entry.js +0 -4
- package/lib/duet/p-f79f8da1.entry.js +0 -4
- package/lib/duet/p-fc397e03.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-f70ddc7f.js +0 -4
- package/lib/esm-es5/language-utils-ab9c3afc.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
- package/lib/html.html-data.json +0 -4556
- package/lib/types/components/duet-upload/duet-upload-file-list.d.ts +0 -9
|
@@ -3,16 +3,20 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from "@stencil/core";
|
|
5
5
|
import { createID } from "../../utils/create-id";
|
|
6
|
+
import { debounce } from "../../utils/js-utils";
|
|
6
7
|
import { getLocaleString } from "../../utils/language-utils";
|
|
7
8
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
8
|
-
import {
|
|
9
|
+
import { ErrorItem } from "./duet-upload-editable-item-error";
|
|
10
|
+
import { ProgressItem } from "./duet-upload-editable-item-inprogres";
|
|
11
|
+
import { SuccessItem } from "./duet-upload-editable-item-success";
|
|
9
12
|
import { validateFile, validateTotalAmountIsAboveMax, validateTotalSizeIsAboveMax } from "./duet-upload-validators";
|
|
10
|
-
import { getError } from "./errorcodes.utils";
|
|
13
|
+
import { getError, getI18nError } from "./errorcodes.utils";
|
|
11
14
|
import { makeXhrRequest } from "./xhr.helpers";
|
|
12
15
|
/**
|
|
13
16
|
* @slot header - named slot - to place content after description / caption
|
|
14
|
-
* @slot fileheader - named slot - to place content above filelist (only displayed when filelist contains items)
|
|
15
|
-
* @slot
|
|
17
|
+
* @slot fileheader - named slot - to place content above "filelist" (only displayed when "filelist" contains items)
|
|
18
|
+
* @slot filelist - named slot - should always contain a configurable duet-editable-table or a component that exposes the same functionality
|
|
19
|
+
* @slot filefooter - named slot - to place content below "filelist" (only displayed when "filelist" contains items)
|
|
16
20
|
*/
|
|
17
21
|
export class DuetUpload {
|
|
18
22
|
constructor() {
|
|
@@ -22,9 +26,19 @@ export class DuetUpload {
|
|
|
22
26
|
this.buttonId = createID("DuetButton");
|
|
23
27
|
this.labelId = createID("DuetLabel");
|
|
24
28
|
this.uploadId = createID("DuetUpload");
|
|
29
|
+
this.editableTableId = createID("DuetEditableTable");
|
|
25
30
|
this.filesInProgress = new Map();
|
|
26
31
|
this.fileMaxReached = false;
|
|
27
32
|
this.bytesMaxReached = false;
|
|
33
|
+
//region Internally exposed properties
|
|
34
|
+
/**
|
|
35
|
+
* Properties
|
|
36
|
+
*/
|
|
37
|
+
this.DefaultGroups = {
|
|
38
|
+
inprogress: "inprogress",
|
|
39
|
+
success: "success",
|
|
40
|
+
failure: "failure",
|
|
41
|
+
};
|
|
28
42
|
/**
|
|
29
43
|
* State() variables
|
|
30
44
|
*/
|
|
@@ -34,9 +48,91 @@ export class DuetUpload {
|
|
|
34
48
|
* it will be up to you to handle the upload and return progress information to the upload-component
|
|
35
49
|
*/
|
|
36
50
|
this.external = false;
|
|
51
|
+
/**
|
|
52
|
+
* If set the upload component will not display an upload button, you will have to create on yourself
|
|
53
|
+
* and call the exposed methods startUpload
|
|
54
|
+
*/
|
|
55
|
+
this.hideButton = false;
|
|
56
|
+
/**
|
|
57
|
+
* Default actions added to all files
|
|
58
|
+
*/
|
|
59
|
+
this.actions = [
|
|
60
|
+
{
|
|
61
|
+
icon: "action-delete",
|
|
62
|
+
color: "color-danger",
|
|
63
|
+
color_hover: "category-home",
|
|
64
|
+
id: "delete",
|
|
65
|
+
map: ["success", "failure"],
|
|
66
|
+
label: {
|
|
67
|
+
fi: "Poista tiedosto",
|
|
68
|
+
en: "Poista tiedosto",
|
|
69
|
+
sv: "Ta bort filen",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
icon: "navigation-close",
|
|
74
|
+
color: "primary",
|
|
75
|
+
color_hover: "category-home",
|
|
76
|
+
id: "cancel",
|
|
77
|
+
map: ["inprogress"],
|
|
78
|
+
label: {
|
|
79
|
+
fi: "Keskeytä lähetys",
|
|
80
|
+
en: "Cancel the upload",
|
|
81
|
+
sv: "Stop överföringen",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
/**
|
|
86
|
+
* If enabled the filelist will create links on successfully uploaded items,
|
|
87
|
+
* this requires the server can respond with link URIs in the correct format
|
|
88
|
+
*/
|
|
89
|
+
this.showLinks = false;
|
|
90
|
+
/**
|
|
91
|
+
* Property to change the aria upload progress text read aloud by screenreaders
|
|
92
|
+
* @default {
|
|
93
|
+
fi: "Lisää liite",
|
|
94
|
+
sv: "Lägg till en bilaga",
|
|
95
|
+
en: "Choose files",
|
|
96
|
+
}
|
|
97
|
+
*/
|
|
98
|
+
this.statusLabelDefaults = {
|
|
99
|
+
fi: {
|
|
100
|
+
inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
|
|
101
|
+
inProgressWithErrors: "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
|
|
102
|
+
done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
|
|
103
|
+
doneWithErrors: "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
|
|
104
|
+
files: "tiedostot",
|
|
105
|
+
file: "tiedosto",
|
|
106
|
+
},
|
|
107
|
+
sv: {
|
|
108
|
+
inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
109
|
+
inProgressWithErrors: "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
|
|
110
|
+
done: "Alla {filesTotal} har lagts till",
|
|
111
|
+
doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
|
|
112
|
+
files: "filer",
|
|
113
|
+
file: "fil",
|
|
114
|
+
},
|
|
115
|
+
en: {
|
|
116
|
+
inProgress: "Adding {filesUploaded} of {filesTotal}",
|
|
117
|
+
inProgressWithErrors: "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
|
|
118
|
+
done: "All {filesTotal} added successfully",
|
|
119
|
+
doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
|
|
120
|
+
files: "tiedostoa",
|
|
121
|
+
file: "tiedosto",
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Strings used for the status aria-label
|
|
126
|
+
*/
|
|
127
|
+
this.statusMessageLabel = getLocaleString(this.statusLabelDefaults);
|
|
37
128
|
/**
|
|
38
129
|
* Property to change descriptionDefaults defaults on the component.
|
|
39
130
|
* normally you would handle these strings on an application level and override @label when needed
|
|
131
|
+
* @default {
|
|
132
|
+
fi: "Lisää liite",
|
|
133
|
+
sv: "Lägg till en bilaga",
|
|
134
|
+
en: "Add an attachment",
|
|
135
|
+
}
|
|
40
136
|
*/
|
|
41
137
|
this.buttonLabelDefaults = {
|
|
42
138
|
fi: "Lisää liite",
|
|
@@ -72,6 +168,10 @@ export class DuetUpload {
|
|
|
72
168
|
* browser from displaying its own validation errors.
|
|
73
169
|
*/
|
|
74
170
|
this.required = false;
|
|
171
|
+
/**
|
|
172
|
+
* Visually hides the groups labels in the editable table list used to display the list of files
|
|
173
|
+
*/
|
|
174
|
+
this.hideGroups = false;
|
|
75
175
|
/**
|
|
76
176
|
* Map of string that contain list of uploaded files.
|
|
77
177
|
*/
|
|
@@ -83,6 +183,7 @@ export class DuetUpload {
|
|
|
83
183
|
/**
|
|
84
184
|
* Property to change labelDefaults defaults on the component.
|
|
85
185
|
* normally you would handle these strings on an application level and override @label when needed
|
|
186
|
+
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
86
187
|
*/
|
|
87
188
|
this.labelDefaults = {
|
|
88
189
|
fi: "Lisää liite",
|
|
@@ -97,6 +198,11 @@ export class DuetUpload {
|
|
|
97
198
|
/**
|
|
98
199
|
* Property to change descriptionDefaults defaults on the component.
|
|
99
200
|
* normally you would handle these strings on an application level and override @label when needed
|
|
201
|
+
* @default {
|
|
202
|
+
fi: "Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",
|
|
203
|
+
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.",
|
|
204
|
+
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.",
|
|
205
|
+
}
|
|
100
206
|
*/
|
|
101
207
|
this.descriptionDefaults = {
|
|
102
208
|
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.",
|
|
@@ -105,12 +211,20 @@ export class DuetUpload {
|
|
|
105
211
|
};
|
|
106
212
|
/**
|
|
107
213
|
* Description for the upload component.
|
|
108
|
-
* @default
|
|
214
|
+
* @default {
|
|
215
|
+
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.",
|
|
216
|
+
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.",
|
|
217
|
+
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.",
|
|
218
|
+
}
|
|
109
219
|
*/
|
|
110
220
|
this.description = getLocaleString(this.descriptionDefaults);
|
|
111
221
|
/**
|
|
112
222
|
* Defaults for the filelist's empty state.
|
|
113
|
-
* @default {
|
|
223
|
+
* @default {
|
|
224
|
+
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
225
|
+
sv: "Inga filer har lagts till ännu.",
|
|
226
|
+
en: "No files added yet.",
|
|
227
|
+
}
|
|
114
228
|
*/
|
|
115
229
|
this.fileListEmptyDefaults = {
|
|
116
230
|
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
@@ -126,21 +240,6 @@ export class DuetUpload {
|
|
|
126
240
|
* Display the input in error state along with an error message.
|
|
127
241
|
*/
|
|
128
242
|
this.error = "";
|
|
129
|
-
/**
|
|
130
|
-
* Visually hide the label, but still show it to screen readers.
|
|
131
|
-
*/
|
|
132
|
-
this.labelHidden = false;
|
|
133
|
-
/**
|
|
134
|
-
* if set, allows capture of media from user camera / microphone
|
|
135
|
-
* The capture attribute value is a string that specifies which camera to use for capture
|
|
136
|
-
* of image or video data, if the accept attribute indicates that the input should be of
|
|
137
|
-
* one of those types. A value of user indicates that the user-facing camera and/or
|
|
138
|
-
* microphone should be used. A value of environment specifies that the outward-facing
|
|
139
|
-
* camera and/or microphone should be used. If this attribute is missing, the user agent
|
|
140
|
-
* is free to decide on its own what to do. If the requested facing mode isn't available,
|
|
141
|
-
* the user agent may fall back to its preferred default mode.
|
|
142
|
-
*/
|
|
143
|
-
this.capture = undefined;
|
|
144
243
|
/**
|
|
145
244
|
* Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded.
|
|
146
245
|
*/
|
|
@@ -172,10 +271,95 @@ export class DuetUpload {
|
|
|
172
271
|
* by default this is off, setting this to true will limit the users choices to what has been explicitly set
|
|
173
272
|
*/
|
|
174
273
|
this.limitSelection = false;
|
|
274
|
+
//region Private functions
|
|
175
275
|
/**
|
|
176
276
|
* Private functions
|
|
177
277
|
*/
|
|
178
|
-
this.
|
|
278
|
+
this.listenForActionEvents = () => {
|
|
279
|
+
this.element.addEventListener("duetEditableItemAction", (e) => {
|
|
280
|
+
const detail = e.detail;
|
|
281
|
+
const { action, keyName, originalEvent } = detail;
|
|
282
|
+
switch (action) {
|
|
283
|
+
case "delete":
|
|
284
|
+
this.onDelete(keyName, originalEvent);
|
|
285
|
+
break;
|
|
286
|
+
case "cancel":
|
|
287
|
+
this.onCancel(keyName, originalEvent);
|
|
288
|
+
break;
|
|
289
|
+
default:
|
|
290
|
+
// code block
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
};
|
|
294
|
+
this.verifyValidity = () => {
|
|
295
|
+
const { invalid, valid } = this.getFilesAsArray();
|
|
296
|
+
const oldValid = this.valid;
|
|
297
|
+
this.valid = invalid.length === 0 && valid.length !== 0;
|
|
298
|
+
if (this.valid !== oldValid) {
|
|
299
|
+
this.duetState.emit({
|
|
300
|
+
originalEvent: undefined,
|
|
301
|
+
data: { valid: this.valid, from: "componentWillRender" },
|
|
302
|
+
component: "duet-upload",
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
this.getGroupFromItemData = (item) => {
|
|
307
|
+
if (item.valid && item.progress === 100) {
|
|
308
|
+
// if the item has a group, move the file to that group instead
|
|
309
|
+
// of into the standard success group
|
|
310
|
+
if (item.group) {
|
|
311
|
+
return item.group;
|
|
312
|
+
}
|
|
313
|
+
return this.DefaultGroups.success;
|
|
314
|
+
}
|
|
315
|
+
else if (item.progress > 0 && item.progress !== 100) {
|
|
316
|
+
return this.DefaultGroups.inprogress;
|
|
317
|
+
}
|
|
318
|
+
else if (!item.valid) {
|
|
319
|
+
return this.DefaultGroups.failure;
|
|
320
|
+
}
|
|
321
|
+
else if (item.group) {
|
|
322
|
+
return item.group;
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
return "none";
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
this.getItemHTMLFromItemData = (data, group) => {
|
|
329
|
+
if (group === this.DefaultGroups.success) {
|
|
330
|
+
return h(SuccessItem, { data: data, showLinks: this.showLinks });
|
|
331
|
+
}
|
|
332
|
+
else if (group === this.DefaultGroups.inprogress) {
|
|
333
|
+
return h(ProgressItem, { progress: data.progress, name: data.item.name });
|
|
334
|
+
}
|
|
335
|
+
else if (group === this.DefaultGroups.failure) {
|
|
336
|
+
return h(ErrorItem, { data: data });
|
|
337
|
+
}
|
|
338
|
+
else if (data.group) {
|
|
339
|
+
return data.html;
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
return "none";
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
this.convertToDuetEditableTableItems = () => {
|
|
346
|
+
// we're always recreating the map - in order to force an update down stream.
|
|
347
|
+
const itemData = new Map();
|
|
348
|
+
//walk the files Map and convert to DuetEditableTableItemData
|
|
349
|
+
this.files.forEach((data, key, _originalMap) => {
|
|
350
|
+
const group = this.getGroupFromItemData(data);
|
|
351
|
+
const item = this.getItemHTMLFromItemData(data, group);
|
|
352
|
+
itemData.set(key, {
|
|
353
|
+
uid: data.uid,
|
|
354
|
+
item,
|
|
355
|
+
group,
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
return itemData;
|
|
359
|
+
};
|
|
360
|
+
this.kick = debounce(() => {
|
|
361
|
+
this.tick = Date.now();
|
|
362
|
+
}, 30); // will trigger re-render
|
|
179
363
|
this.genHashName = () => Date.now().toString(36) + Math.random();
|
|
180
364
|
this.updateValueInMap = (item, key, value, kick = true) => {
|
|
181
365
|
const fileItem = this.files.get(item);
|
|
@@ -186,10 +370,14 @@ export class DuetUpload {
|
|
|
186
370
|
}
|
|
187
371
|
};
|
|
188
372
|
this.updateProgress = (ev, name) => {
|
|
189
|
-
|
|
190
|
-
|
|
373
|
+
console.log(this.filesInProgress.size);
|
|
374
|
+
const updateProgressHelper = percentComplete => {
|
|
191
375
|
this.updateValueInMap(name, "progress", percentComplete);
|
|
192
376
|
this.onProgress(name, percentComplete, ev);
|
|
377
|
+
};
|
|
378
|
+
if (ev.lengthComputable) {
|
|
379
|
+
const percentComplete = (ev.loaded / ev.total) * 100;
|
|
380
|
+
updateProgressHelper(percentComplete);
|
|
193
381
|
}
|
|
194
382
|
else {
|
|
195
383
|
console.log("cant read progress");
|
|
@@ -228,16 +416,17 @@ export class DuetUpload {
|
|
|
228
416
|
*/
|
|
229
417
|
this.nativeInput.value = "";
|
|
230
418
|
};
|
|
231
|
-
this.
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
419
|
+
this.startUpload = async (ev, metaData = undefined) => {
|
|
420
|
+
await this.setFocus();
|
|
421
|
+
this.metaData = metaData;
|
|
422
|
+
this.nativeInput.click();
|
|
423
|
+
this.onUpload(ev, metaData);
|
|
424
|
+
ev.stopPropagation();
|
|
425
|
+
ev.preventDefault();
|
|
426
|
+
return;
|
|
240
427
|
};
|
|
428
|
+
//endregion
|
|
429
|
+
//region Eventlisteners for the XHR requests
|
|
241
430
|
/**
|
|
242
431
|
* Eventlisteners for the XHR requests
|
|
243
432
|
*/
|
|
@@ -247,6 +436,7 @@ export class DuetUpload {
|
|
|
247
436
|
};
|
|
248
437
|
this.transferDone = (xhr, name, status) => {
|
|
249
438
|
this.updateValueInMap(name, "status", status, false);
|
|
439
|
+
this.updateValueInMap(name, "uploaded", true, false);
|
|
250
440
|
try {
|
|
251
441
|
const response = JSON.parse(xhr.response);
|
|
252
442
|
this.updateValueInMap(name, "url", response.url);
|
|
@@ -260,12 +450,13 @@ export class DuetUpload {
|
|
|
260
450
|
this.transferDoneWithFailure = (xhr, name, status) => {
|
|
261
451
|
try {
|
|
262
452
|
const { error } = JSON.parse(xhr.response);
|
|
263
|
-
this.updateValueInMap(name, "error", { message: error.message, type: error.type });
|
|
453
|
+
this.updateValueInMap(name, "error", { message: error.message, type: error.type }, false);
|
|
264
454
|
}
|
|
265
455
|
catch (e) {
|
|
266
456
|
console.error("Server did not respond with expected response error:{message: string, type: int}");
|
|
267
|
-
this.updateValueInMap(name, "error", { type: status });
|
|
457
|
+
this.updateValueInMap(name, "error", { type: status }, false);
|
|
268
458
|
}
|
|
459
|
+
this.updateValueInMap(name, "valid", false, true);
|
|
269
460
|
};
|
|
270
461
|
this.transferFailed = name => {
|
|
271
462
|
this.updateValueInMap(name, "error", getError("duet-upload-001"));
|
|
@@ -296,15 +487,15 @@ export class DuetUpload {
|
|
|
296
487
|
this.files.delete(key);
|
|
297
488
|
this.validateTotals();
|
|
298
489
|
this.kick();
|
|
299
|
-
if (!this.external) {
|
|
300
|
-
this.makeXHRDeleteRequest(deletedItem);
|
|
301
|
-
}
|
|
302
|
-
this.resetFormFields();
|
|
303
490
|
this.duetDelete.emit({
|
|
304
491
|
originalEvent: ev,
|
|
305
492
|
data: { deletion: deletedItem },
|
|
306
493
|
component: "duet-upload",
|
|
307
494
|
});
|
|
495
|
+
if (!this.external) {
|
|
496
|
+
this.makeXHRDeleteRequest(deletedItem);
|
|
497
|
+
}
|
|
498
|
+
this.resetFormFields();
|
|
308
499
|
};
|
|
309
500
|
this.onCancel = (key, ev) => {
|
|
310
501
|
const cancelledItem = this.files.get(key);
|
|
@@ -323,9 +514,10 @@ export class DuetUpload {
|
|
|
323
514
|
component: "duet-upload",
|
|
324
515
|
});
|
|
325
516
|
};
|
|
326
|
-
this.onUpload = (ev) => {
|
|
517
|
+
this.onUpload = (ev, metaData) => {
|
|
327
518
|
this.duetUpload.emit({
|
|
328
519
|
originalEvent: ev,
|
|
520
|
+
metaData,
|
|
329
521
|
component: "duet-upload",
|
|
330
522
|
});
|
|
331
523
|
};
|
|
@@ -357,37 +549,26 @@ export class DuetUpload {
|
|
|
357
549
|
data: { files: this.files },
|
|
358
550
|
});
|
|
359
551
|
};
|
|
360
|
-
this.startUpload = async (ev) => {
|
|
361
|
-
await this.setFocus();
|
|
362
|
-
this.nativeInput.click();
|
|
363
|
-
this.onUpload(ev);
|
|
364
|
-
ev.stopPropagation();
|
|
365
|
-
ev.preventDefault();
|
|
366
|
-
};
|
|
367
552
|
}
|
|
368
553
|
watchValidHandler(newValue, oldValue) {
|
|
369
554
|
if (newValue !== oldValue) {
|
|
370
555
|
this.kick();
|
|
371
556
|
}
|
|
372
557
|
}
|
|
558
|
+
//endregion
|
|
373
559
|
/**
|
|
374
560
|
* Component lifecycle events.
|
|
375
561
|
*/
|
|
376
562
|
componentWillLoad() {
|
|
377
563
|
inheritGlobalTheme(this);
|
|
564
|
+
this.listenForActionEvents();
|
|
378
565
|
}
|
|
379
566
|
componentWillRender() {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
this.valid = invalid.length === 0 && valid.length !== 0;
|
|
383
|
-
if (this.valid !== oldValid) {
|
|
384
|
-
this.duetState.emit({
|
|
385
|
-
originalEvent: undefined,
|
|
386
|
-
data: { valid: this.valid, from: "componentWillRender" },
|
|
387
|
-
component: "duet-upload",
|
|
388
|
-
});
|
|
389
|
-
}
|
|
567
|
+
// listen to the events from the component
|
|
568
|
+
this.verifyValidity();
|
|
390
569
|
}
|
|
570
|
+
//endregion
|
|
571
|
+
//region XHR requests
|
|
391
572
|
/**
|
|
392
573
|
* XHR request utilities
|
|
393
574
|
*/
|
|
@@ -406,23 +587,37 @@ export class DuetUpload {
|
|
|
406
587
|
xhr.upload.addEventListener("abort", () => {
|
|
407
588
|
this.transferCanceled(name);
|
|
408
589
|
});
|
|
409
|
-
return makeXhrRequest({
|
|
590
|
+
return makeXhrRequest({
|
|
591
|
+
payload: { data, name },
|
|
592
|
+
options: { type: "POST", uri: this.uri, xhr, argument: null, headers: null },
|
|
593
|
+
onFailure: this.transferDoneWithFailure,
|
|
594
|
+
onSuccess: this.transferDone,
|
|
595
|
+
onProgress: this.trackProgress,
|
|
596
|
+
});
|
|
410
597
|
}
|
|
411
598
|
makeXHRDeleteRequest(data) {
|
|
412
599
|
const { uid, item } = data;
|
|
413
600
|
const xhr = new XMLHttpRequest();
|
|
414
601
|
// don't present server issues to user on deletes, just remove them from the visible list
|
|
415
|
-
return makeXhrRequest({
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
602
|
+
return makeXhrRequest({
|
|
603
|
+
payload: { data: null, name },
|
|
604
|
+
options: {
|
|
605
|
+
type: "DELETE",
|
|
606
|
+
xhr,
|
|
607
|
+
uri: this.uri,
|
|
608
|
+
arguments: `?key=${uid}&name=${item.name}`,
|
|
609
|
+
headers: {
|
|
610
|
+
"x-fileuid": uid,
|
|
611
|
+
"x-filename": item.name,
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
onFailure: this.transferDoneWithFailure,
|
|
615
|
+
onSuccess: this.transferDone,
|
|
616
|
+
onProgress: this.trackProgress,
|
|
617
|
+
});
|
|
425
618
|
}
|
|
619
|
+
//endregion
|
|
620
|
+
//region EventHandlers
|
|
426
621
|
/**
|
|
427
622
|
* Component event handling.
|
|
428
623
|
*/
|
|
@@ -431,7 +626,7 @@ export class DuetUpload {
|
|
|
431
626
|
const selectedFiles = Array.from((_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files);
|
|
432
627
|
// FileList is a nice array like structure but
|
|
433
628
|
// to ensure uniqueness of files we use a mapping structure and
|
|
434
|
-
// key to the name (makes it easier to delete)
|
|
629
|
+
// key to the name (makes it easier to delete as well)
|
|
435
630
|
if (selectedFiles) {
|
|
436
631
|
for (const item of selectedFiles) {
|
|
437
632
|
const { valid, errorMessage, errorType, errorSystem } = validateFile(item, {
|
|
@@ -444,6 +639,8 @@ export class DuetUpload {
|
|
|
444
639
|
uid,
|
|
445
640
|
item: item,
|
|
446
641
|
size: item.size,
|
|
642
|
+
meta: this.metaData,
|
|
643
|
+
uploaded: false,
|
|
447
644
|
valid,
|
|
448
645
|
error: {
|
|
449
646
|
type: valid ? undefined : errorType,
|
|
@@ -472,8 +669,14 @@ export class DuetUpload {
|
|
|
472
669
|
data.append("file", item);
|
|
473
670
|
data.append("uid", uid);
|
|
474
671
|
data.append("name", item.name);
|
|
475
|
-
data.append("metadata", JSON.stringify({ uid, url: this.uri, size: item.size }));
|
|
476
|
-
|
|
672
|
+
data.append("metadata", JSON.stringify({ uid, url: this.uri, size: item.size, meta: fileListItem.meta }));
|
|
673
|
+
try {
|
|
674
|
+
fileListItem.xhr = await this.makeXHRPostRequest(data);
|
|
675
|
+
}
|
|
676
|
+
catch (e) {
|
|
677
|
+
// in case one of the global maxes have been reached, invalidate the file
|
|
678
|
+
this.updateValueInMap(item.name, "valid", false, false);
|
|
679
|
+
}
|
|
477
680
|
}
|
|
478
681
|
// kick the stat to force update
|
|
479
682
|
this.kick();
|
|
@@ -481,12 +684,15 @@ export class DuetUpload {
|
|
|
481
684
|
}
|
|
482
685
|
// reset the form, so that a user may upload a file again (with the same name)
|
|
483
686
|
this.resetFormFields();
|
|
687
|
+
// reset the internal metaData state
|
|
688
|
+
this.metaData = undefined;
|
|
484
689
|
this.duetChange.emit({
|
|
485
690
|
originalEvent: ev,
|
|
486
691
|
data: { files: this.files },
|
|
487
692
|
component: "duet-upload",
|
|
488
693
|
});
|
|
489
694
|
}
|
|
695
|
+
//endregion
|
|
490
696
|
/**
|
|
491
697
|
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
492
698
|
* `input.focus()`.
|
|
@@ -497,6 +703,15 @@ export class DuetUpload {
|
|
|
497
703
|
}
|
|
498
704
|
return;
|
|
499
705
|
}
|
|
706
|
+
/**
|
|
707
|
+
* Method for invoking the upload sequence
|
|
708
|
+
*/
|
|
709
|
+
async upload(metaData = undefined) {
|
|
710
|
+
await this.setFocus();
|
|
711
|
+
this.metaData = metaData;
|
|
712
|
+
this.nativeInput.click();
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
500
715
|
/**
|
|
501
716
|
* Get list of files, divided in errors and valid sections
|
|
502
717
|
*/
|
|
@@ -506,6 +721,12 @@ export class DuetUpload {
|
|
|
506
721
|
}
|
|
507
722
|
return this.getFilesAsArray();
|
|
508
723
|
}
|
|
724
|
+
/**
|
|
725
|
+
* Convenience method for updating a of an item in the files attribute
|
|
726
|
+
*/
|
|
727
|
+
async updateValue(item, key, value) {
|
|
728
|
+
this.updateValueInMap(item, key, value);
|
|
729
|
+
}
|
|
509
730
|
/**
|
|
510
731
|
* render() function
|
|
511
732
|
* Always the last one in the class.
|
|
@@ -518,26 +739,26 @@ export class DuetUpload {
|
|
|
518
739
|
return (h(Host, { class: { "duet-m-0": this.margin === "none" } },
|
|
519
740
|
h("duet-fieldset", { label: this.label, caption: caption },
|
|
520
741
|
h("slot", { name: "header" }),
|
|
521
|
-
h("duet-label", { theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
|
|
742
|
+
!this.files.size && (h("duet-label", { theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
|
|
522
743
|
"duet-upload-filelist-empty": !this.files.size,
|
|
523
744
|
"duet-upload-filelist": true,
|
|
524
745
|
"duet-upload-filelist-filled": this.files.size,
|
|
525
|
-
}, id: this.labelId, for: identifier },
|
|
746
|
+
}, id: this.labelId, for: identifier }, this.fileListEmpty)),
|
|
526
747
|
!!this.files.size && h("slot", { name: "fileheader" }),
|
|
527
|
-
h(
|
|
528
|
-
|
|
748
|
+
!!this.files.size && (h("duet-upload-aria-status", { invalid: this.getFilesAsArray().invalid.length, valid: this.getFilesAsArray().valid.length, inprogress: this.filesInProgress.size, total: this.files.size, statusMessageLabel: this.statusMessageLabel })),
|
|
749
|
+
!!this.files.size && (h("duet-editable-table", { "aria-live": "polite", "aria-relevant": "removals", accessibleRole: "log", id: this.editableTableId, groups: this.groups, actions: this.actions, hideGroups: this.hideGroups, items: this.convertToDuetEditableTableItems() })),
|
|
529
750
|
!!this.files.size && h("slot", { name: "filefooter" }),
|
|
530
751
|
h("duet-spacer", { size: "large" }),
|
|
531
|
-
h("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle" }, this.buttonLabel),
|
|
752
|
+
!this.hideButton && (h("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle" }, this.buttonLabel)),
|
|
532
753
|
h("duet-spacer", { size: "medium" }),
|
|
533
754
|
(this.fileMaxReached || this.bytesMaxReached) && (h("duet-alert", null,
|
|
534
|
-
this.fileMaxReached &&
|
|
535
|
-
this.bytesMaxReached &&
|
|
755
|
+
this.fileMaxReached && getI18nError("duet-upload-301"),
|
|
756
|
+
this.bytesMaxReached && getI18nError("duet-upload-202"))),
|
|
536
757
|
h("duet-spacer", { size: "medium" }),
|
|
537
758
|
h("duet-visually-hidden", null,
|
|
538
759
|
h("input", { ref: input => {
|
|
539
760
|
this.nativeInput = input;
|
|
540
|
-
}, accept: this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
761
|
+
}, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
541
762
|
"duet-upload": true,
|
|
542
763
|
}, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, capture: "user" })))));
|
|
543
764
|
}
|
|
@@ -636,6 +857,47 @@ export class DuetUpload {
|
|
|
636
857
|
"reflect": false,
|
|
637
858
|
"defaultValue": "false"
|
|
638
859
|
},
|
|
860
|
+
"hideButton": {
|
|
861
|
+
"type": "boolean",
|
|
862
|
+
"mutable": false,
|
|
863
|
+
"complexType": {
|
|
864
|
+
"original": "boolean",
|
|
865
|
+
"resolved": "boolean",
|
|
866
|
+
"references": {}
|
|
867
|
+
},
|
|
868
|
+
"required": false,
|
|
869
|
+
"optional": false,
|
|
870
|
+
"docs": {
|
|
871
|
+
"tags": [],
|
|
872
|
+
"text": "If set the upload component will not display an upload button, you will have to create on yourself\nand call the exposed methods startUpload"
|
|
873
|
+
},
|
|
874
|
+
"attribute": "hide-upload-button",
|
|
875
|
+
"reflect": false,
|
|
876
|
+
"defaultValue": "false"
|
|
877
|
+
},
|
|
878
|
+
"actions": {
|
|
879
|
+
"type": "string",
|
|
880
|
+
"mutable": false,
|
|
881
|
+
"complexType": {
|
|
882
|
+
"original": "DuetEditableTableActions | string",
|
|
883
|
+
"resolved": "string | { icon: string; color: string; color_hover: string; id: string; map?: string[]; label?: DuetLangObject; }[]",
|
|
884
|
+
"references": {
|
|
885
|
+
"DuetEditableTableActions": {
|
|
886
|
+
"location": "import",
|
|
887
|
+
"path": "../duet-editable-table/duet-editable-table-item"
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
"required": false,
|
|
892
|
+
"optional": false,
|
|
893
|
+
"docs": {
|
|
894
|
+
"tags": [],
|
|
895
|
+
"text": "Default actions added to all files"
|
|
896
|
+
},
|
|
897
|
+
"attribute": "actions",
|
|
898
|
+
"reflect": false,
|
|
899
|
+
"defaultValue": "[\n {\n icon: \"action-delete\",\n color: \"color-danger\",\n color_hover: \"category-home\",\n id: \"delete\",\n map: [\"success\", \"failure\"],\n label: {\n fi: \"Poista tiedosto\",\n en: \"Poista tiedosto\",\n sv: \"Ta bort filen\",\n },\n },\n {\n icon: \"navigation-close\",\n color: \"primary\",\n color_hover: \"category-home\",\n id: \"cancel\",\n map: [\"inprogress\"],\n label: {\n fi: \"Keskeyt\u00E4 l\u00E4hetys\",\n en: \"Cancel the upload\",\n sv: \"Stop \u00F6verf\u00F6ringen\",\n },\n },\n ]"
|
|
900
|
+
},
|
|
639
901
|
"uri": {
|
|
640
902
|
"type": "string",
|
|
641
903
|
"mutable": false,
|
|
@@ -653,6 +915,24 @@ export class DuetUpload {
|
|
|
653
915
|
"attribute": "uri",
|
|
654
916
|
"reflect": false
|
|
655
917
|
},
|
|
918
|
+
"showLinks": {
|
|
919
|
+
"type": "boolean",
|
|
920
|
+
"mutable": false,
|
|
921
|
+
"complexType": {
|
|
922
|
+
"original": "boolean",
|
|
923
|
+
"resolved": "boolean",
|
|
924
|
+
"references": {}
|
|
925
|
+
},
|
|
926
|
+
"required": false,
|
|
927
|
+
"optional": false,
|
|
928
|
+
"docs": {
|
|
929
|
+
"tags": [],
|
|
930
|
+
"text": "If enabled the filelist will create links on successfully uploaded items,\nthis requires the server can respond with link URIs in the correct format"
|
|
931
|
+
},
|
|
932
|
+
"attribute": "show-links",
|
|
933
|
+
"reflect": false,
|
|
934
|
+
"defaultValue": "false"
|
|
935
|
+
},
|
|
656
936
|
"caption": {
|
|
657
937
|
"type": "string",
|
|
658
938
|
"mutable": false,
|
|
@@ -670,12 +950,12 @@ export class DuetUpload {
|
|
|
670
950
|
"attribute": "caption",
|
|
671
951
|
"reflect": false
|
|
672
952
|
},
|
|
673
|
-
"
|
|
674
|
-
"type": "
|
|
953
|
+
"statusLabelDefaults": {
|
|
954
|
+
"type": "string",
|
|
675
955
|
"mutable": false,
|
|
676
956
|
"complexType": {
|
|
677
|
-
"original": "DuetLangObject",
|
|
678
|
-
"resolved": "DuetLangObject",
|
|
957
|
+
"original": "DuetLangObject | string",
|
|
958
|
+
"resolved": "DuetLangObject | string",
|
|
679
959
|
"references": {
|
|
680
960
|
"DuetLangObject": {
|
|
681
961
|
"location": "import",
|
|
@@ -685,10 +965,62 @@ export class DuetUpload {
|
|
|
685
965
|
},
|
|
686
966
|
"required": false,
|
|
687
967
|
"optional": false,
|
|
968
|
+
"docs": {
|
|
969
|
+
"tags": [{
|
|
970
|
+
"name": "default",
|
|
971
|
+
"text": "{\nfi: \"Lis\u00E4\u00E4 liite\",\nsv: \"L\u00E4gg till en bilaga\",\nen: \"Choose files\",\n}"
|
|
972
|
+
}],
|
|
973
|
+
"text": "Property to change the aria upload progress text read aloud by screenreaders"
|
|
974
|
+
},
|
|
975
|
+
"attribute": "status-label-default",
|
|
976
|
+
"reflect": false,
|
|
977
|
+
"defaultValue": "{\n fi: {\n inProgress: \"L\u00E4hetet\u00E4\u00E4n {filesUploaded} l\u00E4hetett\u00E4v\u00E4st\u00E4 {filesTotal} tiedostosta\",\n inProgressWithErrors:\n \"L\u00E4hetet\u00E4\u00E4n {filesInProgress} tiedostoa, l\u00E4hetetty {filesUploaded} l\u00E4hetett\u00E4v\u00E4st\u00E4 {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheit\u00E4\",\n done: \"Kaikki {filesTotal} tiedostoa l\u00E4hetetty onnistuneesti\",\n doneWithErrors:\n \"L\u00E4hetys valmis, {filesUploaded} tiedostoa on l\u00E4hetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheit\u00E4\",\n files: \"tiedostot\",\n file: \"tiedosto\",\n },\n sv: {\n inProgress: \"Adding {filesUploaded} of {filesTotal}\",\n inProgressWithErrors:\n \"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades\",\n done: \"Alla {filesTotal} har lagts till\",\n doneWithErrors: \"Handling slutf\u00F6rd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades\",\n files: \"filer\",\n file: \"fil\",\n },\n en: {\n inProgress: \"Adding {filesUploaded} of {filesTotal}\",\n inProgressWithErrors:\n \"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed\",\n done: \"All {filesTotal} added successfully\",\n doneWithErrors: \"Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors\",\n files: \"tiedostoa\",\n file: \"tiedosto\",\n },\n }"
|
|
978
|
+
},
|
|
979
|
+
"statusMessageLabel": {
|
|
980
|
+
"type": "unknown",
|
|
981
|
+
"mutable": false,
|
|
982
|
+
"complexType": {
|
|
983
|
+
"original": "StatusMessage",
|
|
984
|
+
"resolved": "{ inProgress: string; inProgressWithErrors: string; done: string; doneWithErrors: string; file: string; files: string; }",
|
|
985
|
+
"references": {
|
|
986
|
+
"StatusMessage": {
|
|
987
|
+
"location": "import",
|
|
988
|
+
"path": "./duet-upload-aria-status"
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
"required": false,
|
|
993
|
+
"optional": false,
|
|
688
994
|
"docs": {
|
|
689
995
|
"tags": [],
|
|
996
|
+
"text": "Strings used for the status aria-label"
|
|
997
|
+
},
|
|
998
|
+
"defaultValue": "getLocaleString(this.statusLabelDefaults)"
|
|
999
|
+
},
|
|
1000
|
+
"buttonLabelDefaults": {
|
|
1001
|
+
"type": "string",
|
|
1002
|
+
"mutable": false,
|
|
1003
|
+
"complexType": {
|
|
1004
|
+
"original": "DuetLangObject | string",
|
|
1005
|
+
"resolved": "DuetLangObject | string",
|
|
1006
|
+
"references": {
|
|
1007
|
+
"DuetLangObject": {
|
|
1008
|
+
"location": "import",
|
|
1009
|
+
"path": "../../utils/language-utils"
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
"required": false,
|
|
1014
|
+
"optional": false,
|
|
1015
|
+
"docs": {
|
|
1016
|
+
"tags": [{
|
|
1017
|
+
"name": "default",
|
|
1018
|
+
"text": "{\nfi: \"Lis\u00E4\u00E4 liite\",\nsv: \"L\u00E4gg till en bilaga\",\nen: \"Add an attachment\",\n}"
|
|
1019
|
+
}],
|
|
690
1020
|
"text": "Property to change descriptionDefaults defaults on the component.\nnormally you would handle these strings on an application level and override @label when needed"
|
|
691
1021
|
},
|
|
1022
|
+
"attribute": "button-label-default",
|
|
1023
|
+
"reflect": false,
|
|
692
1024
|
"defaultValue": "{\n fi: \"Lis\u00E4\u00E4 liite\",\n sv: \"L\u00E4gg till en bilaga\",\n en: \"Add an attachment\",\n }"
|
|
693
1025
|
},
|
|
694
1026
|
"buttonLabel": {
|
|
@@ -703,8 +1035,8 @@ export class DuetUpload {
|
|
|
703
1035
|
"optional": false,
|
|
704
1036
|
"docs": {
|
|
705
1037
|
"tags": [{
|
|
706
|
-
"
|
|
707
|
-
"
|
|
1038
|
+
"name": "default",
|
|
1039
|
+
"text": "{ fi: \"Lis\u00E4\u00E4 liite\", sv: \"L\u00E4gg till en bilaga\", en: \"Add an attachment\" }"
|
|
708
1040
|
}],
|
|
709
1041
|
"text": "Label of button"
|
|
710
1042
|
},
|
|
@@ -829,6 +1161,52 @@ export class DuetUpload {
|
|
|
829
1161
|
"reflect": false,
|
|
830
1162
|
"defaultValue": "false"
|
|
831
1163
|
},
|
|
1164
|
+
"groups": {
|
|
1165
|
+
"type": "string",
|
|
1166
|
+
"mutable": false,
|
|
1167
|
+
"complexType": {
|
|
1168
|
+
"original": "DuetEditableTableGroupNames | string",
|
|
1169
|
+
"resolved": "string | { id: string; label: DuetLangObject; actionLabel?: DuetLangObject; }[]",
|
|
1170
|
+
"references": {
|
|
1171
|
+
"DuetEditableTableGroupNames": {
|
|
1172
|
+
"location": "import",
|
|
1173
|
+
"path": "../duet-editable-table/duet-editable-table"
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
},
|
|
1177
|
+
"required": false,
|
|
1178
|
+
"optional": false,
|
|
1179
|
+
"docs": {
|
|
1180
|
+
"tags": [{
|
|
1181
|
+
"name": "required",
|
|
1182
|
+
"text": undefined
|
|
1183
|
+
}, {
|
|
1184
|
+
"name": "example",
|
|
1185
|
+
"text": "[{ id: \"success\", label: {fi: \"Onnistunut\", en: \"Success\", sv: \"Alt klart\", }}]"
|
|
1186
|
+
}],
|
|
1187
|
+
"text": "Array of group names that you want the editable table used to display files to display"
|
|
1188
|
+
},
|
|
1189
|
+
"attribute": "groups",
|
|
1190
|
+
"reflect": false
|
|
1191
|
+
},
|
|
1192
|
+
"hideGroups": {
|
|
1193
|
+
"type": "boolean",
|
|
1194
|
+
"mutable": false,
|
|
1195
|
+
"complexType": {
|
|
1196
|
+
"original": "boolean",
|
|
1197
|
+
"resolved": "boolean",
|
|
1198
|
+
"references": {}
|
|
1199
|
+
},
|
|
1200
|
+
"required": false,
|
|
1201
|
+
"optional": false,
|
|
1202
|
+
"docs": {
|
|
1203
|
+
"tags": [],
|
|
1204
|
+
"text": "Visually hides the groups labels in the editable table list used to display the list of files"
|
|
1205
|
+
},
|
|
1206
|
+
"attribute": "hide-table-labels",
|
|
1207
|
+
"reflect": false,
|
|
1208
|
+
"defaultValue": "false"
|
|
1209
|
+
},
|
|
832
1210
|
"files": {
|
|
833
1211
|
"type": "unknown",
|
|
834
1212
|
"mutable": true,
|
|
@@ -868,11 +1246,11 @@ export class DuetUpload {
|
|
|
868
1246
|
"defaultValue": "!this.required"
|
|
869
1247
|
},
|
|
870
1248
|
"labelDefaults": {
|
|
871
|
-
"type": "
|
|
1249
|
+
"type": "string",
|
|
872
1250
|
"mutable": false,
|
|
873
1251
|
"complexType": {
|
|
874
|
-
"original": "DuetLangObject",
|
|
875
|
-
"resolved": "DuetLangObject",
|
|
1252
|
+
"original": "DuetLangObject | string",
|
|
1253
|
+
"resolved": "DuetLangObject | string",
|
|
876
1254
|
"references": {
|
|
877
1255
|
"DuetLangObject": {
|
|
878
1256
|
"location": "import",
|
|
@@ -883,9 +1261,14 @@ export class DuetUpload {
|
|
|
883
1261
|
"required": false,
|
|
884
1262
|
"optional": false,
|
|
885
1263
|
"docs": {
|
|
886
|
-
"tags": [
|
|
1264
|
+
"tags": [{
|
|
1265
|
+
"name": "default",
|
|
1266
|
+
"text": "{ fi: \"Lis\u00E4\u00E4 liite\",sv: \"L\u00E4gg till en bilaga\",en: \"Add attachments\"}"
|
|
1267
|
+
}],
|
|
887
1268
|
"text": "Property to change labelDefaults defaults on the component.\nnormally you would handle these strings on an application level and override @label when needed"
|
|
888
1269
|
},
|
|
1270
|
+
"attribute": "label-default",
|
|
1271
|
+
"reflect": false,
|
|
889
1272
|
"defaultValue": "{\n fi: \"Lis\u00E4\u00E4 liite\",\n sv: \"L\u00E4gg till en bilaga\",\n en: \"Add attachments\",\n }"
|
|
890
1273
|
},
|
|
891
1274
|
"label": {
|
|
@@ -900,8 +1283,8 @@ export class DuetUpload {
|
|
|
900
1283
|
"optional": false,
|
|
901
1284
|
"docs": {
|
|
902
1285
|
"tags": [{
|
|
903
|
-
"
|
|
904
|
-
"
|
|
1286
|
+
"name": "default",
|
|
1287
|
+
"text": "{ fi: \"Lis\u00E4\u00E4 liite\",sv: \"L\u00E4gg till en bilaga\",en: \"Add attachments\"}"
|
|
905
1288
|
}],
|
|
906
1289
|
"text": "Label for the input."
|
|
907
1290
|
},
|
|
@@ -910,11 +1293,11 @@ export class DuetUpload {
|
|
|
910
1293
|
"defaultValue": "getLocaleString(this.labelDefaults)"
|
|
911
1294
|
},
|
|
912
1295
|
"descriptionDefaults": {
|
|
913
|
-
"type": "
|
|
1296
|
+
"type": "string",
|
|
914
1297
|
"mutable": false,
|
|
915
1298
|
"complexType": {
|
|
916
|
-
"original": "DuetLangObject",
|
|
917
|
-
"resolved": "DuetLangObject",
|
|
1299
|
+
"original": "DuetLangObject | string",
|
|
1300
|
+
"resolved": "DuetLangObject | string",
|
|
918
1301
|
"references": {
|
|
919
1302
|
"DuetLangObject": {
|
|
920
1303
|
"location": "import",
|
|
@@ -925,9 +1308,14 @@ export class DuetUpload {
|
|
|
925
1308
|
"required": false,
|
|
926
1309
|
"optional": false,
|
|
927
1310
|
"docs": {
|
|
928
|
-
"tags": [
|
|
1311
|
+
"tags": [{
|
|
1312
|
+
"name": "default",
|
|
1313
|
+
"text": "{\nfi: \"Voit liitt\u00E4\u00E4 {filetypes}-muotoisia tiedostoja sek\u00E4 yleisimpi\u00E4 videotiedostoja. Voit l\u00E4hett\u00E4\u00E4 {maxbytes} verran tiedostoja yhdell\u00E4 kertaa, ja lis\u00E4t\u00E4 enint\u00E4\u00E4n {maxfiles} liitett\u00E4 kerrallaan.\",\nsv: \"Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer \u00E5t g\u00E5ngen och l\u00E4gga till upp till {maxfiles} bilagor \u00E5t g\u00E5ngen.\",\nen: \"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time.\",\n}"
|
|
1314
|
+
}],
|
|
929
1315
|
"text": "Property to change descriptionDefaults defaults on the component.\nnormally you would handle these strings on an application level and override @label when needed"
|
|
930
1316
|
},
|
|
1317
|
+
"attribute": "description-default",
|
|
1318
|
+
"reflect": false,
|
|
931
1319
|
"defaultValue": "{\n fi: \"Voit liitt\u00E4\u00E4 {filetypes}-muotoisia tiedostoja sek\u00E4 yleisimpi\u00E4 videotiedostoja. Voit l\u00E4hett\u00E4\u00E4 {maxbytes} verran tiedostoja yhdell\u00E4 kertaa, ja lis\u00E4t\u00E4 enint\u00E4\u00E4n {maxfiles} liitett\u00E4 kerrallaan.\",\n sv: \"Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer \u00E5t g\u00E5ngen och l\u00E4gga till upp till {maxfiles} bilagor \u00E5t g\u00E5ngen.\",\n 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.\",\n }"
|
|
932
1320
|
},
|
|
933
1321
|
"description": {
|
|
@@ -942,8 +1330,8 @@ export class DuetUpload {
|
|
|
942
1330
|
"optional": false,
|
|
943
1331
|
"docs": {
|
|
944
1332
|
"tags": [{
|
|
945
|
-
"
|
|
946
|
-
"
|
|
1333
|
+
"name": "default",
|
|
1334
|
+
"text": "{\nfi: \"Voit liitt\u00E4\u00E4 {filetypes}-muotoisia tiedostoja sek\u00E4 yleisimpi\u00E4 videotiedostoja. Voit l\u00E4hett\u00E4\u00E4 {maxbytes} verran tiedostoja yhdell\u00E4 kertaa, ja lis\u00E4t\u00E4 enint\u00E4\u00E4n {maxfiles} liitett\u00E4 kerrallaan.\",\nsv: \"Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer \u00E5t g\u00E5ngen och l\u00E4gga till upp till {maxfiles} bilagor \u00E5t g\u00E5ngen.\",\nen: \"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time.\",\n}"
|
|
947
1335
|
}],
|
|
948
1336
|
"text": "Description for the upload component."
|
|
949
1337
|
},
|
|
@@ -952,11 +1340,11 @@ export class DuetUpload {
|
|
|
952
1340
|
"defaultValue": "getLocaleString(this.descriptionDefaults)"
|
|
953
1341
|
},
|
|
954
1342
|
"fileListEmptyDefaults": {
|
|
955
|
-
"type": "
|
|
1343
|
+
"type": "string",
|
|
956
1344
|
"mutable": false,
|
|
957
1345
|
"complexType": {
|
|
958
|
-
"original": "DuetLangObject",
|
|
959
|
-
"resolved": "DuetLangObject",
|
|
1346
|
+
"original": "DuetLangObject | string",
|
|
1347
|
+
"resolved": "DuetLangObject | string",
|
|
960
1348
|
"references": {
|
|
961
1349
|
"DuetLangObject": {
|
|
962
1350
|
"location": "import",
|
|
@@ -968,11 +1356,13 @@ export class DuetUpload {
|
|
|
968
1356
|
"optional": false,
|
|
969
1357
|
"docs": {
|
|
970
1358
|
"tags": [{
|
|
971
|
-
"
|
|
972
|
-
"
|
|
1359
|
+
"name": "default",
|
|
1360
|
+
"text": "{\nfi: \"Ei viel\u00E4 lis\u00E4ttyj\u00E4 tiedostoja.\",\nsv: \"Inga filer har lagts till \u00E4nnu.\",\nen: \"No files added yet.\",\n}"
|
|
973
1361
|
}],
|
|
974
1362
|
"text": "Defaults for the filelist's empty state."
|
|
975
1363
|
},
|
|
1364
|
+
"attribute": "list-empty-default",
|
|
1365
|
+
"reflect": false,
|
|
976
1366
|
"defaultValue": "{\n fi: \"Ei viel\u00E4 lis\u00E4ttyj\u00E4 tiedostoja.\",\n sv: \"Inga filer har lagts till \u00E4nnu.\",\n en: \"No files added yet.\",\n }"
|
|
977
1367
|
},
|
|
978
1368
|
"fileListEmpty": {
|
|
@@ -987,8 +1377,8 @@ export class DuetUpload {
|
|
|
987
1377
|
"optional": false,
|
|
988
1378
|
"docs": {
|
|
989
1379
|
"tags": [{
|
|
990
|
-
"
|
|
991
|
-
"
|
|
1380
|
+
"name": "default",
|
|
1381
|
+
"text": "{ fi: \"Ei viel\u00E4 lis\u00E4ttyj\u00E4 tiedostoja.\",sv: \"Inga filer har lagts till \u00E4nnu.\",en: \"No files added yet.\"}"
|
|
992
1382
|
}],
|
|
993
1383
|
"text": "Label for the filelist's empty state."
|
|
994
1384
|
},
|
|
@@ -1014,24 +1404,6 @@ export class DuetUpload {
|
|
|
1014
1404
|
"reflect": false,
|
|
1015
1405
|
"defaultValue": "\"\""
|
|
1016
1406
|
},
|
|
1017
|
-
"labelHidden": {
|
|
1018
|
-
"type": "boolean",
|
|
1019
|
-
"mutable": false,
|
|
1020
|
-
"complexType": {
|
|
1021
|
-
"original": "boolean",
|
|
1022
|
-
"resolved": "boolean",
|
|
1023
|
-
"references": {}
|
|
1024
|
-
},
|
|
1025
|
-
"required": false,
|
|
1026
|
-
"optional": false,
|
|
1027
|
-
"docs": {
|
|
1028
|
-
"tags": [],
|
|
1029
|
-
"text": "Visually hide the label, but still show it to screen readers."
|
|
1030
|
-
},
|
|
1031
|
-
"attribute": "label-hidden",
|
|
1032
|
-
"reflect": false,
|
|
1033
|
-
"defaultValue": "false"
|
|
1034
|
-
},
|
|
1035
1407
|
"name": {
|
|
1036
1408
|
"type": "string",
|
|
1037
1409
|
"mutable": false,
|
|
@@ -1049,24 +1421,6 @@ export class DuetUpload {
|
|
|
1049
1421
|
"attribute": "name",
|
|
1050
1422
|
"reflect": false
|
|
1051
1423
|
},
|
|
1052
|
-
"capture": {
|
|
1053
|
-
"type": "any",
|
|
1054
|
-
"mutable": false,
|
|
1055
|
-
"complexType": {
|
|
1056
|
-
"original": "string | boolean",
|
|
1057
|
-
"resolved": "boolean | string",
|
|
1058
|
-
"references": {}
|
|
1059
|
-
},
|
|
1060
|
-
"required": false,
|
|
1061
|
-
"optional": false,
|
|
1062
|
-
"docs": {
|
|
1063
|
-
"tags": [],
|
|
1064
|
-
"text": "if set, allows capture of media from user camera / microphone\nThe capture attribute value is a string that specifies which camera to use for capture\nof image or video data, if the accept attribute indicates that the input should be of\none of those types. A value of user indicates that the user-facing camera and/or\nmicrophone should be used. A value of environment specifies that the outward-facing\ncamera and/or microphone should be used. If this attribute is missing, the user agent\nis free to decide on its own what to do. If the requested facing mode isn't available,\nthe user agent may fall back to its preferred default mode."
|
|
1065
|
-
},
|
|
1066
|
-
"attribute": "capture",
|
|
1067
|
-
"reflect": false,
|
|
1068
|
-
"defaultValue": "undefined"
|
|
1069
|
-
},
|
|
1070
1424
|
"maxBytes": {
|
|
1071
1425
|
"type": "number",
|
|
1072
1426
|
"mutable": false,
|
|
@@ -1133,8 +1487,8 @@ export class DuetUpload {
|
|
|
1133
1487
|
"optional": false,
|
|
1134
1488
|
"docs": {
|
|
1135
1489
|
"tags": [{
|
|
1136
|
-
"
|
|
1137
|
-
"
|
|
1490
|
+
"name": "example",
|
|
1491
|
+
"text": ": .pdf,.doc,.docx"
|
|
1138
1492
|
}],
|
|
1139
1493
|
"text": "A string of commaseperated file type values that are allowed"
|
|
1140
1494
|
},
|
|
@@ -1154,8 +1508,8 @@ export class DuetUpload {
|
|
|
1154
1508
|
"optional": false,
|
|
1155
1509
|
"docs": {
|
|
1156
1510
|
"tags": [{
|
|
1157
|
-
"
|
|
1158
|
-
"
|
|
1511
|
+
"name": "example",
|
|
1512
|
+
"text": ": image/*,application/msword,"
|
|
1159
1513
|
}],
|
|
1160
1514
|
"text": "A string of commaseperated mime type values that are allowed"
|
|
1161
1515
|
},
|
|
@@ -1232,7 +1586,7 @@ export class DuetUpload {
|
|
|
1232
1586
|
},
|
|
1233
1587
|
"complexType": {
|
|
1234
1588
|
"original": "DuetUploadEvent",
|
|
1235
|
-
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1589
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1236
1590
|
"references": {
|
|
1237
1591
|
"DuetUploadEvent": {
|
|
1238
1592
|
"location": "local"
|
|
@@ -1251,7 +1605,7 @@ export class DuetUpload {
|
|
|
1251
1605
|
},
|
|
1252
1606
|
"complexType": {
|
|
1253
1607
|
"original": "DuetUploadEvent",
|
|
1254
|
-
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1608
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1255
1609
|
"references": {
|
|
1256
1610
|
"DuetUploadEvent": {
|
|
1257
1611
|
"location": "local"
|
|
@@ -1270,7 +1624,7 @@ export class DuetUpload {
|
|
|
1270
1624
|
},
|
|
1271
1625
|
"complexType": {
|
|
1272
1626
|
"original": "DuetUploadEvent",
|
|
1273
|
-
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1627
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1274
1628
|
"references": {
|
|
1275
1629
|
"DuetUploadEvent": {
|
|
1276
1630
|
"location": "local"
|
|
@@ -1289,7 +1643,7 @@ export class DuetUpload {
|
|
|
1289
1643
|
},
|
|
1290
1644
|
"complexType": {
|
|
1291
1645
|
"original": "DuetUploadEvent",
|
|
1292
|
-
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1646
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1293
1647
|
"references": {
|
|
1294
1648
|
"DuetUploadEvent": {
|
|
1295
1649
|
"location": "local"
|
|
@@ -1308,7 +1662,7 @@ export class DuetUpload {
|
|
|
1308
1662
|
},
|
|
1309
1663
|
"complexType": {
|
|
1310
1664
|
"original": "DuetUploadEvent",
|
|
1311
|
-
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1665
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1312
1666
|
"references": {
|
|
1313
1667
|
"DuetUploadEvent": {
|
|
1314
1668
|
"location": "local"
|
|
@@ -1327,7 +1681,7 @@ export class DuetUpload {
|
|
|
1327
1681
|
},
|
|
1328
1682
|
"complexType": {
|
|
1329
1683
|
"original": "DuetUploadEvent",
|
|
1330
|
-
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1684
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1331
1685
|
"references": {
|
|
1332
1686
|
"DuetUploadEvent": {
|
|
1333
1687
|
"location": "local"
|
|
@@ -1346,7 +1700,7 @@ export class DuetUpload {
|
|
|
1346
1700
|
},
|
|
1347
1701
|
"complexType": {
|
|
1348
1702
|
"original": "DuetUploadEvent",
|
|
1349
|
-
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1703
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1350
1704
|
"references": {
|
|
1351
1705
|
"DuetUploadEvent": {
|
|
1352
1706
|
"location": "local"
|
|
@@ -1365,7 +1719,7 @@ export class DuetUpload {
|
|
|
1365
1719
|
},
|
|
1366
1720
|
"complexType": {
|
|
1367
1721
|
"original": "DuetUploadEvent",
|
|
1368
|
-
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1722
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1369
1723
|
"references": {
|
|
1370
1724
|
"DuetUploadEvent": {
|
|
1371
1725
|
"location": "local"
|
|
@@ -1384,7 +1738,7 @@ export class DuetUpload {
|
|
|
1384
1738
|
},
|
|
1385
1739
|
"complexType": {
|
|
1386
1740
|
"original": "DuetUploadEvent",
|
|
1387
|
-
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1741
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1388
1742
|
"references": {
|
|
1389
1743
|
"DuetUploadEvent": {
|
|
1390
1744
|
"location": "local"
|
|
@@ -1415,6 +1769,25 @@ export class DuetUpload {
|
|
|
1415
1769
|
"tags": []
|
|
1416
1770
|
}
|
|
1417
1771
|
},
|
|
1772
|
+
"upload": {
|
|
1773
|
+
"complexType": {
|
|
1774
|
+
"signature": "(metaData?: any | undefined) => Promise<void>",
|
|
1775
|
+
"parameters": [{
|
|
1776
|
+
"tags": [],
|
|
1777
|
+
"text": ""
|
|
1778
|
+
}],
|
|
1779
|
+
"references": {
|
|
1780
|
+
"Promise": {
|
|
1781
|
+
"location": "global"
|
|
1782
|
+
}
|
|
1783
|
+
},
|
|
1784
|
+
"return": "Promise<void>"
|
|
1785
|
+
},
|
|
1786
|
+
"docs": {
|
|
1787
|
+
"text": "Method for invoking the upload sequence",
|
|
1788
|
+
"tags": []
|
|
1789
|
+
}
|
|
1790
|
+
},
|
|
1418
1791
|
"getFiles": {
|
|
1419
1792
|
"complexType": {
|
|
1420
1793
|
"signature": "() => Promise<false | { valid: any[]; invalid: any[]; }>",
|
|
@@ -1430,6 +1803,31 @@ export class DuetUpload {
|
|
|
1430
1803
|
"text": "Get list of files, divided in errors and valid sections",
|
|
1431
1804
|
"tags": []
|
|
1432
1805
|
}
|
|
1806
|
+
},
|
|
1807
|
+
"updateValue": {
|
|
1808
|
+
"complexType": {
|
|
1809
|
+
"signature": "(item: string, key: string, value: any) => Promise<void>",
|
|
1810
|
+
"parameters": [{
|
|
1811
|
+
"tags": [],
|
|
1812
|
+
"text": ""
|
|
1813
|
+
}, {
|
|
1814
|
+
"tags": [],
|
|
1815
|
+
"text": ""
|
|
1816
|
+
}, {
|
|
1817
|
+
"tags": [],
|
|
1818
|
+
"text": ""
|
|
1819
|
+
}],
|
|
1820
|
+
"references": {
|
|
1821
|
+
"Promise": {
|
|
1822
|
+
"location": "global"
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
"return": "Promise<void>"
|
|
1826
|
+
},
|
|
1827
|
+
"docs": {
|
|
1828
|
+
"text": "Convenience method for updating a of an item in the files attribute",
|
|
1829
|
+
"tags": []
|
|
1830
|
+
}
|
|
1433
1831
|
}
|
|
1434
1832
|
}; }
|
|
1435
1833
|
static get elementRef() { return "element"; }
|