@duetds/components 4.36.1 → 5.0.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 +1128 -977
- package/lib/cjs/duet-action-button.cjs.entry.js +163 -0
- 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 +8 -4
- package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
- package/lib/cjs/duet-card.cjs.entry.js +3 -3
- 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 +2 -2
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +4 -4
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/{duet-editable-table_4.cjs.entry.js → duet-editable-table_3.cjs.entry.js} +382 -337
- 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 +2 -2
- package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +3 -3
- 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 +24 -14
- 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 +2 -2
- 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 +2 -2
- 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-dfd718e8.js → focus-utils-7a11c463.js} +1 -1
- package/lib/cjs/{index-4f342f1c.js → index-da5d5aaf.js} +1 -1
- package/lib/cjs/js-utils-be1d29ae.js +39 -0
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/cjs/{token-utils-f402e205.js → token-utils-ac8432d1.js} +1 -1
- package/lib/cjs/{tokens-8596cece.js → tokens-72efc7fd.js} +0 -0
- package/lib/cjs/{tokens.module-6b2df1c2.js → tokens.module-6afcc9c1.js} +0 -0
- package/lib/collection/collection-manifest.json +14 -11
- package/lib/collection/components/duet-action-button/duet-action-button.css +87 -0
- package/lib/collection/components/duet-action-button/duet-action-button.js +489 -0
- package/lib/collection/components/duet-button/duet-button.js +23 -1
- package/lib/collection/components/duet-date-picker/duet-date-picker.css +2 -57
- package/lib/collection/components/duet-date-picker/duet-date-picker.js +2 -6
- package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +3 -2
- package/lib/collection/components/duet-editable-table/duet-editable-table.css +20 -1
- package/lib/collection/components/duet-editable-table/duet-editable-table.js +331 -205
- package/lib/collection/components/duet-pagination/duet-pagination.css +3 -62
- package/lib/collection/components/duet-pagination/duet-pagination.js +49 -19
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.css +4 -55
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +2 -4
- package/lib/collection/components/duet-table/duet-table.css +42 -8
- package/lib/collection/components/duet-table/duet-table.js +11 -2
- package/lib/collection/components/duet-upload/duet-upload.css +25 -0
- package/lib/collection/components/duet-upload/duet-upload.js +270 -166
- package/lib/collection/components/duet-upload/upload-validators.js +1 -1
- package/lib/collection/utils/fixture-utils.js +3 -1
- package/lib/collection/utils/js-utils.js +36 -1
- package/lib/custom-elements-bundle/index.d.ts +6 -12
- package/lib/custom-elements-bundle/index.js +1142 -1001
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-c18080ad.entry.js → p-00209700.entry.js} +1 -1
- package/lib/duet/{p-1a95aeb6.entry.js → p-01144f93.entry.js} +1 -1
- package/lib/duet/{p-c6df2ea8.system.entry.js → p-021bf3a2.system.entry.js} +1 -1
- package/lib/duet/{p-20cdb787.entry.js → p-04c6e557.entry.js} +1 -1
- package/lib/duet/{p-d945a4b0.system.entry.js → p-06fd151e.system.entry.js} +1 -1
- package/lib/duet/p-0988f548.entry.js +4 -0
- package/lib/duet/{p-05e2c680.system.entry.js → p-0e1130a0.system.entry.js} +1 -1
- package/lib/duet/{p-ebc56043.entry.js → p-0fedc1c6.entry.js} +1 -1
- package/lib/duet/{p-e8303364.system.entry.js → p-111b70c5.system.entry.js} +1 -1
- package/lib/duet/p-12825e2c.entry.js +4 -0
- package/lib/duet/p-166c09ce.system.entry.js +4 -0
- package/lib/duet/{p-24b9e806.entry.js → p-1be45fc6.entry.js} +1 -1
- package/lib/duet/{p-286d2ad2.system.entry.js → p-1da57e19.system.entry.js} +1 -1
- package/lib/duet/{p-7a32ceb3.system.entry.js → p-21c9efa8.system.entry.js} +1 -1
- package/lib/duet/p-2245c56b.entry.js +4 -0
- package/lib/duet/{p-e6a69eb8.js → p-2273fc88.js} +1 -1
- package/lib/duet/{p-79b9e7ef.system.entry.js → p-232762b3.system.entry.js} +1 -1
- package/lib/duet/{p-d21f19cc.system.js → p-251dc733.system.js} +1 -1
- package/lib/duet/{p-ddb6344c.system.js → p-268c0abb.system.js} +0 -0
- package/lib/duet/{p-ca0ee655.system.entry.js → p-2b6dac5c.system.entry.js} +1 -1
- package/lib/duet/{p-e8e35258.entry.js → p-35cdec32.entry.js} +1 -1
- package/lib/duet/{p-2361986e.entry.js → p-37bdfcc6.entry.js} +1 -1
- package/lib/duet/{p-740b5609.entry.js → p-3c7d81b0.entry.js} +1 -1
- package/lib/duet/{p-3900577d.system.entry.js → p-3f77090f.system.entry.js} +1 -1
- package/lib/duet/{p-ad3dad04.system.js → p-3fafe82f.system.js} +1 -1
- package/lib/duet/{p-164a7037.system.entry.js → p-4b221aa3.system.entry.js} +1 -1
- package/lib/duet/{p-210d739c.system.entry.js → p-4b7b1d2a.system.entry.js} +1 -1
- package/lib/duet/{p-3547d108.entry.js → p-4c282c1a.entry.js} +1 -1
- package/lib/duet/p-51a7c020.entry.js +4 -0
- package/lib/duet/{p-c8ec3b99.entry.js → p-5298f6fb.entry.js} +1 -1
- package/lib/duet/{p-cb445018.js → p-5746d88c.js} +1 -1
- package/lib/duet/{p-f6da56c8.entry.js → p-589c2f28.entry.js} +1 -1
- package/lib/duet/{p-d9716aec.system.entry.js → p-592315ca.system.entry.js} +1 -1
- package/lib/duet/{p-615bfc61.system.entry.js → p-59a0ec33.system.entry.js} +1 -1
- package/lib/duet/p-5e1f64cb.entry.js +4 -0
- package/lib/duet/{p-29255af8.entry.js → p-608645ed.entry.js} +1 -1
- package/lib/duet/{p-3d1b0105.entry.js → p-683f1962.entry.js} +1 -1
- package/lib/duet/{p-9ce0e625.entry.js → p-6932c6d8.entry.js} +1 -1
- package/lib/duet/{p-e35d8543.entry.js → p-6934cb1b.entry.js} +1 -1
- package/lib/duet/{p-211b4485.system.entry.js → p-6d209c01.system.entry.js} +1 -1
- package/lib/duet/{p-e47daca7.system.entry.js → p-70e5c803.system.entry.js} +1 -1
- package/lib/duet/p-74d267d3.system.entry.js +4 -0
- package/lib/duet/{p-c7fa7dcc.system.entry.js → p-766daacb.system.entry.js} +1 -1
- package/lib/duet/{p-4e2532c7.system.js → p-77acbfe4.system.js} +1 -1
- package/lib/duet/p-7953cff9.system.entry.js +4 -0
- package/lib/duet/{p-635dacce.system.entry.js → p-7e939e57.system.entry.js} +1 -1
- package/lib/duet/{p-fa99eaa4.system.js → p-812b0905.system.js} +0 -0
- package/lib/duet/{p-1db7a35b.entry.js → p-814ed07c.entry.js} +1 -1
- package/lib/duet/{p-5d9affcd.entry.js → p-82a0e535.entry.js} +1 -1
- package/lib/duet/{p-3bb702e3.system.entry.js → p-8338702d.system.entry.js} +2 -2
- package/lib/duet/{p-65c418f7.system.entry.js → p-85b4b5c0.system.entry.js} +1 -1
- package/lib/duet/{p-5376a9db.entry.js → p-86538787.entry.js} +1 -1
- package/lib/duet/{p-562ae946.entry.js → p-8f01f647.entry.js} +1 -1
- package/lib/duet/{p-85100e09.entry.js → p-8f6def3f.entry.js} +1 -1
- package/lib/duet/{p-03cf3ebf.entry.js → p-90464434.entry.js} +1 -1
- package/lib/duet/p-92639d0b.system.js +4 -0
- package/lib/duet/{p-12941aef.system.entry.js → p-97f95c02.system.entry.js} +1 -1
- package/lib/duet/{p-ffb5fb75.system.entry.js → p-982deb44.system.entry.js} +1 -1
- package/lib/duet/{p-fd2211ab.entry.js → p-9dc88c43.entry.js} +1 -1
- package/lib/duet/{p-fae71c1f.entry.js → p-a37e57d8.entry.js} +1 -1
- package/lib/duet/{p-c52f4de0.system.entry.js → p-a71510b8.system.entry.js} +1 -1
- package/lib/duet/p-a8eec12e.system.entry.js +4 -0
- package/lib/duet/{p-4fdbc6ff.system.entry.js → p-abcfbb23.system.entry.js} +1 -1
- package/lib/duet/{p-3c3536be.entry.js → p-ac2b38e6.entry.js} +1 -1
- package/lib/duet/{p-9df321b3.system.entry.js → p-ace2cd17.system.entry.js} +1 -1
- package/lib/duet/{p-946f34b4.system.entry.js → p-ad278903.system.entry.js} +1 -1
- package/lib/duet/{p-1c4721a1.entry.js → p-aea907ad.entry.js} +1 -1
- package/lib/duet/{p-e7dd8a15.system.entry.js → p-b432d318.system.entry.js} +1 -1
- package/lib/duet/{p-0366552b.system.entry.js → p-b4e75f80.system.entry.js} +1 -1
- package/lib/duet/{p-061835f3.system.entry.js → p-b8c8105c.system.entry.js} +1 -1
- package/lib/duet/{p-c2d32103.entry.js → p-ba7480e9.entry.js} +1 -1
- package/lib/duet/{p-83452e8f.entry.js → p-bc7dba26.entry.js} +1 -1
- package/lib/duet/{p-ff21f3c2.entry.js → p-bf06f635.entry.js} +1 -1
- package/lib/duet/{p-c514010b.system.entry.js → p-c6ccf366.system.entry.js} +1 -1
- package/lib/duet/{p-46ae601a.entry.js → p-cd1a767f.entry.js} +1 -1
- package/lib/duet/{p-89e42127.system.entry.js → p-d6d9b0c6.system.entry.js} +1 -1
- package/lib/duet/{p-8143f3de.js → p-d7bc0102.js} +0 -0
- package/lib/duet/{p-d24c6bc1.entry.js → p-d9e329c0.entry.js} +1 -1
- package/lib/duet/p-dbb4a588.js +4 -0
- package/lib/duet/{p-ae14591e.entry.js → p-dc67d989.entry.js} +1 -1
- package/lib/duet/{p-7f0e360d.entry.js → p-de9ff67c.entry.js} +1 -1
- package/lib/duet/{p-ded33218.system.entry.js → p-deb8ac4d.system.entry.js} +1 -1
- package/lib/duet/p-e2e0bc49.system.js +4 -0
- package/lib/duet/{p-8c53bc24.system.entry.js → p-e624799f.system.entry.js} +1 -1
- package/lib/duet/{p-eb892975.system.entry.js → p-e887d6db.system.entry.js} +1 -1
- package/lib/duet/{p-dcaecb5e.js → p-e9c3053b.js} +1 -1
- package/lib/duet/{p-493c6d2f.system.entry.js → p-ebed7c5e.system.entry.js} +1 -1
- package/lib/duet/{p-ad07f399.js → p-ed75c8b3.js} +0 -0
- package/lib/duet/{p-e5ce7aad.system.entry.js → p-f020852e.system.entry.js} +1 -1
- package/lib/duet/p-f2abd301.entry.js +4 -0
- package/lib/duet/{p-e7b53f4f.system.entry.js → p-f54d1487.system.entry.js} +1 -1
- package/lib/duet/{p-b6dd0933.entry.js → p-fc44a819.entry.js} +1 -1
- package/lib/duet/{p-22baf1f8.system.entry.js → p-fcdd24f8.system.entry.js} +1 -1
- package/lib/duet/{p-5b546064.entry.js → p-fed35d92.entry.js} +1 -1
- package/lib/duet/{p-ef275410.entry.js → p-ff308f4c.entry.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +159 -0
- 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 +8 -4
- package/lib/esm/duet-caption_4.entry.js +3 -3
- package/lib/esm/duet-card.entry.js +3 -3
- 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 +2 -2
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +4 -4
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/{duet-editable-table_4.entry.js → duet-editable-table_3.entry.js} +384 -338
- 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 +2 -2
- package/lib/esm/duet-header_2.entry.js +3 -3
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +3 -3
- 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 +24 -14
- 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 +2 -2
- 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 +2 -2
- 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-d4e80e1e.js → focus-utils-b0b3361f.js} +1 -1
- package/lib/esm/{index-4a5e7664.js → index-16f4da7f.js} +1 -1
- package/lib/esm/js-utils-52e0944c.js +36 -0
- package/lib/esm/loader.js +2 -2
- package/lib/esm/{token-utils-e9a69acf.js → token-utils-e9a0cb88.js} +1 -1
- package/lib/esm/{tokens-e110dc89.js → tokens-57d98824.js} +0 -0
- package/lib/esm/{tokens.module-49cbf963.js → tokens.module-a13e9683.js} +0 -0
- package/lib/esm-es5/duet-action-button.entry.js +4 -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-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-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +2 -2
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- 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-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 +2 -2
- 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-b0b3361f.js +4 -0
- package/lib/esm-es5/{index-4a5e7664.js → index-16f4da7f.js} +1 -1
- package/lib/esm-es5/js-utils-52e0944c.js +4 -0
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{token-utils-e9a69acf.js → token-utils-e9a0cb88.js} +1 -1
- package/lib/esm-es5/{tokens-e110dc89.js → tokens-57d98824.js} +0 -0
- package/lib/esm-es5/{tokens.module-49cbf963.js → tokens.module-a13e9683.js} +0 -0
- package/lib/html.html-data.json +168 -68
- package/lib/types/components/duet-action-button/duet-action-button.d.ts +112 -0
- package/lib/types/components/duet-button/duet-button.d.ts +4 -0
- package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +2 -2
- package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +106 -48
- package/lib/types/components/duet-pagination/duet-pagination.d.ts +7 -2
- package/lib/types/components/duet-table/duet-table.d.ts +16 -0
- package/lib/types/components/duet-upload/duet-upload.d.ts +68 -58
- package/lib/types/components.d.ts +225 -149
- package/lib/types/utils/js-utils.d.ts +2 -0
- package/package.json +5 -6
- package/lib/cjs/duet-editable-table-button.cjs.entry.js +0 -96
- package/lib/cjs/js-utils-33a9dbe3.js +0 -16
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +0 -32
- package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +0 -225
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +0 -36
- package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +0 -225
- package/lib/duet/p-063fe96d.entry.js +0 -4
- package/lib/duet/p-2eeacf1a.entry.js +0 -4
- package/lib/duet/p-396f1bdc.entry.js +0 -4
- package/lib/duet/p-7b55f33e.entry.js +0 -4
- package/lib/duet/p-7e0e2209.system.entry.js +0 -4
- package/lib/duet/p-81867417.system.js +0 -4
- package/lib/duet/p-a3d7951c.system.entry.js +0 -4
- package/lib/duet/p-a619dff3.system.js +0 -4
- package/lib/duet/p-b25d3769.js +0 -4
- package/lib/duet/p-bf192d9f.entry.js +0 -4
- package/lib/duet/p-c76a68aa.system.entry.js +0 -4
- package/lib/duet/p-d12b3d21.system.entry.js +0 -4
- package/lib/duet/p-ef4962e8.entry.js +0 -4
- package/lib/esm/duet-editable-table-button.entry.js +0 -92
- package/lib/esm/js-utils-b69f17df.js +0 -14
- package/lib/esm-es5/duet-editable-table-button.entry.js +0 -4
- package/lib/esm-es5/duet-editable-table_4.entry.js +0 -4
- package/lib/esm-es5/focus-utils-d4e80e1e.js +0 -4
- package/lib/esm-es5/js-utils-b69f17df.js +0 -4
- package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +0 -73
- package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +0 -76
|
@@ -1,174 +1,228 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import { Component, Element, h, Host,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { Component, Element, Event, h, Host, Prop } from "@stencil/core";
|
|
5
|
+
import { fieldSorter } from "../../utils/js-utils";
|
|
6
|
+
import { isKeyboardClick } from "../../utils/keyboard-utils";
|
|
7
|
+
import { getLocaleString } from "../../utils/language-utils";
|
|
8
8
|
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
9
|
+
import { TableData } from "./duet-editable-table-tabledata";
|
|
9
10
|
export class DuetEditableTable {
|
|
10
11
|
constructor() {
|
|
11
|
-
this.template = undefined;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
* @internal
|
|
13
|
+
* Duet-table: margin of the component.
|
|
15
14
|
*/
|
|
16
|
-
this.
|
|
15
|
+
this.margin = "auto";
|
|
17
16
|
/**
|
|
18
|
-
*
|
|
17
|
+
* Duet-table: Style variation of the table.
|
|
19
18
|
*/
|
|
20
|
-
this.
|
|
19
|
+
this.variation = "striped";
|
|
21
20
|
/**
|
|
22
|
-
*
|
|
21
|
+
* Duet-table: Controls whether the table has a sticky header.
|
|
22
|
+
* Sticky headers are not compatible with breakpoint="none-scrollable".
|
|
23
23
|
*/
|
|
24
|
-
this.
|
|
24
|
+
this.sticky = false;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Duet-table: Adjust the distance from top of the viewport (in pixels) when the
|
|
27
|
+
* table header becomes sticky.
|
|
27
28
|
*/
|
|
28
|
-
this.
|
|
29
|
-
fi: "Kaikki",
|
|
30
|
-
en: "All items",
|
|
31
|
-
sv: "Alla objekt",
|
|
32
|
-
};
|
|
29
|
+
this.stickyDistance = "with-links";
|
|
33
30
|
/**
|
|
34
|
-
*
|
|
31
|
+
* Duet-table: By default the table is responsive - it will be flattened at narrow viewport widths.
|
|
32
|
+
* This prop controls the breakpoint at which the table should be rendered as a _regular_ table.
|
|
33
|
+
* Set to "none" to disable the responsive functionality.
|
|
34
|
+
* Set to "none-scrollable" to disable responsive functionality _and_ allow horizontal scrolling -
|
|
35
|
+
* this is useful for comparison tables where it's important to maintain column and row layout.
|
|
35
36
|
*/
|
|
36
|
-
this.
|
|
37
|
-
fi: "Toiminnot",
|
|
38
|
-
en: "Actions",
|
|
39
|
-
sv: "Handlingar",
|
|
40
|
-
};
|
|
37
|
+
this.breakpoint = "small";
|
|
41
38
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
39
|
+
* Define actions for all items in a table
|
|
40
|
+
* An alternative to inline HTML table.
|
|
41
|
+
* required for Sortable tables
|
|
42
|
+
* @default undefined
|
|
45
43
|
*/
|
|
46
|
-
this.
|
|
47
|
-
{ id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
|
|
48
|
-
];
|
|
44
|
+
this.actions = undefined;
|
|
49
45
|
/**
|
|
50
|
-
*
|
|
46
|
+
* Define columns for a table
|
|
47
|
+
* An alternative to inline HTML table.
|
|
48
|
+
* required for Sortable tables
|
|
51
49
|
* @default undefined
|
|
52
|
-
* @example [{
|
|
53
|
-
variation: "default",
|
|
54
|
-
icon: "action-edit-2",
|
|
55
|
-
id: "edit",
|
|
56
|
-
map: ["success"],
|
|
57
|
-
label: {
|
|
58
|
-
fi: " Label",
|
|
59
|
-
en: " Label",
|
|
60
|
-
sv: " Label",
|
|
61
|
-
}
|
|
62
|
-
}]
|
|
63
50
|
*/
|
|
64
|
-
this.
|
|
51
|
+
this.columns = undefined;
|
|
65
52
|
/**
|
|
66
|
-
*
|
|
53
|
+
* Define rows for a table
|
|
54
|
+
* An alternative to inline HTML table.
|
|
55
|
+
* required for Sortable tables
|
|
56
|
+
* @default undefined
|
|
67
57
|
*/
|
|
68
|
-
this.
|
|
58
|
+
this.rows = undefined;
|
|
69
59
|
/**
|
|
70
|
-
*
|
|
60
|
+
* Controls whether the table is sortable by headers
|
|
71
61
|
*/
|
|
72
|
-
this.
|
|
62
|
+
this.sortable = false;
|
|
63
|
+
/**
|
|
64
|
+
* Optional id that get passed to the table and used to setup ::parts
|
|
65
|
+
*/
|
|
66
|
+
this.groupId = "";
|
|
73
67
|
/**
|
|
74
68
|
* Theme of the table.
|
|
75
69
|
*/
|
|
76
70
|
this.theme = "";
|
|
77
71
|
/**
|
|
78
|
-
*
|
|
72
|
+
* Exposes the aria role for optimizing accessibility.
|
|
79
73
|
*/
|
|
80
|
-
this.
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
this.accessibleRole = undefined;
|
|
75
|
+
this.sortableDefaultLabel = {
|
|
76
|
+
fi: "Järjestä",
|
|
77
|
+
en: "Click to sort",
|
|
78
|
+
sv: "Klicka för att sortera",
|
|
79
|
+
};
|
|
80
|
+
this.actionColumnLabel = {
|
|
81
|
+
en: "Actions for rows",
|
|
82
|
+
fi: "Toiminnot rivillä",
|
|
83
|
+
sv: "Åtgärder för rader",
|
|
84
|
+
};
|
|
83
85
|
/**
|
|
84
|
-
*
|
|
86
|
+
* Private methods.
|
|
85
87
|
*/
|
|
86
|
-
this.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const { item, group, uid } = data;
|
|
98
|
-
if (this.template) {
|
|
99
|
-
return {
|
|
100
|
-
group,
|
|
101
|
-
uid,
|
|
102
|
-
item: this.template(item),
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
return { item, group, uid };
|
|
88
|
+
this.toggleColumn = (column, e) => {
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
const { sort_order, direction, index, key } = column;
|
|
91
|
+
this.duetTableToggle.emit({
|
|
92
|
+
sort_order,
|
|
93
|
+
index,
|
|
94
|
+
direction,
|
|
95
|
+
key,
|
|
96
|
+
component: "duet-editable-table",
|
|
97
|
+
originalEvent: e,
|
|
98
|
+
});
|
|
106
99
|
};
|
|
107
|
-
this.
|
|
108
|
-
if (
|
|
109
|
-
|
|
100
|
+
this.handleKeyDown = (column, e) => {
|
|
101
|
+
if (isKeyboardClick(e)) {
|
|
102
|
+
this.toggleColumn(column, e);
|
|
110
103
|
}
|
|
111
|
-
return Array.from(this.items).filter(item => needle === item[1].group);
|
|
112
104
|
};
|
|
113
105
|
}
|
|
114
106
|
/**
|
|
115
107
|
* Component lifecycle events.
|
|
116
108
|
*/
|
|
117
109
|
componentWillLoad() {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
this.internalGroupArray = this.groups;
|
|
110
|
+
inheritGlobalTheme(this);
|
|
111
|
+
}
|
|
112
|
+
createLabel(column) {
|
|
113
|
+
const { sort_order, direction, index, label } = column;
|
|
114
|
+
const i18nLabel = getLocaleString(label);
|
|
115
|
+
if (!this.sortable) {
|
|
116
|
+
return i18nLabel;
|
|
126
117
|
}
|
|
127
|
-
|
|
128
|
-
|
|
118
|
+
const getButtonIcon = () => {
|
|
119
|
+
// "action-subtract-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-subtract-small.svg
|
|
120
|
+
// "action-arrow-down-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-arrow-down-small.svg
|
|
121
|
+
// "action-arrow-up-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-arrow-up-small.svg
|
|
122
|
+
if (!!sort_order && direction === 1) {
|
|
123
|
+
return "action-arrow-down-small";
|
|
124
|
+
}
|
|
125
|
+
else if (!!sort_order && direction === -1) {
|
|
126
|
+
return "action-arrow-up-small";
|
|
127
|
+
}
|
|
128
|
+
return "action-subtract-small";
|
|
129
|
+
};
|
|
130
|
+
return (h("span", { class: "duet-table-label", "data-index": index },
|
|
131
|
+
h("duet-button", { size: "small", icon: getButtonIcon(), "icon-size": "medium-small", "accessible-label": getLocaleString(this.sortableDefaultLabel), variation: "plain", margin: "none", "icon-right": true, onClick: event => this.toggleColumn(column, event), onKeyDown: event => this.handleKeyDown(column, event) }, i18nLabel)));
|
|
132
|
+
}
|
|
133
|
+
getSortedColumns() {
|
|
134
|
+
//create a new array from sort instead of mutating original
|
|
135
|
+
return [...this.columns].sort(fieldSorter(["index"]));
|
|
136
|
+
}
|
|
137
|
+
getRowSortOrder() {
|
|
138
|
+
//create a new array from sort instead of mutating original
|
|
139
|
+
const fields = [...this.columns].sort(fieldSorter(["sort_order"]));
|
|
140
|
+
//return only key from objects that have sort_order
|
|
141
|
+
return fields
|
|
142
|
+
.filter(column => column.sort_order)
|
|
143
|
+
.map(column => {
|
|
144
|
+
// add - in-front of descending direction (required by field-sorter)
|
|
145
|
+
return column.direction === -1 ? `-${column.key}` : column.key;
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
renderTableHeader() {
|
|
149
|
+
if (!this.columns) {
|
|
150
|
+
return;
|
|
129
151
|
}
|
|
130
|
-
|
|
131
|
-
|
|
152
|
+
const sortedColumns = this.getSortedColumns();
|
|
153
|
+
return (h("tr", { class: {
|
|
154
|
+
"duet-table-action-header": !!this.actions,
|
|
155
|
+
} },
|
|
156
|
+
sortedColumns.map(column => {
|
|
157
|
+
if (column.display !== false) {
|
|
158
|
+
return h("th", { scope: "col" }, this.createLabel(column));
|
|
159
|
+
}
|
|
160
|
+
}),
|
|
161
|
+
this.actions && (h("th", { scope: "col", class: "duet-table-action-header-heading" }, this.actions && h("duet-visually-hidden", null, getLocaleString(this.actionColumnLabel))))));
|
|
162
|
+
}
|
|
163
|
+
renderActions(rowItem, index) {
|
|
164
|
+
// escape early
|
|
165
|
+
if (!this.actions) {
|
|
166
|
+
return;
|
|
132
167
|
}
|
|
133
|
-
|
|
168
|
+
// iterate through actions and add them in the sidebar
|
|
169
|
+
return (h("td", { class: "duet-text-right" }, this.actions.map(actionItem => {
|
|
170
|
+
return (h("duet-action-button", { actionMeta: Object.assign({}, (rowItem === null || rowItem === void 0 ? void 0 : rowItem.meta) || {}, { index }), actionId: (rowItem === null || rowItem === void 0 ? void 0 : rowItem.uid) || (rowItem === null || rowItem === void 0 ? void 0 : rowItem.id) || null, actionName: actionItem.name, theme: this.theme, iconName: actionItem.icon, iconColor: actionItem.color, iconSize: actionItem.size, background: actionItem.background }));
|
|
171
|
+
})));
|
|
172
|
+
}
|
|
173
|
+
renderTableBody() {
|
|
174
|
+
const columns = this.getSortedColumns();
|
|
175
|
+
const rowSortOrder = this.getRowSortOrder();
|
|
176
|
+
const sortedRows = [...this.rows].sort(fieldSorter(rowSortOrder));
|
|
177
|
+
// return a tbody with rows for each item in sortedRows
|
|
178
|
+
return sortedRows.map((row, index) => (h("tr", { class: {
|
|
179
|
+
"duet-table-action-row": !!this.actions,
|
|
180
|
+
"duet-editable-table-row": true,
|
|
181
|
+
[`duet-editable-table-row-${this.groupId}`]: true,
|
|
182
|
+
}, "data-meta": JSON.stringify(row.meta) },
|
|
183
|
+
columns.map(column => {
|
|
184
|
+
//if we don't have any data for this column, try getting an item instead (for backwards compatibility
|
|
185
|
+
const value = row[column.key] ? row[column.key] : row.item;
|
|
186
|
+
if (column.display !== false) {
|
|
187
|
+
return h(TableData, { data: value, groupId: this.groupId });
|
|
188
|
+
}
|
|
189
|
+
}),
|
|
190
|
+
this.actions && this.renderActions(row, index))));
|
|
134
191
|
}
|
|
135
192
|
/**
|
|
136
|
-
*
|
|
137
|
-
* when called the method will rerender the entire tabular structure.
|
|
193
|
+
* Render Methods
|
|
138
194
|
*/
|
|
139
|
-
async updateTable(passedItems = undefined) {
|
|
140
|
-
this.items = new Map(passedItems || this.items);
|
|
141
|
-
this.kick();
|
|
142
|
-
}
|
|
143
195
|
render() {
|
|
144
196
|
return (h(Host, { class: {
|
|
197
|
+
[`duet-editable-table-${this.variation}`]: true,
|
|
198
|
+
[`duet-editable-table-${this.theme}`]: true,
|
|
199
|
+
// sticky only valid when in regular table layout
|
|
200
|
+
"duet-editable-table-scrollable": this.breakpoint === "none-scrollable",
|
|
201
|
+
"duet-editable-table-sortable": this.sortable,
|
|
202
|
+
"duet-editable-table-actions": !!this.actions,
|
|
203
|
+
"duet-m-0": this.margin === "none",
|
|
145
204
|
"duet-theme-turva": this.theme === "turva",
|
|
146
|
-
} },
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
h("table", { class: "duet-editable-table", "aria-role": this.accessibleRole },
|
|
153
|
-
h("thead", { class: "duet-editable-table-header" },
|
|
205
|
+
} },
|
|
206
|
+
h("duet-table", { sticky: this.sticky, stickyDistance: this.stickyDistance, margin: this.margin, theme: this.theme, variation: this.variation, breakpoint: this.breakpoint },
|
|
207
|
+
h("table", { role: this.accessibleRole },
|
|
208
|
+
h("caption", null,
|
|
209
|
+
h("slot", { name: "tcaption" })),
|
|
210
|
+
h("thead", null,
|
|
154
211
|
h("tr", null,
|
|
155
|
-
h("
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return (h("duet-editable-table-item", { theme: this.theme, keyName: key, data: this.getItemData(value), groupId: group.id, part: group.id, alignment: this.alignment, actions: this.internalActionsArray }));
|
|
167
|
-
})))));
|
|
168
|
-
})));
|
|
212
|
+
h("td", { class: "duet-editable-table-actions-menu", colSpan: 99 },
|
|
213
|
+
h("slot", { name: "thead-first" }))),
|
|
214
|
+
this.renderTableHeader(),
|
|
215
|
+
h("tr", null,
|
|
216
|
+
h("td", { class: "duet-editable-table-actions-menu", colSpan: 99 },
|
|
217
|
+
h("slot", { name: "thead-last" })))),
|
|
218
|
+
h("tbody", null, this.renderTableBody()),
|
|
219
|
+
h("tfoot", null,
|
|
220
|
+
h("tr", null,
|
|
221
|
+
h("th", { class: "duet-editable-table-footer-menu", colSpan: 99 },
|
|
222
|
+
h("slot", { name: "tfoot" }))))))));
|
|
169
223
|
}
|
|
170
224
|
static get is() { return "duet-editable-table"; }
|
|
171
|
-
static get encapsulation() { return "
|
|
225
|
+
static get encapsulation() { return "scoped"; }
|
|
172
226
|
static get originalStyleUrls() { return {
|
|
173
227
|
"$": ["duet-editable-table.scss"]
|
|
174
228
|
}; }
|
|
@@ -176,15 +230,16 @@ export class DuetEditableTable {
|
|
|
176
230
|
"$": ["duet-editable-table.css"]
|
|
177
231
|
}; }
|
|
178
232
|
static get properties() { return {
|
|
179
|
-
"
|
|
180
|
-
"type": "
|
|
181
|
-
"mutable":
|
|
233
|
+
"margin": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"mutable": false,
|
|
182
236
|
"complexType": {
|
|
183
|
-
"original": "
|
|
184
|
-
"resolved": "
|
|
237
|
+
"original": "DuetMargin",
|
|
238
|
+
"resolved": "\"auto\" | \"none\"",
|
|
185
239
|
"references": {
|
|
186
|
-
"
|
|
187
|
-
"location": "
|
|
240
|
+
"DuetMargin": {
|
|
241
|
+
"location": "import",
|
|
242
|
+
"path": "../../common-types"
|
|
188
243
|
}
|
|
189
244
|
}
|
|
190
245
|
},
|
|
@@ -192,38 +247,63 @@ export class DuetEditableTable {
|
|
|
192
247
|
"optional": false,
|
|
193
248
|
"docs": {
|
|
194
249
|
"tags": [],
|
|
195
|
-
"text": "
|
|
250
|
+
"text": "Duet-table: margin of the component."
|
|
196
251
|
},
|
|
197
|
-
"
|
|
252
|
+
"attribute": "margin",
|
|
253
|
+
"reflect": false,
|
|
254
|
+
"defaultValue": "\"auto\""
|
|
198
255
|
},
|
|
199
|
-
"
|
|
256
|
+
"variation": {
|
|
200
257
|
"type": "string",
|
|
201
258
|
"mutable": false,
|
|
202
259
|
"complexType": {
|
|
203
|
-
"original": "
|
|
204
|
-
"resolved": "
|
|
260
|
+
"original": "DuetTableVariant",
|
|
261
|
+
"resolved": "\"fixed\" | \"plain\" | \"striped\"",
|
|
262
|
+
"references": {
|
|
263
|
+
"DuetTableVariant": {
|
|
264
|
+
"location": "import",
|
|
265
|
+
"path": "../duet-table/duet-table"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"required": false,
|
|
270
|
+
"optional": false,
|
|
271
|
+
"docs": {
|
|
272
|
+
"tags": [],
|
|
273
|
+
"text": "Duet-table: Style variation of the table."
|
|
274
|
+
},
|
|
275
|
+
"attribute": "variation",
|
|
276
|
+
"reflect": false,
|
|
277
|
+
"defaultValue": "\"striped\""
|
|
278
|
+
},
|
|
279
|
+
"sticky": {
|
|
280
|
+
"type": "boolean",
|
|
281
|
+
"mutable": false,
|
|
282
|
+
"complexType": {
|
|
283
|
+
"original": "boolean",
|
|
284
|
+
"resolved": "boolean",
|
|
205
285
|
"references": {}
|
|
206
286
|
},
|
|
207
287
|
"required": false,
|
|
208
288
|
"optional": false,
|
|
209
289
|
"docs": {
|
|
210
290
|
"tags": [],
|
|
211
|
-
"text": "
|
|
291
|
+
"text": "Duet-table: Controls whether the table has a sticky header.\nSticky headers are not compatible with breakpoint=\"none-scrollable\"."
|
|
212
292
|
},
|
|
213
|
-
"attribute": "
|
|
293
|
+
"attribute": "sticky",
|
|
214
294
|
"reflect": false,
|
|
215
|
-
"defaultValue": "
|
|
295
|
+
"defaultValue": "false"
|
|
216
296
|
},
|
|
217
|
-
"
|
|
218
|
-
"type": "
|
|
297
|
+
"stickyDistance": {
|
|
298
|
+
"type": "string",
|
|
219
299
|
"mutable": false,
|
|
220
300
|
"complexType": {
|
|
221
|
-
"original": "
|
|
222
|
-
"resolved": "
|
|
301
|
+
"original": "DuetTableStickyDistance",
|
|
302
|
+
"resolved": "\"none\" | \"with-links\" | \"without-links\"",
|
|
223
303
|
"references": {
|
|
224
|
-
"
|
|
304
|
+
"DuetTableStickyDistance": {
|
|
225
305
|
"location": "import",
|
|
226
|
-
"path": "
|
|
306
|
+
"path": "../duet-table/duet-table"
|
|
227
307
|
}
|
|
228
308
|
}
|
|
229
309
|
},
|
|
@@ -231,20 +311,22 @@ export class DuetEditableTable {
|
|
|
231
311
|
"optional": false,
|
|
232
312
|
"docs": {
|
|
233
313
|
"tags": [],
|
|
234
|
-
"text": "
|
|
314
|
+
"text": "Duet-table: Adjust the distance from top of the viewport (in pixels) when the\ntable header becomes sticky."
|
|
235
315
|
},
|
|
236
|
-
"
|
|
316
|
+
"attribute": "sticky-distance",
|
|
317
|
+
"reflect": false,
|
|
318
|
+
"defaultValue": "\"with-links\""
|
|
237
319
|
},
|
|
238
|
-
"
|
|
239
|
-
"type": "
|
|
320
|
+
"breakpoint": {
|
|
321
|
+
"type": "string",
|
|
240
322
|
"mutable": false,
|
|
241
323
|
"complexType": {
|
|
242
|
-
"original": "
|
|
243
|
-
"resolved": "
|
|
324
|
+
"original": "DuetTableBreakpoint",
|
|
325
|
+
"resolved": "\"large\" | \"medium\" | \"none\" | \"none-scrollable\" | \"small\" | \"x-large\" | \"xx-large\" | \"xxx-large\"",
|
|
244
326
|
"references": {
|
|
245
|
-
"
|
|
327
|
+
"DuetTableBreakpoint": {
|
|
246
328
|
"location": "import",
|
|
247
|
-
"path": "
|
|
329
|
+
"path": "../duet-table/duet-table"
|
|
248
330
|
}
|
|
249
331
|
}
|
|
250
332
|
},
|
|
@@ -252,18 +334,20 @@ export class DuetEditableTable {
|
|
|
252
334
|
"optional": false,
|
|
253
335
|
"docs": {
|
|
254
336
|
"tags": [],
|
|
255
|
-
"text": "
|
|
337
|
+
"text": "Duet-table: By default the table is responsive - it will be flattened at narrow viewport widths.\nThis prop controls the breakpoint at which the table should be rendered as a _regular_ table.\nSet to \"none\" to disable the responsive functionality.\nSet to \"none-scrollable\" to disable responsive functionality _and_ allow horizontal scrolling -\nthis is useful for comparison tables where it's important to maintain column and row layout."
|
|
256
338
|
},
|
|
257
|
-
"
|
|
339
|
+
"attribute": "breakpoint",
|
|
340
|
+
"reflect": false,
|
|
341
|
+
"defaultValue": "\"small\""
|
|
258
342
|
},
|
|
259
|
-
"
|
|
260
|
-
"type": "
|
|
261
|
-
"mutable":
|
|
343
|
+
"actions": {
|
|
344
|
+
"type": "unknown",
|
|
345
|
+
"mutable": true,
|
|
262
346
|
"complexType": {
|
|
263
|
-
"original": "
|
|
264
|
-
"resolved": "string
|
|
347
|
+
"original": "DuetEditableTableActions",
|
|
348
|
+
"resolved": "{ icon: string; color: string; background: string; size: DuetActionButtonIconSize; name: string; map?: string[]; label?: DuetLangObject; }[]",
|
|
265
349
|
"references": {
|
|
266
|
-
"
|
|
350
|
+
"DuetEditableTableActions": {
|
|
267
351
|
"location": "local"
|
|
268
352
|
}
|
|
269
353
|
}
|
|
@@ -273,27 +357,21 @@ export class DuetEditableTable {
|
|
|
273
357
|
"docs": {
|
|
274
358
|
"tags": [{
|
|
275
359
|
"name": "default",
|
|
276
|
-
"text": "
|
|
277
|
-
}, {
|
|
278
|
-
"name": "example",
|
|
279
|
-
"text": "[{ id: \"success\", label: {fi: \"Onnistunut\", en: \"Success\", sv: \"Alt klart\", }}]."
|
|
360
|
+
"text": "undefined"
|
|
280
361
|
}],
|
|
281
|
-
"text": "
|
|
362
|
+
"text": "Define actions for all items in a table\nAn alternative to inline HTML table.\nrequired for Sortable tables"
|
|
282
363
|
},
|
|
283
|
-
"
|
|
284
|
-
"reflect": false,
|
|
285
|
-
"defaultValue": "[\n { id: \"all\", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },\n ]"
|
|
364
|
+
"defaultValue": "undefined"
|
|
286
365
|
},
|
|
287
|
-
"
|
|
288
|
-
"type": "
|
|
289
|
-
"mutable":
|
|
366
|
+
"columns": {
|
|
367
|
+
"type": "unknown",
|
|
368
|
+
"mutable": true,
|
|
290
369
|
"complexType": {
|
|
291
|
-
"original": "
|
|
292
|
-
"resolved": "
|
|
370
|
+
"original": "DuetEditableTableColumns",
|
|
371
|
+
"resolved": "DuetEditableTableColumn[]",
|
|
293
372
|
"references": {
|
|
294
|
-
"
|
|
295
|
-
"location": "
|
|
296
|
-
"path": "./duet-editable-table-item"
|
|
373
|
+
"DuetEditableTableColumns": {
|
|
374
|
+
"location": "local"
|
|
297
375
|
}
|
|
298
376
|
}
|
|
299
377
|
},
|
|
@@ -303,17 +381,35 @@ export class DuetEditableTable {
|
|
|
303
381
|
"tags": [{
|
|
304
382
|
"name": "default",
|
|
305
383
|
"text": "undefined"
|
|
306
|
-
}, {
|
|
307
|
-
"name": "example",
|
|
308
|
-
"text": "[{\nvariation: \"default\",\nicon: \"action-edit-2\",\nid: \"edit\",\nmap: [\"success\"],\nlabel: {\n fi: \" Label\",\n en: \" Label\",\n sv: \" Label\",\n}\n}]"
|
|
309
384
|
}],
|
|
310
|
-
"text": "
|
|
385
|
+
"text": "Define columns for a table\nAn alternative to inline HTML table.\nrequired for Sortable tables"
|
|
386
|
+
},
|
|
387
|
+
"defaultValue": "undefined"
|
|
388
|
+
},
|
|
389
|
+
"rows": {
|
|
390
|
+
"type": "unknown",
|
|
391
|
+
"mutable": true,
|
|
392
|
+
"complexType": {
|
|
393
|
+
"original": "DuetEditableTableRows",
|
|
394
|
+
"resolved": "Record<string, any>[]",
|
|
395
|
+
"references": {
|
|
396
|
+
"DuetEditableTableRows": {
|
|
397
|
+
"location": "local"
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"required": false,
|
|
402
|
+
"optional": false,
|
|
403
|
+
"docs": {
|
|
404
|
+
"tags": [{
|
|
405
|
+
"name": "default",
|
|
406
|
+
"text": "undefined"
|
|
407
|
+
}],
|
|
408
|
+
"text": "Define rows for a table\nAn alternative to inline HTML table.\nrequired for Sortable tables"
|
|
311
409
|
},
|
|
312
|
-
"attribute": "actions",
|
|
313
|
-
"reflect": false,
|
|
314
410
|
"defaultValue": "undefined"
|
|
315
411
|
},
|
|
316
|
-
"
|
|
412
|
+
"sortable": {
|
|
317
413
|
"type": "boolean",
|
|
318
414
|
"mutable": false,
|
|
319
415
|
"complexType": {
|
|
@@ -325,13 +421,13 @@ export class DuetEditableTable {
|
|
|
325
421
|
"optional": false,
|
|
326
422
|
"docs": {
|
|
327
423
|
"tags": [],
|
|
328
|
-
"text": "
|
|
424
|
+
"text": "Controls whether the table is sortable by headers"
|
|
329
425
|
},
|
|
330
|
-
"attribute": "
|
|
426
|
+
"attribute": "sortable",
|
|
331
427
|
"reflect": false,
|
|
332
428
|
"defaultValue": "false"
|
|
333
429
|
},
|
|
334
|
-
"
|
|
430
|
+
"groupId": {
|
|
335
431
|
"type": "string",
|
|
336
432
|
"mutable": false,
|
|
337
433
|
"complexType": {
|
|
@@ -343,11 +439,11 @@ export class DuetEditableTable {
|
|
|
343
439
|
"optional": false,
|
|
344
440
|
"docs": {
|
|
345
441
|
"tags": [],
|
|
346
|
-
"text": "
|
|
442
|
+
"text": "Optional id that get passed to the table and used to setup ::parts"
|
|
347
443
|
},
|
|
348
|
-
"attribute": "
|
|
444
|
+
"attribute": "group-id",
|
|
349
445
|
"reflect": false,
|
|
350
|
-
"defaultValue": "
|
|
446
|
+
"defaultValue": "\"\""
|
|
351
447
|
},
|
|
352
448
|
"theme": {
|
|
353
449
|
"type": "string",
|
|
@@ -371,34 +467,64 @@ export class DuetEditableTable {
|
|
|
371
467
|
"attribute": "theme",
|
|
372
468
|
"reflect": false,
|
|
373
469
|
"defaultValue": "\"\""
|
|
470
|
+
},
|
|
471
|
+
"accessibleRole": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"mutable": false,
|
|
474
|
+
"complexType": {
|
|
475
|
+
"original": "string",
|
|
476
|
+
"resolved": "string",
|
|
477
|
+
"references": {}
|
|
478
|
+
},
|
|
479
|
+
"required": false,
|
|
480
|
+
"optional": false,
|
|
481
|
+
"docs": {
|
|
482
|
+
"tags": [],
|
|
483
|
+
"text": "Exposes the aria role for optimizing accessibility."
|
|
484
|
+
},
|
|
485
|
+
"attribute": "accessible-role",
|
|
486
|
+
"reflect": false,
|
|
487
|
+
"defaultValue": "undefined"
|
|
374
488
|
}
|
|
375
489
|
}; }
|
|
376
|
-
static get
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
490
|
+
static get events() { return [{
|
|
491
|
+
"method": "duetTableToggle",
|
|
492
|
+
"name": "duetTableToggle",
|
|
493
|
+
"bubbles": true,
|
|
494
|
+
"cancelable": true,
|
|
495
|
+
"composed": true,
|
|
496
|
+
"docs": {
|
|
497
|
+
"tags": [],
|
|
498
|
+
"text": "Event emitted when table is sortable and a header item is clicked/enter is pressed"
|
|
499
|
+
},
|
|
381
500
|
"complexType": {
|
|
382
|
-
"
|
|
383
|
-
"
|
|
384
|
-
"tags": [],
|
|
385
|
-
"text": ""
|
|
386
|
-
}],
|
|
501
|
+
"original": "DuetTableToggleEvent",
|
|
502
|
+
"resolved": "{ component: \"duet-editable-table\"; sort_order?: number; direction: 1 | -1; index: number; key: string; originalEvent: MouseEvent | KeyboardEvent; }",
|
|
387
503
|
"references": {
|
|
388
|
-
"
|
|
389
|
-
"location": "global"
|
|
390
|
-
},
|
|
391
|
-
"DuetEditableTableItems": {
|
|
504
|
+
"DuetTableToggleEvent": {
|
|
392
505
|
"location": "local"
|
|
393
506
|
}
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}, {
|
|
510
|
+
"method": "duetMenuClick",
|
|
511
|
+
"name": "duetMenuClick",
|
|
512
|
+
"bubbles": true,
|
|
513
|
+
"cancelable": true,
|
|
514
|
+
"composed": true,
|
|
397
515
|
"docs": {
|
|
398
|
-
"
|
|
399
|
-
"
|
|
516
|
+
"tags": [],
|
|
517
|
+
"text": "Event emitted when table is sortable and a header item is clicked/enter is pressed"
|
|
518
|
+
},
|
|
519
|
+
"complexType": {
|
|
520
|
+
"original": "DuetTableMenuEvent",
|
|
521
|
+
"resolved": "{ component: \"duet-editable-table\"; originalEvent: MouseEvent | KeyboardEvent; }",
|
|
522
|
+
"references": {
|
|
523
|
+
"DuetTableMenuEvent": {
|
|
524
|
+
"location": "local"
|
|
525
|
+
}
|
|
526
|
+
}
|
|
400
527
|
}
|
|
401
|
-
}
|
|
402
|
-
}; }
|
|
528
|
+
}]; }
|
|
403
529
|
static get elementRef() { return "element"; }
|
|
404
530
|
}
|