@ukic/canary-web-components 2.0.0-canary.32 → 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-aa5ff032.js → helpers-eabe59b6.js} +13 -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 +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 +2 -9
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +12 -19
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +209 -48
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +44 -20
- 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 +2 -9
- 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 +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 +8 -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 +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +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 +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +10 -2
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +3 -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 +2 -9
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +2 -9
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +3 -10
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +82 -2
- package/dist/collection/components/ic-data-table/ic-data-table.js +244 -50
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +213 -6
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +64 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +62 -6
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +3 -10
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +3 -10
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/utils/helpers.js +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 +12 -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-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 +3 -10
- package/dist/components/ic-card-horizontal.js.map +1 -1
- package/dist/components/ic-card.js +13 -20
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-data-table.js +210 -48
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +1 -1
- package/dist/components/ic-date-picker.js +1 -1
- package/dist/components/ic-empty-state2.js +3 -13
- package/dist/components/ic-empty-state2.js.map +1 -1
- package/dist/components/ic-footer.js +18 -7
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +3 -10
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-input-component-container2.js +3 -10
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-menu2.js +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 +46 -9
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-select-with-multi.js +1 -1
- package/dist/components/ic-select2.js +1 -1
- package/dist/components/ic-side-navigation.js +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-text-field2.js +8 -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 +12 -2
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +3 -1
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-top-navigation.js +2 -2
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-item.js +3 -10
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +3 -10
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/core/core.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-05c9dee1.entry.js → p-03a99326.entry.js} +2 -2
- package/dist/core/{p-77637e28.entry.js → p-03d83d2c.entry.js} +2 -2
- package/dist/core/{p-19a9ab60.entry.js → p-05f900e5.entry.js} +2 -2
- package/dist/core/{p-120a38ce.entry.js → p-0c7d30f5.entry.js} +2 -2
- package/dist/core/{p-6bd76154.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-895d05f9.entry.js → p-26aeefc3.entry.js} +2 -2
- package/dist/core/p-26aeefc3.entry.js.map +1 -0
- package/dist/core/{p-5dc274f0.entry.js → p-29a040ef.entry.js} +2 -2
- package/dist/core/{p-456282e2.entry.js → p-2b61d283.entry.js} +2 -2
- package/dist/core/{p-40471551.entry.js → p-3156304b.entry.js} +2 -2
- package/dist/core/{p-f0e85611.entry.js → p-3169d95e.entry.js} +2 -2
- package/dist/core/{p-0bc92c30.entry.js → p-34de5ffb.entry.js} +2 -2
- package/dist/core/{p-89ec372e.entry.js → p-382b88b2.entry.js} +2 -2
- package/dist/core/{p-ce90d1b2.entry.js → p-3a2523df.entry.js} +2 -2
- package/dist/core/{p-c32f4c0f.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-7e20c194.entry.js → p-4084bce2.entry.js} +2 -2
- 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-59e677e4.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-89290d94.entry.js → p-5f71f24c.entry.js} +2 -2
- package/dist/core/{p-48b62c20.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-5041cbeb.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-1419c8ae.entry.js → p-8c2c86b5.entry.js} +2 -2
- package/dist/core/{p-73dab780.entry.js → p-8ef60479.entry.js} +2 -2
- package/dist/core/p-938a0ccc.entry.js +2 -0
- package/dist/core/{p-94e47a21.entry.js.map → p-938a0ccc.entry.js.map} +1 -1
- package/dist/core/{p-1619b3d7.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-1b5a47c6.entry.js → p-a3d903e4.entry.js} +2 -2
- package/dist/core/{p-d0d2952b.entry.js → p-a4088bd7.entry.js} +2 -2
- package/dist/core/{p-9271a06b.entry.js → p-a6fb5fe3.entry.js} +2 -2
- package/dist/core/{p-43f87eb3.entry.js → p-aabb04c8.entry.js} +2 -2
- package/dist/core/{p-ad786103.entry.js → p-b02ad2c4.entry.js} +2 -2
- package/dist/core/{p-85101c9a.entry.js → p-ba353ac3.entry.js} +2 -2
- package/dist/core/{p-ab485b11.entry.js → p-bc24c004.entry.js} +2 -2
- package/dist/core/{p-96a909bf.entry.js → p-c0242c21.entry.js} +2 -2
- package/dist/core/{p-516de675.entry.js → p-c1b268fd.entry.js} +2 -2
- package/dist/core/{p-9ce35989.entry.js → p-d062a801.entry.js} +2 -2
- package/dist/core/p-d171c71d.entry.js +2 -0
- package/dist/core/{p-ce2162a2.entry.js.map → p-d171c71d.entry.js.map} +1 -1
- package/dist/core/{p-95c8513d.entry.js → p-d1e0479c.entry.js} +2 -2
- package/dist/core/p-d1e0479c.entry.js.map +1 -0
- package/dist/core/{p-9b85340f.entry.js → p-d2260763.entry.js} +2 -2
- package/dist/core/{p-1eb5d7f3.entry.js → p-d8988d8c.entry.js} +2 -2
- 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-782cd387.entry.js → p-deedc7d3.entry.js} +2 -2
- 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-09d4fe07.entry.js → p-e7b913e5.entry.js} +2 -2
- package/dist/core/p-e85505ec.entry.js +2 -0
- package/dist/core/{p-9445c2f3.entry.js → p-f237940d.entry.js} +2 -2
- package/dist/core/{p-522b1526.entry.js → p-f4b76daa.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-25eb1cb0.js → helpers-031e266e.js} +13 -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 +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 +3 -10
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +13 -20
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +209 -48
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +1 -1
- package/dist/esm/ic-date-picker.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +45 -21
- 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 +3 -10
- 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 +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 +8 -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 +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +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 +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +10 -2
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +3 -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 +3 -10
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +3 -10
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +0 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +23 -0
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +12 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +107 -4
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +8 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +0 -1
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +0 -1
- package/dist/types/components.d.ts +23 -0
- package/dist/types/utils/helpers.d.ts +3 -1
- package/dist/types/utils/types.d.ts +1 -0
- package/hydrate/index.js +345 -144
- package/package.json +3 -3
- package/dist/cjs/helpers-52ab3835.js.map +0 -1
- package/dist/cjs/helpers-aa5ff032.js.map +0 -1
- package/dist/core/p-0695b4b7.entry.js +0 -2
- package/dist/core/p-0695b4b7.entry.js.map +0 -1
- package/dist/core/p-1619b3d7.entry.js.map +0 -1
- package/dist/core/p-1a5c1bfa.entry.js +0 -2
- package/dist/core/p-1a5c1bfa.entry.js.map +0 -1
- package/dist/core/p-1ef02273.entry.js +0 -2
- package/dist/core/p-1ef02273.entry.js.map +0 -1
- package/dist/core/p-20075bc7.entry.js +0 -2
- package/dist/core/p-20075bc7.entry.js.map +0 -1
- package/dist/core/p-2308d041.entry.js +0 -2
- package/dist/core/p-2308d041.entry.js.map +0 -1
- package/dist/core/p-23f32e1e.entry.js +0 -2
- package/dist/core/p-23f32e1e.entry.js.map +0 -1
- package/dist/core/p-3a3a8a71.js +0 -2
- package/dist/core/p-3a3a8a71.js.map +0 -1
- package/dist/core/p-67b25dfc.entry.js +0 -2
- package/dist/core/p-67b25dfc.entry.js.map +0 -1
- package/dist/core/p-895d05f9.entry.js.map +0 -1
- package/dist/core/p-94e47a21.entry.js +0 -2
- package/dist/core/p-952bdeb2.entry.js +0 -2
- package/dist/core/p-952bdeb2.entry.js.map +0 -1
- package/dist/core/p-95c8513d.entry.js.map +0 -1
- package/dist/core/p-a44c0351.entry.js +0 -2
- package/dist/core/p-a44c0351.entry.js.map +0 -1
- package/dist/core/p-a7f4168c.entry.js +0 -2
- 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-cc99e774.entry.js +0 -2
- package/dist/core/p-cc99e774.entry.js.map +0 -1
- package/dist/core/p-ce2162a2.entry.js +0 -2
- package/dist/core/p-cf3f9b02.entry.js +0 -2
- package/dist/core/p-cf3f9b02.entry.js.map +0 -1
- package/dist/core/p-d61ef782.entry.js +0 -2
- package/dist/core/p-d61ef782.entry.js.map +0 -1
- package/dist/esm/helpers-147b5b73.js.map +0 -1
- package/dist/esm/helpers-25eb1cb0.js.map +0 -1
- /package/dist/core/{p-56e19b01.entry.js.map → p-0229eb46.entry.js.map} +0 -0
- /package/dist/core/{p-05c9dee1.entry.js.map → p-03a99326.entry.js.map} +0 -0
- /package/dist/core/{p-77637e28.entry.js.map → p-03d83d2c.entry.js.map} +0 -0
- /package/dist/core/{p-19a9ab60.entry.js.map → p-05f900e5.entry.js.map} +0 -0
- /package/dist/core/{p-120a38ce.entry.js.map → p-0c7d30f5.entry.js.map} +0 -0
- /package/dist/core/{p-6bd76154.entry.js.map → p-124279fa.entry.js.map} +0 -0
- /package/dist/core/{p-5dc274f0.entry.js.map → p-29a040ef.entry.js.map} +0 -0
- /package/dist/core/{p-456282e2.entry.js.map → p-2b61d283.entry.js.map} +0 -0
- /package/dist/core/{p-40471551.entry.js.map → p-3156304b.entry.js.map} +0 -0
- /package/dist/core/{p-f0e85611.entry.js.map → p-3169d95e.entry.js.map} +0 -0
- /package/dist/core/{p-0bc92c30.entry.js.map → p-34de5ffb.entry.js.map} +0 -0
- /package/dist/core/{p-89ec372e.entry.js.map → p-382b88b2.entry.js.map} +0 -0
- /package/dist/core/{p-ce90d1b2.entry.js.map → p-3a2523df.entry.js.map} +0 -0
- /package/dist/core/{p-c32f4c0f.entry.js.map → p-3b1c88ad.entry.js.map} +0 -0
- /package/dist/core/{p-7e20c194.entry.js.map → p-4084bce2.entry.js.map} +0 -0
- /package/dist/core/{p-59e677e4.entry.js.map → p-4f118361.entry.js.map} +0 -0
- /package/dist/core/{p-89290d94.entry.js.map → p-5f71f24c.entry.js.map} +0 -0
- /package/dist/core/{p-48b62c20.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-5041cbeb.entry.js.map → p-7bba4c47.entry.js.map} +0 -0
- /package/dist/core/{p-1419c8ae.entry.js.map → p-8c2c86b5.entry.js.map} +0 -0
- /package/dist/core/{p-73dab780.entry.js.map → p-8ef60479.entry.js.map} +0 -0
- /package/dist/core/{p-1b5a47c6.entry.js.map → p-a3d903e4.entry.js.map} +0 -0
- /package/dist/core/{p-d0d2952b.entry.js.map → p-a4088bd7.entry.js.map} +0 -0
- /package/dist/core/{p-9271a06b.entry.js.map → p-a6fb5fe3.entry.js.map} +0 -0
- /package/dist/core/{p-43f87eb3.entry.js.map → p-aabb04c8.entry.js.map} +0 -0
- /package/dist/core/{p-ad786103.entry.js.map → p-b02ad2c4.entry.js.map} +0 -0
- /package/dist/core/{p-85101c9a.entry.js.map → p-ba353ac3.entry.js.map} +0 -0
- /package/dist/core/{p-ab485b11.entry.js.map → p-bc24c004.entry.js.map} +0 -0
- /package/dist/core/{p-96a909bf.entry.js.map → p-c0242c21.entry.js.map} +0 -0
- /package/dist/core/{p-516de675.entry.js.map → p-c1b268fd.entry.js.map} +0 -0
- /package/dist/core/{p-9ce35989.entry.js.map → p-d062a801.entry.js.map} +0 -0
- /package/dist/core/{p-9b85340f.entry.js.map → p-d2260763.entry.js.map} +0 -0
- /package/dist/core/{p-1eb5d7f3.entry.js.map → p-d8988d8c.entry.js.map} +0 -0
- /package/dist/core/{p-782cd387.entry.js.map → p-deedc7d3.entry.js.map} +0 -0
- /package/dist/core/{p-09d4fe07.entry.js.map → p-e7b913e5.entry.js.map} +0 -0
- /package/dist/core/{p-a7f4168c.entry.js.map → p-e85505ec.entry.js.map} +0 -0
- /package/dist/core/{p-9445c2f3.entry.js.map → p-f237940d.entry.js.map} +0 -0
- /package/dist/core/{p-522b1526.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 &&
|
@@ -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"), target: cellValue("target") || undefined, rel: cellValue("rel") || undefined }, 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;
|
@@ -354,11 +368,15 @@ const DataTable = class {
|
|
354
368
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
355
369
|
["with-overflow"]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element",
|
356
370
|
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, this.isObject(cell) &&
|
357
|
-
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")
|
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))));
|
358
376
|
}
|
359
377
|
});
|
360
378
|
};
|
361
|
-
this.createColumnHeaders = () => this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
379
|
+
this.createColumnHeaders = () => (this.columns || []).map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
362
380
|
["column-header"]: true,
|
363
381
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
364
382
|
["updating-state-headers"]: this.updating && !this.loading,
|
@@ -387,6 +405,9 @@ const DataTable = class {
|
|
387
405
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
388
406
|
} }, title)))));
|
389
407
|
this.onRowClick = (row) => {
|
408
|
+
if (!this.loading && !this.updating) {
|
409
|
+
this.icSelectedRowChange.emit(this.selectedRow !== row ? row : null);
|
410
|
+
}
|
390
411
|
this.selectedRow =
|
391
412
|
this.selectedRow !== row && !this.loading && !this.updating && row;
|
392
413
|
};
|
@@ -417,7 +438,7 @@ const DataTable = class {
|
|
417
438
|
// eslint-disable-next-line react/jsx-no-bind
|
418
439
|
onClick: () => this.onRowClick(row), class: {
|
419
440
|
["table-row"]: true,
|
420
|
-
["table-row-selected"]: this.selectedRow === row,
|
441
|
+
["table-row-selected"]: this.highlightSelectedRow && this.selectedRow === row,
|
421
442
|
}
|
422
443
|
}, this.createCells(row, index)));
|
423
444
|
});
|
@@ -487,7 +508,8 @@ const DataTable = class {
|
|
487
508
|
});
|
488
509
|
};
|
489
510
|
this.getTypographyElements = () => {
|
490
|
-
|
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)"));
|
491
513
|
};
|
492
514
|
this.getTooltip = (typographyEl) => {
|
493
515
|
return typographyEl.closest(this.TOOLTIP);
|
@@ -498,7 +520,7 @@ const DataTable = class {
|
|
498
520
|
const cellContainer = this.getCellContainer(typographyEl);
|
499
521
|
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
500
522
|
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
501
|
-
typographyEl.setAttribute("style",
|
523
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
502
524
|
return;
|
503
525
|
}
|
504
526
|
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
@@ -507,6 +529,56 @@ const DataTable = class {
|
|
507
529
|
this.updateScrollOffset = () => {
|
508
530
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
509
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
|
+
};
|
510
582
|
this.setTableDimensions = () => {
|
511
583
|
let tableHostDimensions = {};
|
512
584
|
if (this.width) {
|
@@ -523,22 +595,79 @@ const DataTable = class {
|
|
523
595
|
}
|
524
596
|
return tableHostDimensions;
|
525
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
|
+
};
|
526
609
|
this.fixCellTooltips = () => {
|
527
610
|
const elements = this.el.shadowRoot.querySelectorAll(".data-type-element");
|
528
611
|
elements.forEach((element) => {
|
529
612
|
const slotElements = getSlotElements(element);
|
530
|
-
slotElements.forEach((slottedEl) => {
|
531
|
-
|
532
|
-
const tooltipEl = (slottedEl.tagName === "IC-TOOLTIP"
|
533
|
-
? slottedEl
|
534
|
-
: (_a = slottedEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
535
|
-
if (tooltipEl) {
|
536
|
-
tooltipEl.setExternalPopperProps({
|
537
|
-
strategy: "fixed",
|
538
|
-
});
|
539
|
-
}
|
613
|
+
slotElements === null || slotElements === void 0 ? void 0 : slotElements.forEach((slottedEl) => {
|
614
|
+
this.fixCellTooltip(slottedEl);
|
540
615
|
});
|
541
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
|
+
}
|
542
671
|
};
|
543
672
|
this.fromRow = 0;
|
544
673
|
this.previousRowsPerPage = undefined;
|
@@ -559,6 +688,7 @@ const DataTable = class {
|
|
559
688
|
this.embedded = false;
|
560
689
|
this.globalRowHeight = "auto";
|
561
690
|
this.height = undefined;
|
691
|
+
this.highlightSelectedRow = true;
|
562
692
|
this.hideColumnHeaders = false;
|
563
693
|
this.loading = false;
|
564
694
|
this.loadingOptions = undefined;
|
@@ -581,6 +711,7 @@ const DataTable = class {
|
|
581
711
|
pageLabel: "Page",
|
582
712
|
hideRangeLabel: false,
|
583
713
|
hideAllFromItemsPerPage: false,
|
714
|
+
setToFirstPageOnPaginationChange: false,
|
584
715
|
};
|
585
716
|
this.showPagination = false;
|
586
717
|
this.sortable = false;
|
@@ -617,13 +748,13 @@ const DataTable = class {
|
|
617
748
|
(_b = this.headerResizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
618
749
|
}
|
619
750
|
componentWillLoad() {
|
620
|
-
var _a;
|
751
|
+
var _a, _b;
|
621
752
|
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
622
753
|
this.previousRowsPerPage = this.rowsPerPage;
|
623
754
|
this.toRow = this.rowsPerPage;
|
624
755
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
625
756
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
626
|
-
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
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) });
|
627
758
|
this.initialLoad = true;
|
628
759
|
this.previousItemsPerPage = this.rowsPerPage;
|
629
760
|
}
|
@@ -654,6 +785,7 @@ const DataTable = class {
|
|
654
785
|
if (this.globalRowHeight !== "auto") {
|
655
786
|
this.updateSetRowHeight();
|
656
787
|
}
|
788
|
+
window.addEventListener("resize", this.updateCellHeightsWithDescriptions);
|
657
789
|
}
|
658
790
|
componentDidUpdate() {
|
659
791
|
// truncation updates invoked here once new/updated data has
|
@@ -665,6 +797,7 @@ const DataTable = class {
|
|
665
797
|
}
|
666
798
|
componentDidRender() {
|
667
799
|
this.fixCellTooltips();
|
800
|
+
this.updateCellHeightsWithDescriptions();
|
668
801
|
this.adjustWidthForActionElement();
|
669
802
|
}
|
670
803
|
truncateUpdatedData() {
|
@@ -723,7 +856,7 @@ const DataTable = class {
|
|
723
856
|
cellContainer.style.height = null;
|
724
857
|
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
725
858
|
this.removeTooltip(cellContainer, typographyEl, tooltipEl);
|
726
|
-
typographyEl.setAttribute("style",
|
859
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
727
860
|
}
|
728
861
|
else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
729
862
|
this.resetShowHideTruncation(typographyEl);
|
@@ -734,7 +867,8 @@ const DataTable = class {
|
|
734
867
|
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
735
868
|
// If the set row height is bigger than the cell container even
|
736
869
|
// with textWrap, set the row height
|
737
|
-
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) &&
|
738
872
|
rowHeight > cellContainer.clientHeight &&
|
739
873
|
!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
740
874
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -767,7 +901,7 @@ const DataTable = class {
|
|
767
901
|
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
768
902
|
newRows.forEach((row) => {
|
769
903
|
row
|
770
|
-
.querySelectorAll(
|
904
|
+
.querySelectorAll(this.IC_TYPOGRAPHY_STRING)
|
771
905
|
.forEach((typographyEl) => {
|
772
906
|
const cellContainer = this.getCellContainer(typographyEl);
|
773
907
|
const tooltipEl = this.getTooltip(typographyEl);
|
@@ -829,9 +963,17 @@ const DataTable = class {
|
|
829
963
|
}
|
830
964
|
}
|
831
965
|
}
|
832
|
-
createShowHideTruncation(typographyEl, cellContainer) {
|
966
|
+
createShowHideTruncation(typographyEl, cellContainer, descriptionHeight) {
|
833
967
|
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
834
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
|
+
}
|
835
977
|
typographyEl.setShowHideExpanded(false);
|
836
978
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
837
979
|
}
|
@@ -938,7 +1080,8 @@ const DataTable = class {
|
|
938
1080
|
this.truncationPatternUpdated = true;
|
939
1081
|
}
|
940
1082
|
async dataHandler(newData) {
|
941
|
-
|
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) });
|
942
1085
|
if (this.loading) {
|
943
1086
|
!this.hasLoadedForOneSecond
|
944
1087
|
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
@@ -965,7 +1108,7 @@ const DataTable = class {
|
|
965
1108
|
typographyEl.setShowHideExpanded(false);
|
966
1109
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
967
1110
|
}
|
968
|
-
else {
|
1111
|
+
else if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)) {
|
969
1112
|
typographyEl.resetTruncation().then(() => {
|
970
1113
|
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
971
1114
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -1001,8 +1144,11 @@ const DataTable = class {
|
|
1001
1144
|
this.variableRowHeight = null;
|
1002
1145
|
}
|
1003
1146
|
showLoadingIndicator() {
|
1004
|
-
var _a;
|
1005
|
-
(_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");
|
1006
1152
|
}
|
1007
1153
|
getRowOptions(rowKeys, rowValues) {
|
1008
1154
|
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
@@ -1031,20 +1177,40 @@ const DataTable = class {
|
|
1031
1177
|
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
1032
1178
|
this.truncationPattern === this.TOOLTIP_STRING) {
|
1033
1179
|
if (!typographyEl.getAttribute("style") ||
|
1034
|
-
typographyEl.style.cssText.includes(
|
1180
|
+
typographyEl.style.cssText.includes(`${this.LINE_CLAMP_CSS_VARIABLE}: 0;`)) {
|
1035
1181
|
this.addLineClampCSS(typographyEl, cellContainer);
|
1036
1182
|
}
|
1037
1183
|
this.createTruncationTooltip(typographyEl, cellContainer);
|
1038
1184
|
}
|
1039
1185
|
}
|
1040
1186
|
removeTooltip(cellContainer, typographyEl, tooltip) {
|
1041
|
-
cellContainer.
|
1187
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1188
|
+
cellTextWrapper.prepend(typographyEl);
|
1042
1189
|
if (tooltip) {
|
1043
1190
|
tooltip.remove();
|
1044
1191
|
}
|
1045
1192
|
}
|
1046
1193
|
addLineClampCSS(typographyEl, cellContainer) {
|
1047
|
-
|
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
|
+
}
|
1048
1214
|
}
|
1049
1215
|
createTruncationTooltip(typographyEl, cellContainer) {
|
1050
1216
|
const tooltipEl = document.createElement(this.IC_TOOLTIP_STRING);
|
@@ -1055,12 +1221,13 @@ const DataTable = class {
|
|
1055
1221
|
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
1056
1222
|
strategy: "fixed",
|
1057
1223
|
});
|
1058
|
-
cellContainer.
|
1059
|
-
|
1224
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1225
|
+
cellTextWrapper.prepend(tooltipEl);
|
1226
|
+
tooltipEl.prepend(typographyEl);
|
1060
1227
|
}
|
1061
1228
|
render() {
|
1062
1229
|
var _a;
|
1063
|
-
const { caption, createColumnHeaders,
|
1230
|
+
const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
1064
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: {
|
1065
1232
|
["table-row-container"]: true,
|
1066
1233
|
scrollable,
|
@@ -1071,13 +1238,7 @@ const DataTable = class {
|
|
1071
1238
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
1072
1239
|
} }, h("tr", null, createColumnHeaders()))), updating &&
|
1073
1240
|
!loading &&
|
1074
|
-
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data
|
1075
|
-
!loading &&
|
1076
|
-
(isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
1077
|
-
"loading-empty": loading,
|
1078
|
-
loading: true,
|
1079
|
-
"show-background": loadingOptions.showBackground,
|
1080
|
-
}, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })), (showPagination || isSlotUsed(this.el, "pagination-bar")) && (h("div", { class: "pagination-container" }, isSlotUsed(this.el, "pagination-bar") ? (h("slot", { name: "pagination-bar" })) : (h("ic-pagination-bar", { totalItems: (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0, type: paginationBarOptions.type, rangeLabelType: paginationBarOptions.rangeLabelType, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, showGoToPageControl: paginationBarOptions.showGoToPageControl, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, alignment: paginationBarOptions.alignment, 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
|
1081
1242
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
1082
1243
|
: "table unsorted")))));
|
1083
1244
|
}
|