@ukic/canary-web-components 2.0.0-canary.31 → 2.0.0-canary.33
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +6 -2
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-52ab3835.js → helpers-951fb33a.js} +25 -3
- package/dist/cjs/helpers-951fb33a.js.map +1 -0
- package/dist/cjs/{helpers-093368be.js → helpers-eabe59b6.js} +17 -1
- package/dist/cjs/helpers-eabe59b6.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +8 -1
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -9
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +8 -9
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +18 -19
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +9 -4
- package/dist/cjs/ic-chip.cjs.entry.js.map +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 +238 -78
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +6 -1
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +6 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +48 -21
- 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_4.cjs.entry.js +12 -10
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +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 +7 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +24 -7
- 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 +2 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +5 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +5 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +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 +6 -2
- 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.cjs.entry.js +5 -2
- package/dist/cjs/ic-tab.cjs.entry.js.map +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 +17 -0
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +9 -2
- 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 +9 -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 +12 -10
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +10 -0
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.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 +273 -80
- 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 +249 -8
- 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.js +8 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +8 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +66 -7
- 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 +12 -10
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +3 -0
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.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 +12 -1
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +16 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +22 -2
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-accordion.js +9 -1
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert2.js +3 -10
- package/dist/components/ic-alert2.js.map +1 -1
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-horizontal.js +12 -11
- package/dist/components/ic-card-horizontal.js.map +1 -1
- package/dist/components/ic-card.js +22 -21
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +5 -0
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +5 -0
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +11 -4
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-data-table.js +239 -78
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +7 -1
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +7 -1
- package/dist/components/ic-date-picker.js.map +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 +15 -11
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-menu-item2.js +9 -1
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +1 -1
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-menu3.js +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-pagination-bar2.js +50 -10
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +6 -1
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +5 -0
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +1 -1
- package/dist/components/ic-radio-group.js +1 -0
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +6 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +6 -1
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select-with-multi.js +1 -1
- package/dist/components/ic-select2.js +6 -1
- 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 +8 -3
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab.js +5 -2
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +13 -7
- 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 +21 -1
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +12 -2
- 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 +11 -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.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-56e19b01.entry.js → p-0229eb46.entry.js} +2 -2
- package/dist/core/{p-e210f51a.entry.js → p-03a99326.entry.js} +2 -2
- package/dist/core/p-03a99326.entry.js.map +1 -0
- package/dist/core/{p-8d276e8f.entry.js → p-03d83d2c.entry.js} +2 -2
- package/dist/core/{p-438abe40.entry.js → p-05f900e5.entry.js} +2 -2
- package/dist/core/p-05f900e5.entry.js.map +1 -0
- package/dist/core/{p-924548ec.entry.js → p-0c7d30f5.entry.js} +2 -2
- package/dist/core/{p-f4e57aaf.entry.js → p-124279fa.entry.js} +2 -2
- package/dist/core/p-12a5b481.entry.js +2 -0
- package/dist/core/p-12a5b481.entry.js.map +1 -0
- package/dist/core/{p-521abb6e.entry.js → p-26aeefc3.entry.js} +2 -2
- package/dist/core/p-26aeefc3.entry.js.map +1 -0
- package/dist/core/{p-de630a67.entry.js → p-29a040ef.entry.js} +2 -2
- package/dist/core/{p-2f7e6e38.entry.js → p-2b61d283.entry.js} +2 -2
- package/dist/core/{p-0a01a7ae.entry.js → p-3156304b.entry.js} +2 -2
- package/dist/core/{p-6398a726.entry.js → p-3169d95e.entry.js} +2 -2
- package/dist/core/{p-0180e00a.entry.js → p-34de5ffb.entry.js} +2 -2
- package/dist/core/{p-969cadfa.entry.js → p-382b88b2.entry.js} +2 -2
- package/dist/core/p-382b88b2.entry.js.map +1 -0
- package/dist/core/{p-c8141cac.entry.js → p-3a2523df.entry.js} +2 -2
- package/dist/core/{p-789ae7f5.entry.js → p-3b1c88ad.entry.js} +2 -2
- package/dist/core/p-3bbc3db1.entry.js +2 -0
- package/dist/core/p-3bbc3db1.entry.js.map +1 -0
- package/dist/core/p-3e7b08c7.entry.js +2 -0
- package/dist/core/p-3e7b08c7.entry.js.map +1 -0
- package/dist/core/p-4084bce2.entry.js +2 -0
- package/dist/core/p-4084bce2.entry.js.map +1 -0
- package/dist/core/p-48618a18.entry.js +2 -0
- package/dist/core/p-48618a18.entry.js.map +1 -0
- package/dist/core/p-4960c603.entry.js +2 -0
- package/dist/core/p-4960c603.entry.js.map +1 -0
- package/dist/core/{p-6fb3d61e.entry.js → p-4f118361.entry.js} +2 -2
- package/dist/core/p-5f149106.entry.js +2 -0
- package/dist/core/{p-ad1e70c9.entry.js.map → p-5f149106.entry.js.map} +1 -1
- package/dist/core/{p-f10f7f37.entry.js → p-5f71f24c.entry.js} +2 -2
- package/dist/core/p-5f71f24c.entry.js.map +1 -0
- package/dist/core/{p-74abc3bb.entry.js → p-61ca218b.entry.js} +2 -2
- package/dist/core/{p-9922cd00.entry.js → p-7565b23c.entry.js} +2 -2
- package/dist/core/p-758f03e8.entry.js +2 -0
- package/dist/core/p-758f03e8.entry.js.map +1 -0
- package/dist/core/{p-486a6957.entry.js → p-7bba4c47.entry.js} +2 -2
- package/dist/core/p-844fb240.entry.js +2 -0
- package/dist/core/p-844fb240.entry.js.map +1 -0
- package/dist/core/p-8ab58daa.js +2 -0
- package/dist/core/p-8ab58daa.js.map +1 -0
- package/dist/core/{p-2d063032.entry.js → p-8c2c86b5.entry.js} +2 -2
- package/dist/core/{p-9b70d4f8.entry.js → p-8ef60479.entry.js} +2 -2
- package/dist/core/p-938a0ccc.entry.js +2 -0
- package/dist/core/p-938a0ccc.entry.js.map +1 -0
- package/dist/core/{p-ca8ddad0.entry.js → p-95871655.entry.js} +2 -2
- package/dist/core/p-95871655.entry.js.map +1 -0
- package/dist/core/p-9adb2a49.entry.js +2 -0
- package/dist/core/p-9adb2a49.entry.js.map +1 -0
- package/dist/core/p-9c9147fa.entry.js +2 -0
- package/dist/core/p-9c9147fa.entry.js.map +1 -0
- package/dist/core/p-9f157649.entry.js +2 -0
- package/dist/core/p-9f157649.entry.js.map +1 -0
- package/dist/core/{p-418a84d4.entry.js → p-a3d903e4.entry.js} +2 -2
- package/dist/core/{p-5348af01.entry.js → p-a4088bd7.entry.js} +2 -2
- package/dist/core/{p-b53455c3.entry.js → p-a6fb5fe3.entry.js} +2 -2
- package/dist/core/{p-5e967ea4.entry.js → p-aabb04c8.entry.js} +2 -2
- package/dist/core/{p-3a59391f.entry.js → p-b02ad2c4.entry.js} +2 -2
- package/dist/core/{p-77696f7d.entry.js → p-ba353ac3.entry.js} +2 -2
- package/dist/core/p-ba353ac3.entry.js.map +1 -0
- package/dist/core/{p-ccf72538.entry.js → p-bc24c004.entry.js} +2 -2
- package/dist/core/{p-a7331e7c.entry.js → p-c0242c21.entry.js} +2 -2
- package/dist/core/{p-21d0dea6.entry.js → p-c1b268fd.entry.js} +2 -2
- package/dist/core/{p-99185fd5.entry.js → p-d062a801.entry.js} +2 -2
- package/dist/core/p-d062a801.entry.js.map +1 -0
- package/dist/core/{p-a72af8db.entry.js → p-d171c71d.entry.js} +2 -2
- package/dist/core/p-d1e0479c.entry.js +2 -0
- package/dist/core/p-d1e0479c.entry.js.map +1 -0
- package/dist/core/{p-9e5c8813.entry.js → p-d2260763.entry.js} +2 -2
- package/dist/core/p-d2260763.entry.js.map +1 -0
- package/dist/core/p-d8988d8c.entry.js +2 -0
- package/dist/core/p-d8988d8c.entry.js.map +1 -0
- package/dist/core/p-da506987.js +2 -0
- package/dist/core/p-da506987.js.map +1 -0
- package/dist/core/p-dd550e9b.entry.js +2 -0
- package/dist/core/p-dd550e9b.entry.js.map +1 -0
- package/dist/core/p-deedc7d3.entry.js +2 -0
- package/dist/core/p-deedc7d3.entry.js.map +1 -0
- package/dist/core/p-e447ed5c.entry.js +2 -0
- package/dist/core/p-e447ed5c.entry.js.map +1 -0
- package/dist/core/p-e7439c1e.entry.js +2 -0
- package/dist/core/p-e7439c1e.entry.js.map +1 -0
- package/dist/core/p-e7b913e5.entry.js +2 -0
- package/dist/core/p-e7b913e5.entry.js.map +1 -0
- package/dist/core/{p-67ae9d37.entry.js → p-e85505ec.entry.js} +2 -2
- package/dist/core/{p-673a4a62.entry.js → p-f237940d.entry.js} +2 -2
- package/dist/core/{p-648fb902.entry.js → p-f4b76daa.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-886489d5.js → helpers-031e266e.js} +17 -2
- package/dist/esm/helpers-031e266e.js.map +1 -0
- package/dist/esm/{helpers-147b5b73.js → helpers-948df101.js} +23 -3
- package/dist/esm/helpers-948df101.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +8 -1
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +3 -10
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +9 -10
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +19 -20
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +5 -1
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +5 -1
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +9 -4
- package/dist/esm/ic-chip.entry.js.map +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 +238 -78
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +6 -1
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +6 -1
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +49 -22
- 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_4.entry.js +13 -11
- package/dist/esm/ic-input-component-container_4.entry.js.map +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 +7 -1
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +1 -1
- package/dist/esm/ic-menu.entry.js +2 -2
- package/dist/esm/ic-menu.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination_4.entry.js +24 -7
- 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 +2 -1
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +5 -1
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +5 -1
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +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 +6 -2
- 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.entry.js +5 -2
- package/dist/esm/ic-tab.entry.js.map +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 +17 -0
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +9 -2
- 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 +10 -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 +1 -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 +12 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +141 -4
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +1 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +1 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +8 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +2 -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 +3 -1
- package/dist/types/utils/types.d.ts +1 -0
- package/hydrate/index.js +497 -180
- package/package.json +3 -10
- package/dist/cjs/helpers-093368be.js.map +0 -1
- package/dist/cjs/helpers-52ab3835.js.map +0 -1
- package/dist/core/p-01bc462e.entry.js +0 -2
- package/dist/core/p-01bc462e.entry.js.map +0 -1
- package/dist/core/p-0fc36045.entry.js +0 -2
- package/dist/core/p-0fc36045.entry.js.map +0 -1
- package/dist/core/p-15edd1aa.entry.js +0 -2
- package/dist/core/p-15edd1aa.entry.js.map +0 -1
- package/dist/core/p-16a48a63.entry.js +0 -2
- package/dist/core/p-16a48a63.entry.js.map +0 -1
- package/dist/core/p-1c25353c.entry.js +0 -2
- package/dist/core/p-1c25353c.entry.js.map +0 -1
- package/dist/core/p-213a9f8f.entry.js +0 -2
- package/dist/core/p-213a9f8f.entry.js.map +0 -1
- package/dist/core/p-383ba7e8.entry.js +0 -2
- package/dist/core/p-383ba7e8.entry.js.map +0 -1
- package/dist/core/p-41916ef7.entry.js +0 -2
- package/dist/core/p-41916ef7.entry.js.map +0 -1
- package/dist/core/p-438abe40.entry.js.map +0 -1
- package/dist/core/p-43a2cad3.entry.js +0 -2
- package/dist/core/p-43a2cad3.entry.js.map +0 -1
- package/dist/core/p-4aa6b8a4.entry.js +0 -2
- package/dist/core/p-4aa6b8a4.entry.js.map +0 -1
- package/dist/core/p-521abb6e.entry.js.map +0 -1
- package/dist/core/p-5334bc96.entry.js +0 -2
- package/dist/core/p-5334bc96.entry.js.map +0 -1
- package/dist/core/p-72446de0.entry.js +0 -2
- package/dist/core/p-72446de0.entry.js.map +0 -1
- package/dist/core/p-77696f7d.entry.js.map +0 -1
- package/dist/core/p-7e5da5eb.entry.js +0 -2
- package/dist/core/p-7e5da5eb.entry.js.map +0 -1
- package/dist/core/p-7eb980aa.entry.js +0 -2
- package/dist/core/p-7eb980aa.entry.js.map +0 -1
- package/dist/core/p-8128572e.js +0 -2
- package/dist/core/p-8128572e.js.map +0 -1
- package/dist/core/p-969cadfa.entry.js.map +0 -1
- package/dist/core/p-97f141a6.entry.js +0 -2
- package/dist/core/p-97f141a6.entry.js.map +0 -1
- package/dist/core/p-99185fd5.entry.js.map +0 -1
- package/dist/core/p-9e5c8813.entry.js.map +0 -1
- package/dist/core/p-ad1e70c9.entry.js +0 -2
- package/dist/core/p-af3d4eba.entry.js +0 -2
- package/dist/core/p-af3d4eba.entry.js.map +0 -1
- package/dist/core/p-b9d9273f.js +0 -2
- package/dist/core/p-b9d9273f.js.map +0 -1
- package/dist/core/p-ca8ddad0.entry.js.map +0 -1
- package/dist/core/p-cb3afdbf.entry.js +0 -2
- package/dist/core/p-cb3afdbf.entry.js.map +0 -1
- package/dist/core/p-d56593cc.entry.js +0 -2
- package/dist/core/p-d56593cc.entry.js.map +0 -1
- package/dist/core/p-db1887ee.entry.js +0 -2
- package/dist/core/p-db1887ee.entry.js.map +0 -1
- package/dist/core/p-e210f51a.entry.js.map +0 -1
- package/dist/core/p-f10f7f37.entry.js.map +0 -1
- package/dist/esm/helpers-147b5b73.js.map +0 -1
- package/dist/esm/helpers-886489d5.js.map +0 -1
- /package/dist/core/{p-56e19b01.entry.js.map → p-0229eb46.entry.js.map} +0 -0
- /package/dist/core/{p-8d276e8f.entry.js.map → p-03d83d2c.entry.js.map} +0 -0
- /package/dist/core/{p-924548ec.entry.js.map → p-0c7d30f5.entry.js.map} +0 -0
- /package/dist/core/{p-f4e57aaf.entry.js.map → p-124279fa.entry.js.map} +0 -0
- /package/dist/core/{p-de630a67.entry.js.map → p-29a040ef.entry.js.map} +0 -0
- /package/dist/core/{p-2f7e6e38.entry.js.map → p-2b61d283.entry.js.map} +0 -0
- /package/dist/core/{p-0a01a7ae.entry.js.map → p-3156304b.entry.js.map} +0 -0
- /package/dist/core/{p-6398a726.entry.js.map → p-3169d95e.entry.js.map} +0 -0
- /package/dist/core/{p-0180e00a.entry.js.map → p-34de5ffb.entry.js.map} +0 -0
- /package/dist/core/{p-c8141cac.entry.js.map → p-3a2523df.entry.js.map} +0 -0
- /package/dist/core/{p-789ae7f5.entry.js.map → p-3b1c88ad.entry.js.map} +0 -0
- /package/dist/core/{p-6fb3d61e.entry.js.map → p-4f118361.entry.js.map} +0 -0
- /package/dist/core/{p-74abc3bb.entry.js.map → p-61ca218b.entry.js.map} +0 -0
- /package/dist/core/{p-9922cd00.entry.js.map → p-7565b23c.entry.js.map} +0 -0
- /package/dist/core/{p-486a6957.entry.js.map → p-7bba4c47.entry.js.map} +0 -0
- /package/dist/core/{p-2d063032.entry.js.map → p-8c2c86b5.entry.js.map} +0 -0
- /package/dist/core/{p-9b70d4f8.entry.js.map → p-8ef60479.entry.js.map} +0 -0
- /package/dist/core/{p-418a84d4.entry.js.map → p-a3d903e4.entry.js.map} +0 -0
- /package/dist/core/{p-5348af01.entry.js.map → p-a4088bd7.entry.js.map} +0 -0
- /package/dist/core/{p-b53455c3.entry.js.map → p-a6fb5fe3.entry.js.map} +0 -0
- /package/dist/core/{p-5e967ea4.entry.js.map → p-aabb04c8.entry.js.map} +0 -0
- /package/dist/core/{p-3a59391f.entry.js.map → p-b02ad2c4.entry.js.map} +0 -0
- /package/dist/core/{p-ccf72538.entry.js.map → p-bc24c004.entry.js.map} +0 -0
- /package/dist/core/{p-a7331e7c.entry.js.map → p-c0242c21.entry.js.map} +0 -0
- /package/dist/core/{p-21d0dea6.entry.js.map → p-c1b268fd.entry.js.map} +0 -0
- /package/dist/core/{p-a72af8db.entry.js.map → p-d171c71d.entry.js.map} +0 -0
- /package/dist/core/{p-67ae9d37.entry.js.map → p-e85505ec.entry.js.map} +0 -0
- /package/dist/core/{p-673a4a62.entry.js.map → p-f237940d.entry.js.map} +0 -0
- /package/dist/core/{p-648fb902.entry.js.map → p-f4b76daa.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 &&
|
@@ -209,7 +216,7 @@ export class DataTable {
|
|
209
216
|
this.timerStarted = null;
|
210
217
|
}, this.minimumLoadingDisplayDuration);
|
211
218
|
};
|
212
|
-
this.isObject = (value) => typeof value === "object";
|
219
|
+
this.isObject = (value) => value !== undefined && value !== null && typeof value === "object";
|
213
220
|
this.notDefaultDensity = () => this.density !== "default";
|
214
221
|
this.getCellContent = (cell, dataType) => {
|
215
222
|
switch (dataType) {
|
@@ -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) ||
|
@@ -301,18 +308,25 @@ export class DataTable {
|
|
301
308
|
!!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
|
302
309
|
!!this.getCellAlignment(cell, "horizontal"), [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true, [this.TEXT_WRAP_STRING]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) ||
|
303
310
|
(rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
|
304
|
-
!!this.getCellOptions(cell, "textWrap"), ["cell-icon"]: hasIcon || !!((_j = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _j === void 0 ? void 0 : _j.icon) }, 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
|
311
|
+
!!this.getCellOptions(cell, "textWrap"), ["cell-icon"]: hasIcon || !!((_j = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _j === void 0 ? void 0 : _j.icon) }, 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
|
305
312
|
? this.setRowHeight(currentRowHeight)
|
306
313
|
: 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)) &&
|
307
314
|
(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" &&
|
308
|
-
!isSlotUsed(this.el, cellSlotName) && (h("
|
315
|
+
!isSlotUsed(this.el, cellSlotName) && (h("div", { class: {
|
316
|
+
"cell-text-wrapper": true,
|
317
|
+
"cell-text-no-wrap": !this.truncationPattern,
|
318
|
+
} }, h("ic-typography", { variant: "body", class: {
|
309
319
|
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
310
320
|
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
311
321
|
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
312
322
|
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
313
323
|
!!rowEmphasis,
|
314
324
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
315
|
-
} }, this.isObject(cell) && (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType))))
|
325
|
+
} }, this.isObject(cell) && (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href"), 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) &&
|
326
|
+
Object.keys(cell).includes("description") && (h("div", { class: {
|
327
|
+
["cell-description"]: true,
|
328
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
329
|
+
} }, ((_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"))))))))));
|
316
330
|
};
|
317
331
|
this.createCells = (row, rowIndex) => {
|
318
332
|
var _a;
|
@@ -347,41 +361,47 @@ export class DataTable {
|
|
347
361
|
["table-cell"]: true,
|
348
362
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
349
363
|
["with-overflow"]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element",
|
350
|
-
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) },
|
364
|
+
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, this.isObject(cell) &&
|
365
|
+
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"),
|
366
|
+
// eslint-disable-next-line react/jsx-no-bind
|
367
|
+
onClick: cell.actionOnClick
|
368
|
+
? () => this.handleClick(cell.actionOnClick)
|
369
|
+
: undefined }))) : (this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis))));
|
351
370
|
}
|
352
371
|
});
|
353
372
|
};
|
354
|
-
this.createColumnHeaders = () => {
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
} }, title)))));
|
383
|
-
};
|
373
|
+
this.createColumnHeaders = () => (this.columns || []).map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
374
|
+
["column-header"]: true,
|
375
|
+
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
376
|
+
["updating-state-headers"]: this.updating && !this.loading,
|
377
|
+
}, style: Object.assign({}, this.getColumnWidth(columnWidth)), colSpan: colspan }, h("div", { class: {
|
378
|
+
"column-header-inner-container": true,
|
379
|
+
"truncation-tooltip": this.columnHeaderTruncation,
|
380
|
+
[`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
|
381
|
+
} }, isSlotUsed(this.el, `${key}-column-icon`) ? (h("slot", { name: `${key}-column-icon` })) : (icon &&
|
382
|
+
!icon.hideOnHeader && (h("span", { class: "icon", innerHTML: icon.icon }))), this.columnHeaderTruncation ? (h("ic-tooltip", { label: title, target: `column-header-${index}` }, h("ic-typography", { id: `column-header-${index}`, variant: "body", class: {
|
383
|
+
["column-header-text"]: true,
|
384
|
+
[`text-${this.density}`]: this.notDefaultDensity(),
|
385
|
+
} }, title))) : (h("ic-typography", { variant: "body", class: {
|
386
|
+
["column-header-text"]: true,
|
387
|
+
[`text-${this.density}`]: this.notDefaultDensity(),
|
388
|
+
} }, title)), this.sortable && (h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
|
389
|
+
// eslint-disable-next-line react/jsx-no-bind
|
390
|
+
onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
|
391
|
+
? this.sortedColumnOrder
|
392
|
+
: "unsorted"], class: {
|
393
|
+
["sort-button"]: true,
|
394
|
+
["sort-button-unsorted"]: this.sortedColumn !== key ||
|
395
|
+
this.sortedColumnOrder === "unsorted",
|
396
|
+
} }))), this.columnHeaderTruncation && (h("ic-typography", { variant: "body", "aria-hidden": "true", class: {
|
397
|
+
["column-header-text"]: true,
|
398
|
+
["dummy-column-header-text"]: this.columnHeaderTruncation,
|
399
|
+
[`text-${this.density}`]: this.notDefaultDensity(),
|
400
|
+
} }, title)))));
|
384
401
|
this.onRowClick = (row) => {
|
402
|
+
if (!this.loading && !this.updating) {
|
403
|
+
this.icSelectedRowChange.emit(this.selectedRow !== row ? row : null);
|
404
|
+
}
|
385
405
|
this.selectedRow =
|
386
406
|
this.selectedRow !== row && !this.loading && !this.updating && row;
|
387
407
|
};
|
@@ -412,7 +432,7 @@ export class DataTable {
|
|
412
432
|
// eslint-disable-next-line react/jsx-no-bind
|
413
433
|
onClick: () => this.onRowClick(row), class: {
|
414
434
|
["table-row"]: true,
|
415
|
-
["table-row-selected"]: this.selectedRow === row,
|
435
|
+
["table-row-selected"]: this.highlightSelectedRow && this.selectedRow === row,
|
416
436
|
}
|
417
437
|
}, this.createCells(row, index)));
|
418
438
|
});
|
@@ -482,7 +502,8 @@ export class DataTable {
|
|
482
502
|
});
|
483
503
|
};
|
484
504
|
this.getTypographyElements = () => {
|
485
|
-
|
505
|
+
// Filter out column headers and cell descriptions
|
506
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text,.cell-description-text)"));
|
486
507
|
};
|
487
508
|
this.getTooltip = (typographyEl) => {
|
488
509
|
return typographyEl.closest(this.TOOLTIP);
|
@@ -493,7 +514,7 @@ export class DataTable {
|
|
493
514
|
const cellContainer = this.getCellContainer(typographyEl);
|
494
515
|
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
495
516
|
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
496
|
-
typographyEl.setAttribute("style",
|
517
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
497
518
|
return;
|
498
519
|
}
|
499
520
|
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
@@ -502,6 +523,56 @@ export class DataTable {
|
|
502
523
|
this.updateScrollOffset = () => {
|
503
524
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
504
525
|
};
|
526
|
+
this.updateRowHeightForDescriptions = (rowHeight, cellContainer) => {
|
527
|
+
cellContainer.setAttribute("data-row-height", rowHeight.toString());
|
528
|
+
cellContainer.setAttribute("style", `${this.ROW_HEIGHT_CSS_VARIABLE}: ${rowHeight}px`);
|
529
|
+
};
|
530
|
+
// Method to update the row heights on cells with descriptions and tooltip truncation
|
531
|
+
this.updateCellHeightsWithDescriptions = () => {
|
532
|
+
const descriptions = this.el.shadowRoot.querySelectorAll(this.CELL_DESCRIPTION_STRING);
|
533
|
+
descriptions.forEach((description) => {
|
534
|
+
const cellContainer = description.closest(`.${this.CELL_CONTAINER_WITH_DESCRIPTION_STRING}`);
|
535
|
+
const typography = cellContainer.querySelector(this.IC_TYPOGRAPHY_STRING);
|
536
|
+
const descriptionMarginTop = window
|
537
|
+
.getComputedStyle(description)
|
538
|
+
.getPropertyValue("margin-top");
|
539
|
+
const descriptionHeight = description.clientHeight + parseInt(descriptionMarginTop, 10);
|
540
|
+
if (this.globalRowHeight && this.globalRowHeight !== "auto") {
|
541
|
+
if (!typography.textContent &&
|
542
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight) {
|
543
|
+
this.updateRowHeightForDescriptions(descriptionHeight, cellContainer);
|
544
|
+
}
|
545
|
+
else if (this.truncationPattern === this.TOOLTIP_STRING) {
|
546
|
+
if (descriptionHeight + this.DEFAULT_LINE_HEIGHT >
|
547
|
+
this.globalRowHeight) {
|
548
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
549
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS) && cellIcon) {
|
550
|
+
// recalculate descriptionHeight as when a word break occurs this value changes
|
551
|
+
// Additional spacing given for 300-400% zoom
|
552
|
+
this.updateRowHeightForDescriptions(descriptionHeight +
|
553
|
+
this.DEFAULT_LINE_HEIGHT +
|
554
|
+
cellIcon.clientHeight, cellContainer);
|
555
|
+
}
|
556
|
+
else {
|
557
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
558
|
+
}
|
559
|
+
}
|
560
|
+
this.addLineClampCSS(typography, cellContainer);
|
561
|
+
// Additional case for show/hide truncation for when a description is present, but the text
|
562
|
+
// isn't overflowing the cell to trigger the show more button to appear.
|
563
|
+
}
|
564
|
+
else if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
565
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight &&
|
566
|
+
typography.style.getPropertyValue("--truncation-max-lines") !==
|
567
|
+
"initial") {
|
568
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
569
|
+
if (descriptionHeight) {
|
570
|
+
this.createShowHideTruncation(typography, cellContainer, descriptionHeight);
|
571
|
+
}
|
572
|
+
}
|
573
|
+
}
|
574
|
+
});
|
575
|
+
};
|
505
576
|
this.setTableDimensions = () => {
|
506
577
|
let tableHostDimensions = {};
|
507
578
|
if (this.width) {
|
@@ -518,22 +589,79 @@ export class DataTable {
|
|
518
589
|
}
|
519
590
|
return tableHostDimensions;
|
520
591
|
};
|
592
|
+
this.fixCellTooltip = (element) => {
|
593
|
+
var _a;
|
594
|
+
const tooltipEl = (element.tagName === "IC-TOOLTIP"
|
595
|
+
? element
|
596
|
+
: (_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
597
|
+
if (tooltipEl) {
|
598
|
+
tooltipEl.setExternalPopperProps({
|
599
|
+
strategy: "fixed",
|
600
|
+
});
|
601
|
+
}
|
602
|
+
};
|
521
603
|
this.fixCellTooltips = () => {
|
522
604
|
const elements = this.el.shadowRoot.querySelectorAll(".data-type-element");
|
523
605
|
elements.forEach((element) => {
|
524
606
|
const slotElements = getSlotElements(element);
|
525
|
-
slotElements.forEach((slottedEl) => {
|
526
|
-
|
527
|
-
const tooltipEl = (slottedEl.tagName === "IC-TOOLTIP"
|
528
|
-
? slottedEl
|
529
|
-
: (_a = slottedEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
530
|
-
if (tooltipEl) {
|
531
|
-
tooltipEl.setExternalPopperProps({
|
532
|
-
strategy: "fixed",
|
533
|
-
});
|
534
|
-
}
|
607
|
+
slotElements === null || slotElements === void 0 ? void 0 : slotElements.forEach((slottedEl) => {
|
608
|
+
this.fixCellTooltip(slottedEl);
|
535
609
|
});
|
536
610
|
});
|
611
|
+
const actionElements = this.el.shadowRoot.querySelectorAll(".action-element");
|
612
|
+
actionElements === null || actionElements === void 0 ? void 0 : actionElements.forEach((actionElementSpan) => {
|
613
|
+
const actionElement = actionElementSpan.firstChild;
|
614
|
+
if (actionElement) {
|
615
|
+
this.fixCellTooltip(actionElement);
|
616
|
+
}
|
617
|
+
});
|
618
|
+
};
|
619
|
+
this.handleClick = (callback) => callback();
|
620
|
+
this.renderTableBody = (data, loading, overlay) => {
|
621
|
+
if (!(data === null || data === void 0 ? void 0 : data.length))
|
622
|
+
return;
|
623
|
+
if (overlay && loading) {
|
624
|
+
return h("tbody", null, this.createRows());
|
625
|
+
}
|
626
|
+
else if (loading && !overlay) {
|
627
|
+
return null;
|
628
|
+
}
|
629
|
+
else {
|
630
|
+
return h("tbody", null, this.createRows());
|
631
|
+
}
|
632
|
+
};
|
633
|
+
this.renderLoadingIndicator = (isLoading, loadingOptions) => {
|
634
|
+
if (!isLoading)
|
635
|
+
return null;
|
636
|
+
return (h(Fragment, null, h("div", { class: "loading-overlay", ref: (el) => (this.loadingOverlay = el) }), h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
637
|
+
"loading-empty": isLoading,
|
638
|
+
loading: true,
|
639
|
+
"show-background": loadingOptions.showBackground || loadingOptions.overlay,
|
640
|
+
}, 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) })));
|
641
|
+
};
|
642
|
+
this.renderAriaLiveLoading = () => {
|
643
|
+
var _a, _b;
|
644
|
+
if (this.loading) {
|
645
|
+
return ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.label) || "Loading...";
|
646
|
+
}
|
647
|
+
else if (this.updating) {
|
648
|
+
return ((_b = this.updatingOptions) === null || _b === void 0 ? void 0 : _b.description) || "Updating table data";
|
649
|
+
}
|
650
|
+
else {
|
651
|
+
return "";
|
652
|
+
}
|
653
|
+
};
|
654
|
+
this.renderEmptyState = (data, loading, overlay) => {
|
655
|
+
const emptyStateEl = isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" }));
|
656
|
+
if (loading && !(data === null || data === void 0 ? void 0 : data.length) && overlay) {
|
657
|
+
return emptyStateEl;
|
658
|
+
}
|
659
|
+
else if (!loading && !(data === null || data === void 0 ? void 0 : data.length)) {
|
660
|
+
return emptyStateEl;
|
661
|
+
}
|
662
|
+
else {
|
663
|
+
return null;
|
664
|
+
}
|
537
665
|
};
|
538
666
|
this.fromRow = 0;
|
539
667
|
this.previousRowsPerPage = undefined;
|
@@ -554,6 +682,7 @@ export class DataTable {
|
|
554
682
|
this.embedded = false;
|
555
683
|
this.globalRowHeight = "auto";
|
556
684
|
this.height = undefined;
|
685
|
+
this.highlightSelectedRow = true;
|
557
686
|
this.hideColumnHeaders = false;
|
558
687
|
this.loading = false;
|
559
688
|
this.loadingOptions = undefined;
|
@@ -576,6 +705,7 @@ export class DataTable {
|
|
576
705
|
pageLabel: "Page",
|
577
706
|
hideRangeLabel: false,
|
578
707
|
hideAllFromItemsPerPage: false,
|
708
|
+
setToFirstPageOnPaginationChange: false,
|
579
709
|
};
|
580
710
|
this.showPagination = false;
|
581
711
|
this.sortable = false;
|
@@ -612,13 +742,13 @@ export class DataTable {
|
|
612
742
|
(_b = this.headerResizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
613
743
|
}
|
614
744
|
componentWillLoad() {
|
615
|
-
var _a;
|
745
|
+
var _a, _b;
|
616
746
|
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
617
747
|
this.previousRowsPerPage = this.rowsPerPage;
|
618
748
|
this.toRow = this.rowsPerPage;
|
619
749
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
620
750
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
621
|
-
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
751
|
+
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) });
|
622
752
|
this.initialLoad = true;
|
623
753
|
this.previousItemsPerPage = this.rowsPerPage;
|
624
754
|
}
|
@@ -649,6 +779,7 @@ export class DataTable {
|
|
649
779
|
if (this.globalRowHeight !== "auto") {
|
650
780
|
this.updateSetRowHeight();
|
651
781
|
}
|
782
|
+
window.addEventListener("resize", this.updateCellHeightsWithDescriptions);
|
652
783
|
}
|
653
784
|
componentDidUpdate() {
|
654
785
|
// truncation updates invoked here once new/updated data has
|
@@ -660,6 +791,7 @@ export class DataTable {
|
|
660
791
|
}
|
661
792
|
componentDidRender() {
|
662
793
|
this.fixCellTooltips();
|
794
|
+
this.updateCellHeightsWithDescriptions();
|
663
795
|
this.adjustWidthForActionElement();
|
664
796
|
}
|
665
797
|
truncateUpdatedData() {
|
@@ -718,7 +850,7 @@ export class DataTable {
|
|
718
850
|
cellContainer.style.height = null;
|
719
851
|
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
720
852
|
this.removeTooltip(cellContainer, typographyEl, tooltipEl);
|
721
|
-
typographyEl.setAttribute("style",
|
853
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
722
854
|
}
|
723
855
|
else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
724
856
|
this.resetShowHideTruncation(typographyEl);
|
@@ -729,7 +861,8 @@ export class DataTable {
|
|
729
861
|
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
730
862
|
// If the set row height is bigger than the cell container even
|
731
863
|
// with textWrap, set the row height
|
732
|
-
if (!
|
864
|
+
if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
865
|
+
!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
|
733
866
|
rowHeight > cellContainer.clientHeight &&
|
734
867
|
!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
735
868
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -762,7 +895,7 @@ export class DataTable {
|
|
762
895
|
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
763
896
|
newRows.forEach((row) => {
|
764
897
|
row
|
765
|
-
.querySelectorAll(
|
898
|
+
.querySelectorAll(this.IC_TYPOGRAPHY_STRING)
|
766
899
|
.forEach((typographyEl) => {
|
767
900
|
const cellContainer = this.getCellContainer(typographyEl);
|
768
901
|
const tooltipEl = this.getTooltip(typographyEl);
|
@@ -824,9 +957,17 @@ export class DataTable {
|
|
824
957
|
}
|
825
958
|
}
|
826
959
|
}
|
827
|
-
createShowHideTruncation(typographyEl, cellContainer) {
|
960
|
+
createShowHideTruncation(typographyEl, cellContainer, descriptionHeight) {
|
828
961
|
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
829
962
|
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
963
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
964
|
+
descriptionHeight) {
|
965
|
+
typographyEl.setAttribute("max-lines", `${Math.floor(((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - descriptionHeight) /
|
966
|
+
this.DEFAULT_LINE_HEIGHT)}`);
|
967
|
+
}
|
968
|
+
else {
|
969
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
970
|
+
}
|
830
971
|
typographyEl.setShowHideExpanded(false);
|
831
972
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
832
973
|
}
|
@@ -933,7 +1074,8 @@ export class DataTable {
|
|
933
1074
|
this.truncationPatternUpdated = true;
|
934
1075
|
}
|
935
1076
|
async dataHandler(newData) {
|
936
|
-
|
1077
|
+
var _a;
|
1078
|
+
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) });
|
937
1079
|
if (this.loading) {
|
938
1080
|
!this.hasLoadedForOneSecond
|
939
1081
|
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
@@ -960,7 +1102,7 @@ export class DataTable {
|
|
960
1102
|
typographyEl.setShowHideExpanded(false);
|
961
1103
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
962
1104
|
}
|
963
|
-
else {
|
1105
|
+
else if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)) {
|
964
1106
|
typographyEl.resetTruncation().then(() => {
|
965
1107
|
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
966
1108
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -996,8 +1138,11 @@ export class DataTable {
|
|
996
1138
|
this.variableRowHeight = null;
|
997
1139
|
}
|
998
1140
|
showLoadingIndicator() {
|
999
|
-
var _a;
|
1000
|
-
(_a = this.
|
1141
|
+
var _a, _b, _c;
|
1142
|
+
if ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.overlay) {
|
1143
|
+
(_b = this.loadingOverlay) === null || _b === void 0 ? void 0 : _b.classList.add("show");
|
1144
|
+
}
|
1145
|
+
(_c = this.loadingIndicator) === null || _c === void 0 ? void 0 : _c.classList.add("show");
|
1001
1146
|
}
|
1002
1147
|
getRowOptions(rowKeys, rowValues) {
|
1003
1148
|
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
@@ -1026,20 +1171,40 @@ export class DataTable {
|
|
1026
1171
|
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
1027
1172
|
this.truncationPattern === this.TOOLTIP_STRING) {
|
1028
1173
|
if (!typographyEl.getAttribute("style") ||
|
1029
|
-
typographyEl.style.cssText.includes(
|
1174
|
+
typographyEl.style.cssText.includes(`${this.LINE_CLAMP_CSS_VARIABLE}: 0;`)) {
|
1030
1175
|
this.addLineClampCSS(typographyEl, cellContainer);
|
1031
1176
|
}
|
1032
1177
|
this.createTruncationTooltip(typographyEl, cellContainer);
|
1033
1178
|
}
|
1034
1179
|
}
|
1035
1180
|
removeTooltip(cellContainer, typographyEl, tooltip) {
|
1036
|
-
cellContainer.
|
1181
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1182
|
+
cellTextWrapper.prepend(typographyEl);
|
1037
1183
|
if (tooltip) {
|
1038
1184
|
tooltip.remove();
|
1039
1185
|
}
|
1040
1186
|
}
|
1041
1187
|
addLineClampCSS(typographyEl, cellContainer) {
|
1042
|
-
|
1188
|
+
var _a, _b;
|
1189
|
+
const descriptionCellHeight = (_a = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
1190
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
1191
|
+
(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > descriptionCellHeight) {
|
1192
|
+
let iconHeight;
|
1193
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS)) {
|
1194
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
1195
|
+
iconHeight = cellIcon ? cellIcon.clientHeight : 0;
|
1196
|
+
}
|
1197
|
+
else {
|
1198
|
+
iconHeight = 0;
|
1199
|
+
}
|
1200
|
+
const height = (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) -
|
1201
|
+
((_b = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _b === void 0 ? void 0 : _b.clientHeight) -
|
1202
|
+
iconHeight;
|
1203
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(height || 0)}`);
|
1204
|
+
}
|
1205
|
+
else {
|
1206
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
|
1207
|
+
}
|
1043
1208
|
}
|
1044
1209
|
createTruncationTooltip(typographyEl, cellContainer) {
|
1045
1210
|
const tooltipEl = document.createElement(this.IC_TOOLTIP_STRING);
|
@@ -1050,12 +1215,13 @@ export class DataTable {
|
|
1050
1215
|
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
1051
1216
|
strategy: "fixed",
|
1052
1217
|
});
|
1053
|
-
cellContainer.
|
1054
|
-
|
1218
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1219
|
+
cellTextWrapper.prepend(tooltipEl);
|
1220
|
+
tooltipEl.prepend(typographyEl);
|
1055
1221
|
}
|
1056
1222
|
render() {
|
1057
1223
|
var _a;
|
1058
|
-
const { caption, createColumnHeaders,
|
1224
|
+
const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
1059
1225
|
return (h(Host, { style: Object.assign({}, this.setTableDimensions()) }, h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
|
1060
1226
|
["table-row-container"]: true,
|
1061
1227
|
scrollable,
|
@@ -1066,13 +1232,7 @@ export class DataTable {
|
|
1066
1232
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
1067
1233
|
} }, h("tr", null, createColumnHeaders()))), updating &&
|
1068
1234
|
!loading &&
|
1069
|
-
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data
|
1070
|
-
!loading &&
|
1071
|
-
(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", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
1072
|
-
"loading-empty": loading,
|
1073
|
-
loading: true,
|
1074
|
-
"show-background": loadingOptions.showBackground,
|
1075
|
-
}, 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, appearance: paginationBarOptions.appearance, 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
|
1235
|
+
(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, appearance: paginationBarOptions.appearance, 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
|
1076
1236
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
1077
1237
|
: "table unsorted")))));
|
1078
1238
|
}
|
@@ -1250,6 +1410,24 @@ export class DataTable {
|
|
1250
1410
|
"attribute": "height",
|
1251
1411
|
"reflect": false
|
1252
1412
|
},
|
1413
|
+
"highlightSelectedRow": {
|
1414
|
+
"type": "boolean",
|
1415
|
+
"mutable": false,
|
1416
|
+
"complexType": {
|
1417
|
+
"original": "boolean",
|
1418
|
+
"resolved": "boolean",
|
1419
|
+
"references": {}
|
1420
|
+
},
|
1421
|
+
"required": false,
|
1422
|
+
"optional": true,
|
1423
|
+
"docs": {
|
1424
|
+
"tags": [],
|
1425
|
+
"text": "If `true`, the selected row is highlighted using a background colour."
|
1426
|
+
},
|
1427
|
+
"attribute": "highlight-selected-row",
|
1428
|
+
"reflect": false,
|
1429
|
+
"defaultValue": "true"
|
1430
|
+
},
|
1253
1431
|
"hideColumnHeaders": {
|
1254
1432
|
"type": "boolean",
|
1255
1433
|
"mutable": false,
|
@@ -1290,8 +1468,8 @@ export class DataTable {
|
|
1290
1468
|
"type": "unknown",
|
1291
1469
|
"mutable": false,
|
1292
1470
|
"complexType": {
|
1293
|
-
"original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n }",
|
1294
|
-
"resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; label?: string; labelDuration?: number; max?: number; min?: number; progress?: number; showBackground?: boolean; }",
|
1471
|
+
"original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n overlay?: boolean;\n }",
|
1472
|
+
"resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; label?: string; labelDuration?: number; max?: number; min?: number; progress?: number; showBackground?: boolean; overlay?: boolean; }",
|
1295
1473
|
"references": {
|
1296
1474
|
"IcThemeForegroundNoDefault": {
|
1297
1475
|
"location": "import",
|
@@ -1379,7 +1557,7 @@ export class DataTable {
|
|
1379
1557
|
"tags": [],
|
1380
1558
|
"text": "Sets the props for the built-in pagination bar. If the `pagination-bar` slot is used then this prop is ignored."
|
1381
1559
|
},
|
1382
|
-
"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 appearance: \"default\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n hideAllFromItemsPerPage: false,\n }"
|
1560
|
+
"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 appearance: \"default\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n hideAllFromItemsPerPage: false,\n setToFirstPageOnPaginationChange: false,\n }"
|
1383
1561
|
},
|
1384
1562
|
"showPagination": {
|
1385
1563
|
"type": "boolean",
|
@@ -1626,6 +1804,21 @@ export class DataTable {
|
|
1626
1804
|
"resolved": "void",
|
1627
1805
|
"references": {}
|
1628
1806
|
}
|
1807
|
+
}, {
|
1808
|
+
"method": "icSelectedRowChange",
|
1809
|
+
"name": "icSelectedRowChange",
|
1810
|
+
"bubbles": true,
|
1811
|
+
"cancelable": true,
|
1812
|
+
"composed": true,
|
1813
|
+
"docs": {
|
1814
|
+
"tags": [],
|
1815
|
+
"text": "Emitted when the selected row changes in the data table."
|
1816
|
+
},
|
1817
|
+
"complexType": {
|
1818
|
+
"original": "object",
|
1819
|
+
"resolved": "object",
|
1820
|
+
"references": {}
|
1821
|
+
}
|
1629
1822
|
}, {
|
1630
1823
|
"method": "icSortChange",
|
1631
1824
|
"name": "icSortChange",
|