@ukic/canary-web-components 3.0.0-canary.6 → 3.0.0-canary.8
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-e0da4ae1.js → helpers-02b23286.js} +25 -3
- package/dist/cjs/helpers-02b23286.js.map +1 -0
- package/dist/cjs/{helpers-0d86316e.js → helpers-4190b7f2.js} +24 -1
- package/dist/cjs/helpers-4190b7f2.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -9
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +2 -8
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +12 -19
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +214 -48
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +20 -14
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +18 -7
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +2 -9
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +27 -21
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +53 -39
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +32 -28
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +27 -11
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +51 -5
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +2 -9
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +2 -9
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +3 -9
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +82 -2
- package/dist/collection/components/ic-data-table/ic-data-table.js +249 -50
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +213 -6
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +64 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +36 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +3 -10
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +3 -10
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/utils/helpers.js +21 -1
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +22 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +22 -2
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-alert.js +3 -10
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-card-horizontal.js +3 -9
- package/dist/components/ic-card-horizontal.js.map +1 -1
- package/dist/components/ic-card-vertical.js +13 -20
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-data-table.js +215 -48
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +1 -1
- package/dist/components/ic-date-picker.js +1 -1
- package/dist/components/ic-empty-state2.js +3 -13
- package/dist/components/ic-empty-state2.js.map +1 -1
- package/dist/components/ic-footer.js +18 -7
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +3 -10
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-input-component-container2.js +3 -10
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-menu2.js +25 -12
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-pagination-bar2.js +21 -3
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +1 -1
- package/dist/components/ic-search-bar.js +46 -53
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select2.js +45 -33
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-text-field2.js +10 -8
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toggle-button-group.js +31 -11
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +58 -12
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-top-navigation.js +2 -2
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-item.js +3 -10
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +3 -10
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/core/core.css +15 -3
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-83f39782.entry.js → p-01034ef4.entry.js} +2 -2
- package/dist/core/p-033f3971.entry.js +2 -0
- package/dist/core/p-033f3971.entry.js.map +1 -0
- package/dist/core/{p-3b84953c.entry.js → p-03d51c20.entry.js} +2 -2
- package/dist/core/{p-b7e5b682.entry.js → p-05890d1e.entry.js} +2 -2
- package/dist/core/{p-68eb216b.entry.js → p-07bcfaef.entry.js} +2 -2
- package/dist/core/{p-fafc157b.entry.js → p-0d918e59.entry.js} +2 -2
- package/dist/core/p-10640219.entry.js +2 -0
- package/dist/core/p-10640219.entry.js.map +1 -0
- package/dist/core/p-15e382a4.entry.js +2 -0
- package/dist/core/p-15e382a4.entry.js.map +1 -0
- package/dist/core/{p-06cda732.entry.js → p-16b64836.entry.js} +2 -2
- package/dist/core/p-186edbae.entry.js +2 -0
- package/dist/core/{p-29a86adf.entry.js.map → p-186edbae.entry.js.map} +1 -1
- package/dist/core/{p-1893f635.entry.js → p-1c94e08c.entry.js} +2 -2
- package/dist/core/p-1c94e08c.entry.js.map +1 -0
- package/dist/core/p-1d3f7a04.entry.js +2 -0
- package/dist/core/{p-670c10af.entry.js.map → p-1d3f7a04.entry.js.map} +1 -1
- package/dist/core/{p-eb6e3878.entry.js → p-22708591.entry.js} +2 -2
- package/dist/core/p-23afb7d0.entry.js +2 -0
- package/dist/core/p-23afb7d0.entry.js.map +1 -0
- package/dist/core/p-289fff24.entry.js +2 -0
- package/dist/core/{p-b1c68968.entry.js.map → p-289fff24.entry.js.map} +1 -1
- package/dist/core/{p-efd608ab.entry.js → p-2fd78585.entry.js} +2 -2
- package/dist/core/{p-92398f47.entry.js → p-345a88a7.entry.js} +2 -2
- package/dist/core/p-361da840.entry.js +2 -0
- package/dist/core/p-361da840.entry.js.map +1 -0
- package/dist/core/{p-21f6619f.entry.js → p-3f182d5d.entry.js} +2 -2
- package/dist/core/{p-35caddb3.entry.js → p-49bf3a47.entry.js} +2 -2
- package/dist/core/p-4abbdbbc.entry.js +2 -0
- package/dist/core/p-4abbdbbc.entry.js.map +1 -0
- package/dist/core/{p-7765a219.entry.js → p-5193184c.entry.js} +2 -2
- package/dist/core/{p-a0dfd2cf.entry.js → p-51fd68b7.entry.js} +2 -2
- package/dist/core/p-563392e4.entry.js +2 -0
- package/dist/core/p-563392e4.entry.js.map +1 -0
- package/dist/core/p-5a48839e.entry.js +2 -0
- package/dist/core/p-5a48839e.entry.js.map +1 -0
- package/dist/core/{p-3ae329ab.entry.js → p-5cbf0885.entry.js} +2 -2
- package/dist/core/{p-07881c14.entry.js → p-5dcee0aa.entry.js} +2 -2
- package/dist/core/{p-95d1c9e6.entry.js → p-646f21ff.entry.js} +2 -2
- package/dist/core/{p-5d749879.entry.js → p-74b676a6.entry.js} +2 -2
- package/dist/core/{p-8e300091.entry.js → p-74e63f4d.entry.js} +2 -2
- package/dist/core/{p-b9081a99.entry.js → p-77f26d29.entry.js} +2 -2
- package/dist/core/{p-1084a7f9.entry.js → p-792ec0a3.entry.js} +2 -2
- package/dist/core/{p-7a9de1bb.entry.js → p-79c8879c.entry.js} +2 -2
- package/dist/core/{p-3bc4bc81.entry.js → p-7d5a0251.entry.js} +2 -2
- package/dist/core/{p-3272931c.entry.js → p-7eef69d7.entry.js} +2 -2
- package/dist/core/{p-2664bfab.entry.js → p-8167f2e0.entry.js} +2 -2
- package/dist/core/p-8576281d.entry.js +2 -0
- package/dist/core/p-8576281d.entry.js.map +1 -0
- package/dist/core/{p-47f2f713.entry.js → p-87cd3985.entry.js} +2 -2
- package/dist/core/{p-2c38ff71.entry.js → p-8d3e250a.entry.js} +2 -2
- package/dist/core/{p-ccd141a9.entry.js → p-8eb30ebf.entry.js} +2 -2
- package/dist/core/{p-6a2ed698.entry.js → p-901879b8.entry.js} +2 -2
- package/dist/core/p-92bb5fe9.entry.js +2 -0
- package/dist/core/p-92bb5fe9.entry.js.map +1 -0
- package/dist/core/p-94efa0d2.entry.js +2 -0
- package/dist/core/p-94efa0d2.entry.js.map +1 -0
- package/dist/core/{p-b047cd84.entry.js → p-9f5071bd.entry.js} +2 -2
- package/dist/core/p-9f5071bd.entry.js.map +1 -0
- package/dist/core/p-a04712b9.js +2 -0
- package/dist/core/p-a04712b9.js.map +1 -0
- package/dist/core/{p-5284ccab.entry.js → p-a683fd94.entry.js} +2 -2
- package/dist/core/{p-2412ba0b.entry.js → p-b2a6f0dd.entry.js} +2 -2
- package/dist/core/p-be6d9ab9.entry.js +2 -0
- package/dist/core/p-be6d9ab9.entry.js.map +1 -0
- package/dist/core/{p-39190da3.entry.js → p-d0c7bc04.entry.js} +2 -2
- package/dist/core/{p-19f85b60.entry.js → p-d1b8e306.entry.js} +2 -2
- package/dist/core/{p-e0b556b4.entry.js → p-db924212.entry.js} +2 -2
- package/dist/core/p-dd5daf97.entry.js +2 -0
- package/dist/core/p-dd5daf97.entry.js.map +1 -0
- package/dist/core/{p-26a41692.entry.js → p-dedca102.entry.js} +2 -2
- package/dist/core/{p-f02d5539.entry.js → p-eb09d6af.entry.js} +2 -2
- package/dist/core/p-ee5388e6.entry.js +2 -0
- package/dist/core/{p-324be8cf.entry.js.map → p-ee5388e6.entry.js.map} +1 -1
- package/dist/core/{p-ca4bfffd.entry.js → p-f1fcc442.entry.js} +2 -2
- package/dist/core/{p-38aca488.entry.js → p-f3995b20.entry.js} +2 -2
- package/dist/core/p-fa002d21.js +2 -0
- package/dist/core/p-fa002d21.js.map +1 -0
- package/dist/core/{p-d5648fdc.entry.js → p-faae4ac4.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-759bbf51.js → helpers-0f42cb46.js} +23 -3
- package/dist/{cjs/helpers-e0da4ae1.js.map → esm/helpers-0f42cb46.js.map} +1 -1
- package/dist/esm/{helpers-fcc7a364.js → helpers-96838a0a.js} +23 -2
- package/dist/esm/helpers-96838a0a.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +3 -10
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +3 -9
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +13 -20
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +214 -48
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +1 -1
- package/dist/esm/ic-date-picker.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +21 -15
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +18 -7
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +3 -10
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +28 -22
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination_4.entry.js +53 -39
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +32 -28
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +27 -11
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +51 -5
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +2 -2
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +3 -10
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +3 -10
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +0 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +23 -0
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +11 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +107 -4
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +6 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +0 -1
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +0 -1
- package/dist/types/components.d.ts +23 -0
- package/dist/types/utils/helpers.d.ts +4 -1
- package/dist/types/utils/types.d.ts +1 -0
- package/hydrate/index.js +507 -228
- package/package.json +3 -10
- package/dist/cjs/helpers-0d86316e.js.map +0 -1
- package/dist/core/p-006d37d0.entry.js +0 -2
- package/dist/core/p-006d37d0.entry.js.map +0 -1
- package/dist/core/p-1893f635.entry.js.map +0 -1
- package/dist/core/p-29a86adf.entry.js +0 -2
- package/dist/core/p-324be8cf.entry.js +0 -2
- package/dist/core/p-34e57694.entry.js +0 -2
- package/dist/core/p-34e57694.entry.js.map +0 -1
- package/dist/core/p-4bcd86cf.js +0 -2
- package/dist/core/p-4bcd86cf.js.map +0 -1
- package/dist/core/p-670c10af.entry.js +0 -2
- package/dist/core/p-6aa0f42b.entry.js +0 -2
- package/dist/core/p-6aa0f42b.entry.js.map +0 -1
- package/dist/core/p-6d179eed.entry.js +0 -2
- package/dist/core/p-6d179eed.entry.js.map +0 -1
- package/dist/core/p-77a98aa2.entry.js +0 -2
- package/dist/core/p-77a98aa2.entry.js.map +0 -1
- package/dist/core/p-78f747ee.entry.js +0 -2
- package/dist/core/p-78f747ee.entry.js.map +0 -1
- package/dist/core/p-808715e2.js +0 -2
- package/dist/core/p-808715e2.js.map +0 -1
- package/dist/core/p-9b600ef3.entry.js +0 -2
- package/dist/core/p-9b600ef3.entry.js.map +0 -1
- package/dist/core/p-a7cda2d6.entry.js +0 -2
- package/dist/core/p-a7cda2d6.entry.js.map +0 -1
- package/dist/core/p-aa876e5e.entry.js +0 -2
- package/dist/core/p-aa876e5e.entry.js.map +0 -1
- package/dist/core/p-b047cd84.entry.js.map +0 -1
- package/dist/core/p-b1c68968.entry.js +0 -2
- package/dist/core/p-c6bdbee1.entry.js +0 -2
- package/dist/core/p-c6bdbee1.entry.js.map +0 -1
- package/dist/core/p-d7bc2e7f.entry.js +0 -2
- package/dist/core/p-d7bc2e7f.entry.js.map +0 -1
- package/dist/core/p-d981ef7a.entry.js +0 -2
- package/dist/core/p-d981ef7a.entry.js.map +0 -1
- package/dist/core/p-f95e52d8.entry.js +0 -2
- package/dist/core/p-f95e52d8.entry.js.map +0 -1
- package/dist/esm/helpers-759bbf51.js.map +0 -1
- package/dist/esm/helpers-fcc7a364.js.map +0 -1
- /package/dist/core/{p-83f39782.entry.js.map → p-01034ef4.entry.js.map} +0 -0
- /package/dist/core/{p-3b84953c.entry.js.map → p-03d51c20.entry.js.map} +0 -0
- /package/dist/core/{p-b7e5b682.entry.js.map → p-05890d1e.entry.js.map} +0 -0
- /package/dist/core/{p-68eb216b.entry.js.map → p-07bcfaef.entry.js.map} +0 -0
- /package/dist/core/{p-fafc157b.entry.js.map → p-0d918e59.entry.js.map} +0 -0
- /package/dist/core/{p-06cda732.entry.js.map → p-16b64836.entry.js.map} +0 -0
- /package/dist/core/{p-eb6e3878.entry.js.map → p-22708591.entry.js.map} +0 -0
- /package/dist/core/{p-efd608ab.entry.js.map → p-2fd78585.entry.js.map} +0 -0
- /package/dist/core/{p-92398f47.entry.js.map → p-345a88a7.entry.js.map} +0 -0
- /package/dist/core/{p-21f6619f.entry.js.map → p-3f182d5d.entry.js.map} +0 -0
- /package/dist/core/{p-35caddb3.entry.js.map → p-49bf3a47.entry.js.map} +0 -0
- /package/dist/core/{p-7765a219.entry.js.map → p-5193184c.entry.js.map} +0 -0
- /package/dist/core/{p-a0dfd2cf.entry.js.map → p-51fd68b7.entry.js.map} +0 -0
- /package/dist/core/{p-3ae329ab.entry.js.map → p-5cbf0885.entry.js.map} +0 -0
- /package/dist/core/{p-07881c14.entry.js.map → p-5dcee0aa.entry.js.map} +0 -0
- /package/dist/core/{p-95d1c9e6.entry.js.map → p-646f21ff.entry.js.map} +0 -0
- /package/dist/core/{p-5d749879.entry.js.map → p-74b676a6.entry.js.map} +0 -0
- /package/dist/core/{p-8e300091.entry.js.map → p-74e63f4d.entry.js.map} +0 -0
- /package/dist/core/{p-b9081a99.entry.js.map → p-77f26d29.entry.js.map} +0 -0
- /package/dist/core/{p-1084a7f9.entry.js.map → p-792ec0a3.entry.js.map} +0 -0
- /package/dist/core/{p-7a9de1bb.entry.js.map → p-79c8879c.entry.js.map} +0 -0
- /package/dist/core/{p-3bc4bc81.entry.js.map → p-7d5a0251.entry.js.map} +0 -0
- /package/dist/core/{p-3272931c.entry.js.map → p-7eef69d7.entry.js.map} +0 -0
- /package/dist/core/{p-2664bfab.entry.js.map → p-8167f2e0.entry.js.map} +0 -0
- /package/dist/core/{p-47f2f713.entry.js.map → p-87cd3985.entry.js.map} +0 -0
- /package/dist/core/{p-2c38ff71.entry.js.map → p-8d3e250a.entry.js.map} +0 -0
- /package/dist/core/{p-ccd141a9.entry.js.map → p-8eb30ebf.entry.js.map} +0 -0
- /package/dist/core/{p-6a2ed698.entry.js.map → p-901879b8.entry.js.map} +0 -0
- /package/dist/core/{p-5284ccab.entry.js.map → p-a683fd94.entry.js.map} +0 -0
- /package/dist/core/{p-2412ba0b.entry.js.map → p-b2a6f0dd.entry.js.map} +0 -0
- /package/dist/core/{p-39190da3.entry.js.map → p-d0c7bc04.entry.js.map} +0 -0
- /package/dist/core/{p-19f85b60.entry.js.map → p-d1b8e306.entry.js.map} +0 -0
- /package/dist/core/{p-e0b556b4.entry.js.map → p-db924212.entry.js.map} +0 -0
- /package/dist/core/{p-26a41692.entry.js.map → p-dedca102.entry.js.map} +0 -0
- /package/dist/core/{p-f02d5539.entry.js.map → p-eb09d6af.entry.js.map} +0 -0
- /package/dist/core/{p-ca4bfffd.entry.js.map → p-f1fcc442.entry.js.map} +0 -0
- /package/dist/core/{p-38aca488.entry.js.map → p-f3995b20.entry.js.map} +0 -0
- /package/dist/core/{p-d5648fdc.entry.js.map → p-faae4ac4.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
|
2
|
-
import { d as dynamicDebounce,
|
2
|
+
import { d as dynamicDebounce, b as isEmptyString, p as pxToRem, i as isSlotUsed, c as addDataToPosition, e as deviceSizeMatches, f as getSlotElements, h as checkResizeObserver, j as IC_DEVICE_SIZES } from './helpers2.js';
|
3
3
|
import { d as defineCustomElement$h } from './ic-button2.js';
|
4
4
|
import { d as defineCustomElement$g } from './ic-empty-state2.js';
|
5
5
|
import { d as defineCustomElement$f } from './ic-input-component-container2.js';
|
@@ -29,7 +29,7 @@ const descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 2
|
|
29
29
|
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
30
30
|
</svg>`;
|
31
31
|
|
32
|
-
const icDataTableCss = ":host{position:relative;display:inline-flex;max-height:100%;width:var(--table-width, 100%);height:100%;min-width:var(--table-min-width);max-width:var(--table-max-width)}tbody{vertical-align:top}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column;width:100%}.cell-container{display:flex;min-height:1.5rem;overflow-y:hidden;height:var(--row-height);--ic-typography-color:var(--ic-data-table-text-default-emphasis)}.truncation-show-hide{
|
32
|
+
const icDataTableCss = ":host{position:relative;display:inline-flex;max-height:100%;width:var(--table-width, 100%);height:100%;min-width:var(--table-min-width);max-width:var(--table-max-width)}tbody{vertical-align:top}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column;width:100%}.cell-container{display:flex;min-height:1.5rem;overflow-y:hidden;height:var(--row-height);--ic-typography-color:var(--ic-data-table-text-default-emphasis)}.truncation-show-hide{display:block}.cell-icon.truncation-show-hide{display:flex}.cell-container:not(.data-type-element,.truncation-show-hide){overflow-x:hidden}ic-loading-indicator{position:sticky;top:20px}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination=\"true\"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:var(--table-layout, \"fixed\");border-spacing:0;width:100%;height:var(--table-height, auto)}.table-row-container:focus{outline:none;box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast);z-index:1}:host([embedded=\"true\"]) .table-row-container{border:var(--ic-space-1px) solid var(--ic-data-table-border)}.column-header-inner-container{padding:var(--ic-space-xs);box-sizing:border-box}.column-header-inner-container ic-tooltip{pointer-events:none}.column-header-inner-container ic-tooltip.show-trunc-tooltip{pointer-events:auto}.column-header-inner-container ic-tooltip .column-header-text{--ic-line-clamp:1}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{position:sticky;top:0;z-index:1;box-shadow:0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%)}.row-header-sticky{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-color:var(--ic-data-table-cell-background-selected) !important}.table-row:hover{background-color:var(--ic-data-table-cell-background-hover) !important}.table-row-selected:hover{background-color:var(\n --ic-data-table-cell-background-selected-hover\n ) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-data-table-icon-button-background-hover)}.sort-button:active{background-color:var(--ic-data-table-icon-button-background-pressed)}.sort-button svg{color:var(--ic-data-table-sort-toggle-icon)}.sort-button-unsorted svg{color:var(--ic-data-table-sort-toggle-icon-default)}.table-density-dense .column-header-inner-container,td.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious .column-header-inner-container,td.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.dummy-column-header-text{white-space:nowrap;overflow:hidden;height:0;width:-moz-fit-content;width:fit-content}.row-header,.column-header{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-data-table-header-background);border-right:var(--ic-space-1px) solid var(--ic-data-table-header-keyline);border-bottom:var(--ic-space-1px) solid var(--ic-data-table-header-keyline);color:var(--ic-data-table-header-text)}.column-header{padding:0;width:var(--column-width);min-width:var(--column-min-width, 4rem);max-width:var(--column-max-width)}.column-header:last-child{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-space-1px) solid var(--ic-data-table-header-keyline) !important}:host([embedded=\"true\"]) tr:last-child .table-cell,:host([embedded=\"true\"]) tr:last-child .row-header{border-bottom:none}.column-header-alignment-left,.row-header-alignment-left,.cell-alignment-left{text-align:left !important;justify-content:start !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important;justify-content:end !important}.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography{padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.cell-alignment-right.truncation-show-hide ic-typography{--ellipsis-padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important;justify-content:center !important}.table-row{background-color:var(--ic-data-table-cell-background)}.table-row:nth-child(even){background-color:var(--ic-data-table-cell-background-stripe)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-data-table-cell-keyline) var(--ic-space-1px);overflow:hidden;box-sizing:border-box;max-width:var(--column-max-width);min-width:var(--column-min-width)}.table-cell.with-overflow{overflow:visible}.data-type-string,.data-type-address{text-align:left;vertical-align:top}.data-type-number,.data-type-date{text-align:right;justify-content:end;vertical-align:top}.cell-alignment-top{vertical-align:top;align-items:flex-start}.cell-alignment-middle{vertical-align:middle;align-items:center}.cell-alignment-bottom{vertical-align:bottom;align-items:flex-end}.cell-emphasis-low ic-typography{--ic-typography-color:var(--ic-data-table-text-low-emphasis)}.cell-emphasis-high ic-typography{--ic-typography-color:var(--ic-data-table-text-high-emphasis);font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-data-table-pagination-bar-background-color);border-top:var(--ic-space-1px) solid\n var(--ic-data-table-pagination-bar-keyline)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}.loading-empty{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}.updating-state{padding:0;border-bottom:var(--ic-space-1px) solid var(--ic-data-table-header-keyline)}.updating-state-headers{border-bottom:none}.loading{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow);z-index:calc(var(--ic-z-index-dialog) - 1)}.loading.show-background{background-color:var(--ic-data-table-overlay-background);border:var(--ic-space-1px) solid var(--ic-data-table-overlay-border)}.loading.show{opacity:1}.icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}.column-header .icon>svg,.column-header ::slotted(svg){fill:var(--ic-data-table-icon)}.table-cell .icon>svg,.table-cell ::slotted(svg){fill:var(--ic-data-table-icon-default-emphasis)}.cell-emphasis-high .icon>svg,.cell-emphasis-high ::slotted(svg){fill:var(--ic-data-table-icon-high-emphasis)}.cell-emphasis-low .icon>svg,.cell-emphasis-low ::slotted(svg){fill:var(--ic-data-table-icon-low-emphasis)}.column-header-alignment-right>.icon,.row-header-alignment-right>.icon,.cell-alignment-right>.icon,.column-header-alignment-right>::slotted(svg),.row-header-alignment-right>::slotted(svg),.cell-alignment-right>::slotted(svg){margin-right:auto}.column-header-alignment-center>ic-typography,.column-header-alignment-center>.cell-text-wrapper,.row-header-alignment-right>ic-typography,.row-header-alignment-right>.cell-text-wrapper,.cell-alignment-center>ic-typography,.cell-alignment-center>.cell-text-wrapper{flex:1}.icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}.truncation-tooltip ic-typography{display:-webkit-box;-webkit-line-clamp:var(--ic-line-clamp, 0);-webkit-box-orient:vertical;overflow:hidden}.truncation-tooltip ic-typography,.truncation-show-hide ic-typography{white-space:normal}.ic-tooltip-overflow{overflow:hidden;width:100%}.action-element{display:flex;justify-content:right}.cell-grid-wrapper{display:grid;grid-template-columns:auto auto}.loading-overlay{visibility:hidden;position:absolute;top:0;left:0;width:100%;height:100%;background:var(--ic-data-table-loading-indicator-overlay-background);z-index:calc(var(--ic-z-index-dialog) - 2);opacity:0;transition:opacity var(--ic-transition-duration-slow)}.loading-overlay.show{visibility:visible;opacity:0.6}.sr-only{position:absolute;left:-9999px}@media (prefers-reduced-motion: reduce){.loading-overlay{transition:none}}.cell-text-wrapper{overflow:hidden}.cell-text-wrapper>ic-typography{margin-left:2px}.cell-text-no-wrap{word-wrap:initial}.cell-container-with-description{display:flex;flex-direction:row}.cell-description{display:flex;flex-direction:row;margin-top:var(--ic-space-xxs);word-break:break-all}.cell-description-text{color:var(--ic-color-secondary-text)}.cell-description-icon{padding-right:var(--ic-space-xs)}.cell-description-icon>svg{height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs));display:flex}@media screen and (min-width: 577px){.column-header-inner-container{display:flex;align-items:center}}@media screen and (max-width: 577px){.cell-icon{flex-wrap:wrap}.cell-description-icon{padding-right:0}}";
|
33
33
|
|
34
34
|
const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLElement {
|
35
35
|
constructor() {
|
@@ -37,6 +37,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
37
37
|
this.__registerHost();
|
38
38
|
this.__attachShadow();
|
39
39
|
this.icRowHeightChange = createEvent(this, "icRowHeightChange", 7);
|
40
|
+
this.icSelectedRowChange = createEvent(this, "icSelectedRowChange", 7);
|
40
41
|
this.icSortChange = createEvent(this, "icSortChange", 7);
|
41
42
|
this.DENSITY_HEIGHT_MULTIPLIER = {
|
42
43
|
dense: 0.8,
|
@@ -68,6 +69,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
68
69
|
this.itemsPerPageChange = false;
|
69
70
|
this.DATA_ROW_HEIGHT_STRING = "data-row-height";
|
70
71
|
this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
|
72
|
+
this.LINE_CLAMP_CSS_VARIABLE = "--ic-line-clamp";
|
71
73
|
this.DEFAULT_LINE_HEIGHT = 24;
|
72
74
|
this.densityUpdate = false;
|
73
75
|
this.truncationPatternUpdated = false;
|
@@ -75,6 +77,10 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
75
77
|
this.headerResizeObserver = null;
|
76
78
|
this.IC_TOOLTIP_STRING = "ic-tooltip";
|
77
79
|
this.SHOW_TRUNC_TOOLTIP_STRING = "show-trunc-tooltip";
|
80
|
+
this.CELL_DESCRIPTION_STRING = ".cell-description";
|
81
|
+
this.CELL_CONTAINER_WITH_DESCRIPTION_STRING = "cell-container-with-description";
|
82
|
+
this.CELL_TEXT_WRAPPER_STRING = ".cell-text-wrapper";
|
83
|
+
this.IC_TYPOGRAPHY_STRING = "ic-typography";
|
78
84
|
this.runHeaderResizeObserver = () => {
|
79
85
|
this.headerResizeObserver = new ResizeObserver(() => {
|
80
86
|
this.headerResizeCallback();
|
@@ -88,7 +94,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
88
94
|
const headers = this.el.shadowRoot.querySelectorAll("th.column-header");
|
89
95
|
headers.forEach((header) => {
|
90
96
|
const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);
|
91
|
-
const typographyEls = header.querySelectorAll(
|
97
|
+
const typographyEls = header.querySelectorAll(this.IC_TYPOGRAPHY_STRING);
|
92
98
|
if (tooltip && typographyEls && typographyEls.length === 2) {
|
93
99
|
tooltip.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);
|
94
100
|
if (typographyEls[1].clientWidth > typographyEls[0].clientWidth) {
|
@@ -156,8 +162,9 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
156
162
|
}
|
157
163
|
else {
|
158
164
|
if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
|
159
|
-
typographyEl.setAttribute("style",
|
160
|
-
cellContainer.
|
165
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
166
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
167
|
+
cellTextWrapper.prepend(typographyEl);
|
161
168
|
tooltip.remove();
|
162
169
|
}
|
163
170
|
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
@@ -309,11 +316,11 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
309
316
|
});
|
310
317
|
};
|
311
318
|
this.createCellContent = (columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis) => {
|
312
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
313
320
|
return (h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
314
321
|
!isSlotUsed(this.el, cellSlotName)
|
315
322
|
? cell
|
316
|
-
: null, class: Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
|
323
|
+
: null, class: Object.assign(Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
|
317
324
|
((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
318
325
|
rowAlignment ||
|
319
326
|
this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
|
@@ -329,13 +336,25 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
329
336
|
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
330
337
|
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
331
338
|
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
332
|
-
!!rowEmphasis }, this.setTruncationClass()), style: Object.assign(Object.assign({}, this.getRowHeight(currentRowHeight, columnProps, rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap, cell)), this.getColumnWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnWidth)), "data-row-height": this.truncationPattern || currentRowHeight
|
339
|
+
!!rowEmphasis }, this.setTruncationClass()), { [this.CELL_CONTAINER_WITH_DESCRIPTION_STRING]: this.isObject(cell) && Object.keys(cell).includes("description") }), style: Object.assign(Object.assign({}, this.getRowHeight(currentRowHeight, columnProps, rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap, cell)), this.getColumnWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnWidth)), "data-row-height": this.truncationPattern || currentRowHeight
|
333
340
|
? this.setRowHeight(currentRowHeight)
|
334
341
|
: null }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_k = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _k === void 0 ? void 0 : _k.onAllCells)) &&
|
335
342
|
(cellValue("icon") || ((_l = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _l === void 0 ? void 0 : _l.icon)) && (h("span", { class: "icon", innerHTML: cellValue("icon") || ((_m = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _m === void 0 ? void 0 : _m.icon) }))), (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element" &&
|
336
|
-
!isSlotUsed(this.el, cellSlotName) && (h("
|
343
|
+
!isSlotUsed(this.el, cellSlotName) && (h("div", { class: {
|
344
|
+
"cell-text-wrapper": true,
|
345
|
+
"cell-text-no-wrap": !this.truncationPattern,
|
346
|
+
} }, h("ic-typography", { variant: "body", class: {
|
347
|
+
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
348
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
349
|
+
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
350
|
+
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
351
|
+
!!rowEmphasis,
|
337
352
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
338
|
-
} }, this.isObject(cell) && (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href"), theme: this.theme, target: cellValue("target") || undefined, rel: cellValue("rel") || undefined }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType))))
|
353
|
+
} }, this.isObject(cell) && (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href"), theme: this.theme, target: cellValue("target") || undefined, rel: cellValue("rel") || undefined }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType))), this.isObject(cell) &&
|
354
|
+
Object.keys(cell).includes("description") && (h("div", { class: {
|
355
|
+
["cell-description"]: true,
|
356
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
357
|
+
} }, ((_o = cellValue("description")) === null || _o === void 0 ? void 0 : _o.icon) && (h("span", { class: "cell-description-icon", innerHTML: cellValue("description").icon })), h("ic-typography", { variant: "caption", class: "cell-description-text" }, (_q = (_p = cellValue("description")) === null || _p === void 0 ? void 0 : _p.data) !== null && _q !== void 0 ? _q : cellValue("description"))))))))));
|
339
358
|
};
|
340
359
|
this.createCells = (row, rowIndex) => {
|
341
360
|
var _a;
|
@@ -371,11 +390,15 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
371
390
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
372
391
|
["with-overflow"]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element",
|
373
392
|
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, this.isObject(cell) &&
|
374
|
-
Object.keys(cell).includes("actionElement") ? (h("div", { class: "cell-grid-wrapper" }, this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis), h("span", { class: "action-element", innerHTML: cellValue("actionElement")
|
393
|
+
Object.keys(cell).includes("actionElement") ? (h("div", { class: "cell-grid-wrapper" }, this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis), h("span", { class: "action-element", innerHTML: cellValue("actionElement"),
|
394
|
+
// eslint-disable-next-line react/jsx-no-bind
|
395
|
+
onClick: cell.actionOnClick
|
396
|
+
? () => this.handleClick(cell.actionOnClick)
|
397
|
+
: undefined }))) : (this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis))));
|
375
398
|
}
|
376
399
|
});
|
377
400
|
};
|
378
|
-
this.createColumnHeaders = () => this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
401
|
+
this.createColumnHeaders = () => (this.columns || []).map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
379
402
|
["column-header"]: true,
|
380
403
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
381
404
|
["updating-state-headers"]: this.updating && !this.loading,
|
@@ -404,6 +427,9 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
404
427
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
405
428
|
} }, title)))));
|
406
429
|
this.onRowClick = (row) => {
|
430
|
+
if (!this.loading && !this.updating) {
|
431
|
+
this.icSelectedRowChange.emit(this.selectedRow !== row ? row : null);
|
432
|
+
}
|
407
433
|
this.selectedRow =
|
408
434
|
this.selectedRow !== row && !this.loading && !this.updating && row;
|
409
435
|
};
|
@@ -434,7 +460,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
434
460
|
// eslint-disable-next-line react/jsx-no-bind
|
435
461
|
onClick: () => this.onRowClick(row), class: {
|
436
462
|
["table-row"]: true,
|
437
|
-
["table-row-selected"]: this.selectedRow === row,
|
463
|
+
["table-row-selected"]: this.highlightSelectedRow && this.selectedRow === row,
|
438
464
|
}
|
439
465
|
}, this.createCells(row, index)));
|
440
466
|
});
|
@@ -504,7 +530,8 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
504
530
|
});
|
505
531
|
};
|
506
532
|
this.getTypographyElements = () => {
|
507
|
-
|
533
|
+
// Filter out column headers and cell descriptions
|
534
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text,.cell-description-text)"));
|
508
535
|
};
|
509
536
|
this.getTooltip = (typographyEl) => {
|
510
537
|
return typographyEl.closest(this.TOOLTIP);
|
@@ -515,7 +542,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
515
542
|
const cellContainer = this.getCellContainer(typographyEl);
|
516
543
|
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
517
544
|
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
518
|
-
typographyEl.setAttribute("style",
|
545
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
519
546
|
return;
|
520
547
|
}
|
521
548
|
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
@@ -524,6 +551,56 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
524
551
|
this.updateScrollOffset = () => {
|
525
552
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
526
553
|
};
|
554
|
+
this.updateRowHeightForDescriptions = (rowHeight, cellContainer) => {
|
555
|
+
cellContainer.setAttribute("data-row-height", rowHeight.toString());
|
556
|
+
cellContainer.setAttribute("style", `${this.ROW_HEIGHT_CSS_VARIABLE}: ${rowHeight}px`);
|
557
|
+
};
|
558
|
+
// Method to update the row heights on cells with descriptions and tooltip truncation
|
559
|
+
this.updateCellHeightsWithDescriptions = () => {
|
560
|
+
const descriptions = this.el.shadowRoot.querySelectorAll(this.CELL_DESCRIPTION_STRING);
|
561
|
+
descriptions.forEach((description) => {
|
562
|
+
const cellContainer = description.closest(`.${this.CELL_CONTAINER_WITH_DESCRIPTION_STRING}`);
|
563
|
+
const typography = cellContainer.querySelector(this.IC_TYPOGRAPHY_STRING);
|
564
|
+
const descriptionMarginTop = window
|
565
|
+
.getComputedStyle(description)
|
566
|
+
.getPropertyValue("margin-top");
|
567
|
+
const descriptionHeight = description.clientHeight + parseInt(descriptionMarginTop, 10);
|
568
|
+
if (this.globalRowHeight && this.globalRowHeight !== "auto") {
|
569
|
+
if (!typography.textContent &&
|
570
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight) {
|
571
|
+
this.updateRowHeightForDescriptions(descriptionHeight, cellContainer);
|
572
|
+
}
|
573
|
+
else if (this.truncationPattern === this.TOOLTIP_STRING) {
|
574
|
+
if (descriptionHeight + this.DEFAULT_LINE_HEIGHT >
|
575
|
+
this.globalRowHeight) {
|
576
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
577
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS) && cellIcon) {
|
578
|
+
// recalculate descriptionHeight as when a word break occurs this value changes
|
579
|
+
// Additional spacing given for 300-400% zoom
|
580
|
+
this.updateRowHeightForDescriptions(descriptionHeight +
|
581
|
+
this.DEFAULT_LINE_HEIGHT +
|
582
|
+
cellIcon.clientHeight, cellContainer);
|
583
|
+
}
|
584
|
+
else {
|
585
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
586
|
+
}
|
587
|
+
}
|
588
|
+
this.addLineClampCSS(typography, cellContainer);
|
589
|
+
// Additional case for show/hide truncation for when a description is present, but the text
|
590
|
+
// isn't overflowing the cell to trigger the show more button to appear.
|
591
|
+
}
|
592
|
+
else if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
593
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight &&
|
594
|
+
typography.style.getPropertyValue("--truncation-max-lines") !==
|
595
|
+
"initial") {
|
596
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
597
|
+
if (descriptionHeight) {
|
598
|
+
this.createShowHideTruncation(typography, cellContainer, descriptionHeight);
|
599
|
+
}
|
600
|
+
}
|
601
|
+
}
|
602
|
+
});
|
603
|
+
};
|
527
604
|
this.setTableDimensions = () => {
|
528
605
|
let tableHostDimensions = {};
|
529
606
|
if (this.width) {
|
@@ -540,22 +617,79 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
540
617
|
}
|
541
618
|
return tableHostDimensions;
|
542
619
|
};
|
620
|
+
this.fixCellTooltip = (element) => {
|
621
|
+
var _a;
|
622
|
+
const tooltipEl = (element.tagName === "IC-TOOLTIP"
|
623
|
+
? element
|
624
|
+
: (_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
625
|
+
if (tooltipEl) {
|
626
|
+
tooltipEl.setExternalPopperProps({
|
627
|
+
strategy: "fixed",
|
628
|
+
});
|
629
|
+
}
|
630
|
+
};
|
543
631
|
this.fixCellTooltips = () => {
|
544
632
|
const elements = this.el.shadowRoot.querySelectorAll(".data-type-element");
|
545
633
|
elements.forEach((element) => {
|
546
634
|
const slotElements = getSlotElements(element);
|
547
|
-
slotElements.forEach((slottedEl) => {
|
548
|
-
|
549
|
-
const tooltipEl = (slottedEl.tagName === "IC-TOOLTIP"
|
550
|
-
? slottedEl
|
551
|
-
: (_a = slottedEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
552
|
-
if (tooltipEl) {
|
553
|
-
tooltipEl.setExternalPopperProps({
|
554
|
-
strategy: "fixed",
|
555
|
-
});
|
556
|
-
}
|
635
|
+
slotElements === null || slotElements === void 0 ? void 0 : slotElements.forEach((slottedEl) => {
|
636
|
+
this.fixCellTooltip(slottedEl);
|
557
637
|
});
|
558
638
|
});
|
639
|
+
const actionElements = this.el.shadowRoot.querySelectorAll(".action-element");
|
640
|
+
actionElements === null || actionElements === void 0 ? void 0 : actionElements.forEach((actionElementSpan) => {
|
641
|
+
const actionElement = actionElementSpan.firstChild;
|
642
|
+
if (actionElement) {
|
643
|
+
this.fixCellTooltip(actionElement);
|
644
|
+
}
|
645
|
+
});
|
646
|
+
};
|
647
|
+
this.handleClick = (callback) => callback();
|
648
|
+
this.renderTableBody = (data, loading, overlay) => {
|
649
|
+
if (!(data === null || data === void 0 ? void 0 : data.length))
|
650
|
+
return;
|
651
|
+
if (overlay && loading) {
|
652
|
+
return h("tbody", null, this.createRows());
|
653
|
+
}
|
654
|
+
else if (loading && !overlay) {
|
655
|
+
return null;
|
656
|
+
}
|
657
|
+
else {
|
658
|
+
return h("tbody", null, this.createRows());
|
659
|
+
}
|
660
|
+
};
|
661
|
+
this.renderLoadingIndicator = (isLoading, loadingOptions) => {
|
662
|
+
if (!isLoading)
|
663
|
+
return null;
|
664
|
+
return (h(Fragment, null, h("div", { class: "loading-overlay", ref: (el) => (this.loadingOverlay = el) }), h("ic-loading-indicator", { theme: this.theme, monochrome: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.monochrome, class: {
|
665
|
+
"loading-empty": isLoading,
|
666
|
+
loading: true,
|
667
|
+
"show-background": loadingOptions.showBackground || loadingOptions.overlay,
|
668
|
+
}, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })));
|
669
|
+
};
|
670
|
+
this.renderAriaLiveLoading = () => {
|
671
|
+
var _a, _b;
|
672
|
+
if (this.loading) {
|
673
|
+
return ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.label) || "Loading...";
|
674
|
+
}
|
675
|
+
else if (this.updating) {
|
676
|
+
return ((_b = this.updatingOptions) === null || _b === void 0 ? void 0 : _b.description) || "Updating table data";
|
677
|
+
}
|
678
|
+
else {
|
679
|
+
return "";
|
680
|
+
}
|
681
|
+
};
|
682
|
+
this.renderEmptyState = (data, loading, overlay) => {
|
683
|
+
const emptyStateEl = isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" }));
|
684
|
+
if (loading && !(data === null || data === void 0 ? void 0 : data.length) && overlay) {
|
685
|
+
return emptyStateEl;
|
686
|
+
}
|
687
|
+
else if (!loading && !(data === null || data === void 0 ? void 0 : data.length)) {
|
688
|
+
return emptyStateEl;
|
689
|
+
}
|
690
|
+
else {
|
691
|
+
return null;
|
692
|
+
}
|
559
693
|
};
|
560
694
|
this.fromRow = 0;
|
561
695
|
this.previousRowsPerPage = undefined;
|
@@ -576,6 +710,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
576
710
|
this.embedded = false;
|
577
711
|
this.globalRowHeight = "auto";
|
578
712
|
this.height = undefined;
|
713
|
+
this.highlightSelectedRow = true;
|
579
714
|
this.hideColumnHeaders = false;
|
580
715
|
this.loading = false;
|
581
716
|
this.loadingOptions = undefined;
|
@@ -598,6 +733,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
598
733
|
hideRangeLabel: false,
|
599
734
|
hideAllFromItemsPerPage: false,
|
600
735
|
monochrome: false,
|
736
|
+
setToFirstPageOnPaginationChange: false,
|
601
737
|
};
|
602
738
|
this.showPagination = false;
|
603
739
|
this.sortable = false;
|
@@ -635,13 +771,13 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
635
771
|
(_b = this.headerResizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
636
772
|
}
|
637
773
|
componentWillLoad() {
|
638
|
-
var _a;
|
774
|
+
var _a, _b;
|
639
775
|
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
640
776
|
this.previousRowsPerPage = this.rowsPerPage;
|
641
777
|
this.toRow = this.rowsPerPage;
|
642
778
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
643
779
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
644
|
-
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
780
|
+
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 || !!((_b = this.loadingOptions) === null || _b === void 0 ? void 0 : _b.overlay) });
|
645
781
|
this.initialLoad = true;
|
646
782
|
this.previousItemsPerPage = this.rowsPerPage;
|
647
783
|
}
|
@@ -672,6 +808,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
672
808
|
if (this.globalRowHeight !== "auto") {
|
673
809
|
this.updateSetRowHeight();
|
674
810
|
}
|
811
|
+
window.addEventListener("resize", this.updateCellHeightsWithDescriptions);
|
675
812
|
}
|
676
813
|
componentDidUpdate() {
|
677
814
|
// truncation updates invoked here once new/updated data has
|
@@ -683,6 +820,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
683
820
|
}
|
684
821
|
componentDidRender() {
|
685
822
|
this.fixCellTooltips();
|
823
|
+
this.updateCellHeightsWithDescriptions();
|
686
824
|
this.adjustWidthForActionElement();
|
687
825
|
}
|
688
826
|
truncateUpdatedData() {
|
@@ -741,7 +879,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
741
879
|
cellContainer.style.height = null;
|
742
880
|
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
743
881
|
this.removeTooltip(cellContainer, typographyEl, tooltipEl);
|
744
|
-
typographyEl.setAttribute("style",
|
882
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
745
883
|
}
|
746
884
|
else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
747
885
|
this.resetShowHideTruncation(typographyEl);
|
@@ -752,7 +890,8 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
752
890
|
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
753
891
|
// If the set row height is bigger than the cell container even
|
754
892
|
// with textWrap, set the row height
|
755
|
-
if (!
|
893
|
+
if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
894
|
+
!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
|
756
895
|
rowHeight > cellContainer.clientHeight &&
|
757
896
|
!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
758
897
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -785,7 +924,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
785
924
|
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
786
925
|
newRows.forEach((row) => {
|
787
926
|
row
|
788
|
-
.querySelectorAll(
|
927
|
+
.querySelectorAll(this.IC_TYPOGRAPHY_STRING)
|
789
928
|
.forEach((typographyEl) => {
|
790
929
|
const cellContainer = this.getCellContainer(typographyEl);
|
791
930
|
const tooltipEl = this.getTooltip(typographyEl);
|
@@ -847,9 +986,17 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
847
986
|
}
|
848
987
|
}
|
849
988
|
}
|
850
|
-
createShowHideTruncation(typographyEl, cellContainer) {
|
989
|
+
createShowHideTruncation(typographyEl, cellContainer, descriptionHeight) {
|
851
990
|
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
852
991
|
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
992
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
993
|
+
descriptionHeight) {
|
994
|
+
typographyEl.setAttribute("max-lines", `${Math.floor(((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - descriptionHeight) /
|
995
|
+
this.DEFAULT_LINE_HEIGHT)}`);
|
996
|
+
}
|
997
|
+
else {
|
998
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
999
|
+
}
|
853
1000
|
typographyEl.setShowHideExpanded(false);
|
854
1001
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
855
1002
|
}
|
@@ -956,7 +1103,8 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
956
1103
|
this.truncationPatternUpdated = true;
|
957
1104
|
}
|
958
1105
|
async dataHandler(newData) {
|
959
|
-
|
1106
|
+
var _a;
|
1107
|
+
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 || !!((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.overlay) });
|
960
1108
|
if (this.loading) {
|
961
1109
|
!this.hasLoadedForOneSecond
|
962
1110
|
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
@@ -983,7 +1131,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
983
1131
|
typographyEl.setShowHideExpanded(false);
|
984
1132
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
985
1133
|
}
|
986
|
-
else {
|
1134
|
+
else if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)) {
|
987
1135
|
typographyEl.resetTruncation().then(() => {
|
988
1136
|
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
989
1137
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -1019,8 +1167,11 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1019
1167
|
this.variableRowHeight = null;
|
1020
1168
|
}
|
1021
1169
|
showLoadingIndicator() {
|
1022
|
-
var _a;
|
1023
|
-
(_a = this.
|
1170
|
+
var _a, _b, _c;
|
1171
|
+
if ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.overlay) {
|
1172
|
+
(_b = this.loadingOverlay) === null || _b === void 0 ? void 0 : _b.classList.add("show");
|
1173
|
+
}
|
1174
|
+
(_c = this.loadingIndicator) === null || _c === void 0 ? void 0 : _c.classList.add("show");
|
1024
1175
|
}
|
1025
1176
|
getRowOptions(rowKeys, rowValues) {
|
1026
1177
|
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
@@ -1049,20 +1200,40 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1049
1200
|
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
1050
1201
|
this.truncationPattern === this.TOOLTIP_STRING) {
|
1051
1202
|
if (!typographyEl.getAttribute("style") ||
|
1052
|
-
typographyEl.style.cssText.includes(
|
1203
|
+
typographyEl.style.cssText.includes(`${this.LINE_CLAMP_CSS_VARIABLE}: 0;`)) {
|
1053
1204
|
this.addLineClampCSS(typographyEl, cellContainer);
|
1054
1205
|
}
|
1055
1206
|
this.createTruncationTooltip(typographyEl, cellContainer);
|
1056
1207
|
}
|
1057
1208
|
}
|
1058
1209
|
removeTooltip(cellContainer, typographyEl, tooltip) {
|
1059
|
-
cellContainer.
|
1210
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1211
|
+
cellTextWrapper.prepend(typographyEl);
|
1060
1212
|
if (tooltip) {
|
1061
1213
|
tooltip.remove();
|
1062
1214
|
}
|
1063
1215
|
}
|
1064
1216
|
addLineClampCSS(typographyEl, cellContainer) {
|
1065
|
-
|
1217
|
+
var _a, _b;
|
1218
|
+
const descriptionCellHeight = (_a = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
1219
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
1220
|
+
(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > descriptionCellHeight) {
|
1221
|
+
let iconHeight;
|
1222
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS)) {
|
1223
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
1224
|
+
iconHeight = cellIcon ? cellIcon.clientHeight : 0;
|
1225
|
+
}
|
1226
|
+
else {
|
1227
|
+
iconHeight = 0;
|
1228
|
+
}
|
1229
|
+
const height = (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) -
|
1230
|
+
((_b = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _b === void 0 ? void 0 : _b.clientHeight) -
|
1231
|
+
iconHeight;
|
1232
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(height || 0)}`);
|
1233
|
+
}
|
1234
|
+
else {
|
1235
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
|
1236
|
+
}
|
1066
1237
|
}
|
1067
1238
|
createTruncationTooltip(typographyEl, cellContainer) {
|
1068
1239
|
const tooltipEl = document.createElement(this.IC_TOOLTIP_STRING);
|
@@ -1073,12 +1244,13 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1073
1244
|
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
1074
1245
|
strategy: "fixed",
|
1075
1246
|
});
|
1076
|
-
cellContainer.
|
1077
|
-
|
1247
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1248
|
+
cellTextWrapper.prepend(tooltipEl);
|
1249
|
+
tooltipEl.prepend(typographyEl);
|
1078
1250
|
}
|
1079
1251
|
render() {
|
1080
1252
|
var _a;
|
1081
|
-
const { caption, createColumnHeaders,
|
1253
|
+
const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, theme, } = this;
|
1082
1254
|
return (h(Host, { style: Object.assign({}, this.setTableDimensions()), class: { [`ic-theme-${theme}`]: theme !== "inherit" } }, h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
|
1083
1255
|
["table-row-container"]: true,
|
1084
1256
|
scrollable,
|
@@ -1089,13 +1261,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1089
1261
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
1090
1262
|
} }, h("tr", null, createColumnHeaders()))), updating &&
|
1091
1263
|
!loading &&
|
1092
|
-
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data
|
1093
|
-
!loading &&
|
1094
|
-
(isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (h("ic-loading-indicator", { theme: theme, monochrome: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.monochrome, class: {
|
1095
|
-
"loading-empty": loading,
|
1096
|
-
loading: true,
|
1097
|
-
"show-background": loadingOptions.showBackground,
|
1098
|
-
}, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })), (showPagination || isSlotUsed(this.el, "pagination-bar")) && (h("div", { class: "pagination-container" }, isSlotUsed(this.el, "pagination-bar") ? (h("slot", { name: "pagination-bar" })) : (h("ic-pagination-bar", { totalItems: (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0, type: paginationBarOptions.type, rangeLabelType: paginationBarOptions.rangeLabelType, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, showGoToPageControl: paginationBarOptions.showGoToPageControl, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, alignment: paginationBarOptions.alignment, theme: theme, monochrome: paginationBarOptions.monochrome, itemLabel: paginationBarOptions.itemLabel, pageLabel: paginationBarOptions.pageLabel, hideRangeLabel: paginationBarOptions.hideRangeLabel, hideAllFromItemsPerPage: paginationBarOptions.hideAllFromItemsPerPage })))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
|
1264
|
+
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), this.renderTableBody(data, loading, loadingOptions.overlay)), this.renderEmptyState(data, loading, loadingOptions.overlay)), h("div", { "aria-live": "assertive", class: "sr-only" }, this.renderAriaLiveLoading()), this.renderLoadingIndicator(loading, loadingOptions), (showPagination || isSlotUsed(this.el, "pagination-bar")) && (h("div", { class: "pagination-container" }, isSlotUsed(this.el, "pagination-bar") ? (h("slot", { name: "pagination-bar" })) : (h("ic-pagination-bar", { totalItems: (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0, type: paginationBarOptions.type, rangeLabelType: paginationBarOptions.rangeLabelType, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, showGoToPageControl: paginationBarOptions.showGoToPageControl, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, alignment: paginationBarOptions.alignment, theme: theme, monochrome: paginationBarOptions.monochrome, itemLabel: paginationBarOptions.itemLabel, pageLabel: paginationBarOptions.pageLabel, hideRangeLabel: paginationBarOptions.hideRangeLabel, hideAllFromItemsPerPage: paginationBarOptions.hideAllFromItemsPerPage, setToFirstPageOnPaginationChange: paginationBarOptions.setToFirstPageOnPaginationChange })))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
|
1099
1265
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
1100
1266
|
: "table unsorted")))));
|
1101
1267
|
}
|
@@ -1119,6 +1285,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1119
1285
|
"embedded": [4],
|
1120
1286
|
"globalRowHeight": [1032, "global-row-height"],
|
1121
1287
|
"height": [1],
|
1288
|
+
"highlightSelectedRow": [4, "highlight-selected-row"],
|
1122
1289
|
"hideColumnHeaders": [4, "hide-column-headers"],
|
1123
1290
|
"loading": [1028],
|
1124
1291
|
"loadingOptions": [16],
|