@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
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-93509377.js';
|
2
|
-
import { d as dynamicDebounce,
|
2
|
+
import { d as dynamicDebounce, b as isEmptyString, p as pxToRem, i as isSlotUsed, c as addDataToPosition, e as deviceSizeMatches, f as getSlotElements, h as checkResizeObserver, j as IC_DEVICE_SIZES } from './helpers-948df101.js';
|
3
3
|
|
4
4
|
const unsortedIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">
|
5
5
|
<path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>
|
@@ -13,12 +13,13 @@ const descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 2
|
|
13
13
|
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
14
14
|
</svg>`;
|
15
15
|
|
16
|
-
const icDataTableCss = ":host{position:relative;display:inline-flex;max-height:100%;width:var(--table-width, 100%);height:100%;min-width:var(--table-min-width);max-width:var(--table-max-width)}tbody{vertical-align:top}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column;width:100%}.cell-container{display:flex;min-height:1.5rem;overflow-y:hidden;height:var(--row-height)}.truncation-show-hide{
|
16
|
+
const icDataTableCss = ":host{position:relative;display:inline-flex;max-height:100%;width:var(--table-width, 100%);height:100%;min-width:var(--table-min-width);max-width:var(--table-max-width)}tbody{vertical-align:top}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column;width:100%}.cell-container{display:flex;min-height:1.5rem;overflow-y:hidden;height:var(--row-height)}.truncation-show-hide{display:block}.cell-icon.truncation-show-hide{display:flex}.cell-container:not(.data-type-element,.truncation-show-hide){overflow-x:hidden}ic-loading-indicator{position:sticky;top:20px}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination=\"true\"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:var(--table-layout, \"fixed\");border-spacing:0;width:100%;height:var(--table-height, auto)}.table-row-container:focus{outline:none;box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast);z-index:1}:host([embedded=\"true\"]) .table-row-container{border:var(--ic-border-light)}.column-header-inner-container{padding:var(--ic-space-xs);box-sizing:border-box}.column-header-inner-container ic-tooltip{pointer-events:none}.column-header-inner-container ic-tooltip.show-trunc-tooltip{pointer-events:auto}.column-header-inner-container ic-tooltip .column-header-text{--ic-line-clamp:1}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{position:sticky;top:0;z-index:1;box-shadow:0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%)}.row-header-sticky{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-color:var(--ic-table-row-selected) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-action-dark-bg-hover)}.sort-button:active{background-color:var(--ic-action-dark-bg-active)}.sort-button svg{color:var(--ic-architectural-black)}.sort-button-unsorted svg{color:var(--ic-color-tertiary-text)}.table-density-dense .column-header-inner-container,td.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious .column-header-inner-container,td.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.dummy-column-header-text{white-space:nowrap;overflow:hidden;height:0;width:-moz-fit-content;width:fit-content}.row-header,.column-header{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-architectural-40);border-right:var(--ic-border-light);border-bottom:var(--ic-border-light)}.column-header{padding:0;width:var(--column-width);min-width:var(--column-min-width, 4rem);max-width:var(--column-max-width)}.column-header:last-child{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-border-light) !important}:host([embedded=\"true\"]) tr:last-child .table-cell,:host([embedded=\"true\"]) tr:last-child .row-header{border-bottom:none}.column-header-alignment-left,.row-header-alignment-left,.cell-alignment-left{text-align:left !important;justify-content:start !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important;justify-content:end !important}.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography{padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.cell-alignment-right.truncation-show-hide ic-typography{--ellipsis-padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important;justify-content:center !important}.table-row:nth-child(even){background-color:var(--ic-architectural-20)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px);overflow:hidden;box-sizing:border-box;max-width:var(--column-max-width);min-width:var(--column-min-width)}.table-cell.with-overflow{overflow:visible}.data-type-string,.data-type-address{text-align:left;vertical-align:top}.data-type-number,.data-type-date{text-align:right;justify-content:end;vertical-align:top}.cell-alignment-top{vertical-align:top;align-items:flex-start}.cell-alignment-middle{vertical-align:middle;align-items:center}.cell-alignment-bottom{vertical-align:bottom;align-items:flex-end}.cell-emphasis-low{color:var(--ic-color-secondary-text)}.cell-emphasis-high{font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}.loading-empty{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}.updating-state{padding:0;border-bottom:var(--ic-border-light)}.updating-state-headers{border-bottom:none}.loading{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow);z-index:calc(var(--ic-z-index-dialog) - 1)}.loading.show-background{background-color:var(--ic-architectural-white);border:var(--ic-border-light)}.loading.show{opacity:1}.icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}.column-header-alignment-right>.icon,.row-header-alignment-right>.icon,.cell-alignment-right>.icon,.column-header-alignment-right>::slotted(svg),.row-header-alignment-right>::slotted(svg),.cell-alignment-right>::slotted(svg){margin-right:auto}.column-header-alignment-center>ic-typography,.column-header-alignment-center>.cell-text-wrapper,.row-header-alignment-right>ic-typography,.row-header-alignment-right>.cell-text-wrapper,.cell-alignment-center>ic-typography,.cell-alignment-center>.cell-text-wrapper{flex:1}.icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}.truncation-tooltip ic-typography{display:-webkit-box;-webkit-line-clamp:var(--ic-line-clamp, 0);-webkit-box-orient:vertical;overflow:hidden}.truncation-tooltip ic-typography,.truncation-show-hide ic-typography{white-space:normal}.ic-tooltip-overflow{overflow:hidden;width:100%}.action-element{display:flex;justify-content:right}.cell-grid-wrapper{display:grid;grid-template-columns:auto auto}.loading-overlay{visibility:hidden;position:absolute;top:0;left:0;width:100%;height:100%;background:var(--ic-architectural-black);z-index:calc(var(--ic-z-index-dialog) - 2);opacity:0;transition:opacity var(--ic-transition-duration-slow)}.loading-overlay.show{visibility:visible;opacity:0.6}.sr-only{position:absolute;left:-9999px}@media (prefers-reduced-motion: reduce){.loading-overlay{transition:none}}.cell-text-wrapper{overflow:hidden}.cell-text-wrapper>ic-typography{margin-left:2px}.cell-text-no-wrap{word-wrap:initial}.cell-container-with-description{display:flex;flex-direction:row}.cell-description{display:flex;flex-direction:row;margin-top:var(--ic-space-xxs);word-break:break-all}.cell-description-text{color:var(--ic-color-secondary-text)}.cell-description-icon{padding-right:var(--ic-space-xs)}.cell-description-icon>svg{height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs));display:flex}@media screen and (min-width: 577px){.column-header-inner-container{display:flex;align-items:center}}@media screen and (max-width: 577px){.cell-icon{flex-wrap:wrap}.cell-description-icon{padding-right:0}}";
|
17
17
|
|
18
18
|
const DataTable = class {
|
19
19
|
constructor(hostRef) {
|
20
20
|
registerInstance(this, hostRef);
|
21
21
|
this.icRowHeightChange = createEvent(this, "icRowHeightChange", 7);
|
22
|
+
this.icSelectedRowChange = createEvent(this, "icSelectedRowChange", 7);
|
22
23
|
this.icSortChange = createEvent(this, "icSortChange", 7);
|
23
24
|
this.DENSITY_HEIGHT_MULTIPLIER = {
|
24
25
|
dense: 0.8,
|
@@ -50,6 +51,7 @@ const DataTable = class {
|
|
50
51
|
this.itemsPerPageChange = false;
|
51
52
|
this.DATA_ROW_HEIGHT_STRING = "data-row-height";
|
52
53
|
this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
|
54
|
+
this.LINE_CLAMP_CSS_VARIABLE = "--ic-line-clamp";
|
53
55
|
this.DEFAULT_LINE_HEIGHT = 24;
|
54
56
|
this.densityUpdate = false;
|
55
57
|
this.truncationPatternUpdated = false;
|
@@ -57,6 +59,10 @@ const DataTable = class {
|
|
57
59
|
this.headerResizeObserver = null;
|
58
60
|
this.IC_TOOLTIP_STRING = "ic-tooltip";
|
59
61
|
this.SHOW_TRUNC_TOOLTIP_STRING = "show-trunc-tooltip";
|
62
|
+
this.CELL_DESCRIPTION_STRING = ".cell-description";
|
63
|
+
this.CELL_CONTAINER_WITH_DESCRIPTION_STRING = "cell-container-with-description";
|
64
|
+
this.CELL_TEXT_WRAPPER_STRING = ".cell-text-wrapper";
|
65
|
+
this.IC_TYPOGRAPHY_STRING = "ic-typography";
|
60
66
|
this.runHeaderResizeObserver = () => {
|
61
67
|
this.headerResizeObserver = new ResizeObserver(() => {
|
62
68
|
this.headerResizeCallback();
|
@@ -70,7 +76,7 @@ const DataTable = class {
|
|
70
76
|
const headers = this.el.shadowRoot.querySelectorAll("th.column-header");
|
71
77
|
headers.forEach((header) => {
|
72
78
|
const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);
|
73
|
-
const typographyEls = header.querySelectorAll(
|
79
|
+
const typographyEls = header.querySelectorAll(this.IC_TYPOGRAPHY_STRING);
|
74
80
|
if (tooltip && typographyEls && typographyEls.length === 2) {
|
75
81
|
tooltip.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);
|
76
82
|
if (typographyEls[1].clientWidth > typographyEls[0].clientWidth) {
|
@@ -138,8 +144,9 @@ const DataTable = class {
|
|
138
144
|
}
|
139
145
|
else {
|
140
146
|
if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
|
141
|
-
typographyEl.setAttribute("style",
|
142
|
-
cellContainer.
|
147
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
148
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
149
|
+
cellTextWrapper.prepend(typographyEl);
|
143
150
|
tooltip.remove();
|
144
151
|
}
|
145
152
|
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
@@ -215,7 +222,7 @@ const DataTable = class {
|
|
215
222
|
this.timerStarted = null;
|
216
223
|
}, this.minimumLoadingDisplayDuration);
|
217
224
|
};
|
218
|
-
this.isObject = (value) => typeof value === "object";
|
225
|
+
this.isObject = (value) => value !== undefined && value !== null && typeof value === "object";
|
219
226
|
this.notDefaultDensity = () => this.density !== "default";
|
220
227
|
this.getCellContent = (cell, dataType) => {
|
221
228
|
switch (dataType) {
|
@@ -291,11 +298,11 @@ const DataTable = class {
|
|
291
298
|
});
|
292
299
|
};
|
293
300
|
this.createCellContent = (columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis) => {
|
294
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
301
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
295
302
|
return (h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
296
303
|
!isSlotUsed(this.el, cellSlotName)
|
297
304
|
? cell
|
298
|
-
: null, class: Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
|
305
|
+
: null, class: Object.assign(Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
|
299
306
|
((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
300
307
|
rowAlignment ||
|
301
308
|
this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
|
@@ -307,18 +314,25 @@ const DataTable = class {
|
|
307
314
|
!!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
|
308
315
|
!!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) ||
|
309
316
|
(rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
|
310
|
-
!!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
|
317
|
+
!!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
|
311
318
|
? this.setRowHeight(currentRowHeight)
|
312
319
|
: 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)) &&
|
313
320
|
(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" &&
|
314
|
-
!isSlotUsed(this.el, cellSlotName) && (h("
|
321
|
+
!isSlotUsed(this.el, cellSlotName) && (h("div", { class: {
|
322
|
+
"cell-text-wrapper": true,
|
323
|
+
"cell-text-no-wrap": !this.truncationPattern,
|
324
|
+
} }, h("ic-typography", { variant: "body", class: {
|
315
325
|
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
316
326
|
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
317
327
|
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
318
328
|
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
319
329
|
!!rowEmphasis,
|
320
330
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
321
|
-
} }, 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))))
|
331
|
+
} }, 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) &&
|
332
|
+
Object.keys(cell).includes("description") && (h("div", { class: {
|
333
|
+
["cell-description"]: true,
|
334
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
335
|
+
} }, ((_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"))))))))));
|
322
336
|
};
|
323
337
|
this.createCells = (row, rowIndex) => {
|
324
338
|
var _a;
|
@@ -353,41 +367,47 @@ const DataTable = class {
|
|
353
367
|
["table-cell"]: true,
|
354
368
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
355
369
|
["with-overflow"]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element",
|
356
|
-
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) },
|
370
|
+
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, this.isObject(cell) &&
|
371
|
+
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"),
|
372
|
+
// eslint-disable-next-line react/jsx-no-bind
|
373
|
+
onClick: cell.actionOnClick
|
374
|
+
? () => this.handleClick(cell.actionOnClick)
|
375
|
+
: undefined }))) : (this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis))));
|
357
376
|
}
|
358
377
|
});
|
359
378
|
};
|
360
|
-
this.createColumnHeaders = () => {
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
} }, title)))));
|
389
|
-
};
|
379
|
+
this.createColumnHeaders = () => (this.columns || []).map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
380
|
+
["column-header"]: true,
|
381
|
+
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
382
|
+
["updating-state-headers"]: this.updating && !this.loading,
|
383
|
+
}, style: Object.assign({}, this.getColumnWidth(columnWidth)), colSpan: colspan }, h("div", { class: {
|
384
|
+
"column-header-inner-container": true,
|
385
|
+
"truncation-tooltip": this.columnHeaderTruncation,
|
386
|
+
[`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
|
387
|
+
} }, isSlotUsed(this.el, `${key}-column-icon`) ? (h("slot", { name: `${key}-column-icon` })) : (icon &&
|
388
|
+
!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: {
|
389
|
+
["column-header-text"]: true,
|
390
|
+
[`text-${this.density}`]: this.notDefaultDensity(),
|
391
|
+
} }, title))) : (h("ic-typography", { variant: "body", class: {
|
392
|
+
["column-header-text"]: true,
|
393
|
+
[`text-${this.density}`]: this.notDefaultDensity(),
|
394
|
+
} }, title)), this.sortable && (h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
|
395
|
+
// eslint-disable-next-line react/jsx-no-bind
|
396
|
+
onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
|
397
|
+
? this.sortedColumnOrder
|
398
|
+
: "unsorted"], class: {
|
399
|
+
["sort-button"]: true,
|
400
|
+
["sort-button-unsorted"]: this.sortedColumn !== key ||
|
401
|
+
this.sortedColumnOrder === "unsorted",
|
402
|
+
} }))), this.columnHeaderTruncation && (h("ic-typography", { variant: "body", "aria-hidden": "true", class: {
|
403
|
+
["column-header-text"]: true,
|
404
|
+
["dummy-column-header-text"]: this.columnHeaderTruncation,
|
405
|
+
[`text-${this.density}`]: this.notDefaultDensity(),
|
406
|
+
} }, title)))));
|
390
407
|
this.onRowClick = (row) => {
|
408
|
+
if (!this.loading && !this.updating) {
|
409
|
+
this.icSelectedRowChange.emit(this.selectedRow !== row ? row : null);
|
410
|
+
}
|
391
411
|
this.selectedRow =
|
392
412
|
this.selectedRow !== row && !this.loading && !this.updating && row;
|
393
413
|
};
|
@@ -418,7 +438,7 @@ const DataTable = class {
|
|
418
438
|
// eslint-disable-next-line react/jsx-no-bind
|
419
439
|
onClick: () => this.onRowClick(row), class: {
|
420
440
|
["table-row"]: true,
|
421
|
-
["table-row-selected"]: this.selectedRow === row,
|
441
|
+
["table-row-selected"]: this.highlightSelectedRow && this.selectedRow === row,
|
422
442
|
}
|
423
443
|
}, this.createCells(row, index)));
|
424
444
|
});
|
@@ -488,7 +508,8 @@ const DataTable = class {
|
|
488
508
|
});
|
489
509
|
};
|
490
510
|
this.getTypographyElements = () => {
|
491
|
-
|
511
|
+
// Filter out column headers and cell descriptions
|
512
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text,.cell-description-text)"));
|
492
513
|
};
|
493
514
|
this.getTooltip = (typographyEl) => {
|
494
515
|
return typographyEl.closest(this.TOOLTIP);
|
@@ -499,7 +520,7 @@ const DataTable = class {
|
|
499
520
|
const cellContainer = this.getCellContainer(typographyEl);
|
500
521
|
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
501
522
|
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
502
|
-
typographyEl.setAttribute("style",
|
523
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
503
524
|
return;
|
504
525
|
}
|
505
526
|
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
@@ -508,6 +529,56 @@ const DataTable = class {
|
|
508
529
|
this.updateScrollOffset = () => {
|
509
530
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
510
531
|
};
|
532
|
+
this.updateRowHeightForDescriptions = (rowHeight, cellContainer) => {
|
533
|
+
cellContainer.setAttribute("data-row-height", rowHeight.toString());
|
534
|
+
cellContainer.setAttribute("style", `${this.ROW_HEIGHT_CSS_VARIABLE}: ${rowHeight}px`);
|
535
|
+
};
|
536
|
+
// Method to update the row heights on cells with descriptions and tooltip truncation
|
537
|
+
this.updateCellHeightsWithDescriptions = () => {
|
538
|
+
const descriptions = this.el.shadowRoot.querySelectorAll(this.CELL_DESCRIPTION_STRING);
|
539
|
+
descriptions.forEach((description) => {
|
540
|
+
const cellContainer = description.closest(`.${this.CELL_CONTAINER_WITH_DESCRIPTION_STRING}`);
|
541
|
+
const typography = cellContainer.querySelector(this.IC_TYPOGRAPHY_STRING);
|
542
|
+
const descriptionMarginTop = window
|
543
|
+
.getComputedStyle(description)
|
544
|
+
.getPropertyValue("margin-top");
|
545
|
+
const descriptionHeight = description.clientHeight + parseInt(descriptionMarginTop, 10);
|
546
|
+
if (this.globalRowHeight && this.globalRowHeight !== "auto") {
|
547
|
+
if (!typography.textContent &&
|
548
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight) {
|
549
|
+
this.updateRowHeightForDescriptions(descriptionHeight, cellContainer);
|
550
|
+
}
|
551
|
+
else if (this.truncationPattern === this.TOOLTIP_STRING) {
|
552
|
+
if (descriptionHeight + this.DEFAULT_LINE_HEIGHT >
|
553
|
+
this.globalRowHeight) {
|
554
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
555
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS) && cellIcon) {
|
556
|
+
// recalculate descriptionHeight as when a word break occurs this value changes
|
557
|
+
// Additional spacing given for 300-400% zoom
|
558
|
+
this.updateRowHeightForDescriptions(descriptionHeight +
|
559
|
+
this.DEFAULT_LINE_HEIGHT +
|
560
|
+
cellIcon.clientHeight, cellContainer);
|
561
|
+
}
|
562
|
+
else {
|
563
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
564
|
+
}
|
565
|
+
}
|
566
|
+
this.addLineClampCSS(typography, cellContainer);
|
567
|
+
// Additional case for show/hide truncation for when a description is present, but the text
|
568
|
+
// isn't overflowing the cell to trigger the show more button to appear.
|
569
|
+
}
|
570
|
+
else if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
571
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight &&
|
572
|
+
typography.style.getPropertyValue("--truncation-max-lines") !==
|
573
|
+
"initial") {
|
574
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
575
|
+
if (descriptionHeight) {
|
576
|
+
this.createShowHideTruncation(typography, cellContainer, descriptionHeight);
|
577
|
+
}
|
578
|
+
}
|
579
|
+
}
|
580
|
+
});
|
581
|
+
};
|
511
582
|
this.setTableDimensions = () => {
|
512
583
|
let tableHostDimensions = {};
|
513
584
|
if (this.width) {
|
@@ -524,22 +595,79 @@ const DataTable = class {
|
|
524
595
|
}
|
525
596
|
return tableHostDimensions;
|
526
597
|
};
|
598
|
+
this.fixCellTooltip = (element) => {
|
599
|
+
var _a;
|
600
|
+
const tooltipEl = (element.tagName === "IC-TOOLTIP"
|
601
|
+
? element
|
602
|
+
: (_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
603
|
+
if (tooltipEl) {
|
604
|
+
tooltipEl.setExternalPopperProps({
|
605
|
+
strategy: "fixed",
|
606
|
+
});
|
607
|
+
}
|
608
|
+
};
|
527
609
|
this.fixCellTooltips = () => {
|
528
610
|
const elements = this.el.shadowRoot.querySelectorAll(".data-type-element");
|
529
611
|
elements.forEach((element) => {
|
530
612
|
const slotElements = getSlotElements(element);
|
531
|
-
slotElements.forEach((slottedEl) => {
|
532
|
-
|
533
|
-
const tooltipEl = (slottedEl.tagName === "IC-TOOLTIP"
|
534
|
-
? slottedEl
|
535
|
-
: (_a = slottedEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
536
|
-
if (tooltipEl) {
|
537
|
-
tooltipEl.setExternalPopperProps({
|
538
|
-
strategy: "fixed",
|
539
|
-
});
|
540
|
-
}
|
613
|
+
slotElements === null || slotElements === void 0 ? void 0 : slotElements.forEach((slottedEl) => {
|
614
|
+
this.fixCellTooltip(slottedEl);
|
541
615
|
});
|
542
616
|
});
|
617
|
+
const actionElements = this.el.shadowRoot.querySelectorAll(".action-element");
|
618
|
+
actionElements === null || actionElements === void 0 ? void 0 : actionElements.forEach((actionElementSpan) => {
|
619
|
+
const actionElement = actionElementSpan.firstChild;
|
620
|
+
if (actionElement) {
|
621
|
+
this.fixCellTooltip(actionElement);
|
622
|
+
}
|
623
|
+
});
|
624
|
+
};
|
625
|
+
this.handleClick = (callback) => callback();
|
626
|
+
this.renderTableBody = (data, loading, overlay) => {
|
627
|
+
if (!(data === null || data === void 0 ? void 0 : data.length))
|
628
|
+
return;
|
629
|
+
if (overlay && loading) {
|
630
|
+
return h("tbody", null, this.createRows());
|
631
|
+
}
|
632
|
+
else if (loading && !overlay) {
|
633
|
+
return null;
|
634
|
+
}
|
635
|
+
else {
|
636
|
+
return h("tbody", null, this.createRows());
|
637
|
+
}
|
638
|
+
};
|
639
|
+
this.renderLoadingIndicator = (isLoading, loadingOptions) => {
|
640
|
+
if (!isLoading)
|
641
|
+
return null;
|
642
|
+
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: {
|
643
|
+
"loading-empty": isLoading,
|
644
|
+
loading: true,
|
645
|
+
"show-background": loadingOptions.showBackground || loadingOptions.overlay,
|
646
|
+
}, 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) })));
|
647
|
+
};
|
648
|
+
this.renderAriaLiveLoading = () => {
|
649
|
+
var _a, _b;
|
650
|
+
if (this.loading) {
|
651
|
+
return ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.label) || "Loading...";
|
652
|
+
}
|
653
|
+
else if (this.updating) {
|
654
|
+
return ((_b = this.updatingOptions) === null || _b === void 0 ? void 0 : _b.description) || "Updating table data";
|
655
|
+
}
|
656
|
+
else {
|
657
|
+
return "";
|
658
|
+
}
|
659
|
+
};
|
660
|
+
this.renderEmptyState = (data, loading, overlay) => {
|
661
|
+
const emptyStateEl = isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" }));
|
662
|
+
if (loading && !(data === null || data === void 0 ? void 0 : data.length) && overlay) {
|
663
|
+
return emptyStateEl;
|
664
|
+
}
|
665
|
+
else if (!loading && !(data === null || data === void 0 ? void 0 : data.length)) {
|
666
|
+
return emptyStateEl;
|
667
|
+
}
|
668
|
+
else {
|
669
|
+
return null;
|
670
|
+
}
|
543
671
|
};
|
544
672
|
this.fromRow = 0;
|
545
673
|
this.previousRowsPerPage = undefined;
|
@@ -560,6 +688,7 @@ const DataTable = class {
|
|
560
688
|
this.embedded = false;
|
561
689
|
this.globalRowHeight = "auto";
|
562
690
|
this.height = undefined;
|
691
|
+
this.highlightSelectedRow = true;
|
563
692
|
this.hideColumnHeaders = false;
|
564
693
|
this.loading = false;
|
565
694
|
this.loadingOptions = undefined;
|
@@ -582,6 +711,7 @@ const DataTable = class {
|
|
582
711
|
pageLabel: "Page",
|
583
712
|
hideRangeLabel: false,
|
584
713
|
hideAllFromItemsPerPage: false,
|
714
|
+
setToFirstPageOnPaginationChange: false,
|
585
715
|
};
|
586
716
|
this.showPagination = false;
|
587
717
|
this.sortable = false;
|
@@ -618,13 +748,13 @@ const DataTable = class {
|
|
618
748
|
(_b = this.headerResizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
619
749
|
}
|
620
750
|
componentWillLoad() {
|
621
|
-
var _a;
|
751
|
+
var _a, _b;
|
622
752
|
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
623
753
|
this.previousRowsPerPage = this.rowsPerPage;
|
624
754
|
this.toRow = this.rowsPerPage;
|
625
755
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
626
756
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
627
|
-
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
757
|
+
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) });
|
628
758
|
this.initialLoad = true;
|
629
759
|
this.previousItemsPerPage = this.rowsPerPage;
|
630
760
|
}
|
@@ -655,6 +785,7 @@ const DataTable = class {
|
|
655
785
|
if (this.globalRowHeight !== "auto") {
|
656
786
|
this.updateSetRowHeight();
|
657
787
|
}
|
788
|
+
window.addEventListener("resize", this.updateCellHeightsWithDescriptions);
|
658
789
|
}
|
659
790
|
componentDidUpdate() {
|
660
791
|
// truncation updates invoked here once new/updated data has
|
@@ -666,6 +797,7 @@ const DataTable = class {
|
|
666
797
|
}
|
667
798
|
componentDidRender() {
|
668
799
|
this.fixCellTooltips();
|
800
|
+
this.updateCellHeightsWithDescriptions();
|
669
801
|
this.adjustWidthForActionElement();
|
670
802
|
}
|
671
803
|
truncateUpdatedData() {
|
@@ -724,7 +856,7 @@ const DataTable = class {
|
|
724
856
|
cellContainer.style.height = null;
|
725
857
|
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
726
858
|
this.removeTooltip(cellContainer, typographyEl, tooltipEl);
|
727
|
-
typographyEl.setAttribute("style",
|
859
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
728
860
|
}
|
729
861
|
else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
730
862
|
this.resetShowHideTruncation(typographyEl);
|
@@ -735,7 +867,8 @@ const DataTable = class {
|
|
735
867
|
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
736
868
|
// If the set row height is bigger than the cell container even
|
737
869
|
// with textWrap, set the row height
|
738
|
-
if (!
|
870
|
+
if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
871
|
+
!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
|
739
872
|
rowHeight > cellContainer.clientHeight &&
|
740
873
|
!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
741
874
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -768,7 +901,7 @@ const DataTable = class {
|
|
768
901
|
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
769
902
|
newRows.forEach((row) => {
|
770
903
|
row
|
771
|
-
.querySelectorAll(
|
904
|
+
.querySelectorAll(this.IC_TYPOGRAPHY_STRING)
|
772
905
|
.forEach((typographyEl) => {
|
773
906
|
const cellContainer = this.getCellContainer(typographyEl);
|
774
907
|
const tooltipEl = this.getTooltip(typographyEl);
|
@@ -830,9 +963,17 @@ const DataTable = class {
|
|
830
963
|
}
|
831
964
|
}
|
832
965
|
}
|
833
|
-
createShowHideTruncation(typographyEl, cellContainer) {
|
966
|
+
createShowHideTruncation(typographyEl, cellContainer, descriptionHeight) {
|
834
967
|
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
835
968
|
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
969
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
970
|
+
descriptionHeight) {
|
971
|
+
typographyEl.setAttribute("max-lines", `${Math.floor(((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - descriptionHeight) /
|
972
|
+
this.DEFAULT_LINE_HEIGHT)}`);
|
973
|
+
}
|
974
|
+
else {
|
975
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
976
|
+
}
|
836
977
|
typographyEl.setShowHideExpanded(false);
|
837
978
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
838
979
|
}
|
@@ -939,7 +1080,8 @@ const DataTable = class {
|
|
939
1080
|
this.truncationPatternUpdated = true;
|
940
1081
|
}
|
941
1082
|
async dataHandler(newData) {
|
942
|
-
|
1083
|
+
var _a;
|
1084
|
+
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) });
|
943
1085
|
if (this.loading) {
|
944
1086
|
!this.hasLoadedForOneSecond
|
945
1087
|
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
@@ -966,7 +1108,7 @@ const DataTable = class {
|
|
966
1108
|
typographyEl.setShowHideExpanded(false);
|
967
1109
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
968
1110
|
}
|
969
|
-
else {
|
1111
|
+
else if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)) {
|
970
1112
|
typographyEl.resetTruncation().then(() => {
|
971
1113
|
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
972
1114
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -1002,8 +1144,11 @@ const DataTable = class {
|
|
1002
1144
|
this.variableRowHeight = null;
|
1003
1145
|
}
|
1004
1146
|
showLoadingIndicator() {
|
1005
|
-
var _a;
|
1006
|
-
(_a = this.
|
1147
|
+
var _a, _b, _c;
|
1148
|
+
if ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.overlay) {
|
1149
|
+
(_b = this.loadingOverlay) === null || _b === void 0 ? void 0 : _b.classList.add("show");
|
1150
|
+
}
|
1151
|
+
(_c = this.loadingIndicator) === null || _c === void 0 ? void 0 : _c.classList.add("show");
|
1007
1152
|
}
|
1008
1153
|
getRowOptions(rowKeys, rowValues) {
|
1009
1154
|
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
@@ -1032,20 +1177,40 @@ const DataTable = class {
|
|
1032
1177
|
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
1033
1178
|
this.truncationPattern === this.TOOLTIP_STRING) {
|
1034
1179
|
if (!typographyEl.getAttribute("style") ||
|
1035
|
-
typographyEl.style.cssText.includes(
|
1180
|
+
typographyEl.style.cssText.includes(`${this.LINE_CLAMP_CSS_VARIABLE}: 0;`)) {
|
1036
1181
|
this.addLineClampCSS(typographyEl, cellContainer);
|
1037
1182
|
}
|
1038
1183
|
this.createTruncationTooltip(typographyEl, cellContainer);
|
1039
1184
|
}
|
1040
1185
|
}
|
1041
1186
|
removeTooltip(cellContainer, typographyEl, tooltip) {
|
1042
|
-
cellContainer.
|
1187
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1188
|
+
cellTextWrapper.prepend(typographyEl);
|
1043
1189
|
if (tooltip) {
|
1044
1190
|
tooltip.remove();
|
1045
1191
|
}
|
1046
1192
|
}
|
1047
1193
|
addLineClampCSS(typographyEl, cellContainer) {
|
1048
|
-
|
1194
|
+
var _a, _b;
|
1195
|
+
const descriptionCellHeight = (_a = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
1196
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
1197
|
+
(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > descriptionCellHeight) {
|
1198
|
+
let iconHeight;
|
1199
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS)) {
|
1200
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
1201
|
+
iconHeight = cellIcon ? cellIcon.clientHeight : 0;
|
1202
|
+
}
|
1203
|
+
else {
|
1204
|
+
iconHeight = 0;
|
1205
|
+
}
|
1206
|
+
const height = (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) -
|
1207
|
+
((_b = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _b === void 0 ? void 0 : _b.clientHeight) -
|
1208
|
+
iconHeight;
|
1209
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(height || 0)}`);
|
1210
|
+
}
|
1211
|
+
else {
|
1212
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
|
1213
|
+
}
|
1049
1214
|
}
|
1050
1215
|
createTruncationTooltip(typographyEl, cellContainer) {
|
1051
1216
|
const tooltipEl = document.createElement(this.IC_TOOLTIP_STRING);
|
@@ -1056,12 +1221,13 @@ const DataTable = class {
|
|
1056
1221
|
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
1057
1222
|
strategy: "fixed",
|
1058
1223
|
});
|
1059
|
-
cellContainer.
|
1060
|
-
|
1224
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1225
|
+
cellTextWrapper.prepend(tooltipEl);
|
1226
|
+
tooltipEl.prepend(typographyEl);
|
1061
1227
|
}
|
1062
1228
|
render() {
|
1063
1229
|
var _a;
|
1064
|
-
const { caption, createColumnHeaders,
|
1230
|
+
const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
1065
1231
|
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: {
|
1066
1232
|
["table-row-container"]: true,
|
1067
1233
|
scrollable,
|
@@ -1072,13 +1238,7 @@ const DataTable = class {
|
|
1072
1238
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
1073
1239
|
} }, h("tr", null, createColumnHeaders()))), updating &&
|
1074
1240
|
!loading &&
|
1075
|
-
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data
|
1076
|
-
!loading &&
|
1077
|
-
(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: {
|
1078
|
-
"loading-empty": loading,
|
1079
|
-
loading: true,
|
1080
|
-
"show-background": loadingOptions.showBackground,
|
1081
|
-
}, 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
|
1241
|
+
(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
|
1082
1242
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
1083
1243
|
: "table unsorted")))));
|
1084
1244
|
}
|