@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
@@ -4,7 +4,8 @@ import unsortedIcon from "./assets/unsorted-icon.svg";
|
|
4
4
|
import ascendingIcon from "./assets/ascending-icon.svg";
|
5
5
|
import descendingIcon from "./assets/descending-icon.svg";
|
6
6
|
// Unable to import helper functions via @ukic/web-components
|
7
|
-
import { isEmptyString, isSlotUsed, pxToRem, addDataToPosition, dynamicDebounce, getSlotElements, checkResizeObserver, } from "../../utils/helpers";
|
7
|
+
import { isEmptyString, isSlotUsed, pxToRem, addDataToPosition, dynamicDebounce, getSlotElements, checkResizeObserver, deviceSizeMatches, } from "../../utils/helpers";
|
8
|
+
import { IC_DEVICE_SIZES } from "../../utils/constants";
|
8
9
|
/**
|
9
10
|
* @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.
|
10
11
|
* @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.
|
@@ -44,6 +45,7 @@ export class DataTable {
|
|
44
45
|
this.itemsPerPageChange = false;
|
45
46
|
this.DATA_ROW_HEIGHT_STRING = "data-row-height";
|
46
47
|
this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
|
48
|
+
this.LINE_CLAMP_CSS_VARIABLE = "--ic-line-clamp";
|
47
49
|
this.DEFAULT_LINE_HEIGHT = 24;
|
48
50
|
this.densityUpdate = false;
|
49
51
|
this.truncationPatternUpdated = false;
|
@@ -51,6 +53,10 @@ export class DataTable {
|
|
51
53
|
this.headerResizeObserver = null;
|
52
54
|
this.IC_TOOLTIP_STRING = "ic-tooltip";
|
53
55
|
this.SHOW_TRUNC_TOOLTIP_STRING = "show-trunc-tooltip";
|
56
|
+
this.CELL_DESCRIPTION_STRING = ".cell-description";
|
57
|
+
this.CELL_CONTAINER_WITH_DESCRIPTION_STRING = "cell-container-with-description";
|
58
|
+
this.CELL_TEXT_WRAPPER_STRING = ".cell-text-wrapper";
|
59
|
+
this.IC_TYPOGRAPHY_STRING = "ic-typography";
|
54
60
|
this.runHeaderResizeObserver = () => {
|
55
61
|
this.headerResizeObserver = new ResizeObserver(() => {
|
56
62
|
this.headerResizeCallback();
|
@@ -64,7 +70,7 @@ export class DataTable {
|
|
64
70
|
const headers = this.el.shadowRoot.querySelectorAll("th.column-header");
|
65
71
|
headers.forEach((header) => {
|
66
72
|
const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);
|
67
|
-
const typographyEls = header.querySelectorAll(
|
73
|
+
const typographyEls = header.querySelectorAll(this.IC_TYPOGRAPHY_STRING);
|
68
74
|
if (tooltip && typographyEls && typographyEls.length === 2) {
|
69
75
|
tooltip.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);
|
70
76
|
if (typographyEls[1].clientWidth > typographyEls[0].clientWidth) {
|
@@ -132,8 +138,9 @@ export class DataTable {
|
|
132
138
|
}
|
133
139
|
else {
|
134
140
|
if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
|
135
|
-
typographyEl.setAttribute("style",
|
136
|
-
cellContainer.
|
141
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
142
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
143
|
+
cellTextWrapper.prepend(typographyEl);
|
137
144
|
tooltip.remove();
|
138
145
|
}
|
139
146
|
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
@@ -285,11 +292,11 @@ export class DataTable {
|
|
285
292
|
});
|
286
293
|
};
|
287
294
|
this.createCellContent = (columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis) => {
|
288
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
295
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
289
296
|
return (h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
290
297
|
!isSlotUsed(this.el, cellSlotName)
|
291
298
|
? cell
|
292
|
-
: null, class: Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
|
299
|
+
: null, class: Object.assign(Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
|
293
300
|
((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
294
301
|
rowAlignment ||
|
295
302
|
this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
|
@@ -301,18 +308,25 @@ export class DataTable {
|
|
301
308
|
!!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
|
302
309
|
!!this.getCellAlignment(cell, "horizontal"), [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true, [this.TEXT_WRAP_STRING]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) ||
|
303
310
|
(rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
|
304
|
-
!!this.getCellOptions(cell, "textWrap"), ["cell-icon"]: hasIcon || !!((_j = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _j === void 0 ? void 0 : _j.icon) }, this.setTruncationClass()), style: Object.assign(Object.assign({}, this.getRowHeight(currentRowHeight, columnProps, rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap, cell)), this.getColumnWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnWidth)), "data-row-height": this.truncationPattern || currentRowHeight
|
311
|
+
!!this.getCellOptions(cell, "textWrap"), ["cell-icon"]: hasIcon || !!((_j = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _j === void 0 ? void 0 : _j.icon) }, this.setTruncationClass()), { [this.CELL_CONTAINER_WITH_DESCRIPTION_STRING]: this.isObject(cell) && Object.keys(cell).includes("description") }), style: Object.assign(Object.assign({}, this.getRowHeight(currentRowHeight, columnProps, rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap, cell)), this.getColumnWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnWidth)), "data-row-height": this.truncationPattern || currentRowHeight
|
305
312
|
? this.setRowHeight(currentRowHeight)
|
306
313
|
: null }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_k = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _k === void 0 ? void 0 : _k.onAllCells)) &&
|
307
314
|
(cellValue("icon") || ((_l = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _l === void 0 ? void 0 : _l.icon)) && (h("span", { class: "icon", innerHTML: cellValue("icon") || ((_m = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _m === void 0 ? void 0 : _m.icon) }))), (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element" &&
|
308
|
-
!isSlotUsed(this.el, cellSlotName) && (h("
|
315
|
+
!isSlotUsed(this.el, cellSlotName) && (h("div", { class: {
|
316
|
+
"cell-text-wrapper": true,
|
317
|
+
"cell-text-no-wrap": !this.truncationPattern,
|
318
|
+
} }, h("ic-typography", { variant: "body", class: {
|
309
319
|
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
310
320
|
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
311
321
|
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
312
322
|
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
313
323
|
!!rowEmphasis,
|
314
324
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
315
|
-
} }, this.isObject(cell) && (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href"), target: cellValue("target") || undefined, rel: cellValue("rel") || undefined }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType))))
|
325
|
+
} }, this.isObject(cell) && (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href"), target: cellValue("target") || undefined, rel: cellValue("rel") || undefined }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType))), this.isObject(cell) &&
|
326
|
+
Object.keys(cell).includes("description") && (h("div", { class: {
|
327
|
+
["cell-description"]: true,
|
328
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
329
|
+
} }, ((_o = cellValue("description")) === null || _o === void 0 ? void 0 : _o.icon) && (h("span", { class: "cell-description-icon", innerHTML: cellValue("description").icon })), h("ic-typography", { variant: "caption", class: "cell-description-text" }, (_q = (_p = cellValue("description")) === null || _p === void 0 ? void 0 : _p.data) !== null && _q !== void 0 ? _q : cellValue("description"))))))))));
|
316
330
|
};
|
317
331
|
this.createCells = (row, rowIndex) => {
|
318
332
|
var _a;
|
@@ -348,11 +362,15 @@ export class DataTable {
|
|
348
362
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
349
363
|
["with-overflow"]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element",
|
350
364
|
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, this.isObject(cell) &&
|
351
|
-
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")
|
365
|
+
Object.keys(cell).includes("actionElement") ? (h("div", { class: "cell-grid-wrapper" }, this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis), h("span", { class: "action-element", innerHTML: cellValue("actionElement"),
|
366
|
+
// eslint-disable-next-line react/jsx-no-bind
|
367
|
+
onClick: cell.actionOnClick
|
368
|
+
? () => this.handleClick(cell.actionOnClick)
|
369
|
+
: undefined }))) : (this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis))));
|
352
370
|
}
|
353
371
|
});
|
354
372
|
};
|
355
|
-
this.createColumnHeaders = () => this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
373
|
+
this.createColumnHeaders = () => (this.columns || []).map(({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (h("th", { scope: "col", class: {
|
356
374
|
["column-header"]: true,
|
357
375
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
358
376
|
["updating-state-headers"]: this.updating && !this.loading,
|
@@ -381,6 +399,9 @@ export class DataTable {
|
|
381
399
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
382
400
|
} }, title)))));
|
383
401
|
this.onRowClick = (row) => {
|
402
|
+
if (!this.loading && !this.updating) {
|
403
|
+
this.icSelectedRowChange.emit(this.selectedRow !== row ? row : null);
|
404
|
+
}
|
384
405
|
this.selectedRow =
|
385
406
|
this.selectedRow !== row && !this.loading && !this.updating && row;
|
386
407
|
};
|
@@ -411,7 +432,7 @@ export class DataTable {
|
|
411
432
|
// eslint-disable-next-line react/jsx-no-bind
|
412
433
|
onClick: () => this.onRowClick(row), class: {
|
413
434
|
["table-row"]: true,
|
414
|
-
["table-row-selected"]: this.selectedRow === row,
|
435
|
+
["table-row-selected"]: this.highlightSelectedRow && this.selectedRow === row,
|
415
436
|
}
|
416
437
|
}, this.createCells(row, index)));
|
417
438
|
});
|
@@ -481,7 +502,8 @@ export class DataTable {
|
|
481
502
|
});
|
482
503
|
};
|
483
504
|
this.getTypographyElements = () => {
|
484
|
-
|
505
|
+
// Filter out column headers and cell descriptions
|
506
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text,.cell-description-text)"));
|
485
507
|
};
|
486
508
|
this.getTooltip = (typographyEl) => {
|
487
509
|
return typographyEl.closest(this.TOOLTIP);
|
@@ -492,7 +514,7 @@ export class DataTable {
|
|
492
514
|
const cellContainer = this.getCellContainer(typographyEl);
|
493
515
|
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
494
516
|
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
495
|
-
typographyEl.setAttribute("style",
|
517
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
496
518
|
return;
|
497
519
|
}
|
498
520
|
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
@@ -501,6 +523,56 @@ export class DataTable {
|
|
501
523
|
this.updateScrollOffset = () => {
|
502
524
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
503
525
|
};
|
526
|
+
this.updateRowHeightForDescriptions = (rowHeight, cellContainer) => {
|
527
|
+
cellContainer.setAttribute("data-row-height", rowHeight.toString());
|
528
|
+
cellContainer.setAttribute("style", `${this.ROW_HEIGHT_CSS_VARIABLE}: ${rowHeight}px`);
|
529
|
+
};
|
530
|
+
// Method to update the row heights on cells with descriptions and tooltip truncation
|
531
|
+
this.updateCellHeightsWithDescriptions = () => {
|
532
|
+
const descriptions = this.el.shadowRoot.querySelectorAll(this.CELL_DESCRIPTION_STRING);
|
533
|
+
descriptions.forEach((description) => {
|
534
|
+
const cellContainer = description.closest(`.${this.CELL_CONTAINER_WITH_DESCRIPTION_STRING}`);
|
535
|
+
const typography = cellContainer.querySelector(this.IC_TYPOGRAPHY_STRING);
|
536
|
+
const descriptionMarginTop = window
|
537
|
+
.getComputedStyle(description)
|
538
|
+
.getPropertyValue("margin-top");
|
539
|
+
const descriptionHeight = description.clientHeight + parseInt(descriptionMarginTop, 10);
|
540
|
+
if (this.globalRowHeight && this.globalRowHeight !== "auto") {
|
541
|
+
if (!typography.textContent &&
|
542
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight) {
|
543
|
+
this.updateRowHeightForDescriptions(descriptionHeight, cellContainer);
|
544
|
+
}
|
545
|
+
else if (this.truncationPattern === this.TOOLTIP_STRING) {
|
546
|
+
if (descriptionHeight + this.DEFAULT_LINE_HEIGHT >
|
547
|
+
this.globalRowHeight) {
|
548
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
549
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS) && cellIcon) {
|
550
|
+
// recalculate descriptionHeight as when a word break occurs this value changes
|
551
|
+
// Additional spacing given for 300-400% zoom
|
552
|
+
this.updateRowHeightForDescriptions(descriptionHeight +
|
553
|
+
this.DEFAULT_LINE_HEIGHT +
|
554
|
+
cellIcon.clientHeight, cellContainer);
|
555
|
+
}
|
556
|
+
else {
|
557
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
558
|
+
}
|
559
|
+
}
|
560
|
+
this.addLineClampCSS(typography, cellContainer);
|
561
|
+
// Additional case for show/hide truncation for when a description is present, but the text
|
562
|
+
// isn't overflowing the cell to trigger the show more button to appear.
|
563
|
+
}
|
564
|
+
else if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
565
|
+
descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight &&
|
566
|
+
typography.style.getPropertyValue("--truncation-max-lines") !==
|
567
|
+
"initial") {
|
568
|
+
this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
|
569
|
+
if (descriptionHeight) {
|
570
|
+
this.createShowHideTruncation(typography, cellContainer, descriptionHeight);
|
571
|
+
}
|
572
|
+
}
|
573
|
+
}
|
574
|
+
});
|
575
|
+
};
|
504
576
|
this.setTableDimensions = () => {
|
505
577
|
let tableHostDimensions = {};
|
506
578
|
if (this.width) {
|
@@ -517,22 +589,79 @@ export class DataTable {
|
|
517
589
|
}
|
518
590
|
return tableHostDimensions;
|
519
591
|
};
|
592
|
+
this.fixCellTooltip = (element) => {
|
593
|
+
var _a;
|
594
|
+
const tooltipEl = (element.tagName === "IC-TOOLTIP"
|
595
|
+
? element
|
596
|
+
: (_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
597
|
+
if (tooltipEl) {
|
598
|
+
tooltipEl.setExternalPopperProps({
|
599
|
+
strategy: "fixed",
|
600
|
+
});
|
601
|
+
}
|
602
|
+
};
|
520
603
|
this.fixCellTooltips = () => {
|
521
604
|
const elements = this.el.shadowRoot.querySelectorAll(".data-type-element");
|
522
605
|
elements.forEach((element) => {
|
523
606
|
const slotElements = getSlotElements(element);
|
524
|
-
slotElements.forEach((slottedEl) => {
|
525
|
-
|
526
|
-
const tooltipEl = (slottedEl.tagName === "IC-TOOLTIP"
|
527
|
-
? slottedEl
|
528
|
-
: (_a = slottedEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING));
|
529
|
-
if (tooltipEl) {
|
530
|
-
tooltipEl.setExternalPopperProps({
|
531
|
-
strategy: "fixed",
|
532
|
-
});
|
533
|
-
}
|
607
|
+
slotElements === null || slotElements === void 0 ? void 0 : slotElements.forEach((slottedEl) => {
|
608
|
+
this.fixCellTooltip(slottedEl);
|
534
609
|
});
|
535
610
|
});
|
611
|
+
const actionElements = this.el.shadowRoot.querySelectorAll(".action-element");
|
612
|
+
actionElements === null || actionElements === void 0 ? void 0 : actionElements.forEach((actionElementSpan) => {
|
613
|
+
const actionElement = actionElementSpan.firstChild;
|
614
|
+
if (actionElement) {
|
615
|
+
this.fixCellTooltip(actionElement);
|
616
|
+
}
|
617
|
+
});
|
618
|
+
};
|
619
|
+
this.handleClick = (callback) => callback();
|
620
|
+
this.renderTableBody = (data, loading, overlay) => {
|
621
|
+
if (!(data === null || data === void 0 ? void 0 : data.length))
|
622
|
+
return;
|
623
|
+
if (overlay && loading) {
|
624
|
+
return h("tbody", null, this.createRows());
|
625
|
+
}
|
626
|
+
else if (loading && !overlay) {
|
627
|
+
return null;
|
628
|
+
}
|
629
|
+
else {
|
630
|
+
return h("tbody", null, this.createRows());
|
631
|
+
}
|
632
|
+
};
|
633
|
+
this.renderLoadingIndicator = (isLoading, loadingOptions) => {
|
634
|
+
if (!isLoading)
|
635
|
+
return null;
|
636
|
+
return (h(Fragment, null, h("div", { class: "loading-overlay", ref: (el) => (this.loadingOverlay = el) }), h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
637
|
+
"loading-empty": isLoading,
|
638
|
+
loading: true,
|
639
|
+
"show-background": loadingOptions.showBackground || loadingOptions.overlay,
|
640
|
+
}, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })));
|
641
|
+
};
|
642
|
+
this.renderAriaLiveLoading = () => {
|
643
|
+
var _a, _b;
|
644
|
+
if (this.loading) {
|
645
|
+
return ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.label) || "Loading...";
|
646
|
+
}
|
647
|
+
else if (this.updating) {
|
648
|
+
return ((_b = this.updatingOptions) === null || _b === void 0 ? void 0 : _b.description) || "Updating table data";
|
649
|
+
}
|
650
|
+
else {
|
651
|
+
return "";
|
652
|
+
}
|
653
|
+
};
|
654
|
+
this.renderEmptyState = (data, loading, overlay) => {
|
655
|
+
const emptyStateEl = isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" }));
|
656
|
+
if (loading && !(data === null || data === void 0 ? void 0 : data.length) && overlay) {
|
657
|
+
return emptyStateEl;
|
658
|
+
}
|
659
|
+
else if (!loading && !(data === null || data === void 0 ? void 0 : data.length)) {
|
660
|
+
return emptyStateEl;
|
661
|
+
}
|
662
|
+
else {
|
663
|
+
return null;
|
664
|
+
}
|
536
665
|
};
|
537
666
|
this.fromRow = 0;
|
538
667
|
this.previousRowsPerPage = undefined;
|
@@ -553,6 +682,7 @@ export class DataTable {
|
|
553
682
|
this.embedded = false;
|
554
683
|
this.globalRowHeight = "auto";
|
555
684
|
this.height = undefined;
|
685
|
+
this.highlightSelectedRow = true;
|
556
686
|
this.hideColumnHeaders = false;
|
557
687
|
this.loading = false;
|
558
688
|
this.loadingOptions = undefined;
|
@@ -575,6 +705,7 @@ export class DataTable {
|
|
575
705
|
pageLabel: "Page",
|
576
706
|
hideRangeLabel: false,
|
577
707
|
hideAllFromItemsPerPage: false,
|
708
|
+
setToFirstPageOnPaginationChange: false,
|
578
709
|
};
|
579
710
|
this.showPagination = false;
|
580
711
|
this.sortable = false;
|
@@ -611,13 +742,13 @@ export class DataTable {
|
|
611
742
|
(_b = this.headerResizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
612
743
|
}
|
613
744
|
componentWillLoad() {
|
614
|
-
var _a;
|
745
|
+
var _a, _b;
|
615
746
|
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
616
747
|
this.previousRowsPerPage = this.rowsPerPage;
|
617
748
|
this.toRow = this.rowsPerPage;
|
618
749
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
619
750
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
620
|
-
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
751
|
+
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 || !!((_b = this.loadingOptions) === null || _b === void 0 ? void 0 : _b.overlay) });
|
621
752
|
this.initialLoad = true;
|
622
753
|
this.previousItemsPerPage = this.rowsPerPage;
|
623
754
|
}
|
@@ -648,6 +779,7 @@ export class DataTable {
|
|
648
779
|
if (this.globalRowHeight !== "auto") {
|
649
780
|
this.updateSetRowHeight();
|
650
781
|
}
|
782
|
+
window.addEventListener("resize", this.updateCellHeightsWithDescriptions);
|
651
783
|
}
|
652
784
|
componentDidUpdate() {
|
653
785
|
// truncation updates invoked here once new/updated data has
|
@@ -659,6 +791,7 @@ export class DataTable {
|
|
659
791
|
}
|
660
792
|
componentDidRender() {
|
661
793
|
this.fixCellTooltips();
|
794
|
+
this.updateCellHeightsWithDescriptions();
|
662
795
|
this.adjustWidthForActionElement();
|
663
796
|
}
|
664
797
|
truncateUpdatedData() {
|
@@ -717,7 +850,7 @@ export class DataTable {
|
|
717
850
|
cellContainer.style.height = null;
|
718
851
|
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
719
852
|
this.removeTooltip(cellContainer, typographyEl, tooltipEl);
|
720
|
-
typographyEl.setAttribute("style",
|
853
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
|
721
854
|
}
|
722
855
|
else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
723
856
|
this.resetShowHideTruncation(typographyEl);
|
@@ -728,7 +861,8 @@ export class DataTable {
|
|
728
861
|
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
729
862
|
// If the set row height is bigger than the cell container even
|
730
863
|
// with textWrap, set the row height
|
731
|
-
if (!
|
864
|
+
if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
865
|
+
!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
|
732
866
|
rowHeight > cellContainer.clientHeight &&
|
733
867
|
!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
734
868
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -761,7 +895,7 @@ export class DataTable {
|
|
761
895
|
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
762
896
|
newRows.forEach((row) => {
|
763
897
|
row
|
764
|
-
.querySelectorAll(
|
898
|
+
.querySelectorAll(this.IC_TYPOGRAPHY_STRING)
|
765
899
|
.forEach((typographyEl) => {
|
766
900
|
const cellContainer = this.getCellContainer(typographyEl);
|
767
901
|
const tooltipEl = this.getTooltip(typographyEl);
|
@@ -823,9 +957,17 @@ export class DataTable {
|
|
823
957
|
}
|
824
958
|
}
|
825
959
|
}
|
826
|
-
createShowHideTruncation(typographyEl, cellContainer) {
|
960
|
+
createShowHideTruncation(typographyEl, cellContainer, descriptionHeight) {
|
827
961
|
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
828
962
|
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
963
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
964
|
+
descriptionHeight) {
|
965
|
+
typographyEl.setAttribute("max-lines", `${Math.floor(((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - descriptionHeight) /
|
966
|
+
this.DEFAULT_LINE_HEIGHT)}`);
|
967
|
+
}
|
968
|
+
else {
|
969
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
970
|
+
}
|
829
971
|
typographyEl.setShowHideExpanded(false);
|
830
972
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
831
973
|
}
|
@@ -932,7 +1074,8 @@ export class DataTable {
|
|
932
1074
|
this.truncationPatternUpdated = true;
|
933
1075
|
}
|
934
1076
|
async dataHandler(newData) {
|
935
|
-
|
1077
|
+
var _a;
|
1078
|
+
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 || !!((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.overlay) });
|
936
1079
|
if (this.loading) {
|
937
1080
|
!this.hasLoadedForOneSecond
|
938
1081
|
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
@@ -959,7 +1102,7 @@ export class DataTable {
|
|
959
1102
|
typographyEl.setShowHideExpanded(false);
|
960
1103
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
961
1104
|
}
|
962
|
-
else {
|
1105
|
+
else if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)) {
|
963
1106
|
typographyEl.resetTruncation().then(() => {
|
964
1107
|
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
965
1108
|
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
@@ -995,8 +1138,11 @@ export class DataTable {
|
|
995
1138
|
this.variableRowHeight = null;
|
996
1139
|
}
|
997
1140
|
showLoadingIndicator() {
|
998
|
-
var _a;
|
999
|
-
(_a = this.
|
1141
|
+
var _a, _b, _c;
|
1142
|
+
if ((_a = this.loadingOptions) === null || _a === void 0 ? void 0 : _a.overlay) {
|
1143
|
+
(_b = this.loadingOverlay) === null || _b === void 0 ? void 0 : _b.classList.add("show");
|
1144
|
+
}
|
1145
|
+
(_c = this.loadingIndicator) === null || _c === void 0 ? void 0 : _c.classList.add("show");
|
1000
1146
|
}
|
1001
1147
|
getRowOptions(rowKeys, rowValues) {
|
1002
1148
|
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
@@ -1025,20 +1171,41 @@ export class DataTable {
|
|
1025
1171
|
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
1026
1172
|
this.truncationPattern === this.TOOLTIP_STRING) {
|
1027
1173
|
if (!typographyEl.getAttribute("style") ||
|
1028
|
-
typographyEl.style.cssText.includes(
|
1174
|
+
typographyEl.style.cssText.includes(`${this.LINE_CLAMP_CSS_VARIABLE}: 0;`)) {
|
1029
1175
|
this.addLineClampCSS(typographyEl, cellContainer);
|
1030
1176
|
}
|
1031
|
-
this.
|
1177
|
+
if (!cellContainer.querySelector(this.IC_TOOLTIP_STRING))
|
1178
|
+
this.createTruncationTooltip(typographyEl, cellContainer);
|
1032
1179
|
}
|
1033
1180
|
}
|
1034
1181
|
removeTooltip(cellContainer, typographyEl, tooltip) {
|
1035
|
-
cellContainer.
|
1182
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1183
|
+
cellTextWrapper.prepend(typographyEl);
|
1036
1184
|
if (tooltip) {
|
1037
1185
|
tooltip.remove();
|
1038
1186
|
}
|
1039
1187
|
}
|
1040
1188
|
addLineClampCSS(typographyEl, cellContainer) {
|
1041
|
-
|
1189
|
+
var _a, _b;
|
1190
|
+
const descriptionCellHeight = (_a = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
1191
|
+
if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
|
1192
|
+
(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > descriptionCellHeight) {
|
1193
|
+
let iconHeight;
|
1194
|
+
if (deviceSizeMatches(IC_DEVICE_SIZES.XS)) {
|
1195
|
+
const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
|
1196
|
+
iconHeight = cellIcon ? cellIcon.clientHeight : 0;
|
1197
|
+
}
|
1198
|
+
else {
|
1199
|
+
iconHeight = 0;
|
1200
|
+
}
|
1201
|
+
const height = (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) -
|
1202
|
+
((_b = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _b === void 0 ? void 0 : _b.clientHeight) -
|
1203
|
+
iconHeight;
|
1204
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(height || 0)}`);
|
1205
|
+
}
|
1206
|
+
else {
|
1207
|
+
typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
|
1208
|
+
}
|
1042
1209
|
}
|
1043
1210
|
createTruncationTooltip(typographyEl, cellContainer) {
|
1044
1211
|
const tooltipEl = document.createElement(this.IC_TOOLTIP_STRING);
|
@@ -1049,12 +1216,13 @@ export class DataTable {
|
|
1049
1216
|
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
1050
1217
|
strategy: "fixed",
|
1051
1218
|
});
|
1052
|
-
cellContainer.
|
1053
|
-
|
1219
|
+
const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
|
1220
|
+
cellTextWrapper.prepend(tooltipEl);
|
1221
|
+
tooltipEl.prepend(typographyEl);
|
1054
1222
|
}
|
1055
1223
|
render() {
|
1056
1224
|
var _a;
|
1057
|
-
const { caption, createColumnHeaders,
|
1225
|
+
const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
1058
1226
|
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: {
|
1059
1227
|
["table-row-container"]: true,
|
1060
1228
|
scrollable,
|
@@ -1065,13 +1233,7 @@ export class DataTable {
|
|
1065
1233
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
1066
1234
|
} }, h("tr", null, createColumnHeaders()))), updating &&
|
1067
1235
|
!loading &&
|
1068
|
-
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data
|
1069
|
-
!loading &&
|
1070
|
-
(isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
1071
|
-
"loading-empty": loading,
|
1072
|
-
loading: true,
|
1073
|
-
"show-background": loadingOptions.showBackground,
|
1074
|
-
}, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })), (showPagination || isSlotUsed(this.el, "pagination-bar")) && (h("div", { class: "pagination-container" }, isSlotUsed(this.el, "pagination-bar") ? (h("slot", { name: "pagination-bar" })) : (h("ic-pagination-bar", { totalItems: (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0, type: paginationBarOptions.type, rangeLabelType: paginationBarOptions.rangeLabelType, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, showGoToPageControl: paginationBarOptions.showGoToPageControl, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, alignment: paginationBarOptions.alignment, 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
|
1236
|
+
(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
|
1075
1237
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
1076
1238
|
: "table unsorted")))));
|
1077
1239
|
}
|
@@ -1249,6 +1411,24 @@ export class DataTable {
|
|
1249
1411
|
"attribute": "height",
|
1250
1412
|
"reflect": false
|
1251
1413
|
},
|
1414
|
+
"highlightSelectedRow": {
|
1415
|
+
"type": "boolean",
|
1416
|
+
"mutable": false,
|
1417
|
+
"complexType": {
|
1418
|
+
"original": "boolean",
|
1419
|
+
"resolved": "boolean",
|
1420
|
+
"references": {}
|
1421
|
+
},
|
1422
|
+
"required": false,
|
1423
|
+
"optional": true,
|
1424
|
+
"docs": {
|
1425
|
+
"tags": [],
|
1426
|
+
"text": "If `true`, the selected row is highlighted using a background colour."
|
1427
|
+
},
|
1428
|
+
"attribute": "highlight-selected-row",
|
1429
|
+
"reflect": false,
|
1430
|
+
"defaultValue": "true"
|
1431
|
+
},
|
1252
1432
|
"hideColumnHeaders": {
|
1253
1433
|
"type": "boolean",
|
1254
1434
|
"mutable": false,
|
@@ -1289,8 +1469,8 @@ export class DataTable {
|
|
1289
1469
|
"type": "unknown",
|
1290
1470
|
"mutable": false,
|
1291
1471
|
"complexType": {
|
1292
|
-
"original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n }",
|
1293
|
-
"resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; label?: string; labelDuration?: number; max?: number; min?: number; progress?: number; showBackground?: boolean; }",
|
1472
|
+
"original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n overlay?: boolean;\n }",
|
1473
|
+
"resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; label?: string; labelDuration?: number; max?: number; min?: number; progress?: number; showBackground?: boolean; overlay?: boolean; }",
|
1294
1474
|
"references": {
|
1295
1475
|
"IcThemeForegroundNoDefault": {
|
1296
1476
|
"location": "import",
|
@@ -1378,7 +1558,7 @@ export class DataTable {
|
|
1378
1558
|
"tags": [],
|
1379
1559
|
"text": "Sets the props for the built-in pagination bar. If the `pagination-bar` slot is used then this prop is ignored."
|
1380
1560
|
},
|
1381
|
-
"defaultValue": "{\n itemsPerPageOptions: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n showItemsPerPageControl: true,\n showGoToPageControl: true,\n alignment: \"right\",\n appearance: \"default\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n hideAllFromItemsPerPage: false,\n }"
|
1561
|
+
"defaultValue": "{\n itemsPerPageOptions: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n showItemsPerPageControl: true,\n showGoToPageControl: true,\n alignment: \"right\",\n appearance: \"default\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n hideAllFromItemsPerPage: false,\n setToFirstPageOnPaginationChange: false,\n }"
|
1382
1562
|
},
|
1383
1563
|
"showPagination": {
|
1384
1564
|
"type": "boolean",
|
@@ -1625,6 +1805,21 @@ export class DataTable {
|
|
1625
1805
|
"resolved": "void",
|
1626
1806
|
"references": {}
|
1627
1807
|
}
|
1808
|
+
}, {
|
1809
|
+
"method": "icSelectedRowChange",
|
1810
|
+
"name": "icSelectedRowChange",
|
1811
|
+
"bubbles": true,
|
1812
|
+
"cancelable": true,
|
1813
|
+
"composed": true,
|
1814
|
+
"docs": {
|
1815
|
+
"tags": [],
|
1816
|
+
"text": "Emitted when the selected row changes in the data table."
|
1817
|
+
},
|
1818
|
+
"complexType": {
|
1819
|
+
"original": "object",
|
1820
|
+
"resolved": "object",
|
1821
|
+
"references": {}
|
1822
|
+
}
|
1628
1823
|
}, {
|
1629
1824
|
"method": "icSortChange",
|
1630
1825
|
"name": "icSortChange",
|