@duetds/components 4.32.0 → 4.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hydrate/index.js +1933 -87
- package/lib/cjs/{dom-a28e5c5f.js → dom-c850c8d7.js} +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +2 -2
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-caption_4.cjs.entry.js +17 -10
- package/lib/cjs/duet-card.cjs.entry.js +3 -3
- package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
- package/lib/cjs/duet-choice_2.cjs.entry.js +40 -18
- package/lib/cjs/duet-collapsible.cjs.entry.js +4 -1
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +7 -7
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table-button_3.cjs.entry.js +232 -0
- package/lib/cjs/{duet-table.cjs.entry.js → duet-editable-table_3.cjs.entry.js} +206 -2
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +2 -2
- package/lib/cjs/duet-grid_2.cjs.entry.js +52 -4
- package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-hero.cjs.entry.js +2 -2
- package/lib/cjs/duet-icon.cjs.entry.js +4 -4
- package/lib/cjs/duet-input_2.cjs.entry.js +6 -6
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-modal.cjs.entry.js +3 -3
- package/lib/cjs/duet-notification_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-number-input.cjs.entry.js +2 -2
- package/lib/cjs/duet-progress.cjs.entry.js +75 -0
- package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
- package/lib/cjs/duet-select.cjs.entry.js +5 -5
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-tab_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-textarea.cjs.entry.js +5 -5
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +2 -2
- package/lib/cjs/duet-tray.cjs.entry.js +3 -3
- package/lib/cjs/duet-upload.cjs.entry.js +1089 -0
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +4 -4
- package/lib/cjs/{focus-utils-55b5a616.js → focus-utils-a7a1fb8b.js} +1 -1
- package/lib/cjs/{index-03ed1f55.js → index-b724d698.js} +5 -2
- package/lib/cjs/js-utils-33a9dbe3.js +16 -0
- package/lib/cjs/{language-utils-48b8860b.js → language-utils-aa282901.js} +6 -2
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{shadow-css-6560c90c.js → shadow-css-e3edeed1.js} +9 -10
- package/lib/cjs/{token-utils-13e5d13e.js → token-utils-63a9c8dc.js} +1 -1
- package/lib/cjs/{tokens.module-53b3bd92.js → tokens.module-6b2df1c2.js} +2 -0
- package/lib/cjs/{watch-options-3877c082.js → watch-options-d88afac0.js} +29 -6
- package/lib/collection/collection-manifest.json +15 -2
- package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
- package/lib/collection/components/duet-choice/duet-choice.js +95 -21
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +9 -9
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +32 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +218 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +36 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +203 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +13 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table.css +16 -0
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +348 -0
- package/lib/collection/components/duet-grid/duet-grid.js +57 -6
- package/lib/collection/components/duet-heading/duet-heading.css +3 -0
- package/lib/collection/components/duet-heading/duet-heading.js +7 -6
- package/lib/collection/components/duet-icon/duet-icon.js +2 -6
- package/lib/collection/components/duet-input/duet-input.css +15 -0
- package/lib/collection/components/duet-input/duet-input.js +4 -4
- package/lib/collection/components/duet-paragraph/duet-paragraph.css +6 -0
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +34 -3
- package/lib/collection/components/duet-progress/duet-progress.css +103 -0
- package/lib/collection/components/duet-progress/duet-progress.js +240 -0
- package/lib/collection/components/duet-select/duet-select.css +15 -0
- package/lib/collection/components/duet-select/duet-select.js +3 -3
- package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -2
- package/lib/collection/components/duet-textarea/duet-textarea.css +19 -0
- package/lib/collection/components/duet-textarea/duet-textarea.js +5 -4
- package/lib/collection/components/duet-upload/duet-upload-aria-status.js +217 -0
- package/lib/collection/components/duet-upload/duet-upload-editable-item-error.js +16 -0
- package/lib/collection/components/duet-upload/duet-upload-editable-item-inprogres.js +8 -0
- package/lib/collection/components/duet-upload/duet-upload-editable-item-success.js +30 -0
- package/lib/collection/components/duet-upload/duet-upload-validators.js +93 -0
- package/lib/collection/components/duet-upload/duet-upload.css +64 -0
- package/lib/collection/components/duet-upload/duet-upload.js +1838 -0
- package/lib/collection/components/duet-upload/errorcodes.utils.js +32 -0
- package/lib/collection/components/duet-upload/mock.helpers.js +91 -0
- package/lib/collection/components/duet-upload/upload.helpers.js +13 -0
- package/lib/collection/components/duet-upload/xhr.helpers.js +30 -0
- package/lib/collection/utils/js-utils.js +12 -0
- package/lib/collection/utils/language-utils.js +6 -3
- package/lib/collection/utils/watch-options.js +35 -6
- package/lib/custom-elements-bundle/index.d.ts +36 -0
- package/lib/custom-elements-bundle/index.js +1917 -277
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-1391ec53.entry.js → p-00735436.entry.js} +1 -1
- package/lib/duet/p-060d79be.entry.js +4 -0
- package/lib/duet/p-0d22396e.system.js +16 -0
- package/lib/duet/p-10deead0.system.js +4 -0
- package/lib/duet/{p-72fd384a.entry.js → p-1208c84f.entry.js} +1 -1
- package/lib/duet/p-12721178.js +4 -0
- package/lib/duet/p-155ef581.system.entry.js +4 -0
- package/lib/duet/{p-08729381.entry.js → p-16c48c5d.entry.js} +1 -1
- package/lib/duet/p-1797df7b.system.entry.js +4 -0
- package/lib/duet/p-1a08fc22.system.entry.js +4 -0
- package/lib/duet/{p-b6a0caf8.system.entry.js → p-237e47b4.system.entry.js} +1 -1
- package/lib/duet/{p-4fcbcecd.system.entry.js → p-2443bdca.system.entry.js} +1 -1
- package/lib/duet/{p-432ba72e.system.entry.js → p-263bc9cd.system.entry.js} +1 -1
- package/lib/duet/p-2764f081.js +4 -0
- package/lib/duet/{p-b0bbbdba.system.entry.js → p-27d80cef.system.entry.js} +1 -1
- package/lib/duet/p-28e02c08.entry.js +4 -0
- package/lib/duet/{p-8740fa38.entry.js → p-2bb1460c.entry.js} +1 -1
- package/lib/duet/p-33c58756.entry.js +4 -0
- package/lib/duet/{p-9cdd361e.js → p-35a3794e.js} +0 -0
- package/lib/duet/{p-8c511832.system.entry.js → p-374fb7e6.system.entry.js} +1 -1
- package/lib/duet/{p-5a817929.system.entry.js → p-387823af.system.entry.js} +1 -1
- package/lib/duet/{p-a678da8c.entry.js → p-3af5d66f.entry.js} +1 -1
- package/lib/duet/{p-322d1c38.js → p-3c1971d8.js} +1 -1
- package/lib/duet/{p-d13874cb.entry.js → p-4607af59.entry.js} +1 -1
- package/lib/duet/{p-2c0dd9ba.system.entry.js → p-48d1eb1f.system.entry.js} +1 -1
- package/lib/duet/p-4a87e9ab.system.entry.js +4 -0
- package/lib/duet/{p-92103298.system.entry.js → p-4b6ebe40.system.entry.js} +1 -1
- package/lib/duet/{p-6cf41bfe.system.entry.js → p-4e28da18.system.entry.js} +1 -1
- package/lib/duet/p-548d484e.js +4 -0
- package/lib/duet/{p-2c679963.entry.js → p-5826523b.entry.js} +1 -1
- package/lib/duet/{p-7331f2fe.system.entry.js → p-58750bae.system.entry.js} +1 -1
- package/lib/duet/{p-7a868085.entry.js → p-597d99c7.entry.js} +1 -1
- package/lib/duet/p-5ea0cd19.entry.js +4 -0
- package/lib/duet/p-63d5bf73.system.entry.js +4 -0
- package/lib/duet/{p-68d09837.system.entry.js → p-67d9a9a9.system.entry.js} +1 -1
- package/lib/duet/{p-9542c540.entry.js → p-6a19b5ec.entry.js} +1 -1
- package/lib/duet/p-6cc3be76.system.entry.js +4 -0
- package/lib/duet/p-6e363557.system.js +4 -0
- package/lib/duet/{p-3b3bac3f.system.entry.js → p-6e6e76db.system.entry.js} +1 -1
- package/lib/duet/p-70fafc98.system.js +4 -0
- package/lib/duet/{p-2d1e2b23.system.entry.js → p-7368b14e.system.entry.js} +1 -1
- package/lib/duet/{p-2a3411b5.system.entry.js → p-751542a0.system.entry.js} +1 -1
- package/lib/duet/{p-b75c5f13.entry.js → p-794659ac.entry.js} +1 -1
- package/lib/duet/{p-b04d738f.system.entry.js → p-7e8d5bb9.system.entry.js} +1 -1
- package/lib/duet/p-7fee0d23.system.entry.js +4 -0
- package/lib/duet/p-81867417.system.js +4 -0
- package/lib/duet/{p-84ece735.entry.js → p-86daec1c.entry.js} +1 -1
- package/lib/duet/{p-94a5fd74.system.entry.js → p-8b5ca0e7.system.entry.js} +1 -1
- package/lib/duet/{p-ffc2ffff.entry.js → p-8cb7416d.entry.js} +1 -1
- package/lib/duet/p-8f826843.system.entry.js +4 -0
- package/lib/duet/p-94169303.entry.js +4 -0
- package/lib/duet/{p-807b2087.entry.js → p-9481e312.entry.js} +1 -1
- package/lib/duet/{p-977f2826.entry.js → p-984576c9.entry.js} +1 -1
- package/lib/duet/p-987edcd0.js +15 -0
- package/lib/duet/p-9d73343a.entry.js +4 -0
- package/lib/duet/{p-8652a7ab.system.entry.js → p-9dca5c22.system.entry.js} +1 -1
- package/lib/duet/p-a207b008.entry.js +4 -0
- package/lib/duet/p-a5b9c192.system.entry.js +4 -0
- package/lib/duet/p-a6a84ec6.entry.js +4 -0
- package/lib/duet/{p-9f0f5674.entry.js → p-a890da72.entry.js} +1 -1
- package/lib/duet/{p-0f2a478e.entry.js → p-a9859a82.entry.js} +1 -1
- package/lib/duet/{p-3040debf.entry.js → p-aba68b7b.entry.js} +1 -1
- package/lib/duet/p-acc57c77.entry.js +4 -0
- package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
- package/lib/duet/{p-fb898d94.system.entry.js → p-aee24388.system.entry.js} +1 -1
- package/lib/duet/p-aef1b720.system.entry.js +4 -0
- package/lib/duet/{p-00eac879.system.entry.js → p-af41d894.system.entry.js} +1 -1
- package/lib/duet/p-b25d3769.js +4 -0
- package/lib/duet/{p-43dde575.system.entry.js → p-b32224fe.system.entry.js} +1 -1
- package/lib/duet/{p-f13a0883.entry.js → p-b3744481.entry.js} +1 -1
- package/lib/duet/{p-b374d7c2.system.js → p-b42d81c3.system.js} +1 -1
- package/lib/duet/{p-ed479d09.system.entry.js → p-b4e87f02.system.entry.js} +1 -1
- package/lib/duet/{p-b9683731.entry.js → p-bf93a991.entry.js} +1 -1
- package/lib/duet/{p-a962c8c1.system.js → p-c18a599e.system.js} +0 -0
- package/lib/duet/p-c2e77278.entry.js +4 -0
- package/lib/duet/p-c34329f3.entry.js +4 -0
- package/lib/duet/{p-c19094dd.entry.js → p-c36b4da0.entry.js} +1 -1
- package/lib/duet/{p-8002a095.entry.js → p-cdd70b93.entry.js} +1 -1
- package/lib/duet/p-d1c19f04.system.entry.js +4 -0
- package/lib/duet/{p-cc0bd28f.system.entry.js → p-d3a3c3c7.system.entry.js} +1 -1
- package/lib/duet/{p-19c28d99.system.entry.js → p-d4118b6e.system.entry.js} +1 -1
- package/lib/duet/{p-abd3bfb4.system.entry.js → p-d744d188.system.entry.js} +1 -1
- package/lib/duet/p-ddb6344c.system.js +4 -0
- package/lib/duet/p-de07c7d7.entry.js +4 -0
- package/lib/duet/{p-57cb58d4.system.entry.js → p-dfe79666.system.entry.js} +1 -1
- package/lib/duet/{p-c723d36e.system.js → p-e12f2b8b.system.js} +1 -1
- package/lib/duet/p-e2a44156.js +4 -0
- package/lib/duet/p-e76b722f.entry.js +4 -0
- package/lib/duet/{p-0b9b6393.entry.js → p-e964d062.entry.js} +1 -1
- package/lib/duet/p-eb55ccd2.system.js +4 -0
- package/lib/duet/p-f0a4b68d.system.entry.js +4 -0
- package/lib/duet/p-f364eb96.entry.js +4 -0
- package/lib/duet/{p-fbb7d194.entry.js → p-f8ce39fb.entry.js} +1 -1
- package/lib/esm/{dom-8516b24e.js → dom-58cd15f6.js} +1 -1
- package/lib/esm/duet-alert.entry.js +2 -2
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +4 -4
- package/lib/esm/duet-caption_4.entry.js +17 -10
- package/lib/esm/duet-card.entry.js +3 -3
- package/lib/esm/duet-checkbox.entry.js +2 -2
- package/lib/esm/duet-choice_2.entry.js +41 -19
- package/lib/esm/duet-collapsible.entry.js +4 -1
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +7 -7
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table-button_3.entry.js +226 -0
- package/lib/esm/{duet-table.entry.js → duet-editable-table_3.entry.js} +205 -3
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +2 -2
- package/lib/esm/duet-grid_2.entry.js +52 -4
- package/lib/esm/duet-header_2.entry.js +3 -3
- package/lib/esm/duet-hero.entry.js +2 -2
- package/lib/esm/duet-icon.entry.js +4 -4
- package/lib/esm/duet-input_2.entry.js +6 -6
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +2 -2
- package/lib/esm/duet-modal.entry.js +3 -3
- package/lib/esm/duet-notification_2.entry.js +2 -2
- package/lib/esm/duet-number-input.entry.js +2 -2
- package/lib/esm/duet-progress.entry.js +71 -0
- package/lib/esm/duet-radio_2.entry.js +2 -2
- package/lib/esm/duet-range-slider.entry.js +2 -2
- package/lib/esm/duet-select.entry.js +5 -5
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-tab_2.entry.js +3 -3
- package/lib/esm/duet-textarea.entry.js +5 -5
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +2 -2
- package/lib/esm/duet-tray.entry.js +3 -3
- package/lib/esm/duet-upload.entry.js +1085 -0
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{focus-utils-6a282066.js → focus-utils-1fe0dcd0.js} +1 -1
- package/lib/esm/{index-3a265449.js → index-84d97bd1.js} +5 -2
- package/lib/esm/js-utils-b69f17df.js +14 -0
- package/lib/esm/{language-utils-d5c38f65.js → language-utils-344d894c.js} +6 -3
- package/lib/esm/loader.js +3 -3
- package/lib/esm/{shadow-css-9178c864.js → shadow-css-7c726abb.js} +9 -10
- package/lib/esm/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
- package/lib/esm/{tokens.module-edb66c04.js → tokens.module-49cbf963.js} +3 -1
- package/lib/esm/watch-options-dd55bce8.js +57 -0
- package/lib/esm-es5/{dom-8516b24e.js → dom-58cd15f6.js} +0 -0
- package/lib/esm-es5/duet-alert.entry.js +1 -1
- package/lib/esm-es5/duet-badge.entry.js +1 -1
- package/lib/esm-es5/duet-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +2 -2
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +2 -2
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table-button_3.entry.js +4 -0
- package/lib/esm-es5/duet-editable-table_3.entry.js +4 -0
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +2 -2
- package/lib/esm-es5/duet-header_2.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +1 -1
- package/lib/esm-es5/duet-progress.entry.js +4 -0
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-tab_2.entry.js +2 -2
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload.entry.js +4 -0
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{focus-utils-6a282066.js → focus-utils-1fe0dcd0.js} +1 -1
- package/lib/esm-es5/index-84d97bd1.js +4 -0
- package/lib/esm-es5/js-utils-b69f17df.js +4 -0
- package/lib/esm-es5/{language-utils-d5c38f65.js → language-utils-344d894c.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/shadow-css-7c726abb.js +15 -0
- package/lib/esm-es5/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
- package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
- package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
- package/lib/types/components/duet-choice/duet-choice.d.ts +20 -1
- package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +5 -5
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +72 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +72 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +7 -0
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +84 -0
- package/lib/types/components/duet-grid/duet-grid.d.ts +16 -2
- package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
- package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
- package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +9 -1
- package/lib/types/components/duet-progress/duet-progress.d.ts +64 -0
- package/lib/types/components/duet-upload/duet-upload-aria-status.d.ts +49 -0
- package/lib/types/components/duet-upload/duet-upload-editable-item-error.d.ts +7 -0
- package/lib/types/components/duet-upload/duet-upload-editable-item-inprogres.d.ts +7 -0
- package/lib/types/components/duet-upload/duet-upload-editable-item-success.d.ts +8 -0
- package/lib/types/components/duet-upload/duet-upload-validators.d.ts +12 -0
- package/lib/types/components/duet-upload/duet-upload.d.ts +380 -0
- package/lib/types/components/duet-upload/errorcodes.utils.d.ts +8 -0
- package/lib/types/components/duet-upload/mock.helpers.d.ts +2 -0
- package/lib/types/components/duet-upload/upload.helpers.d.ts +1 -0
- package/lib/types/components/duet-upload/xhr.helpers.d.ts +18 -0
- package/lib/types/components.d.ts +789 -19
- package/lib/types/utils/js-utils.d.ts +1 -0
- package/lib/types/utils/language-utils.d.ts +5 -1
- package/lib/types/utils/watch-options.d.ts +2 -0
- package/package.json +6 -6
- package/lib/cjs/duet-fieldset.cjs.entry.js +0 -62
- package/lib/duet/p-0058512b.js +0 -4
- package/lib/duet/p-0b00e8d6.system.js +0 -16
- package/lib/duet/p-15922601.system.js +0 -4
- package/lib/duet/p-194e25ce.system.entry.js +0 -4
- package/lib/duet/p-1d87ea02.system.entry.js +0 -4
- package/lib/duet/p-3618aaee.entry.js +0 -4
- package/lib/duet/p-40d68321.entry.js +0 -4
- package/lib/duet/p-418b2ce7.system.js +0 -4
- package/lib/duet/p-43e39d98.system.js +0 -4
- package/lib/duet/p-4603830b.entry.js +0 -4
- package/lib/duet/p-52d7fbec.entry.js +0 -4
- package/lib/duet/p-60478325.system.entry.js +0 -4
- package/lib/duet/p-64ed7add.entry.js +0 -4
- package/lib/duet/p-6a356ab1.system.js +0 -4
- package/lib/duet/p-753b406c.entry.js +0 -4
- package/lib/duet/p-76c00d0c.entry.js +0 -4
- package/lib/duet/p-85fe1132.js +0 -4
- package/lib/duet/p-8c8e82aa.system.js +0 -4
- package/lib/duet/p-9a89ec39.js +0 -4
- package/lib/duet/p-a11df1b6.js +0 -15
- package/lib/duet/p-a1eccee1.system.entry.js +0 -4
- package/lib/duet/p-a89e88a3.js +0 -4
- package/lib/duet/p-ade33230.entry.js +0 -4
- package/lib/duet/p-cb827bb7.entry.js +0 -4
- package/lib/duet/p-d85fba2c.system.entry.js +0 -4
- package/lib/duet/p-dfa90f8a.system.entry.js +0 -4
- package/lib/duet/p-e6b9bd1d.entry.js +0 -4
- package/lib/duet/p-ec3eef3a.entry.js +0 -4
- package/lib/duet/p-ee64d6be.system.entry.js +0 -4
- package/lib/duet/p-f113671b.system.entry.js +0 -4
- package/lib/duet/p-f2f04396.entry.js +0 -4
- package/lib/duet/p-f364ce8b.system.entry.js +0 -4
- package/lib/duet/p-fc6624fe.system.entry.js +0 -4
- package/lib/esm/duet-fieldset.entry.js +0 -58
- package/lib/esm/watch-options-de55ea78.js +0 -35
- package/lib/esm-es5/duet-fieldset.entry.js +0 -4
- package/lib/esm-es5/duet-table.entry.js +0 -4
- package/lib/esm-es5/index-3a265449.js +0 -4
- package/lib/esm-es5/shadow-css-9178c864.js +0 -15
- package/lib/esm-es5/tokens.module-edb66c04.js +0 -4
- package/lib/esm-es5/watch-options-de55ea78.js +0 -4
|
@@ -0,0 +1,1838 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from "@stencil/core";
|
|
5
|
+
import { createID } from "../../utils/create-id";
|
|
6
|
+
import { debounce } from "../../utils/js-utils";
|
|
7
|
+
import { getLocaleString } from "../../utils/language-utils";
|
|
8
|
+
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
9
|
+
import { ErrorItem } from "./duet-upload-editable-item-error";
|
|
10
|
+
import { ProgressItem } from "./duet-upload-editable-item-inprogres";
|
|
11
|
+
import { SuccessItem } from "./duet-upload-editable-item-success";
|
|
12
|
+
import { validateFile, validateTotalAmountIsAboveMax, validateTotalSizeIsAboveMax } from "./duet-upload-validators";
|
|
13
|
+
import { getError, getI18nError } from "./errorcodes.utils";
|
|
14
|
+
import { makeXhrRequest } from "./xhr.helpers";
|
|
15
|
+
/**
|
|
16
|
+
* @slot header - named slot - to place content after description / caption
|
|
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)
|
|
20
|
+
*/
|
|
21
|
+
export class DuetUpload {
|
|
22
|
+
constructor() {
|
|
23
|
+
/**
|
|
24
|
+
* Own Properties
|
|
25
|
+
*/
|
|
26
|
+
this.buttonId = createID("DuetButton");
|
|
27
|
+
this.labelId = createID("DuetLabel");
|
|
28
|
+
this.uploadId = createID("DuetUpload");
|
|
29
|
+
this.editableTableId = createID("DuetEditableTable");
|
|
30
|
+
this.filesInProgress = new Map();
|
|
31
|
+
this.fileMaxReached = false;
|
|
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
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* State() variables
|
|
44
|
+
*/
|
|
45
|
+
this.tick = Date.now();
|
|
46
|
+
/**
|
|
47
|
+
* If external is set to true, the upload component will not actually upload the files, but only keep states
|
|
48
|
+
* it will be up to you to handle the upload and return progress information to the upload-component
|
|
49
|
+
*/
|
|
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);
|
|
128
|
+
/**
|
|
129
|
+
* Property to change descriptionDefaults defaults on the component.
|
|
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
|
+
}
|
|
136
|
+
*/
|
|
137
|
+
this.buttonLabelDefaults = {
|
|
138
|
+
fi: "Lisää liite",
|
|
139
|
+
sv: "Lägg till en bilaga",
|
|
140
|
+
en: "Add an attachment",
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Label of button
|
|
144
|
+
* @default { fi: "Lisää liite", sv: "Lägg till en bilaga", en: "Add an attachment" }
|
|
145
|
+
*/
|
|
146
|
+
this.buttonLabel = getLocaleString(this.buttonLabelDefaults);
|
|
147
|
+
/**
|
|
148
|
+
* accessible Label of button
|
|
149
|
+
*/
|
|
150
|
+
this.accessibleButtonLabel = undefined;
|
|
151
|
+
/**
|
|
152
|
+
* Theme of the input.
|
|
153
|
+
*/
|
|
154
|
+
this.theme = "";
|
|
155
|
+
/**
|
|
156
|
+
* Makes the input component disabled. This prevents users from being able to
|
|
157
|
+
* interact with the upload component, and conveys its inactive state to assistive technologies.
|
|
158
|
+
*/
|
|
159
|
+
this.disabled = false;
|
|
160
|
+
/**
|
|
161
|
+
* Controls the margin of the component.
|
|
162
|
+
*/
|
|
163
|
+
this.margin = "auto";
|
|
164
|
+
/**
|
|
165
|
+
* Set whether the input is required or not. Please note that this is necessary for
|
|
166
|
+
* accessible inputs when the user is required to fill them. When using this property
|
|
167
|
+
* you need to also set “novalidate” attribute to your form element to prevent
|
|
168
|
+
* browser from displaying its own validation errors.
|
|
169
|
+
*/
|
|
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;
|
|
175
|
+
/**
|
|
176
|
+
* Map of string that contain list of uploaded files.
|
|
177
|
+
*/
|
|
178
|
+
this.files = new Map();
|
|
179
|
+
/**
|
|
180
|
+
* Property to read if filelist contains errors or not
|
|
181
|
+
*/
|
|
182
|
+
this.valid = !this.required;
|
|
183
|
+
/**
|
|
184
|
+
* Property to change labelDefaults defaults on the component.
|
|
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"}
|
|
187
|
+
*/
|
|
188
|
+
this.labelDefaults = {
|
|
189
|
+
fi: "Lisää liite",
|
|
190
|
+
sv: "Lägg till en bilaga",
|
|
191
|
+
en: "Add attachments",
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Label for the input.
|
|
195
|
+
* @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
|
|
196
|
+
*/
|
|
197
|
+
this.label = getLocaleString(this.labelDefaults);
|
|
198
|
+
/**
|
|
199
|
+
* Property to change descriptionDefaults defaults on the component.
|
|
200
|
+
* normally you would handle these strings on an application level and override @label when needed
|
|
201
|
+
* @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
|
+
}
|
|
206
|
+
*/
|
|
207
|
+
this.descriptionDefaults = {
|
|
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.",
|
|
209
|
+
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.",
|
|
210
|
+
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.",
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Description for the upload component.
|
|
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
|
+
}
|
|
219
|
+
*/
|
|
220
|
+
this.description = getLocaleString(this.descriptionDefaults);
|
|
221
|
+
/**
|
|
222
|
+
* Defaults for the filelist's empty state.
|
|
223
|
+
* @default {
|
|
224
|
+
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
225
|
+
sv: "Inga filer har lagts till ännu.",
|
|
226
|
+
en: "No files added yet.",
|
|
227
|
+
}
|
|
228
|
+
*/
|
|
229
|
+
this.fileListEmptyDefaults = {
|
|
230
|
+
fi: "Ei vielä lisättyjä tiedostoja.",
|
|
231
|
+
sv: "Inga filer har lagts till ännu.",
|
|
232
|
+
en: "No files added yet.",
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Label for the filelist's empty state.
|
|
236
|
+
* @default { fi: "Ei vielä lisättyjä tiedostoja.",sv: "Inga filer har lagts till ännu.",en: "No files added yet."}
|
|
237
|
+
*/
|
|
238
|
+
this.fileListEmpty = getLocaleString(this.fileListEmptyDefaults);
|
|
239
|
+
/**
|
|
240
|
+
* Display the input in error state along with an error message.
|
|
241
|
+
*/
|
|
242
|
+
this.error = "";
|
|
243
|
+
/**
|
|
244
|
+
* Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded.
|
|
245
|
+
*/
|
|
246
|
+
this.maxBytes = 200000000;
|
|
247
|
+
/**
|
|
248
|
+
* Use maxBytesTotal to specify the maximum size in Bytes of All files combined that can be uploaded.
|
|
249
|
+
*/
|
|
250
|
+
this.maxBytesTotal = undefined;
|
|
251
|
+
/**
|
|
252
|
+
* Use maxFiles to specify the maximum amount of files that can be uploaded
|
|
253
|
+
*/
|
|
254
|
+
this.maxFiles = 99;
|
|
255
|
+
/**
|
|
256
|
+
* A string of commaseperated file type values that are allowed
|
|
257
|
+
* @example: .pdf,.doc,.docx
|
|
258
|
+
*/
|
|
259
|
+
this.allowedExtensions = "all";
|
|
260
|
+
/**
|
|
261
|
+
* A string of commaseperated mime type values that are allowed
|
|
262
|
+
* @example: image/*,application/msword,
|
|
263
|
+
*/
|
|
264
|
+
this.allowedMimetypes = "*";
|
|
265
|
+
/**
|
|
266
|
+
* Use multiple to allow the user to select multiple files when uploading
|
|
267
|
+
*/
|
|
268
|
+
this.multiple = true;
|
|
269
|
+
/**
|
|
270
|
+
* Use limitSelection to enforce the value in allowedExtension & allowedMimetypes when selecting files,
|
|
271
|
+
* by default this is off, setting this to true will limit the users choices to what has been explicitly set
|
|
272
|
+
*/
|
|
273
|
+
this.limitSelection = false;
|
|
274
|
+
//region Private functions
|
|
275
|
+
/**
|
|
276
|
+
* Private functions
|
|
277
|
+
*/
|
|
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
|
|
363
|
+
this.genHashName = () => Date.now().toString(36) + Math.random();
|
|
364
|
+
this.updateValueInMap = (item, key, value, kick = true) => {
|
|
365
|
+
const fileItem = this.files.get(item);
|
|
366
|
+
fileItem[key] = value;
|
|
367
|
+
this.files.set(item, fileItem);
|
|
368
|
+
if (kick) {
|
|
369
|
+
this.kick();
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
this.updateProgress = (ev, name) => {
|
|
373
|
+
console.log(this.filesInProgress.size);
|
|
374
|
+
const updateProgressHelper = percentComplete => {
|
|
375
|
+
this.updateValueInMap(name, "progress", percentComplete);
|
|
376
|
+
this.onProgress(name, percentComplete, ev);
|
|
377
|
+
};
|
|
378
|
+
if (ev.lengthComputable) {
|
|
379
|
+
const percentComplete = (ev.loaded / ev.total) * 100;
|
|
380
|
+
updateProgressHelper(percentComplete);
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
console.log("cant read progress");
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
this.trackProgress = (name, remove = false) => {
|
|
387
|
+
if (remove) {
|
|
388
|
+
this.filesInProgress.delete(name);
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
this.filesInProgress.set(name, "inprogress");
|
|
392
|
+
}
|
|
393
|
+
if (this.filesInProgress.size === 0) {
|
|
394
|
+
this.onDone();
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
this.getFilesAsArray = () => {
|
|
398
|
+
const filesInQueue = [];
|
|
399
|
+
const filesInError = [];
|
|
400
|
+
this.files.forEach(value => {
|
|
401
|
+
if (value.valid && !value.deleted) {
|
|
402
|
+
filesInQueue.push(value);
|
|
403
|
+
}
|
|
404
|
+
else if (!value.valid && !value.deleted) {
|
|
405
|
+
filesInError.push(value);
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
return { valid: filesInQueue, invalid: filesInError };
|
|
409
|
+
};
|
|
410
|
+
this.resetFormFields = () => {
|
|
411
|
+
/**
|
|
412
|
+
* You cannot modify a FileList, nor remove single items from it
|
|
413
|
+
* This completely removes all items in the FileList
|
|
414
|
+
* We reset the form fields to always be able to re-upload files
|
|
415
|
+
* and because we handle all uploads and states internally in the component (not relying on native form elements)
|
|
416
|
+
*/
|
|
417
|
+
this.nativeInput.value = "";
|
|
418
|
+
};
|
|
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;
|
|
427
|
+
};
|
|
428
|
+
//endregion
|
|
429
|
+
//region Eventlisteners for the XHR requests
|
|
430
|
+
/**
|
|
431
|
+
* Eventlisteners for the XHR requests
|
|
432
|
+
*/
|
|
433
|
+
this.transferComplete = name => {
|
|
434
|
+
this.updateValueInMap(name, "progress", 100, false);
|
|
435
|
+
this.trackProgress(name, true);
|
|
436
|
+
};
|
|
437
|
+
this.transferDone = (xhr, name, status) => {
|
|
438
|
+
this.updateValueInMap(name, "status", status, false);
|
|
439
|
+
this.updateValueInMap(name, "uploaded", true, false);
|
|
440
|
+
try {
|
|
441
|
+
const response = JSON.parse(xhr.response);
|
|
442
|
+
this.updateValueInMap(name, "url", response.url);
|
|
443
|
+
}
|
|
444
|
+
catch (e) {
|
|
445
|
+
this.updateValueInMap(name, "url", null);
|
|
446
|
+
console.error("Server did not respond with expected response {url: string}");
|
|
447
|
+
}
|
|
448
|
+
return;
|
|
449
|
+
};
|
|
450
|
+
this.transferDoneWithFailure = (xhr, name, status) => {
|
|
451
|
+
try {
|
|
452
|
+
const { error } = JSON.parse(xhr.response);
|
|
453
|
+
this.updateValueInMap(name, "error", { message: error.message, type: error.type }, false);
|
|
454
|
+
}
|
|
455
|
+
catch (e) {
|
|
456
|
+
console.error("Server did not respond with expected response error:{message: string, type: int}");
|
|
457
|
+
this.updateValueInMap(name, "error", { type: status }, false);
|
|
458
|
+
}
|
|
459
|
+
this.updateValueInMap(name, "valid", false, true);
|
|
460
|
+
};
|
|
461
|
+
this.transferFailed = name => {
|
|
462
|
+
this.updateValueInMap(name, "error", getError("duet-upload-001"));
|
|
463
|
+
};
|
|
464
|
+
this.transferCanceled = name => {
|
|
465
|
+
this.files.delete(name);
|
|
466
|
+
this.validateTotals(name);
|
|
467
|
+
this.kick();
|
|
468
|
+
};
|
|
469
|
+
this.validateTotals = (name) => {
|
|
470
|
+
const isTotalSizeOverMaxSize = validateTotalSizeIsAboveMax(this.files, this.maxBytesTotal);
|
|
471
|
+
const isTotalFileAmountAboveMax = validateTotalAmountIsAboveMax(this.files, this.maxFiles);
|
|
472
|
+
if (isTotalSizeOverMaxSize && name) {
|
|
473
|
+
this.updateValueInMap(name, "error", getError("duet-upload-202"), false);
|
|
474
|
+
}
|
|
475
|
+
if (isTotalFileAmountAboveMax && name) {
|
|
476
|
+
this.updateValueInMap(name, "error", getError("duet-upload-301"), false);
|
|
477
|
+
}
|
|
478
|
+
this.bytesMaxReached = isTotalSizeOverMaxSize;
|
|
479
|
+
this.fileMaxReached = isTotalFileAmountAboveMax;
|
|
480
|
+
return {
|
|
481
|
+
bytesMaxReached: isTotalSizeOverMaxSize,
|
|
482
|
+
fileMaxReached: isTotalFileAmountAboveMax,
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
this.onDelete = (key, ev) => {
|
|
486
|
+
const deletedItem = this.files.get(key);
|
|
487
|
+
this.files.delete(key);
|
|
488
|
+
this.validateTotals();
|
|
489
|
+
this.kick();
|
|
490
|
+
this.duetDelete.emit({
|
|
491
|
+
originalEvent: ev,
|
|
492
|
+
data: { deletion: deletedItem },
|
|
493
|
+
component: "duet-upload",
|
|
494
|
+
});
|
|
495
|
+
if (!this.external) {
|
|
496
|
+
this.makeXHRDeleteRequest(deletedItem);
|
|
497
|
+
}
|
|
498
|
+
this.resetFormFields();
|
|
499
|
+
};
|
|
500
|
+
this.onCancel = (key, ev) => {
|
|
501
|
+
const cancelledItem = this.files.get(key);
|
|
502
|
+
this.files.delete(key);
|
|
503
|
+
if (!this.external) {
|
|
504
|
+
const { xhr } = cancelledItem;
|
|
505
|
+
xhr.abort();
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
this.kick();
|
|
509
|
+
}
|
|
510
|
+
this.resetFormFields();
|
|
511
|
+
this.duetCancel.emit({
|
|
512
|
+
originalEvent: ev,
|
|
513
|
+
data: { cancelled: cancelledItem },
|
|
514
|
+
component: "duet-upload",
|
|
515
|
+
});
|
|
516
|
+
};
|
|
517
|
+
this.onUpload = (ev, metaData) => {
|
|
518
|
+
this.duetUpload.emit({
|
|
519
|
+
originalEvent: ev,
|
|
520
|
+
metaData,
|
|
521
|
+
component: "duet-upload",
|
|
522
|
+
});
|
|
523
|
+
};
|
|
524
|
+
this.onBlur = (ev) => {
|
|
525
|
+
this.duetBlur.emit({
|
|
526
|
+
originalEvent: ev,
|
|
527
|
+
component: "duet-upload",
|
|
528
|
+
});
|
|
529
|
+
};
|
|
530
|
+
this.onProgress = (key, percentComplete, ev) => {
|
|
531
|
+
this.duetChange.emit({
|
|
532
|
+
originalEvent: ev,
|
|
533
|
+
data: {
|
|
534
|
+
key,
|
|
535
|
+
percentComplete,
|
|
536
|
+
},
|
|
537
|
+
component: "duet-upload",
|
|
538
|
+
});
|
|
539
|
+
};
|
|
540
|
+
this.onFocus = (ev) => {
|
|
541
|
+
this.duetFocus.emit({
|
|
542
|
+
originalEvent: ev,
|
|
543
|
+
component: "duet-upload",
|
|
544
|
+
});
|
|
545
|
+
};
|
|
546
|
+
this.onDone = () => {
|
|
547
|
+
this.duetDone.emit({
|
|
548
|
+
component: "duet-upload",
|
|
549
|
+
data: { files: this.files },
|
|
550
|
+
});
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
watchValidHandler(newValue, oldValue) {
|
|
554
|
+
if (newValue !== oldValue) {
|
|
555
|
+
this.kick();
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
//endregion
|
|
559
|
+
/**
|
|
560
|
+
* Component lifecycle events.
|
|
561
|
+
*/
|
|
562
|
+
componentWillLoad() {
|
|
563
|
+
inheritGlobalTheme(this);
|
|
564
|
+
this.listenForActionEvents();
|
|
565
|
+
}
|
|
566
|
+
componentWillRender() {
|
|
567
|
+
// listen to the events from the component
|
|
568
|
+
this.verifyValidity();
|
|
569
|
+
}
|
|
570
|
+
//endregion
|
|
571
|
+
//region XHR requests
|
|
572
|
+
/**
|
|
573
|
+
* XHR request utilities
|
|
574
|
+
*/
|
|
575
|
+
makeXHRPostRequest(data) {
|
|
576
|
+
const xhr = new XMLHttpRequest();
|
|
577
|
+
const name = data.get("name");
|
|
578
|
+
xhr.upload.addEventListener("progress", ev => {
|
|
579
|
+
this.updateProgress(ev, name);
|
|
580
|
+
});
|
|
581
|
+
xhr.upload.addEventListener("load", () => {
|
|
582
|
+
this.transferComplete(name);
|
|
583
|
+
});
|
|
584
|
+
xhr.upload.addEventListener("error", () => {
|
|
585
|
+
this.transferFailed(name);
|
|
586
|
+
});
|
|
587
|
+
xhr.upload.addEventListener("abort", () => {
|
|
588
|
+
this.transferCanceled(name);
|
|
589
|
+
});
|
|
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
|
+
});
|
|
597
|
+
}
|
|
598
|
+
makeXHRDeleteRequest(data) {
|
|
599
|
+
const { uid, item } = data;
|
|
600
|
+
const xhr = new XMLHttpRequest();
|
|
601
|
+
// don't present server issues to user on deletes, just remove them from the visible list
|
|
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
|
+
});
|
|
618
|
+
}
|
|
619
|
+
//endregion
|
|
620
|
+
//region EventHandlers
|
|
621
|
+
/**
|
|
622
|
+
* Component event handling.
|
|
623
|
+
*/
|
|
624
|
+
async onChange(ev) {
|
|
625
|
+
var _a;
|
|
626
|
+
const selectedFiles = Array.from((_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files);
|
|
627
|
+
// FileList is a nice array like structure but
|
|
628
|
+
// to ensure uniqueness of files we use a mapping structure and
|
|
629
|
+
// key to the name (makes it easier to delete as well)
|
|
630
|
+
if (selectedFiles) {
|
|
631
|
+
for (const item of selectedFiles) {
|
|
632
|
+
const { valid, errorMessage, errorType, errorSystem } = validateFile(item, {
|
|
633
|
+
maxBytes: this.maxBytes,
|
|
634
|
+
allowedExtensions: this.allowedExtensions,
|
|
635
|
+
allowedMimetypes: this.allowedMimetypes,
|
|
636
|
+
});
|
|
637
|
+
const uid = this.genHashName();
|
|
638
|
+
const fileListItem = {
|
|
639
|
+
uid,
|
|
640
|
+
item: item,
|
|
641
|
+
size: item.size,
|
|
642
|
+
meta: this.metaData,
|
|
643
|
+
uploaded: false,
|
|
644
|
+
valid,
|
|
645
|
+
error: {
|
|
646
|
+
type: valid ? undefined : errorType,
|
|
647
|
+
message: valid ? undefined : errorMessage,
|
|
648
|
+
system_message: valid ? undefined : errorSystem,
|
|
649
|
+
},
|
|
650
|
+
progress: 0,
|
|
651
|
+
deleted: false,
|
|
652
|
+
xhr: false,
|
|
653
|
+
url: false,
|
|
654
|
+
};
|
|
655
|
+
this.files.set(item.name, fileListItem);
|
|
656
|
+
// validate that we haven't hit any maxfiles or maxbytes limits before we upload
|
|
657
|
+
const { bytesMaxReached, fileMaxReached } = this.validateTotals(item.name);
|
|
658
|
+
if (bytesMaxReached) {
|
|
659
|
+
// in case one of the global maxes have been reached, invalidate the file
|
|
660
|
+
this.updateValueInMap(item.name, "valid", false, false);
|
|
661
|
+
}
|
|
662
|
+
else if (fileMaxReached) {
|
|
663
|
+
// in case one of the global maxes have been reached, invalidate the file
|
|
664
|
+
this.updateValueInMap(item.name, "valid", false, false);
|
|
665
|
+
}
|
|
666
|
+
else if (valid && !this.external) {
|
|
667
|
+
// if all is well AND external file upload handling has not been set, start upload
|
|
668
|
+
const data = new FormData();
|
|
669
|
+
data.append("file", item);
|
|
670
|
+
data.append("uid", uid);
|
|
671
|
+
data.append("name", item.name);
|
|
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
|
+
}
|
|
680
|
+
}
|
|
681
|
+
// kick the stat to force update
|
|
682
|
+
this.kick();
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
// reset the form, so that a user may upload a file again (with the same name)
|
|
686
|
+
this.resetFormFields();
|
|
687
|
+
// reset the internal metaData state
|
|
688
|
+
this.metaData = undefined;
|
|
689
|
+
this.duetChange.emit({
|
|
690
|
+
originalEvent: ev,
|
|
691
|
+
data: { files: this.files },
|
|
692
|
+
component: "duet-upload",
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
//endregion
|
|
696
|
+
/**
|
|
697
|
+
* Sets focus on the specified `duet-input`. Use this method instead of the global
|
|
698
|
+
* `input.focus()`.
|
|
699
|
+
*/
|
|
700
|
+
async setFocus(options) {
|
|
701
|
+
if (this.nativeInput) {
|
|
702
|
+
this.nativeInput.focus(options);
|
|
703
|
+
}
|
|
704
|
+
return;
|
|
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
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Get list of files, divided in errors and valid sections
|
|
717
|
+
*/
|
|
718
|
+
async getFiles() {
|
|
719
|
+
if (!this.files || this.files.size === 0) {
|
|
720
|
+
return false;
|
|
721
|
+
}
|
|
722
|
+
return this.getFilesAsArray();
|
|
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
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* render() function
|
|
732
|
+
* Always the last one in the class.
|
|
733
|
+
*/
|
|
734
|
+
render() {
|
|
735
|
+
const identifier = this.identifier || this.uploadId;
|
|
736
|
+
let caption = this.description.replace(/{maxfiles}/g, this.maxFiles.toString());
|
|
737
|
+
caption = caption.replace(/{maxbytes}/g, `${Math.floor(this.maxBytes / 1024 / 1024)} MB`);
|
|
738
|
+
caption = caption.replace(/{filetypes}/g, this.allowedExtensions.split(",").join(", "));
|
|
739
|
+
return (h(Host, { class: { "duet-m-0": this.margin === "none" } },
|
|
740
|
+
h("duet-fieldset", { label: this.label, caption: caption },
|
|
741
|
+
h("slot", { name: "header" }),
|
|
742
|
+
!this.files.size && (h("duet-label", { theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
|
|
743
|
+
"duet-upload-filelist-empty": !this.files.size,
|
|
744
|
+
"duet-upload-filelist": true,
|
|
745
|
+
"duet-upload-filelist-filled": this.files.size,
|
|
746
|
+
}, id: this.labelId, for: identifier }, this.fileListEmpty)),
|
|
747
|
+
!!this.files.size && h("slot", { name: "fileheader" }),
|
|
748
|
+
!!this.files.size && (h("duet-upload-aria-status", { invalid: this.getFilesAsArray().invalid.length, valid: this.getFilesAsArray().valid.length, inprogress: this.filesInProgress.size, total: this.files.size, statusMessageLabel: this.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() })),
|
|
750
|
+
!!this.files.size && h("slot", { name: "filefooter" }),
|
|
751
|
+
h("duet-spacer", { size: "large" }),
|
|
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)),
|
|
753
|
+
h("duet-spacer", { size: "medium" }),
|
|
754
|
+
(this.fileMaxReached || this.bytesMaxReached) && (h("duet-alert", null,
|
|
755
|
+
this.fileMaxReached && getI18nError("duet-upload-301"),
|
|
756
|
+
this.bytesMaxReached && getI18nError("duet-upload-202"))),
|
|
757
|
+
h("duet-spacer", { size: "medium" }),
|
|
758
|
+
h("duet-visually-hidden", null,
|
|
759
|
+
h("input", { ref: input => {
|
|
760
|
+
this.nativeInput = input;
|
|
761
|
+
}, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
762
|
+
"duet-upload": true,
|
|
763
|
+
}, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, capture: "user" })))));
|
|
764
|
+
}
|
|
765
|
+
static get is() { return "duet-upload"; }
|
|
766
|
+
static get encapsulation() { return "shadow"; }
|
|
767
|
+
static get originalStyleUrls() { return {
|
|
768
|
+
"$": ["duet-upload.scss"]
|
|
769
|
+
}; }
|
|
770
|
+
static get styleUrls() { return {
|
|
771
|
+
"$": ["duet-upload.css"]
|
|
772
|
+
}; }
|
|
773
|
+
static get properties() { return {
|
|
774
|
+
"accessibleActiveDescendant": {
|
|
775
|
+
"type": "string",
|
|
776
|
+
"mutable": false,
|
|
777
|
+
"complexType": {
|
|
778
|
+
"original": "string",
|
|
779
|
+
"resolved": "string",
|
|
780
|
+
"references": {}
|
|
781
|
+
},
|
|
782
|
+
"required": false,
|
|
783
|
+
"optional": false,
|
|
784
|
+
"docs": {
|
|
785
|
+
"tags": [],
|
|
786
|
+
"text": "Indicates the id of a related component\u2019s visually focused element."
|
|
787
|
+
},
|
|
788
|
+
"attribute": "accessible-active-descendant",
|
|
789
|
+
"reflect": false
|
|
790
|
+
},
|
|
791
|
+
"accessibleDescribedBy": {
|
|
792
|
+
"type": "string",
|
|
793
|
+
"mutable": false,
|
|
794
|
+
"complexType": {
|
|
795
|
+
"original": "string",
|
|
796
|
+
"resolved": "string",
|
|
797
|
+
"references": {}
|
|
798
|
+
},
|
|
799
|
+
"required": false,
|
|
800
|
+
"optional": false,
|
|
801
|
+
"docs": {
|
|
802
|
+
"tags": [],
|
|
803
|
+
"text": "Indicates the id of a component that describes the upload component."
|
|
804
|
+
},
|
|
805
|
+
"attribute": "accessible-described-by",
|
|
806
|
+
"reflect": false
|
|
807
|
+
},
|
|
808
|
+
"accessibleControls": {
|
|
809
|
+
"type": "string",
|
|
810
|
+
"mutable": false,
|
|
811
|
+
"complexType": {
|
|
812
|
+
"original": "string",
|
|
813
|
+
"resolved": "string",
|
|
814
|
+
"references": {}
|
|
815
|
+
},
|
|
816
|
+
"required": false,
|
|
817
|
+
"optional": false,
|
|
818
|
+
"docs": {
|
|
819
|
+
"tags": [],
|
|
820
|
+
"text": "Use this prop to add an aria-controls attribute. Use the attribute to\nindicate the id of a component controlled by this component."
|
|
821
|
+
},
|
|
822
|
+
"attribute": "accessible-controls",
|
|
823
|
+
"reflect": false
|
|
824
|
+
},
|
|
825
|
+
"accessibleOwns": {
|
|
826
|
+
"type": "string",
|
|
827
|
+
"mutable": false,
|
|
828
|
+
"complexType": {
|
|
829
|
+
"original": "string",
|
|
830
|
+
"resolved": "string",
|
|
831
|
+
"references": {}
|
|
832
|
+
},
|
|
833
|
+
"required": false,
|
|
834
|
+
"optional": false,
|
|
835
|
+
"docs": {
|
|
836
|
+
"tags": [],
|
|
837
|
+
"text": "Indicates the id of a component owned by the input."
|
|
838
|
+
},
|
|
839
|
+
"attribute": "accessible-owns",
|
|
840
|
+
"reflect": false
|
|
841
|
+
},
|
|
842
|
+
"external": {
|
|
843
|
+
"type": "boolean",
|
|
844
|
+
"mutable": false,
|
|
845
|
+
"complexType": {
|
|
846
|
+
"original": "boolean",
|
|
847
|
+
"resolved": "boolean",
|
|
848
|
+
"references": {}
|
|
849
|
+
},
|
|
850
|
+
"required": false,
|
|
851
|
+
"optional": false,
|
|
852
|
+
"docs": {
|
|
853
|
+
"tags": [],
|
|
854
|
+
"text": "If external is set to true, the upload component will not actually upload the files, but only keep states\nit will be up to you to handle the upload and return progress information to the upload-component"
|
|
855
|
+
},
|
|
856
|
+
"attribute": "external",
|
|
857
|
+
"reflect": false,
|
|
858
|
+
"defaultValue": "false"
|
|
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
|
+
},
|
|
901
|
+
"uri": {
|
|
902
|
+
"type": "string",
|
|
903
|
+
"mutable": false,
|
|
904
|
+
"complexType": {
|
|
905
|
+
"original": "string",
|
|
906
|
+
"resolved": "string",
|
|
907
|
+
"references": {}
|
|
908
|
+
},
|
|
909
|
+
"required": false,
|
|
910
|
+
"optional": false,
|
|
911
|
+
"docs": {
|
|
912
|
+
"tags": [],
|
|
913
|
+
"text": "Endpoint URI that is capable of receiving the files"
|
|
914
|
+
},
|
|
915
|
+
"attribute": "uri",
|
|
916
|
+
"reflect": false
|
|
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
|
+
},
|
|
936
|
+
"caption": {
|
|
937
|
+
"type": "string",
|
|
938
|
+
"mutable": false,
|
|
939
|
+
"complexType": {
|
|
940
|
+
"original": "string",
|
|
941
|
+
"resolved": "string",
|
|
942
|
+
"references": {}
|
|
943
|
+
},
|
|
944
|
+
"required": false,
|
|
945
|
+
"optional": false,
|
|
946
|
+
"docs": {
|
|
947
|
+
"tags": [],
|
|
948
|
+
"text": "Caption (underneath label) that can be set as a way of adding extra information"
|
|
949
|
+
},
|
|
950
|
+
"attribute": "caption",
|
|
951
|
+
"reflect": false
|
|
952
|
+
},
|
|
953
|
+
"statusLabelDefaults": {
|
|
954
|
+
"type": "string",
|
|
955
|
+
"mutable": false,
|
|
956
|
+
"complexType": {
|
|
957
|
+
"original": "DuetLangObject | string",
|
|
958
|
+
"resolved": "DuetLangObject | string",
|
|
959
|
+
"references": {
|
|
960
|
+
"DuetLangObject": {
|
|
961
|
+
"location": "import",
|
|
962
|
+
"path": "../../utils/language-utils"
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
"required": false,
|
|
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,
|
|
994
|
+
"docs": {
|
|
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
|
+
}],
|
|
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"
|
|
1021
|
+
},
|
|
1022
|
+
"attribute": "button-label-default",
|
|
1023
|
+
"reflect": false,
|
|
1024
|
+
"defaultValue": "{\n fi: \"Lis\u00E4\u00E4 liite\",\n sv: \"L\u00E4gg till en bilaga\",\n en: \"Add an attachment\",\n }"
|
|
1025
|
+
},
|
|
1026
|
+
"buttonLabel": {
|
|
1027
|
+
"type": "string",
|
|
1028
|
+
"mutable": false,
|
|
1029
|
+
"complexType": {
|
|
1030
|
+
"original": "string",
|
|
1031
|
+
"resolved": "string",
|
|
1032
|
+
"references": {}
|
|
1033
|
+
},
|
|
1034
|
+
"required": false,
|
|
1035
|
+
"optional": false,
|
|
1036
|
+
"docs": {
|
|
1037
|
+
"tags": [{
|
|
1038
|
+
"name": "default",
|
|
1039
|
+
"text": "{ fi: \"Lis\u00E4\u00E4 liite\", sv: \"L\u00E4gg till en bilaga\", en: \"Add an attachment\" }"
|
|
1040
|
+
}],
|
|
1041
|
+
"text": "Label of button"
|
|
1042
|
+
},
|
|
1043
|
+
"attribute": "button-label",
|
|
1044
|
+
"reflect": false,
|
|
1045
|
+
"defaultValue": "getLocaleString(this.buttonLabelDefaults)"
|
|
1046
|
+
},
|
|
1047
|
+
"accessibleButtonLabel": {
|
|
1048
|
+
"type": "string",
|
|
1049
|
+
"mutable": false,
|
|
1050
|
+
"complexType": {
|
|
1051
|
+
"original": "string",
|
|
1052
|
+
"resolved": "string",
|
|
1053
|
+
"references": {}
|
|
1054
|
+
},
|
|
1055
|
+
"required": false,
|
|
1056
|
+
"optional": false,
|
|
1057
|
+
"docs": {
|
|
1058
|
+
"tags": [],
|
|
1059
|
+
"text": "accessible Label of button"
|
|
1060
|
+
},
|
|
1061
|
+
"attribute": "accessible-button-label",
|
|
1062
|
+
"reflect": false,
|
|
1063
|
+
"defaultValue": "undefined"
|
|
1064
|
+
},
|
|
1065
|
+
"theme": {
|
|
1066
|
+
"type": "string",
|
|
1067
|
+
"mutable": true,
|
|
1068
|
+
"complexType": {
|
|
1069
|
+
"original": "DuetTheme",
|
|
1070
|
+
"resolved": "\"\" | \"default\" | \"turva\"",
|
|
1071
|
+
"references": {
|
|
1072
|
+
"DuetTheme": {
|
|
1073
|
+
"location": "import",
|
|
1074
|
+
"path": "../../common-types"
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
"required": false,
|
|
1079
|
+
"optional": false,
|
|
1080
|
+
"docs": {
|
|
1081
|
+
"tags": [],
|
|
1082
|
+
"text": "Theme of the input."
|
|
1083
|
+
},
|
|
1084
|
+
"attribute": "theme",
|
|
1085
|
+
"reflect": false,
|
|
1086
|
+
"defaultValue": "\"\""
|
|
1087
|
+
},
|
|
1088
|
+
"disabled": {
|
|
1089
|
+
"type": "boolean",
|
|
1090
|
+
"mutable": false,
|
|
1091
|
+
"complexType": {
|
|
1092
|
+
"original": "boolean",
|
|
1093
|
+
"resolved": "boolean",
|
|
1094
|
+
"references": {}
|
|
1095
|
+
},
|
|
1096
|
+
"required": false,
|
|
1097
|
+
"optional": false,
|
|
1098
|
+
"docs": {
|
|
1099
|
+
"tags": [],
|
|
1100
|
+
"text": "Makes the input component disabled. This prevents users from being able to\ninteract with the upload component, and conveys its inactive state to assistive technologies."
|
|
1101
|
+
},
|
|
1102
|
+
"attribute": "disabled",
|
|
1103
|
+
"reflect": true,
|
|
1104
|
+
"defaultValue": "false"
|
|
1105
|
+
},
|
|
1106
|
+
"identifier": {
|
|
1107
|
+
"type": "string",
|
|
1108
|
+
"mutable": false,
|
|
1109
|
+
"complexType": {
|
|
1110
|
+
"original": "string",
|
|
1111
|
+
"resolved": "string",
|
|
1112
|
+
"references": {}
|
|
1113
|
+
},
|
|
1114
|
+
"required": false,
|
|
1115
|
+
"optional": false,
|
|
1116
|
+
"docs": {
|
|
1117
|
+
"tags": [],
|
|
1118
|
+
"text": "Adds a unique identifier for the upload component."
|
|
1119
|
+
},
|
|
1120
|
+
"attribute": "identifier",
|
|
1121
|
+
"reflect": false
|
|
1122
|
+
},
|
|
1123
|
+
"margin": {
|
|
1124
|
+
"type": "string",
|
|
1125
|
+
"mutable": false,
|
|
1126
|
+
"complexType": {
|
|
1127
|
+
"original": "DuetMargin",
|
|
1128
|
+
"resolved": "\"auto\" | \"none\"",
|
|
1129
|
+
"references": {
|
|
1130
|
+
"DuetMargin": {
|
|
1131
|
+
"location": "import",
|
|
1132
|
+
"path": "../../common-types"
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
},
|
|
1136
|
+
"required": false,
|
|
1137
|
+
"optional": false,
|
|
1138
|
+
"docs": {
|
|
1139
|
+
"tags": [],
|
|
1140
|
+
"text": "Controls the margin of the component."
|
|
1141
|
+
},
|
|
1142
|
+
"attribute": "margin",
|
|
1143
|
+
"reflect": false,
|
|
1144
|
+
"defaultValue": "\"auto\""
|
|
1145
|
+
},
|
|
1146
|
+
"required": {
|
|
1147
|
+
"type": "boolean",
|
|
1148
|
+
"mutable": false,
|
|
1149
|
+
"complexType": {
|
|
1150
|
+
"original": "boolean",
|
|
1151
|
+
"resolved": "boolean",
|
|
1152
|
+
"references": {}
|
|
1153
|
+
},
|
|
1154
|
+
"required": false,
|
|
1155
|
+
"optional": false,
|
|
1156
|
+
"docs": {
|
|
1157
|
+
"tags": [],
|
|
1158
|
+
"text": "Set whether the input is required or not. Please note that this is necessary for\naccessible inputs when the user is required to fill them. When using this property\nyou need to also set \u201Cnovalidate\u201D attribute to your form element to prevent\nbrowser from displaying its own validation errors."
|
|
1159
|
+
},
|
|
1160
|
+
"attribute": "required",
|
|
1161
|
+
"reflect": false,
|
|
1162
|
+
"defaultValue": "false"
|
|
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
|
+
},
|
|
1210
|
+
"files": {
|
|
1211
|
+
"type": "unknown",
|
|
1212
|
+
"mutable": true,
|
|
1213
|
+
"complexType": {
|
|
1214
|
+
"original": "StringMap",
|
|
1215
|
+
"resolved": "StringMap",
|
|
1216
|
+
"references": {
|
|
1217
|
+
"StringMap": {
|
|
1218
|
+
"location": "local"
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
},
|
|
1222
|
+
"required": false,
|
|
1223
|
+
"optional": false,
|
|
1224
|
+
"docs": {
|
|
1225
|
+
"tags": [],
|
|
1226
|
+
"text": "Map of string that contain list of uploaded files."
|
|
1227
|
+
},
|
|
1228
|
+
"defaultValue": "new Map()"
|
|
1229
|
+
},
|
|
1230
|
+
"valid": {
|
|
1231
|
+
"type": "boolean",
|
|
1232
|
+
"mutable": true,
|
|
1233
|
+
"complexType": {
|
|
1234
|
+
"original": "boolean",
|
|
1235
|
+
"resolved": "boolean",
|
|
1236
|
+
"references": {}
|
|
1237
|
+
},
|
|
1238
|
+
"required": false,
|
|
1239
|
+
"optional": false,
|
|
1240
|
+
"docs": {
|
|
1241
|
+
"tags": [],
|
|
1242
|
+
"text": "Property to read if filelist contains errors or not"
|
|
1243
|
+
},
|
|
1244
|
+
"attribute": "valid",
|
|
1245
|
+
"reflect": true,
|
|
1246
|
+
"defaultValue": "!this.required"
|
|
1247
|
+
},
|
|
1248
|
+
"labelDefaults": {
|
|
1249
|
+
"type": "string",
|
|
1250
|
+
"mutable": false,
|
|
1251
|
+
"complexType": {
|
|
1252
|
+
"original": "DuetLangObject | string",
|
|
1253
|
+
"resolved": "DuetLangObject | string",
|
|
1254
|
+
"references": {
|
|
1255
|
+
"DuetLangObject": {
|
|
1256
|
+
"location": "import",
|
|
1257
|
+
"path": "../../utils/language-utils"
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
},
|
|
1261
|
+
"required": false,
|
|
1262
|
+
"optional": false,
|
|
1263
|
+
"docs": {
|
|
1264
|
+
"tags": [{
|
|
1265
|
+
"name": "default",
|
|
1266
|
+
"text": "{ fi: \"Lis\u00E4\u00E4 liite\",sv: \"L\u00E4gg till en bilaga\",en: \"Add attachments\"}"
|
|
1267
|
+
}],
|
|
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"
|
|
1269
|
+
},
|
|
1270
|
+
"attribute": "label-default",
|
|
1271
|
+
"reflect": false,
|
|
1272
|
+
"defaultValue": "{\n fi: \"Lis\u00E4\u00E4 liite\",\n sv: \"L\u00E4gg till en bilaga\",\n en: \"Add attachments\",\n }"
|
|
1273
|
+
},
|
|
1274
|
+
"label": {
|
|
1275
|
+
"type": "string",
|
|
1276
|
+
"mutable": false,
|
|
1277
|
+
"complexType": {
|
|
1278
|
+
"original": "string",
|
|
1279
|
+
"resolved": "string",
|
|
1280
|
+
"references": {}
|
|
1281
|
+
},
|
|
1282
|
+
"required": false,
|
|
1283
|
+
"optional": false,
|
|
1284
|
+
"docs": {
|
|
1285
|
+
"tags": [{
|
|
1286
|
+
"name": "default",
|
|
1287
|
+
"text": "{ fi: \"Lis\u00E4\u00E4 liite\",sv: \"L\u00E4gg till en bilaga\",en: \"Add attachments\"}"
|
|
1288
|
+
}],
|
|
1289
|
+
"text": "Label for the input."
|
|
1290
|
+
},
|
|
1291
|
+
"attribute": "label",
|
|
1292
|
+
"reflect": false,
|
|
1293
|
+
"defaultValue": "getLocaleString(this.labelDefaults)"
|
|
1294
|
+
},
|
|
1295
|
+
"descriptionDefaults": {
|
|
1296
|
+
"type": "string",
|
|
1297
|
+
"mutable": false,
|
|
1298
|
+
"complexType": {
|
|
1299
|
+
"original": "DuetLangObject | string",
|
|
1300
|
+
"resolved": "DuetLangObject | string",
|
|
1301
|
+
"references": {
|
|
1302
|
+
"DuetLangObject": {
|
|
1303
|
+
"location": "import",
|
|
1304
|
+
"path": "../../utils/language-utils"
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
"required": false,
|
|
1309
|
+
"optional": false,
|
|
1310
|
+
"docs": {
|
|
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
|
+
}],
|
|
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"
|
|
1316
|
+
},
|
|
1317
|
+
"attribute": "description-default",
|
|
1318
|
+
"reflect": false,
|
|
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 }"
|
|
1320
|
+
},
|
|
1321
|
+
"description": {
|
|
1322
|
+
"type": "string",
|
|
1323
|
+
"mutable": false,
|
|
1324
|
+
"complexType": {
|
|
1325
|
+
"original": "string",
|
|
1326
|
+
"resolved": "string",
|
|
1327
|
+
"references": {}
|
|
1328
|
+
},
|
|
1329
|
+
"required": false,
|
|
1330
|
+
"optional": false,
|
|
1331
|
+
"docs": {
|
|
1332
|
+
"tags": [{
|
|
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}"
|
|
1335
|
+
}],
|
|
1336
|
+
"text": "Description for the upload component."
|
|
1337
|
+
},
|
|
1338
|
+
"attribute": "description",
|
|
1339
|
+
"reflect": false,
|
|
1340
|
+
"defaultValue": "getLocaleString(this.descriptionDefaults)"
|
|
1341
|
+
},
|
|
1342
|
+
"fileListEmptyDefaults": {
|
|
1343
|
+
"type": "string",
|
|
1344
|
+
"mutable": false,
|
|
1345
|
+
"complexType": {
|
|
1346
|
+
"original": "DuetLangObject | string",
|
|
1347
|
+
"resolved": "DuetLangObject | string",
|
|
1348
|
+
"references": {
|
|
1349
|
+
"DuetLangObject": {
|
|
1350
|
+
"location": "import",
|
|
1351
|
+
"path": "../../utils/language-utils"
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
"required": false,
|
|
1356
|
+
"optional": false,
|
|
1357
|
+
"docs": {
|
|
1358
|
+
"tags": [{
|
|
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}"
|
|
1361
|
+
}],
|
|
1362
|
+
"text": "Defaults for the filelist's empty state."
|
|
1363
|
+
},
|
|
1364
|
+
"attribute": "list-empty-default",
|
|
1365
|
+
"reflect": false,
|
|
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 }"
|
|
1367
|
+
},
|
|
1368
|
+
"fileListEmpty": {
|
|
1369
|
+
"type": "string",
|
|
1370
|
+
"mutable": false,
|
|
1371
|
+
"complexType": {
|
|
1372
|
+
"original": "string",
|
|
1373
|
+
"resolved": "string",
|
|
1374
|
+
"references": {}
|
|
1375
|
+
},
|
|
1376
|
+
"required": false,
|
|
1377
|
+
"optional": false,
|
|
1378
|
+
"docs": {
|
|
1379
|
+
"tags": [{
|
|
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.\"}"
|
|
1382
|
+
}],
|
|
1383
|
+
"text": "Label for the filelist's empty state."
|
|
1384
|
+
},
|
|
1385
|
+
"attribute": "file-list-empty",
|
|
1386
|
+
"reflect": false,
|
|
1387
|
+
"defaultValue": "getLocaleString(this.fileListEmptyDefaults)"
|
|
1388
|
+
},
|
|
1389
|
+
"error": {
|
|
1390
|
+
"type": "string",
|
|
1391
|
+
"mutable": false,
|
|
1392
|
+
"complexType": {
|
|
1393
|
+
"original": "string",
|
|
1394
|
+
"resolved": "string",
|
|
1395
|
+
"references": {}
|
|
1396
|
+
},
|
|
1397
|
+
"required": false,
|
|
1398
|
+
"optional": false,
|
|
1399
|
+
"docs": {
|
|
1400
|
+
"tags": [],
|
|
1401
|
+
"text": "Display the input in error state along with an error message."
|
|
1402
|
+
},
|
|
1403
|
+
"attribute": "error",
|
|
1404
|
+
"reflect": false,
|
|
1405
|
+
"defaultValue": "\"\""
|
|
1406
|
+
},
|
|
1407
|
+
"name": {
|
|
1408
|
+
"type": "string",
|
|
1409
|
+
"mutable": false,
|
|
1410
|
+
"complexType": {
|
|
1411
|
+
"original": "string",
|
|
1412
|
+
"resolved": "string",
|
|
1413
|
+
"references": {}
|
|
1414
|
+
},
|
|
1415
|
+
"required": false,
|
|
1416
|
+
"optional": false,
|
|
1417
|
+
"docs": {
|
|
1418
|
+
"tags": [],
|
|
1419
|
+
"text": "Name of the upload component."
|
|
1420
|
+
},
|
|
1421
|
+
"attribute": "name",
|
|
1422
|
+
"reflect": false
|
|
1423
|
+
},
|
|
1424
|
+
"maxBytes": {
|
|
1425
|
+
"type": "number",
|
|
1426
|
+
"mutable": false,
|
|
1427
|
+
"complexType": {
|
|
1428
|
+
"original": "number",
|
|
1429
|
+
"resolved": "number",
|
|
1430
|
+
"references": {}
|
|
1431
|
+
},
|
|
1432
|
+
"required": false,
|
|
1433
|
+
"optional": false,
|
|
1434
|
+
"docs": {
|
|
1435
|
+
"tags": [],
|
|
1436
|
+
"text": "Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded."
|
|
1437
|
+
},
|
|
1438
|
+
"attribute": "max-bytes",
|
|
1439
|
+
"reflect": false,
|
|
1440
|
+
"defaultValue": "200000000"
|
|
1441
|
+
},
|
|
1442
|
+
"maxBytesTotal": {
|
|
1443
|
+
"type": "number",
|
|
1444
|
+
"mutable": false,
|
|
1445
|
+
"complexType": {
|
|
1446
|
+
"original": "number",
|
|
1447
|
+
"resolved": "number",
|
|
1448
|
+
"references": {}
|
|
1449
|
+
},
|
|
1450
|
+
"required": false,
|
|
1451
|
+
"optional": false,
|
|
1452
|
+
"docs": {
|
|
1453
|
+
"tags": [],
|
|
1454
|
+
"text": "Use maxBytesTotal to specify the maximum size in Bytes of All files combined that can be uploaded."
|
|
1455
|
+
},
|
|
1456
|
+
"attribute": "max-bytes-total",
|
|
1457
|
+
"reflect": false,
|
|
1458
|
+
"defaultValue": "undefined"
|
|
1459
|
+
},
|
|
1460
|
+
"maxFiles": {
|
|
1461
|
+
"type": "number",
|
|
1462
|
+
"mutable": false,
|
|
1463
|
+
"complexType": {
|
|
1464
|
+
"original": "number",
|
|
1465
|
+
"resolved": "number",
|
|
1466
|
+
"references": {}
|
|
1467
|
+
},
|
|
1468
|
+
"required": false,
|
|
1469
|
+
"optional": false,
|
|
1470
|
+
"docs": {
|
|
1471
|
+
"tags": [],
|
|
1472
|
+
"text": "Use maxFiles to specify the maximum amount of files that can be uploaded"
|
|
1473
|
+
},
|
|
1474
|
+
"attribute": "max-files",
|
|
1475
|
+
"reflect": false,
|
|
1476
|
+
"defaultValue": "99"
|
|
1477
|
+
},
|
|
1478
|
+
"allowedExtensions": {
|
|
1479
|
+
"type": "string",
|
|
1480
|
+
"mutable": false,
|
|
1481
|
+
"complexType": {
|
|
1482
|
+
"original": "string",
|
|
1483
|
+
"resolved": "string",
|
|
1484
|
+
"references": {}
|
|
1485
|
+
},
|
|
1486
|
+
"required": false,
|
|
1487
|
+
"optional": false,
|
|
1488
|
+
"docs": {
|
|
1489
|
+
"tags": [{
|
|
1490
|
+
"name": "example",
|
|
1491
|
+
"text": ": .pdf,.doc,.docx"
|
|
1492
|
+
}],
|
|
1493
|
+
"text": "A string of commaseperated file type values that are allowed"
|
|
1494
|
+
},
|
|
1495
|
+
"attribute": "allowed-extensions",
|
|
1496
|
+
"reflect": false,
|
|
1497
|
+
"defaultValue": "\"all\""
|
|
1498
|
+
},
|
|
1499
|
+
"allowedMimetypes": {
|
|
1500
|
+
"type": "string",
|
|
1501
|
+
"mutable": false,
|
|
1502
|
+
"complexType": {
|
|
1503
|
+
"original": "string",
|
|
1504
|
+
"resolved": "string",
|
|
1505
|
+
"references": {}
|
|
1506
|
+
},
|
|
1507
|
+
"required": false,
|
|
1508
|
+
"optional": false,
|
|
1509
|
+
"docs": {
|
|
1510
|
+
"tags": [{
|
|
1511
|
+
"name": "example",
|
|
1512
|
+
"text": ": image/*,application/msword,"
|
|
1513
|
+
}],
|
|
1514
|
+
"text": "A string of commaseperated mime type values that are allowed"
|
|
1515
|
+
},
|
|
1516
|
+
"attribute": "allowed-mimetypes",
|
|
1517
|
+
"reflect": false,
|
|
1518
|
+
"defaultValue": "\"*\""
|
|
1519
|
+
},
|
|
1520
|
+
"multiple": {
|
|
1521
|
+
"type": "boolean",
|
|
1522
|
+
"mutable": false,
|
|
1523
|
+
"complexType": {
|
|
1524
|
+
"original": "boolean",
|
|
1525
|
+
"resolved": "boolean",
|
|
1526
|
+
"references": {}
|
|
1527
|
+
},
|
|
1528
|
+
"required": false,
|
|
1529
|
+
"optional": false,
|
|
1530
|
+
"docs": {
|
|
1531
|
+
"tags": [],
|
|
1532
|
+
"text": "Use multiple to allow the user to select multiple files when uploading"
|
|
1533
|
+
},
|
|
1534
|
+
"attribute": "multiple",
|
|
1535
|
+
"reflect": false,
|
|
1536
|
+
"defaultValue": "true"
|
|
1537
|
+
},
|
|
1538
|
+
"limitSelection": {
|
|
1539
|
+
"type": "boolean",
|
|
1540
|
+
"mutable": false,
|
|
1541
|
+
"complexType": {
|
|
1542
|
+
"original": "boolean",
|
|
1543
|
+
"resolved": "boolean",
|
|
1544
|
+
"references": {}
|
|
1545
|
+
},
|
|
1546
|
+
"required": false,
|
|
1547
|
+
"optional": false,
|
|
1548
|
+
"docs": {
|
|
1549
|
+
"tags": [],
|
|
1550
|
+
"text": "Use limitSelection to enforce the value in allowedExtension & allowedMimetypes when selecting files,\nby default this is off, setting this to true will limit the users choices to what has been explicitly set"
|
|
1551
|
+
},
|
|
1552
|
+
"attribute": "limit-selection",
|
|
1553
|
+
"reflect": false,
|
|
1554
|
+
"defaultValue": "false"
|
|
1555
|
+
},
|
|
1556
|
+
"value": {
|
|
1557
|
+
"type": "string",
|
|
1558
|
+
"mutable": true,
|
|
1559
|
+
"complexType": {
|
|
1560
|
+
"original": "string",
|
|
1561
|
+
"resolved": "string",
|
|
1562
|
+
"references": {}
|
|
1563
|
+
},
|
|
1564
|
+
"required": false,
|
|
1565
|
+
"optional": false,
|
|
1566
|
+
"docs": {
|
|
1567
|
+
"tags": [],
|
|
1568
|
+
"text": "Value of the input."
|
|
1569
|
+
},
|
|
1570
|
+
"attribute": "value",
|
|
1571
|
+
"reflect": false
|
|
1572
|
+
}
|
|
1573
|
+
}; }
|
|
1574
|
+
static get states() { return {
|
|
1575
|
+
"tick": {}
|
|
1576
|
+
}; }
|
|
1577
|
+
static get events() { return [{
|
|
1578
|
+
"method": "duetChange",
|
|
1579
|
+
"name": "duetChange",
|
|
1580
|
+
"bubbles": false,
|
|
1581
|
+
"cancelable": true,
|
|
1582
|
+
"composed": true,
|
|
1583
|
+
"docs": {
|
|
1584
|
+
"tags": [],
|
|
1585
|
+
"text": "Emitted when the value has changed."
|
|
1586
|
+
},
|
|
1587
|
+
"complexType": {
|
|
1588
|
+
"original": "DuetUploadEvent",
|
|
1589
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1590
|
+
"references": {
|
|
1591
|
+
"DuetUploadEvent": {
|
|
1592
|
+
"location": "local"
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
}, {
|
|
1597
|
+
"method": "duetBlur",
|
|
1598
|
+
"name": "duetBlur",
|
|
1599
|
+
"bubbles": true,
|
|
1600
|
+
"cancelable": true,
|
|
1601
|
+
"composed": true,
|
|
1602
|
+
"docs": {
|
|
1603
|
+
"tags": [],
|
|
1604
|
+
"text": "Emitted when the input loses focus."
|
|
1605
|
+
},
|
|
1606
|
+
"complexType": {
|
|
1607
|
+
"original": "DuetUploadEvent",
|
|
1608
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1609
|
+
"references": {
|
|
1610
|
+
"DuetUploadEvent": {
|
|
1611
|
+
"location": "local"
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
}, {
|
|
1616
|
+
"method": "duetFocus",
|
|
1617
|
+
"name": "duetFocus",
|
|
1618
|
+
"bubbles": true,
|
|
1619
|
+
"cancelable": true,
|
|
1620
|
+
"composed": true,
|
|
1621
|
+
"docs": {
|
|
1622
|
+
"tags": [],
|
|
1623
|
+
"text": "Emitted when the input has focus."
|
|
1624
|
+
},
|
|
1625
|
+
"complexType": {
|
|
1626
|
+
"original": "DuetUploadEvent",
|
|
1627
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1628
|
+
"references": {
|
|
1629
|
+
"DuetUploadEvent": {
|
|
1630
|
+
"location": "local"
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
}, {
|
|
1635
|
+
"method": "duetDone",
|
|
1636
|
+
"name": "duetDone",
|
|
1637
|
+
"bubbles": false,
|
|
1638
|
+
"cancelable": true,
|
|
1639
|
+
"composed": true,
|
|
1640
|
+
"docs": {
|
|
1641
|
+
"tags": [],
|
|
1642
|
+
"text": "Emitted when the current upload batch finishes"
|
|
1643
|
+
},
|
|
1644
|
+
"complexType": {
|
|
1645
|
+
"original": "DuetUploadEvent",
|
|
1646
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1647
|
+
"references": {
|
|
1648
|
+
"DuetUploadEvent": {
|
|
1649
|
+
"location": "local"
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
}, {
|
|
1654
|
+
"method": "duetState",
|
|
1655
|
+
"name": "duetState",
|
|
1656
|
+
"bubbles": false,
|
|
1657
|
+
"cancelable": true,
|
|
1658
|
+
"composed": true,
|
|
1659
|
+
"docs": {
|
|
1660
|
+
"tags": [],
|
|
1661
|
+
"text": "Emitted when the current validation state changes internally"
|
|
1662
|
+
},
|
|
1663
|
+
"complexType": {
|
|
1664
|
+
"original": "DuetUploadEvent",
|
|
1665
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1666
|
+
"references": {
|
|
1667
|
+
"DuetUploadEvent": {
|
|
1668
|
+
"location": "local"
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
}, {
|
|
1673
|
+
"method": "duetDelete",
|
|
1674
|
+
"name": "duetDelete",
|
|
1675
|
+
"bubbles": false,
|
|
1676
|
+
"cancelable": true,
|
|
1677
|
+
"composed": true,
|
|
1678
|
+
"docs": {
|
|
1679
|
+
"tags": [],
|
|
1680
|
+
"text": "Emitted when a user clicks delete to delete an uploaded file, or a file entry with error"
|
|
1681
|
+
},
|
|
1682
|
+
"complexType": {
|
|
1683
|
+
"original": "DuetUploadEvent",
|
|
1684
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1685
|
+
"references": {
|
|
1686
|
+
"DuetUploadEvent": {
|
|
1687
|
+
"location": "local"
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
}, {
|
|
1692
|
+
"method": "duetCancel",
|
|
1693
|
+
"name": "duetCancel",
|
|
1694
|
+
"bubbles": false,
|
|
1695
|
+
"cancelable": true,
|
|
1696
|
+
"composed": true,
|
|
1697
|
+
"docs": {
|
|
1698
|
+
"tags": [],
|
|
1699
|
+
"text": "Emitted when a user clicks cancel on an upload in progress"
|
|
1700
|
+
},
|
|
1701
|
+
"complexType": {
|
|
1702
|
+
"original": "DuetUploadEvent",
|
|
1703
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1704
|
+
"references": {
|
|
1705
|
+
"DuetUploadEvent": {
|
|
1706
|
+
"location": "local"
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
}, {
|
|
1711
|
+
"method": "duetProgress",
|
|
1712
|
+
"name": "duetProgress",
|
|
1713
|
+
"bubbles": false,
|
|
1714
|
+
"cancelable": true,
|
|
1715
|
+
"composed": true,
|
|
1716
|
+
"docs": {
|
|
1717
|
+
"tags": [],
|
|
1718
|
+
"text": "Emitted when the file progress is updated."
|
|
1719
|
+
},
|
|
1720
|
+
"complexType": {
|
|
1721
|
+
"original": "DuetUploadEvent",
|
|
1722
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1723
|
+
"references": {
|
|
1724
|
+
"DuetUploadEvent": {
|
|
1725
|
+
"location": "local"
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
}, {
|
|
1730
|
+
"method": "duetUpload",
|
|
1731
|
+
"name": "duetUpload",
|
|
1732
|
+
"bubbles": false,
|
|
1733
|
+
"cancelable": true,
|
|
1734
|
+
"composed": true,
|
|
1735
|
+
"docs": {
|
|
1736
|
+
"tags": [],
|
|
1737
|
+
"text": "Emitted when the user clicks the upload button"
|
|
1738
|
+
},
|
|
1739
|
+
"complexType": {
|
|
1740
|
+
"original": "DuetUploadEvent",
|
|
1741
|
+
"resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
|
|
1742
|
+
"references": {
|
|
1743
|
+
"DuetUploadEvent": {
|
|
1744
|
+
"location": "local"
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
}]; }
|
|
1749
|
+
static get methods() { return {
|
|
1750
|
+
"setFocus": {
|
|
1751
|
+
"complexType": {
|
|
1752
|
+
"signature": "(options?: FocusOptions) => Promise<void>",
|
|
1753
|
+
"parameters": [{
|
|
1754
|
+
"tags": [],
|
|
1755
|
+
"text": ""
|
|
1756
|
+
}],
|
|
1757
|
+
"references": {
|
|
1758
|
+
"Promise": {
|
|
1759
|
+
"location": "global"
|
|
1760
|
+
},
|
|
1761
|
+
"FocusOptions": {
|
|
1762
|
+
"location": "global"
|
|
1763
|
+
}
|
|
1764
|
+
},
|
|
1765
|
+
"return": "Promise<void>"
|
|
1766
|
+
},
|
|
1767
|
+
"docs": {
|
|
1768
|
+
"text": "Sets focus on the specified `duet-input`. Use this method instead of the global\n`input.focus()`.",
|
|
1769
|
+
"tags": []
|
|
1770
|
+
}
|
|
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
|
+
},
|
|
1791
|
+
"getFiles": {
|
|
1792
|
+
"complexType": {
|
|
1793
|
+
"signature": "() => Promise<false | { valid: any[]; invalid: any[]; }>",
|
|
1794
|
+
"parameters": [],
|
|
1795
|
+
"references": {
|
|
1796
|
+
"Promise": {
|
|
1797
|
+
"location": "global"
|
|
1798
|
+
}
|
|
1799
|
+
},
|
|
1800
|
+
"return": "Promise<false | { valid: any[]; invalid: any[]; }>"
|
|
1801
|
+
},
|
|
1802
|
+
"docs": {
|
|
1803
|
+
"text": "Get list of files, divided in errors and valid sections",
|
|
1804
|
+
"tags": []
|
|
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
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
}; }
|
|
1833
|
+
static get elementRef() { return "element"; }
|
|
1834
|
+
static get watchers() { return [{
|
|
1835
|
+
"propName": "valid",
|
|
1836
|
+
"methodName": "watchValidHandler"
|
|
1837
|
+
}]; }
|
|
1838
|
+
}
|