@ukic/canary-web-components 2.0.0-canary.32 → 2.0.0-canary.33
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +6 -2
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-52ab3835.js → helpers-951fb33a.js} +25 -3
- package/dist/cjs/helpers-951fb33a.js.map +1 -0
- package/dist/cjs/{helpers-aa5ff032.js → helpers-eabe59b6.js} +13 -1
- package/dist/cjs/helpers-eabe59b6.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -9
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +2 -9
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +12 -19
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +209 -48
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +44 -20
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +18 -7
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +2 -9
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +2 -9
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +8 -7
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +10 -2
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +3 -2
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +2 -9
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +2 -9
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +3 -10
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +82 -2
- package/dist/collection/components/ic-data-table/ic-data-table.js +244 -50
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +213 -6
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +64 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +62 -6
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +3 -10
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +3 -10
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/utils/helpers.js +12 -1
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +12 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +22 -2
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-alert2.js +3 -10
- package/dist/components/ic-alert2.js.map +1 -1
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-horizontal.js +3 -10
- package/dist/components/ic-card-horizontal.js.map +1 -1
- package/dist/components/ic-card.js +13 -20
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-data-table.js +210 -48
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +1 -1
- package/dist/components/ic-date-picker.js +1 -1
- package/dist/components/ic-empty-state2.js +3 -13
- package/dist/components/ic-empty-state2.js.map +1 -1
- package/dist/components/ic-footer.js +18 -7
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +3 -10
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-input-component-container2.js +3 -10
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-menu2.js +1 -1
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-menu3.js +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-pagination-bar2.js +46 -9
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-select-with-multi.js +1 -1
- package/dist/components/ic-select2.js +1 -1
- package/dist/components/ic-side-navigation.js +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-text-field2.js +8 -7
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toggle-button-group.js +12 -2
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +3 -1
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-top-navigation.js +2 -2
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-item.js +3 -10
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +3 -10
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-56e19b01.entry.js → p-0229eb46.entry.js} +2 -2
- package/dist/core/{p-05c9dee1.entry.js → p-03a99326.entry.js} +2 -2
- package/dist/core/{p-77637e28.entry.js → p-03d83d2c.entry.js} +2 -2
- package/dist/core/{p-19a9ab60.entry.js → p-05f900e5.entry.js} +2 -2
- package/dist/core/{p-120a38ce.entry.js → p-0c7d30f5.entry.js} +2 -2
- package/dist/core/{p-6bd76154.entry.js → p-124279fa.entry.js} +2 -2
- package/dist/core/p-12a5b481.entry.js +2 -0
- package/dist/core/p-12a5b481.entry.js.map +1 -0
- package/dist/core/{p-895d05f9.entry.js → p-26aeefc3.entry.js} +2 -2
- package/dist/core/p-26aeefc3.entry.js.map +1 -0
- package/dist/core/{p-5dc274f0.entry.js → p-29a040ef.entry.js} +2 -2
- package/dist/core/{p-456282e2.entry.js → p-2b61d283.entry.js} +2 -2
- package/dist/core/{p-40471551.entry.js → p-3156304b.entry.js} +2 -2
- package/dist/core/{p-f0e85611.entry.js → p-3169d95e.entry.js} +2 -2
- package/dist/core/{p-0bc92c30.entry.js → p-34de5ffb.entry.js} +2 -2
- package/dist/core/{p-89ec372e.entry.js → p-382b88b2.entry.js} +2 -2
- package/dist/core/{p-ce90d1b2.entry.js → p-3a2523df.entry.js} +2 -2
- package/dist/core/{p-c32f4c0f.entry.js → p-3b1c88ad.entry.js} +2 -2
- package/dist/core/p-3bbc3db1.entry.js +2 -0
- package/dist/core/p-3bbc3db1.entry.js.map +1 -0
- package/dist/core/p-3e7b08c7.entry.js +2 -0
- package/dist/core/p-3e7b08c7.entry.js.map +1 -0
- package/dist/core/{p-7e20c194.entry.js → p-4084bce2.entry.js} +2 -2
- package/dist/core/p-48618a18.entry.js +2 -0
- package/dist/core/p-48618a18.entry.js.map +1 -0
- package/dist/core/p-4960c603.entry.js +2 -0
- package/dist/core/p-4960c603.entry.js.map +1 -0
- package/dist/core/{p-59e677e4.entry.js → p-4f118361.entry.js} +2 -2
- package/dist/core/p-5f149106.entry.js +2 -0
- package/dist/core/{p-ad1e70c9.entry.js.map → p-5f149106.entry.js.map} +1 -1
- package/dist/core/{p-89290d94.entry.js → p-5f71f24c.entry.js} +2 -2
- package/dist/core/{p-48b62c20.entry.js → p-61ca218b.entry.js} +2 -2
- package/dist/core/{p-9922cd00.entry.js → p-7565b23c.entry.js} +2 -2
- package/dist/core/p-758f03e8.entry.js +2 -0
- package/dist/core/p-758f03e8.entry.js.map +1 -0
- package/dist/core/{p-5041cbeb.entry.js → p-7bba4c47.entry.js} +2 -2
- package/dist/core/p-844fb240.entry.js +2 -0
- package/dist/core/p-844fb240.entry.js.map +1 -0
- package/dist/core/p-8ab58daa.js +2 -0
- package/dist/core/p-8ab58daa.js.map +1 -0
- package/dist/core/{p-1419c8ae.entry.js → p-8c2c86b5.entry.js} +2 -2
- package/dist/core/{p-73dab780.entry.js → p-8ef60479.entry.js} +2 -2
- package/dist/core/p-938a0ccc.entry.js +2 -0
- package/dist/core/{p-94e47a21.entry.js.map → p-938a0ccc.entry.js.map} +1 -1
- package/dist/core/{p-1619b3d7.entry.js → p-95871655.entry.js} +2 -2
- package/dist/core/p-95871655.entry.js.map +1 -0
- package/dist/core/p-9adb2a49.entry.js +2 -0
- package/dist/core/p-9adb2a49.entry.js.map +1 -0
- package/dist/core/p-9c9147fa.entry.js +2 -0
- package/dist/core/p-9c9147fa.entry.js.map +1 -0
- package/dist/core/p-9f157649.entry.js +2 -0
- package/dist/core/p-9f157649.entry.js.map +1 -0
- package/dist/core/{p-1b5a47c6.entry.js → p-a3d903e4.entry.js} +2 -2
- package/dist/core/{p-d0d2952b.entry.js → p-a4088bd7.entry.js} +2 -2
- package/dist/core/{p-9271a06b.entry.js → p-a6fb5fe3.entry.js} +2 -2
- package/dist/core/{p-43f87eb3.entry.js → p-aabb04c8.entry.js} +2 -2
- package/dist/core/{p-ad786103.entry.js → p-b02ad2c4.entry.js} +2 -2
- package/dist/core/{p-85101c9a.entry.js → p-ba353ac3.entry.js} +2 -2
- package/dist/core/{p-ab485b11.entry.js → p-bc24c004.entry.js} +2 -2
- package/dist/core/{p-96a909bf.entry.js → p-c0242c21.entry.js} +2 -2
- package/dist/core/{p-516de675.entry.js → p-c1b268fd.entry.js} +2 -2
- package/dist/core/{p-9ce35989.entry.js → p-d062a801.entry.js} +2 -2
- package/dist/core/p-d171c71d.entry.js +2 -0
- package/dist/core/{p-ce2162a2.entry.js.map → p-d171c71d.entry.js.map} +1 -1
- package/dist/core/{p-95c8513d.entry.js → p-d1e0479c.entry.js} +2 -2
- package/dist/core/p-d1e0479c.entry.js.map +1 -0
- package/dist/core/{p-9b85340f.entry.js → p-d2260763.entry.js} +2 -2
- package/dist/core/{p-1eb5d7f3.entry.js → p-d8988d8c.entry.js} +2 -2
- package/dist/core/p-da506987.js +2 -0
- package/dist/core/p-da506987.js.map +1 -0
- package/dist/core/p-dd550e9b.entry.js +2 -0
- package/dist/core/p-dd550e9b.entry.js.map +1 -0
- package/dist/core/{p-782cd387.entry.js → p-deedc7d3.entry.js} +2 -2
- package/dist/core/p-e447ed5c.entry.js +2 -0
- package/dist/core/p-e447ed5c.entry.js.map +1 -0
- package/dist/core/p-e7439c1e.entry.js +2 -0
- package/dist/core/p-e7439c1e.entry.js.map +1 -0
- package/dist/core/{p-09d4fe07.entry.js → p-e7b913e5.entry.js} +2 -2
- package/dist/core/p-e85505ec.entry.js +2 -0
- package/dist/core/{p-9445c2f3.entry.js → p-f237940d.entry.js} +2 -2
- package/dist/core/{p-522b1526.entry.js → p-f4b76daa.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-25eb1cb0.js → helpers-031e266e.js} +13 -2
- package/dist/esm/helpers-031e266e.js.map +1 -0
- package/dist/esm/{helpers-147b5b73.js → helpers-948df101.js} +23 -3
- package/dist/esm/helpers-948df101.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +3 -10
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +3 -10
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +13 -20
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +209 -48
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +1 -1
- package/dist/esm/ic-date-picker.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +45 -21
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +18 -7
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +3 -10
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +3 -10
- package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +1 -1
- package/dist/esm/ic-menu.entry.js +2 -2
- package/dist/esm/ic-menu.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination_4.entry.js +8 -7
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +1 -1
- package/dist/esm/ic-side-navigation.entry.js +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +10 -2
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +3 -2
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +2 -2
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +3 -10
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +3 -10
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +0 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +23 -0
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +12 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +107 -4
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +8 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +0 -1
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +0 -1
- package/dist/types/components.d.ts +23 -0
- package/dist/types/utils/helpers.d.ts +3 -1
- package/dist/types/utils/types.d.ts +1 -0
- package/hydrate/index.js +345 -144
- package/package.json +3 -3
- package/dist/cjs/helpers-52ab3835.js.map +0 -1
- package/dist/cjs/helpers-aa5ff032.js.map +0 -1
- package/dist/core/p-0695b4b7.entry.js +0 -2
- package/dist/core/p-0695b4b7.entry.js.map +0 -1
- package/dist/core/p-1619b3d7.entry.js.map +0 -1
- package/dist/core/p-1a5c1bfa.entry.js +0 -2
- package/dist/core/p-1a5c1bfa.entry.js.map +0 -1
- package/dist/core/p-1ef02273.entry.js +0 -2
- package/dist/core/p-1ef02273.entry.js.map +0 -1
- package/dist/core/p-20075bc7.entry.js +0 -2
- package/dist/core/p-20075bc7.entry.js.map +0 -1
- package/dist/core/p-2308d041.entry.js +0 -2
- package/dist/core/p-2308d041.entry.js.map +0 -1
- package/dist/core/p-23f32e1e.entry.js +0 -2
- package/dist/core/p-23f32e1e.entry.js.map +0 -1
- package/dist/core/p-3a3a8a71.js +0 -2
- package/dist/core/p-3a3a8a71.js.map +0 -1
- package/dist/core/p-67b25dfc.entry.js +0 -2
- package/dist/core/p-67b25dfc.entry.js.map +0 -1
- package/dist/core/p-895d05f9.entry.js.map +0 -1
- package/dist/core/p-94e47a21.entry.js +0 -2
- package/dist/core/p-952bdeb2.entry.js +0 -2
- package/dist/core/p-952bdeb2.entry.js.map +0 -1
- package/dist/core/p-95c8513d.entry.js.map +0 -1
- package/dist/core/p-a44c0351.entry.js +0 -2
- package/dist/core/p-a44c0351.entry.js.map +0 -1
- package/dist/core/p-a7f4168c.entry.js +0 -2
- package/dist/core/p-ad1e70c9.entry.js +0 -2
- package/dist/core/p-af3d4eba.entry.js +0 -2
- package/dist/core/p-af3d4eba.entry.js.map +0 -1
- package/dist/core/p-b9d9273f.js +0 -2
- package/dist/core/p-b9d9273f.js.map +0 -1
- package/dist/core/p-cc99e774.entry.js +0 -2
- package/dist/core/p-cc99e774.entry.js.map +0 -1
- package/dist/core/p-ce2162a2.entry.js +0 -2
- package/dist/core/p-cf3f9b02.entry.js +0 -2
- package/dist/core/p-cf3f9b02.entry.js.map +0 -1
- package/dist/core/p-d61ef782.entry.js +0 -2
- package/dist/core/p-d61ef782.entry.js.map +0 -1
- package/dist/esm/helpers-147b5b73.js.map +0 -1
- package/dist/esm/helpers-25eb1cb0.js.map +0 -1
- /package/dist/core/{p-56e19b01.entry.js.map → p-0229eb46.entry.js.map} +0 -0
- /package/dist/core/{p-05c9dee1.entry.js.map → p-03a99326.entry.js.map} +0 -0
- /package/dist/core/{p-77637e28.entry.js.map → p-03d83d2c.entry.js.map} +0 -0
- /package/dist/core/{p-19a9ab60.entry.js.map → p-05f900e5.entry.js.map} +0 -0
- /package/dist/core/{p-120a38ce.entry.js.map → p-0c7d30f5.entry.js.map} +0 -0
- /package/dist/core/{p-6bd76154.entry.js.map → p-124279fa.entry.js.map} +0 -0
- /package/dist/core/{p-5dc274f0.entry.js.map → p-29a040ef.entry.js.map} +0 -0
- /package/dist/core/{p-456282e2.entry.js.map → p-2b61d283.entry.js.map} +0 -0
- /package/dist/core/{p-40471551.entry.js.map → p-3156304b.entry.js.map} +0 -0
- /package/dist/core/{p-f0e85611.entry.js.map → p-3169d95e.entry.js.map} +0 -0
- /package/dist/core/{p-0bc92c30.entry.js.map → p-34de5ffb.entry.js.map} +0 -0
- /package/dist/core/{p-89ec372e.entry.js.map → p-382b88b2.entry.js.map} +0 -0
- /package/dist/core/{p-ce90d1b2.entry.js.map → p-3a2523df.entry.js.map} +0 -0
- /package/dist/core/{p-c32f4c0f.entry.js.map → p-3b1c88ad.entry.js.map} +0 -0
- /package/dist/core/{p-7e20c194.entry.js.map → p-4084bce2.entry.js.map} +0 -0
- /package/dist/core/{p-59e677e4.entry.js.map → p-4f118361.entry.js.map} +0 -0
- /package/dist/core/{p-89290d94.entry.js.map → p-5f71f24c.entry.js.map} +0 -0
- /package/dist/core/{p-48b62c20.entry.js.map → p-61ca218b.entry.js.map} +0 -0
- /package/dist/core/{p-9922cd00.entry.js.map → p-7565b23c.entry.js.map} +0 -0
- /package/dist/core/{p-5041cbeb.entry.js.map → p-7bba4c47.entry.js.map} +0 -0
- /package/dist/core/{p-1419c8ae.entry.js.map → p-8c2c86b5.entry.js.map} +0 -0
- /package/dist/core/{p-73dab780.entry.js.map → p-8ef60479.entry.js.map} +0 -0
- /package/dist/core/{p-1b5a47c6.entry.js.map → p-a3d903e4.entry.js.map} +0 -0
- /package/dist/core/{p-d0d2952b.entry.js.map → p-a4088bd7.entry.js.map} +0 -0
- /package/dist/core/{p-9271a06b.entry.js.map → p-a6fb5fe3.entry.js.map} +0 -0
- /package/dist/core/{p-43f87eb3.entry.js.map → p-aabb04c8.entry.js.map} +0 -0
- /package/dist/core/{p-ad786103.entry.js.map → p-b02ad2c4.entry.js.map} +0 -0
- /package/dist/core/{p-85101c9a.entry.js.map → p-ba353ac3.entry.js.map} +0 -0
- /package/dist/core/{p-ab485b11.entry.js.map → p-bc24c004.entry.js.map} +0 -0
- /package/dist/core/{p-96a909bf.entry.js.map → p-c0242c21.entry.js.map} +0 -0
- /package/dist/core/{p-516de675.entry.js.map → p-c1b268fd.entry.js.map} +0 -0
- /package/dist/core/{p-9ce35989.entry.js.map → p-d062a801.entry.js.map} +0 -0
- /package/dist/core/{p-9b85340f.entry.js.map → p-d2260763.entry.js.map} +0 -0
- /package/dist/core/{p-1eb5d7f3.entry.js.map → p-d8988d8c.entry.js.map} +0 -0
- /package/dist/core/{p-782cd387.entry.js.map → p-deedc7d3.entry.js.map} +0 -0
- /package/dist/core/{p-09d4fe07.entry.js.map → p-e7b913e5.entry.js.map} +0 -0
- /package/dist/core/{p-a7f4168c.entry.js.map → p-e85505ec.entry.js.map} +0 -0
- /package/dist/core/{p-9445c2f3.entry.js.map → p-f237940d.entry.js.map} +0 -0
- /package/dist/core/{p-522b1526.entry.js.map → p-f4b76daa.entry.js.map} +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icTopNavigationCss","TopNavigation","constructor","hostRef","this","hasAppIcon","hasIconButtons","hasNavigation","hasSearchSlotContent","resizeObserver","searchBar","checkSlots","isSlotUsed","el","initialiseSearchBar","slot","getSlot","tagName","querySelector","hideLabel","menuButtonClick","showNavMenu","searchButtonMouseDownHandler","searchButtonClick","searchButtonClickHandler","toggleSearchBar","resizeObserverCallback","currSize","deviceSize","customMobileBreakpoint","mobileSearchBarVisible","topNavResized","emit","size","document","activeElement","setAttribute","removeAttribute","setTimeout","focus","runResizeObserver","ResizeObserver","getCurrentDeviceSize","observe","DEVICE_SIZES","XL","foregroundColor","getThemeForegroundColor","hasFullWidthSearchBar","mobileSearchHiddenOnBlur","navMenuVisible","searchValue","contentAligned","L","href","inline","shortAppTitle","status","version","appTitle","undefined","watchPropHandler","newValue","oldValue","onComponentPropUndefinedChange","disconnectedCallback","_a","disconnect","componentWillLoad","componentDidLoad","checkResizeObserver","onComponentRequiredPropUndefined","prop","propName","componentWillRender","navBarMenuCloseHandler","shadowRoot","searchInputBlurHandler","detail","value","searchValueChangeHandler","themeChangeHandler","mode","mobileSearchButtonEl","fullWidth","show","icNavigationMenuOpened","icNavigationMenuClosed","body","style","height","overflow","render","hasStatus","hasVersion","hasMenuContent","searchButtonSize","S","hasTitle","isPropDefined","overMobileBreakpoint","appTitleVariant","mobileSearchButtonTitle","menuSize","shortAppTitleSlot","hasAppTitleSlot","Component","attrs","h","Host","class","IcThemeForegroundEnum","Dark","aligned","role","Object","assign","name","isEmptyString","variant","id","ref","onMouseDown","appearance","onClick","xmlns","viewBox","fill","d","width","tabindex"],"sources":["../web-components/dist/collection/components/ic-top-navigation/ic-top-navigation.css?tag=ic-top-navigation&encapsulation=shadow","../web-components/dist/collection/components/ic-top-navigation/ic-top-navigation.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: block;\n color: var(--ic-theme-text);\n width: 100%;\n position: relative;\n}\n\n:host .top-navigation {\n background-color: var(--ic-theme-primary);\n height: -moz-max-content;\n height: max-content;\n}\n\n:host(.fullwidth-searchbar) slot[name=\"search\"]::slotted(form) {\n width: 100%;\n}\n\n:host .title-link {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n padding: var(--ic-space-xxs);\n transition: var(--ic-easing-transition-fast);\n}\n\n:host .title-link,\n:host .title-link:visited,\n:host .title-link:active,\n:host .title-link ::slotted(a),\n:host .title-link:visited ::slotted(a),\n:host .title-link:active ::slotted(a) {\n color: var(--ic-theme-text);\n text-decoration: none;\n outline: none;\n}\n\n:host .title-link:hover:not(:focus) {\n background-color: var(--ic-theme-hover);\n}\n\n:host .title-link:active:not(:focus) {\n background-color: var(--ic-theme-active);\n}\n\n:host .title-link:hover {\n border-radius: var(--ic-border-radius);\n}\n\n:host .title-link:focus,\n:host .title-link:focus-within {\n border-radius: var(--ic-border-radius);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host .title-link ic-typography {\n font-weight: 600;\n}\n\n:host .nav-panel-container {\n border-top: var(--ic-keyline-lighten);\n padding: 0 var(--ic-space-lg);\n margin-left: calc(-1 * var(--section-container-margin));\n margin-right: calc(-1 * var(--section-container-margin));\n display: flex;\n}\n\n:host(.dark) .nav-panel-container {\n border-top: var(--ic-keyline-darken);\n}\n\n.top-panel-container {\n display: flex;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.navigation-tabs {\n margin-top: calc(-1 * var(--ic-space-1px));\n}\n\n.app-details-container {\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n margin-right: var(--ic-space-md);\n}\n\n.app-icon-container {\n display: flex;\n padding-right: var(--ic-space-xs);\n}\n\n.icon-buttons-container {\n display: flex;\n margin-left: var(--ic-space-md);\n}\n\n.icon-buttons-container ::slotted(nav) {\n display: flex;\n}\n\n.title-wrap {\n overflow-wrap: break-word;\n word-wrap: break-word;\n -ms-word-break: break-all;\n word-break: break-word;\n -webkit-hyphens: auto;\n hyphens: auto;\n}\n\n:host .app-status {\n border-radius: var(--ic-space-md);\n background-color: var(--ic-architectural-white);\n color: var(--ic-color-primary-text);\n padding: var(--ic-space-xxs) var(--ic-space-lg);\n margin-left: var(--ic-space-md);\n flex: 1 1 0;\n max-width: -moz-fit-content;\n max-width: fit-content;\n}\n\n:host(.dark) .app-status {\n background-color: var(--ic-theme-text);\n color: var(--ic-color-white-text);\n}\n\n:host .app-version {\n border-radius: var(--ic-space-md);\n background-color: var(--ic-theme-active);\n padding: var(--ic-space-xxs) var(--ic-space-sm);\n margin-left: var(--ic-space-xs);\n flex: 1 1 0;\n max-width: -moz-fit-content;\n max-width: fit-content;\n}\n\nslot[name=\"app-icon\"]::slotted(*) {\n fill: var(--ic-theme-text);\n width: 2em;\n height: 2em;\n}\n\nslot[name=\"toggle-icon\"] svg {\n fill: var(--ic-theme-text);\n}\n\n.search-menu-container {\n justify-content: right;\n display: flex;\n align-items: center;\n}\n\n.menu-button-container {\n margin-left: var(--ic-space-md);\n}\n\n.menu-button-container .navigation-landmark-button-text {\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\n.search-actions-container {\n display: flex;\n}\n\n.menu-buttons-slot {\n display: flex;\n flex-direction: column;\n}\n\n.navigation-landmark-text {\n position: absolute;\n width: var(--ic-space-1px);\n height: var(--ic-space-1px);\n padding: 0;\n margin: calc(-1 * var(--ic-space-1px));\n overflow: hidden;\n}\n\n.navigation-item-list {\n display: flex;\n list-style: none;\n height: 2.75rem;\n}\n\n.navigation-item-list::-webkit-scrollbar {\n display: none;\n}\n\n:host ic-section-container {\n padding-bottom: 0 !important;\n padding-top: 0 !important;\n}\n\n@media screen and (min-width: 993px) {\n .app-details-container {\n margin-right: var(--ic-space-lg);\n }\n}\n\n/* large */\n@media screen and (max-width: 1200px) {\n :host .nav-panel-container {\n padding: 0 var(--ic-space-md);\n }\n}\n\n/** Mobile styling **/\n:host(.mobile-mode) .app-status,\n:host(.mobile-mode) .app-version {\n display: none;\n}\n\n:host(.mobile-mode) .title-link {\n margin-right: var(--ic-space-xs);\n}\n\n:host(.mobile-mode) .search-menu-container {\n max-width: 10rem;\n}\n\n:host(.mobile-mode) .search-bar-container {\n display: flex;\n justify-content: center;\n align-items: center;\n border-top: var(--ic-keyline-darken);\n height: 4rem;\n padding-left: var(--ic-space-md);\n padding-right: var(--ic-space-md);\n margin-left: calc(-1 * var(--section-container-margin));\n margin-right: calc(-1 * var(--section-container-margin));\n}\n\n/* x small */\n@media screen and (max-width: 576px) {\n :host .title-link {\n margin-right: var(--ic-space-xxxs);\n word-break: break-word;\n -webkit-hyphens: none;\n hyphens: none;\n }\n\n .top-panel-container {\n min-height: 2.5rem;\n }\n\n .search-bar-container {\n margin-top: 0;\n height: 3.5rem;\n padding-left: var(--ic-space-xs);\n padding-right: var(--ic-space-xs);\n }\n\n .menu-button-container {\n margin-left: var(--ic-space-sm);\n }\n\n slot[name=\"app-icon\"]::slotted(*) {\n width: 1.5em;\n height: 1.5em;\n }\n\n slot[name=\"toggle-icon\"] svg {\n width: 1.5em;\n height: 1.5em;\n }\n}\n\n@media (forced-colors: active) {\n :host .top-navigation {\n border-bottom: var(--ic-hc-border);\n }\n\n .app-status,\n .app-version {\n border: var(--ic-hc-border);\n }\n\n slot[name=\"app-icon\"]::slotted(*) {\n fill: currentcolor;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nimport { checkResizeObserver, DEVICE_SIZES, getCurrentDeviceSize, getThemeForegroundColor, getSlot, onComponentPropUndefinedChange, onComponentRequiredPropUndefined, isSlotUsed, isEmptyString, isPropDefined, } from \"../../utils/helpers\";\n/**\n * @slot app-icon - Content will be rendered to left of app title. Anything that is slotted here will be hidden from screen readers.\n * @slot app-title - Handle routing by nesting a route in the app title.\n * @slot short-app-title - Handle routing by nesting a route in the short app title (to be displayed in place of app title on small screen sizes).\n * @slot search - Content will be rendered in search area to left of buttons.\n * @slot toggle-icon - Icon to be displayed on the button to toggle search slot content on smaller devices\n * @slot navigation - Content will be rendered in navigation panel.\n * @slot buttons - Content will be rendered to right of search bar.\n */\nexport class TopNavigation {\n constructor() {\n this.hasAppIcon = false;\n this.hasIconButtons = false;\n this.hasNavigation = false;\n this.hasSearchSlotContent = false;\n this.resizeObserver = null;\n this.searchBar = null;\n this.checkSlots = () => {\n this.hasAppIcon = isSlotUsed(this.el, \"app-icon\");\n this.hasNavigation = isSlotUsed(this.el, \"navigation\");\n this.hasIconButtons = isSlotUsed(this.el, \"buttons\");\n this.hasSearchSlotContent = isSlotUsed(this.el, \"search\");\n };\n this.initialiseSearchBar = () => {\n if (this.hasSearchSlotContent) {\n const slot = getSlot(this.el, \"search\");\n if ((slot === null || slot === void 0 ? void 0 : slot.tagName) === \"IC-SEARCH-BAR\") {\n this.searchBar = slot;\n }\n else if ((slot === null || slot === void 0 ? void 0 : slot.tagName) === \"FORM\") {\n this.searchBar = slot.querySelector(\"ic-search-bar\");\n }\n if (this.searchBar !== null) {\n this.searchBar.hideLabel = true;\n }\n }\n };\n this.menuButtonClick = () => {\n this.showNavMenu(true);\n };\n this.searchButtonMouseDownHandler = () => {\n this.searchButtonClick = true;\n };\n this.searchButtonClickHandler = () => {\n this.toggleSearchBar();\n this.searchButtonClick = false;\n };\n this.resizeObserverCallback = (currSize) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n if (currSize > this.customMobileBreakpoint) {\n this.showNavMenu(false);\n if (this.mobileSearchBarVisible) {\n this.toggleSearchBar();\n }\n }\n this.topNavResized.emit({\n size: currSize,\n });\n if (this.searchBar && document.activeElement === this.searchBar) {\n this.searchBar.setAttribute(\"hidden\", \"true\");\n //remove attribute again as this trigger a redraw & applies css\n this.searchBar.removeAttribute(\"hidden\");\n setTimeout(() => {\n this.searchBar.focus();\n }, 100);\n }\n }\n };\n this.runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback(getCurrentDeviceSize());\n });\n this.resizeObserver.observe(this.el);\n };\n this.deviceSize = DEVICE_SIZES.XL;\n this.foregroundColor = getThemeForegroundColor();\n this.hasFullWidthSearchBar = false;\n this.mobileSearchBarVisible = false;\n this.mobileSearchHiddenOnBlur = false;\n this.navMenuVisible = false;\n this.searchButtonClick = false;\n this.searchValue = \"\";\n this.contentAligned = \"full-width\";\n this.customMobileBreakpoint = DEVICE_SIZES.L;\n this.href = \"/\";\n this.inline = false;\n this.shortAppTitle = \"\";\n this.status = \"\";\n this.version = \"\";\n this.appTitle = undefined;\n }\n watchPropHandler(newValue, oldValue) {\n //added for Gatsby rehydration issue where prop is initially undefined but then changes to actual value\n //this watch can be removed once Gatsby hydration issue is resolved\n onComponentPropUndefinedChange(oldValue, newValue, this.initialiseSearchBar);\n }\n disconnectedCallback() {\n var _a;\n (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n componentWillLoad() {\n this.checkSlots();\n this.deviceSize = getCurrentDeviceSize();\n this.initialiseSearchBar();\n }\n componentDidLoad() {\n checkResizeObserver(this.runResizeObserver);\n !isSlotUsed(this.el, \"app-title\") &&\n onComponentRequiredPropUndefined([{ prop: this.appTitle, propName: \"app-title\" }], \"Top Navigation\");\n }\n componentWillRender() {\n this.checkSlots();\n }\n navBarMenuCloseHandler() {\n this.showNavMenu(false);\n this.el.shadowRoot.querySelector(\"#menu-button\").focus();\n }\n searchInputBlurHandler({ detail, }) {\n if (detail !== null) {\n if (this.mobileSearchBarVisible && !this.searchButtonClick) {\n //don't hide if blur was triggered by click on search button - let the click handler toggle the state\n this.toggleSearchBar();\n }\n this.searchValue = detail.value;\n }\n }\n searchValueChangeHandler({ detail }) {\n this.searchValue = detail.value;\n }\n themeChangeHandler({ detail }) {\n this.foregroundColor = detail.mode;\n }\n toggleSearchBar() {\n this.mobileSearchBarVisible = !this.mobileSearchBarVisible;\n if (this.searchBar !== null) {\n this.mobileSearchButtonEl.setAttribute(\"aria-label\", `${this.mobileSearchBarVisible ? \"Hide\" : \"Show\"} search`);\n this.hasFullWidthSearchBar = this.mobileSearchBarVisible;\n this.searchBar.fullWidth = this.mobileSearchBarVisible;\n if (this.mobileSearchBarVisible) {\n setTimeout(() => {\n this.searchBar.focus();\n }, 100);\n }\n }\n }\n showNavMenu(show) {\n this.navMenuVisible = show;\n (show ? this.icNavigationMenuOpened : this.icNavigationMenuClosed).emit();\n document.body.style.height = show ? \"100%\" : \"auto\";\n document.body.style.overflow = show ? \"hidden\" : \"auto\";\n }\n render() {\n const { appTitle, contentAligned, customMobileBreakpoint, deviceSize, el, foregroundColor, hasAppIcon, hasFullWidthSearchBar, hasIconButtons, hasNavigation, hasSearchSlotContent, href, inline, menuButtonClick, mobileSearchBarVisible, navMenuVisible, searchButtonClickHandler, searchButtonMouseDownHandler, shortAppTitle, status, version, } = this;\n const hasStatus = status !== \"\";\n const hasVersion = version !== \"\";\n const hasMenuContent = hasNavigation || hasIconButtons || hasStatus || hasVersion;\n const searchButtonSize = deviceSize <= DEVICE_SIZES.S ? \"default\" : \"large\";\n const hasTitle = appTitle !== \"\" && isPropDefined(appTitle);\n const overMobileBreakpoint = deviceSize <= customMobileBreakpoint;\n const appTitleVariant = overMobileBreakpoint\n ? deviceSize <= DEVICE_SIZES.S\n ? \"subtitle-small\"\n : \"h4\"\n : \"h3\";\n const mobileSearchButtonTitle = `${mobileSearchBarVisible ? \"Hide\" : \"Show\"} search`;\n const menuSize = deviceSize <= DEVICE_SIZES.S ? \"small\" : \"default\";\n const shortAppTitleSlot = isSlotUsed(el, \"short-app-title\");\n const hasAppTitleSlot = isSlotUsed(el, \"app-title\");\n const Component = hasAppTitleSlot ? \"div\" : \"a\";\n const attrs = Component == \"a\" && {\n href: href,\n };\n return (h(Host, { class: {\n \"fullwidth-searchbar\": hasFullWidthSearchBar,\n \"mobile-mode\": overMobileBreakpoint,\n [IcThemeForegroundEnum.Dark]: foregroundColor === IcThemeForegroundEnum.Dark,\n } }, h(\"div\", { class: \"top-navigation\" }, h(\"ic-section-container\", { aligned: contentAligned, \"full-height\": true }, h(\"header\", { role: \"banner\" }, h(\"div\", { class: \"top-panel-container\" }, h(\"div\", { class: \"app-details-container\" }, (hasTitle || hasAppTitleSlot) && (h(Component, Object.assign({ class: \"title-link\" }, attrs), hasAppIcon && (h(\"div\", { class: \"app-icon-container\" }, h(\"slot\", { name: \"app-icon\" }))), deviceSize <= DEVICE_SIZES.S &&\n (!isEmptyString(shortAppTitle) || shortAppTitleSlot) ? (h(\"ic-typography\", { variant: \"subtitle-small\", \"aria-label\": (!hasAppTitleSlot || !shortAppTitleSlot) &&\n `${appTitle} (${shortAppTitle})` }, h(\"h1\", null, shortAppTitleSlot ? (h(\"slot\", { name: \"short-app-title\" })) : (shortAppTitle)))) : (h(\"ic-typography\", { variant: appTitleVariant }, h(\"h1\", { class: \"title-wrap\" }, hasAppTitleSlot ? (h(\"slot\", { name: \"app-title\" })) : (appTitle)))))), hasStatus && (h(\"div\", { class: \"app-status\" }, h(\"ic-typography\", { \"aria-label\": \"app tag\", variant: \"label-uppercase\", class: \"app-status-text\" }, status))), hasVersion && (h(\"div\", { class: \"app-version\" }, h(\"ic-typography\", { variant: \"label\", class: \"app-version-text\", \"aria-label\": \"app version\" }, version)))), (hasSearchSlotContent || hasMenuContent) && (h(\"div\", { class: \"search-menu-container\" }, h(\"div\", { class: \"search-actions-container\" }, !overMobileBreakpoint && h(\"slot\", { name: \"search\" }), hasSearchSlotContent && overMobileBreakpoint && (h(\"ic-button\", { id: \"search-toggle-button\", ref: (el) => (this.mobileSearchButtonEl = el), onMouseDown: searchButtonMouseDownHandler, variant: \"icon\", size: searchButtonSize, \"aria-label\": mobileSearchButtonTitle, appearance: foregroundColor, onClick: searchButtonClickHandler }, h(\"slot\", { name: \"toggle-icon\" }, h(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", fill: \"#ffffff\" }, h(\"path\", { d: \"M0 0h24v24H0V0z\", fill: \"none\" }), h(\"path\", { d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" }))))), hasIconButtons && !overMobileBreakpoint && (h(\"div\", { class: \"icon-buttons-container\" }, h(\"slot\", { name: \"buttons\" }))), hasMenuContent && overMobileBreakpoint && (h(\"div\", { class: \"menu-button-container\" }, h(\"span\", { id: \"navigation-landmark-button-text\", class: \"navigation-landmark-button-text\", \"aria-hidden\": \"true\" }, \"Main navigation button\"), h(\"nav\", { \"aria-labelledby\": \"navigation-landmark-button-text\", \"aria-hidden\": `${navMenuVisible}` }, h(\"ic-button\", { id: \"menu-button\", appearance: foregroundColor, variant: \"secondary\", \"aria-expanded\": \"false\", \"aria-haspopup\": \"true\", \"aria-label\": `Open ${hasNavigation ? \"navigation\" : \"app\"} menu`, size: menuSize, onClick: menuButtonClick }, \"Menu\", h(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", height: \"24px\", viewBox: \"0 0 24 24\", width: \"24px\", fill: \"#ffffff\", slot: \"icon\" }, h(\"path\", { d: \"M0 0h24v24H0V0z\", fill: \"none\" }), h(\"path\", { d: \"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\" })))))))))), mobileSearchBarVisible && (h(\"div\", { class: \"search-bar-container\" }, h(\"slot\", { name: \"search\" }))), hasNavigation && !overMobileBreakpoint && (h(\"div\", { class: \"navigation-tabs\" }, h(\"span\", { id: \"navigation-landmark-text\", class: \"navigation-landmark-text\", \"aria-hidden\": \"true\" }, \"Main pages\"), h(\"nav\", { \"aria-labelledby\": \"navigation-landmark-text\", class: \"nav-panel-container\" }, h(\"ic-horizontal-scroll\", { appearance: foregroundColor }, h(\"ul\", { class: \"navigation-item-list\", tabindex: \"-1\" }, h(\"slot\", { name: \"navigation\" }))))))))), navMenuVisible && (h(\"ic-navigation-menu\", { version: version, status: status, class: {\n [\"inline\"]: inline,\n } }, hasIconButtons && (h(\"div\", { class: \"menu-buttons-slot\", slot: \"buttons\" }, h(\"slot\", { name: \"buttons\" }))), h(\"ul\", { slot: \"navigation\" }, h(\"slot\", { name: \"navigation\" }))))));\n }\n static get is() { return \"ic-top-navigation\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-top-navigation.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-top-navigation.css\"]\n };\n }\n static get properties() {\n return {\n \"contentAligned\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcAlignment\",\n \"resolved\": \"\\\"center\\\" | \\\"full-width\\\" | \\\"left\\\"\",\n \"references\": {\n \"IcAlignment\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcAlignment\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The alignment of the top navigation content.\"\n },\n \"attribute\": \"content-aligned\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"full-width\\\"\"\n },\n \"customMobileBreakpoint\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcDeviceSizes\",\n \"resolved\": \"0 | 1200 | 576 | 768 | 992\",\n \"references\": {\n \"IcDeviceSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcDeviceSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Can set a custom breakpoint for the top navigation to switch to mobile mode.\\nMust be one of our specified breakpoints in px: `0`, `576`, `768`, `992`, `1200`.\"\n },\n \"attribute\": \"custom-mobile-breakpoint\",\n \"reflect\": false,\n \"defaultValue\": \"DEVICE_SIZES.L\"\n },\n \"href\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The URL to navigate to when the app title is clicked.\"\n },\n \"attribute\": \"href\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"/\\\"\"\n },\n \"inline\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the flyout navigation menu on small devices will be contained by the parent element.\"\n },\n \"attribute\": \"inline\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"shortAppTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The short title of the app to be displayed at small screen sizes in place of the app title.\"\n },\n \"attribute\": \"short-app-title\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"status\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The status info to be displayed.\"\n },\n \"attribute\": \"status\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"version\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The version info to be displayed.\"\n },\n \"attribute\": \"version\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"appTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The app title to be displayed. This is required, unless a slotted app title link is used.\"\n },\n \"attribute\": \"app-title\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"deviceSize\": {},\n \"foregroundColor\": {},\n \"hasFullWidthSearchBar\": {},\n \"mobileSearchBarVisible\": {},\n \"mobileSearchHiddenOnBlur\": {},\n \"navMenuVisible\": {},\n \"searchButtonClick\": {},\n \"searchValue\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icNavigationMenuClosed\",\n \"name\": \"icNavigationMenuClosed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"- Emitted when the menu is closed.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icNavigationMenuOpened\",\n \"name\": \"icNavigationMenuOpened\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"- Emitted when the menu is opened.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"topNavResized\",\n \"name\": \"topNavResized\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the top navigation is resized.\"\n },\n \"complexType\": {\n \"original\": \"{ size: number }\",\n \"resolved\": \"{ size: number; }\",\n \"references\": {}\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"appTitle\",\n \"methodName\": \"watchPropHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icNavigationMenuClose\",\n \"method\": \"navBarMenuCloseHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"icSearchBarBlur\",\n \"method\": \"searchInputBlurHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"icChange\",\n \"method\": \"searchValueChangeHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"themeChange\",\n \"method\": \"themeChangeHandler\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-top-navigation.js.map\n"],"mappings":"uMAAA,MAAMA,EAAqB,m+N,MCYdC,EAAa,MACtB,WAAAC,CAAAC,G,qLACIC,KAAKC,WAAa,MAClBD,KAAKE,eAAiB,MACtBF,KAAKG,cAAgB,MACrBH,KAAKI,qBAAuB,MAC5BJ,KAAKK,eAAiB,KACtBL,KAAKM,UAAY,KACjBN,KAAKO,WAAa,KACdP,KAAKC,WAAaO,EAAWR,KAAKS,GAAI,YACtCT,KAAKG,cAAgBK,EAAWR,KAAKS,GAAI,cACzCT,KAAKE,eAAiBM,EAAWR,KAAKS,GAAI,WAC1CT,KAAKI,qBAAuBI,EAAWR,KAAKS,GAAI,SAAS,EAE7DT,KAAKU,oBAAsB,KACvB,GAAIV,KAAKI,qBAAsB,CAC3B,MAAMO,EAAOC,EAAQZ,KAAKS,GAAI,UAC9B,IAAKE,IAAS,MAAQA,SAAc,OAAS,EAAIA,EAAKE,WAAa,gBAAiB,CAChFb,KAAKM,UAAYK,C,MAEhB,IAAKA,IAAS,MAAQA,SAAc,OAAS,EAAIA,EAAKE,WAAa,OAAQ,CAC5Eb,KAAKM,UAAYK,EAAKG,cAAc,gB,CAExC,GAAId,KAAKM,YAAc,KAAM,CACzBN,KAAKM,UAAUS,UAAY,I,IAIvCf,KAAKgB,gBA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,CAAES,KAAM,iB"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as t,c as e,f as i,h as s,H as r,g as o}from"./p-8455d1bb.js";import{c,r as a,i as l,o as n}from"./p-b9d9273f.js";const h=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor"/>\n</svg>`;const d=':host{display:block;border:none;position:relative}:host .tree-item-content{display:flex;align-items:center;min-height:calc(var(--ic-space-xl) + var(--ic-space-xs));padding:0 var(--ic-space-xs);text-decoration:none;color:var(--ic-primary-text)}::slotted([slot="router-item"]){display:flex;align-items:center;min-height:calc(var(--ic-space-xl) + var(--ic-space-xs));text-decoration:none;font-family:var(--ic-font-body-family);color:var(--ic-primary-text);padding:0 var(--ic-space-xs) !important}:host(.ic-tree-item-truncate) .tree-item-content,:host(.ic-tree-item-truncate) ::slotted([slot="router-item"]){height:calc(var(--ic-space-xl) + var(--ic-space-xs))}::slotted([slot="router-item"].ic-tree-item-single){padding-left:calc(var(--ic-space-xl) + var(--ic-space-xs)) !important}:host .tree-item-content:focus,::slotted([slot="router-item"]:focus){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast);outline:none}:host .tree-item-content:hover,::slotted([slot="router-item"]:hover){background-color:var(--ic-action-dark-bg-hover) !important;cursor:pointer}:host .tree-item-content:active,::slotted([slot="router-item"]:active){background-color:var(--ic-action-dark-bg-active) !important}:host(.ic-tree-item-selected) .tree-item-content,:host(.ic-tree-item-selected) ::slotted([slot="router-item"]){background-color:var(--ic-action-default-bg-hover) !important}:host(.ic-tree-item-small) .tree-item-content,:host(.ic-tree-item-small) ::slotted([slot="router-item"]){min-height:var(--ic-space-xl)}:host(.ic-tree-item-large) .tree-item-content,:host(.ic-tree-item-large) ::slotted([slot="router-item"]){min-height:var(--ic-space-xxl)}:host(.ic-tree-item-truncate.ic-tree-item-small) .tree-item-content,:host(.ic-tree-item-truncate.ic-tree-item-small) ::slotted([slot="router-item"]){height:var(--ic-space-xl)}:host(.ic-tree-item-truncate.ic-tree-item-large) .tree-item-content,:host(.ic-tree-item-truncate.ic-tree-item-large) ::slotted([slot="router-item"]){height:var(--ic-space-xxl)}:host(.ic-tree-item-disabled){pointer-events:none}:host(.ic-tree-item-disabled) .tree-item-content,:host(.ic-tree-item-disabled) .arrow-dropdown,:host(.ic-tree-item-disabled) ::slotted([slot="icon"]),:host(.ic-tree-item-disabled) ::slotted([slot="router-item"]){color:var(--ic-architectural-200) !important;fill:var(--ic-architectural-200);pointer-events:none}:host(.ic-tree-item-light) .tree-item-content,:host(.ic-tree-item-light) .arrow-dropdown,:host(.ic-tree-item-light) ::slotted([slot="icon"]),:host(.ic-tree-item-light) ::slotted([slot="router-item"]){color:var(--ic-architectural-white);fill:var(--ic-architectural-white)}:host .arrow-dropdown{color:var(--ic-action-default);margin-right:var(--ic-space-xs)}:host(.ic-tree-item-small) .arrow-dropdown{margin-right:var(--ic-space-xxs)}:host .tree-item-expanded{transform:rotate(180deg);margin-top:calc(-1 * var(--ic-space-xxs))}:host .ic-tree-item-single{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-tree-item-small) .ic-tree-item-single{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xxs))}.icon-container{width:var(--ic-space-lg);height:var(--ic-space-lg);margin:0 var(--ic-space-xs) 0 0}:host(.ic-tree-item-small) .icon-container{margin:0 var(--ic-space-xxs) 0 0}.ic-text-overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.ic-tooltip-overflow{overflow:hidden}@media (forced-colors: active){::slotted([slot="icon"]){fill:currentcolor}:host(.ic-tree-item-disabled) .tree-item-content,:host(.ic-tree-item-disabled) .arrow-dropdown,:host(.ic-tree-item-disabled) ::slotted([slot="icon"]),:host(.ic-tree-item-disabled) ::slotted([slot="router-item"]){color:GrayText !important;fill:GrayText !important}:host .tree-item-content:focus,::slotted([slot="router-item"]:focus){border:var(--ic-hc-border) !important}:host(.ic-tree-item-selected) .tree-item-content,:host(.ic-tree-item-selected) ::slotted([slot="router-item"]){color:Highlight !important}}';let m=0;const p=class{constructor(s){t(this,s);this.icTreeItemSelected=e(this,"icTreeItemSelected",7);this.treeItemId=`ic-tree-item-${m++}`;this.treeItemTag="IC-TREE-ITEM";this.hostMutationObserver=null;this.TOOLTIP="ic-tooltip";this.handleTreeItemClicked=()=>{if(this.isParent){this.expanded=!this.expanded;this.hasParentExpanded=true}this.updateAriaLabel();this.selected=true;this.watchSelectedHandler()};this.setTreeItemPadding=()=>{let t=1;let e=this.el.parentElement;const i=this.el.shadowRoot.querySelector(".tree-item-content");const s=Array.from(e.children).map((t=>{if(t!==this.el&&!t.querySelector('[slot="router-item"]')&&!t.querySelector('[slot="label"]')){return t.children.length>0}else{return false}})).includes(true);const r=e.tagName===this.treeItemTag;const o=this.hasRouterSlot();if(s&&!this.el.isParent||r&&!this.el.isParent){if(o){this.routerSlot.classList.add("ic-tree-item-single")}else{i.classList.add("ic-tree-item-single")}}while(e){if(e.tagName===this.treeItemTag){t++;if(!this.el.isParent&&s){i.style.paddingLeft=`calc(var(--ic-space-xl) + ${t*16}px)`}else if(!this.el.isParent){i.style.paddingLeft=`calc(var(--ic-space-xs) + ${t*24}px`}else{i.style.paddingLeft=`${t*16}px`}}e=e.parentElement}};this.truncateTreeItemLabel=t=>{const e=t.shadowRoot.querySelector(".tree-item-label");const i=e===null||e===void 0?void 0:e.closest(this.TOOLTIP);const s=t.shadowRoot.querySelector(".tree-item-content");if((e===null||e===void 0?void 0:e.scrollHeight)>(s===null||s===void 0?void 0:s.clientHeight)){e.classList.add("ic-text-overflow");if(!i){const t=document.createElement("ic-tooltip");t.setAttribute("target",this.el.id);t.setAttribute("label",e.textContent);t.classList.add("ic-tooltip-overflow");t.setAttribute("placement","right");s.appendChild(t);t.appendChild(e)}}};this.hostMutationCallback=t=>{if(t.some((({type:t,addedNodes:e,removedNodes:i})=>t==="childList"?c(e,i,"icon"):false))){i(this)}};this.handleDisplayTooltip=t=>{const e=this.el.shadowRoot.querySelector(".tree-item-label");const i=e===null||e===void 0?void 0:e.closest(this.TOOLTIP);i===null||i===void 0?void 0:i.displayTooltip(t)};this.childTreeItems=undefined;this.appearance="dark";this.disabled=false;this.expanded=false;this.hasParentExpanded=false;this.href=undefined;this.hreflang="";this.isParent=false;this.label="";this.referrerpolicy=undefined;this.rel=undefined;this.selected=false;this.size="default";this.target=undefined;this.truncateTreeItem=undefined}watchDisabledHandler(){a(this.disabled,this.el)}watchSelectedHandler(){if(this.selected){this.icTreeItemSelected.emit({id:this.el.id})}this.updateAriaLabel()}disconnectedCallback(){var t;(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){a(this.disabled,this.el)}componentDidLoad(){this.childTreeItems=Array.from(this.el.children).filter((t=>t.tagName===this.treeItemTag));if(this.childTreeItems.length>0){this.isParent=true}this.setTreeItemPadding();this.updateAriaLabel();setTimeout((()=>{this.truncateTreeItem&&this.truncateTreeItemLabel(this.el)}),100);!l(this.el,"label")&&n([{prop:this.label,propName:"label"}],"Tree item");this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}componentDidUpdate(){if(this.hasParentExpanded){this.childTreeItems.forEach((t=>{t.truncateTreeItem&&this.truncateTreeItemLabel(t)}));this.hasParentExpanded=false}}handleKeyDown(t){if(t.key==="Enter"||t.key===" "){t.stopImmediatePropagation();this.handleTreeItemClicked()}}async setFocus(){var t,e;if(this.hasRouterSlot()){(t=this.routerSlot)===null||t===void 0?void 0:t.focus()}else{(e=this.treeItemElement)===null||e===void 0?void 0:e.focus()}}async updateAriaLabel(){let t;if(this.hasRouterSlot()){t=this.routerSlot.textContent}else if(l(this.el,"label")){t=this.el.querySelector('[slot="label"]').textContent}else{t=this.label}if(this.isParent){t=`${t}, triggers submenu, ${this.expanded?"expanded":"collapsed"}`}if(this.el.parentElement){const e=Array.from(this.el.parentElement.children).filter((t=>t.tagName===this.treeItemTag));const i=e.indexOf(this.el)+1;const s=e.length;t=`${t}, ${i} of ${s}`}if(this.selected){t=`${t}, active`}if(this.disabled){t=`${t}, dimmed`}if(this.hasRouterSlot()){this.routerSlot.ariaLabel=t}else{this.treeItemElement.ariaLabel=t}}hasRouterSlot(){this.routerSlot=this.el.querySelector('[slot="router-item"]');return!!this.routerSlot}render(){const{appearance:t,disabled:e,label:i,selected:o,size:c,expanded:a}=this;const n=this.href&&!this.disabled?"a":"div";const d=n=="a"&&{href:this.href,hrefLang:this.hreflang,referrerPolicy:this.referrerpolicy,rel:this.rel,target:this.target};return s(r,{class:{[`ic-tree-item-${t}`]:true,"ic-tree-item-disabled":e,"ic-tree-item-selected":!e&&o,[`ic-tree-item-${c}`]:c!=="default","ic-tree-item-truncate":this.truncateTreeItem},id:this.treeItemId},this.hasRouterSlot()?s("slot",{name:"router-item"}):s(n,Object.assign({class:{"tree-item-content":true},tabIndex:e?-1:0,onClick:this.handleTreeItemClicked,ref:t=>this.treeItemElement=t,"aria-disabled":e?"true":"false","aria-live":"polite"},d,{onFocus:()=>this.handleDisplayTooltip(true),onBlur:()=>this.handleDisplayTooltip(false)}),this.isParent&&s("span",{class:{["arrow-dropdown"]:true,["tree-item-expanded"]:a},"aria-hidden":"true",innerHTML:h}),l(this.el,"icon")&&s("div",{class:"icon-container"},s("slot",{name:"icon"})),s("ic-typography",{class:"tree-item-label"},l(this.el,"label")?s("slot",{name:"label"}):i)),a&&s("div",{"aria-hidden":`${!a}`},s("slot",null)))}get el(){return o(this)}static get watchers(){return{disabled:["watchDisabledHandler"],selected:["watchSelectedHandler"]}}};p.style=d;export{p as ic_tree_item};
|
2
|
-
//# sourceMappingURL=p-20075bc7.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icTreeItemCss","treeItemIds","TreeItem","this","treeItemId","treeItemTag","hostMutationObserver","TOOLTIP","handleTreeItemClicked","isParent","expanded","hasParentExpanded","updateAriaLabel","selected","watchSelectedHandler","setTreeItemPadding","level","parentElement","el","treeItemContent","shadowRoot","querySelector","isSiblingOfParent","Array","from","children","map","sibling","length","includes","isChild","tagName","isRouterItem","hasRouterSlot","routerSlot","classList","add","style","paddingLeft","truncateTreeItemLabel","treeItem","typographyEl","tooltip","closest","treeContent","scrollHeight","clientHeight","tooltipEl","document","createElement","setAttribute","id","textContent","appendChild","hostMutationCallback","mutationList","some","type","addedNodes","removedNodes","checkSlotInChildMutations","forceUpdate","handleDisplayTooltip","display","displayTooltip","watchDisabledHandler","removeDisabledFalse","disabled","icTreeItemSelected","emit","disconnectedCallback","_a","disconnect","componentWillLoad","componentDidLoad","childTreeItems","filter","child","setTimeout","truncateTreeItem","isSlotUsed","onComponentRequiredPropUndefined","prop","label","propName","MutationObserver","observe","childList","componentDidUpdate","forEach","handleKeyDown","ev","key","stopImmediatePropagation","setFocus","focus","_b","treeItemElement","ariaLabel","treeItems","index","indexOf","parentChildren","render","appearance","size","Component","href","attrs","hrefLang","hreflang","referrerPolicy","referrerpolicy","rel","target","h","Host","class","name","Object","assign","tabIndex","onClick","ref","onFocus","onBlur","innerHTML","arrowDropdown"],"sources":["src/components/ic-tree-item/ic-tree-item.css?tag=ic-tree-item&encapsulation=shadow","src/components/ic-tree-item/ic-tree-item.tsx"],"sourcesContent":[":host {\n display: block;\n border: none;\n position: relative;\n}\n\n:host .tree-item-content {\n display: flex;\n align-items: center;\n min-height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n padding: 0 var(--ic-space-xs);\n text-decoration: none;\n color: var(--ic-primary-text);\n}\n\n::slotted([slot=\"router-item\"]) {\n display: flex;\n align-items: center;\n min-height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n text-decoration: none;\n font-family: var(--ic-font-body-family);\n color: var(--ic-primary-text);\n padding: 0 var(--ic-space-xs) !important;\n}\n\n:host(.ic-tree-item-truncate) .tree-item-content,\n:host(.ic-tree-item-truncate) ::slotted([slot=\"router-item\"]) {\n height: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n::slotted([slot=\"router-item\"].ic-tree-item-single) {\n padding-left: calc(var(--ic-space-xl) + var(--ic-space-xs)) !important;\n}\n\n:host .tree-item-content:focus,\n::slotted([slot=\"router-item\"]:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n outline: none;\n}\n\n:host .tree-item-content:hover,\n::slotted([slot=\"router-item\"]:hover) {\n background-color: var(--ic-action-dark-bg-hover) !important;\n cursor: pointer;\n}\n\n:host .tree-item-content:active,\n::slotted([slot=\"router-item\"]:active) {\n background-color: var(--ic-action-dark-bg-active) !important;\n}\n\n:host(.ic-tree-item-selected) .tree-item-content,\n:host(.ic-tree-item-selected) ::slotted([slot=\"router-item\"]) {\n background-color: var(--ic-action-default-bg-hover) !important;\n}\n\n:host(.ic-tree-item-small) .tree-item-content,\n:host(.ic-tree-item-small) ::slotted([slot=\"router-item\"]) {\n min-height: var(--ic-space-xl);\n}\n\n:host(.ic-tree-item-large) .tree-item-content,\n:host(.ic-tree-item-large) ::slotted([slot=\"router-item\"]) {\n min-height: var(--ic-space-xxl);\n}\n\n:host(.ic-tree-item-truncate.ic-tree-item-small) .tree-item-content,\n:host(.ic-tree-item-truncate.ic-tree-item-small)\n ::slotted([slot=\"router-item\"]) {\n height: var(--ic-space-xl);\n}\n\n:host(.ic-tree-item-truncate.ic-tree-item-large) .tree-item-content,\n:host(.ic-tree-item-truncate.ic-tree-item-large)\n ::slotted([slot=\"router-item\"]) {\n height: var(--ic-space-xxl);\n}\n\n:host(.ic-tree-item-disabled) {\n pointer-events: none;\n}\n\n:host(.ic-tree-item-disabled) .tree-item-content,\n:host(.ic-tree-item-disabled) .arrow-dropdown,\n:host(.ic-tree-item-disabled) ::slotted([slot=\"icon\"]),\n:host(.ic-tree-item-disabled) ::slotted([slot=\"router-item\"]) {\n color: var(--ic-architectural-200) !important;\n fill: var(--ic-architectural-200);\n pointer-events: none;\n}\n\n:host(.ic-tree-item-light) .tree-item-content,\n:host(.ic-tree-item-light) .arrow-dropdown,\n:host(.ic-tree-item-light) ::slotted([slot=\"icon\"]),\n:host(.ic-tree-item-light) ::slotted([slot=\"router-item\"]) {\n color: var(--ic-architectural-white);\n fill: var(--ic-architectural-white);\n}\n\n:host .arrow-dropdown {\n color: var(--ic-action-default);\n margin-right: var(--ic-space-xs);\n}\n\n:host(.ic-tree-item-small) .arrow-dropdown {\n margin-right: var(--ic-space-xxs);\n}\n\n:host .tree-item-expanded {\n transform: rotate(180deg);\n margin-top: calc(-1 * var(--ic-space-xxs));\n}\n\n:host .ic-tree-item-single {\n padding-left: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n:host(.ic-tree-item-small) .ic-tree-item-single {\n padding-left: calc(var(--ic-space-xl) + var(--ic-space-xxs));\n}\n\n.icon-container {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n margin: 0 var(--ic-space-xs) 0 0;\n}\n\n:host(.ic-tree-item-small) .icon-container {\n margin: 0 var(--ic-space-xxs) 0 0;\n}\n\n.ic-text-overflow {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.ic-tooltip-overflow {\n overflow: hidden;\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n\n :host(.ic-tree-item-disabled) .tree-item-content,\n :host(.ic-tree-item-disabled) .arrow-dropdown,\n :host(.ic-tree-item-disabled) ::slotted([slot=\"icon\"]),\n :host(.ic-tree-item-disabled) ::slotted([slot=\"router-item\"]) {\n color: GrayText !important;\n fill: GrayText !important;\n }\n\n :host .tree-item-content:focus,\n ::slotted([slot=\"router-item\"]:focus) {\n border: var(--ic-hc-border) !important;\n }\n\n :host(.ic-tree-item-selected) .tree-item-content,\n :host(.ic-tree-item-selected) ::slotted([slot=\"router-item\"]) {\n color: Highlight !important;\n }\n}\n","import {\n Component,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Host,\n Watch,\n State,\n Listen,\n forceUpdate,\n Method,\n} from \"@stencil/core\";\nimport { IcSizes, IcThemeForegroundNoDefault } from \"../../utils/types\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n checkSlotInChildMutations,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\n\nlet treeItemIds = 0;\n\n/**\n * @slot label - Content is set as the tree item label.\n * @slot icon - Content is placed to the left of the label.\n * @slot router-item - Handle routing by nesting your routes in this slot.\n */\n@Component({\n tag: \"ic-tree-item\",\n styleUrl: \"ic-tree-item.css\",\n shadow: true,\n})\nexport class TreeItem {\n private treeItemId = `ic-tree-item-${treeItemIds++}`;\n private treeItemElement: HTMLElement;\n private treeItemTag = \"IC-TREE-ITEM\";\n private routerSlot: HTMLElement;\n private hostMutationObserver: MutationObserver = null;\n private TOOLTIP = \"ic-tooltip\";\n\n @Element() el: HTMLIcTreeItemElement;\n\n @State() childTreeItems: HTMLIcTreeItemElement[];\n\n /**\n * @internal Determines whether the light or dark variant of the tree item should be displayed.\n */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n /**\n * If `true`, the tree item appears in the disabled state.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the tree item appears in the expanded state.\n */\n @Prop({ mutable: true }) expanded: boolean = false;\n\n /**\n * @internal Determines if the parent tree item has been expanded.\n */\n @Prop({ mutable: true }) hasParentExpanded: boolean = false;\n\n /**\n * The URL that the tree item link points to. If set, the tree item will render as an \"a\" tag, otherwise it will render as a div.\n */\n @Prop() href?: string | undefined;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string = \"\";\n\n /**\n * @internal If `true`, the tree item is a parent of other tree items.\n */\n @Prop({ mutable: true }) isParent: boolean = false;\n\n /**\n * The label of the tree item.\n */\n @Prop() label: string = \"\";\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * If `true`, the tree item appears in the selected state.\n */\n @Prop({ mutable: true }) selected: boolean = false;\n @Watch(\"selected\")\n watchSelectedHandler() {\n if (this.selected) {\n this.icTreeItemSelected.emit({ id: this.el.id });\n }\n this.updateAriaLabel();\n }\n\n /**\n * @internal Determines the size of the tree item.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * If `true`, the tree item label will be truncated instead of text wrapping.\n */\n @Prop() truncateTreeItem?: boolean;\n\n /**\n * Emitted when tree item is selected.\n */\n @Event() icTreeItemSelected: EventEmitter<{ id: string }>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n this.childTreeItems = Array.from((this.el as HTMLElement).children).filter(\n (child) => child.tagName === this.treeItemTag\n ) as HTMLIcTreeItemElement[];\n\n if (this.childTreeItems.length > 0) {\n this.isParent = true;\n }\n\n this.setTreeItemPadding();\n\n this.updateAriaLabel();\n\n setTimeout(() => {\n this.truncateTreeItem && this.truncateTreeItemLabel(this.el);\n }, 100);\n\n !isSlotUsed(this.el, \"label\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tree item\"\n );\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n componentDidUpdate(): void {\n if (this.hasParentExpanded) {\n this.childTreeItems.forEach((child: HTMLIcTreeItemElement) => {\n child.truncateTreeItem && this.truncateTreeItemLabel(child);\n });\n this.hasParentExpanded = false;\n }\n }\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n if (ev.key === \"Enter\" || ev.key === \" \") {\n ev.stopImmediatePropagation();\n this.handleTreeItemClicked();\n }\n }\n\n /**\n * Sets focus on the native `input`.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.hasRouterSlot()) {\n this.routerSlot?.focus();\n } else {\n this.treeItemElement?.focus();\n }\n }\n\n private handleTreeItemClicked = (): void => {\n if (this.isParent) {\n this.expanded = !this.expanded;\n this.hasParentExpanded = true;\n }\n\n this.updateAriaLabel();\n this.selected = true;\n this.watchSelectedHandler();\n };\n\n /**\n * @internal Updates the aria-label of the tree item.\n */\n @Method()\n async updateAriaLabel(): Promise<void> {\n let ariaLabel;\n\n if (this.hasRouterSlot()) {\n ariaLabel = this.routerSlot.textContent;\n } else if (isSlotUsed(this.el, \"label\")) {\n ariaLabel = this.el.querySelector('[slot=\"label\"]').textContent;\n } else {\n ariaLabel = this.label;\n }\n\n if (this.isParent) {\n ariaLabel = `${ariaLabel}, triggers submenu, ${\n this.expanded ? \"expanded\" : \"collapsed\"\n }`;\n }\n\n if (this.el.parentElement) {\n const treeItems = Array.from(\n (this.el.parentElement as HTMLElement).children\n ).filter(\n (child) => child.tagName === this.treeItemTag\n ) as HTMLIcTreeItemElement[];\n\n const index = treeItems.indexOf(this.el) + 1;\n const parentChildren = treeItems.length;\n\n ariaLabel = `${ariaLabel}, ${index} of ${parentChildren}`;\n }\n\n if (this.selected) {\n ariaLabel = `${ariaLabel}, active`;\n }\n\n if (this.disabled) {\n ariaLabel = `${ariaLabel}, dimmed`;\n }\n\n if (this.hasRouterSlot()) {\n this.routerSlot.ariaLabel = ariaLabel;\n } else {\n this.treeItemElement.ariaLabel = ariaLabel;\n }\n }\n\n private setTreeItemPadding = () => {\n let level = 1;\n let parentElement = this.el.parentElement;\n const treeItemContent = this.el.shadowRoot.querySelector(\n \".tree-item-content\"\n ) as HTMLElement;\n\n const isSiblingOfParent = Array.from(parentElement.children)\n .map((sibling) => {\n if (\n sibling !== this.el &&\n !sibling.querySelector('[slot=\"router-item\"]') &&\n !sibling.querySelector('[slot=\"label\"]')\n ) {\n return sibling.children.length > 0;\n } else {\n return false;\n }\n })\n .includes(true);\n\n const isChild = parentElement.tagName === this.treeItemTag;\n\n const isRouterItem = this.hasRouterSlot();\n\n if (\n (isSiblingOfParent && !this.el.isParent) ||\n (isChild && !this.el.isParent)\n ) {\n if (isRouterItem) {\n this.routerSlot.classList.add(\"ic-tree-item-single\");\n } else {\n treeItemContent.classList.add(\"ic-tree-item-single\");\n }\n }\n\n while (parentElement) {\n if (parentElement.tagName === this.treeItemTag) {\n level++;\n if (!this.el.isParent && isSiblingOfParent) {\n treeItemContent.style.paddingLeft = `calc(var(--ic-space-xl) + ${\n level * 16\n }px)`;\n } else if (!this.el.isParent) {\n treeItemContent.style.paddingLeft = `calc(var(--ic-space-xs) + ${\n level * 24\n }px`;\n } else {\n treeItemContent.style.paddingLeft = `${level * 16}px`;\n }\n }\n parentElement = parentElement.parentElement;\n }\n };\n\n private truncateTreeItemLabel = (treeItem: HTMLIcTreeItemElement) => {\n const typographyEl: HTMLIcTypographyElement =\n treeItem.shadowRoot.querySelector(\".tree-item-label\");\n const tooltip = typographyEl?.closest(this.TOOLTIP);\n const treeContent: HTMLElement =\n treeItem.shadowRoot.querySelector(\".tree-item-content\");\n\n if (typographyEl?.scrollHeight > treeContent?.clientHeight) {\n typographyEl.classList.add(\"ic-text-overflow\");\n\n if (!tooltip) {\n const tooltipEl = document.createElement(\"ic-tooltip\");\n tooltipEl.setAttribute(\"target\", this.el.id);\n tooltipEl.setAttribute(\"label\", typographyEl.textContent);\n tooltipEl.classList.add(\"ic-tooltip-overflow\");\n tooltipEl.setAttribute(\"placement\", \"right\");\n treeContent.appendChild(tooltipEl);\n tooltipEl.appendChild(typographyEl);\n }\n }\n };\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n return !!this.routerSlot;\n }\n\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n if (\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, \"icon\")\n : false\n )\n ) {\n forceUpdate(this);\n }\n };\n\n private handleDisplayTooltip = (display: boolean) => {\n const typographyEl: HTMLIcTypographyElement =\n this.el.shadowRoot.querySelector(\".tree-item-label\");\n const tooltip: HTMLIcTooltipElement = typographyEl?.closest(this.TOOLTIP);\n\n tooltip?.displayTooltip(display);\n };\n\n render() {\n const { appearance, disabled, label, selected, size, expanded } = this;\n\n const Component = this.href && !this.disabled ? \"a\" : \"div\";\n\n const attrs = Component == \"a\" && {\n href: this.href,\n hrefLang: this.hreflang,\n referrerPolicy: this.referrerpolicy,\n rel: this.rel,\n target: this.target,\n };\n\n return (\n <Host\n class={{\n [`ic-tree-item-${appearance}`]: true,\n \"ic-tree-item-disabled\": disabled,\n \"ic-tree-item-selected\": !disabled && selected,\n [`ic-tree-item-${size}`]: size !== \"default\",\n \"ic-tree-item-truncate\": this.truncateTreeItem,\n }}\n id={this.treeItemId}\n >\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\" />\n ) : (\n <Component\n class={{\n \"tree-item-content\": true,\n }}\n tabIndex={disabled ? -1 : 0}\n onClick={this.handleTreeItemClicked}\n ref={(el) => (this.treeItemElement = el)}\n aria-disabled={disabled ? \"true\" : \"false\"}\n aria-live=\"polite\"\n {...attrs}\n onFocus={() => this.handleDisplayTooltip(true)}\n onBlur={() => this.handleDisplayTooltip(false)}\n >\n {this.isParent && (\n <span\n class={{\n [\"arrow-dropdown\"]: true,\n [\"tree-item-expanded\"]: expanded,\n }}\n aria-hidden=\"true\"\n innerHTML={arrowDropdown}\n />\n )}\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography class=\"tree-item-label\">\n {isSlotUsed(this.el, \"label\") ? <slot name=\"label\" /> : label}\n </ic-typography>\n </Component>\n )}\n {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AAgB4F,KAASA,IAAS,UACnC,wBAAyBtG,KAAK4E,kBAEhC5B,GAAIhD,KAAKC,YAERD,KAAK8B,gBACJkF,EAAA,QAAMG,KAAK,gBAEXH,EAACT,EAASa,OAAAC,OAAA,CACRH,MAAO,CACL,oBAAqB,MAEvBI,SAAUtD,GAAY,EAAI,EAC1BuD,QAASvH,KAAKK,sBACdmH,IAAMzG,GAAQf,KAAK8F,gBAAkB/E,EAAG,gBACzBiD,EAAW,OAAS,QAAO,YAChC,UACNyC,EAAK,CACTgB,QAAS,IAAMzH,KAAK2D,qBAAqB,MACzC+D,OAAQ,IAAM1H,KAAK2D,qBAAqB,SAEvC3D,KAAKM,UACJ0G,EAAA,QACEE,MAAO,CACL,CAAC,kBAAmB,KACpB,CAAC,sBAAuB3G,GACzB,cACW,OACZoH,UAAWC,IAGd/C,EAAW7E,KAAKe,GAAI,SACnBiG,EAAA,OAAKE,MAAM,kBACTF,EAAA,QAAMG,KAAK,UAGfH,EAAA,iBAAeE,MAAM,mBAClBrC,EAAW7E,KAAKe,GAAI,SAAWiG,EAAA,QAAMG,KAAK,UAAanC,IAI7DzE,GACCyG,EAAA,qBAAkB,IAAIzG,KACpByG,EAAA,c"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as t,c as i,h as e,F as s,H as n,g as o}from"./p-8455d1bb.js";import{d as a,a as l,p as h,i as r,b as d,e as c,f as u}from"./p-b9d9273f.js";const v=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">\n <path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>\n</svg>`;const p=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" style="transform: rotate(-90deg);">\n <path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>\n</svg>`;const g=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" style="transform: rotate(90deg)">\n <path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>\n</svg>`;const f=':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{overflow:visible;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)}.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,.row-header-alignment-right>ic-typography,.cell-alignment-center>ic-typography{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}@media screen and (min-width: 577px){.column-header-inner-container{display:flex;align-items:center}}';const m=class{constructor(n){t(this,n);this.icRowHeightChange=i(this,"icRowHeightChange",7);this.icSortChange=i(this,"icSortChange",7);this.DENSITY_HEIGHT_MULTIPLIER={dense:.8,default:1,spacious:1.2};this.DENSITY_PADDING_HEIGHT_DIFF={dense:8,default:16,spacious:20};this.SORT_ICONS={unsorted:v,ascending:p,descending:g};this.hasLoadedForOneSecond=true;this.resizeObserver=null;this.SHOW_HIDE_STRING="show-hide";this.SHOW_HIDE_CSS_CLASS=`${this.SHOW_HIDE_STRING}-wrap`;this.TOOLTIP_STRING="tooltip";this.TOOLTIP=`ic-${this.TOOLTIP_STRING}`;this.TEXT_WRAP_STRING="text-wrap";this.TEXT_WRAP_CLASS=`.${this.TEXT_WRAP_STRING}`;this.dataUpdated=false;this.rowHeightSet=false;this.initialLoad=false;this.icPageChangeEvent=false;this.itemsPerPageChange=false;this.DATA_ROW_HEIGHT_STRING="data-row-height";this.ROW_HEIGHT_CSS_VARIABLE="--row-height";this.DEFAULT_LINE_HEIGHT=24;this.densityUpdate=false;this.truncationPatternUpdated=false;this.isNewDebounceDelaySet=false;this.headerResizeObserver=null;this.IC_TOOLTIP_STRING="ic-tooltip";this.SHOW_TRUNC_TOOLTIP_STRING="show-trunc-tooltip";this.runHeaderResizeObserver=()=>{this.headerResizeObserver=new ResizeObserver((()=>{this.headerResizeCallback()}));this.headerResizeObserver.observe(this.el)};this.headerResizeCallback=()=>{if(!this.hideColumnHeaders&&this.columnHeaderTruncation){const t=this.el.shadowRoot.querySelector(".table-container").clientWidth;if(t!==this.prevTableContainerWidth){const i=this.el.shadowRoot.querySelectorAll("th.column-header");i.forEach((t=>{const i=t.querySelector(this.IC_TOOLTIP_STRING);const e=t.querySelectorAll("ic-typography");if(i&&e&&e.length===2){i.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);if(e[1].clientWidth>e[0].clientWidth){i.classList.add(this.SHOW_TRUNC_TOOLTIP_STRING)}}}));this.prevTableContainerWidth=t}}};this.updateSetRowHeight=t=>{const i=parseInt(getComputedStyle(document.documentElement).fontSize);if(t){const e=this.getCellContainer(t);const s=i*parseFloat(e.getAttribute(this.DATA_ROW_HEIGHT_STRING));if(t.scrollHeight>s){e.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE)}}else{this.getTypographyElements().forEach((t=>{const e=this.getCellContainer(t);const s=i*parseFloat(e.getAttribute(this.DATA_ROW_HEIGHT_STRING));if(t.scrollHeight>s){e.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE)}}))}};this.debounceDataTruncation=()=>{this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);if(!i.classList.contains(this.TEXT_WRAP_STRING)){this.resizeObserver=new ResizeObserver(a((()=>{this.dataTruncation(t);if(!this.isNewDebounceDelaySet){this.setNewDebounceDelay(200)}}),(()=>this.debounceDelay)));this.resizeObserver.observe(t)}}))};this.setNewDebounceDelay=t=>{this.debounceDelay=t;this.isNewDebounceDelaySet=true};this.getLines=t=>Math.floor(t/this.DEFAULT_LINE_HEIGHT);this.truncate=(t,i,e)=>{if((t===null||t===void 0?void 0:t.scrollHeight)>(i===null||i===void 0?void 0:i.clientHeight)){if(!t.closest(this.TEXT_WRAP_CLASS)){if(this.truncationPattern===this.TOOLTIP_STRING){this.addTooltipTruncation(t,i,e)}if(this.truncationPattern===this.SHOW_HIDE_STRING){this.addShowHideTruncation(i,t)}}}else{if(this.truncationPattern===this.TOOLTIP_STRING&&e){t.setAttribute("style",`--ic-line-clamp: 0`);i.appendChild(t);e.remove()}if(this.truncationPattern===this.SHOW_HIDE_STRING&&!l(t.getAttribute("max-lines"))){this.resetShowHideTruncation(t)}}};this.dataTruncation=t=>{const i=this.getTooltip(t);const e=this.getCellContainer(t);if((e===null||e===void 0?void 0:e.classList.contains("data-type-element"))||this.dataUpdated){return}if(this.truncationPattern===this.SHOW_HIDE_STRING&&t.shadowRoot.querySelector("button")){const i=t.shadowRoot.querySelector("button");if(i){const i=this.getTruncWrapper(t);if(this.getLines(i.scrollHeight)===+t.getAttribute("max-lines")){this.resetShowHideTruncation(t)}}}if(this.rowHeightSet&&this.truncationPattern===this.SHOW_HIDE_STRING){const i=this.getTruncWrapper(t);if(i&&e.clientHeight-this.DEFAULT_LINE_HEIGHT>i.scrollHeight){this.resetShowHideTruncation(t);return}if(t.scrollHeight>e.clientHeight){this.addShowHideTruncation(e,t);return}}if((t===null||t===void 0?void 0:t.scrollHeight)>0&&(e===null||e===void 0?void 0:e.clientHeight)>0&&(t===null||t===void 0?void 0:t.scrollHeight)===(e===null||e===void 0?void 0:e.clientHeight)){if(i){this.removeTooltip(e,t,i)}return}this.truncate(t,e,i)};this.removeTextWrap=()=>{this.getTypographyElements().forEach((t=>{const i=t.closest("td");if(i.classList.contains(this.TEXT_WRAP_STRING)){i.classList.remove(this.TEXT_WRAP_STRING)}}))};this.getCellContainer=t=>t.closest(".cell-container");this.deleteTextWrapDataKey=t=>Array.isArray(t)&&t.forEach((t=>t.textWrap&&delete t.textWrap));this.startLoadingTimer=()=>{this.hasLoadedForOneSecond=false;this.timerStarted=Date.now();setTimeout((()=>{this.hasLoadedForOneSecond=true;this.timerStarted=null}),this.minimumLoadingDisplayDuration)};this.isObject=t=>t!==undefined&&t!==null&&typeof t==="object";this.notDefaultDensity=()=>this.density!=="default";this.getCellContent=(t,i)=>{switch(i){case"element":return undefined;case"date":return(t instanceof Date?t:new Date(t)).toLocaleDateString();default:return t}};this.getCellAlignment=(t,i)=>{if(this.isObject(t)&&Object.keys(t).includes("cellAlignment")){return this.getObjectValue(this.getObjectValue(t,"cellAlignment"),i)}};this.getCellOptions=(t,i)=>{if(!(this.isObject(t)&&Object.keys(t).includes(i)))return;return this.getObjectValue(t,i)};this.createUpdatingIndicator=()=>{const{appearance:t,description:i,max:s,min:n,progress:o}=this.updatingOptions||{};return e("th",{colSpan:this.columns.length,class:"updating-state"},e("ic-loading-indicator",{appearance:t,description:i||"Updating table data",fullWidth:true,max:s,min:n,progress:o,type:"linear",size:"small"}))};this.setRowHeight=t=>h(`${t*this.DENSITY_HEIGHT_MULTIPLIER[this.density]-this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);this.setTruncationClass=()=>{if(this.truncationPattern){return{[`truncation-${this.truncationPattern}`]:true}}return{}};this.getColumnWidth=t=>{let i={};if(t){if(typeof t==="string"){i=Object.assign(Object.assign({},i),{["--column-width"]:t})}if(typeof t==="object"&&!!Object.keys(t)){if(t===null||t===void 0?void 0:t.minWidth){i=Object.assign(Object.assign({},i),{["--column-min-width"]:t===null||t===void 0?void 0:t.minWidth})}if(t===null||t===void 0?void 0:t.maxWidth){i=Object.assign(Object.assign({},i),{["--column-max-width"]:t===null||t===void 0?void 0:t.maxWidth})}}}return i};this.getRowHeight=(t,i,e,s)=>{if((this.truncationPattern||t)&&!(i===null||i===void 0?void 0:i.textWrap)&&!e&&!this.getCellOptions(s,"textWrap")&&(i===null||i===void 0?void 0:i.dataType)!=="element"){return{[this.ROW_HEIGHT_CSS_VARIABLE]:this.setRowHeight(t)}}return{}};this.adjustWidthForActionElement=()=>{const t=this.el.shadowRoot.querySelectorAll(".action-element");t.forEach((t=>{const i=t.firstChild.getBoundingClientRect().width;const e=t.closest(".cell-grid-wrapper");e.style.gridTemplateColumns=`auto calc(${i}px + var(--ic-space-xs))`}))};this.createCellContent=(t,i,n,o,a,l,h,d,c)=>{var u,v,p,g,f,m,b,w,y,x,O,j;return e("div",{innerHTML:(t===null||t===void 0?void 0:t.dataType)==="element"&&!r(this.el,n)?i:null,class:Object.assign({"cell-container":(t===null||t===void 0?void 0:t.dataType)!=="element",[`cell-alignment-${((u=t===null||t===void 0?void 0:t.columnAlignment)===null||u===void 0?void 0:u.vertical)||((v=o===null||o===void 0?void 0:o.rowAlignment)===null||v===void 0?void 0:v.vertical)||a||this.getCellAlignment(i,"vertical")}`]:!!((p=t===null||t===void 0?void 0:t.columnAlignment)===null||p===void 0?void 0:p.vertical)||!!((g=o===null||o===void 0?void 0:o.rowAlignment)===null||g===void 0?void 0:g.vertical)||!!a||!!this.getCellAlignment(i,"vertical"),[`cell-alignment-${((f=t===null||t===void 0?void 0:t.columnAlignment)===null||f===void 0?void 0:f.horizontal)||((m=o===null||o===void 0?void 0:o.rowAlignment)===null||m===void 0?void 0:m.horizontal)||this.getCellAlignment(i,"horizontal")}`]:!!((b=t===null||t===void 0?void 0:t.columnAlignment)===null||b===void 0?void 0:b.horizontal)||!!((w=o===null||o===void 0?void 0:o.rowAlignment)===null||w===void 0?void 0:w.horizontal)||!!this.getCellAlignment(i,"horizontal"),[`data-type-${t===null||t===void 0?void 0:t.dataType}`]:true,[this.TEXT_WRAP_STRING]:(t===null||t===void 0?void 0:t.textWrap)||(o===null||o===void 0?void 0:o.textWrap)||!!this.getCellOptions(i,"textWrap"),["cell-icon"]:l||!!((y=t===null||t===void 0?void 0:t.icon)===null||y===void 0?void 0:y.icon)},this.setTruncationClass()),style:Object.assign(Object.assign({},this.getRowHeight(h,t,o===null||o===void 0?void 0:o.textWrap,i)),this.getColumnWidth(t===null||t===void 0?void 0:t.columnWidth)),"data-row-height":this.truncationPattern||h?this.setRowHeight(h):null},r(this.el,n)?e("slot",{name:n}):e(s,null,r(this.el,`${n}-icon`)?e("slot",{name:`${n}-icon`}):(l||((x=t===null||t===void 0?void 0:t.icon)===null||x===void 0?void 0:x.onAllCells))&&(d("icon")||((O=t===null||t===void 0?void 0:t.icon)===null||O===void 0?void 0:O.icon))&&e("span",{class:"icon",innerHTML:d("icon")||((j=t===null||t===void 0?void 0:t.icon)===null||j===void 0?void 0:j.icon)}),(t===null||t===void 0?void 0:t.dataType)!=="element"&&!r(this.el,n)&&e("ic-typography",{variant:"body",class:{[`cell-emphasis-${this.isObject(i)&&d("emphasis")||(t===null||t===void 0?void 0:t.emphasis)||c}`]:this.isObject(i)&&!!d("emphasis")||!!(t===null||t===void 0?void 0:t.emphasis)||!!c,[`text-${this.density}`]:this.notDefaultDensity()}},this.isObject(i)&&(t===null||t===void 0?void 0:t.dataType)!=="date"?Object.keys(i).includes("href")?e("ic-link",{href:d("href"),target:d("target")||undefined,rel:d("rel")||undefined},d("data")):d("data"):this.getCellContent(i,t===null||t===void 0?void 0:t.dataType))))};this.createCells=(t,i)=>{var s;const n=Object.values(t);const o=Object.keys(t);const a=this.getRowOptions(o,n);let l;let h;const r=o.indexOf("header");if(r>-1){l=this.getObjectValue(n[r],"rowAlignment");h=this.getObjectValue(n[r],"emphasis")}const d=(s=this.variableRowHeight)===null||s===void 0?void 0:s.call(this,Object.assign(Object.assign({},t),{index:i}));const c=d?d!=="auto"&&d:this.globalRowHeight!=="auto"&&this.globalRowHeight;return n.map(((t,s)=>{const n=this.columns[s];const r=`${n===null||n===void 0?void 0:n.key}-${i}`;const d=this.isObject(t)&&Object.keys(t).includes("icon");const u=i=>this.getObjectValue(t,i);if(o[s]==="header"){return e("th",{scope:"row",colSpan:u("colspan"),class:{["row-header"]:true,[`row-header-alignment-${u("cellAlignment")}`]:!!u("cellAlignment"),["row-header-sticky"]:this.stickyRowHeaders}},u("title"))}if(o[s]!=="rowOptions"){return e("td",{class:{["table-cell"]:true,[`table-density-${this.density}`]:this.notDefaultDensity(),["with-overflow"]:(n===null||n===void 0?void 0:n.dataType)==="element"},style:Object.assign({},this.getColumnWidth(n.columnWidth))},this.isObject(t)&&Object.keys(t).includes("actionElement")?e("div",{class:"cell-grid-wrapper"},this.createCellContent(n,t,r,a,l,d,c,u,h),e("span",{class:"action-element",innerHTML:u("actionElement")})):this.createCellContent(n,t,r,a,l,d,c,u,h))}}))};this.createColumnHeaders=()=>this.columns.map((({cellAlignment:t,colspan:i,icon:s,key:n,title:o,columnWidth:a},l)=>e("th",{scope:"col",class:{["column-header"]:true,[`table-density-${this.density}`]:this.notDefaultDensity(),["updating-state-headers"]:this.updating&&!this.loading},style:Object.assign({},this.getColumnWidth(a)),colSpan:i},e("div",{class:{"column-header-inner-container":true,"truncation-tooltip":this.columnHeaderTruncation,[`column-header-alignment-${t}`]:!!t}},r(this.el,`${n}-column-icon`)?e("slot",{name:`${n}-column-icon`}):s&&!s.hideOnHeader&&e("span",{class:"icon",innerHTML:s.icon}),this.columnHeaderTruncation?e("ic-tooltip",{label:o,target:`column-header-${l}`},e("ic-typography",{id:`column-header-${l}`,variant:"body",class:{["column-header-text"]:true,[`text-${this.density}`]:this.notDefaultDensity()}},o)):e("ic-typography",{variant:"body",class:{["column-header-text"]:true,[`text-${this.density}`]:this.notDefaultDensity()}},o),this.sortable&&e("ic-button",{variant:"icon",id:`sort-button-${n}`,"aria-label":this.getSortButtonLabel(n),onClick:()=>this.sortRows(n),innerHTML:this.SORT_ICONS[this.sortedColumn===n?this.sortedColumnOrder:"unsorted"],class:{["sort-button"]:true,["sort-button-unsorted"]:this.sortedColumn!==n||this.sortedColumnOrder==="unsorted"}})),this.columnHeaderTruncation&&e("ic-typography",{variant:"body","aria-hidden":"true",class:{["column-header-text"]:true,["dummy-column-header-text"]:this.columnHeaderTruncation,[`text-${this.density}`]:this.notDefaultDensity()}},o))));this.onRowClick=t=>{this.selectedRow=this.selectedRow!==t&&!this.loading&&!this.updating&&t};this.createRows=()=>{const t=this.showPagination?this.data.slice(this.fromRow,this.toRow):this.data.slice();const i=t.map(((t,i)=>{const e=this.columns.map((({key:t},e)=>r(this.el,`${t}-${i}`)&&{key:t,index:e})).filter((i=>!!i&&!Object.prototype.hasOwnProperty.call(t,i.key)));return e.length>0?d(t,e,""):t}));return i.sort(!this.sortable?undefined:this.getSortFunction()).map(((t,i)=>e("tr",{onClick:()=>this.onRowClick(t),class:{["table-row"]:true,["table-row-selected"]:this.selectedRow===t}},this.createCells(t,i))))};this.getObjectValue=(t,i)=>Object.values(t)[Object.keys(t).indexOf(i)];this.getSortButtonLabel=t=>{let i="";const e=t=>{const i=this.sortOptions.sortOrders;return i[(i.indexOf(t)+1)%i.length]};if(this.sortedColumn===t){const t=e(this.sortedColumnOrder);i=t!=="unsorted"?`Sort ${t}`:"Remove sort"}else{i=`Sort ${e("unsorted")}`}return i};this.getComparison=(t,i)=>{const e=t[this.sortedColumn];const s=i[this.sortedColumn];return this.columns.find((t=>t.key===this.sortedColumn)).dataType==="date"?new Date(e).valueOf()-new Date(s).valueOf():String(this.isObject(e)?Object.values(e)[0]:e).localeCompare(String(this.isObject(s)?Object.values(s)[0]:s),undefined,{numeric:true,sensitivity:"base"})};this.getSortFunction=()=>{switch(this.sortedColumnOrder){case"ascending":return(t,i)=>this.getComparison(t,i);case"descending":return(t,i)=>this.getComparison(i,t);default:return undefined}};this.sortRows=t=>{const i=this.el.shadowRoot.querySelector(`#sort-button-${t}`);const e=this.sortOptions.sortOrders;if(t!==this.sortedColumn){if(this.sortedColumn){const i=this.el.shadowRoot.querySelector(`#sort-button-${this.sortedColumn}`);i.setAttribute("aria-label",this.getSortButtonLabel(t))}this.sortedColumn=t;this.sortedColumnOrder="unsorted"}let s=e.indexOf(this.sortedColumnOrder)+1;if(s>e.length-1){s=0}this.sortedColumnOrder=e[s];i.setAttribute("aria-label",this.getSortButtonLabel(t));this.tableSorted=true;this.icSortChange.emit({columnName:t,sorted:this.sortedColumnOrder})};this.getTypographyElements=()=>Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text)"));this.getTooltip=t=>t.closest(this.TOOLTIP);this.updateTruncationTooltip=(t=false)=>{this.getTypographyElements().forEach((i=>{const e=this.getTooltip(i);const s=this.getCellContainer(i);if(i.closest(this.TEXT_WRAP_CLASS)){this.removeTooltip(s,i,e);i.setAttribute("style",`--ic-line-clamp: 0`);return}this.regenerateTooltip(s,i,e,t)}))};this.updateScrollOffset=()=>{this.scrollOffset=this.el.shadowRoot.querySelector(".table-row-container").scrollTop};this.setTableDimensions=()=>{let t={};if(this.width){t=Object.assign(Object.assign({},t),{["--table-width"]:this.width})}if(this.height){t=Object.assign(Object.assign({},t),{["--table-height"]:this.height})}if(this.maxWidth){t=Object.assign(Object.assign({},t),{["--table-max-width"]:this.maxWidth})}if(this.minWidth){t=Object.assign(Object.assign({},t),{["--table-min-width"]:this.minWidth})}return t};this.fixCellTooltips=()=>{const t=this.el.shadowRoot.querySelectorAll(".data-type-element");t.forEach((t=>{const i=c(t);i.forEach((t=>{var i;const e=t.tagName==="IC-TOOLTIP"?t:(i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector(this.IC_TOOLTIP_STRING);if(e){e.setExternalPopperProps({strategy:"fixed"})}}))}))};this.fromRow=0;this.previousRowsPerPage=undefined;this.rowsPerPage=undefined;this.scrollable=false;this.scrollOffset=0;this.selectedRow=undefined;this.sortedColumn=undefined;this.sortedColumnOrder=undefined;this.toRow=undefined;this.currentRowHeight=undefined;this.debounceDelay=0;this.caption=undefined;this.columnHeaderTruncation=false;this.columns=undefined;this.data=undefined;this.density="default";this.embedded=false;this.globalRowHeight="auto";this.height=undefined;this.hideColumnHeaders=false;this.loading=false;this.loadingOptions=undefined;this.maxWidth=undefined;this.minWidth=undefined;this.minimumLoadingDisplayDuration=1e3;this.paginationBarOptions={itemsPerPageOptions:[{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"}],rangeLabelType:"page",type:"simple",showItemsPerPageControl:true,showGoToPageControl:true,alignment:"right",appearance:"default",itemLabel:"Item",pageLabel:"Page",hideRangeLabel:false,hideAllFromItemsPerPage:false};this.showPagination=false;this.sortable=false;this.sortOptions={sortOrders:["unsorted","ascending","descending"],defaultColumn:""};this.stickyColumnHeaders=false;this.stickyRowHeaders=false;this.tableLayout="fixed";this.truncationPattern=undefined;this.updating=false;this.updatingOptions=undefined;this.variableRowHeight=undefined;this.width=undefined}headerTruncationChangeHandler(){if(this.columnHeaderTruncation){this.prevTableContainerWidth=0}else{const t=this.el.shadowRoot.querySelectorAll("th.column-header");t.forEach((t=>{const i=t.querySelector(this.IC_TOOLTIP_STRING);if(i){i.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING)}}))}}disconnectedCallback(){var t,i;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect();(i=this.headerResizeObserver)===null||i===void 0?void 0:i.disconnect()}componentWillLoad(){var t;this.rowsPerPage=Number(this.paginationBarOptions.itemsPerPageOptions[0].value);this.previousRowsPerPage=this.rowsPerPage;this.toRow=this.rowsPerPage;this.sortedColumn=this.sortOptions.defaultColumn;this.sortedColumnOrder=this.sortOptions.sortOrders[0];this.loadingOptions=Object.assign(Object.assign({},this.loadingOptions),{showBackground:((t=this.data)===null||t===void 0?void 0:t.length)>0});this.initialLoad=true;this.previousItemsPerPage=this.rowsPerPage}componentDidLoad(){const t=this.el.shadowRoot.querySelector("table");const i=this.el.shadowRoot.querySelector(".table-container");u(this.runHeaderResizeObserver);if(this.dataUpdated){this.dataUpdated=false}if((t===null||t===void 0?void 0:t.clientHeight)>(i===null||i===void 0?void 0:i.clientHeight)||(t===null||t===void 0?void 0:t.clientWidth)>(i===null||i===void 0?void 0:i.clientWidth)){this.scrollable=true}if(this.loading){this.startLoadingTimer();this.showLoadingIndicator()}if(this.truncationPattern){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);if(!i.classList.contains(this.TEXT_WRAP_STRING)){this.dataTruncation(t)}}));this.debounceDataTruncation()}if(this.globalRowHeight!=="auto"){this.updateSetRowHeight()}}componentDidUpdate(){if(this.truncationPattern===this.SHOW_HIDE_STRING||this.truncationPattern===this.TOOLTIP_STRING){this.truncateUpdatedData()}}componentDidRender(){this.fixCellTooltips();this.adjustWidthForActionElement()}truncateUpdatedData(){if(this.dataUpdated){if(this.truncationPattern===this.SHOW_HIDE_STRING){this.getTypographyElements().forEach((t=>{const i=this.getTruncWrapper(t);const e=this.getCellContainer(t);if((e===null||e===void 0?void 0:e.clientHeight)-this.DEFAULT_LINE_HEIGHT>=(i===null||i===void 0?void 0:i.scrollHeight)){this.resetShowHideTruncation(t);return}setTimeout((()=>{if((t===null||t===void 0?void 0:t.scrollHeight)>(e===null||e===void 0?void 0:e.clientHeight)){this.addShowHideTruncation(e,t)}}),150)}))}if(this.truncationPattern===this.TOOLTIP_STRING){this.updateTruncationTooltip()}this.dataUpdated=false}if(this.tableSorted){if(this.truncationPattern===this.TOOLTIP_STRING){this.updateTruncationTooltip()}if(this.truncationPattern===this.SHOW_HIDE_STRING){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);if(!i.classList.contains(this.TEXT_WRAP_STRING)){this.createShowHideTruncation(t,i)}else{t.resetTruncation().then((()=>{i.removeAttribute("style")}))}}))}this.tableSorted=false}if(this.rowHeightSet){const t=parseInt(getComputedStyle(document.documentElement).fontSize);const i=this.globalRowHeight==="auto";this.getTypographyElements().forEach((e=>{var s;const n=this.getCellContainer(e);const o=this.getTooltip(e);if(i){n.style.height=null;if(this.truncationPattern===this.TOOLTIP_STRING){this.removeTooltip(n,e,o);e.setAttribute("style",`--ic-line-clamp: 0`)}else if(this.truncationPattern===this.SHOW_HIDE_STRING){this.resetShowHideTruncation(e)}return}const a=t*parseFloat(n.getAttribute(this.DATA_ROW_HEIGHT_STRING));if(!((s=n===null||n===void 0?void 0:n.style)===null||s===void 0?void 0:s.height)&&a>n.clientHeight&&!n.classList.contains(this.TEXT_WRAP_STRING)){n.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,n.getAttribute(this.DATA_ROW_HEIGHT_STRING))}if(this.truncationPattern){if(this.truncationPattern===this.SHOW_HIDE_STRING){const t=this.getTruncWrapper(e);const i=e.shadowRoot.querySelector("button");if(i&&(t===null||t===void 0?void 0:t.scrollHeight)<=n.clientHeight){this.resetShowHideTruncation(e);return}}this.truncate(e,n,o)}else{this.updateSetRowHeight(e)}}));this.rowHeightSet=false}if(this.itemsPerPageChange){const t=this.el.shadowRoot.querySelectorAll(".table-row");if(this.rowsPerPage>this.previousItemsPerPage){const i=Array.from(t).slice(this.previousItemsPerPage);i.forEach((t=>{t.querySelectorAll("ic-typography").forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);this.truncate(t,i,e)}))}))}this.previousItemsPerPage=this.rowsPerPage;this.itemsPerPageChange=false}if(!this.initialLoad&&this.icPageChangeEvent){if(this.truncationPattern===this.TOOLTIP_STRING){this.updateTruncationTooltip()}if(this.truncationPattern===this.SHOW_HIDE_STRING){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=t.shadowRoot.querySelector("button");if((t===null||t===void 0?void 0:t.scrollHeight)>i.clientHeight&&!e){this.addShowHideTruncation(i,t)}}))}this.icPageChangeEvent=false}if(this.densityUpdate){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);this.truncate(t,i,e)}));this.densityUpdate=false}if(this.truncationPatternUpdated){if(this.truncationPattern===this.TOOLTIP_STRING){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);if(t.scrollHeight>i.clientHeight){this.addTooltipTruncation(t,i,e)}}))}else if(this.truncationPattern===this.SHOW_HIDE_STRING){this.getTypographyElements().forEach((t=>{const i=this.getTruncWrapper(t);const e=this.getCellContainer(t);if((e===null||e===void 0?void 0:e.clientHeight)-this.DEFAULT_LINE_HEIGHT>(i===null||i===void 0?void 0:i.scrollHeight)){this.resetShowHideTruncation(t);return}if((t===null||t===void 0?void 0:t.scrollHeight)>(e===null||e===void 0?void 0:e.clientHeight)){this.addShowHideTruncation(e,t)}}))}}}createShowHideTruncation(t,i){t.checkMaxLines(t.scrollHeight);t.setAttribute("max-lines",`${Math.floor((i===null||i===void 0?void 0:i.clientHeight)/this.DEFAULT_LINE_HEIGHT)}`);t.setShowHideExpanded(false);i.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,null)}addTooltipTruncation(t,i,e){this.addLineClampCSS(t,i);if(!e){this.createTruncationTooltip(t,i)}}addShowHideTruncation(t,i){t.classList.add(this.SHOW_HIDE_CSS_CLASS);this.createShowHideTruncation(i,t)}getTruncWrapper(t){return t.shadowRoot.querySelector(".trunc-wrapper")}handleTypographyTruncationExpandToggle({detail:t}){const{expanded:i,typographyEl:e}=t;const s=this.getCellContainer(e);if(s.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE)&&i){s.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,"inherit")}}handlePageChange({detail:t,target:i}){if(i.parentElement!==this.el){this.fromRow=(t.value-1)*this.rowsPerPage;this.toRow=this.fromRow+this.rowsPerPage;const i=this.el.shadowRoot.querySelector(".table-row-container");if(this.previousRowsPerPage===this.rowsPerPage){i.scrollTop=0}else if(this.previousRowsPerPage<this.rowsPerPage){i.scrollTop=this.scrollOffset;this.previousRowsPerPage=this.rowsPerPage}else{this.previousRowsPerPage=this.rowsPerPage}}if(!this.initialLoad&&this.previousPaginationPage!==t.value){this.icPageChangeEvent=true}this.previousPaginationPage=t.value;this.initialLoad=false}handleItemsPerPageChange({detail:t,target:i}){if(i.parentElement!==this.el){this.previousRowsPerPage=this.rowsPerPage;this.rowsPerPage=t.value}this.itemsPerPageChange=true}handleDensityChange(t){this.density=t.detail.value}clickListener(t){if(t.target!==this.el)this.selectedRow=undefined}loadingHandler(t){if(t)this.startLoadingTimer();if(this.loading){setTimeout((()=>{this.showLoadingIndicator()}),500)}}truncationPatternHandler(t){if(t===this.TOOLTIP_STRING){this.resetShowHideTruncation();this.updateTruncationTooltip(true);this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);this.truncate(t,i,e)}))}if(t===this.SHOW_HIDE_STRING){this.updateTruncationTooltip(true);this.getTypographyElements().forEach((t=>{const i=this.getTruncWrapper(t);const e=this.getCellContainer(t);if((e===null||e===void 0?void 0:e.clientHeight)-this.DEFAULT_LINE_HEIGHT>(i===null||i===void 0?void 0:i.scrollHeight)){this.resetShowHideTruncation(t);return}setTimeout((()=>{if((t===null||t===void 0?void 0:t.scrollHeight)>(e===null||e===void 0?void 0:e.clientHeight)){this.addShowHideTruncation(e,t)}}),150)}))}this.truncationPatternUpdated=true}async dataHandler(t){this.loadingOptions=Object.assign(Object.assign({},this.loadingOptions),{showBackground:(t===null||t===void 0?void 0:t.length)>0});if(this.loading){!this.hasLoadedForOneSecond?setTimeout((()=>this.loading=false),this.minimumLoadingDisplayDuration-(Date.now()-this.timerStarted)):this.loading=false}if(this.updating)this.updating=false;this.dataUpdated=true}async densityHandler(){this.densityUpdate=true}resetShowHideTruncation(t){if(t){const i=this.getTruncWrapper(t);const e=this.getCellContainer(t);if((i===null||i===void 0?void 0:i.scrollHeight)>(e===null||e===void 0?void 0:e.clientHeight)&&!l(t.getAttribute("max-lines"))&&Math.floor((e===null||e===void 0?void 0:e.clientHeight)/this.DEFAULT_LINE_HEIGHT)!==+t.getAttribute("max-lines")){t.checkMaxLines(i.scrollHeight);t.setAttribute("max-lines",`${Math.floor((e===null||e===void 0?void 0:e.clientHeight)/this.DEFAULT_LINE_HEIGHT)}`);t.setShowHideExpanded(false);e.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,null)}else{t.resetTruncation().then((()=>{if(!t.closest(this.TEXT_WRAP_CLASS)){e.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,e.getAttribute(this.DATA_ROW_HEIGHT_STRING))}}))}}else{this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);t.resetTruncation().then((()=>{if(!t.closest(this.TEXT_WRAP_CLASS)){i.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,i.getAttribute(this.DATA_ROW_HEIGHT_STRING))}}))}))}}rowHeightChangeHandler(t,i){if(+t!==+i){this.deleteTextWrapDataKey(this.data);this.deleteTextWrapDataKey(this.columns);this.removeTextWrap();this.icRowHeightChange.emit();this.rowHeightSet=true}}async resetRowHeights(t){this.globalRowHeight=t||"auto";this.variableRowHeight=null}showLoadingIndicator(){var t;(t=this.loadingIndicator)===null||t===void 0?void 0:t.classList.add("show")}getRowOptions(t,i){const e=t.indexOf("rowOptions");return e>-1&&i[e]}regenerateTooltip(t,i,e,s){if(e){if(this.tableSorted){e.setAttribute("target",i.id);e.setAttribute("label",i.textContent)}else{this.removeTooltip(t,i,e)}if(s){return}}if(!i.getAttribute("style")&&this.dataUpdated){this.addLineClampCSS(i,t)}if((i===null||i===void 0?void 0:i.scrollHeight)>(t===null||t===void 0?void 0:t.clientHeight)&&this.truncationPattern===this.TOOLTIP_STRING){if(!i.getAttribute("style")||i.style.cssText.includes("--ic-line-clamp: 0;")){this.addLineClampCSS(i,t)}this.createTruncationTooltip(i,t)}}removeTooltip(t,i,e){t.appendChild(i);if(e){e.remove()}}addLineClampCSS(t,i){t.setAttribute("style",`--ic-line-clamp: ${this.getLines(i===null||i===void 0?void 0:i.clientHeight)}`)}createTruncationTooltip(t,i){const e=document.createElement(this.IC_TOOLTIP_STRING);e.setAttribute("target",t.id);e.setAttribute("label",t.textContent);e.classList.add("ic-tooltip-overflow");e.setExternalPopperProps({strategy:"fixed"});i.appendChild(e);e.appendChild(t)}render(){var t;const{caption:i,createColumnHeaders:s,createRows:o,createUpdatingIndicator:a,data:l,hideColumnHeaders:h,loading:d,loadingOptions:c,paginationBarOptions:u,scrollable:v,scrollOffset:p,showPagination:g,sortable:f,sortedColumnOrder:m,sortedColumn:b,stickyColumnHeaders:w,updateScrollOffset:y,updating:x}=this;return e(n,{style:Object.assign({},this.setTableDimensions())},e("div",{class:"table-container"},r(this.el,"title-bar")&&e("slot",{name:"title-bar"}),e("div",{class:{["table-row-container"]:true,scrollable:v},tabIndex:v?0:null,onScroll:y},r(this.el,"title-bar")&&e("slot",{name:"title-bar"}),e("table",{style:{["--table-layout"]:this.tableLayout}},e("caption",{class:"table-caption"},i),!h&&e("thead",{class:{["column-header-sticky"]:w,["column-header-overlay"]:w&&p!==0}},e("tr",null,s())),x&&!d&&(h?e("thead",null,a()):a()),(l===null||l===void 0?void 0:l.length)>0&&!d&&e("tbody",null,o())),!(l===null||l===void 0?void 0:l.length)&&!d&&(r(this.el,"empty-state")?e("slot",{name:"empty-state"}):e("ic-empty-state",{aligned:"center",heading:"No Data",class:"loading-empty"}))),d&&e("ic-loading-indicator",{appearance:c===null||c===void 0?void 0:c.appearance,class:{"loading-empty":d,loading:true,"show-background":c.showBackground},description:c.description||"Loading table data",label:c.label||"Loading...",labelDuration:c===null||c===void 0?void 0:c.labelDuration,max:c===null||c===void 0?void 0:c.max,min:c===null||c===void 0?void 0:c.min,progress:c===null||c===void 0?void 0:c.progress,ref:t=>this.loadingIndicator=t}),(g||r(this.el,"pagination-bar"))&&e("div",{class:"pagination-container"},r(this.el,"pagination-bar")?e("slot",{name:"pagination-bar"}):e("ic-pagination-bar",{totalItems:(t=l===null||l===void 0?void 0:l.length)!==null&&t!==void 0?t:0,type:u.type,rangeLabelType:u.rangeLabelType,showItemsPerPageControl:u.showItemsPerPageControl,showGoToPageControl:u.showGoToPageControl,itemsPerPageOptions:u.itemsPerPageOptions,alignment:u.alignment,appearance:u.appearance,itemLabel:u.itemLabel,pageLabel:u.pageLabel,hideRangeLabel:u.hideRangeLabel,hideAllFromItemsPerPage:u.hideAllFromItemsPerPage})),f&&e("div",{class:"screen-reader-sort-text","aria-live":"polite"},m!=="unsorted"&&b?`${b} sorted ${m}`:"table unsorted")))}get el(){return o(this)}static get watchers(){return{columnHeaderTruncation:["headerTruncationChangeHandler"],loading:["loadingHandler"],truncationPattern:["truncationPatternHandler"],data:["dataHandler"],density:["densityHandler"],globalRowHeight:["rowHeightChangeHandler"],variableRowHeight:["rowHeightChangeHandler"]}}};m.style=f;export{m as ic_data_table};
|
2
|
-
//# sourceMappingURL=p-2308d041.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icDataTableCss","DataTable","this","DENSITY_HEIGHT_MULTIPLIER","dense","default","spacious","DENSITY_PADDING_HEIGHT_DIFF","SORT_ICONS","unsorted","unsortedIcon","ascending","ascendingIcon","descending","descendingIcon","hasLoadedForOneSecond","resizeObserver","SHOW_HIDE_STRING","SHOW_HIDE_CSS_CLASS","TOOLTIP_STRING","TOOLTIP","TEXT_WRAP_STRING","TEXT_WRAP_CLASS","dataUpdated","rowHeightSet","initialLoad","icPageChangeEvent","itemsPerPageChange","DATA_ROW_HEIGHT_STRING","ROW_HEIGHT_CSS_VARIABLE","DEFAULT_LINE_HEIGHT","densityUpdate","truncationPatternUpdated","isNewDebounceDelaySet","headerResizeObserver","IC_TOOLTIP_STRING","SHOW_TRUNC_TOOLTIP_STRING","runHeaderResizeObserver","ResizeObserver","headerResizeCallback","observe","el","hideColumnHeaders","columnHeaderTruncation","tableContainerWidth","shadowRoot","querySelector","clientWidth","prevTableContainerWidth","headers","querySelectorAll","forEach","header","tooltip","typographyEls","length","classList","remove","add","updateSetRowHeight","typographyEl","fontSize","parseInt","getComputedStyle","document","documentElement","cellContainer","getCellContainer","rowHeight","parseFloat","getAttribute","scrollHeight","style","removeProperty","getTypographyElements","debounceDataTruncation","contains","dynamicDebounce","dataTruncation","setNewDebounceDelay","debounceDelay","delay","getLines","height","Math","floor","truncate","clientHeight","closest","truncationPattern","addTooltipTruncation","addShowHideTruncation","setAttribute","appendChild","isEmptyString","resetShowHideTruncation","getTooltip","showHideBtn","truncWrapper","getTruncWrapper","removeTooltip","removeTextWrap","tableCell","deleteTextWrapDataKey","array","Array","isArray","val","textWrap","startLoadingTimer","timerStarted","Date","now","setTimeout","minimumLoadingDisplayDuration","isObject","value","undefined","notDefaultDensity","density","getCellContent","cell","dataType","toLocaleDateString","getCellAlignment","alignment","Object","keys","includes","getObjectValue","getCellOptions","key","createUpdatingIndicator","appearance","description","max","min","progress","updatingOptions","h","colSpan","columns","class","fullWidth","type","size","setRowHeight","pxToRem","setTruncationClass","getColumnWidth","columnWidth","columnWidthStyling","assign","minWidth","maxWidth","getRowHeight","currentRowHeight","columnProps","rowTextWrap","adjustWidthForActionElement","elements","element","width","firstChild","getBoundingClientRect","gridWrapper","gridTemplateColumns","createCellContent","cellSlotName","rowOptions","rowAlignment","hasIcon","cellValue","rowEmphasis","innerHTML","isSlotUsed","_a","columnAlignment","vertical","_b","_c","_d","_e","horizontal","_f","_g","_h","_j","icon","name","Fragment","_k","onAllCells","_l","_m","variant","emphasis","href","target","rel","createCells","row","rowIndex","rowValues","values","rowKeys","getRowOptions","headerIndex","indexOf","variableRowHeightVal","variableRowHeight","call","index","globalRowHeight","map","scope","stickyRowHeaders","createColumnHeaders","cellAlignment","colspan","title","updating","loading","hideOnHeader","label","id","sortable","getSortButtonLabel","onClick","sortRows","sortedColumn","sortedColumnOrder","onRowClick","selectedRow","createRows","data","showPagination","slice","fromRow","toRow","organisedData","slottedColumns","filter","col","prototype","hasOwnProperty","addDataToPosition","sort","getSortFunction","getNextSortOption","option","sortOrders","sortOptions","sortOption","getComparison","targetRow","comparisonRow","targetRowValue","comparisonRowValue","find","valueOf","String","localeCompare","numeric","sensitivity","a","b","column","sortButton","previousSortedButton","nextSortOrderIndex","tableSorted","icSortChange","emit","columnName","sorted","from","updateTruncationTooltip","removeTooltipOnly","regenerateTooltip","updateScrollOffset","scrollOffset","scrollTop","setTableDimensions","tableHostDimensions","fixCellTooltips","slotElements","getSlotElements","slottedEl","tooltipEl","tagName","setExternalPopperProps","strategy","itemsPerPageOptions","rangeLabelType","showItemsPerPageControl","showGoToPageControl","itemLabel","pageLabel","hideRangeLabel","hideAllFromItemsPerPage","defaultColumn","headerTruncationChangeHandler","disconnectedCallback","disconnect","componentWillLoad","rowsPerPage","Number","paginationBarOptions","previousRowsPerPage","loadingOptions","showBackground","previousItemsPerPage","componentDidLoad","tableElement","tableContainer","checkResizeObserver","scrollable","showLoadingIndicator","componentDidUpdate","truncateUpdatedData","componentDidRender","createShowHideTruncation","resetTruncation","then","removeAttribute","hasAutoRowHeight","setProperty","allRows","newRows","checkMaxLines","setShowHideExpanded","addLineClampCSS","createTruncationTooltip","handleTypographyTruncationExpandToggle","detail","expanded","getPropertyValue","handlePageChange","parentElement","tableRowsContainer","previousPaginationPage","handleItemsPerPageChange","handleDensityChange","ev","clickListener","loadingHandler","newValue","truncationPatternHandler","dataHandler","newData","densityHandler","rowHeightChangeHandler","oldValue","icRowHeightChange","resetRowHeights","loadingIndicator","rowOptionsIndex","textContent","cssText","createElement","render","caption","stickyColumnHeaders","Host","tabIndex","onScroll","tableLayout","aligned","heading","labelDuration","ref","totalItems"],"sources":["src/components/ic-data-table/ic-data-table.css?tag=ic-data-table&encapsulation=shadow","src/components/ic-data-table/ic-data-table.tsx"],"sourcesContent":[":host {\n position: relative;\n display: inline-flex;\n max-height: 100%;\n width: var(--table-width, 100%);\n height: 100%;\n min-width: var(--table-min-width);\n max-width: var(--table-max-width);\n}\n\ntbody {\n vertical-align: top;\n}\n\n.table-container {\n position: relative;\n height: calc(100% - var(--ic-space-xxxs));\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.cell-container {\n display: flex;\n min-height: 1.5rem;\n overflow-y: hidden;\n height: var(--row-height);\n}\n\n.truncation-show-hide {\n overflow: visible;\n display: block;\n}\n\n.cell-icon.truncation-show-hide {\n display: flex;\n}\n\n.cell-container:not(.data-type-element, .truncation-show-hide) {\n overflow-x: hidden;\n}\n\nic-loading-indicator {\n position: sticky;\n top: 20px;\n}\n\n.table-row-container {\n position: relative;\n height: 100%;\n overflow: auto;\n transition: var(--ic-easing-transition-fast);\n overflow-anchor: none;\n}\n\n:host([show-pagination=\"true\"]) .table-row-container {\n height: calc(100% - 3.5625rem);\n}\n\ntable {\n table-layout: var(--table-layout, \"fixed\");\n border-spacing: 0;\n width: 100%;\n height: var(--table-height, auto);\n}\n\n.table-row-container:focus {\n outline: none;\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-fast);\n z-index: 1;\n}\n\n:host([embedded=\"true\"]) .table-row-container {\n border: var(--ic-border-light);\n}\n\n.column-header-inner-container {\n padding: var(--ic-space-xs);\n box-sizing: border-box;\n}\n\n.column-header-inner-container ic-tooltip {\n pointer-events: none;\n}\n\n.column-header-inner-container ic-tooltip.show-trunc-tooltip {\n pointer-events: auto;\n}\n\n.column-header-inner-container ic-tooltip .column-header-text {\n --ic-line-clamp: 1;\n}\n\n.column-header-sticky {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.column-header-overlay {\n position: sticky;\n top: 0;\n z-index: 1;\n box-shadow: 0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%);\n}\n\n.row-header-sticky {\n position: sticky;\n left: 0;\n}\n\n.column-header,\n.table-row {\n box-sizing: border-box;\n}\n\n.table-row-selected {\n background-color: var(--ic-table-row-selected) !important;\n}\n\n.sort-button {\n margin-left: auto;\n}\n\n.sort-button:hover {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\n.sort-button:active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n.sort-button svg {\n color: var(--ic-architectural-black);\n}\n\n.sort-button-unsorted svg {\n color: var(--ic-color-tertiary-text);\n}\n\n.table-density-dense .column-header-inner-container,\ntd.table-density-dense {\n padding: var(--ic-space-xxs) var(--ic-space-xs) !important;\n}\n\n.text-dense {\n font-size: var(--ic-font-size-label);\n}\n\n.table-density-spacious .column-header-inner-container,\ntd.table-density-spacious {\n padding: 0.625rem var(--ic-space-xs) !important;\n}\n\n.text-spacious {\n font-size: 1.125rem;\n}\n\n.column-header-text {\n font-weight: var(--ic-font-weight-bold);\n}\n\n.dummy-column-header-text {\n white-space: nowrap;\n overflow: hidden;\n height: 0;\n width: fit-content;\n}\n\n.row-header,\n.column-header {\n text-align: left;\n padding: var(--ic-space-xs);\n background-color: var(--ic-architectural-40);\n border-right: var(--ic-border-light);\n border-bottom: var(--ic-border-light);\n}\n\n.column-header {\n padding: 0;\n width: var(--column-width);\n min-width: var(--column-min-width, 4rem);\n max-width: var(--column-max-width);\n}\n\n.column-header:last-child {\n border-right: none;\n}\n\n.scrollable .column-header:last-child {\n border-right: var(--ic-border-light) !important;\n}\n\n:host([embedded=\"true\"]) tr:last-child .table-cell,\n:host([embedded=\"true\"]) tr:last-child .row-header {\n border-bottom: none;\n}\n\n.column-header-alignment-left,\n.row-header-alignment-left,\n.cell-alignment-left {\n text-align: left !important;\n justify-content: start !important;\n}\n\n.column-header-alignment-right,\n.row-header-alignment-right,\n.cell-alignment-right {\n text-align: right !important;\n justify-content: end !important;\n}\n\n.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography {\n padding-right: calc(var(--ic-space-xxs) + var(--ic-space-xs));\n}\n\n.cell-alignment-right.truncation-show-hide ic-typography {\n --ellipsis-padding-right: calc(var(--ic-space-xxs) + var(--ic-space-xs));\n}\n\n.column-header-alignment-center,\n.row-header-alignment-center,\n.cell-alignment-center {\n text-align: center !important;\n justify-content: center !important;\n}\n\n.table-row:nth-child(even) {\n background-color: var(--ic-architectural-20);\n}\n\n.table-cell {\n padding: var(--ic-space-xs);\n border-bottom: solid var(--ic-architectural-100) var(--ic-space-1px);\n overflow: hidden;\n box-sizing: border-box;\n max-width: var(--column-max-width);\n min-width: var(--column-min-width);\n}\n\n.table-cell.with-overflow {\n overflow: visible;\n}\n\n.data-type-string,\n.data-type-address {\n text-align: left;\n vertical-align: top;\n}\n\n.data-type-number,\n.data-type-date {\n text-align: right;\n justify-content: end;\n vertical-align: top;\n}\n\n.cell-alignment-top {\n vertical-align: top;\n align-items: flex-start;\n}\n\n.cell-alignment-middle {\n vertical-align: middle;\n align-items: center;\n}\n\n.cell-alignment-bottom {\n vertical-align: bottom;\n align-items: flex-end;\n}\n\n.cell-emphasis-low {\n color: var(--ic-color-secondary-text);\n}\n\n.cell-emphasis-high {\n font-weight: var(--ic-font-weight-bold);\n}\n\n.pagination-container {\n background-color: var(--ic-architectural-40);\n border-top: var(--ic-border-light);\n}\n\n.screen-reader-sort-text,\n.table-caption {\n position: absolute;\n left: -100rem;\n}\n\n.table-cell,\n.column-header,\n.row-header {\n word-wrap: break-word;\n white-space: pre-wrap;\n}\n\n.loading-empty {\n padding: var(--ic-space-xl) var(--ic-space-xxl);\n margin-top: var(--ic-space-xl);\n}\n\n.updating-state {\n padding: 0;\n border-bottom: var(--ic-border-light);\n}\n\n.updating-state-headers {\n border-bottom: none;\n}\n\n.loading {\n position: absolute;\n left: calc(50% - 5.9741rem);\n opacity: 0;\n transition: opacity var(--ic-transition-duration-slow);\n}\n\n.loading.show-background {\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-light);\n}\n\n.loading.show {\n opacity: 1;\n}\n\n.icon,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-right: var(--ic-space-xxs);\n}\n\n.column-header-alignment-right > .icon,\n.row-header-alignment-right > .icon,\n.cell-alignment-right > .icon,\n.column-header-alignment-right > ::slotted(svg),\n.row-header-alignment-right > ::slotted(svg),\n.cell-alignment-right > ::slotted(svg) {\n margin-right: auto;\n}\n\n.column-header-alignment-center > ic-typography,\n.row-header-alignment-right > ic-typography,\n.cell-alignment-center > ic-typography {\n flex: 1;\n}\n\n.icon > svg {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n}\n\n.truncation-tooltip ic-typography {\n display: -webkit-box;\n -webkit-line-clamp: var(--ic-line-clamp, 0);\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.truncation-tooltip ic-typography,\n.truncation-show-hide ic-typography {\n white-space: normal;\n}\n\n.ic-tooltip-overflow {\n overflow: hidden;\n width: 100%;\n}\n\n.action-element {\n display: flex;\n justify-content: right;\n}\n\n.cell-grid-wrapper {\n display: grid;\n grid-template-columns: auto auto;\n}\n\n@media screen and (min-width: 577px) {\n .column-header-inner-container {\n display: flex;\n align-items: center;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n Component,\n Element,\n h,\n Prop,\n State,\n Listen,\n Watch,\n Fragment,\n Method,\n Event,\n EventEmitter,\n Host,\n} from \"@stencil/core\";\nimport unsortedIcon from \"./assets/unsorted-icon.svg\";\nimport ascendingIcon from \"./assets/ascending-icon.svg\";\nimport descendingIcon from \"./assets/descending-icon.svg\";\nimport {\n IcDataTableDataType,\n IcDataTableColumnDataTypes,\n IcDataTableColumnObject,\n IcDataTableColumnWidthTypes,\n IcDataTableDensityOptions,\n IcDataTableRowHeights,\n IcDataTableSortOrderOptions,\n IcDataTableTruncationTypes,\n IcDensityUpdateEventDetail,\n IcSortEventDetail,\n} from \"./ic-data-table.types\";\nimport { IcThemeForegroundNoDefault } from \"@ukic/web-components/dist/types/utils/types\";\nimport { IcPaginationBarOptions } from \"../../utils/types\";\n// Unable to import helper functions via @ukic/web-components\nimport {\n isEmptyString,\n isSlotUsed,\n pxToRem,\n addDataToPosition,\n dynamicDebounce,\n getSlotElements,\n checkResizeObserver,\n} from \"../../utils/helpers\";\n\n/**\n * @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.\n * @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.\n * @slot {COLUMN_KEY}-column-icon - The icon slot for a column header.\n * @slot title-bar - A custom ic-data-table-title-bar can be slotted above the column headers to display additional information about the table.\n * @slot pagination-bar - A custom ic-pagination-bar can be slotted below the data to provide enhanced control over how the data is interacted with when being fetched externally.\n */\n@Component({\n tag: \"ic-data-table\",\n styleUrl: \"ic-data-table.css\",\n shadow: true,\n})\nexport class DataTable {\n private DENSITY_HEIGHT_MULTIPLIER = {\n dense: 0.8,\n default: 1,\n spacious: 1.2,\n };\n\n private DENSITY_PADDING_HEIGHT_DIFF = {\n dense: 8,\n default: 16,\n spacious: 20,\n };\n\n private SORT_ICONS = {\n unsorted: unsortedIcon,\n ascending: ascendingIcon,\n descending: descendingIcon,\n };\n\n private hasLoadedForOneSecond = true;\n private loadingIndicator: HTMLIcLoadingIndicatorElement;\n private timerStarted: number;\n private resizeObserver: ResizeObserver = null;\n private SHOW_HIDE_STRING = \"show-hide\";\n private SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;\n private TOOLTIP_STRING = \"tooltip\";\n private TOOLTIP = `ic-${this.TOOLTIP_STRING}`;\n private TEXT_WRAP_STRING = \"text-wrap\";\n private TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;\n private dataUpdated = false;\n private tableSorted: boolean;\n private rowHeightSet = false;\n private initialLoad = false;\n private icPageChangeEvent = false;\n private itemsPerPageChange = false;\n private DATA_ROW_HEIGHT_STRING = \"data-row-height\";\n private ROW_HEIGHT_CSS_VARIABLE = \"--row-height\";\n private previousItemsPerPage: number;\n private DEFAULT_LINE_HEIGHT = 24;\n private densityUpdate = false;\n private previousPaginationPage: number;\n private truncationPatternUpdated: boolean = false;\n private isNewDebounceDelaySet = false;\n private headerResizeObserver: ResizeObserver = null;\n private prevTableContainerWidth: number;\n private IC_TOOLTIP_STRING = \"ic-tooltip\";\n private SHOW_TRUNC_TOOLTIP_STRING = \"show-trunc-tooltip\";\n\n @Element() el: HTMLIcDataTableElement;\n\n @State() fromRow: number = 0;\n\n @State() previousRowsPerPage: number;\n\n @State() rowsPerPage: number;\n\n @State() scrollable: boolean = false;\n\n @State() scrollOffset: number = 0;\n\n @State() selectedRow: object;\n\n @State() sortedColumn: string;\n\n @State() sortedColumnOrder: IcDataTableSortOrderOptions;\n\n @State() toRow: number;\n\n @State() currentRowHeight: number;\n\n @State() debounceDelay = 0;\n\n /**\n * The title for the table only visible to screen readers.\n */\n @Prop() caption!: string;\n\n /**\n * Determines whether the column header should be truncated and display a tooltip. Default is `false`.\n */\n @Prop() columnHeaderTruncation: boolean = false;\n\n @Watch(\"columnHeaderTruncation\")\n headerTruncationChangeHandler(): void {\n if (this.columnHeaderTruncation) {\n this.prevTableContainerWidth = 0;\n } else {\n const headers = this.el.shadowRoot.querySelectorAll(\"th.column-header\");\n headers.forEach((header) => {\n const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);\n if (tooltip) {\n tooltip.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);\n }\n });\n }\n }\n\n /**\n * The column headers for the table.\n */\n @Prop() columns!: IcDataTableColumnObject[];\n\n /**\n * The row content for the table.\n */\n @Prop() data?: IcDataTableDataType[];\n\n /**\n * Set the density of the table including font and padding.\n */\n @Prop({ mutable: true }) density?: IcDataTableDensityOptions = \"default\";\n\n /**\n * Applies a border to the table container.\n */\n @Prop() embedded?: boolean = false;\n\n /**\n * Sets the row height on all rows in the table that aren't set using the `variableRowHeight` method.\n */\n @Prop({ mutable: true }) globalRowHeight?: IcDataTableRowHeights = \"auto\";\n\n /**\n * Sets the table height. Can be set to `auto` or a specific value in `px`, `rem`, or `%`.\n */\n @Prop() height?: string;\n\n /**\n * If `true`, column headers will not be visible.\n */\n @Prop() hideColumnHeaders?: boolean = false;\n\n /**\n * When set to `true`, the full table will show a loading state, featuring a radial indicator.\n */\n @Prop({ mutable: true }) loading?: boolean = false;\n\n /**\n * Sets the props for the circular loading indicator used in the loading state.\n */\n @Prop() loadingOptions?: {\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 };\n\n /**\n * Sets the maximum width of the data table. Can be set in `px`, `rem`, or `%`.\n */\n @Prop() maxWidth?: string;\n\n /**\n * Sets the minimum width of the data table. Can be set in `px`, `rem`, or `%`.\n */\n @Prop() minWidth?: string;\n\n /**\n * The minimum amount of time the `loading` state displays for before showing the data. Used to prevent flashing in the component.\n */\n @Prop() minimumLoadingDisplayDuration?: number = 1000;\n\n /**\n * Sets the props for the built-in pagination bar. If the `pagination-bar` slot is used then this prop is ignored.\n */\n @Prop() paginationBarOptions?: IcPaginationBarOptions = {\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 };\n\n /**\n * If `true`, adds a pagination bar to the bottom of the table.\n */\n @Prop() showPagination?: boolean = false;\n\n /**\n * If `true`, allows table columns to be sorted using applied sort buttons.\n */\n @Prop() sortable?: boolean = false;\n\n /**\n * Sets the order columns will be sorted in and allows for 'default' sorts to be added.\n */\n @Prop() sortOptions?: {\n sortOrders: IcDataTableSortOrderOptions[];\n defaultColumn?: string;\n } = {\n sortOrders: [\"unsorted\", \"ascending\", \"descending\"],\n defaultColumn: \"\",\n };\n\n /**\n * If `true`, column headers will remain at the top of the table when scrolling vertically.\n */\n @Prop() stickyColumnHeaders?: boolean = false;\n\n /**\n * If `true`, row headers will remain to the left when scrolling horizontally.\n */\n @Prop() stickyRowHeaders?: boolean = false;\n /**\n * Sets the layout of the table\n */\n @Prop() tableLayout?: \"fixed\" | \"auto\" = \"fixed\";\n\n /**\n * Sets the method used to truncate long text in cells where textWrap is `false`. The `tooltip` truncation pattern allows the overflowing text to be seen in a tooltip. The `show-hide` truncation pattern allows the overflowing text to be shown and hidden using the ic-typography \"See more\"/\"See less\" buttons.\n */\n @Prop() truncationPattern?: IcDataTableTruncationTypes;\n\n /**\n * If `true`, the table displays a linear loading indicator below the header row to indicate an updating state.\n */\n @Prop() updating?: boolean = false;\n\n /**\n * Sets the props for the linear loading indicator used in the updating state.\n */\n @Prop() updatingOptions?: {\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n max?: number;\n min?: number;\n progress?: number;\n };\n\n /**\n * Allows for custom setting of row heights on individual rows based on an individual value from the `data` prop and the row index.\n * If the function returns `null`, that row's height will be set to the `globalRowHeight` property.\n */\n @Prop({ mutable: true }) variableRowHeight?: (params: {\n [key: string]: any;\n index: number;\n }) => IcDataTableRowHeights | null;\n\n /**\n * Sets the table width. Can be set to `auto` or a specific value in `px`, `rem`, or `%`.\n */\n @Prop() width?: string;\n\n /**\n * Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table.\n */\n @Event() icRowHeightChange: EventEmitter<void>;\n\n /**\n * Emitted when a column sort button is clicked.\n */\n @Event() icSortChange: EventEmitter<IcSortEventDetail>;\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n this.headerResizeObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.rowsPerPage = Number(\n this.paginationBarOptions.itemsPerPageOptions[0].value\n );\n this.previousRowsPerPage = this.rowsPerPage;\n this.toRow = this.rowsPerPage;\n this.sortedColumn = this.sortOptions.defaultColumn;\n this.sortedColumnOrder = this.sortOptions.sortOrders[0];\n this.loadingOptions = {\n ...this.loadingOptions,\n showBackground: this.data?.length > 0,\n };\n this.initialLoad = true;\n this.previousItemsPerPage = this.rowsPerPage;\n }\n\n componentDidLoad(): void {\n const tableElement = this.el.shadowRoot.querySelector(\"table\");\n const tableContainer = this.el.shadowRoot.querySelector(\".table-container\");\n\n checkResizeObserver(this.runHeaderResizeObserver);\n\n if (this.dataUpdated) {\n this.dataUpdated = false;\n }\n\n if (\n tableElement?.clientHeight > tableContainer?.clientHeight ||\n tableElement?.clientWidth > tableContainer?.clientWidth\n ) {\n this.scrollable = true;\n }\n if (this.loading) {\n this.startLoadingTimer();\n this.showLoadingIndicator();\n }\n\n if (this.truncationPattern) {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {\n this.dataTruncation(typographyEl);\n }\n }\n );\n\n this.debounceDataTruncation();\n }\n\n if (this.globalRowHeight !== \"auto\") {\n this.updateSetRowHeight();\n }\n }\n\n componentDidUpdate(): void {\n // truncation updates invoked here once new/updated data has\n // rendered to take into account updated .cell-container/ic-typography box model updates.\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING ||\n this.truncationPattern === this.TOOLTIP_STRING\n ) {\n this.truncateUpdatedData();\n }\n }\n\n componentDidRender(): void {\n this.fixCellTooltips();\n this.adjustWidthForActionElement();\n }\n\n private runHeaderResizeObserver = () => {\n this.headerResizeObserver = new ResizeObserver(() => {\n this.headerResizeCallback();\n });\n this.headerResizeObserver.observe(this.el);\n };\n\n private headerResizeCallback = () => {\n if (!this.hideColumnHeaders && this.columnHeaderTruncation) {\n const tableContainerWidth =\n this.el.shadowRoot.querySelector(\".table-container\").clientWidth;\n if (tableContainerWidth !== this.prevTableContainerWidth) {\n const headers = this.el.shadowRoot.querySelectorAll(\"th.column-header\");\n headers.forEach((header) => {\n const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);\n const typographyEls = header.querySelectorAll(\"ic-typography\");\n if (tooltip && typographyEls && typographyEls.length === 2) {\n tooltip.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);\n if (typographyEls[1].clientWidth > typographyEls[0].clientWidth) {\n tooltip.classList.add(this.SHOW_TRUNC_TOOLTIP_STRING);\n }\n }\n });\n this.prevTableContainerWidth = tableContainerWidth;\n }\n }\n };\n\n private truncateUpdatedData() {\n if (this.dataUpdated) {\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n cellContainer?.clientHeight - this.DEFAULT_LINE_HEIGHT >=\n truncWrapper?.scrollHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n\n setTimeout(() => {\n // slight delay due to data rendering\n if (typographyEl?.scrollHeight > cellContainer?.clientHeight) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n }, 150);\n }\n );\n }\n\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n this.dataUpdated = false;\n }\n\n if (this.tableSorted) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {\n this.createShowHideTruncation(typographyEl, cellContainer);\n } else {\n typographyEl.resetTruncation().then(() => {\n cellContainer.removeAttribute(\"style\");\n });\n }\n }\n );\n }\n\n this.tableSorted = false;\n }\n\n // This function recalculates the tooltip truncation when the rowHeight has been set.\n // This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete\n if (this.rowHeightSet) {\n const fontSize = parseInt(\n getComputedStyle(document.documentElement).fontSize\n );\n const hasAutoRowHeight = this.globalRowHeight === \"auto\";\n\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n if (hasAutoRowHeight) {\n cellContainer.style.height = null;\n\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.removeTooltip(cellContainer, typographyEl, tooltipEl);\n typographyEl.setAttribute(\"style\", `--ic-line-clamp: 0`);\n } else if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.resetShowHideTruncation(typographyEl);\n }\n\n return;\n }\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n // If the set row height is bigger than the cell container even\n // with textWrap, set the row height\n if (\n !cellContainer?.style?.height &&\n rowHeight > cellContainer.clientHeight &&\n !cellContainer.classList.contains(this.TEXT_WRAP_STRING)\n ) {\n cellContainer.style.setProperty(\n this.ROW_HEIGHT_CSS_VARIABLE,\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n }\n\n if (this.truncationPattern) {\n // If the set row height is bigger than the typography truncation wrapper\n // scroll height, remove see more / see less button\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const showHideBtn =\n typographyEl.shadowRoot.querySelector(\"button\");\n\n if (\n showHideBtn &&\n truncWrapper?.scrollHeight <= cellContainer.clientHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n }\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n } else {\n this.updateSetRowHeight(typographyEl);\n }\n }\n );\n\n this.rowHeightSet = false;\n }\n\n // Only run truncation on the new rows\n // when the number of items per page has increased\n if (this.itemsPerPageChange) {\n const allRows = this.el.shadowRoot.querySelectorAll(\".table-row\");\n\n if (this.rowsPerPage > this.previousItemsPerPage) {\n const newRows = Array.from(allRows).slice(this.previousItemsPerPage);\n\n newRows.forEach((row) => {\n row\n .querySelectorAll(\"ic-typography\")\n .forEach((typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n });\n });\n }\n\n this.previousItemsPerPage = this.rowsPerPage;\n this.itemsPerPageChange = false;\n }\n\n if (!this.initialLoad && this.icPageChangeEvent) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n // set truncation to see more if opened and next/previous page is pressed\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const showHideBtn = typographyEl.shadowRoot.querySelector(\"button\");\n\n if (\n typographyEl?.scrollHeight > cellContainer.clientHeight &&\n !showHideBtn\n ) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n });\n }\n\n this.icPageChangeEvent = false;\n }\n\n if (this.densityUpdate) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n });\n\n this.densityUpdate = false;\n }\n\n if (this.truncationPatternUpdated) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n if (typographyEl.scrollHeight > cellContainer.clientHeight) {\n this.addTooltipTruncation(typographyEl, cellContainer, tooltipEl);\n }\n });\n } else if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n cellContainer?.clientHeight - this.DEFAULT_LINE_HEIGHT >\n truncWrapper?.scrollHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n\n if (typographyEl?.scrollHeight > cellContainer?.clientHeight) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n }\n );\n }\n }\n }\n\n private updateSetRowHeight = (typographyEl?: HTMLIcTypographyElement) => {\n const fontSize = parseInt(\n getComputedStyle(document.documentElement).fontSize\n );\n\n if (typographyEl) {\n const cellContainer = this.getCellContainer(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n if (typographyEl.scrollHeight > rowHeight) {\n cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);\n }\n } else {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n if (typographyEl.scrollHeight > rowHeight) {\n cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);\n }\n }\n );\n }\n };\n\n private createShowHideTruncation(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n typographyEl.checkMaxLines(typographyEl.scrollHeight);\n typographyEl.setAttribute(\n \"max-lines\",\n `${Math.floor(cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT)}`\n );\n typographyEl.setShowHideExpanded(false);\n\n cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);\n }\n\n private debounceDataTruncation = () => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {\n this.resizeObserver = new ResizeObserver(\n // This gets triggered twice due to updated data and see more/see less button\n dynamicDebounce(\n () => {\n this.dataTruncation(typographyEl);\n\n if (!this.isNewDebounceDelaySet) {\n this.setNewDebounceDelay(200);\n }\n },\n () => this.debounceDelay\n ) as ResizeObserverCallback\n );\n\n this.resizeObserver.observe(typographyEl);\n }\n }\n );\n };\n\n private setNewDebounceDelay = (delay: number) => {\n this.debounceDelay = delay;\n\n this.isNewDebounceDelaySet = true;\n };\n\n private getLines = (height: number): number =>\n Math.floor(height / this.DEFAULT_LINE_HEIGHT);\n\n private truncate = (\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement,\n tooltip: HTMLIcTooltipElement\n ) => {\n if (typographyEl?.scrollHeight > cellContainer?.clientHeight) {\n //24 is the height of a single line\n if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.addTooltipTruncation(typographyEl, cellContainer, tooltip);\n }\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n }\n } else {\n if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {\n typographyEl.setAttribute(\"style\", `--ic-line-clamp: 0`);\n\n cellContainer.appendChild(typographyEl);\n tooltip.remove();\n }\n\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING &&\n !isEmptyString(typographyEl.getAttribute(\"max-lines\"))\n ) {\n this.resetShowHideTruncation(typographyEl);\n }\n }\n };\n\n private addTooltipTruncation(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement,\n tooltip: HTMLIcTooltipElement\n ) {\n this.addLineClampCSS(typographyEl, cellContainer);\n\n if (!tooltip) {\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n\n private addShowHideTruncation(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement\n ) {\n cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);\n this.createShowHideTruncation(typographyEl, cellContainer);\n }\n\n private dataTruncation = (typographyEl: HTMLIcTypographyElement) => {\n // Tooltip truncation mentioned in AC. Will need revisiting\n const tooltip: HTMLIcTooltipElement = this.getTooltip(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n if (\n cellContainer?.classList.contains(\"data-type-element\") ||\n this.dataUpdated\n ) {\n return;\n }\n\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING &&\n typographyEl.shadowRoot.querySelector(\"button\")\n ) {\n const showHideBtn = typographyEl.shadowRoot.querySelector(\"button\");\n // If the see more/see less is present and the max lines is equal to the cell container\n // remove the see more/see less button\n if (showHideBtn) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n\n if (\n this.getLines(truncWrapper.scrollHeight) ===\n +typographyEl.getAttribute(\"max-lines\")\n ) {\n this.resetShowHideTruncation(typographyEl);\n }\n }\n }\n\n // Deals with setting and resetting row height and re-truncating data\n if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n // cellContainer.clientHeight - 24 removes the extra line by see more/see less\n if (\n truncWrapper &&\n cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >\n truncWrapper.scrollHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n\n if (typographyEl.scrollHeight > cellContainer.clientHeight) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n return;\n }\n }\n\n if (\n typographyEl?.scrollHeight > 0 &&\n cellContainer?.clientHeight > 0 &&\n typographyEl?.scrollHeight === cellContainer?.clientHeight\n ) {\n if (tooltip) {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n }\n return;\n }\n\n this.truncate(typographyEl, cellContainer, tooltip);\n };\n\n private getTruncWrapper(typographyEl: HTMLIcTypographyElement) {\n return typographyEl.shadowRoot.querySelector(\".trunc-wrapper\");\n }\n\n // Set the height to initial if row height is set and the show / hide truncation\n // is clicked\n @Listen(\"typographyTruncationExpandToggle\")\n handleTypographyTruncationExpandToggle({\n detail,\n }: CustomEvent<{\n expanded: boolean;\n typographyEl: HTMLIcTypographyElement;\n }>): void {\n const { expanded, typographyEl } = detail;\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n cellContainer.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE) &&\n expanded\n ) {\n cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, \"inherit\");\n }\n }\n\n @Listen(\"icPageChange\")\n handlePageChange({ detail, target }: CustomEvent<{ value: number }>): void {\n if ((target as HTMLIcPaginationBarElement).parentElement !== this.el) {\n this.fromRow = (detail.value - 1) * this.rowsPerPage;\n this.toRow = this.fromRow + this.rowsPerPage;\n const tableRowsContainer = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n );\n if (this.previousRowsPerPage === this.rowsPerPage) {\n tableRowsContainer.scrollTop = 0;\n } else if (this.previousRowsPerPage < this.rowsPerPage) {\n tableRowsContainer.scrollTop = this.scrollOffset;\n this.previousRowsPerPage = this.rowsPerPage;\n } else {\n this.previousRowsPerPage = this.rowsPerPage;\n }\n }\n\n if (!this.initialLoad && this.previousPaginationPage !== detail.value) {\n // This is to prevent icPageChange from triggering truncation on first load\n this.icPageChangeEvent = true;\n }\n\n this.previousPaginationPage = detail.value;\n this.initialLoad = false;\n }\n\n @Listen(\"icItemsPerPageChange\")\n handleItemsPerPageChange({\n detail,\n target,\n }: CustomEvent<{ value: number }>): void {\n if ((target as HTMLIcPaginationBarElement).parentElement !== this.el) {\n this.previousRowsPerPage = this.rowsPerPage;\n this.rowsPerPage = detail.value;\n }\n\n this.itemsPerPageChange = true;\n }\n\n @Listen(\"icTableDensityUpdate\")\n handleDensityChange(ev: CustomEvent<IcDensityUpdateEventDetail>): void {\n this.density = ev.detail.value;\n }\n\n @Listen(\"click\", { target: \"window\" })\n clickListener(ev: MouseEvent): void {\n if (ev.target !== this.el) this.selectedRow = undefined;\n }\n\n @Watch(\"loading\")\n loadingHandler(newValue: boolean): void {\n if (newValue) this.startLoadingTimer();\n\n if (this.loading) {\n setTimeout(() => {\n this.showLoadingIndicator();\n }, 500);\n }\n }\n\n @Watch(\"truncationPattern\")\n truncationPatternHandler(newValue: IcDataTableTruncationTypes): void {\n if (newValue === this.TOOLTIP_STRING) {\n this.resetShowHideTruncation();\n this.updateTruncationTooltip(true);\n\n // Not using debounceDataTruncation here due to resizeObserver not being triggered\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltip: HTMLIcTooltipElement = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltip);\n }\n );\n }\n\n if (newValue === this.SHOW_HIDE_STRING) {\n // ResizeObserver is trigger here due to the see more/see less links being removed.\n // The resizeObserver will also apply the tooltip where relevant\n this.updateTruncationTooltip(true);\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n cellContainer?.clientHeight - this.DEFAULT_LINE_HEIGHT >\n truncWrapper?.scrollHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n\n setTimeout(() => {\n // slight delay due to data rendering\n if (typographyEl?.scrollHeight > cellContainer?.clientHeight) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n }, 150);\n }\n );\n }\n\n this.truncationPatternUpdated = true;\n }\n\n @Watch(\"data\")\n async dataHandler(newData: IcDataTableDataType[]): Promise<void> {\n this.loadingOptions = {\n ...this.loadingOptions,\n showBackground: newData?.length > 0,\n };\n if (this.loading) {\n !this.hasLoadedForOneSecond\n ? setTimeout(\n () => (this.loading = false),\n this.minimumLoadingDisplayDuration -\n (Date.now() - this.timerStarted)\n )\n : (this.loading = false);\n }\n if (this.updating) this.updating = false;\n\n this.dataUpdated = true;\n }\n\n @Watch(\"density\")\n async densityHandler(): Promise<void> {\n this.densityUpdate = true;\n }\n\n private removeTextWrap = (): void => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const tableCell = typographyEl.closest(\"td\");\n if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {\n tableCell.classList.remove(this.TEXT_WRAP_STRING);\n }\n }\n );\n };\n\n private getCellContainer = (\n typographyEl: HTMLIcTypographyElement\n ): HTMLElement => {\n return typographyEl.closest(\".cell-container\");\n };\n\n private deleteTextWrapDataKey = (\n array: IcDataTableColumnObject[] | object[]\n ) =>\n Array.isArray(array) &&\n array.forEach((val) => val.textWrap && delete val.textWrap);\n\n private resetShowHideTruncation(typographyEl?: HTMLIcTypographyElement) {\n if (typographyEl) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n truncWrapper?.scrollHeight > cellContainer?.clientHeight &&\n !isEmptyString(typographyEl.getAttribute(\"max-lines\")) &&\n Math.floor(cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT) !==\n +typographyEl.getAttribute(\"max-lines\")\n ) {\n typographyEl.checkMaxLines(truncWrapper.scrollHeight);\n typographyEl.setAttribute(\n \"max-lines\",\n `${Math.floor(\n cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT\n )}`\n );\n typographyEl.setShowHideExpanded(false);\n\n cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);\n } else {\n typographyEl.resetTruncation().then(() => {\n if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n cellContainer.style.setProperty(\n this.ROW_HEIGHT_CSS_VARIABLE,\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n }\n });\n }\n } else {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n typographyEl.resetTruncation().then(() => {\n if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n cellContainer.style.setProperty(\n this.ROW_HEIGHT_CSS_VARIABLE,\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n }\n });\n });\n }\n }\n\n @Watch(\"globalRowHeight\")\n @Watch(\"variableRowHeight\")\n rowHeightChangeHandler(newValue: number, oldValue: number): void {\n if (+newValue !== +oldValue) {\n this.deleteTextWrapDataKey(this.data);\n this.deleteTextWrapDataKey(this.columns);\n this.removeTextWrap();\n\n this.icRowHeightChange.emit();\n\n this.rowHeightSet = true;\n }\n }\n\n /**\n * Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.\n */\n @Method()\n async resetRowHeights(rowHeight?: number | \"auto\"): Promise<void> {\n this.globalRowHeight = rowHeight || \"auto\";\n this.variableRowHeight = null;\n }\n\n private showLoadingIndicator() {\n this.loadingIndicator?.classList.add(\"show\");\n }\n\n private startLoadingTimer = (): void => {\n this.hasLoadedForOneSecond = false;\n this.timerStarted = Date.now();\n setTimeout(() => {\n this.hasLoadedForOneSecond = true;\n this.timerStarted = null;\n }, this.minimumLoadingDisplayDuration);\n };\n\n private isObject = (value: any) =>\n value !== undefined && value !== null && typeof value === \"object\";\n\n private notDefaultDensity = () => this.density !== \"default\";\n\n private getCellContent = (\n cell: any,\n dataType: IcDataTableColumnDataTypes\n ): any => {\n switch (dataType) {\n case \"element\":\n return undefined;\n case \"date\":\n return (\n cell instanceof Date ? cell : new Date(cell)\n ).toLocaleDateString();\n default:\n return cell;\n }\n };\n\n private getCellAlignment = (\n cell: any,\n alignment: \"horizontal\" | \"vertical\"\n ) => {\n if (this.isObject(cell) && Object.keys(cell).includes(\"cellAlignment\")) {\n return this.getObjectValue(\n this.getObjectValue(cell, \"cellAlignment\"),\n alignment\n );\n }\n };\n\n private getCellOptions = (cell: any, key: string) => {\n if (!(this.isObject(cell) && Object.keys(cell).includes(key))) return;\n\n return this.getObjectValue(cell, key);\n };\n\n private createUpdatingIndicator = () => {\n const { appearance, description, max, min, progress } =\n this.updatingOptions || {};\n return (\n <th colSpan={this.columns.length} class=\"updating-state\">\n <ic-loading-indicator\n appearance={appearance}\n description={description || \"Updating table data\"}\n fullWidth={true}\n max={max}\n min={min}\n progress={progress}\n type=\"linear\"\n size=\"small\"\n ></ic-loading-indicator>\n </th>\n );\n };\n\n private setRowHeight = (height: number) => {\n return pxToRem(\n `${\n height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -\n this.DENSITY_PADDING_HEIGHT_DIFF[this.density]\n }px`\n );\n };\n\n private setTruncationClass = () => {\n if (this.truncationPattern) {\n return { [`truncation-${this.truncationPattern}`]: true };\n }\n\n return {};\n };\n\n private getColumnWidth = (\n columnWidth?: string | IcDataTableColumnWidthTypes\n ) => {\n // TODO: Setting max width on columns\n let columnWidthStyling = {};\n\n if (columnWidth) {\n if (typeof columnWidth === \"string\") {\n columnWidthStyling = {\n ...columnWidthStyling,\n [\"--column-width\"]: columnWidth,\n };\n }\n\n if (typeof columnWidth === \"object\" && !!Object.keys(columnWidth)) {\n if (columnWidth?.minWidth) {\n columnWidthStyling = {\n ...columnWidthStyling,\n [\"--column-min-width\"]: columnWidth?.minWidth,\n };\n }\n\n if (columnWidth?.maxWidth) {\n columnWidthStyling = {\n ...columnWidthStyling,\n [\"--column-max-width\"]: columnWidth?.maxWidth,\n };\n }\n }\n }\n\n return columnWidthStyling;\n };\n\n private getRowHeight = (\n currentRowHeight: number,\n columnProps: IcDataTableColumnObject,\n rowTextWrap: boolean,\n cell: any\n ) => {\n if (\n (this.truncationPattern || currentRowHeight) &&\n !columnProps?.textWrap &&\n !rowTextWrap &&\n !this.getCellOptions(cell, \"textWrap\") &&\n columnProps?.dataType !== \"element\"\n ) {\n return {\n [this.ROW_HEIGHT_CSS_VARIABLE]: this.setRowHeight(currentRowHeight),\n };\n }\n\n return {};\n };\n\n private adjustWidthForActionElement = () => {\n const elements = this.el.shadowRoot.querySelectorAll(\".action-element\");\n elements.forEach((element) => {\n const width = (element.firstChild as HTMLElement).getBoundingClientRect()\n .width;\n const gridWrapper: HTMLElement = element.closest(\".cell-grid-wrapper\");\n gridWrapper.style.gridTemplateColumns = `auto calc(${width}px + var(--ic-space-xs))`;\n });\n };\n\n private createCellContent = (\n columnProps: IcDataTableColumnObject,\n cell: any,\n cellSlotName: string,\n rowOptions: any,\n rowAlignment: string,\n hasIcon: boolean,\n currentRowHeight: number,\n cellValue: (key: string) => any,\n rowEmphasis: string\n ) => (\n <div\n innerHTML={\n columnProps?.dataType === \"element\" &&\n !isSlotUsed(this.el, cellSlotName)\n ? (cell as string)\n : null\n }\n class={{\n \"cell-container\": columnProps?.dataType !== \"element\",\n [`cell-alignment-${\n columnProps?.columnAlignment?.vertical ||\n rowOptions?.rowAlignment?.vertical ||\n rowAlignment ||\n this.getCellAlignment(cell, \"vertical\")\n }`]:\n !!columnProps?.columnAlignment?.vertical ||\n !!rowOptions?.rowAlignment?.vertical ||\n !!rowAlignment ||\n !!this.getCellAlignment(cell, \"vertical\"),\n [`cell-alignment-${\n columnProps?.columnAlignment?.horizontal ||\n rowOptions?.rowAlignment?.horizontal ||\n this.getCellAlignment(cell, \"horizontal\")\n }`]:\n !!columnProps?.columnAlignment?.horizontal ||\n !!rowOptions?.rowAlignment?.horizontal ||\n !!this.getCellAlignment(cell, \"horizontal\"),\n [`data-type-${columnProps?.dataType}`]: true,\n [this.TEXT_WRAP_STRING]:\n columnProps?.textWrap ||\n rowOptions?.textWrap ||\n !!this.getCellOptions(cell, \"textWrap\"),\n [\"cell-icon\"]: hasIcon || !!columnProps?.icon?.icon,\n ...this.setTruncationClass(),\n }}\n style={{\n ...this.getRowHeight(\n currentRowHeight,\n columnProps,\n rowOptions?.textWrap,\n cell\n ),\n ...this.getColumnWidth(columnProps?.columnWidth),\n }}\n data-row-height={\n this.truncationPattern || currentRowHeight\n ? this.setRowHeight(currentRowHeight)\n : null\n }\n >\n {isSlotUsed(this.el, cellSlotName) ? (\n <slot name={cellSlotName} />\n ) : (\n <Fragment>\n {isSlotUsed(this.el, `${cellSlotName}-icon`) ? (\n <slot name={`${cellSlotName}-icon`} />\n ) : (\n (hasIcon || columnProps?.icon?.onAllCells) &&\n (cellValue(\"icon\") || columnProps?.icon?.icon) && (\n <span\n class=\"icon\"\n innerHTML={cellValue(\"icon\") || columnProps?.icon?.icon}\n ></span>\n )\n )}\n {columnProps?.dataType !== \"element\" &&\n !isSlotUsed(this.el, cellSlotName) && (\n <ic-typography\n variant=\"body\"\n class={{\n [`cell-emphasis-${\n (this.isObject(cell) && cellValue(\"emphasis\")) ||\n columnProps?.emphasis ||\n rowEmphasis\n }`]:\n (this.isObject(cell) && !!cellValue(\"emphasis\")) ||\n !!columnProps?.emphasis ||\n !!rowEmphasis,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {this.isObject(cell) && columnProps?.dataType !== \"date\" ? (\n Object.keys(cell).includes(\"href\") ? (\n <ic-link\n href={cellValue(\"href\")}\n target={cellValue(\"target\") || undefined}\n rel={cellValue(\"rel\") || undefined}\n >\n {cellValue(\"data\")}\n </ic-link>\n ) : (\n cellValue(\"data\")\n )\n ) : (\n this.getCellContent(cell, columnProps?.dataType)\n )}\n </ic-typography>\n )}\n </Fragment>\n )}\n </div>\n );\n\n private createCells = (row: IcDataTableDataType, rowIndex: number) => {\n const rowValues = Object.values(row);\n const rowKeys = Object.keys(row);\n\n const rowOptions = this.getRowOptions(rowKeys, rowValues);\n let rowAlignment: string;\n let rowEmphasis: string;\n\n const headerIndex = rowKeys.indexOf(\"header\");\n if (headerIndex > -1) {\n rowAlignment = this.getObjectValue(\n rowValues[headerIndex],\n \"rowAlignment\"\n );\n rowEmphasis = this.getObjectValue(rowValues[headerIndex], \"emphasis\");\n }\n\n const variableRowHeightVal = this.variableRowHeight?.({\n ...row,\n index: rowIndex,\n });\n const currentRowHeight = variableRowHeightVal\n ? variableRowHeightVal !== \"auto\" && variableRowHeightVal\n : this.globalRowHeight !== \"auto\" && this.globalRowHeight;\n\n return rowValues.map((cell, index) => {\n const columnProps = this.columns[index];\n const cellSlotName = `${columnProps?.key}-${rowIndex}`;\n const hasIcon = this.isObject(cell) && Object.keys(cell).includes(\"icon\");\n const cellValue = (key: string) => this.getObjectValue(cell, key);\n\n if (rowKeys[index] === \"header\") {\n return (\n <th\n scope=\"row\"\n colSpan={cellValue(\"colspan\")}\n class={{\n [\"row-header\"]: true,\n [`row-header-alignment-${cellValue(\"cellAlignment\")}`]:\n !!cellValue(\"cellAlignment\"),\n [\"row-header-sticky\"]: this.stickyRowHeaders,\n }}\n >\n {cellValue(\"title\")}\n </th>\n );\n }\n\n if (rowKeys[index] !== \"rowOptions\") {\n return (\n <td\n class={{\n [\"table-cell\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n [\"with-overflow\"]: columnProps?.dataType === \"element\",\n }}\n style={{ ...this.getColumnWidth(columnProps.columnWidth) }}\n >\n {this.isObject(cell) &&\n Object.keys(cell).includes(\"actionElement\") ? (\n <div class=\"cell-grid-wrapper\">\n {this.createCellContent(\n columnProps,\n cell,\n cellSlotName,\n rowOptions,\n rowAlignment,\n hasIcon,\n currentRowHeight,\n cellValue,\n rowEmphasis\n )}\n <span\n class=\"action-element\"\n innerHTML={cellValue(\"actionElement\")}\n ></span>\n </div>\n ) : (\n this.createCellContent(\n columnProps,\n cell,\n cellSlotName,\n rowOptions,\n rowAlignment,\n hasIcon,\n currentRowHeight,\n cellValue,\n rowEmphasis\n )\n )}\n </td>\n );\n }\n });\n };\n\n private createColumnHeaders = () =>\n this.columns.map(\n ({ cellAlignment, colspan, icon, key, title, columnWidth }, index) => (\n <th\n scope=\"col\"\n class={{\n [\"column-header\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n [\"updating-state-headers\"]: this.updating && !this.loading,\n }}\n style={{ ...this.getColumnWidth(columnWidth) }}\n colSpan={colspan}\n >\n <div\n class={{\n \"column-header-inner-container\": true,\n \"truncation-tooltip\": this.columnHeaderTruncation,\n [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,\n }}\n >\n {isSlotUsed(this.el, `${key}-column-icon`) ? (\n <slot name={`${key}-column-icon`} />\n ) : (\n icon &&\n !icon.hideOnHeader && (\n <span class=\"icon\" innerHTML={icon.icon}></span>\n )\n )}\n {this.columnHeaderTruncation ? (\n <ic-tooltip label={title} target={`column-header-${index}`}>\n <ic-typography\n id={`column-header-${index}`}\n variant=\"body\"\n class={{\n [\"column-header-text\"]: true,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {title}\n </ic-typography>\n </ic-tooltip>\n ) : (\n <ic-typography\n variant=\"body\"\n class={{\n [\"column-header-text\"]: true,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {title}\n </ic-typography>\n )}\n {this.sortable && (\n <ic-button\n variant=\"icon\"\n id={`sort-button-${key}`}\n aria-label={this.getSortButtonLabel(key)}\n // eslint-disable-next-line react/jsx-no-bind\n onClick={() => this.sortRows(key)}\n innerHTML={\n this.SORT_ICONS[\n this.sortedColumn === key\n ? this.sortedColumnOrder\n : \"unsorted\"\n ]\n }\n class={{\n [\"sort-button\"]: true,\n [\"sort-button-unsorted\"]:\n this.sortedColumn !== key ||\n this.sortedColumnOrder === \"unsorted\",\n }}\n ></ic-button>\n )}\n </div>\n {this.columnHeaderTruncation && (\n <ic-typography\n variant=\"body\"\n aria-hidden=\"true\"\n class={{\n [\"column-header-text\"]: true,\n [\"dummy-column-header-text\"]: this.columnHeaderTruncation,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {title}\n </ic-typography>\n )}\n </th>\n )\n );\n\n private onRowClick = (row: object) => {\n this.selectedRow =\n this.selectedRow !== row && !this.loading && !this.updating && row;\n };\n\n private createRows = () => {\n const data = this.showPagination\n ? this.data.slice(this.fromRow, this.toRow)\n : this.data.slice();\n\n /**\n * Ensures that createCells has a value in data to map over to actually render the slot.\n * Removes the need for the user to add it multiple times.\n * `addDataToPosition` used to add the element in the correct column order.\n * Adding empty string value in to give `createCells` something to loop over.\n */\n const organisedData = data.map((row, rowIndex) => {\n const slottedColumns = this.columns\n .map(\n ({ key }, index) =>\n isSlotUsed(this.el, `${key}-${rowIndex}`) && { key, index }\n )\n .filter(\n (col) =>\n !!col &&\n // skip the column if its already in the row\n !Object.prototype.hasOwnProperty.call(row, col.key)\n );\n return slottedColumns.length > 0\n ? addDataToPosition(row, slottedColumns, \"\")\n : row;\n });\n\n return organisedData\n .sort(!this.sortable ? undefined : this.getSortFunction())\n .map((row, index) => {\n return (\n <tr\n // eslint-disable-next-line react/jsx-no-bind\n onClick={() => this.onRowClick(row)}\n class={{\n [\"table-row\"]: true,\n [\"table-row-selected\"]: this.selectedRow === row,\n }}\n >\n {this.createCells(row, index)}\n </tr>\n );\n });\n };\n\n private getObjectValue = (cell: object, key: string) => {\n return Object.values(cell)[Object.keys(cell).indexOf(key)];\n };\n\n private getSortButtonLabel = (key: string) => {\n let label = \"\";\n const getNextSortOption = (option: IcDataTableSortOrderOptions) => {\n const sortOrders = this.sortOptions.sortOrders;\n return sortOrders[(sortOrders.indexOf(option) + 1) % sortOrders.length];\n };\n\n if (this.sortedColumn === key) {\n const sortOption = getNextSortOption(this.sortedColumnOrder);\n label = sortOption !== \"unsorted\" ? `Sort ${sortOption}` : \"Remove sort\";\n } else {\n label = `Sort ${getNextSortOption(\"unsorted\")}`;\n }\n\n return label;\n };\n\n private getComparison = (targetRow: any, comparisonRow: any): number => {\n const targetRowValue = targetRow[this.sortedColumn];\n const comparisonRowValue = comparisonRow[this.sortedColumn];\n return this.columns.find((col) => col.key === this.sortedColumn)\n .dataType === \"date\"\n ? new Date(targetRowValue).valueOf() -\n new Date(comparisonRowValue).valueOf()\n : String(\n this.isObject(targetRowValue)\n ? Object.values(targetRowValue)[0]\n : targetRowValue\n ).localeCompare(\n String(\n this.isObject(comparisonRowValue)\n ? Object.values(comparisonRowValue)[0]\n : comparisonRowValue\n ),\n undefined,\n { numeric: true, sensitivity: \"base\" }\n );\n };\n\n private getSortFunction = () => {\n switch (this.sortedColumnOrder) {\n case \"ascending\":\n return (a: any, b: any) => this.getComparison(a, b);\n case \"descending\":\n return (a: any, b: any) => this.getComparison(b, a);\n default:\n return undefined;\n }\n };\n\n private sortRows = (column: string) => {\n const sortButton = this.el.shadowRoot.querySelector(\n `#sort-button-${column}`\n ) as HTMLIcButtonElement;\n\n const sortOrders = this.sortOptions.sortOrders;\n\n if (column !== this.sortedColumn) {\n if (this.sortedColumn) {\n const previousSortedButton = this.el.shadowRoot.querySelector(\n `#sort-button-${this.sortedColumn}`\n ) as HTMLIcButtonElement;\n previousSortedButton.setAttribute(\n \"aria-label\",\n this.getSortButtonLabel(column)\n ); // Passing through unsorted column returns correct label for newly unsorted column\n }\n this.sortedColumn = column;\n this.sortedColumnOrder = \"unsorted\";\n }\n\n let nextSortOrderIndex = sortOrders.indexOf(this.sortedColumnOrder) + 1;\n\n if (nextSortOrderIndex > sortOrders.length - 1) {\n nextSortOrderIndex = 0;\n }\n\n this.sortedColumnOrder = sortOrders[nextSortOrderIndex];\n\n sortButton.setAttribute(\"aria-label\", this.getSortButtonLabel(column));\n\n this.tableSorted = true;\n\n this.icSortChange.emit({\n columnName: column,\n sorted: this.sortedColumnOrder,\n });\n };\n\n private getTypographyElements = (): HTMLIcTypographyElement[] => {\n return Array.from(\n this.el.shadowRoot.querySelectorAll(\n \"ic-typography:not(.column-header-text)\"\n )\n );\n };\n\n private getTooltip = (\n typographyEl: HTMLIcTypographyElement\n ): HTMLIcTooltipElement => {\n return typographyEl.closest(this.TOOLTIP);\n };\n\n private updateTruncationTooltip = (removeTooltipOnly = false) => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const tooltip = this.getTooltip(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n typographyEl.setAttribute(\"style\", `--ic-line-clamp: 0`);\n return;\n }\n\n this.regenerateTooltip(\n cellContainer,\n typographyEl,\n tooltip,\n removeTooltipOnly\n );\n }\n );\n };\n\n private updateScrollOffset = () => {\n this.scrollOffset = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n ).scrollTop;\n };\n\n private getRowOptions(rowKeys: string[], rowValues: any[]) {\n const rowOptionsIndex = rowKeys.indexOf(\"rowOptions\");\n return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];\n }\n\n private regenerateTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement,\n removeTooltipOnly?: boolean\n ) {\n // When sorting the table, instead of regenerating the tooltip,\n // the tooltip details are updated\n\n if (tooltip) {\n if (this.tableSorted) {\n tooltip.setAttribute(\"target\", typographyEl.id);\n tooltip.setAttribute(\"label\", typographyEl.textContent);\n } else {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n }\n if (removeTooltipOnly) {\n return;\n }\n }\n\n // This add line clamp to data only when\n // the data object has been updated\n if (!typographyEl.getAttribute(\"style\") && this.dataUpdated) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n\n if (\n typographyEl?.scrollHeight > cellContainer?.clientHeight &&\n this.truncationPattern === this.TOOLTIP_STRING\n ) {\n if (\n !typographyEl.getAttribute(\"style\") ||\n typographyEl.style.cssText.includes(\"--ic-line-clamp: 0;\")\n ) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n private setTableDimensions = () => {\n let tableHostDimensions = {};\n\n if (this.width) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-width\"]: this.width,\n };\n }\n\n if (this.height) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-height\"]: this.height,\n };\n }\n\n if (this.maxWidth) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-max-width\"]: this.maxWidth,\n };\n }\n\n if (this.minWidth) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-min-width\"]: this.minWidth,\n };\n }\n\n return tableHostDimensions;\n };\n\n private removeTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement\n ) {\n cellContainer.appendChild(typographyEl);\n if (tooltip) {\n tooltip.remove();\n }\n }\n\n private addLineClampCSS(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n typographyEl.setAttribute(\n \"style\",\n `--ic-line-clamp: ${this.getLines(cellContainer?.clientHeight)}`\n );\n }\n\n private createTruncationTooltip(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n const tooltipEl = document.createElement(\n this.IC_TOOLTIP_STRING\n ) as HTMLIcTooltipElement;\n tooltipEl.setAttribute(\"target\", typographyEl.id);\n tooltipEl.setAttribute(\"label\", typographyEl.textContent);\n tooltipEl.classList.add(\"ic-tooltip-overflow\");\n tooltipEl.setExternalPopperProps({\n // This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly\n strategy: \"fixed\",\n });\n cellContainer.appendChild(tooltipEl);\n tooltipEl.appendChild(typographyEl);\n }\n\n private fixCellTooltips = () => {\n const elements = this.el.shadowRoot.querySelectorAll(\".data-type-element\");\n elements.forEach((element) => {\n const slotElements = getSlotElements(element);\n slotElements.forEach((slottedEl: HTMLElement) => {\n const tooltipEl = (\n slottedEl.tagName === \"IC-TOOLTIP\"\n ? slottedEl\n : slottedEl.shadowRoot?.querySelector(this.IC_TOOLTIP_STRING)\n ) as HTMLIcTooltipElement;\n if (tooltipEl) {\n tooltipEl.setExternalPopperProps({\n strategy: \"fixed\",\n });\n }\n });\n });\n };\n\n render() {\n const {\n caption,\n createColumnHeaders,\n createRows,\n createUpdatingIndicator,\n data,\n hideColumnHeaders,\n loading,\n loadingOptions,\n paginationBarOptions,\n scrollable,\n scrollOffset,\n showPagination,\n sortable,\n sortedColumnOrder,\n sortedColumn,\n stickyColumnHeaders,\n updateScrollOffset,\n updating,\n } = this;\n\n return (\n <Host style={{ ...this.setTableDimensions() }}>\n <div class=\"table-container\">\n {isSlotUsed(this.el, \"title-bar\") && <slot name=\"title-bar\" />}\n <div\n class={{\n [\"table-row-container\"]: true,\n scrollable,\n }}\n tabIndex={scrollable ? 0 : null}\n onScroll={updateScrollOffset}\n >\n {isSlotUsed(this.el, \"title-bar\") && <slot name=\"title-bar\" />}\n <table\n style={{\n [\"--table-layout\"]: this.tableLayout,\n }}\n >\n <caption class=\"table-caption\">{caption}</caption>\n {!hideColumnHeaders && (\n <thead\n class={{\n [\"column-header-sticky\"]: stickyColumnHeaders,\n [\"column-header-overlay\"]:\n stickyColumnHeaders && scrollOffset !== 0,\n }}\n >\n <tr>{createColumnHeaders()}</tr>\n </thead>\n )}\n {updating &&\n !loading &&\n (hideColumnHeaders ? (\n <thead>{createUpdatingIndicator()}</thead>\n ) : (\n createUpdatingIndicator()\n ))}\n {data?.length > 0 && !loading && <tbody>{createRows()}</tbody>}\n </table>\n {!data?.length &&\n !loading &&\n (isSlotUsed(this.el, \"empty-state\") ? (\n <slot name=\"empty-state\" />\n ) : (\n <ic-empty-state\n aligned=\"center\"\n heading=\"No Data\"\n class=\"loading-empty\"\n ></ic-empty-state>\n ))}\n </div>\n {loading && (\n <ic-loading-indicator\n appearance={loadingOptions?.appearance}\n class={{\n \"loading-empty\": loading,\n loading: true,\n \"show-background\": loadingOptions.showBackground,\n }}\n description={loadingOptions.description || \"Loading table data\"}\n label={loadingOptions.label || \"Loading...\"}\n labelDuration={loadingOptions?.labelDuration}\n max={loadingOptions?.max}\n min={loadingOptions?.min}\n progress={loadingOptions?.progress}\n ref={(el: HTMLIcLoadingIndicatorElement) =>\n (this.loadingIndicator = el)\n }\n ></ic-loading-indicator>\n )}\n {(showPagination || isSlotUsed(this.el, \"pagination-bar\")) && (\n <div class=\"pagination-container\">\n {isSlotUsed(this.el, \"pagination-bar\") ? (\n <slot name=\"pagination-bar\" />\n ) : (\n <ic-pagination-bar\n totalItems={data?.length ?? 0}\n type={paginationBarOptions.type}\n rangeLabelType={paginationBarOptions.rangeLabelType}\n showItemsPerPageControl={\n paginationBarOptions.showItemsPerPageControl\n }\n showGoToPageControl={paginationBarOptions.showGoToPageControl}\n itemsPerPageOptions={paginationBarOptions.itemsPerPageOptions}\n alignment={paginationBarOptions.alignment}\n appearance={paginationBarOptions.appearance}\n itemLabel={paginationBarOptions.itemLabel}\n pageLabel={paginationBarOptions.pageLabel}\n hideRangeLabel={paginationBarOptions.hideRangeLabel}\n hideAllFromItemsPerPage={\n paginationBarOptions.hideAllFromItemsPerPage\n }\n ></ic-pagination-bar>\n )}\n </div>\n )}\n {sortable && (\n <div class=\"screen-reader-sort-text\" aria-live=\"polite\">\n {sortedColumnOrder !== \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