@ukic/canary-web-components 2.0.0-canary.32 → 2.0.0-canary.34
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 +211 -49
- 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 +17 -4
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +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 +22 -19
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +12 -4
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +3 -2
- 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 +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 +246 -51
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +214 -6
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +64 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-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 +212 -49
- 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-dialog.js +16 -3
- package/dist/components/ic-dialog.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 +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-radio-group.js +21 -18
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +12 -4
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +3 -2
- 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 +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-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-1c0bbd2a.entry.js +2 -0
- package/dist/core/p-1c0bbd2a.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-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-1eb5d7f3.entry.js → p-72a584f4.entry.js} +2 -2
- package/dist/core/{p-1eb5d7f3.entry.js.map → p-72a584f4.entry.js.map} +1 -1
- 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-7e909871.entry.js +2 -0
- package/dist/core/p-7e909871.entry.js.map +1 -0
- 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-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-d9f8f96d.entry.js +2 -0
- package/dist/core/p-d9f8f96d.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-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-522b1526.entry.js → p-f4b76daa.entry.js} +2 -2
- package/dist/core/p-ff35dcea.entry.js +2 -0
- package/dist/core/p-ff35dcea.entry.js.map +1 -0
- 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 +211 -49
- 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 +17 -4
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +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 +22 -19
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +12 -4
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +3 -2
- 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 +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 +398 -171
- 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-19a9ab60.entry.js +0 -2
- package/dist/core/p-19a9ab60.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-9445c2f3.entry.js +0 -2
- package/dist/core/p-9445c2f3.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-9ce35989.entry.js +0 -2
- package/dist/core/p-9ce35989.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-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-9b85340f.entry.js.map → p-d2260763.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-522b1526.entry.js.map → p-f4b76daa.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
|
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 './helpers2.js';
|
3
3
|
import { d as defineCustomElement$h } from './ic-button2.js';
|
4
4
|
import { d as defineCustomElement$g } from './ic-empty-state2.js';
|
5
5
|
import { d as defineCustomElement$f } from './ic-input-component-container2.js';
|
@@ -29,7 +29,7 @@ const descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 2
|
|
29
29
|
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
30
30
|
</svg>`;
|
31
31
|
|
32
|
-
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{
|
32
|
+
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}}";
|
33
33
|
|
34
34
|
const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLElement {
|
35
35
|
constructor() {
|
@@ -37,6 +37,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
37
37
|
this.__registerHost();
|
38
38
|
this.__attachShadow();
|
39
39
|
this.icRowHeightChange = createEvent(this, "icRowHeightChange", 7);
|
40
|
+
this.icSelectedRowChange = createEvent(this, "icSelectedRowChange", 7);
|
40
41
|
this.icSortChange = createEvent(this, "icSortChange", 7);
|
41
42
|
this.DENSITY_HEIGHT_MULTIPLIER = {
|
42
43
|
dense: 0.8,
|
@@ -68,6 +69,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
68
69
|
this.itemsPerPageChange = false;
|
69
70
|
this.DATA_ROW_HEIGHT_STRING = "data-row-height";
|
70
71
|
this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
|
72
|
+
this.LINE_CLAMP_CSS_VARIABLE = "--ic-line-clamp";
|
71
73
|
this.DEFAULT_LINE_HEIGHT = 24;
|
72
74
|
this.densityUpdate = false;
|
73
75
|
this.truncationPatternUpdated = false;
|
@@ -75,6 +77,10 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
75
77
|
this.headerResizeObserver = null;
|
76
78
|
this.IC_TOOLTIP_STRING = "ic-tooltip";
|
77
79
|
this.SHOW_TRUNC_TOOLTIP_STRING = "show-trunc-tooltip";
|
80
|
+
this.CELL_DESCRIPTION_STRING = ".cell-description";
|
81
|
+
this.CELL_CONTAINER_WITH_DESCRIPTION_STRING = "cell-container-with-description";
|
82
|
+
this.CELL_TEXT_WRAPPER_STRING = ".cell-text-wrapper";
|
83
|
+
this.IC_TYPOGRAPHY_STRING = "ic-typography";
|
78
84
|
this.runHeaderResizeObserver = () => {
|
79
85
|
this.headerResizeObserver = new ResizeObserver(() => {
|
80
86
|
this.headerResizeCallback();
|
@@ -88,7 +94,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
88
94
|
const headers = this.el.shadowRoot.querySelectorAll("th.column-header");
|
89
95
|
headers.forEach((header) => {
|
90
96
|
const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);
|
91
|
-
const typographyEls = header.querySelectorAll(
|
97
|
+
const typographyEls = header.querySelectorAll(this.IC_TYPOGRAPHY_STRING);
|
92
98
|
if (tooltip && typographyEls && typographyEls.length === 2) {
|
93
99
|
tooltip.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);
|
94
100
|
if (typographyEls[1].clientWidth > typographyEls[0].clientWidth) {
|
@@ -156,8 +162,9 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
156
162
|
}
|
157
163
|
else {
|
158
164
|
if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
|
159
|
-
typographyEl.setAttribute("style",
|
160
|
-
cellContainer.
|
165
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
166
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
167
|
+
cellTextWrapper.prepend(typographyEl);
|
161
168
|
tooltip.remove();
|
162
169
|
}
|
163
170
|
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
@@ -309,11 +316,11 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
309
316
|
});
|
310
317
|
};
|
311
318
|
this.createCellContent = (columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis) => {
|
312
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
313
320
|
return (h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
314
321
|
!isSlotUsed(this.el, cellSlotName)
|
315
322
|
? cell
|
316
|
-
: 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) ||
|
323
|
+
: 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) ||
|
317
324
|
((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
318
325
|
rowAlignment ||
|
319
326
|
this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
|
@@ -325,18 +332,25 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
325
332
|
!!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
|
326
333
|
!!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) ||
|
327
334
|
(rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
|
328
|
-
!!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
|
335
|
+
!!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
|
329
336
|
? this.setRowHeight(currentRowHeight)
|
330
337
|
: 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)) &&
|
331
338
|
(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" &&
|
332
|
-
!isSlotUsed(this.el, cellSlotName) && (h("
|
339
|
+
!isSlotUsed(this.el, cellSlotName) && (h("div", { class: {
|
340
|
+
"cell-text-wrapper": true,
|
341
|
+
"cell-text-no-wrap": !this.truncationPattern,
|
342
|
+
} }, h("ic-typography", { variant: "body", class: {
|
333
343
|
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
334
344
|
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
335
345
|
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
336
346
|
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
337
347
|
!!rowEmphasis,
|
338
348
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
339
|
-
} }, 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))))
|
349
|
+
} }, 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) &&
|
350
|
+
Object.keys(cell).includes("description") && (h("div", { class: {
|
351
|
+
["cell-description"]: true,
|
352
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
353
|
+
} }, ((_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"))))))))));
|
340
354
|
};
|
341
355
|
this.createCells = (row, rowIndex) => {
|
342
356
|
var _a;
|
@@ -372,11 +386,15 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
372
386
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
373
387
|
["with-overflow"]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element",
|
374
388
|
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, this.isObject(cell) &&
|
375
|
-
Object.keys(cell).includes("actionElement") ? (h("div", { class: "cell-grid-wrapper" }, this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis), h("span", { class: "action-element", innerHTML: cellValue("actionElement")
|
389
|
+
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"),
|
390
|
+
// eslint-disable-next-line react/jsx-no-bind
|
391
|
+
onClick: cell.actionOnClick
|
392
|
+
? () => this.handleClick(cell.actionOnClick)
|
393
|
+
: undefined }))) : (this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis))));
|
376
394
|
}
|
377
395
|
});
|
378
396
|
};
|
379
|
-
this.createColumnHeaders = () => this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
397
|
+
this.createColumnHeaders = () => (this.columns || []).map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
380
398
|
["column-header"]: true,
|
381
399
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
382
400
|
["updating-state-headers"]: this.updating && !this.loading,
|
@@ -405,6 +423,9 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
405
423
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
406
424
|
} }, title)))));
|
407
425
|
this.onRowClick = (row) => {
|
426
|
+
if (!this.loading && !this.updating) {
|
427
|
+
this.icSelectedRowChange.emit(this.selectedRow !== row ? row : null);
|
428
|
+
}
|
408
429
|
this.selectedRow =
|
409
430
|
this.selectedRow !== row && !this.loading && !this.updating && row;
|
410
431
|
};
|
@@ -435,7 +456,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
435
456
|
// eslint-disable-next-line react/jsx-no-bind
|
436
457
|
onClick: () => this.onRowClick(row), class: {
|
437
458
|
["table-row"]: true,
|
438
|
-
["table-row-selected"]: this.selectedRow === row,
|
459
|
+
["table-row-selected"]: this.highlightSelectedRow && this.selectedRow === row,
|
439
460
|
}
|
440
461
|
}, this.createCells(row, index)));
|
441
462
|
});
|
@@ -505,7 +526,8 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
505
526
|
});
|
506
527
|
};
|
507
528
|
this.getTypographyElements = () => {
|
508
|
-
|
529
|
+
// Filter out column headers and cell descriptions
|
530
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text,.cell-description-text)"));
|
509
531
|
};
|
510
532
|
this.getTooltip = (typographyEl) => {
|
511
533
|
return typographyEl.closest(this.TOOLTIP);
|
@@ -516,7 +538,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
516
538
|
const cellContainer = this.getCellContainer(typographyEl);
|
517
539
|
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
518
540
|
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
519
|
-
typographyEl.setAttribute("style",
|
541
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
520
542
|
return;
|
521
543
|
}
|
522
544
|
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
@@ -525,6 +547,56 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
525
547
|
this.updateScrollOffset = () => {
|
526
548
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
527
549
|
};
|
550
|
+
this.updateRowHeightForDescriptions = (rowHeight, cellContainer) => {
|
551
|
+
cellContainer.setAttribute("data-row-height", rowHeight.toString());
|
552
|
+
cellContainer.setAttribute("style", `${this.ROW_HEIGHT_CSS_VARIABLE}: ${rowHeight}px`);
|
553
|
+
};
|
554
|
+
// Method to update the row heights on cells with descriptions and tooltip truncation
|
555
|
+
this.updateCellHeightsWithDescriptions = () => {
|
556
|
+
const descriptions = this.el.shadowRoot.querySelectorAll(this.CELL_DESCRIPTION_STRING);
|
557
|
+
descriptions.forEach((description) => {
|
558
|
+
const cellContainer = description.closest(`.${this.CELL_CONTAINER_WITH_DESCRIPTION_STRING}`);
|
559
|
+
const typography = cellContainer.querySelector(this.IC_TYPOGRAPHY_STRING);
|
560
|
+
const descriptionMarginTop = window
|
561
|
+
.getComputedStyle(description)
|
562
|
+
.getPropertyValue("margin-top");
|
563
|
+
const descriptionHeight = description.clientHeight + parseInt(descriptionMarginTop, 10);
|
564
|
+
if (this.globalRowHeight && this.globalRowHeight !== "auto") {
|
565
|
+
if (!typography.textContent &&
|
566
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight) {
|
567
|
+
this.updateRowHeightForDescriptions(descriptionHeight, cellContainer);
|
568
|
+
}
|
569
|
+
else if (this.truncationPattern === this.TOOLTIP_STRING) {
|
570
|
+
if (descriptionHeight + this.DEFAULT_LINE_HEIGHT >
|
571
|
+
this.globalRowHeight) {
|
572
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
573
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS) && cellIcon) {
|
574
|
+
// recalculate descriptionHeight as when a word break occurs this value changes
|
575
|
+
// Additional spacing given for 300-400% zoom
|
576
|
+
this.updateRowHeightForDescriptions(descriptionHeight +
|
577
|
+
this.DEFAULT_LINE_HEIGHT +
|
578
|
+
cellIcon.clientHeight, cellContainer);
|
579
|
+
}
|
580
|
+
else {
|
581
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
582
|
+
}
|
583
|
+
}
|
584
|
+
this.addLineClampCSS(typography, cellContainer);
|
585
|
+
// Additional case for show/hide truncation for when a description is present, but the text
|
586
|
+
// isn't overflowing the cell to trigger the show more button to appear.
|
587
|
+
}
|
588
|
+
else if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
589
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight &&
|
590
|
+
typography.style.getPropertyValue("--truncation-max-lines") !==
|
591
|
+
"initial") {
|
592
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
593
|
+
if (descriptionHeight) {
|
594
|
+
this.createShowHideTruncation(typography, cellContainer, descriptionHeight);
|
595
|
+
}
|
596
|
+
}
|
597
|
+
}
|
598
|
+
});
|
599
|
+
};
|
528
600
|
this.setTableDimensions = () => {
|
529
601
|
let tableHostDimensions = {};
|
530
602
|
if (this.width) {
|
@@ -541,22 +613,79 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
541
613
|
}
|
542
614
|
return tableHostDimensions;
|
543
615
|
};
|
616
|
+
this.fixCellTooltip = (element) => {
|
617
|
+
var _a;
|
618
|
+
const tooltipEl = (element.tagName === "IC-TOOLTIP"
|
619
|
+
? element
|
620
|
+
: (_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
621
|
+
if (tooltipEl) {
|
622
|
+
tooltipEl.setExternalPopperProps({
|
623
|
+
strategy: "fixed",
|
624
|
+
});
|
625
|
+
}
|
626
|
+
};
|
544
627
|
this.fixCellTooltips = () => {
|
545
628
|
const elements = this.el.shadowRoot.querySelectorAll(".data-type-element");
|
546
629
|
elements.forEach((element) => {
|
547
630
|
const slotElements = getSlotElements(element);
|
548
|
-
slotElements.forEach((slottedEl) => {
|
549
|
-
|
550
|
-
const tooltipEl = (slottedEl.tagName === "IC-TOOLTIP"
|
551
|
-
? slottedEl
|
552
|
-
: (_a = slottedEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
553
|
-
if (tooltipEl) {
|
554
|
-
tooltipEl.setExternalPopperProps({
|
555
|
-
strategy: "fixed",
|
556
|
-
});
|
557
|
-
}
|
631
|
+
slotElements === null || slotElements === void 0 ? void 0 : slotElements.forEach((slottedEl) => {
|
632
|
+
this.fixCellTooltip(slottedEl);
|
558
633
|
});
|
559
634
|
});
|
635
|
+
const actionElements = this.el.shadowRoot.querySelectorAll(".action-element");
|
636
|
+
actionElements === null || actionElements === void 0 ? void 0 : actionElements.forEach((actionElementSpan) => {
|
637
|
+
const actionElement = actionElementSpan.firstChild;
|
638
|
+
if (actionElement) {
|
639
|
+
this.fixCellTooltip(actionElement);
|
640
|
+
}
|
641
|
+
});
|
642
|
+
};
|
643
|
+
this.handleClick = (callback) => callback();
|
644
|
+
this.renderTableBody = (data, loading, overlay) => {
|
645
|
+
if (!(data === null || data === void 0 ? void 0 : data.length))
|
646
|
+
return;
|
647
|
+
if (overlay && loading) {
|
648
|
+
return h("tbody", null, this.createRows());
|
649
|
+
}
|
650
|
+
else if (loading && !overlay) {
|
651
|
+
return null;
|
652
|
+
}
|
653
|
+
else {
|
654
|
+
return h("tbody", null, this.createRows());
|
655
|
+
}
|
656
|
+
};
|
657
|
+
this.renderLoadingIndicator = (isLoading, loadingOptions) => {
|
658
|
+
if (!isLoading)
|
659
|
+
return null;
|
660
|
+
return (h(Fragment, null, h("div", { class: "loading-overlay", ref: (el) => (this.loadingOverlay = el) }), h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
661
|
+
"loading-empty": isLoading,
|
662
|
+
loading: true,
|
663
|
+
"show-background": loadingOptions.showBackground || loadingOptions.overlay,
|
664
|
+
}, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })));
|
665
|
+
};
|
666
|
+
this.renderAriaLiveLoading = () => {
|
667
|
+
var _a, _b;
|
668
|
+
if (this.loading) {
|
669
|
+
return ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.label) || "Loading...";
|
670
|
+
}
|
671
|
+
else if (this.updating) {
|
672
|
+
return ((_b = this.updatingOptions) === null || _b === void 0 ? void 0 : _b.description) || "Updating table data";
|
673
|
+
}
|
674
|
+
else {
|
675
|
+
return "";
|
676
|
+
}
|
677
|
+
};
|
678
|
+
this.renderEmptyState = (data, loading, overlay) => {
|
679
|
+
const emptyStateEl = isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" }));
|
680
|
+
if (loading && !(data === null || data === void 0 ? void 0 : data.length) && overlay) {
|
681
|
+
return emptyStateEl;
|
682
|
+
}
|
683
|
+
else if (!loading && !(data === null || data === void 0 ? void 0 : data.length)) {
|
684
|
+
return emptyStateEl;
|
685
|
+
}
|
686
|
+
else {
|
687
|
+
return null;
|
688
|
+
}
|
560
689
|
};
|
561
690
|
this.fromRow = 0;
|
562
691
|
this.previousRowsPerPage = undefined;
|
@@ -577,6 +706,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
577
706
|
this.embedded = false;
|
578
707
|
this.globalRowHeight = "auto";
|
579
708
|
this.height = undefined;
|
709
|
+
this.highlightSelectedRow = true;
|
580
710
|
this.hideColumnHeaders = false;
|
581
711
|
this.loading = false;
|
582
712
|
this.loadingOptions = undefined;
|
@@ -599,6 +729,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
599
729
|
pageLabel: "Page",
|
600
730
|
hideRangeLabel: false,
|
601
731
|
hideAllFromItemsPerPage: false,
|
732
|
+
setToFirstPageOnPaginationChange: false,
|
602
733
|
};
|
603
734
|
this.showPagination = false;
|
604
735
|
this.sortable = false;
|
@@ -635,13 +766,13 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
635
766
|
(_b = this.headerResizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
636
767
|
}
|
637
768
|
componentWillLoad() {
|
638
|
-
var _a;
|
769
|
+
var _a, _b;
|
639
770
|
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
640
771
|
this.previousRowsPerPage = this.rowsPerPage;
|
641
772
|
this.toRow = this.rowsPerPage;
|
642
773
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
643
774
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
644
|
-
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
775
|
+
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) });
|
645
776
|
this.initialLoad = true;
|
646
777
|
this.previousItemsPerPage = this.rowsPerPage;
|
647
778
|
}
|
@@ -672,6 +803,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
672
803
|
if (this.globalRowHeight !== "auto") {
|
673
804
|
this.updateSetRowHeight();
|
674
805
|
}
|
806
|
+
window.addEventListener("resize", this.updateCellHeightsWithDescriptions);
|
675
807
|
}
|
676
808
|
componentDidUpdate() {
|
677
809
|
// truncation updates invoked here once new/updated data has
|
@@ -683,6 +815,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
683
815
|
}
|
684
816
|
componentDidRender() {
|
685
817
|
this.fixCellTooltips();
|
818
|
+
this.updateCellHeightsWithDescriptions();
|
686
819
|
this.adjustWidthForActionElement();
|
687
820
|
}
|
688
821
|
truncateUpdatedData() {
|
@@ -741,7 +874,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
741
874
|
cellContainer.style.height = null;
|
742
875
|
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
743
876
|
this.removeTooltip(cellContainer, typographyEl, tooltipEl);
|
744
|
-
typographyEl.setAttribute("style",
|
877
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
745
878
|
}
|
746
879
|
else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
747
880
|
this.resetShowHideTruncation(typographyEl);
|
@@ -752,7 +885,8 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
752
885
|
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
753
886
|
// If the set row height is bigger than the cell container even
|
754
887
|
// with textWrap, set the row height
|
755
|
-
if (!
|
888
|
+
if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
889
|
+
!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
|
756
890
|
rowHeight > cellContainer.clientHeight &&
|
757
891
|
!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
758
892
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -785,7 +919,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
785
919
|
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
786
920
|
newRows.forEach((row) => {
|
787
921
|
row
|
788
|
-
.querySelectorAll(
|
922
|
+
.querySelectorAll(this.IC_TYPOGRAPHY_STRING)
|
789
923
|
.forEach((typographyEl) => {
|
790
924
|
const cellContainer = this.getCellContainer(typographyEl);
|
791
925
|
const tooltipEl = this.getTooltip(typographyEl);
|
@@ -847,9 +981,17 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
847
981
|
}
|
848
982
|
}
|
849
983
|
}
|
850
|
-
createShowHideTruncation(typographyEl, cellContainer) {
|
984
|
+
createShowHideTruncation(typographyEl, cellContainer, descriptionHeight) {
|
851
985
|
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
852
986
|
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
987
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
988
|
+
descriptionHeight) {
|
989
|
+
typographyEl.setAttribute("max-lines", `${Math.floor(((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - descriptionHeight) /
|
990
|
+
this.DEFAULT_LINE_HEIGHT)}`);
|
991
|
+
}
|
992
|
+
else {
|
993
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
994
|
+
}
|
853
995
|
typographyEl.setShowHideExpanded(false);
|
854
996
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
855
997
|
}
|
@@ -956,7 +1098,8 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
956
1098
|
this.truncationPatternUpdated = true;
|
957
1099
|
}
|
958
1100
|
async dataHandler(newData) {
|
959
|
-
|
1101
|
+
var _a;
|
1102
|
+
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) });
|
960
1103
|
if (this.loading) {
|
961
1104
|
!this.hasLoadedForOneSecond
|
962
1105
|
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
@@ -983,7 +1126,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
983
1126
|
typographyEl.setShowHideExpanded(false);
|
984
1127
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
985
1128
|
}
|
986
|
-
else {
|
1129
|
+
else if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)) {
|
987
1130
|
typographyEl.resetTruncation().then(() => {
|
988
1131
|
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
989
1132
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -1019,8 +1162,11 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1019
1162
|
this.variableRowHeight = null;
|
1020
1163
|
}
|
1021
1164
|
showLoadingIndicator() {
|
1022
|
-
var _a;
|
1023
|
-
(_a = this.
|
1165
|
+
var _a, _b, _c;
|
1166
|
+
if ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.overlay) {
|
1167
|
+
(_b = this.loadingOverlay) === null || _b === void 0 ? void 0 : _b.classList.add("show");
|
1168
|
+
}
|
1169
|
+
(_c = this.loadingIndicator) === null || _c === void 0 ? void 0 : _c.classList.add("show");
|
1024
1170
|
}
|
1025
1171
|
getRowOptions(rowKeys, rowValues) {
|
1026
1172
|
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
@@ -1049,20 +1195,41 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1049
1195
|
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
1050
1196
|
this.truncationPattern === this.TOOLTIP_STRING) {
|
1051
1197
|
if (!typographyEl.getAttribute("style") ||
|
1052
|
-
typographyEl.style.cssText.includes(
|
1198
|
+
typographyEl.style.cssText.includes(`${this.LINE_CLAMP_CSS_VARIABLE}: 0;`)) {
|
1053
1199
|
this.addLineClampCSS(typographyEl, cellContainer);
|
1054
1200
|
}
|
1055
|
-
this.
|
1201
|
+
if (!cellContainer.querySelector(this.IC_TOOLTIP_STRING))
|
1202
|
+
this.createTruncationTooltip(typographyEl, cellContainer);
|
1056
1203
|
}
|
1057
1204
|
}
|
1058
1205
|
removeTooltip(cellContainer, typographyEl, tooltip) {
|
1059
|
-
cellContainer.
|
1206
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1207
|
+
cellTextWrapper.prepend(typographyEl);
|
1060
1208
|
if (tooltip) {
|
1061
1209
|
tooltip.remove();
|
1062
1210
|
}
|
1063
1211
|
}
|
1064
1212
|
addLineClampCSS(typographyEl, cellContainer) {
|
1065
|
-
|
1213
|
+
var _a, _b;
|
1214
|
+
const descriptionCellHeight = (_a = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
1215
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
1216
|
+
(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > descriptionCellHeight) {
|
1217
|
+
let iconHeight;
|
1218
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS)) {
|
1219
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
1220
|
+
iconHeight = cellIcon ? cellIcon.clientHeight : 0;
|
1221
|
+
}
|
1222
|
+
else {
|
1223
|
+
iconHeight = 0;
|
1224
|
+
}
|
1225
|
+
const height = (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) -
|
1226
|
+
((_b = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _b === void 0 ? void 0 : _b.clientHeight) -
|
1227
|
+
iconHeight;
|
1228
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(height || 0)}`);
|
1229
|
+
}
|
1230
|
+
else {
|
1231
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
|
1232
|
+
}
|
1066
1233
|
}
|
1067
1234
|
createTruncationTooltip(typographyEl, cellContainer) {
|
1068
1235
|
const tooltipEl = document.createElement(this.IC_TOOLTIP_STRING);
|
@@ -1073,12 +1240,13 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1073
1240
|
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
1074
1241
|
strategy: "fixed",
|
1075
1242
|
});
|
1076
|
-
cellContainer.
|
1077
|
-
|
1243
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1244
|
+
cellTextWrapper.prepend(tooltipEl);
|
1245
|
+
tooltipEl.prepend(typographyEl);
|
1078
1246
|
}
|
1079
1247
|
render() {
|
1080
1248
|
var _a;
|
1081
|
-
const { caption, createColumnHeaders,
|
1249
|
+
const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
1082
1250
|
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: {
|
1083
1251
|
["table-row-container"]: true,
|
1084
1252
|
scrollable,
|
@@ -1089,13 +1257,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1089
1257
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
1090
1258
|
} }, h("tr", null, createColumnHeaders()))), updating &&
|
1091
1259
|
!loading &&
|
1092
|
-
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data
|
1093
|
-
!loading &&
|
1094
|
-
(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: {
|
1095
|
-
"loading-empty": loading,
|
1096
|
-
loading: true,
|
1097
|
-
"show-background": loadingOptions.showBackground,
|
1098
|
-
}, 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
|
1260
|
+
(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
|
1099
1261
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
1100
1262
|
: "table unsorted")))));
|
1101
1263
|
}
|
@@ -1119,6 +1281,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1119
1281
|
"embedded": [4],
|
1120
1282
|
"globalRowHeight": [1032, "global-row-height"],
|
1121
1283
|
"height": [1],
|
1284
|
+
"highlightSelectedRow": [4, "highlight-selected-row"],
|
1122
1285
|
"hideColumnHeaders": [4, "hide-column-headers"],
|
1123
1286
|
"loading": [1028],
|
1124
1287
|
"loadingOptions": [16],
|