@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,232 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
|
+
|
|
8
|
+
const index = require('./index-b724d698.js');
|
|
9
|
+
const languageUtils = require('./language-utils-aa282901.js');
|
|
10
|
+
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
|
+
const tokenUtils = require('./token-utils-63a9c8dc.js');
|
|
12
|
+
const createId = require('./create-id-c3b984b1.js');
|
|
13
|
+
require('./string-utils-267e3dbb.js');
|
|
14
|
+
require('./tokens.module-6b2df1c2.js');
|
|
15
|
+
|
|
16
|
+
const duetEditableTableButtonCss = "*.sc-duet-editable-table-button,*.sc-duet-editable-table-button::after,*.sc-duet-editable-table-button::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button{display:flex;align-content:space-between;justify-content:center;min-width:32px;max-width:32px;height:100%;min-height:32px;max-height:32px;padding:0;margin:0;cursor:pointer !important;background-color:transparent;border:1px solid;border-radius:50%}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button duet-icon.sc-duet-editable-table-button{align-self:center}";
|
|
17
|
+
|
|
18
|
+
let DuetEditableTableButton = class {
|
|
19
|
+
constructor(hostRef) {
|
|
20
|
+
index.registerInstance(this, hostRef);
|
|
21
|
+
this.duetEditableItemAction = index.createEvent(this, "duetEditableItemAction", 7);
|
|
22
|
+
this.isHovering = false;
|
|
23
|
+
/**
|
|
24
|
+
* Theme of the empty state component.
|
|
25
|
+
*/
|
|
26
|
+
this.theme = "";
|
|
27
|
+
/**
|
|
28
|
+
* action items passed from host component
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
this.actions = undefined;
|
|
32
|
+
/**
|
|
33
|
+
* uid that gets passed along when the action is emitted
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
this.uid = "";
|
|
37
|
+
/**
|
|
38
|
+
* group associated with action
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
this.group = "";
|
|
42
|
+
/**
|
|
43
|
+
* key of the item in the map
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
this.keyName = "";
|
|
47
|
+
this.onMouseEnter = () => {
|
|
48
|
+
this.isHovering = true;
|
|
49
|
+
};
|
|
50
|
+
this.onMouseLeave = () => {
|
|
51
|
+
this.isHovering = false;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
/**
|
|
56
|
+
* Component lifecycle events.
|
|
57
|
+
*/
|
|
58
|
+
componentWillLoad() {
|
|
59
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
/**
|
|
63
|
+
* private functions
|
|
64
|
+
*/
|
|
65
|
+
emitActionEvent(ev) {
|
|
66
|
+
this.duetEditableItemAction.emit({
|
|
67
|
+
originalEvent: ev,
|
|
68
|
+
uid: this.uid,
|
|
69
|
+
group: this.group,
|
|
70
|
+
action: this.actions.id,
|
|
71
|
+
keyName: this.keyName,
|
|
72
|
+
component: "duet-editable-table-item",
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* render() function
|
|
77
|
+
* Always the last one in the class.
|
|
78
|
+
*/
|
|
79
|
+
render() {
|
|
80
|
+
return (index.h("button", { style: {
|
|
81
|
+
"border-color": this.isHovering
|
|
82
|
+
? tokenUtils.getColorByName(this.actions.color_hover)
|
|
83
|
+
: tokenUtils.getColorByName(this.actions.color),
|
|
84
|
+
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, role: "menuitem", class: "duet-editable-table-actions-items-button", "aria-label": this.actions.label ? languageUtils.getLocaleString(this.actions.label) : undefined, onClick: ev => this.emitActionEvent(ev) }, index.h("duet-icon", { class: "duet-editable-table-actions-items-icon", size: "x-small", name: this.actions.icon, color: this.isHovering ? this.actions.color_hover : this.actions.color, margin: "none" })));
|
|
85
|
+
}
|
|
86
|
+
get el() { return index.getElement(this); }
|
|
87
|
+
};
|
|
88
|
+
DuetEditableTableButton.style = duetEditableTableButtonCss;
|
|
89
|
+
|
|
90
|
+
const duetFieldsetCss = "*,*::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;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{border:0}legend{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}.duet-legend-wrapper{position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;text-align:left;background:transparent}.duet-theme-turva .duet-legend-wrapper{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#de2362;border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{color:#e02a0d}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
91
|
+
|
|
92
|
+
let DuetFieldset = class {
|
|
93
|
+
constructor(hostRef) {
|
|
94
|
+
index.registerInstance(this, hostRef);
|
|
95
|
+
this.errorId = createId.createID("DuetError");
|
|
96
|
+
this.labelId = createId.createID("DuetLabel");
|
|
97
|
+
this.hasTooltip = false;
|
|
98
|
+
/**
|
|
99
|
+
* Theme of the fieldset.
|
|
100
|
+
*/
|
|
101
|
+
this.theme = "";
|
|
102
|
+
/**
|
|
103
|
+
* Controls the margin of the component.
|
|
104
|
+
*/
|
|
105
|
+
this.margin = "auto";
|
|
106
|
+
/**
|
|
107
|
+
* Visually hide the label, but still show it to screen readers.
|
|
108
|
+
*/
|
|
109
|
+
this.labelHidden = false;
|
|
110
|
+
this.checkHasTooltip = () => {
|
|
111
|
+
this.hasTooltip = !!this.element.querySelector("[slot='tooltip']");
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Component lifecycle events.
|
|
116
|
+
*/
|
|
117
|
+
componentWillLoad() {
|
|
118
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
119
|
+
this.checkHasTooltip();
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* render() function
|
|
123
|
+
* Always the last one in the class.
|
|
124
|
+
*/
|
|
125
|
+
render() {
|
|
126
|
+
return (index.h(index.Host, { class: { "duet-m-0": this.margin === "none" } }, index.h("fieldset", { "aria-labelledby": `${this.labelId} ${this.errorId}`, class: {
|
|
127
|
+
"duet-fieldset": true,
|
|
128
|
+
"duet-theme-turva": this.theme === "turva",
|
|
129
|
+
} }, index.h("legend", { id: this.labelId }, index.h("span", null, this.label), this.caption && index.h("span", null, this.caption)), index.h("div", { class: {
|
|
130
|
+
"duet-legend-wrapper": true,
|
|
131
|
+
"duet-legend-has-caption": !!this.caption,
|
|
132
|
+
"duet-legend-has-tooltip": this.hasTooltip,
|
|
133
|
+
"duet-legend-hidden": this.labelHidden,
|
|
134
|
+
} }, index.h("div", { class: "duet-fieldset-label" }, index.h("span", { "aria-hidden": "true" }, this.label), index.h("slot", { onSlotchange: this.checkHasTooltip, name: "tooltip" })), this.caption && (index.h("div", { class: "duet-fieldset-caption", "aria-hidden": "true" }, index.h("duet-caption", { margin: "none" }, this.caption)))), index.h("slot", null), index.h("span", { class: "duet-fieldset-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && index.h("span", null, this.error)))));
|
|
135
|
+
}
|
|
136
|
+
get element() { return index.getElement(this); }
|
|
137
|
+
};
|
|
138
|
+
DuetFieldset.style = duetFieldsetCss;
|
|
139
|
+
|
|
140
|
+
let DuetUploadAriaStatus = class {
|
|
141
|
+
constructor(hostRef) {
|
|
142
|
+
index.registerInstance(this, hostRef);
|
|
143
|
+
/**
|
|
144
|
+
* State() variables
|
|
145
|
+
*/
|
|
146
|
+
this.statusMessage = null;
|
|
147
|
+
/**
|
|
148
|
+
* State() variables
|
|
149
|
+
*/
|
|
150
|
+
this.statusMessageLabel = null;
|
|
151
|
+
/**
|
|
152
|
+
* Adds accessible label that is read aloud
|
|
153
|
+
*/
|
|
154
|
+
this.accessibleAriaLive = "polite";
|
|
155
|
+
/**
|
|
156
|
+
* valid file amount
|
|
157
|
+
*/
|
|
158
|
+
this.valid = undefined;
|
|
159
|
+
/**
|
|
160
|
+
* total files
|
|
161
|
+
*/
|
|
162
|
+
this.total = undefined;
|
|
163
|
+
/**
|
|
164
|
+
* invalid file amount
|
|
165
|
+
*/
|
|
166
|
+
this.invalid = undefined;
|
|
167
|
+
/**
|
|
168
|
+
* valid file amount
|
|
169
|
+
*/
|
|
170
|
+
this.inprogress = undefined;
|
|
171
|
+
/**
|
|
172
|
+
* Component lifecycle events.
|
|
173
|
+
*/
|
|
174
|
+
this.replacePlaceHolders = (statusString) => {
|
|
175
|
+
const addFiles = (amount) => {
|
|
176
|
+
return amount > 1 ? `${amount} ${this.statusMessageLabel.files}` : `${amount} ${this.statusMessageLabel.file}`;
|
|
177
|
+
};
|
|
178
|
+
return statusString
|
|
179
|
+
.replace("{filesUploaded}", addFiles(this.valid))
|
|
180
|
+
.replace("{filesInProgress}", addFiles(this.inprogress))
|
|
181
|
+
.replace("{filesTotal}", addFiles(this.total))
|
|
182
|
+
.replace("{filesWithErrors}", addFiles(this.invalid));
|
|
183
|
+
};
|
|
184
|
+
this.getStatusMessage = () => {
|
|
185
|
+
const { done, inProgress, doneWithErrors, inProgressWithErrors } = this.statusMessageLabel;
|
|
186
|
+
const hasErrors = this.invalid > 0;
|
|
187
|
+
const isInProgress = this.inprogress > 0;
|
|
188
|
+
const isInProgressWithErrors = this.inprogress > 0 && hasErrors;
|
|
189
|
+
const isDone = this.valid === this.total && !isInProgress && !hasErrors;
|
|
190
|
+
const isDoneWithErrors = this.valid + this.invalid === this.total && !isInProgress;
|
|
191
|
+
if (isDone) {
|
|
192
|
+
this.statusMessage = this.replacePlaceHolders(done);
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
else if (isInProgressWithErrors) {
|
|
196
|
+
this.statusMessage = this.replacePlaceHolders(inProgressWithErrors);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
else if (isInProgress) {
|
|
200
|
+
this.statusMessage = this.replacePlaceHolders(inProgress);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
else if (isDoneWithErrors) {
|
|
204
|
+
this.statusMessage = this.replacePlaceHolders(doneWithErrors);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
return;
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
watchHandler(newValue, oldValue) {
|
|
211
|
+
if (newValue !== oldValue) {
|
|
212
|
+
this.getStatusMessage();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* render() function
|
|
217
|
+
* Always the last one in the class.
|
|
218
|
+
*/
|
|
219
|
+
render() {
|
|
220
|
+
return (index.h(index.Host, { role: "status", "aria-live": "assertive", "aria-atomic": "true", "aria-relevant": "all" }, index.h("duet-visually-hidden", null, this.statusMessage)));
|
|
221
|
+
}
|
|
222
|
+
static get watchers() { return {
|
|
223
|
+
"valid": ["watchHandler"],
|
|
224
|
+
"invalid": ["watchHandler"],
|
|
225
|
+
"inprogress": ["watchHandler"],
|
|
226
|
+
"total": ["watchHandler"]
|
|
227
|
+
}; }
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
exports.duet_editable_table_button = DuetEditableTableButton;
|
|
231
|
+
exports.duet_fieldset = DuetFieldset;
|
|
232
|
+
exports.duet_upload_aria_status = DuetUploadAriaStatus;
|
|
@@ -5,9 +5,211 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
9
|
-
const
|
|
8
|
+
const index = require('./index-b724d698.js');
|
|
9
|
+
const jsUtils = require('./js-utils-33a9dbe3.js');
|
|
10
|
+
const languageUtils = require('./language-utils-aa282901.js');
|
|
10
11
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
12
|
+
const tokens_module = require('./tokens.module-6b2df1c2.js');
|
|
13
|
+
require('./string-utils-267e3dbb.js');
|
|
14
|
+
|
|
15
|
+
const duetEditableTableCss = "duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-header tr .duet-editable-table-header-hidden{padding:0 !important;font-size:0;border-bottom:0}";
|
|
16
|
+
|
|
17
|
+
let DuetEditableTable = class {
|
|
18
|
+
constructor(hostRef) {
|
|
19
|
+
index.registerInstance(this, hostRef);
|
|
20
|
+
/**
|
|
21
|
+
* State() variables
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
this.tick = Date.now();
|
|
25
|
+
/**
|
|
26
|
+
* Map of items that contain list of things.
|
|
27
|
+
*/
|
|
28
|
+
this.items = new Map();
|
|
29
|
+
/**
|
|
30
|
+
* Array of internationalized defaults for the default groups labels.
|
|
31
|
+
*/
|
|
32
|
+
this.groupsLabelDefaults = {
|
|
33
|
+
fi: "Kaikki",
|
|
34
|
+
en: "All items",
|
|
35
|
+
sv: "Alla objekt",
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Array of internationalized defaults for the default action labels.
|
|
39
|
+
*/
|
|
40
|
+
this.actionLabelDefaults = {
|
|
41
|
+
fi: "Toiminnot",
|
|
42
|
+
en: "Actions",
|
|
43
|
+
sv: "Handlingar",
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions).
|
|
47
|
+
* @default { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }.
|
|
48
|
+
* @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}].
|
|
49
|
+
*/
|
|
50
|
+
this.groups = [
|
|
51
|
+
{ id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* Array of actions that are mapped via the map variable to the various groups defined in group.
|
|
55
|
+
* @default undefined
|
|
56
|
+
* @example [{
|
|
57
|
+
variation: "default",
|
|
58
|
+
icon: "action-edit-2",
|
|
59
|
+
id: "edit",
|
|
60
|
+
map: ["success"],
|
|
61
|
+
label: {
|
|
62
|
+
fi: " Label",
|
|
63
|
+
en: " Label",
|
|
64
|
+
sv: " Label",
|
|
65
|
+
}
|
|
66
|
+
}]
|
|
67
|
+
*/
|
|
68
|
+
this.actions = undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Shows or hides the table labels.
|
|
71
|
+
*/
|
|
72
|
+
this.hideGroups = false;
|
|
73
|
+
/**
|
|
74
|
+
* Exposes the aria role for optimizing accessibility.
|
|
75
|
+
*/
|
|
76
|
+
this.accessibleRole = undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Private methods.
|
|
79
|
+
*/
|
|
80
|
+
this.kick = jsUtils.debounce(() => {
|
|
81
|
+
this.tick = Date.now();
|
|
82
|
+
}, 100); // will trigger re-render
|
|
83
|
+
this.filterMap = needle => {
|
|
84
|
+
if (needle === "all") {
|
|
85
|
+
return Array.from(this.items);
|
|
86
|
+
}
|
|
87
|
+
return Array.from(this.items).filter(item => needle === item[1].group);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Component lifecycle events.
|
|
92
|
+
*/
|
|
93
|
+
componentWillLoad() {
|
|
94
|
+
if (typeof this.groups === "string") {
|
|
95
|
+
this.internalGroupArray = languageUtils.sanitizeString(this.groups);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
this.internalGroupArray = this.groups;
|
|
99
|
+
}
|
|
100
|
+
if (typeof this.actions === "string") {
|
|
101
|
+
this.internalActionsArray = languageUtils.sanitizeString(this.actions);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
this.internalActionsArray = this.actions;
|
|
105
|
+
}
|
|
106
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Method to force an update of a tabular data array.
|
|
110
|
+
* when called the method will rerender the entire tabular structure.
|
|
111
|
+
*/
|
|
112
|
+
async updateTable(passedItems = undefined) {
|
|
113
|
+
this.items = new Map(passedItems || this.items);
|
|
114
|
+
this.kick();
|
|
115
|
+
}
|
|
116
|
+
render() {
|
|
117
|
+
return (index.h(index.Host, { class: {
|
|
118
|
+
"duet-theme-turva": this.theme === "turva",
|
|
119
|
+
} }, this.internalGroupArray.map(group => {
|
|
120
|
+
const currentGroup = this.filterMap(group.id);
|
|
121
|
+
if (!currentGroup.length) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
return (index.h("duet-table", { variation: "plain", breakpoint: "none", role: "", margin: this.hideGroups ? "none" : "auto" }, index.h("table", { class: "duet-editable-table", "aria-role": this.accessibleRole }, index.h("thead", { class: "duet-editable-table-header" }, index.h("tr", null, index.h("th", { class: {
|
|
125
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
126
|
+
} }, !this.hideGroups ? (languageUtils.getLocaleString(group.label)) : (index.h("duet-visually-hidden", null, languageUtils.getLocaleString(group.label)))), index.h("th", { class: {
|
|
127
|
+
"duet-editable-table-header-hidden": this.hideGroups,
|
|
128
|
+
} }, index.h("duet-visually-hidden", null, group.actionLabel
|
|
129
|
+
? languageUtils.getLocaleString(group.actionLabel)
|
|
130
|
+
: languageUtils.getLocaleString(this.actionLabelDefaults))))), index.h("tbody", null, currentGroup.map(dataAsArray => {
|
|
131
|
+
const [key, value] = dataAsArray;
|
|
132
|
+
return (index.h("duet-editable-table-item", { keyName: key, data: Object.assign({}, value), groupId: group.id, part: group.id, actions: this.internalActionsArray }));
|
|
133
|
+
})))));
|
|
134
|
+
})));
|
|
135
|
+
}
|
|
136
|
+
get element() { return index.getElement(this); }
|
|
137
|
+
};
|
|
138
|
+
DuetEditableTable.style = duetEditableTableCss;
|
|
139
|
+
|
|
140
|
+
//simple functional component that renders the data in the table
|
|
141
|
+
const TableData = ({ data, groupId }, _children) => {
|
|
142
|
+
if (typeof data === "string") {
|
|
143
|
+
return index.h("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content` });
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
return (index.h("td", { class: "duet-editable-table-content", part: `${groupId}content` }, data));
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const duetEditableTableItemCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{display:table-row;height:32px}.duet-editable-table-content,.duet-editable-table-actions{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}.duet-editable-table-actions-items{display:flex;justify-content:flex-end}.duet-editable-table-actions-items duet-editable-table-button{padding-left:8px}.duet-editable-table .editable-item-small{font-size:0.75rem;font-weight:400}";
|
|
151
|
+
|
|
152
|
+
let DuetEditableTableItem = class {
|
|
153
|
+
constructor(hostRef) {
|
|
154
|
+
index.registerInstance(this, hostRef);
|
|
155
|
+
this.duetEditableItemAction = index.createEvent(this, "duetEditableItemAction", 7);
|
|
156
|
+
this.isHovering = false;
|
|
157
|
+
/**
|
|
158
|
+
* Theme of the empty state component.
|
|
159
|
+
*/
|
|
160
|
+
this.theme = "";
|
|
161
|
+
/**
|
|
162
|
+
* Actions that can be performed on the element
|
|
163
|
+
*/
|
|
164
|
+
this.actions = undefined;
|
|
165
|
+
/**
|
|
166
|
+
* GroupId used to pierce the shadowdom - gets concatenated with "content & actions" and used as part="groupIDcontent/actions" to pierce the content/Action item
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
169
|
+
this.groupId = "";
|
|
170
|
+
/**
|
|
171
|
+
* Key used to identify item, when running actions
|
|
172
|
+
*/
|
|
173
|
+
this.keyName = "";
|
|
174
|
+
/**
|
|
175
|
+
* Object of data itemsused to render the entire row
|
|
176
|
+
*/
|
|
177
|
+
this.data = undefined;
|
|
178
|
+
}
|
|
179
|
+
watchPropHandler(_newValue, _oldValue) {
|
|
180
|
+
// console.log("The new value of activated is: ", _newValue)
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
/**
|
|
184
|
+
* Component lifecycle events.
|
|
185
|
+
*/
|
|
186
|
+
componentWillLoad() {
|
|
187
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
/**
|
|
191
|
+
* private functions
|
|
192
|
+
*/
|
|
193
|
+
/**
|
|
194
|
+
* render() function
|
|
195
|
+
* Always the last one in the class.
|
|
196
|
+
*/
|
|
197
|
+
render() {
|
|
198
|
+
return (index.h(index.Host, { role: "row" }, index.h(TableData, { data: this.data.item, groupId: this.groupId }), index.h("td", { class: "duet-editable-table-actions" }, index.h("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
|
|
199
|
+
const { map = undefined } = result;
|
|
200
|
+
// if map has been specified, only show the current action if groupID matches the map array
|
|
201
|
+
if (map && !map.includes(this.groupId)) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
return (index.h("duet-editable-table-button", { keyName: this.keyName, group: this.data.group, uid: this.data.uid, actions: result, theme: this.theme }));
|
|
205
|
+
})))));
|
|
206
|
+
}
|
|
207
|
+
get el() { return index.getElement(this); }
|
|
208
|
+
static get watchers() { return {
|
|
209
|
+
"data": ["watchPropHandler"]
|
|
210
|
+
}; }
|
|
211
|
+
};
|
|
212
|
+
DuetEditableTableItem.style = duetEditableTableItemCss;
|
|
11
213
|
|
|
12
214
|
const duetTableCss = "duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{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}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}";
|
|
13
215
|
|
|
@@ -129,4 +331,6 @@ let DuetTable = class {
|
|
|
129
331
|
};
|
|
130
332
|
DuetTable.style = duetTableCss;
|
|
131
333
|
|
|
334
|
+
exports.duet_editable_table = DuetEditableTable;
|
|
335
|
+
exports.duet_editable_table_item = DuetEditableTableItem;
|
|
132
336
|
exports.duet_table = DuetTable;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-b724d698.js');
|
|
9
9
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
10
10
|
|
|
11
11
|
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}";
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-b724d698.js');
|
|
9
9
|
const actionNewWindowSmall = require('./action-new-window-small-fa51dfb9.js');
|
|
10
10
|
const commonStrings = require('./common-strings-de17f887.js');
|
|
11
|
-
const languageUtils = require('./language-utils-
|
|
11
|
+
const languageUtils = require('./language-utils-aa282901.js');
|
|
12
12
|
const stringUtils = require('./string-utils-267e3dbb.js');
|
|
13
13
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
14
14
|
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
9
|
-
const watchOptions = require('./watch-options-
|
|
8
|
+
const index = require('./index-b724d698.js');
|
|
9
|
+
const watchOptions = require('./watch-options-d88afac0.js');
|
|
10
10
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
11
|
|
|
12
12
|
const duetGridCss = ".sc-duet-grid-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:flex !important;flex-direction:column !important;align-items:flex-start !important;justify-content:flex-start !important;width:100%;max-width:100%;height:auto}@media (min-width: 36em){.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 48em){.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:row !important}}@media (min-width: 64.0625em){.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:row !important}}.duet-grid-wrap.sc-duet-grid-h{flex-wrap:wrap !important}.duet-no-stacking.sc-duet-grid-h{flex-direction:row !important}.duet-grid-direction-vertical.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 36em){.duet-grid-direction-vertical.duet-grid-breakpoint-small.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 48em){.duet-grid-direction-vertical.duet-grid-breakpoint-medium.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-direction-vertical.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:column !important}@media (min-width: 64.0625em){.duet-grid-direction-vertical.duet-grid-breakpoint-x-large.sc-duet-grid-h{flex-direction:column !important}}.duet-grid-align-top.duet-no-stacking.sc-duet-grid-h{align-items:flex-start !important}.duet-grid-align-bottom.duet-no-stacking.sc-duet-grid-h{align-items:flex-end !important}.duet-grid-align-center.duet-no-stacking.sc-duet-grid-h{align-items:center !important}.duet-grid-align-stretch.duet-no-stacking.sc-duet-grid-h{align-items:stretch !important}.duet-grid-align-baseline.duet-no-stacking.sc-duet-grid-h{align-items:baseline !important}@media (min-width: 36em){.duet-grid-align-top.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 36em){.duet-grid-align-bottom.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 36em){.duet-grid-align-center.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:center !important}}@media (min-width: 36em){.duet-grid-align-stretch.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 36em){.duet-grid-align-baseline.duet-grid-breakpoint-small.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 48em){.duet-grid-align-top.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 48em){.duet-grid-align-bottom.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 48em){.duet-grid-align-center.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:center !important}}@media (min-width: 48em){.duet-grid-align-stretch.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 48em){.duet-grid-align-baseline.duet-grid-breakpoint-medium.sc-duet-grid-h{align-items:baseline !important}}@media (min-width: 64.0625em){.duet-grid-align-top.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:flex-start !important}}@media (min-width: 64.0625em){.duet-grid-align-bottom.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:flex-end !important}}@media (min-width: 64.0625em){.duet-grid-align-center.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:center !important}}@media (min-width: 64.0625em){.duet-grid-align-stretch.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:stretch !important}}@media (min-width: 64.0625em){.duet-grid-align-baseline.duet-grid-breakpoint-x-large.sc-duet-grid-h{align-items:baseline !important}}.duet-grid-distribution-left.sc-duet-grid-h{justify-content:flex-start !important}.duet-grid-distribution-right.sc-duet-grid-h{justify-content:flex-end !important}.duet-grid-distribution-center.sc-duet-grid-h{justify-content:center !important}.duet-grid-distribution-between.sc-duet-grid-h{justify-content:space-between !important}.duet-grid-distribution-around.sc-duet-grid-h{justify-content:space-around !important}.duet-grid-distribution-evenly.sc-duet-grid-h{justify-content:space-evenly !important}@media (max-width: 35.9375em){.duet-grid-mobile-left.sc-duet-grid-h{align-items:flex-start !important;justify-content:flex-start !important;text-align:left !important}}@media (max-width: 35.9375em){.duet-grid-mobile-center.sc-duet-grid-h{align-items:center !important;justify-content:center !important;text-align:center !important}.duet-grid-mobile-center.sc-duet-grid-h *.sc-duet-grid{text-align:center !important}}@media (max-width: 35.9375em){.duet-grid-mobile-right.sc-duet-grid-h{align-items:flex-end !important;justify-content:flex-end !important;text-align:right !important}.duet-grid-mobile-right.sc-duet-grid-h *.sc-duet-grid{text-align:right !important}}";
|
|
@@ -17,6 +17,7 @@ function isGridItem(element) {
|
|
|
17
17
|
let DuetGrid = class {
|
|
18
18
|
constructor(hostRef) {
|
|
19
19
|
index.registerInstance(this, hostRef);
|
|
20
|
+
this.distributeFormElement = false;
|
|
20
21
|
/**
|
|
21
22
|
* Enable or disable the automatic responsive behaviour of the grid component.
|
|
22
23
|
* Setting this option to "true" makes sure that contents are stacked vertically
|
|
@@ -33,7 +34,9 @@ let DuetGrid = class {
|
|
|
33
34
|
*/
|
|
34
35
|
this.direction = "horizontal";
|
|
35
36
|
/**
|
|
36
|
-
* Adjusts the vertical alignment of the grid items
|
|
37
|
+
* Adjusts the vertical alignment of the grid items, if set to "form_distribute"
|
|
38
|
+
* the grid will try to calculate correct paddings for any duet-input fields inside duet-grid-items,
|
|
39
|
+
* so that they align even when displaying errors.
|
|
37
40
|
*/
|
|
38
41
|
this.alignment = "top";
|
|
39
42
|
/**
|
|
@@ -45,14 +48,34 @@ let DuetGrid = class {
|
|
|
45
48
|
*/
|
|
46
49
|
this.mobile = "";
|
|
47
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Private functions
|
|
53
|
+
*/
|
|
54
|
+
/**
|
|
55
|
+
* Returns the element height including margins
|
|
56
|
+
* @param element - element
|
|
57
|
+
* @returns {number}
|
|
58
|
+
*/
|
|
59
|
+
outerHeight(element) {
|
|
60
|
+
const height = element.offsetHeight, style = window.getComputedStyle(element);
|
|
61
|
+
return ["top", "bottom"]
|
|
62
|
+
.map(side => parseInt(style[`margin-${side}`]))
|
|
63
|
+
.reduce((total, side) => total + side, height);
|
|
64
|
+
}
|
|
48
65
|
/**
|
|
49
66
|
* Component lifecycle events.
|
|
50
67
|
*/
|
|
51
68
|
async connectedCallback() {
|
|
52
69
|
const el = this.element;
|
|
70
|
+
this.distributeFormElement = this.alignment === "form_distribute";
|
|
53
71
|
this.mutationO = watchOptions.watchForOptions(el, "duet-grid-item", () => {
|
|
54
72
|
this.updateGridItems();
|
|
55
73
|
});
|
|
74
|
+
if (this.distributeFormElement) {
|
|
75
|
+
this.mutation1 = watchOptions.watchForElement(el, "duet-input", () => {
|
|
76
|
+
this.updateGridItemsWithInputFields();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
56
79
|
this.updateGridItems();
|
|
57
80
|
}
|
|
58
81
|
disconnectedCallback() {
|
|
@@ -60,6 +83,10 @@ let DuetGrid = class {
|
|
|
60
83
|
this.mutationO.disconnect();
|
|
61
84
|
this.mutationO = undefined;
|
|
62
85
|
}
|
|
86
|
+
if (this.mutation1) {
|
|
87
|
+
this.mutation1.disconnect();
|
|
88
|
+
this.mutation1 = undefined;
|
|
89
|
+
}
|
|
63
90
|
}
|
|
64
91
|
/**
|
|
65
92
|
* Local methods
|
|
@@ -71,6 +98,27 @@ let DuetGrid = class {
|
|
|
71
98
|
item.breakpoint = this.breakpoint;
|
|
72
99
|
});
|
|
73
100
|
}
|
|
101
|
+
async updateGridItemsWithInputFields() {
|
|
102
|
+
const items = Array.from(this.element.children).filter(isGridItem);
|
|
103
|
+
let maxHeight = 0;
|
|
104
|
+
const sizes = [];
|
|
105
|
+
items.forEach(item => {
|
|
106
|
+
const inputErrorDom = item.querySelector("span.duet-input-error");
|
|
107
|
+
const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
|
|
108
|
+
sizes.push(height);
|
|
109
|
+
});
|
|
110
|
+
maxHeight = Math.max(...sizes);
|
|
111
|
+
items.forEach(item => {
|
|
112
|
+
const inputErrorDom = item.querySelector("span.duet-input-error");
|
|
113
|
+
const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
|
|
114
|
+
if (height < maxHeight) {
|
|
115
|
+
item.setAttribute("style", `padding-bottom: ${maxHeight - height}px;`);
|
|
116
|
+
}
|
|
117
|
+
else if (height === maxHeight) {
|
|
118
|
+
item.setAttribute("style", `padding-bottom: 0px;`);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
74
122
|
/**
|
|
75
123
|
* render() function
|
|
76
124
|
* Always the last one in the class.
|
|
@@ -80,7 +128,7 @@ let DuetGrid = class {
|
|
|
80
128
|
"duet-grid": true,
|
|
81
129
|
"duet-no-stacking": !this.responsive,
|
|
82
130
|
"duet-grid-align-top": this.alignment === "top",
|
|
83
|
-
"duet-grid-align-bottom": this.alignment === "bottom",
|
|
131
|
+
"duet-grid-align-bottom": this.alignment === "bottom" || this.alignment === "form_distribute",
|
|
84
132
|
"duet-grid-align-center": this.alignment === "center",
|
|
85
133
|
"duet-grid-align-stretch": this.alignment === "stretch",
|
|
86
134
|
"duet-grid-align-baseline": this.alignment === "baseline",
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-b724d698.js');
|
|
9
9
|
const actionArrowDownSmall = require('./action-arrow-down-small-ef77a2d1.js');
|
|
10
10
|
const bodyScrollLock_es6 = require('./bodyScrollLock.es6-6ef1142a.js');
|
|
11
11
|
const commonStrings = require('./common-strings-de17f887.js');
|
|
12
12
|
const keyboardUtils = require('./keyboard-utils-b4e3d1d3.js');
|
|
13
|
-
const languageUtils = require('./language-utils-
|
|
13
|
+
const languageUtils = require('./language-utils-aa282901.js');
|
|
14
14
|
const stringUtils = require('./string-utils-267e3dbb.js');
|
|
15
15
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
16
|
-
const tokens_module = require('./tokens.module-
|
|
16
|
+
const tokens_module = require('./tokens.module-6b2df1c2.js');
|
|
17
17
|
const createId = require('./create-id-c3b984b1.js');
|
|
18
18
|
|
|
19
19
|
var navigationContactDropdown={"title":"navigation-contact-dropdown","tags":"navigation contact dropdown speech bubbles","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M20.247 24a.743.743 0 0 1-.53-.22l-4.28-4.28h-.439c-3.308 0-6-2.692-6-6s2.692-6 6-6h3c3.309.001 6 2.692 6 6a5.974 5.974 0 0 1-3 5.179v4.571a.75.75 0 0 1-.751.75zm-5.25-15c-2.481 0-4.5 2.019-4.5 4.5s2.019 4.5 4.5 4.5h.75c.198 0 .391.08.53.22l3.22 3.22v-3.213c0-.289.169-.555.429-.678a4.51 4.51 0 0 0 2.571-4.049 4.504 4.504 0 0 0-4.498-4.499h-3.002z\"/><path d=\"M3.747 16.5a.747.747 0 0 1-.75-.75v-4.57a5.967 5.967 0 0 1-2.65-3.171A5.948 5.948 0 0 1 .57 3.431 6.014 6.014 0 0 1 5.985 0h3.012a6.04 6.04 0 0 1 5.752 4.286.751.751 0 0 1-.718.964.755.755 0 0 1-.719-.536A4.531 4.531 0 0 0 8.997 1.5h-3a4.511 4.511 0 0 0-4.071 2.572c-.512 1.084-.571 2.302-.167 3.431s1.224 2.032 2.308 2.545c.261.123.43.39.43.678v3.214l1.72-1.72a.744.744 0 0 1 1.06 0 .752.752 0 0 1 0 1.061l-3 3a.744.744 0 0 1-.53.219z\"/></svg>"};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-b724d698.js');
|
|
9
9
|
const actionNewWindowSmall = require('./action-new-window-small-fa51dfb9.js');
|
|
10
10
|
const commonStrings = require('./common-strings-de17f887.js');
|
|
11
|
-
const languageUtils = require('./language-utils-
|
|
11
|
+
const languageUtils = require('./language-utils-aa282901.js');
|
|
12
12
|
const stringUtils = require('./string-utils-267e3dbb.js');
|
|
13
13
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
14
14
|
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-b724d698.js');
|
|
9
9
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
10
|
-
const tokenUtils = require('./token-utils-
|
|
11
|
-
require('./tokens.module-
|
|
10
|
+
const tokenUtils = require('./token-utils-63a9c8dc.js');
|
|
11
|
+
require('./tokens.module-6b2df1c2.js');
|
|
12
12
|
|
|
13
13
|
const cleanupSvg = (svgContent) => {
|
|
14
14
|
if (typeof document === "undefined" || !svgContent) {
|
|
@@ -136,7 +136,7 @@ let DuetIcon = class {
|
|
|
136
136
|
if (this.src && this.icon) {
|
|
137
137
|
console.warn("[DUET COMPONENTS]: <duet-icon> should have either have src or icon attributes, but not both. icon attribute will take precedence", "icon:", this.icon, "src:", this.src);
|
|
138
138
|
}
|
|
139
|
-
this.loadIcon();
|
|
139
|
+
return this.loadIcon();
|
|
140
140
|
}
|
|
141
141
|
async loadIcon() {
|
|
142
142
|
// static icon known at build-time, so we can set it synchronously
|