@ukic/canary-web-components 3.0.0-canary.6 → 3.0.0-canary.9
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-ce248d54.js} +25 -2
- package/dist/cjs/helpers-ce248d54.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 +47 -3
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js.map +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 +230 -49
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +2 -2
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +10 -4
- package/dist/cjs/ic-dialog.cjs.entry.js.map +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 +2 -2
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +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 +54 -40
- 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 +21 -18
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +13 -6
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +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 +12 -14
- package/dist/cjs/ic-switch.cjs.entry.js.map +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 +34 -11
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +53 -6
- 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 +265 -51
- 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 +214 -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-date-input/ic-date-input.css +5 -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 +23 -2
- 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-breadcrumb-group.js +1 -1
- package/dist/components/ic-breadcrumb2.js +49 -3
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.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-checkbox-group.js +1 -1
- package/dist/components/ic-checkbox.js +1 -1
- package/dist/components/ic-data-row.js +1 -1
- package/dist/components/ic-data-table.js +231 -49
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +2 -2
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +1 -1
- package/dist/components/ic-dialog.js +9 -3
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.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-input-label2.js +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-menu2.js +26 -13
- 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 +2 -2
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-page-header.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-pagination-item2.js +1 -1
- package/dist/components/ic-popover-menu.js +1 -1
- package/dist/components/ic-radio-group.js +21 -18
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +14 -7
- package/dist/components/ic-radio-option.js.map +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 +46 -34
- 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-switch.js +12 -15
- package/dist/components/ic-switch.js.map +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 +40 -11
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +61 -13
- 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 +17 -5
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-2664bfab.entry.js → p-0054bdc2.entry.js} +2 -2
- package/dist/core/p-01a23e24.entry.js +2 -0
- package/dist/core/p-01a23e24.entry.js.map +1 -0
- package/dist/core/p-063911a8.entry.js +2 -0
- package/dist/core/p-063911a8.entry.js.map +1 -0
- package/dist/core/{p-07881c14.entry.js → p-0c5d45e1.entry.js} +2 -2
- package/dist/core/{p-47f2f713.entry.js → p-15a5cce5.entry.js} +2 -2
- package/dist/core/{p-eb6e3878.entry.js → p-1658e577.entry.js} +2 -2
- package/dist/core/{p-b7e5b682.entry.js → p-1808381b.entry.js} +2 -2
- package/dist/core/p-2169e75b.entry.js +2 -0
- package/dist/core/{p-670c10af.entry.js.map → p-2169e75b.entry.js.map} +1 -1
- package/dist/core/{p-6a2ed698.entry.js → p-26aff39e.entry.js} +2 -2
- package/dist/core/{p-5284ccab.entry.js → p-27b1223d.entry.js} +2 -2
- package/dist/core/{p-35caddb3.entry.js → p-32726b89.entry.js} +2 -2
- package/dist/core/{p-1084a7f9.entry.js → p-33110185.entry.js} +2 -2
- package/dist/core/p-40e965de.entry.js +2 -0
- package/dist/core/p-40e965de.entry.js.map +1 -0
- package/dist/core/{p-3272931c.entry.js → p-41bfa3e5.entry.js} +2 -2
- package/dist/core/p-4347f05c.entry.js +2 -0
- package/dist/core/p-4347f05c.entry.js.map +1 -0
- package/dist/core/p-440c97ac.entry.js +2 -0
- package/dist/core/p-440c97ac.entry.js.map +1 -0
- package/dist/core/{p-7a9de1bb.entry.js → p-45177148.entry.js} +2 -2
- package/dist/core/{p-92398f47.entry.js → p-4f96bec1.entry.js} +2 -2
- package/dist/core/{p-a0dfd2cf.entry.js → p-51058719.entry.js} +2 -2
- package/dist/core/{p-7765a219.entry.js → p-5193184c.entry.js} +2 -2
- package/dist/core/{p-8e300091.entry.js → p-51faa4ba.entry.js} +2 -2
- package/dist/core/p-51faa4ba.entry.js.map +1 -0
- package/dist/core/p-6188f029.entry.js +2 -0
- package/dist/core/p-6188f029.entry.js.map +1 -0
- package/dist/core/{p-b047cd84.entry.js → p-6ac8e09b.entry.js} +2 -2
- package/dist/core/p-6ac8e09b.entry.js.map +1 -0
- package/dist/core/p-71496305.entry.js +2 -0
- package/dist/core/{p-29a86adf.entry.js.map → p-71496305.entry.js.map} +1 -1
- package/dist/core/p-77157922.entry.js +2 -0
- package/dist/core/p-77157922.entry.js.map +1 -0
- package/dist/core/{p-21f6619f.entry.js → p-794ff553.entry.js} +2 -2
- package/dist/core/p-82b408ad.entry.js +2 -0
- package/dist/core/p-82b408ad.entry.js.map +1 -0
- package/dist/core/p-8576281d.entry.js +2 -0
- package/dist/core/p-8576281d.entry.js.map +1 -0
- package/dist/core/p-88913402.entry.js +2 -0
- package/dist/core/p-88913402.entry.js.map +1 -0
- package/dist/core/p-897fac99.js +2 -0
- package/dist/core/p-897fac99.js.map +1 -0
- package/dist/core/{p-95d1c9e6.entry.js → p-8e56516a.entry.js} +2 -2
- package/dist/core/{p-3b84953c.entry.js → p-8ebd64ae.entry.js} +2 -2
- package/dist/core/{p-d5648fdc.entry.js → p-9462f294.entry.js} +2 -2
- package/dist/core/p-94efa0d2.entry.js +2 -0
- package/dist/core/p-94efa0d2.entry.js.map +1 -0
- package/dist/core/p-9a392c41.entry.js +2 -0
- package/dist/core/{p-b1c68968.entry.js.map → p-9a392c41.entry.js.map} +1 -1
- package/dist/core/p-a04712b9.js +2 -0
- package/dist/core/p-a04712b9.js.map +1 -0
- package/dist/core/{p-efd608ab.entry.js → p-a1d5fff2.entry.js} +2 -2
- package/dist/core/p-a69ef3eb.entry.js +2 -0
- package/dist/core/p-a69ef3eb.entry.js.map +1 -0
- package/dist/core/p-ace8126b.entry.js +2 -0
- package/dist/core/p-ace8126b.entry.js.map +1 -0
- package/dist/core/{p-26a41692.entry.js → p-ade5d1b6.entry.js} +2 -2
- package/dist/core/{p-2412ba0b.entry.js → p-b2a6f0dd.entry.js} +2 -2
- package/dist/core/{p-83f39782.entry.js → p-b5a5fe39.entry.js} +2 -2
- package/dist/core/{p-19f85b60.entry.js → p-b717ae40.entry.js} +2 -2
- package/dist/core/{p-5d749879.entry.js → p-b85466a7.entry.js} +2 -2
- package/dist/core/{p-3ae329ab.entry.js → p-bd87bf33.entry.js} +2 -2
- package/dist/core/{p-fafc157b.entry.js → p-be1ec9aa.entry.js} +2 -2
- package/dist/core/{p-38aca488.entry.js → p-be54a959.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-3bc4bc81.entry.js → p-c035d7b9.entry.js} +2 -2
- package/dist/core/p-c0733c84.entry.js +2 -0
- package/dist/core/p-c0733c84.entry.js.map +1 -0
- package/dist/core/p-c466bc73.entry.js +2 -0
- package/dist/core/p-c466bc73.entry.js.map +1 -0
- package/dist/core/{p-ca4bfffd.entry.js → p-cd6dbb1e.entry.js} +2 -2
- package/dist/core/{p-ca4bfffd.entry.js.map → p-cd6dbb1e.entry.js.map} +1 -1
- package/dist/core/{p-f02d5539.entry.js → p-d2b2b7df.entry.js} +2 -2
- package/dist/core/p-dda6a46d.entry.js +2 -0
- package/dist/core/p-dda6a46d.entry.js.map +1 -0
- package/dist/core/{p-1893f635.entry.js → p-e1df1b9a.entry.js} +2 -2
- package/dist/core/p-e1df1b9a.entry.js.map +1 -0
- package/dist/core/{p-e0b556b4.entry.js → p-e3c98750.entry.js} +2 -2
- package/dist/core/{p-39190da3.entry.js → p-f3d2af04.entry.js} +2 -2
- package/dist/core/{p-b9081a99.entry.js → p-f7d2f703.entry.js} +2 -2
- package/dist/core/p-fc155ae2.entry.js +2 -0
- package/dist/core/p-fc155ae2.entry.js.map +1 -0
- 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-56c75bf4.js} +24 -3
- package/dist/esm/helpers-56c75bf4.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 +47 -3
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js.map +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 +230 -49
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +2 -2
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +10 -4
- package/dist/esm/ic-dialog.entry.js.map +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 +2 -2
- package/dist/esm/ic-navigation-item.entry.js.map +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 +54 -40
- 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 +21 -18
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +13 -6
- package/dist/esm/ic-radio-option.entry.js.map +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 +12 -14
- package/dist/esm/ic-switch.entry.js.map +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 +34 -11
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +53 -6
- 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 +638 -277
- 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-06cda732.entry.js +0 -2
- package/dist/core/p-06cda732.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-2c38ff71.entry.js +0 -2
- package/dist/core/p-2c38ff71.entry.js.map +0 -1
- package/dist/core/p-324be8cf.entry.js +0 -2
- package/dist/core/p-324be8cf.entry.js.map +0 -1
- 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-68eb216b.entry.js +0 -2
- package/dist/core/p-68eb216b.entry.js.map +0 -1
- 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-8e300091.entry.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-ccd141a9.entry.js +0 -2
- package/dist/core/p-ccd141a9.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-2664bfab.entry.js.map → p-0054bdc2.entry.js.map} +0 -0
- /package/dist/core/{p-07881c14.entry.js.map → p-0c5d45e1.entry.js.map} +0 -0
- /package/dist/core/{p-47f2f713.entry.js.map → p-15a5cce5.entry.js.map} +0 -0
- /package/dist/core/{p-eb6e3878.entry.js.map → p-1658e577.entry.js.map} +0 -0
- /package/dist/core/{p-b7e5b682.entry.js.map → p-1808381b.entry.js.map} +0 -0
- /package/dist/core/{p-6a2ed698.entry.js.map → p-26aff39e.entry.js.map} +0 -0
- /package/dist/core/{p-5284ccab.entry.js.map → p-27b1223d.entry.js.map} +0 -0
- /package/dist/core/{p-35caddb3.entry.js.map → p-32726b89.entry.js.map} +0 -0
- /package/dist/core/{p-1084a7f9.entry.js.map → p-33110185.entry.js.map} +0 -0
- /package/dist/core/{p-3272931c.entry.js.map → p-41bfa3e5.entry.js.map} +0 -0
- /package/dist/core/{p-7a9de1bb.entry.js.map → p-45177148.entry.js.map} +0 -0
- /package/dist/core/{p-92398f47.entry.js.map → p-4f96bec1.entry.js.map} +0 -0
- /package/dist/core/{p-a0dfd2cf.entry.js.map → p-51058719.entry.js.map} +0 -0
- /package/dist/core/{p-7765a219.entry.js.map → p-5193184c.entry.js.map} +0 -0
- /package/dist/core/{p-21f6619f.entry.js.map → p-794ff553.entry.js.map} +0 -0
- /package/dist/core/{p-95d1c9e6.entry.js.map → p-8e56516a.entry.js.map} +0 -0
- /package/dist/core/{p-3b84953c.entry.js.map → p-8ebd64ae.entry.js.map} +0 -0
- /package/dist/core/{p-d5648fdc.entry.js.map → p-9462f294.entry.js.map} +0 -0
- /package/dist/core/{p-efd608ab.entry.js.map → p-a1d5fff2.entry.js.map} +0 -0
- /package/dist/core/{p-26a41692.entry.js.map → p-ade5d1b6.entry.js.map} +0 -0
- /package/dist/core/{p-2412ba0b.entry.js.map → p-b2a6f0dd.entry.js.map} +0 -0
- /package/dist/core/{p-83f39782.entry.js.map → p-b5a5fe39.entry.js.map} +0 -0
- /package/dist/core/{p-19f85b60.entry.js.map → p-b717ae40.entry.js.map} +0 -0
- /package/dist/core/{p-5d749879.entry.js.map → p-b85466a7.entry.js.map} +0 -0
- /package/dist/core/{p-3ae329ab.entry.js.map → p-bd87bf33.entry.js.map} +0 -0
- /package/dist/core/{p-fafc157b.entry.js.map → p-be1ec9aa.entry.js.map} +0 -0
- /package/dist/core/{p-38aca488.entry.js.map → p-be54a959.entry.js.map} +0 -0
- /package/dist/core/{p-3bc4bc81.entry.js.map → p-c035d7b9.entry.js.map} +0 -0
- /package/dist/core/{p-f02d5539.entry.js.map → p-d2b2b7df.entry.js.map} +0 -0
- /package/dist/core/{p-e0b556b4.entry.js.map → p-e3c98750.entry.js.map} +0 -0
- /package/dist/core/{p-39190da3.entry.js.map → p-f3d2af04.entry.js.map} +0 -0
- /package/dist/core/{p-b9081a99.entry.js.map → p-f7d2f703.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-93509377.js';
|
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 './helpers-0f42cb46.js';
|
3
3
|
|
4
4
|
const unsortedIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">
|
5
5
|
<path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>
|
@@ -13,12 +13,13 @@ const descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 2
|
|
13
13
|
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
14
14
|
</svg>`;
|
15
15
|
|
16
|
-
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{
|
16
|
+
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}}";
|
17
17
|
|
18
18
|
const DataTable = class {
|
19
19
|
constructor(hostRef) {
|
20
20
|
registerInstance(this, hostRef);
|
21
21
|
this.icRowHeightChange = createEvent(this, "icRowHeightChange", 7);
|
22
|
+
this.icSelectedRowChange = createEvent(this, "icSelectedRowChange", 7);
|
22
23
|
this.icSortChange = createEvent(this, "icSortChange", 7);
|
23
24
|
this.DENSITY_HEIGHT_MULTIPLIER = {
|
24
25
|
dense: 0.8,
|
@@ -50,6 +51,7 @@ const DataTable = class {
|
|
50
51
|
this.itemsPerPageChange = false;
|
51
52
|
this.DATA_ROW_HEIGHT_STRING = "data-row-height";
|
52
53
|
this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
|
54
|
+
this.LINE_CLAMP_CSS_VARIABLE = "--ic-line-clamp";
|
53
55
|
this.DEFAULT_LINE_HEIGHT = 24;
|
54
56
|
this.densityUpdate = false;
|
55
57
|
this.truncationPatternUpdated = false;
|
@@ -57,6 +59,10 @@ const DataTable = class {
|
|
57
59
|
this.headerResizeObserver = null;
|
58
60
|
this.IC_TOOLTIP_STRING = "ic-tooltip";
|
59
61
|
this.SHOW_TRUNC_TOOLTIP_STRING = "show-trunc-tooltip";
|
62
|
+
this.CELL_DESCRIPTION_STRING = ".cell-description";
|
63
|
+
this.CELL_CONTAINER_WITH_DESCRIPTION_STRING = "cell-container-with-description";
|
64
|
+
this.CELL_TEXT_WRAPPER_STRING = ".cell-text-wrapper";
|
65
|
+
this.IC_TYPOGRAPHY_STRING = "ic-typography";
|
60
66
|
this.runHeaderResizeObserver = () => {
|
61
67
|
this.headerResizeObserver = new ResizeObserver(() => {
|
62
68
|
this.headerResizeCallback();
|
@@ -70,7 +76,7 @@ const DataTable = class {
|
|
70
76
|
const headers = this.el.shadowRoot.querySelectorAll("th.column-header");
|
71
77
|
headers.forEach((header) => {
|
72
78
|
const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);
|
73
|
-
const typographyEls = header.querySelectorAll(
|
79
|
+
const typographyEls = header.querySelectorAll(this.IC_TYPOGRAPHY_STRING);
|
74
80
|
if (tooltip && typographyEls && typographyEls.length === 2) {
|
75
81
|
tooltip.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);
|
76
82
|
if (typographyEls[1].clientWidth > typographyEls[0].clientWidth) {
|
@@ -138,8 +144,9 @@ const DataTable = class {
|
|
138
144
|
}
|
139
145
|
else {
|
140
146
|
if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
|
141
|
-
typographyEl.setAttribute("style",
|
142
|
-
cellContainer.
|
147
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
148
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
149
|
+
cellTextWrapper.prepend(typographyEl);
|
143
150
|
tooltip.remove();
|
144
151
|
}
|
145
152
|
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
@@ -291,11 +298,11 @@ const DataTable = class {
|
|
291
298
|
});
|
292
299
|
};
|
293
300
|
this.createCellContent = (columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis) => {
|
294
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
301
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
295
302
|
return (h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
296
303
|
!isSlotUsed(this.el, cellSlotName)
|
297
304
|
? cell
|
298
|
-
: 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) ||
|
305
|
+
: 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) ||
|
299
306
|
((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
300
307
|
rowAlignment ||
|
301
308
|
this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
|
@@ -311,13 +318,25 @@ const DataTable = class {
|
|
311
318
|
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
312
319
|
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
313
320
|
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
314
|
-
!!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
|
321
|
+
!!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
|
315
322
|
? this.setRowHeight(currentRowHeight)
|
316
323
|
: 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)) &&
|
317
324
|
(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" &&
|
318
|
-
!isSlotUsed(this.el, cellSlotName) && (h("
|
325
|
+
!isSlotUsed(this.el, cellSlotName) && (h("div", { class: {
|
326
|
+
"cell-text-wrapper": true,
|
327
|
+
"cell-text-no-wrap": !this.truncationPattern,
|
328
|
+
} }, h("ic-typography", { variant: "body", class: {
|
329
|
+
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
330
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
331
|
+
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
332
|
+
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
333
|
+
!!rowEmphasis,
|
319
334
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
320
|
-
} }, 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))))
|
335
|
+
} }, 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) &&
|
336
|
+
Object.keys(cell).includes("description") && (h("div", { class: {
|
337
|
+
["cell-description"]: true,
|
338
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
339
|
+
} }, ((_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"))))))))));
|
321
340
|
};
|
322
341
|
this.createCells = (row, rowIndex) => {
|
323
342
|
var _a;
|
@@ -353,11 +372,15 @@ const DataTable = class {
|
|
353
372
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
354
373
|
["with-overflow"]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element",
|
355
374
|
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, this.isObject(cell) &&
|
356
|
-
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")
|
375
|
+
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"),
|
376
|
+
// eslint-disable-next-line react/jsx-no-bind
|
377
|
+
onClick: cell.actionOnClick
|
378
|
+
? () => this.handleClick(cell.actionOnClick)
|
379
|
+
: undefined }))) : (this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis))));
|
357
380
|
}
|
358
381
|
});
|
359
382
|
};
|
360
|
-
this.createColumnHeaders = () => this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
383
|
+
this.createColumnHeaders = () => (this.columns || []).map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
361
384
|
["column-header"]: true,
|
362
385
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
363
386
|
["updating-state-headers"]: this.updating && !this.loading,
|
@@ -386,6 +409,9 @@ const DataTable = class {
|
|
386
409
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
387
410
|
} }, title)))));
|
388
411
|
this.onRowClick = (row) => {
|
412
|
+
if (!this.loading && !this.updating) {
|
413
|
+
this.icSelectedRowChange.emit(this.selectedRow !== row ? row : null);
|
414
|
+
}
|
389
415
|
this.selectedRow =
|
390
416
|
this.selectedRow !== row && !this.loading && !this.updating && row;
|
391
417
|
};
|
@@ -416,7 +442,7 @@ const DataTable = class {
|
|
416
442
|
// eslint-disable-next-line react/jsx-no-bind
|
417
443
|
onClick: () => this.onRowClick(row), class: {
|
418
444
|
["table-row"]: true,
|
419
|
-
["table-row-selected"]: this.selectedRow === row,
|
445
|
+
["table-row-selected"]: this.highlightSelectedRow && this.selectedRow === row,
|
420
446
|
}
|
421
447
|
}, this.createCells(row, index)));
|
422
448
|
});
|
@@ -486,7 +512,8 @@ const DataTable = class {
|
|
486
512
|
});
|
487
513
|
};
|
488
514
|
this.getTypographyElements = () => {
|
489
|
-
|
515
|
+
// Filter out column headers and cell descriptions
|
516
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text,.cell-description-text)"));
|
490
517
|
};
|
491
518
|
this.getTooltip = (typographyEl) => {
|
492
519
|
return typographyEl.closest(this.TOOLTIP);
|
@@ -497,7 +524,7 @@ const DataTable = class {
|
|
497
524
|
const cellContainer = this.getCellContainer(typographyEl);
|
498
525
|
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
499
526
|
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
500
|
-
typographyEl.setAttribute("style",
|
527
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
501
528
|
return;
|
502
529
|
}
|
503
530
|
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
@@ -506,6 +533,56 @@ const DataTable = class {
|
|
506
533
|
this.updateScrollOffset = () => {
|
507
534
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
508
535
|
};
|
536
|
+
this.updateRowHeightForDescriptions = (rowHeight, cellContainer) => {
|
537
|
+
cellContainer.setAttribute("data-row-height", rowHeight.toString());
|
538
|
+
cellContainer.setAttribute("style", `${this.ROW_HEIGHT_CSS_VARIABLE}: ${rowHeight}px`);
|
539
|
+
};
|
540
|
+
// Method to update the row heights on cells with descriptions and tooltip truncation
|
541
|
+
this.updateCellHeightsWithDescriptions = () => {
|
542
|
+
const descriptions = this.el.shadowRoot.querySelectorAll(this.CELL_DESCRIPTION_STRING);
|
543
|
+
descriptions.forEach((description) => {
|
544
|
+
const cellContainer = description.closest(`.${this.CELL_CONTAINER_WITH_DESCRIPTION_STRING}`);
|
545
|
+
const typography = cellContainer.querySelector(this.IC_TYPOGRAPHY_STRING);
|
546
|
+
const descriptionMarginTop = window
|
547
|
+
.getComputedStyle(description)
|
548
|
+
.getPropertyValue("margin-top");
|
549
|
+
const descriptionHeight = description.clientHeight + parseInt(descriptionMarginTop, 10);
|
550
|
+
if (this.globalRowHeight && this.globalRowHeight !== "auto") {
|
551
|
+
if (!typography.textContent &&
|
552
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight) {
|
553
|
+
this.updateRowHeightForDescriptions(descriptionHeight, cellContainer);
|
554
|
+
}
|
555
|
+
else if (this.truncationPattern === this.TOOLTIP_STRING) {
|
556
|
+
if (descriptionHeight + this.DEFAULT_LINE_HEIGHT >
|
557
|
+
this.globalRowHeight) {
|
558
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
559
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS) && cellIcon) {
|
560
|
+
// recalculate descriptionHeight as when a word break occurs this value changes
|
561
|
+
// Additional spacing given for 300-400% zoom
|
562
|
+
this.updateRowHeightForDescriptions(descriptionHeight +
|
563
|
+
this.DEFAULT_LINE_HEIGHT +
|
564
|
+
cellIcon.clientHeight, cellContainer);
|
565
|
+
}
|
566
|
+
else {
|
567
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
568
|
+
}
|
569
|
+
}
|
570
|
+
this.addLineClampCSS(typography, cellContainer);
|
571
|
+
// Additional case for show/hide truncation for when a description is present, but the text
|
572
|
+
// isn't overflowing the cell to trigger the show more button to appear.
|
573
|
+
}
|
574
|
+
else if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
575
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight &&
|
576
|
+
typography.style.getPropertyValue("--truncation-max-lines") !==
|
577
|
+
"initial") {
|
578
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
579
|
+
if (descriptionHeight) {
|
580
|
+
this.createShowHideTruncation(typography, cellContainer, descriptionHeight);
|
581
|
+
}
|
582
|
+
}
|
583
|
+
}
|
584
|
+
});
|
585
|
+
};
|
509
586
|
this.setTableDimensions = () => {
|
510
587
|
let tableHostDimensions = {};
|
511
588
|
if (this.width) {
|
@@ -522,22 +599,93 @@ const DataTable = class {
|
|
522
599
|
}
|
523
600
|
return tableHostDimensions;
|
524
601
|
};
|
602
|
+
this.fixCellTooltip = (element) => {
|
603
|
+
var _a, _b, _c;
|
604
|
+
let tooltip;
|
605
|
+
if (element.tagName === "IC-TOOLTIP") {
|
606
|
+
tooltip = element;
|
607
|
+
}
|
608
|
+
else if ((_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING)) {
|
609
|
+
tooltip = (_b = element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(this.IC_TOOLTIP_STRING);
|
610
|
+
}
|
611
|
+
else {
|
612
|
+
if (((_c = element.children) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
613
|
+
Array.from(element.children).forEach((el) => {
|
614
|
+
this.fixCellTooltip(el);
|
615
|
+
});
|
616
|
+
}
|
617
|
+
else {
|
618
|
+
return;
|
619
|
+
}
|
620
|
+
}
|
621
|
+
if (tooltip) {
|
622
|
+
tooltip.setExternalPopperProps({
|
623
|
+
strategy: "fixed",
|
624
|
+
});
|
625
|
+
}
|
626
|
+
};
|
525
627
|
this.fixCellTooltips = () => {
|
526
628
|
const elements = this.el.shadowRoot.querySelectorAll(".data-type-element");
|
527
629
|
elements.forEach((element) => {
|
528
630
|
const slotElements = getSlotElements(element);
|
529
|
-
slotElements.forEach((slottedEl) => {
|
530
|
-
|
531
|
-
const tooltipEl = (slottedEl.tagName === "IC-TOOLTIP"
|
532
|
-
? slottedEl
|
533
|
-
: (_a = slottedEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
534
|
-
if (tooltipEl) {
|
535
|
-
tooltipEl.setExternalPopperProps({
|
536
|
-
strategy: "fixed",
|
537
|
-
});
|
538
|
-
}
|
631
|
+
slotElements === null || slotElements === void 0 ? void 0 : slotElements.forEach((slottedEl) => {
|
632
|
+
this.fixCellTooltip(slottedEl);
|
539
633
|
});
|
540
634
|
});
|
635
|
+
const actionElements = this.el.shadowRoot.querySelectorAll(".action-element");
|
636
|
+
actionElements === null || actionElements === void 0 ? void 0 : actionElements.forEach((actionElementSpan) => {
|
637
|
+
const actionElement = actionElementSpan.firstChild;
|
638
|
+
if (actionElement) {
|
639
|
+
this.fixCellTooltip(actionElement);
|
640
|
+
}
|
641
|
+
});
|
642
|
+
};
|
643
|
+
this.handleClick = (callback) => callback();
|
644
|
+
this.renderTableBody = (data, loading, overlay) => {
|
645
|
+
if (!(data === null || data === void 0 ? void 0 : data.length))
|
646
|
+
return;
|
647
|
+
if (overlay && loading) {
|
648
|
+
return h("tbody", null, this.createRows());
|
649
|
+
}
|
650
|
+
else if (loading && !overlay) {
|
651
|
+
return null;
|
652
|
+
}
|
653
|
+
else {
|
654
|
+
return h("tbody", null, this.createRows());
|
655
|
+
}
|
656
|
+
};
|
657
|
+
this.renderLoadingIndicator = (isLoading, loadingOptions) => {
|
658
|
+
if (!isLoading)
|
659
|
+
return null;
|
660
|
+
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: {
|
661
|
+
"loading-empty": isLoading,
|
662
|
+
loading: true,
|
663
|
+
"show-background": loadingOptions.showBackground || loadingOptions.overlay,
|
664
|
+
}, 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) })));
|
665
|
+
};
|
666
|
+
this.renderAriaLiveLoading = () => {
|
667
|
+
var _a, _b;
|
668
|
+
if (this.loading) {
|
669
|
+
return ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.label) || "Loading...";
|
670
|
+
}
|
671
|
+
else if (this.updating) {
|
672
|
+
return ((_b = this.updatingOptions) === null || _b === void 0 ? void 0 : _b.description) || "Updating table data";
|
673
|
+
}
|
674
|
+
else {
|
675
|
+
return "";
|
676
|
+
}
|
677
|
+
};
|
678
|
+
this.renderEmptyState = (data, loading, overlay) => {
|
679
|
+
const emptyStateEl = isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" }));
|
680
|
+
if (loading && !(data === null || data === void 0 ? void 0 : data.length) && overlay) {
|
681
|
+
return emptyStateEl;
|
682
|
+
}
|
683
|
+
else if (!loading && !(data === null || data === void 0 ? void 0 : data.length)) {
|
684
|
+
return emptyStateEl;
|
685
|
+
}
|
686
|
+
else {
|
687
|
+
return null;
|
688
|
+
}
|
541
689
|
};
|
542
690
|
this.fromRow = 0;
|
543
691
|
this.previousRowsPerPage = undefined;
|
@@ -558,6 +706,7 @@ const DataTable = class {
|
|
558
706
|
this.embedded = false;
|
559
707
|
this.globalRowHeight = "auto";
|
560
708
|
this.height = undefined;
|
709
|
+
this.highlightSelectedRow = true;
|
561
710
|
this.hideColumnHeaders = false;
|
562
711
|
this.loading = false;
|
563
712
|
this.loadingOptions = undefined;
|
@@ -580,6 +729,7 @@ const DataTable = class {
|
|
580
729
|
hideRangeLabel: false,
|
581
730
|
hideAllFromItemsPerPage: false,
|
582
731
|
monochrome: false,
|
732
|
+
setToFirstPageOnPaginationChange: false,
|
583
733
|
};
|
584
734
|
this.showPagination = false;
|
585
735
|
this.sortable = false;
|
@@ -617,13 +767,13 @@ const DataTable = class {
|
|
617
767
|
(_b = this.headerResizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
618
768
|
}
|
619
769
|
componentWillLoad() {
|
620
|
-
var _a;
|
770
|
+
var _a, _b;
|
621
771
|
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
622
772
|
this.previousRowsPerPage = this.rowsPerPage;
|
623
773
|
this.toRow = this.rowsPerPage;
|
624
774
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
625
775
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
626
|
-
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
776
|
+
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) });
|
627
777
|
this.initialLoad = true;
|
628
778
|
this.previousItemsPerPage = this.rowsPerPage;
|
629
779
|
}
|
@@ -654,6 +804,7 @@ const DataTable = class {
|
|
654
804
|
if (this.globalRowHeight !== "auto") {
|
655
805
|
this.updateSetRowHeight();
|
656
806
|
}
|
807
|
+
window.addEventListener("resize", this.updateCellHeightsWithDescriptions);
|
657
808
|
}
|
658
809
|
componentDidUpdate() {
|
659
810
|
// truncation updates invoked here once new/updated data has
|
@@ -665,6 +816,7 @@ const DataTable = class {
|
|
665
816
|
}
|
666
817
|
componentDidRender() {
|
667
818
|
this.fixCellTooltips();
|
819
|
+
this.updateCellHeightsWithDescriptions();
|
668
820
|
this.adjustWidthForActionElement();
|
669
821
|
}
|
670
822
|
truncateUpdatedData() {
|
@@ -723,7 +875,7 @@ const DataTable = class {
|
|
723
875
|
cellContainer.style.height = null;
|
724
876
|
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
725
877
|
this.removeTooltip(cellContainer, typographyEl, tooltipEl);
|
726
|
-
typographyEl.setAttribute("style",
|
878
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
727
879
|
}
|
728
880
|
else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
729
881
|
this.resetShowHideTruncation(typographyEl);
|
@@ -734,7 +886,8 @@ const DataTable = class {
|
|
734
886
|
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
735
887
|
// If the set row height is bigger than the cell container even
|
736
888
|
// with textWrap, set the row height
|
737
|
-
if (!
|
889
|
+
if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
890
|
+
!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
|
738
891
|
rowHeight > cellContainer.clientHeight &&
|
739
892
|
!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
740
893
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -767,7 +920,7 @@ const DataTable = class {
|
|
767
920
|
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
768
921
|
newRows.forEach((row) => {
|
769
922
|
row
|
770
|
-
.querySelectorAll(
|
923
|
+
.querySelectorAll(this.IC_TYPOGRAPHY_STRING)
|
771
924
|
.forEach((typographyEl) => {
|
772
925
|
const cellContainer = this.getCellContainer(typographyEl);
|
773
926
|
const tooltipEl = this.getTooltip(typographyEl);
|
@@ -829,9 +982,17 @@ const DataTable = class {
|
|
829
982
|
}
|
830
983
|
}
|
831
984
|
}
|
832
|
-
createShowHideTruncation(typographyEl, cellContainer) {
|
985
|
+
createShowHideTruncation(typographyEl, cellContainer, descriptionHeight) {
|
833
986
|
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
834
987
|
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
988
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
989
|
+
descriptionHeight) {
|
990
|
+
typographyEl.setAttribute("max-lines", `${Math.floor(((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - descriptionHeight) /
|
991
|
+
this.DEFAULT_LINE_HEIGHT)}`);
|
992
|
+
}
|
993
|
+
else {
|
994
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
995
|
+
}
|
835
996
|
typographyEl.setShowHideExpanded(false);
|
836
997
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
837
998
|
}
|
@@ -938,7 +1099,8 @@ const DataTable = class {
|
|
938
1099
|
this.truncationPatternUpdated = true;
|
939
1100
|
}
|
940
1101
|
async dataHandler(newData) {
|
941
|
-
|
1102
|
+
var _a;
|
1103
|
+
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) });
|
942
1104
|
if (this.loading) {
|
943
1105
|
!this.hasLoadedForOneSecond
|
944
1106
|
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
@@ -965,7 +1127,7 @@ const DataTable = class {
|
|
965
1127
|
typographyEl.setShowHideExpanded(false);
|
966
1128
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
967
1129
|
}
|
968
|
-
else {
|
1130
|
+
else if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)) {
|
969
1131
|
typographyEl.resetTruncation().then(() => {
|
970
1132
|
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
971
1133
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -1001,8 +1163,11 @@ const DataTable = class {
|
|
1001
1163
|
this.variableRowHeight = null;
|
1002
1164
|
}
|
1003
1165
|
showLoadingIndicator() {
|
1004
|
-
var _a;
|
1005
|
-
(_a = this.
|
1166
|
+
var _a, _b, _c;
|
1167
|
+
if ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.overlay) {
|
1168
|
+
(_b = this.loadingOverlay) === null || _b === void 0 ? void 0 : _b.classList.add("show");
|
1169
|
+
}
|
1170
|
+
(_c = this.loadingIndicator) === null || _c === void 0 ? void 0 : _c.classList.add("show");
|
1006
1171
|
}
|
1007
1172
|
getRowOptions(rowKeys, rowValues) {
|
1008
1173
|
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
@@ -1031,20 +1196,41 @@ const DataTable = class {
|
|
1031
1196
|
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
1032
1197
|
this.truncationPattern === this.TOOLTIP_STRING) {
|
1033
1198
|
if (!typographyEl.getAttribute("style") ||
|
1034
|
-
typographyEl.style.cssText.includes(
|
1199
|
+
typographyEl.style.cssText.includes(`${this.LINE_CLAMP_CSS_VARIABLE}: 0;`)) {
|
1035
1200
|
this.addLineClampCSS(typographyEl, cellContainer);
|
1036
1201
|
}
|
1037
|
-
this.
|
1202
|
+
if (!cellContainer.querySelector(this.IC_TOOLTIP_STRING))
|
1203
|
+
this.createTruncationTooltip(typographyEl, cellContainer);
|
1038
1204
|
}
|
1039
1205
|
}
|
1040
1206
|
removeTooltip(cellContainer, typographyEl, tooltip) {
|
1041
|
-
cellContainer.
|
1207
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1208
|
+
cellTextWrapper.prepend(typographyEl);
|
1042
1209
|
if (tooltip) {
|
1043
1210
|
tooltip.remove();
|
1044
1211
|
}
|
1045
1212
|
}
|
1046
1213
|
addLineClampCSS(typographyEl, cellContainer) {
|
1047
|
-
|
1214
|
+
var _a, _b;
|
1215
|
+
const descriptionCellHeight = (_a = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
1216
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
1217
|
+
(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > descriptionCellHeight) {
|
1218
|
+
let iconHeight;
|
1219
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS)) {
|
1220
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
1221
|
+
iconHeight = cellIcon ? cellIcon.clientHeight : 0;
|
1222
|
+
}
|
1223
|
+
else {
|
1224
|
+
iconHeight = 0;
|
1225
|
+
}
|
1226
|
+
const height = (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) -
|
1227
|
+
((_b = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _b === void 0 ? void 0 : _b.clientHeight) -
|
1228
|
+
iconHeight;
|
1229
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(height || 0)}`);
|
1230
|
+
}
|
1231
|
+
else {
|
1232
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
|
1233
|
+
}
|
1048
1234
|
}
|
1049
1235
|
createTruncationTooltip(typographyEl, cellContainer) {
|
1050
1236
|
const tooltipEl = document.createElement(this.IC_TOOLTIP_STRING);
|
@@ -1055,12 +1241,13 @@ const DataTable = class {
|
|
1055
1241
|
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
1056
1242
|
strategy: "fixed",
|
1057
1243
|
});
|
1058
|
-
cellContainer.
|
1059
|
-
|
1244
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1245
|
+
cellTextWrapper.prepend(tooltipEl);
|
1246
|
+
tooltipEl.prepend(typographyEl);
|
1060
1247
|
}
|
1061
1248
|
render() {
|
1062
1249
|
var _a;
|
1063
|
-
const { caption, createColumnHeaders,
|
1250
|
+
const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, theme, } = this;
|
1064
1251
|
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: {
|
1065
1252
|
["table-row-container"]: true,
|
1066
1253
|
scrollable,
|
@@ -1071,13 +1258,7 @@ const DataTable = class {
|
|
1071
1258
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
1072
1259
|
} }, h("tr", null, createColumnHeaders()))), updating &&
|
1073
1260
|
!loading &&
|
1074
|
-
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data
|
1075
|
-
!loading &&
|
1076
|
-
(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: {
|
1077
|
-
"loading-empty": loading,
|
1078
|
-
loading: true,
|
1079
|
-
"show-background": loadingOptions.showBackground,
|
1080
|
-
}, 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
|
1261
|
+
(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
|
1081
1262
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
1082
1263
|
: "table unsorted")))));
|
1083
1264
|
}
|