@duetds/components 5.3.2 → 5.3.3
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 +72 -38
- package/lib/cjs/duet-action-button.cjs.entry.js +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +1 -1
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
- package/lib/cjs/duet-card.cjs.entry.js +1 -1
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
- package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +72 -40
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +1 -1
- package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +1 -1
- package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-modal.cjs.entry.js +2 -2
- package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
- package/lib/cjs/duet-pagination_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-progress.cjs.entry.js +1 -1
- package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
- package/lib/cjs/duet-tray.cjs.entry.js +1 -1
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +2 -2
- package/lib/cjs/{focus-utils-1de1fb9e.js → focus-utils-54bf88c4.js} +1 -1
- package/lib/cjs/{index-e25673c3.js → index-d74701f0.js} +1 -1
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/collection/components/duet-upload/duet-upload.css +3 -3
- package/lib/collection/components/duet-upload/duet-upload.js +110 -24
- package/lib/collection/components/duet-upload/errorcodes.utils.js +5 -4
- package/lib/collection/components/duet-upload/mock.helpers.js +16 -5
- package/lib/collection/components/duet-upload/upload-editable-item-error.js +4 -4
- package/lib/collection/components/duet-upload/upload-editable-item-inprogres.js +5 -2
- package/lib/collection/components/duet-upload/upload-editable-item-pending.js +4 -3
- package/lib/collection/components/duet-upload/upload-validators.js +5 -5
- package/lib/collection/components/duet-upload/xhr.helpers.js +1 -0
- package/lib/custom-elements-bundle/index.js +72 -40
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-76502a6e.system.entry.js → p-017c8f85.system.entry.js} +1 -1
- package/lib/duet/{p-06d6fcbb.entry.js → p-05093845.entry.js} +1 -1
- package/lib/duet/{p-606f0e3e.system.entry.js → p-09f8d68b.system.entry.js} +1 -1
- package/lib/duet/{p-a00567c5.entry.js → p-0c2a368b.entry.js} +1 -1
- package/lib/duet/{p-096d3138.system.entry.js → p-0ed8f525.system.entry.js} +1 -1
- package/lib/duet/{p-a79524ea.system.entry.js → p-0fe15b1c.system.entry.js} +1 -1
- package/lib/duet/{p-44430576.entry.js → p-10dd6a3a.entry.js} +1 -1
- package/lib/duet/{p-e1dc474f.entry.js → p-1463ec25.entry.js} +1 -1
- package/lib/duet/{p-96bd5181.entry.js → p-187dac44.entry.js} +1 -1
- package/lib/duet/{p-3b90bf38.system.entry.js → p-1b971cb4.system.entry.js} +1 -1
- package/lib/duet/{p-e60b6064.system.entry.js → p-263d5c73.system.entry.js} +1 -1
- package/lib/duet/{p-83ccb4d1.system.entry.js → p-29b78a88.system.entry.js} +1 -1
- package/lib/duet/{p-9518a50d.entry.js → p-2ae81abd.entry.js} +1 -1
- package/lib/duet/{p-195cbb65.system.js → p-310cc65a.system.js} +1 -1
- package/lib/duet/{p-eed733d0.entry.js → p-31ee57ef.entry.js} +1 -1
- package/lib/duet/{p-7f720f3d.system.entry.js → p-323af601.system.entry.js} +1 -1
- package/lib/duet/{p-27e1329c.system.entry.js → p-334e765b.system.entry.js} +1 -1
- package/lib/duet/{p-eda03e7a.system.entry.js → p-3357023c.system.entry.js} +1 -1
- package/lib/duet/{p-bd361dca.entry.js → p-351c4ca8.entry.js} +1 -1
- package/lib/duet/{p-e8a19b86.system.entry.js → p-3d4098a1.system.entry.js} +1 -1
- package/lib/duet/{p-3a196674.entry.js → p-4390278a.entry.js} +1 -1
- package/lib/duet/{p-58f4df49.entry.js → p-4407c77f.entry.js} +1 -1
- package/lib/duet/{p-a2f33ea2.entry.js → p-4be003ee.entry.js} +1 -1
- package/lib/duet/{p-18f1a32e.js → p-4bfb3001.js} +1 -1
- package/lib/duet/{p-7acbb1cf.entry.js → p-4f4e6e7a.entry.js} +1 -1
- package/lib/duet/{p-ed86e7b8.system.entry.js → p-5231f09f.system.entry.js} +1 -1
- package/lib/duet/{p-27df7993.entry.js → p-52cd446d.entry.js} +1 -1
- package/lib/duet/{p-4eca850e.system.entry.js → p-53feaad0.system.entry.js} +1 -1
- package/lib/duet/{p-de007928.system.entry.js → p-54adb28a.system.entry.js} +1 -1
- package/lib/duet/{p-cd55d122.entry.js → p-5a134750.entry.js} +1 -1
- package/lib/duet/{p-6c4bb84d.system.entry.js → p-60903f76.system.entry.js} +1 -1
- package/lib/duet/{p-e5541622.entry.js → p-707e6bde.entry.js} +1 -1
- package/lib/duet/{p-f62c6c1a.entry.js → p-711c5825.entry.js} +1 -1
- package/lib/duet/{p-324c6a7f.system.entry.js → p-7a803a0f.system.entry.js} +1 -1
- package/lib/duet/{p-e53b41b1.js → p-7b37a578.js} +1 -1
- package/lib/duet/{p-b2351491.entry.js → p-7b776a5f.entry.js} +1 -1
- package/lib/duet/{p-60bc3fd1.entry.js → p-7ce0b78c.entry.js} +1 -1
- package/lib/duet/{p-94a68b9a.entry.js → p-7ee40ef2.entry.js} +1 -1
- package/lib/duet/{p-0a399341.system.entry.js → p-80db2a1e.system.entry.js} +1 -1
- package/lib/duet/{p-943a6f4f.entry.js → p-8ea1558f.entry.js} +1 -1
- package/lib/duet/{p-bc4dbe8f.system.entry.js → p-9195e263.system.entry.js} +1 -1
- package/lib/duet/{p-dfec73ab.system.entry.js → p-933b5471.system.entry.js} +1 -1
- package/lib/duet/{p-f68f4f90.entry.js → p-97395d40.entry.js} +1 -1
- package/lib/duet/{p-9b762624.entry.js → p-98aa8c7e.entry.js} +1 -1
- package/lib/duet/{p-c33d40b4.entry.js → p-997ef66e.entry.js} +1 -1
- package/lib/duet/{p-195f6e6b.system.entry.js → p-9db6c3ef.system.entry.js} +1 -1
- package/lib/duet/{p-40ba3e58.entry.js → p-9e8acf0a.entry.js} +1 -1
- package/lib/duet/{p-1147c2f3.system.entry.js → p-9e979cae.system.entry.js} +1 -1
- package/lib/duet/{p-b046cc6d.entry.js → p-a07b994c.entry.js} +1 -1
- package/lib/duet/{p-9e9a00fa.entry.js → p-a21321dc.entry.js} +1 -1
- package/lib/duet/{p-05503430.system.entry.js → p-a77df5a4.system.entry.js} +1 -1
- package/lib/duet/{p-14532cbb.system.entry.js → p-ac356267.system.entry.js} +1 -1
- package/lib/duet/{p-eab71bc1.entry.js → p-aea395e2.entry.js} +1 -1
- package/lib/duet/{p-47a3d44a.entry.js → p-aebf923d.entry.js} +1 -1
- package/lib/duet/p-b0053a35.entry.js +4 -0
- package/lib/duet/{p-a164b64d.entry.js → p-b112ecc7.entry.js} +1 -1
- package/lib/duet/{p-8e84cb24.system.entry.js → p-b52d2351.system.entry.js} +1 -1
- package/lib/duet/{p-efd2027f.system.entry.js → p-b717297c.system.entry.js} +1 -1
- package/lib/duet/{p-2980439e.system.entry.js → p-b786f4a1.system.entry.js} +1 -1
- package/lib/duet/{p-f36d233f.entry.js → p-b9f2984d.entry.js} +1 -1
- package/lib/duet/{p-13b08905.system.entry.js → p-badcd20b.system.entry.js} +1 -1
- package/lib/duet/{p-a541f140.entry.js → p-bd697adb.entry.js} +1 -1
- package/lib/duet/{p-07a4933d.system.entry.js → p-bd97848c.system.entry.js} +1 -1
- package/lib/duet/{p-6d6af360.entry.js → p-c0dea844.entry.js} +1 -1
- package/lib/duet/{p-7f501fed.system.entry.js → p-c2a4820d.system.entry.js} +1 -1
- package/lib/duet/p-cd0b0258.system.entry.js +4 -0
- package/lib/duet/{p-dd1cebc6.system.entry.js → p-cfc5df00.system.entry.js} +1 -1
- package/lib/duet/{p-781803f9.system.entry.js → p-d03be8d0.system.entry.js} +1 -1
- package/lib/duet/{p-c5353e57.system.entry.js → p-d06ccc00.system.entry.js} +1 -1
- package/lib/duet/{p-62f76416.entry.js → p-d0eceac9.entry.js} +1 -1
- package/lib/duet/{p-3e8e00aa.system.entry.js → p-d11db0d5.system.entry.js} +1 -1
- package/lib/duet/{p-f1ac8970.entry.js → p-d28243a8.entry.js} +1 -1
- package/lib/duet/{p-7065da4f.entry.js → p-d3d3538f.entry.js} +1 -1
- package/lib/duet/{p-b7a56046.entry.js → p-d749146f.entry.js} +1 -1
- package/lib/duet/{p-d2eec878.entry.js → p-d77dcab2.entry.js} +1 -1
- package/lib/duet/{p-cd6016c3.system.entry.js → p-daa9880c.system.entry.js} +1 -1
- package/lib/duet/{p-b15a7acd.entry.js → p-dadfe56f.entry.js} +1 -1
- package/lib/duet/{p-3a587bea.system.entry.js → p-dcfa2ae4.system.entry.js} +1 -1
- package/lib/duet/{p-29f6749b.system.js → p-e56acd55.system.js} +1 -1
- package/lib/duet/{p-abb3619b.entry.js → p-e58d06d9.entry.js} +1 -1
- package/lib/duet/{p-5f751350.entry.js → p-e6b88a4b.entry.js} +1 -1
- package/lib/duet/{p-fc847cc0.system.js → p-e97c0bf3.system.js} +1 -1
- package/lib/duet/{p-be2cc769.system.entry.js → p-efa06b0e.system.entry.js} +1 -1
- package/lib/duet/{p-dfa83a7b.entry.js → p-f23108a0.entry.js} +1 -1
- package/lib/duet/{p-8544ac3e.system.entry.js → p-f640e49b.system.entry.js} +1 -1
- package/lib/duet/{p-99fc1806.system.entry.js → p-f67a994f.system.entry.js} +1 -1
- package/lib/duet/{p-fdfa9d96.system.entry.js → p-f94cb455.system.entry.js} +1 -1
- package/lib/duet/{p-b2d8afd1.system.entry.js → p-f9787dbb.system.entry.js} +1 -1
- package/lib/duet/{p-fe7a158d.system.entry.js → p-fb761b8d.system.entry.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +1 -1
- package/lib/esm/duet-alert.entry.js +1 -1
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-breadcrumb.entry.js +1 -1
- package/lib/esm/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +1 -1
- package/lib/esm/duet-caption_4.entry.js +1 -1
- package/lib/esm/duet-card.entry.js +1 -1
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +2 -2
- package/lib/esm/duet-collapsible.entry.js +1 -1
- package/lib/esm/duet-combobox.entry.js +1 -1
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +2 -2
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table_3.entry.js +72 -40
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +1 -1
- package/lib/esm/duet-grid_2.entry.js +1 -1
- package/lib/esm/duet-header_2.entry.js +1 -1
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +1 -1
- package/lib/esm/duet-input_2.entry.js +1 -1
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-modal.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +1 -1
- package/lib/esm/duet-pagination_2.entry.js +1 -1
- package/lib/esm/duet-progress.entry.js +1 -1
- package/lib/esm/duet-radio_2.entry.js +1 -1
- package/lib/esm/duet-range-slider.entry.js +1 -1
- package/lib/esm/duet-scrollable_3.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +1 -1
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-textarea.entry.js +1 -1
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +1 -1
- package/lib/esm/duet-tray.entry.js +1 -1
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +2 -2
- package/lib/esm/{focus-utils-634e7bc9.js → focus-utils-2632e19f.js} +1 -1
- package/lib/esm/{index-59261780.js → index-ab50bfb2.js} +1 -1
- package/lib/esm/loader.js +2 -2
- package/lib/esm-es5/duet-action-button.entry.js +1 -1
- 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-breadcrumb.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm-es5/duet-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +1 -1
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-combobox.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_3.entry.js +1 -1
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +1 -1
- 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-pagination_2.entry.js +1 -1
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- 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-scrollable_3.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-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- 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-634e7bc9.js → focus-utils-2632e19f.js} +1 -1
- package/lib/esm-es5/{index-59261780.js → index-ab50bfb2.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/types/components/duet-upload/duet-upload.d.ts +22 -1
- package/lib/types/components/duet-upload/errorcodes.utils.d.ts +3 -2
- package/lib/types/components/duet-upload/mock.helpers.d.ts +0 -1
- package/lib/types/components/duet-upload/upload-editable-item-error.d.ts +2 -0
- package/lib/types/components/duet-upload/upload-validators.d.ts +2 -1
- package/lib/types/components.d.ts +22 -1
- package/package.json +5 -5
- package/lib/duet/p-2bc92bf3.entry.js +0 -4
- package/lib/duet/p-8342d3f7.system.entry.js +0 -4
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-
|
|
4
|
+
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { f as fieldSorter, d as debounce } from './js-utils-52e0944c.js';
|
|
7
7
|
import { i as isKeyboardClick } from './keyboard-utils-88ea1007.js';
|
|
8
8
|
import { g as getLocaleString, s as sanitizeString } from './language-utils-bf701d37.js';
|
|
9
9
|
import { m as mediaQueryMedium, h as mediaQueryLarge, i as mediaQueryXLarge, j as mediaQueryXxLarge, k as mediaQueryXxxLarge, l as mediaQuerySmall, n as sizeNavigation, s as sizeHeader } from './tokens.module-f4572ed7.js';
|
|
10
10
|
import { c as createID } from './create-id-981107da.js';
|
|
11
|
-
import './string-utils-5954f458.js';
|
|
11
|
+
import { p as parsePossibleJSON } from './string-utils-5954f458.js';
|
|
12
12
|
|
|
13
13
|
//simple functional component that renders the data in the table
|
|
14
14
|
const TableData = ({ data, groupId, alignment }, _children) => {
|
|
@@ -475,12 +475,13 @@ const errorCodes = [
|
|
|
475
475
|
}
|
|
476
476
|
];
|
|
477
477
|
|
|
478
|
-
const getError = (code) => {
|
|
478
|
+
const getError = (code, errorCodes) => {
|
|
479
479
|
let error = {
|
|
480
480
|
type: undefined,
|
|
481
481
|
system_message: undefined,
|
|
482
482
|
message: undefined,
|
|
483
483
|
};
|
|
484
|
+
errorCodes = parsePossibleJSON(errorCodes);
|
|
484
485
|
error = errorCodes.filter(errorItem => {
|
|
485
486
|
// the == is intentional we may be comparing numbers to strings - and that is ok here
|
|
486
487
|
return errorItem.type == code;
|
|
@@ -492,8 +493,8 @@ const getError = (code) => {
|
|
|
492
493
|
}
|
|
493
494
|
return error;
|
|
494
495
|
};
|
|
495
|
-
const getI18nError = (errorCode) => {
|
|
496
|
-
const errorFromJson = getError(errorCode);
|
|
496
|
+
const getI18nError = (errorCode, errorCodes) => {
|
|
497
|
+
const errorFromJson = getError(errorCode, errorCodes);
|
|
497
498
|
const i18String = getLocaleString(errorFromJson.message);
|
|
498
499
|
if (i18String === "" || !i18String) {
|
|
499
500
|
return errorFromJson.system_message;
|
|
@@ -503,25 +504,29 @@ const getI18nError = (errorCode) => {
|
|
|
503
504
|
}
|
|
504
505
|
};
|
|
505
506
|
|
|
506
|
-
const ErrorItem = ({ data }) => {
|
|
507
|
+
const ErrorItem = ({ data, errorCodes }) => {
|
|
507
508
|
const { item, error } = data;
|
|
508
509
|
const { name } = item;
|
|
509
510
|
const { type } = error;
|
|
510
511
|
return (h("span", { class: "duet-upload-item-error", role: "status" },
|
|
511
512
|
h("duet-paragraph", { class: "duet-upload-item-name", color: "danger", margin: "none", weight: "semi-bold" },
|
|
512
|
-
h("duet-icon", { margin: "none", size: "
|
|
513
|
-
" ",
|
|
513
|
+
h("duet-icon", { margin: "none", size: "x-small", name: "messaging-attachment" }),
|
|
514
|
+
h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
514
515
|
name),
|
|
515
|
-
h("duet-paragraph", { class: "duet-upload-item-error-label", size: "small", margin: "none", color: "danger" }, getI18nError(type))));
|
|
516
|
+
h("duet-paragraph", { class: "duet-upload-item-error-label", size: "small", margin: "none", color: "danger" }, getI18nError(type, errorCodes))));
|
|
516
517
|
};
|
|
517
518
|
|
|
518
|
-
const ProgressItem = ({ progress, name }) => (h("span",
|
|
519
|
-
h("duet-
|
|
519
|
+
const ProgressItem = ({ progress, name }) => (h("span", { class: "duet-upload-item-name" },
|
|
520
|
+
h("duet-icon", { margin: "none", size: "x-small", name: "messaging-attachment" }),
|
|
521
|
+
h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
522
|
+
name,
|
|
523
|
+
h("br", null),
|
|
520
524
|
h("duet-progress", { progress: Math.ceil(progress), "aria-hidden": true })));
|
|
521
525
|
|
|
522
|
-
const PendingItem = ({ name }) => (h("span",
|
|
523
|
-
h("duet-
|
|
524
|
-
h("duet-spacer", { size: "xx-small" })
|
|
526
|
+
const PendingItem = ({ name }) => (h("span", { class: "duet-upload-item-name" },
|
|
527
|
+
h("duet-icon", { margin: "none", size: "x-small", name: "messaging-attachment" }),
|
|
528
|
+
h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
|
|
529
|
+
name));
|
|
525
530
|
|
|
526
531
|
const formatBytes = (bytes, decimals = 2) => {
|
|
527
532
|
if (bytes === 0) {
|
|
@@ -590,23 +595,23 @@ const validateFileSize = (size, maxBytes) => {
|
|
|
590
595
|
}
|
|
591
596
|
return maxBytes >= size;
|
|
592
597
|
};
|
|
593
|
-
const validateFile = (item, validators) => {
|
|
598
|
+
const validateFile = (item, validators, errorCodes) => {
|
|
594
599
|
const { allowedMimetypes, allowedExtensions, maxBytes } = validators;
|
|
595
600
|
let valid = false;
|
|
596
|
-
let errorMessage = getError("default");
|
|
601
|
+
let errorMessage = getError("default", errorCodes);
|
|
597
602
|
if (item) {
|
|
598
603
|
const { name, type, size } = item;
|
|
599
604
|
const mime = validateFileMime(type, allowedMimetypes);
|
|
600
605
|
const ext = validateFileExtension(name.toLowerCase(), allowedExtensions);
|
|
601
606
|
const bytes = validateFileSize(size, maxBytes);
|
|
602
607
|
if (!mime) {
|
|
603
|
-
errorMessage = getError("duet-upload-101");
|
|
608
|
+
errorMessage = getError("duet-upload-101", errorCodes);
|
|
604
609
|
}
|
|
605
610
|
if (!ext) {
|
|
606
|
-
errorMessage = getError("duet-upload-100");
|
|
611
|
+
errorMessage = getError("duet-upload-100", errorCodes);
|
|
607
612
|
}
|
|
608
613
|
if (!bytes) {
|
|
609
|
-
errorMessage = getError("duet-upload-201");
|
|
614
|
+
errorMessage = getError("duet-upload-201", errorCodes);
|
|
610
615
|
}
|
|
611
616
|
valid = mime && ext && bytes;
|
|
612
617
|
}
|
|
@@ -650,6 +655,7 @@ const validateTotalAmountIsAboveMax = (filelist, maxFiles) => {
|
|
|
650
655
|
};
|
|
651
656
|
|
|
652
657
|
const makeXhrRequest = ({ payload, options, onFailure, onSuccess, onProgress }) => {
|
|
658
|
+
// @ts-ignore
|
|
653
659
|
const { type = "POST", xhr, uri, argument = null, headers = null } = options;
|
|
654
660
|
xhr.open(type, `${uri}${argument || ""}`, true);
|
|
655
661
|
const { data, name } = payload;
|
|
@@ -677,7 +683,7 @@ const makeXhrRequest = ({ payload, options, onFailure, onSuccess, onProgress })
|
|
|
677
683
|
return xhr;
|
|
678
684
|
};
|
|
679
685
|
|
|
680
|
-
const duetUploadCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button){border:0}.duet-upload-editable-table .duet-upload-item-name duet-icon{position:relative;top:2px}duet-paragraph::part(duet-paragraph){word-break:break-word}";
|
|
686
|
+
const duetUploadCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}.duet-upload-editable-table .duet-upload-item-name duet-icon{position:relative;top:2px}duet-paragraph::part(duet-paragraph){word-break:break-word}";
|
|
681
687
|
|
|
682
688
|
const DuetUpload = class {
|
|
683
689
|
constructor(hostRef) {
|
|
@@ -685,6 +691,7 @@ const DuetUpload = class {
|
|
|
685
691
|
this.duetChange = createEvent(this, "duetChange", 3);
|
|
686
692
|
this.duetBlur = createEvent(this, "duetBlur", 7);
|
|
687
693
|
this.duetFocus = createEvent(this, "duetFocus", 7);
|
|
694
|
+
this.duetReady = createEvent(this, "duetReady", 7);
|
|
688
695
|
this.duetDone = createEvent(this, "duetDone", 3);
|
|
689
696
|
this.duetState = createEvent(this, "duetState", 3);
|
|
690
697
|
this.duetDelete = createEvent(this, "duetDelete", 3);
|
|
@@ -700,6 +707,10 @@ const DuetUpload = class {
|
|
|
700
707
|
* it will be up to you to handle the upload and return progress information to the upload-component
|
|
701
708
|
*/
|
|
702
709
|
this.external = false;
|
|
710
|
+
/**
|
|
711
|
+
* If internal upload method is used, and this has been set to a function - it will be called with the XHR options before the reqeust is sent, return an updated XHR options object in order to manipulate the request
|
|
712
|
+
*/
|
|
713
|
+
this.middleware = null;
|
|
703
714
|
/**
|
|
704
715
|
* If defer-upload is true, duet-upload will not (as recommended) instantly upload files but await a call to uploadPending()
|
|
705
716
|
*/
|
|
@@ -719,7 +730,7 @@ const DuetUpload = class {
|
|
|
719
730
|
size: "x-small",
|
|
720
731
|
background: "gray-lightest",
|
|
721
732
|
name: "delete",
|
|
722
|
-
map: ["success", "failure"
|
|
733
|
+
map: ["success", "failure"],
|
|
723
734
|
label: {
|
|
724
735
|
fi: "Poista tiedosto",
|
|
725
736
|
en: "Poista tiedosto",
|
|
@@ -732,7 +743,7 @@ const DuetUpload = class {
|
|
|
732
743
|
size: "x-small",
|
|
733
744
|
background: "gray-lightest",
|
|
734
745
|
name: "cancel",
|
|
735
|
-
map: ["inprogress"],
|
|
746
|
+
map: ["inprogress", "pending"],
|
|
736
747
|
label: {
|
|
737
748
|
fi: "Keskeytä lähetys",
|
|
738
749
|
en: "Cancel the upload",
|
|
@@ -926,6 +937,10 @@ const DuetUpload = class {
|
|
|
926
937
|
* Display the input in error state along with an error message.
|
|
927
938
|
*/
|
|
928
939
|
this.error = "";
|
|
940
|
+
/**
|
|
941
|
+
* Default errorcodes used by the component, modifiable via javascript
|
|
942
|
+
*/
|
|
943
|
+
this.errorCodes = errorCodes;
|
|
929
944
|
/**
|
|
930
945
|
* Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded.
|
|
931
946
|
*/
|
|
@@ -1081,7 +1096,7 @@ const DuetUpload = class {
|
|
|
1081
1096
|
return h(PendingItem, { name: data.item.name });
|
|
1082
1097
|
}
|
|
1083
1098
|
else if (group === this.DefaultGroups.failure) {
|
|
1084
|
-
return h(ErrorItem, { data: data });
|
|
1099
|
+
return h(ErrorItem, { data: data, errorCodes: this.errorCodes });
|
|
1085
1100
|
}
|
|
1086
1101
|
else if (data.group) {
|
|
1087
1102
|
return data.html;
|
|
@@ -1196,7 +1211,7 @@ const DuetUpload = class {
|
|
|
1196
1211
|
this.updateValueInMap(name, "valid", false, true);
|
|
1197
1212
|
};
|
|
1198
1213
|
this.transferFailed = name => {
|
|
1199
|
-
this.updateValueInMap(name, "error",
|
|
1214
|
+
this.updateValueInMap(name, "error", getI18nError("duet-upload-001", this.errorCodes));
|
|
1200
1215
|
};
|
|
1201
1216
|
this.transferCanceled = name => {
|
|
1202
1217
|
this.files.delete(name);
|
|
@@ -1207,10 +1222,10 @@ const DuetUpload = class {
|
|
|
1207
1222
|
const isTotalSizeOverMaxSize = validateTotalSizeIsAboveMax(this.files, this.maxBytesTotal);
|
|
1208
1223
|
const isTotalFileAmountAboveMax = validateTotalAmountIsAboveMax(this.files, this.maxFiles);
|
|
1209
1224
|
if (isTotalSizeOverMaxSize && name) {
|
|
1210
|
-
this.updateValueInMap(name, "error",
|
|
1225
|
+
this.updateValueInMap(name, "error", getI18nError("duet-upload-202", this.errorCodes), false);
|
|
1211
1226
|
}
|
|
1212
1227
|
if (isTotalFileAmountAboveMax && name) {
|
|
1213
|
-
this.updateValueInMap(name, "error",
|
|
1228
|
+
this.updateValueInMap(name, "error", getI18nError("duet-upload-301", this.errorCodes), false);
|
|
1214
1229
|
}
|
|
1215
1230
|
this.bytesMaxReached = isTotalSizeOverMaxSize;
|
|
1216
1231
|
this.fileMaxReached = isTotalFileAmountAboveMax;
|
|
@@ -1291,7 +1306,9 @@ const DuetUpload = class {
|
|
|
1291
1306
|
this.files.delete(retrievedKey);
|
|
1292
1307
|
if (!this.external) {
|
|
1293
1308
|
const { xhr } = cancelledItem;
|
|
1294
|
-
xhr
|
|
1309
|
+
if (xhr) {
|
|
1310
|
+
xhr.abort();
|
|
1311
|
+
}
|
|
1295
1312
|
}
|
|
1296
1313
|
else {
|
|
1297
1314
|
this.kick();
|
|
@@ -1332,6 +1349,11 @@ const DuetUpload = class {
|
|
|
1332
1349
|
component: "duet-upload",
|
|
1333
1350
|
});
|
|
1334
1351
|
};
|
|
1352
|
+
this.onReady = () => {
|
|
1353
|
+
this.duetReady.emit({
|
|
1354
|
+
component: "duet-upload",
|
|
1355
|
+
});
|
|
1356
|
+
};
|
|
1335
1357
|
this.onDone = () => {
|
|
1336
1358
|
this.duetDone.emit({
|
|
1337
1359
|
component: "duet-upload",
|
|
@@ -1438,6 +1460,7 @@ const DuetUpload = class {
|
|
|
1438
1460
|
}
|
|
1439
1461
|
inheritGlobalTheme(this);
|
|
1440
1462
|
this.listenForActionEvents();
|
|
1463
|
+
this.onReady();
|
|
1441
1464
|
}
|
|
1442
1465
|
componentWillRender() {
|
|
1443
1466
|
// listen to the events from the component
|
|
@@ -1507,7 +1530,7 @@ const DuetUpload = class {
|
|
|
1507
1530
|
"duet-upload-filelist-filled": this.files.size,
|
|
1508
1531
|
}, id: this.labelId, for: identifier }, h("span", { class: {
|
|
1509
1532
|
"duet-upload-filelist-empty-label": !this.files.size,
|
|
1510
|
-
} }, this.fileListEmpty))), !!this.files.size && h("slot", { name: "fileheader" }), !!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.internalStatusMessageLabel })), !!this.files.size && this.renderEditableTableGroups(), !!this.files.size && h("slot", { name: "filefooter" }), h("duet-spacer", { size: "large" }), !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", part: this.identifier ? `${this.identifier}-button-upload` : "duet-upload-button-upload" }, this.buttonLabel)), h("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (h("duet-alert", { part: this.identifier ? `${this.identifier}-error-notification` : "duet-upload-error-notification" }, this.fileMaxReached && getI18nError("duet-upload-301"), this.bytesMaxReached && getI18nError("duet-upload-202"))), h("duet-spacer", { size: "medium" }), h("duet-visually-hidden", null, h("input", { ref: input => {
|
|
1533
|
+
} }, this.fileListEmpty))), !!this.files.size && h("slot", { name: "fileheader" }), !!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.internalStatusMessageLabel })), !!this.files.size && this.renderEditableTableGroups(), !!this.files.size && h("slot", { name: "filefooter" }), h("duet-spacer", { size: "large" }), !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", part: this.identifier ? `${this.identifier}-button-upload` : "duet-upload-button-upload" }, this.buttonLabel)), h("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (h("duet-alert", { part: this.identifier ? `${this.identifier}-error-notification` : "duet-upload-error-notification" }, this.fileMaxReached && getI18nError("duet-upload-301", this.errorCodes), this.bytesMaxReached && getI18nError("duet-upload-202", this.errorCodes))), h("duet-spacer", { size: "medium" }), h("duet-visually-hidden", null, h("input", { ref: input => {
|
|
1511
1534
|
this.nativeInput = input;
|
|
1512
1535
|
}, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
|
|
1513
1536
|
"duet-upload": true,
|
|
@@ -1531,34 +1554,43 @@ const DuetUpload = class {
|
|
|
1531
1554
|
xhr.upload.addEventListener("abort", () => {
|
|
1532
1555
|
this.transferCanceled(name);
|
|
1533
1556
|
});
|
|
1534
|
-
|
|
1557
|
+
let options = {
|
|
1535
1558
|
payload: { data, name },
|
|
1536
|
-
options: { type: "POST", uri: this.uri, xhr, argument: null, headers:
|
|
1559
|
+
options: { type: "POST", uri: this.uri, xhr, argument: null, headers: undefined },
|
|
1537
1560
|
onFailure: this.transferDoneWithFailure,
|
|
1538
1561
|
onSuccess: this.transferDone,
|
|
1539
1562
|
onProgress: this.trackProgress,
|
|
1540
|
-
}
|
|
1563
|
+
};
|
|
1564
|
+
if (this.middleware) {
|
|
1565
|
+
options = this.middleware(options);
|
|
1566
|
+
}
|
|
1567
|
+
return makeXhrRequest(options);
|
|
1541
1568
|
}
|
|
1542
1569
|
makeXHRDeleteRequest(data) {
|
|
1543
1570
|
const { uid, item } = data;
|
|
1544
1571
|
const xhr = new XMLHttpRequest();
|
|
1545
|
-
|
|
1546
|
-
|
|
1572
|
+
const headers = {
|
|
1573
|
+
"x-fileuid": uid,
|
|
1574
|
+
"x-filename": item.name,
|
|
1575
|
+
};
|
|
1576
|
+
let options = {
|
|
1547
1577
|
payload: { data: null, name },
|
|
1548
1578
|
options: {
|
|
1549
1579
|
type: "DELETE",
|
|
1550
1580
|
xhr,
|
|
1551
1581
|
uri: this.uri,
|
|
1552
|
-
|
|
1553
|
-
headers
|
|
1554
|
-
"x-fileuid": uid,
|
|
1555
|
-
"x-filename": item.name,
|
|
1556
|
-
},
|
|
1582
|
+
argument: `?key=${uid}&name=${item.name}`,
|
|
1583
|
+
headers,
|
|
1557
1584
|
},
|
|
1558
1585
|
onFailure: this.transferDoneWithFailure,
|
|
1559
1586
|
onSuccess: this.transferDone,
|
|
1560
1587
|
onProgress: this.trackProgress,
|
|
1561
|
-
}
|
|
1588
|
+
};
|
|
1589
|
+
if (this.middleware) {
|
|
1590
|
+
options = this.middleware(options);
|
|
1591
|
+
}
|
|
1592
|
+
// don't present server issues to user on deletes, just remove them from the visible list
|
|
1593
|
+
return makeXhrRequest(options);
|
|
1562
1594
|
}
|
|
1563
1595
|
/**
|
|
1564
1596
|
* Component event handling.
|
|
@@ -1575,7 +1607,7 @@ const DuetUpload = class {
|
|
|
1575
1607
|
maxBytes: this.maxBytes,
|
|
1576
1608
|
allowedExtensions: this.allowedExtensions,
|
|
1577
1609
|
allowedMimetypes: this.allowedMimetypes,
|
|
1578
|
-
});
|
|
1610
|
+
}, this.errorCodes);
|
|
1579
1611
|
const uid = this.genHashName();
|
|
1580
1612
|
const fileListItem = {
|
|
1581
1613
|
uid,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
|
|
7
7
|
const duetEmptyStateCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:#00294d;text-align:center;background:#f5f8fa;border-radius:4px}.duet-empty-state.duet-theme-turva{color:#171c3a;background:#f5f5f7}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { c as createID } from './create-id-981107da.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent$1, h, F as Fragment, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent$1, h, F as Fragment, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { a as actionNewWindowSmall } from './action-new-window-small-1945be91.js';
|
|
6
6
|
import { D as DuetStringsExternalDefaults } from './common-strings-97e04e4b.js';
|
|
7
7
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, g as getElement, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, g as getElement, H as Host } from './index-ab50bfb2.js';
|
|
5
5
|
import { m as media_query_large, a as media_query_medium, b as media_query_small } from './tokens-8ff8c570.js';
|
|
6
6
|
import { w as watchForOptions, a as watchForElement } from './watch-options-dd55bce8.js';
|
|
7
7
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { h, r as registerInstance, c as createEvent$1, F as Fragment, H as Host, g as getElement } from './index-
|
|
4
|
+
import { h, r as registerInstance, c as createEvent$1, F as Fragment, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { f as formSearch } from './form-search-ea8e19ae.js';
|
|
6
6
|
import { m as media_query_large } from './tokens-8ff8c570.js';
|
|
7
7
|
import { d as disableBodyScroll, e as enableBodyScroll } from './bodyScrollLock.es6-61b5e9a4.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { a as actionNewWindowSmall } from './action-new-window-small-1945be91.js';
|
|
6
6
|
import { D as DuetStringsExternalDefaults } from './common-strings-97e04e4b.js';
|
|
7
7
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { E as Env, r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { E as Env, r as registerInstance, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { g as getColorByName } from './token-utils-1f9435bc.js';
|
|
7
7
|
import './tokens.module-f4572ed7.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { f as formSearch } from './form-search-ea8e19ae.js';
|
|
6
6
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
7
7
|
import { c as createID } from './create-id-981107da.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as isInternetExplorer } from './is-internet-explorer-62b3bdbd.js';
|
|
6
6
|
|
|
7
7
|
const duetLayoutCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex:1 0 auto;width:100%}:host(.duet-middle){display:flex}:host(.duet-middle) .duet-layout{padding:36px 28px !important}@media (min-width: 36em){:host(.duet-middle) .duet-layout{padding:48px 36px !important}}@media (min-width: 62em){:host(.duet-middle) .duet-layout{padding:56px !important}}:host(.duet-ie){height:100%}:host(.duet-middle.duet-ie){height:auto}.duet-layout{position:relative;padding:0 16px;margin:48px auto 36px}@media (min-width: 36em){.duet-layout{margin-top:72px}}.duet-layout.duet-layout-has-top{margin-top:0}.duet-layout.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout.duet-center{display:flex;align-items:center;justify-content:center;width:100%;max-width:888px}@media (min-width: 36em){.duet-layout.duet-center{padding:0 48px}}@media (min-width: 48em){.duet-layout.duet-center{padding:0 72px}}@media (min-width: 62em){.duet-layout.duet-center{width:100%}}@media (min-width: 36em){.duet-layout{padding:0 28px}}@media (min-width: 62em){.duet-layout{display:flex;flex-direction:row;padding:0 56px;margin-bottom:48px}}@media (min-width: 76.25em){.duet-layout{max-width:1110px;padding:0}}.duet-main,.duet-sidebar,.duet-layout-top,.duet-layout-bottom{display:block;width:100%}.duet-layout-top{position:relative;display:block;width:100%;margin:72px auto 0}.duet-layout-top.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout-top .duet-layout-top-wrapper{padding:0 20px;margin:0 auto}@media (min-width: 36em){.duet-layout-top .duet-layout-top-wrapper{padding:0 28px}}@media (min-width: 62em){.duet-layout-top .duet-layout-top-wrapper{padding:0 56px}}@media (min-width: 76.25em){.duet-layout-top .duet-layout-top-wrapper{max-width:1110px;padding:0}}.duet-center .duet-layout-top-wrapper{max-width:888px}@media (min-width: 36em){.duet-center .duet-layout-top-wrapper{padding:0 48px}}@media (min-width: 48em){.duet-center .duet-layout-top-wrapper{padding:0 72px}}@media (min-width: 62em){.duet-main{min-width:600px;margin:0 auto}.has-sidebar .duet-main{max-width:734px;margin-right:20px}}@media (min-width: 62em){.duet-sidebar{min-width:256px;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container{width:auto;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container.has-tabs{margin-top:89px}}@media (min-width: 62em){.duet-sidebar-container.sticky{position:sticky}.duet-sidebar-container.sticky.with-links{top:calc(3rem + 20px)}.duet-sidebar-container.sticky.without-links{top:calc(4rem + 20px)}}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, g as getElement, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, g as getElement, H as Host } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { w as watchForOptions } from './watch-options-dd55bce8.js';
|
|
7
7
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { d as disableBodyScroll, e as enableBodyScroll } from './bodyScrollLock.es6-61b5e9a4.js';
|
|
6
6
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
7
7
|
import { c as createID } from './create-id-981107da.js';
|
|
8
|
-
import { f as focusElement, F as FocusGuard } from './focus-utils-
|
|
8
|
+
import { f as focusElement, F as FocusGuard } from './focus-utils-2632e19f.js';
|
|
9
9
|
import { f as isEscapeKey } from './keyboard-utils-88ea1007.js';
|
|
10
10
|
import { a as getLanguage, g as getLocaleString } from './language-utils-bf701d37.js';
|
|
11
11
|
import './string-utils-5954f458.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { a as getLanguage, g as getLocaleString } from './language-utils-bf701d37.js';
|
|
7
7
|
import { a as actionArrowDownSmall } from './action-arrow-down-small-82273dc8.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { c as createID } from './create-id-981107da.js';
|
|
7
7
|
import { a as isArrowRightKey, b as isArrowUpKey, c as isArrowDownKey, d as isArrowLeftKey, e as isBackspaceKey } from './keyboard-utils-88ea1007.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { c as createID } from './create-id-981107da.js';
|
|
7
7
|
import { d as debounce } from './js-utils-52e0944c.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { c as createID } from './create-id-981107da.js';
|
|
7
7
|
import { g as getLocaleString } from './language-utils-bf701d37.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { c as createID } from './create-id-981107da.js';
|
|
7
7
|
import { f as findCheckedOption, w as watchForOptions } from './watch-options-dd55bce8.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { c as colorPrimaryTurva, a as colorGrayTurva, b as colorPrimary, d as colorGray } from './tokens.module-f4572ed7.js';
|
|
6
6
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
7
7
|
import { c as createID } from './create-id-981107da.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { g as getLocaleString, a as getLanguage } from './language-utils-bf701d37.js';
|
|
7
7
|
import { c as createID } from './create-id-981107da.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { c as createID } from './create-id-981107da.js';
|
|
7
7
|
import { p as parsePossibleJSON } from './string-utils-5954f458.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { c as createID } from './create-id-981107da.js';
|
|
7
7
|
import { i as isKeyboardClick } from './keyboard-utils-88ea1007.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { c as createID } from './create-id-981107da.js';
|
|
7
7
|
import { c as cleanValue } from './input-utils-de45e099.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { c as createID } from './create-id-981107da.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
6
6
|
import { c as createID } from './create-id-981107da.js';
|
|
7
7
|
import { a as getLanguage, g as getLocaleString } from './language-utils-bf701d37.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, F as Fragment, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, F as Fragment, g as getElement } from './index-ab50bfb2.js';
|
|
5
5
|
import { s as sizeHeader } from './tokens.module-f4572ed7.js';
|
|
6
6
|
import { i as inheritGlobalTheme } from './themeable-component-cb76be7c.js';
|
|
7
7
|
import { c as createID } from './create-id-981107da.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-ab50bfb2.js';
|
|
5
5
|
|
|
6
6
|
const duetVisuallyHiddenCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}";
|
|
7
7
|
|