@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
@@ -4,7 +4,8 @@ import unsortedIcon from "./assets/unsorted-icon.svg";
|
|
4
4
|
import ascendingIcon from "./assets/ascending-icon.svg";
|
5
5
|
import descendingIcon from "./assets/descending-icon.svg";
|
6
6
|
// Unable to import helper functions via @ukic/web-components
|
7
|
-
import { isEmptyString, isSlotUsed, pxToRem, addDataToPosition, dynamicDebounce, getSlotElements, checkResizeObserver, } from "../../utils/helpers";
|
7
|
+
import { isEmptyString, isSlotUsed, pxToRem, addDataToPosition, dynamicDebounce, getSlotElements, checkResizeObserver, deviceSizeMatches, } from "../../utils/helpers";
|
8
|
+
import { IC_DEVICE_SIZES } from "../../utils/constants";
|
8
9
|
/**
|
9
10
|
* @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.
|
10
11
|
* @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.
|
@@ -44,6 +45,7 @@ export class DataTable {
|
|
44
45
|
this.itemsPerPageChange = false;
|
45
46
|
this.DATA_ROW_HEIGHT_STRING = "data-row-height";
|
46
47
|
this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
|
48
|
+
this.LINE_CLAMP_CSS_VARIABLE = "--ic-line-clamp";
|
47
49
|
this.DEFAULT_LINE_HEIGHT = 24;
|
48
50
|
this.densityUpdate = false;
|
49
51
|
this.truncationPatternUpdated = false;
|
@@ -51,6 +53,10 @@ export class DataTable {
|
|
51
53
|
this.headerResizeObserver = null;
|
52
54
|
this.IC_TOOLTIP_STRING = "ic-tooltip";
|
53
55
|
this.SHOW_TRUNC_TOOLTIP_STRING = "show-trunc-tooltip";
|
56
|
+
this.CELL_DESCRIPTION_STRING = ".cell-description";
|
57
|
+
this.CELL_CONTAINER_WITH_DESCRIPTION_STRING = "cell-container-with-description";
|
58
|
+
this.CELL_TEXT_WRAPPER_STRING = ".cell-text-wrapper";
|
59
|
+
this.IC_TYPOGRAPHY_STRING = "ic-typography";
|
54
60
|
this.runHeaderResizeObserver = () => {
|
55
61
|
this.headerResizeObserver = new ResizeObserver(() => {
|
56
62
|
this.headerResizeCallback();
|
@@ -64,7 +70,7 @@ export class DataTable {
|
|
64
70
|
const headers = this.el.shadowRoot.querySelectorAll("th.column-header");
|
65
71
|
headers.forEach((header) => {
|
66
72
|
const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);
|
67
|
-
const typographyEls = header.querySelectorAll(
|
73
|
+
const typographyEls = header.querySelectorAll(this.IC_TYPOGRAPHY_STRING);
|
68
74
|
if (tooltip && typographyEls && typographyEls.length === 2) {
|
69
75
|
tooltip.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);
|
70
76
|
if (typographyEls[1].clientWidth > typographyEls[0].clientWidth) {
|
@@ -132,8 +138,9 @@ export class DataTable {
|
|
132
138
|
}
|
133
139
|
else {
|
134
140
|
if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
|
135
|
-
typographyEl.setAttribute("style",
|
136
|
-
cellContainer.
|
141
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
142
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
143
|
+
cellTextWrapper.prepend(typographyEl);
|
137
144
|
tooltip.remove();
|
138
145
|
}
|
139
146
|
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
@@ -285,11 +292,11 @@ export class DataTable {
|
|
285
292
|
});
|
286
293
|
};
|
287
294
|
this.createCellContent = (columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis) => {
|
288
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
295
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
289
296
|
return (h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
290
297
|
!isSlotUsed(this.el, cellSlotName)
|
291
298
|
? cell
|
292
|
-
: 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) ||
|
299
|
+
: 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) ||
|
293
300
|
((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
294
301
|
rowAlignment ||
|
295
302
|
this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
|
@@ -305,13 +312,25 @@ export class DataTable {
|
|
305
312
|
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
306
313
|
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
307
314
|
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
308
|
-
!!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
|
315
|
+
!!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
|
309
316
|
? this.setRowHeight(currentRowHeight)
|
310
317
|
: 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)) &&
|
311
318
|
(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" &&
|
312
|
-
!isSlotUsed(this.el, cellSlotName) && (h("
|
319
|
+
!isSlotUsed(this.el, cellSlotName) && (h("div", { class: {
|
320
|
+
"cell-text-wrapper": true,
|
321
|
+
"cell-text-no-wrap": !this.truncationPattern,
|
322
|
+
} }, h("ic-typography", { variant: "body", class: {
|
323
|
+
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
324
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
325
|
+
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
326
|
+
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
327
|
+
!!rowEmphasis,
|
313
328
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
314
|
-
} }, 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))))
|
329
|
+
} }, 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) &&
|
330
|
+
Object.keys(cell).includes("description") && (h("div", { class: {
|
331
|
+
["cell-description"]: true,
|
332
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
333
|
+
} }, ((_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"))))))))));
|
315
334
|
};
|
316
335
|
this.createCells = (row, rowIndex) => {
|
317
336
|
var _a;
|
@@ -347,11 +366,15 @@ export class DataTable {
|
|
347
366
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
348
367
|
["with-overflow"]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element",
|
349
368
|
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, this.isObject(cell) &&
|
350
|
-
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")
|
369
|
+
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"),
|
370
|
+
// eslint-disable-next-line react/jsx-no-bind
|
371
|
+
onClick: cell.actionOnClick
|
372
|
+
? () => this.handleClick(cell.actionOnClick)
|
373
|
+
: undefined }))) : (this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis))));
|
351
374
|
}
|
352
375
|
});
|
353
376
|
};
|
354
|
-
this.createColumnHeaders = () => this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
377
|
+
this.createColumnHeaders = () => (this.columns || []).map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
355
378
|
["column-header"]: true,
|
356
379
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
357
380
|
["updating-state-headers"]: this.updating && !this.loading,
|
@@ -380,6 +403,9 @@ export class DataTable {
|
|
380
403
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
381
404
|
} }, title)))));
|
382
405
|
this.onRowClick = (row) => {
|
406
|
+
if (!this.loading && !this.updating) {
|
407
|
+
this.icSelectedRowChange.emit(this.selectedRow !== row ? row : null);
|
408
|
+
}
|
383
409
|
this.selectedRow =
|
384
410
|
this.selectedRow !== row && !this.loading && !this.updating && row;
|
385
411
|
};
|
@@ -410,7 +436,7 @@ export class DataTable {
|
|
410
436
|
// eslint-disable-next-line react/jsx-no-bind
|
411
437
|
onClick: () => this.onRowClick(row), class: {
|
412
438
|
["table-row"]: true,
|
413
|
-
["table-row-selected"]: this.selectedRow === row,
|
439
|
+
["table-row-selected"]: this.highlightSelectedRow && this.selectedRow === row,
|
414
440
|
}
|
415
441
|
}, this.createCells(row, index)));
|
416
442
|
});
|
@@ -480,7 +506,8 @@ export class DataTable {
|
|
480
506
|
});
|
481
507
|
};
|
482
508
|
this.getTypographyElements = () => {
|
483
|
-
|
509
|
+
// Filter out column headers and cell descriptions
|
510
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text,.cell-description-text)"));
|
484
511
|
};
|
485
512
|
this.getTooltip = (typographyEl) => {
|
486
513
|
return typographyEl.closest(this.TOOLTIP);
|
@@ -491,7 +518,7 @@ export class DataTable {
|
|
491
518
|
const cellContainer = this.getCellContainer(typographyEl);
|
492
519
|
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
493
520
|
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
494
|
-
typographyEl.setAttribute("style",
|
521
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
495
522
|
return;
|
496
523
|
}
|
497
524
|
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
@@ -500,6 +527,56 @@ export class DataTable {
|
|
500
527
|
this.updateScrollOffset = () => {
|
501
528
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
502
529
|
};
|
530
|
+
this.updateRowHeightForDescriptions = (rowHeight, cellContainer) => {
|
531
|
+
cellContainer.setAttribute("data-row-height", rowHeight.toString());
|
532
|
+
cellContainer.setAttribute("style", `${this.ROW_HEIGHT_CSS_VARIABLE}: ${rowHeight}px`);
|
533
|
+
};
|
534
|
+
// Method to update the row heights on cells with descriptions and tooltip truncation
|
535
|
+
this.updateCellHeightsWithDescriptions = () => {
|
536
|
+
const descriptions = this.el.shadowRoot.querySelectorAll(this.CELL_DESCRIPTION_STRING);
|
537
|
+
descriptions.forEach((description) => {
|
538
|
+
const cellContainer = description.closest(`.${this.CELL_CONTAINER_WITH_DESCRIPTION_STRING}`);
|
539
|
+
const typography = cellContainer.querySelector(this.IC_TYPOGRAPHY_STRING);
|
540
|
+
const descriptionMarginTop = window
|
541
|
+
.getComputedStyle(description)
|
542
|
+
.getPropertyValue("margin-top");
|
543
|
+
const descriptionHeight = description.clientHeight + parseInt(descriptionMarginTop, 10);
|
544
|
+
if (this.globalRowHeight && this.globalRowHeight !== "auto") {
|
545
|
+
if (!typography.textContent &&
|
546
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight) {
|
547
|
+
this.updateRowHeightForDescriptions(descriptionHeight, cellContainer);
|
548
|
+
}
|
549
|
+
else if (this.truncationPattern === this.TOOLTIP_STRING) {
|
550
|
+
if (descriptionHeight + this.DEFAULT_LINE_HEIGHT >
|
551
|
+
this.globalRowHeight) {
|
552
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
553
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS) && cellIcon) {
|
554
|
+
// recalculate descriptionHeight as when a word break occurs this value changes
|
555
|
+
// Additional spacing given for 300-400% zoom
|
556
|
+
this.updateRowHeightForDescriptions(descriptionHeight +
|
557
|
+
this.DEFAULT_LINE_HEIGHT +
|
558
|
+
cellIcon.clientHeight, cellContainer);
|
559
|
+
}
|
560
|
+
else {
|
561
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
562
|
+
}
|
563
|
+
}
|
564
|
+
this.addLineClampCSS(typography, cellContainer);
|
565
|
+
// Additional case for show/hide truncation for when a description is present, but the text
|
566
|
+
// isn't overflowing the cell to trigger the show more button to appear.
|
567
|
+
}
|
568
|
+
else if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
569
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight &&
|
570
|
+
typography.style.getPropertyValue("--truncation-max-lines") !==
|
571
|
+
"initial") {
|
572
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
573
|
+
if (descriptionHeight) {
|
574
|
+
this.createShowHideTruncation(typography, cellContainer, descriptionHeight);
|
575
|
+
}
|
576
|
+
}
|
577
|
+
}
|
578
|
+
});
|
579
|
+
};
|
503
580
|
this.setTableDimensions = () => {
|
504
581
|
let tableHostDimensions = {};
|
505
582
|
if (this.width) {
|
@@ -516,22 +593,93 @@ export class DataTable {
|
|
516
593
|
}
|
517
594
|
return tableHostDimensions;
|
518
595
|
};
|
596
|
+
this.fixCellTooltip = (element) => {
|
597
|
+
var _a, _b, _c;
|
598
|
+
let tooltip;
|
599
|
+
if (element.tagName === "IC-TOOLTIP") {
|
600
|
+
tooltip = element;
|
601
|
+
}
|
602
|
+
else if ((_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING)) {
|
603
|
+
tooltip = (_b = element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(this.IC_TOOLTIP_STRING);
|
604
|
+
}
|
605
|
+
else {
|
606
|
+
if (((_c = element.children) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
607
|
+
Array.from(element.children).forEach((el) => {
|
608
|
+
this.fixCellTooltip(el);
|
609
|
+
});
|
610
|
+
}
|
611
|
+
else {
|
612
|
+
return;
|
613
|
+
}
|
614
|
+
}
|
615
|
+
if (tooltip) {
|
616
|
+
tooltip.setExternalPopperProps({
|
617
|
+
strategy: "fixed",
|
618
|
+
});
|
619
|
+
}
|
620
|
+
};
|
519
621
|
this.fixCellTooltips = () => {
|
520
622
|
const elements = this.el.shadowRoot.querySelectorAll(".data-type-element");
|
521
623
|
elements.forEach((element) => {
|
522
624
|
const slotElements = getSlotElements(element);
|
523
|
-
slotElements.forEach((slottedEl) => {
|
524
|
-
|
525
|
-
const tooltipEl = (slottedEl.tagName === "IC-TOOLTIP"
|
526
|
-
? slottedEl
|
527
|
-
: (_a = slottedEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
528
|
-
if (tooltipEl) {
|
529
|
-
tooltipEl.setExternalPopperProps({
|
530
|
-
strategy: "fixed",
|
531
|
-
});
|
532
|
-
}
|
625
|
+
slotElements === null || slotElements === void 0 ? void 0 : slotElements.forEach((slottedEl) => {
|
626
|
+
this.fixCellTooltip(slottedEl);
|
533
627
|
});
|
534
628
|
});
|
629
|
+
const actionElements = this.el.shadowRoot.querySelectorAll(".action-element");
|
630
|
+
actionElements === null || actionElements === void 0 ? void 0 : actionElements.forEach((actionElementSpan) => {
|
631
|
+
const actionElement = actionElementSpan.firstChild;
|
632
|
+
if (actionElement) {
|
633
|
+
this.fixCellTooltip(actionElement);
|
634
|
+
}
|
635
|
+
});
|
636
|
+
};
|
637
|
+
this.handleClick = (callback) => callback();
|
638
|
+
this.renderTableBody = (data, loading, overlay) => {
|
639
|
+
if (!(data === null || data === void 0 ? void 0 : data.length))
|
640
|
+
return;
|
641
|
+
if (overlay && loading) {
|
642
|
+
return h("tbody", null, this.createRows());
|
643
|
+
}
|
644
|
+
else if (loading && !overlay) {
|
645
|
+
return null;
|
646
|
+
}
|
647
|
+
else {
|
648
|
+
return h("tbody", null, this.createRows());
|
649
|
+
}
|
650
|
+
};
|
651
|
+
this.renderLoadingIndicator = (isLoading, loadingOptions) => {
|
652
|
+
if (!isLoading)
|
653
|
+
return null;
|
654
|
+
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: {
|
655
|
+
"loading-empty": isLoading,
|
656
|
+
loading: true,
|
657
|
+
"show-background": loadingOptions.showBackground || loadingOptions.overlay,
|
658
|
+
}, 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) })));
|
659
|
+
};
|
660
|
+
this.renderAriaLiveLoading = () => {
|
661
|
+
var _a, _b;
|
662
|
+
if (this.loading) {
|
663
|
+
return ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.label) || "Loading...";
|
664
|
+
}
|
665
|
+
else if (this.updating) {
|
666
|
+
return ((_b = this.updatingOptions) === null || _b === void 0 ? void 0 : _b.description) || "Updating table data";
|
667
|
+
}
|
668
|
+
else {
|
669
|
+
return "";
|
670
|
+
}
|
671
|
+
};
|
672
|
+
this.renderEmptyState = (data, loading, overlay) => {
|
673
|
+
const emptyStateEl = isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" }));
|
674
|
+
if (loading && !(data === null || data === void 0 ? void 0 : data.length) && overlay) {
|
675
|
+
return emptyStateEl;
|
676
|
+
}
|
677
|
+
else if (!loading && !(data === null || data === void 0 ? void 0 : data.length)) {
|
678
|
+
return emptyStateEl;
|
679
|
+
}
|
680
|
+
else {
|
681
|
+
return null;
|
682
|
+
}
|
535
683
|
};
|
536
684
|
this.fromRow = 0;
|
537
685
|
this.previousRowsPerPage = undefined;
|
@@ -552,6 +700,7 @@ export class DataTable {
|
|
552
700
|
this.embedded = false;
|
553
701
|
this.globalRowHeight = "auto";
|
554
702
|
this.height = undefined;
|
703
|
+
this.highlightSelectedRow = true;
|
555
704
|
this.hideColumnHeaders = false;
|
556
705
|
this.loading = false;
|
557
706
|
this.loadingOptions = undefined;
|
@@ -574,6 +723,7 @@ export class DataTable {
|
|
574
723
|
hideRangeLabel: false,
|
575
724
|
hideAllFromItemsPerPage: false,
|
576
725
|
monochrome: false,
|
726
|
+
setToFirstPageOnPaginationChange: false,
|
577
727
|
};
|
578
728
|
this.showPagination = false;
|
579
729
|
this.sortable = false;
|
@@ -611,13 +761,13 @@ export class DataTable {
|
|
611
761
|
(_b = this.headerResizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
612
762
|
}
|
613
763
|
componentWillLoad() {
|
614
|
-
var _a;
|
764
|
+
var _a, _b;
|
615
765
|
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
616
766
|
this.previousRowsPerPage = this.rowsPerPage;
|
617
767
|
this.toRow = this.rowsPerPage;
|
618
768
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
619
769
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
620
|
-
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
770
|
+
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) });
|
621
771
|
this.initialLoad = true;
|
622
772
|
this.previousItemsPerPage = this.rowsPerPage;
|
623
773
|
}
|
@@ -648,6 +798,7 @@ export class DataTable {
|
|
648
798
|
if (this.globalRowHeight !== "auto") {
|
649
799
|
this.updateSetRowHeight();
|
650
800
|
}
|
801
|
+
window.addEventListener("resize", this.updateCellHeightsWithDescriptions);
|
651
802
|
}
|
652
803
|
componentDidUpdate() {
|
653
804
|
// truncation updates invoked here once new/updated data has
|
@@ -659,6 +810,7 @@ export class DataTable {
|
|
659
810
|
}
|
660
811
|
componentDidRender() {
|
661
812
|
this.fixCellTooltips();
|
813
|
+
this.updateCellHeightsWithDescriptions();
|
662
814
|
this.adjustWidthForActionElement();
|
663
815
|
}
|
664
816
|
truncateUpdatedData() {
|
@@ -717,7 +869,7 @@ export class DataTable {
|
|
717
869
|
cellContainer.style.height = null;
|
718
870
|
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
719
871
|
this.removeTooltip(cellContainer, typographyEl, tooltipEl);
|
720
|
-
typographyEl.setAttribute("style",
|
872
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
721
873
|
}
|
722
874
|
else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
723
875
|
this.resetShowHideTruncation(typographyEl);
|
@@ -728,7 +880,8 @@ export class DataTable {
|
|
728
880
|
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
729
881
|
// If the set row height is bigger than the cell container even
|
730
882
|
// with textWrap, set the row height
|
731
|
-
if (!
|
883
|
+
if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
884
|
+
!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
|
732
885
|
rowHeight > cellContainer.clientHeight &&
|
733
886
|
!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
734
887
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -761,7 +914,7 @@ export class DataTable {
|
|
761
914
|
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
762
915
|
newRows.forEach((row) => {
|
763
916
|
row
|
764
|
-
.querySelectorAll(
|
917
|
+
.querySelectorAll(this.IC_TYPOGRAPHY_STRING)
|
765
918
|
.forEach((typographyEl) => {
|
766
919
|
const cellContainer = this.getCellContainer(typographyEl);
|
767
920
|
const tooltipEl = this.getTooltip(typographyEl);
|
@@ -823,9 +976,17 @@ export class DataTable {
|
|
823
976
|
}
|
824
977
|
}
|
825
978
|
}
|
826
|
-
createShowHideTruncation(typographyEl, cellContainer) {
|
979
|
+
createShowHideTruncation(typographyEl, cellContainer, descriptionHeight) {
|
827
980
|
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
828
981
|
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
982
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
983
|
+
descriptionHeight) {
|
984
|
+
typographyEl.setAttribute("max-lines", `${Math.floor(((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - descriptionHeight) /
|
985
|
+
this.DEFAULT_LINE_HEIGHT)}`);
|
986
|
+
}
|
987
|
+
else {
|
988
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
989
|
+
}
|
829
990
|
typographyEl.setShowHideExpanded(false);
|
830
991
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
831
992
|
}
|
@@ -932,7 +1093,8 @@ export class DataTable {
|
|
932
1093
|
this.truncationPatternUpdated = true;
|
933
1094
|
}
|
934
1095
|
async dataHandler(newData) {
|
935
|
-
|
1096
|
+
var _a;
|
1097
|
+
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) });
|
936
1098
|
if (this.loading) {
|
937
1099
|
!this.hasLoadedForOneSecond
|
938
1100
|
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
@@ -959,7 +1121,7 @@ export class DataTable {
|
|
959
1121
|
typographyEl.setShowHideExpanded(false);
|
960
1122
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
961
1123
|
}
|
962
|
-
else {
|
1124
|
+
else if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)) {
|
963
1125
|
typographyEl.resetTruncation().then(() => {
|
964
1126
|
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
965
1127
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -995,8 +1157,11 @@ export class DataTable {
|
|
995
1157
|
this.variableRowHeight = null;
|
996
1158
|
}
|
997
1159
|
showLoadingIndicator() {
|
998
|
-
var _a;
|
999
|
-
(_a = this.
|
1160
|
+
var _a, _b, _c;
|
1161
|
+
if ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.overlay) {
|
1162
|
+
(_b = this.loadingOverlay) === null || _b === void 0 ? void 0 : _b.classList.add("show");
|
1163
|
+
}
|
1164
|
+
(_c = this.loadingIndicator) === null || _c === void 0 ? void 0 : _c.classList.add("show");
|
1000
1165
|
}
|
1001
1166
|
getRowOptions(rowKeys, rowValues) {
|
1002
1167
|
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
@@ -1025,20 +1190,41 @@ export class DataTable {
|
|
1025
1190
|
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
1026
1191
|
this.truncationPattern === this.TOOLTIP_STRING) {
|
1027
1192
|
if (!typographyEl.getAttribute("style") ||
|
1028
|
-
typographyEl.style.cssText.includes(
|
1193
|
+
typographyEl.style.cssText.includes(`${this.LINE_CLAMP_CSS_VARIABLE}: 0;`)) {
|
1029
1194
|
this.addLineClampCSS(typographyEl, cellContainer);
|
1030
1195
|
}
|
1031
|
-
this.
|
1196
|
+
if (!cellContainer.querySelector(this.IC_TOOLTIP_STRING))
|
1197
|
+
this.createTruncationTooltip(typographyEl, cellContainer);
|
1032
1198
|
}
|
1033
1199
|
}
|
1034
1200
|
removeTooltip(cellContainer, typographyEl, tooltip) {
|
1035
|
-
cellContainer.
|
1201
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1202
|
+
cellTextWrapper.prepend(typographyEl);
|
1036
1203
|
if (tooltip) {
|
1037
1204
|
tooltip.remove();
|
1038
1205
|
}
|
1039
1206
|
}
|
1040
1207
|
addLineClampCSS(typographyEl, cellContainer) {
|
1041
|
-
|
1208
|
+
var _a, _b;
|
1209
|
+
const descriptionCellHeight = (_a = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
1210
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
1211
|
+
(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > descriptionCellHeight) {
|
1212
|
+
let iconHeight;
|
1213
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS)) {
|
1214
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
1215
|
+
iconHeight = cellIcon ? cellIcon.clientHeight : 0;
|
1216
|
+
}
|
1217
|
+
else {
|
1218
|
+
iconHeight = 0;
|
1219
|
+
}
|
1220
|
+
const height = (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) -
|
1221
|
+
((_b = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _b === void 0 ? void 0 : _b.clientHeight) -
|
1222
|
+
iconHeight;
|
1223
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(height || 0)}`);
|
1224
|
+
}
|
1225
|
+
else {
|
1226
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
|
1227
|
+
}
|
1042
1228
|
}
|
1043
1229
|
createTruncationTooltip(typographyEl, cellContainer) {
|
1044
1230
|
const tooltipEl = document.createElement(this.IC_TOOLTIP_STRING);
|
@@ -1049,12 +1235,13 @@ export class DataTable {
|
|
1049
1235
|
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
1050
1236
|
strategy: "fixed",
|
1051
1237
|
});
|
1052
|
-
cellContainer.
|
1053
|
-
|
1238
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1239
|
+
cellTextWrapper.prepend(tooltipEl);
|
1240
|
+
tooltipEl.prepend(typographyEl);
|
1054
1241
|
}
|
1055
1242
|
render() {
|
1056
1243
|
var _a;
|
1057
|
-
const { caption, createColumnHeaders,
|
1244
|
+
const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, theme, } = this;
|
1058
1245
|
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: {
|
1059
1246
|
["table-row-container"]: true,
|
1060
1247
|
scrollable,
|
@@ -1065,13 +1252,7 @@ export class DataTable {
|
|
1065
1252
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
1066
1253
|
} }, h("tr", null, createColumnHeaders()))), updating &&
|
1067
1254
|
!loading &&
|
1068
|
-
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data
|
1069
|
-
!loading &&
|
1070
|
-
(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: {
|
1071
|
-
"loading-empty": loading,
|
1072
|
-
loading: true,
|
1073
|
-
"show-background": loadingOptions.showBackground,
|
1074
|
-
}, 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
|
1255
|
+
(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
|
1075
1256
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
1076
1257
|
: "table unsorted")))));
|
1077
1258
|
}
|
@@ -1249,6 +1430,24 @@ export class DataTable {
|
|
1249
1430
|
"attribute": "height",
|
1250
1431
|
"reflect": false
|
1251
1432
|
},
|
1433
|
+
"highlightSelectedRow": {
|
1434
|
+
"type": "boolean",
|
1435
|
+
"mutable": false,
|
1436
|
+
"complexType": {
|
1437
|
+
"original": "boolean",
|
1438
|
+
"resolved": "boolean",
|
1439
|
+
"references": {}
|
1440
|
+
},
|
1441
|
+
"required": false,
|
1442
|
+
"optional": true,
|
1443
|
+
"docs": {
|
1444
|
+
"tags": [],
|
1445
|
+
"text": "If `true`, the selected row is highlighted using a background colour."
|
1446
|
+
},
|
1447
|
+
"attribute": "highlight-selected-row",
|
1448
|
+
"reflect": false,
|
1449
|
+
"defaultValue": "true"
|
1450
|
+
},
|
1252
1451
|
"hideColumnHeaders": {
|
1253
1452
|
"type": "boolean",
|
1254
1453
|
"mutable": false,
|
@@ -1289,8 +1488,8 @@ export class DataTable {
|
|
1289
1488
|
"type": "unknown",
|
1290
1489
|
"mutable": false,
|
1291
1490
|
"complexType": {
|
1292
|
-
"original": "{\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n monochrome?: boolean;\n }",
|
1293
|
-
"resolved": "{ description?: string; label?: string; labelDuration?: number; max?: number; min?: number; progress?: number; showBackground?: boolean; monochrome?: boolean; }",
|
1491
|
+
"original": "{\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n monochrome?: boolean;\n overlay?: boolean;\n }",
|
1492
|
+
"resolved": "{ description?: string; label?: string; labelDuration?: number; max?: number; min?: number; progress?: number; showBackground?: boolean; monochrome?: boolean; overlay?: boolean; }",
|
1294
1493
|
"references": {}
|
1295
1494
|
},
|
1296
1495
|
"required": false,
|
@@ -1372,7 +1571,7 @@ export class DataTable {
|
|
1372
1571
|
"tags": [],
|
1373
1572
|
"text": "Sets the props for the built-in pagination bar. If the `pagination-bar` slot is used then this prop is ignored."
|
1374
1573
|
},
|
1375
|
-
"defaultValue": "{\n itemsPerPageOptions: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n showItemsPerPageControl: true,\n showGoToPageControl: true,\n alignment: \"right\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n hideAllFromItemsPerPage: false,\n monochrome: false,\n }"
|
1574
|
+
"defaultValue": "{\n itemsPerPageOptions: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n showItemsPerPageControl: true,\n showGoToPageControl: true,\n alignment: \"right\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n hideAllFromItemsPerPage: false,\n monochrome: false,\n setToFirstPageOnPaginationChange: false,\n }"
|
1376
1575
|
},
|
1377
1576
|
"showPagination": {
|
1378
1577
|
"type": "boolean",
|
@@ -1637,6 +1836,21 @@ export class DataTable {
|
|
1637
1836
|
"resolved": "void",
|
1638
1837
|
"references": {}
|
1639
1838
|
}
|
1839
|
+
}, {
|
1840
|
+
"method": "icSelectedRowChange",
|
1841
|
+
"name": "icSelectedRowChange",
|
1842
|
+
"bubbles": true,
|
1843
|
+
"cancelable": true,
|
1844
|
+
"composed": true,
|
1845
|
+
"docs": {
|
1846
|
+
"tags": [],
|
1847
|
+
"text": "Emitted when the selected row changes in the data table."
|
1848
|
+
},
|
1849
|
+
"complexType": {
|
1850
|
+
"original": "object",
|
1851
|
+
"resolved": "object",
|
1852
|
+
"references": {}
|
1853
|
+
}
|
1640
1854
|
}, {
|
1641
1855
|
"method": "icSortChange",
|
1642
1856
|
"name": "icSortChange",
|