@duetds/components 4.36.1 → 5.0.2
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 +1135 -983
- 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 +4 -4
- 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 +7 -7
- 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-2404e669.js} +1 -1
- package/lib/cjs/{index-4f342f1c.js → index-91b9281f.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-choice/duet-choice.css +20 -15
- package/lib/collection/components/duet-choice/duet-choice.js +10 -8
- 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-header/duet-header.css +5 -1
- package/lib/collection/components/duet-header/duet-header.js +4 -3
- 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 +1148 -1007
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-061835f3.system.entry.js → p-09bdb2b4.system.entry.js} +1 -1
- package/lib/duet/{p-1a95aeb6.entry.js → p-0e4b29a3.entry.js} +1 -1
- package/lib/duet/{p-65c418f7.system.entry.js → p-16477cd0.system.entry.js} +1 -1
- package/lib/duet/p-1c993c62.system.entry.js +4 -0
- package/lib/duet/{p-8c53bc24.system.entry.js → p-1f78f660.system.entry.js} +1 -1
- package/lib/duet/{p-ef275410.entry.js → p-24442312.entry.js} +1 -1
- package/lib/duet/{p-ddb6344c.system.js → p-268c0abb.system.js} +0 -0
- package/lib/duet/p-2d602c49.system.entry.js +4 -0
- package/lib/duet/{p-946f34b4.system.entry.js → p-305a8332.system.entry.js} +1 -1
- package/lib/duet/{p-4fdbc6ff.system.entry.js → p-3724e8bf.system.entry.js} +1 -1
- package/lib/duet/{p-5d9affcd.entry.js → p-40deceee.entry.js} +1 -1
- package/lib/duet/{p-211b4485.system.entry.js → p-4169371b.system.entry.js} +1 -1
- package/lib/duet/{p-9ce0e625.entry.js → p-4306e41d.entry.js} +1 -1
- package/lib/duet/{p-5376a9db.entry.js → p-43a310bd.entry.js} +1 -1
- package/lib/duet/{p-29255af8.entry.js → p-45c0bd39.entry.js} +1 -1
- package/lib/duet/{p-fd2211ab.entry.js → p-47885d97.entry.js} +1 -1
- package/lib/duet/{p-615bfc61.system.entry.js → p-4b9af907.system.entry.js} +1 -1
- package/lib/duet/{p-1c4721a1.entry.js → p-4f9d6d43.entry.js} +1 -1
- package/lib/duet/{p-85100e09.entry.js → p-52f07766.entry.js} +1 -1
- package/lib/duet/{p-e8e35258.entry.js → p-567321c9.entry.js} +1 -1
- package/lib/duet/p-572ee1f5.entry.js +4 -0
- package/lib/duet/{p-cb445018.js → p-5746d88c.js} +1 -1
- package/lib/duet/{p-286d2ad2.system.entry.js → p-57f6b52e.system.entry.js} +1 -1
- package/lib/duet/p-5a4e576c.entry.js +4 -0
- package/lib/duet/{p-fae71c1f.entry.js → p-5ad66dfd.entry.js} +1 -1
- package/lib/duet/{p-f6da56c8.entry.js → p-5cc97dae.entry.js} +1 -1
- package/lib/duet/{p-03cf3ebf.entry.js → p-5ce39b6b.entry.js} +1 -1
- package/lib/duet/{p-46ae601a.entry.js → p-615f0b6f.entry.js} +1 -1
- package/lib/duet/{p-83452e8f.entry.js → p-63f6099b.entry.js} +1 -1
- package/lib/duet/p-681e93cd.entry.js +4 -0
- package/lib/duet/p-6a455a78.system.entry.js +4 -0
- package/lib/duet/{p-c52f4de0.system.entry.js → p-6d142621.system.entry.js} +1 -1
- package/lib/duet/{p-ca0ee655.system.entry.js → p-6fc73186.system.entry.js} +1 -1
- package/lib/duet/{p-e5ce7aad.system.entry.js → p-72469869.system.entry.js} +1 -1
- package/lib/duet/{p-20cdb787.entry.js → p-73d3d1bf.entry.js} +1 -1
- package/lib/duet/{p-164a7037.system.entry.js → p-763d700b.system.entry.js} +1 -1
- package/lib/duet/{p-d9716aec.system.entry.js → p-770fdb8f.system.entry.js} +1 -1
- package/lib/duet/{p-4e2532c7.system.js → p-77acbfe4.system.js} +1 -1
- package/lib/duet/{p-d21f19cc.system.js → p-7d65b8fc.system.js} +1 -1
- package/lib/duet/{p-ffb5fb75.system.entry.js → p-7e1d6ac6.system.entry.js} +1 -1
- package/lib/duet/{p-c7fa7dcc.system.entry.js → p-7f58aced.system.entry.js} +1 -1
- package/lib/duet/{p-22baf1f8.system.entry.js → p-806dc8b7.system.entry.js} +1 -1
- package/lib/duet/{p-fa99eaa4.system.js → p-812b0905.system.js} +0 -0
- package/lib/duet/{p-e7b53f4f.system.entry.js → p-854558fd.system.entry.js} +1 -1
- package/lib/duet/{p-c514010b.system.entry.js → p-85507ac3.system.entry.js} +1 -1
- package/lib/duet/p-8a241b0d.system.js +4 -0
- package/lib/duet/p-8ab8531d.entry.js +4 -0
- package/lib/duet/{p-eb892975.system.entry.js → p-8ff7380a.system.entry.js} +1 -1
- package/lib/duet/p-92639d0b.system.js +4 -0
- package/lib/duet/{p-3d1b0105.entry.js → p-97b9a61f.entry.js} +1 -1
- package/lib/duet/{p-3bb702e3.system.entry.js → p-97f24160.system.entry.js} +2 -2
- package/lib/duet/{p-740b5609.entry.js → p-9816d0ab.entry.js} +1 -1
- package/lib/duet/{p-ae14591e.entry.js → p-9c37e704.entry.js} +1 -1
- package/lib/duet/p-9c57b94d.system.entry.js +4 -0
- package/lib/duet/{p-635dacce.system.entry.js → p-9fa719d0.system.entry.js} +1 -1
- package/lib/duet/p-a4c7bb27.system.entry.js +4 -0
- package/lib/duet/{p-3c3536be.entry.js → p-a9158499.entry.js} +1 -1
- package/lib/duet/{p-e7dd8a15.system.entry.js → p-a934db65.system.entry.js} +1 -1
- package/lib/duet/{p-e35d8543.entry.js → p-acb043aa.entry.js} +1 -1
- package/lib/duet/{p-7f0e360d.entry.js → p-b2811c51.entry.js} +1 -1
- package/lib/duet/{p-d24c6bc1.entry.js → p-b53afa7a.entry.js} +1 -1
- package/lib/duet/{p-0366552b.system.entry.js → p-b686f39d.system.entry.js} +1 -1
- package/lib/duet/{p-ebc56043.entry.js → p-b6d5be13.entry.js} +1 -1
- package/lib/duet/{p-e8303364.system.entry.js → p-bb61f7d8.system.entry.js} +1 -1
- package/lib/duet/{p-12941aef.system.entry.js → p-bc895d5f.system.entry.js} +1 -1
- package/lib/duet/{p-e47daca7.system.entry.js → p-beca945d.system.entry.js} +1 -1
- package/lib/duet/{p-dcaecb5e.js → p-c420e1ab.js} +1 -1
- package/lib/duet/{p-5b546064.entry.js → p-c801c899.entry.js} +1 -1
- package/lib/duet/{p-3547d108.entry.js → p-c8f1cc9c.entry.js} +1 -1
- package/lib/duet/{p-c8ec3b99.entry.js → p-cd8c4a50.entry.js} +1 -1
- package/lib/duet/{p-b6dd0933.entry.js → p-ce487a35.entry.js} +1 -1
- package/lib/duet/{p-c6df2ea8.system.entry.js → p-ce6e5918.system.entry.js} +1 -1
- package/lib/duet/{p-c2d32103.entry.js → p-d03cb5c3.entry.js} +1 -1
- package/lib/duet/p-d173c966.entry.js +4 -0
- package/lib/duet/{p-79b9e7ef.system.entry.js → p-d414e0f6.system.entry.js} +1 -1
- package/lib/duet/{p-8143f3de.js → p-d7bc0102.js} +0 -0
- package/lib/duet/{p-24b9e806.entry.js → p-d7d80b8e.entry.js} +1 -1
- package/lib/duet/p-d8ed6905.entry.js +4 -0
- package/lib/duet/{p-562ae946.entry.js → p-da61c503.entry.js} +1 -1
- package/lib/duet/p-dbb4a588.js +4 -0
- package/lib/duet/p-dd8fade8.entry.js +4 -0
- package/lib/duet/{p-1db7a35b.entry.js → p-de67de41.entry.js} +1 -1
- package/lib/duet/{p-9df321b3.system.entry.js → p-def972d1.system.entry.js} +1 -1
- package/lib/duet/p-df2d8ec4.entry.js +4 -0
- package/lib/duet/{p-05e2c680.system.entry.js → p-e35ea4b9.system.entry.js} +1 -1
- package/lib/duet/{p-ad3dad04.system.js → p-e9ab7f0a.system.js} +1 -1
- package/lib/duet/{p-7a32ceb3.system.entry.js → p-eb383537.system.entry.js} +1 -1
- package/lib/duet/{p-ad07f399.js → p-ed75c8b3.js} +0 -0
- package/lib/duet/{p-c18080ad.entry.js → p-ee8682fc.entry.js} +1 -1
- package/lib/duet/p-f155c84d.system.entry.js +4 -0
- package/lib/duet/{p-d945a4b0.system.entry.js → p-f1b895c8.system.entry.js} +1 -1
- package/lib/duet/{p-89e42127.system.entry.js → p-f5af2560.system.entry.js} +1 -1
- package/lib/duet/{p-3900577d.system.entry.js → p-f7475d5a.system.entry.js} +1 -1
- package/lib/duet/p-f7c7f37d.js +4 -0
- package/lib/duet/{p-210d739c.system.entry.js → p-feca1c50.system.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 +4 -4
- 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 +7 -7
- 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-46b28332.js} +1 -1
- package/lib/esm/{index-4a5e7664.js → index-8743db3b.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-46b28332.js +4 -0
- package/lib/esm-es5/{index-4a5e7664.js → index-8743db3b.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 +169 -69
- 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-header/duet-header.d.ts +1 -0
- 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 +8 -16
- 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-2361986e.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-493c6d2f.system.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-ded33218.system.entry.js +0 -4
- package/lib/duet/p-e6a69eb8.js +0 -4
- package/lib/duet/p-ef4962e8.entry.js +0 -4
- package/lib/duet/p-ff21f3c2.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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duetds/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "This package includes Duet Design System Web Components and related utilities.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "duetdesignsystem@lahitapiola.fi"
|
|
@@ -42,27 +42,25 @@
|
|
|
42
42
|
"stencil:koa": "stencil build --dev --watch",
|
|
43
43
|
"start": "run-p koa stencil:koa",
|
|
44
44
|
"start:dev": "npm run stencil:dev",
|
|
45
|
-
"koa": "
|
|
46
|
-
"koa:ci": "
|
|
47
|
-
"koa:dev": "node helpers/koa-server.js",
|
|
45
|
+
"koa": "lerna exec 'npm run start:dev:watch' --scope '@duetds/server'",
|
|
46
|
+
"koa:ci": "lerna exec 'npm run koa:serve:ci' --scope '@duetds/server'",
|
|
48
47
|
"duet:build:testsite": "stencil build --serve",
|
|
49
48
|
"copy:vscode": "copyfiles --flat \"./lib/html.html-data.json\" \"../vscode\""
|
|
50
49
|
},
|
|
51
50
|
"dependencies": {
|
|
52
51
|
"body-scroll-lock": "3.1.5",
|
|
53
|
-
"
|
|
52
|
+
"kill-process-by-name": "1.0.5"
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
56
|
-
"@duetds/fonts": "1.4.
|
|
57
|
-
"@duetds/icons": "2.2.
|
|
55
|
+
"@duetds/fonts": "1.4.20",
|
|
56
|
+
"@duetds/icons": "2.2.20",
|
|
58
57
|
"@duetds/stencil-angular-output-target": "0.0.2",
|
|
59
58
|
"@duetds/stencil-react-output-target": "0.0.10",
|
|
60
|
-
"@duetds/tokens": "2.
|
|
59
|
+
"@duetds/tokens": "2.4.16",
|
|
61
60
|
"@koa/cors": "3.1.0",
|
|
62
61
|
"@rollup/plugin-replace": "3.0.1",
|
|
63
62
|
"@stencil/core": "2.12.1",
|
|
64
63
|
"@stencil/sass": "1.5.2",
|
|
65
|
-
"@stencil/utils": "0.0.5",
|
|
66
64
|
"@types/jest": "26.0.24",
|
|
67
65
|
"@types/jest-image-snapshot": "4.3.1",
|
|
68
66
|
"chalk": "4.1.2",
|
|
@@ -75,12 +73,6 @@
|
|
|
75
73
|
"jest-environment-node": "26.6.2",
|
|
76
74
|
"jest-image-snapshot": "4.5.1",
|
|
77
75
|
"jest-junit": "12.2.0",
|
|
78
|
-
"kill-process-by-name": "1.0.5",
|
|
79
|
-
"koa": "2.13.4",
|
|
80
|
-
"koa-body": "4.2.0",
|
|
81
|
-
"koa-mount": "4.0.0",
|
|
82
|
-
"koa-router": "10.1.1",
|
|
83
|
-
"koa-static": "5.0.0",
|
|
84
76
|
"npm-run-all": "4.1.5",
|
|
85
77
|
"onchange": "7.1.0",
|
|
86
78
|
"prettier": "2.5.1",
|
|
@@ -96,5 +88,5 @@
|
|
|
96
88
|
"collection": "lib/collection/collection-manifest.json",
|
|
97
89
|
"es2015": "lib/esm/index.js",
|
|
98
90
|
"es2017": "lib/esm/index.js",
|
|
99
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "c629527d8971df15557ba85ca9864530135087fe"
|
|
100
92
|
}
|
|
@@ -1,96 +0,0 @@
|
|
|
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-4f342f1c.js');
|
|
9
|
-
const languageUtils = require('./language-utils-aa282901.js');
|
|
10
|
-
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
|
-
const tokenUtils = require('./token-utils-f402e205.js');
|
|
12
|
-
require('./string-utils-267e3dbb.js');
|
|
13
|
-
require('./tokens.module-6b2df1c2.js');
|
|
14
|
-
|
|
15
|
-
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}";
|
|
16
|
-
|
|
17
|
-
let DuetEditableTableButton = class {
|
|
18
|
-
constructor(hostRef) {
|
|
19
|
-
index.registerInstance(this, hostRef);
|
|
20
|
-
this.duetEditableItemAction = index.createEvent(this, "duetEditableItemAction", 7);
|
|
21
|
-
this.isHovering = false;
|
|
22
|
-
/**
|
|
23
|
-
* Theme of the empty state component.
|
|
24
|
-
*/
|
|
25
|
-
this.theme = undefined;
|
|
26
|
-
/**
|
|
27
|
-
* action items passed from host component
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
this.actions = undefined;
|
|
31
|
-
/**
|
|
32
|
-
* uid that gets passed along when the action is emitted
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
this.uid = "";
|
|
36
|
-
/**
|
|
37
|
-
* group associated with action
|
|
38
|
-
* @internal
|
|
39
|
-
*/
|
|
40
|
-
this.group = "";
|
|
41
|
-
/**
|
|
42
|
-
* key of the item in the map
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
this.keyName = "";
|
|
46
|
-
this.onMouseEnter = () => {
|
|
47
|
-
this.isHovering = true;
|
|
48
|
-
};
|
|
49
|
-
this.onMouseLeave = () => {
|
|
50
|
-
this.isHovering = false;
|
|
51
|
-
};
|
|
52
|
-
this.getColours = (byName = false) => {
|
|
53
|
-
let colorHover = this.actions.color_hover;
|
|
54
|
-
let colorBlur = this.actions.color;
|
|
55
|
-
if (byName) {
|
|
56
|
-
colorHover = tokenUtils.getColorByName(this.actions.color_hover, this.theme);
|
|
57
|
-
colorBlur = tokenUtils.getColorByName(this.actions.color, this.theme);
|
|
58
|
-
}
|
|
59
|
-
return this.isHovering ? colorHover : colorBlur;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
/**
|
|
64
|
-
* Component lifecycle events.
|
|
65
|
-
*/
|
|
66
|
-
componentWillLoad() {
|
|
67
|
-
themeableComponent.inheritGlobalTheme(this);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
/**
|
|
71
|
-
* private functions
|
|
72
|
-
*/
|
|
73
|
-
emitActionEvent(ev) {
|
|
74
|
-
this.duetEditableItemAction.emit({
|
|
75
|
-
originalEvent: ev,
|
|
76
|
-
uid: this.uid,
|
|
77
|
-
group: this.group,
|
|
78
|
-
action: this.actions.id,
|
|
79
|
-
keyName: this.keyName,
|
|
80
|
-
component: "duet-editable-table-item",
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* render() function
|
|
85
|
-
* Always the last one in the class.
|
|
86
|
-
*/
|
|
87
|
-
render() {
|
|
88
|
-
return (index.h("button", { style: {
|
|
89
|
-
"border-color": this.getColours(true),
|
|
90
|
-
}, 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.getColours(), margin: "none" })));
|
|
91
|
-
}
|
|
92
|
-
get el() { return index.getElement(this); }
|
|
93
|
-
};
|
|
94
|
-
DuetEditableTableButton.style = duetEditableTableButtonCss;
|
|
95
|
-
|
|
96
|
-
exports.duet_editable_table_button = DuetEditableTableButton;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
const debounce = (func, timeout = 50) => {
|
|
7
|
-
let timer;
|
|
8
|
-
return (...args) => {
|
|
9
|
-
clearTimeout(timer);
|
|
10
|
-
timer = setTimeout(() => {
|
|
11
|
-
func.apply(undefined, args);
|
|
12
|
-
}, timeout);
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
exports.debounce = debounce;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
*,
|
|
2
|
-
*::after,
|
|
3
|
-
*::before {
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
padding: 0;
|
|
6
|
-
margin: 0;
|
|
7
|
-
background: transparent;
|
|
8
|
-
border: 0;
|
|
9
|
-
-moz-appearance: none;
|
|
10
|
-
-webkit-appearance: none;
|
|
11
|
-
appearance: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host button {
|
|
15
|
-
display: flex;
|
|
16
|
-
align-content: space-between;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
min-width: 32px;
|
|
19
|
-
max-width: 32px;
|
|
20
|
-
height: 100%;
|
|
21
|
-
min-height: 32px;
|
|
22
|
-
max-height: 32px;
|
|
23
|
-
padding: 0;
|
|
24
|
-
margin: 0;
|
|
25
|
-
cursor: pointer !important;
|
|
26
|
-
background-color: transparent;
|
|
27
|
-
border: 1px solid;
|
|
28
|
-
border-radius: 50%;
|
|
29
|
-
}
|
|
30
|
-
:host button duet-icon {
|
|
31
|
-
align-self: center;
|
|
32
|
-
}
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import { Component, Element, Event, h, Prop, State } from "@stencil/core";
|
|
5
|
-
import { getLocaleString } from "../../utils/language-utils";
|
|
6
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
7
|
-
import { getColorByName } from "../../utils/token-utils";
|
|
8
|
-
export class DuetEditableTableButton {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.isHovering = false;
|
|
11
|
-
/**
|
|
12
|
-
* Theme of the empty state component.
|
|
13
|
-
*/
|
|
14
|
-
this.theme = undefined;
|
|
15
|
-
/**
|
|
16
|
-
* action items passed from host component
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
this.actions = undefined;
|
|
20
|
-
/**
|
|
21
|
-
* uid that gets passed along when the action is emitted
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
this.uid = "";
|
|
25
|
-
/**
|
|
26
|
-
* group associated with action
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
this.group = "";
|
|
30
|
-
/**
|
|
31
|
-
* key of the item in the map
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
this.keyName = "";
|
|
35
|
-
this.onMouseEnter = () => {
|
|
36
|
-
this.isHovering = true;
|
|
37
|
-
};
|
|
38
|
-
this.onMouseLeave = () => {
|
|
39
|
-
this.isHovering = false;
|
|
40
|
-
};
|
|
41
|
-
this.getColours = (byName = false) => {
|
|
42
|
-
let colorHover = this.actions.color_hover;
|
|
43
|
-
let colorBlur = this.actions.color;
|
|
44
|
-
if (byName) {
|
|
45
|
-
colorHover = getColorByName(this.actions.color_hover, this.theme);
|
|
46
|
-
colorBlur = getColorByName(this.actions.color, this.theme);
|
|
47
|
-
}
|
|
48
|
-
return this.isHovering ? colorHover : colorBlur;
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
/**
|
|
53
|
-
* Component lifecycle events.
|
|
54
|
-
*/
|
|
55
|
-
componentWillLoad() {
|
|
56
|
-
inheritGlobalTheme(this);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
/**
|
|
60
|
-
* private functions
|
|
61
|
-
*/
|
|
62
|
-
emitActionEvent(ev) {
|
|
63
|
-
this.duetEditableItemAction.emit({
|
|
64
|
-
originalEvent: ev,
|
|
65
|
-
uid: this.uid,
|
|
66
|
-
group: this.group,
|
|
67
|
-
action: this.actions.id,
|
|
68
|
-
keyName: this.keyName,
|
|
69
|
-
component: "duet-editable-table-item",
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* render() function
|
|
74
|
-
* Always the last one in the class.
|
|
75
|
-
*/
|
|
76
|
-
render() {
|
|
77
|
-
return (h("button", { style: {
|
|
78
|
-
"border-color": this.getColours(true),
|
|
79
|
-
}, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, role: "menuitem", class: "duet-editable-table-actions-items-button", "aria-label": this.actions.label ? getLocaleString(this.actions.label) : undefined, onClick: ev => this.emitActionEvent(ev) },
|
|
80
|
-
h("duet-icon", { class: "duet-editable-table-actions-items-icon", size: "x-small", name: this.actions.icon, color: this.getColours(), margin: "none" })));
|
|
81
|
-
}
|
|
82
|
-
static get is() { return "duet-editable-table-button"; }
|
|
83
|
-
static get encapsulation() { return "scoped"; }
|
|
84
|
-
static get originalStyleUrls() { return {
|
|
85
|
-
"$": ["duet-editable-table-button.scss"]
|
|
86
|
-
}; }
|
|
87
|
-
static get styleUrls() { return {
|
|
88
|
-
"$": ["duet-editable-table-button.css"]
|
|
89
|
-
}; }
|
|
90
|
-
static get properties() { return {
|
|
91
|
-
"theme": {
|
|
92
|
-
"type": "string",
|
|
93
|
-
"mutable": true,
|
|
94
|
-
"complexType": {
|
|
95
|
-
"original": "DuetTheme",
|
|
96
|
-
"resolved": "\"\" | \"default\" | \"turva\"",
|
|
97
|
-
"references": {
|
|
98
|
-
"DuetTheme": {
|
|
99
|
-
"location": "import",
|
|
100
|
-
"path": "../../common-types"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"required": false,
|
|
105
|
-
"optional": false,
|
|
106
|
-
"docs": {
|
|
107
|
-
"tags": [],
|
|
108
|
-
"text": "Theme of the empty state component."
|
|
109
|
-
},
|
|
110
|
-
"attribute": "theme",
|
|
111
|
-
"reflect": false,
|
|
112
|
-
"defaultValue": "undefined"
|
|
113
|
-
},
|
|
114
|
-
"actions": {
|
|
115
|
-
"type": "unknown",
|
|
116
|
-
"mutable": false,
|
|
117
|
-
"complexType": {
|
|
118
|
-
"original": "DuetEditableTableActionButtonItems",
|
|
119
|
-
"resolved": "{ icon: string; color: string; color_hover: string; id: string; map?: string[]; label?: DuetLangObject; }",
|
|
120
|
-
"references": {
|
|
121
|
-
"DuetEditableTableActionButtonItems": {
|
|
122
|
-
"location": "local"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"required": false,
|
|
127
|
-
"optional": false,
|
|
128
|
-
"docs": {
|
|
129
|
-
"tags": [{
|
|
130
|
-
"name": "internal",
|
|
131
|
-
"text": undefined
|
|
132
|
-
}],
|
|
133
|
-
"text": "action items passed from host component"
|
|
134
|
-
},
|
|
135
|
-
"defaultValue": "undefined"
|
|
136
|
-
},
|
|
137
|
-
"uid": {
|
|
138
|
-
"type": "string",
|
|
139
|
-
"mutable": false,
|
|
140
|
-
"complexType": {
|
|
141
|
-
"original": "string",
|
|
142
|
-
"resolved": "string",
|
|
143
|
-
"references": {}
|
|
144
|
-
},
|
|
145
|
-
"required": false,
|
|
146
|
-
"optional": false,
|
|
147
|
-
"docs": {
|
|
148
|
-
"tags": [{
|
|
149
|
-
"name": "internal",
|
|
150
|
-
"text": undefined
|
|
151
|
-
}],
|
|
152
|
-
"text": "uid that gets passed along when the action is emitted"
|
|
153
|
-
},
|
|
154
|
-
"attribute": "uid",
|
|
155
|
-
"reflect": false,
|
|
156
|
-
"defaultValue": "\"\""
|
|
157
|
-
},
|
|
158
|
-
"group": {
|
|
159
|
-
"type": "string",
|
|
160
|
-
"mutable": false,
|
|
161
|
-
"complexType": {
|
|
162
|
-
"original": "string",
|
|
163
|
-
"resolved": "string",
|
|
164
|
-
"references": {}
|
|
165
|
-
},
|
|
166
|
-
"required": false,
|
|
167
|
-
"optional": false,
|
|
168
|
-
"docs": {
|
|
169
|
-
"tags": [{
|
|
170
|
-
"name": "internal",
|
|
171
|
-
"text": undefined
|
|
172
|
-
}],
|
|
173
|
-
"text": "group associated with action"
|
|
174
|
-
},
|
|
175
|
-
"attribute": "group",
|
|
176
|
-
"reflect": false,
|
|
177
|
-
"defaultValue": "\"\""
|
|
178
|
-
},
|
|
179
|
-
"keyName": {
|
|
180
|
-
"type": "string",
|
|
181
|
-
"mutable": false,
|
|
182
|
-
"complexType": {
|
|
183
|
-
"original": "string",
|
|
184
|
-
"resolved": "string",
|
|
185
|
-
"references": {}
|
|
186
|
-
},
|
|
187
|
-
"required": false,
|
|
188
|
-
"optional": false,
|
|
189
|
-
"docs": {
|
|
190
|
-
"tags": [{
|
|
191
|
-
"name": "internal",
|
|
192
|
-
"text": undefined
|
|
193
|
-
}],
|
|
194
|
-
"text": "key of the item in the map"
|
|
195
|
-
},
|
|
196
|
-
"attribute": "key-name",
|
|
197
|
-
"reflect": false,
|
|
198
|
-
"defaultValue": "\"\""
|
|
199
|
-
}
|
|
200
|
-
}; }
|
|
201
|
-
static get states() { return {
|
|
202
|
-
"isHovering": {}
|
|
203
|
-
}; }
|
|
204
|
-
static get events() { return [{
|
|
205
|
-
"method": "duetEditableItemAction",
|
|
206
|
-
"name": "duetEditableItemAction",
|
|
207
|
-
"bubbles": true,
|
|
208
|
-
"cancelable": true,
|
|
209
|
-
"composed": true,
|
|
210
|
-
"docs": {
|
|
211
|
-
"tags": [],
|
|
212
|
-
"text": "Emitted when any action is clicked"
|
|
213
|
-
},
|
|
214
|
-
"complexType": {
|
|
215
|
-
"original": "DuetEditableTableItemEvent",
|
|
216
|
-
"resolved": "{ originalEvent?: Event; uid: string | number | bigint; keyName: string | number | bigint; action: string; group: string; component: \"duet-editable-table-item\"; }",
|
|
217
|
-
"references": {
|
|
218
|
-
"DuetEditableTableItemEvent": {
|
|
219
|
-
"location": "local"
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}]; }
|
|
224
|
-
static get elementRef() { return "el"; }
|
|
225
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
*,
|
|
2
|
-
*::after,
|
|
3
|
-
*::before {
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
padding: 0;
|
|
6
|
-
margin: 0;
|
|
7
|
-
background: transparent;
|
|
8
|
-
border: 0;
|
|
9
|
-
-moz-appearance: none;
|
|
10
|
-
-webkit-appearance: none;
|
|
11
|
-
appearance: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host {
|
|
15
|
-
display: table-row;
|
|
16
|
-
height: 32px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.duet-editable-table-content, .duet-editable-table-actions {
|
|
20
|
-
height: 32px;
|
|
21
|
-
padding: 12px 0;
|
|
22
|
-
vertical-align: middle;
|
|
23
|
-
break-word: break-all;
|
|
24
|
-
border-bottom: 1px solid #e1e3e6;
|
|
25
|
-
}
|
|
26
|
-
.duet-editable-table-actions-items {
|
|
27
|
-
display: flex;
|
|
28
|
-
justify-content: flex-end;
|
|
29
|
-
}
|
|
30
|
-
.duet-editable-table-actions-items duet-editable-table-button {
|
|
31
|
-
padding-left: 8px;
|
|
32
|
-
}
|
|
33
|
-
.duet-editable-table .editable-item-small {
|
|
34
|
-
font-size: 0.75rem;
|
|
35
|
-
font-weight: 400;
|
|
36
|
-
}
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import { Component, Element, Event, h, Host, Prop, State, Watch } from "@stencil/core";
|
|
5
|
-
import { inheritGlobalTheme } from "../../utils/themeable-component";
|
|
6
|
-
import { TableData } from "./duet-editable-table-tabledata";
|
|
7
|
-
export class DuetEditableTableItem {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.isHovering = false;
|
|
10
|
-
/**
|
|
11
|
-
* Theme of the empty state component.
|
|
12
|
-
*/
|
|
13
|
-
this.theme = "";
|
|
14
|
-
/**
|
|
15
|
-
* Actions that can be performed on the element
|
|
16
|
-
*/
|
|
17
|
-
this.actions = undefined;
|
|
18
|
-
/**
|
|
19
|
-
* GroupId used to pierce the shadowdom - gets concatenated with "content & actions" and used as part="groupIDcontent/actions" to pierce the content/Action item
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
this.groupId = "";
|
|
23
|
-
/**
|
|
24
|
-
* Key used to set vertical alignment of action buttons
|
|
25
|
-
*/
|
|
26
|
-
this.alignment = "middle";
|
|
27
|
-
/**
|
|
28
|
-
* Key used to identify item, when running actions
|
|
29
|
-
*/
|
|
30
|
-
this.keyName = "";
|
|
31
|
-
/**
|
|
32
|
-
* Object of data itemsused to render the entire row
|
|
33
|
-
*/
|
|
34
|
-
this.data = undefined;
|
|
35
|
-
}
|
|
36
|
-
watchPropHandler(_newValue, _oldValue) {
|
|
37
|
-
// console.log("The new value of activated is: ", _newValue)
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
/**
|
|
41
|
-
* Component lifecycle events.
|
|
42
|
-
*/
|
|
43
|
-
componentWillLoad() {
|
|
44
|
-
inheritGlobalTheme(this);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
/**
|
|
48
|
-
* private functions
|
|
49
|
-
*/
|
|
50
|
-
/**
|
|
51
|
-
* render() function
|
|
52
|
-
* Always the last one in the class.
|
|
53
|
-
*/
|
|
54
|
-
render() {
|
|
55
|
-
return (h(Host, { role: "row" },
|
|
56
|
-
h(TableData, { data: this.data.item, alignment: this.alignment, groupId: this.groupId }),
|
|
57
|
-
h("td", { class: "duet-editable-table-actions", style: { verticalAlign: this.alignment } },
|
|
58
|
-
h("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
|
|
59
|
-
const { map = undefined } = result;
|
|
60
|
-
// if map has been specified, only show the current action if groupID matches the map array
|
|
61
|
-
if (map && !map.includes(this.groupId)) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
return (h("duet-editable-table-button", { keyName: this.keyName, group: this.data.group, uid: this.data.uid, actions: result, theme: this.theme }));
|
|
65
|
-
})))));
|
|
66
|
-
}
|
|
67
|
-
static get is() { return "duet-editable-table-item"; }
|
|
68
|
-
static get encapsulation() { return "shadow"; }
|
|
69
|
-
static get originalStyleUrls() { return {
|
|
70
|
-
"$": ["duet-editable-table-item.scss"]
|
|
71
|
-
}; }
|
|
72
|
-
static get styleUrls() { return {
|
|
73
|
-
"$": ["duet-editable-table-item.css"]
|
|
74
|
-
}; }
|
|
75
|
-
static get properties() { return {
|
|
76
|
-
"theme": {
|
|
77
|
-
"type": "string",
|
|
78
|
-
"mutable": true,
|
|
79
|
-
"complexType": {
|
|
80
|
-
"original": "DuetTheme",
|
|
81
|
-
"resolved": "\"\" | \"default\" | \"turva\"",
|
|
82
|
-
"references": {
|
|
83
|
-
"DuetTheme": {
|
|
84
|
-
"location": "import",
|
|
85
|
-
"path": "../../common-types"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"required": false,
|
|
90
|
-
"optional": false,
|
|
91
|
-
"docs": {
|
|
92
|
-
"tags": [],
|
|
93
|
-
"text": "Theme of the empty state component."
|
|
94
|
-
},
|
|
95
|
-
"attribute": "theme",
|
|
96
|
-
"reflect": false,
|
|
97
|
-
"defaultValue": "\"\""
|
|
98
|
-
},
|
|
99
|
-
"actions": {
|
|
100
|
-
"type": "unknown",
|
|
101
|
-
"mutable": false,
|
|
102
|
-
"complexType": {
|
|
103
|
-
"original": "DuetEditableTableActions",
|
|
104
|
-
"resolved": "{ icon: string; color: string; color_hover: string; id: string; map?: string[]; label?: DuetLangObject; }[]",
|
|
105
|
-
"references": {
|
|
106
|
-
"DuetEditableTableActions": {
|
|
107
|
-
"location": "local"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
"required": false,
|
|
112
|
-
"optional": false,
|
|
113
|
-
"docs": {
|
|
114
|
-
"tags": [],
|
|
115
|
-
"text": "Actions that can be performed on the element"
|
|
116
|
-
},
|
|
117
|
-
"defaultValue": "undefined"
|
|
118
|
-
},
|
|
119
|
-
"groupId": {
|
|
120
|
-
"type": "string",
|
|
121
|
-
"mutable": false,
|
|
122
|
-
"complexType": {
|
|
123
|
-
"original": "string",
|
|
124
|
-
"resolved": "string",
|
|
125
|
-
"references": {}
|
|
126
|
-
},
|
|
127
|
-
"required": false,
|
|
128
|
-
"optional": false,
|
|
129
|
-
"docs": {
|
|
130
|
-
"tags": [{
|
|
131
|
-
"name": "internal",
|
|
132
|
-
"text": undefined
|
|
133
|
-
}],
|
|
134
|
-
"text": "GroupId used to pierce the shadowdom - gets concatenated with \"content & actions\" and used as part=\"groupIDcontent/actions\" to pierce the content/Action item"
|
|
135
|
-
},
|
|
136
|
-
"attribute": "group-id",
|
|
137
|
-
"reflect": false,
|
|
138
|
-
"defaultValue": "\"\""
|
|
139
|
-
},
|
|
140
|
-
"alignment": {
|
|
141
|
-
"type": "string",
|
|
142
|
-
"mutable": false,
|
|
143
|
-
"complexType": {
|
|
144
|
-
"original": "string",
|
|
145
|
-
"resolved": "string",
|
|
146
|
-
"references": {}
|
|
147
|
-
},
|
|
148
|
-
"required": false,
|
|
149
|
-
"optional": false,
|
|
150
|
-
"docs": {
|
|
151
|
-
"tags": [],
|
|
152
|
-
"text": "Key used to set vertical alignment of action buttons"
|
|
153
|
-
},
|
|
154
|
-
"attribute": "alignment",
|
|
155
|
-
"reflect": false,
|
|
156
|
-
"defaultValue": "\"middle\""
|
|
157
|
-
},
|
|
158
|
-
"keyName": {
|
|
159
|
-
"type": "string",
|
|
160
|
-
"mutable": false,
|
|
161
|
-
"complexType": {
|
|
162
|
-
"original": "string",
|
|
163
|
-
"resolved": "string",
|
|
164
|
-
"references": {}
|
|
165
|
-
},
|
|
166
|
-
"required": false,
|
|
167
|
-
"optional": false,
|
|
168
|
-
"docs": {
|
|
169
|
-
"tags": [],
|
|
170
|
-
"text": "Key used to identify item, when running actions"
|
|
171
|
-
},
|
|
172
|
-
"attribute": "key-name",
|
|
173
|
-
"reflect": false,
|
|
174
|
-
"defaultValue": "\"\""
|
|
175
|
-
},
|
|
176
|
-
"data": {
|
|
177
|
-
"type": "unknown",
|
|
178
|
-
"mutable": true,
|
|
179
|
-
"complexType": {
|
|
180
|
-
"original": "DuetEditableTableItemData",
|
|
181
|
-
"resolved": "{ uid: string; item: string | HTMLElement | Record<string, string>; group: string; }",
|
|
182
|
-
"references": {
|
|
183
|
-
"DuetEditableTableItemData": {
|
|
184
|
-
"location": "local"
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"required": false,
|
|
189
|
-
"optional": false,
|
|
190
|
-
"docs": {
|
|
191
|
-
"tags": [],
|
|
192
|
-
"text": "Object of data itemsused to render the entire row"
|
|
193
|
-
},
|
|
194
|
-
"defaultValue": "undefined"
|
|
195
|
-
}
|
|
196
|
-
}; }
|
|
197
|
-
static get states() { return {
|
|
198
|
-
"isHovering": {}
|
|
199
|
-
}; }
|
|
200
|
-
static get events() { return [{
|
|
201
|
-
"method": "duetEditableItemAction",
|
|
202
|
-
"name": "duetEditableItemAction",
|
|
203
|
-
"bubbles": true,
|
|
204
|
-
"cancelable": true,
|
|
205
|
-
"composed": true,
|
|
206
|
-
"docs": {
|
|
207
|
-
"tags": [],
|
|
208
|
-
"text": "Emitted when any action is clicked"
|
|
209
|
-
},
|
|
210
|
-
"complexType": {
|
|
211
|
-
"original": "DuetEditableTableItemEvent",
|
|
212
|
-
"resolved": "{ originalEvent?: Event; uid: string; keyName: string; action: string; group: string; component: \"duet-editable-table-item\"; }",
|
|
213
|
-
"references": {
|
|
214
|
-
"DuetEditableTableItemEvent": {
|
|
215
|
-
"location": "local"
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}]; }
|
|
220
|
-
static get elementRef() { return "el"; }
|
|
221
|
-
static get watchers() { return [{
|
|
222
|
-
"propName": "data",
|
|
223
|
-
"methodName": "watchPropHandler"
|
|
224
|
-
}]; }
|
|
225
|
-
}
|