@ukic/canary-web-components 2.0.0-canary.31 → 2.0.0-canary.33
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +6 -2
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-52ab3835.js → helpers-951fb33a.js} +25 -3
- package/dist/cjs/helpers-951fb33a.js.map +1 -0
- package/dist/cjs/{helpers-093368be.js → helpers-eabe59b6.js} +17 -1
- package/dist/cjs/helpers-eabe59b6.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +8 -1
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -9
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +8 -9
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +18 -19
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +5 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +9 -4
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +238 -78
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +6 -1
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +6 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +48 -21
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +18 -7
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +2 -9
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +12 -10
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +7 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +24 -7
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +2 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +5 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +5 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +6 -2
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +5 -2
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +17 -0
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +9 -2
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +9 -9
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +2 -9
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +12 -10
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +10 -0
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +82 -2
- package/dist/collection/components/ic-data-table/ic-data-table.js +273 -80
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +249 -8
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +64 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js +8 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +8 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +66 -7
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +12 -10
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +3 -0
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +3 -10
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/utils/helpers.js +12 -1
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +16 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +22 -2
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-accordion.js +9 -1
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert2.js +3 -10
- package/dist/components/ic-alert2.js.map +1 -1
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-horizontal.js +12 -11
- package/dist/components/ic-card-horizontal.js.map +1 -1
- package/dist/components/ic-card.js +22 -21
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +5 -0
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +5 -0
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +11 -4
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-data-table.js +239 -78
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +7 -1
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +7 -1
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-empty-state2.js +3 -13
- package/dist/components/ic-empty-state2.js.map +1 -1
- package/dist/components/ic-footer.js +18 -7
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +3 -10
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-input-component-container2.js +15 -11
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-menu-item2.js +9 -1
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +1 -1
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-menu3.js +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-pagination-bar2.js +50 -10
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +6 -1
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +5 -0
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +1 -1
- package/dist/components/ic-radio-group.js +1 -0
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +6 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +6 -1
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select-with-multi.js +1 -1
- package/dist/components/ic-select2.js +6 -1
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-switch.js +8 -3
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab.js +5 -2
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +13 -7
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toggle-button-group.js +21 -1
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +12 -2
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-top-navigation.js +2 -2
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-item.js +11 -10
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +3 -10
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-56e19b01.entry.js → p-0229eb46.entry.js} +2 -2
- package/dist/core/{p-e210f51a.entry.js → p-03a99326.entry.js} +2 -2
- package/dist/core/p-03a99326.entry.js.map +1 -0
- package/dist/core/{p-8d276e8f.entry.js → p-03d83d2c.entry.js} +2 -2
- package/dist/core/{p-438abe40.entry.js → p-05f900e5.entry.js} +2 -2
- package/dist/core/p-05f900e5.entry.js.map +1 -0
- package/dist/core/{p-924548ec.entry.js → p-0c7d30f5.entry.js} +2 -2
- package/dist/core/{p-f4e57aaf.entry.js → p-124279fa.entry.js} +2 -2
- package/dist/core/p-12a5b481.entry.js +2 -0
- package/dist/core/p-12a5b481.entry.js.map +1 -0
- package/dist/core/{p-521abb6e.entry.js → p-26aeefc3.entry.js} +2 -2
- package/dist/core/p-26aeefc3.entry.js.map +1 -0
- package/dist/core/{p-de630a67.entry.js → p-29a040ef.entry.js} +2 -2
- package/dist/core/{p-2f7e6e38.entry.js → p-2b61d283.entry.js} +2 -2
- package/dist/core/{p-0a01a7ae.entry.js → p-3156304b.entry.js} +2 -2
- package/dist/core/{p-6398a726.entry.js → p-3169d95e.entry.js} +2 -2
- package/dist/core/{p-0180e00a.entry.js → p-34de5ffb.entry.js} +2 -2
- package/dist/core/{p-969cadfa.entry.js → p-382b88b2.entry.js} +2 -2
- package/dist/core/p-382b88b2.entry.js.map +1 -0
- package/dist/core/{p-c8141cac.entry.js → p-3a2523df.entry.js} +2 -2
- package/dist/core/{p-789ae7f5.entry.js → p-3b1c88ad.entry.js} +2 -2
- package/dist/core/p-3bbc3db1.entry.js +2 -0
- package/dist/core/p-3bbc3db1.entry.js.map +1 -0
- package/dist/core/p-3e7b08c7.entry.js +2 -0
- package/dist/core/p-3e7b08c7.entry.js.map +1 -0
- package/dist/core/p-4084bce2.entry.js +2 -0
- package/dist/core/p-4084bce2.entry.js.map +1 -0
- package/dist/core/p-48618a18.entry.js +2 -0
- package/dist/core/p-48618a18.entry.js.map +1 -0
- package/dist/core/p-4960c603.entry.js +2 -0
- package/dist/core/p-4960c603.entry.js.map +1 -0
- package/dist/core/{p-6fb3d61e.entry.js → p-4f118361.entry.js} +2 -2
- package/dist/core/p-5f149106.entry.js +2 -0
- package/dist/core/{p-ad1e70c9.entry.js.map → p-5f149106.entry.js.map} +1 -1
- package/dist/core/{p-f10f7f37.entry.js → p-5f71f24c.entry.js} +2 -2
- package/dist/core/p-5f71f24c.entry.js.map +1 -0
- package/dist/core/{p-74abc3bb.entry.js → p-61ca218b.entry.js} +2 -2
- package/dist/core/{p-9922cd00.entry.js → p-7565b23c.entry.js} +2 -2
- package/dist/core/p-758f03e8.entry.js +2 -0
- package/dist/core/p-758f03e8.entry.js.map +1 -0
- package/dist/core/{p-486a6957.entry.js → p-7bba4c47.entry.js} +2 -2
- package/dist/core/p-844fb240.entry.js +2 -0
- package/dist/core/p-844fb240.entry.js.map +1 -0
- package/dist/core/p-8ab58daa.js +2 -0
- package/dist/core/p-8ab58daa.js.map +1 -0
- package/dist/core/{p-2d063032.entry.js → p-8c2c86b5.entry.js} +2 -2
- package/dist/core/{p-9b70d4f8.entry.js → p-8ef60479.entry.js} +2 -2
- package/dist/core/p-938a0ccc.entry.js +2 -0
- package/dist/core/p-938a0ccc.entry.js.map +1 -0
- package/dist/core/{p-ca8ddad0.entry.js → p-95871655.entry.js} +2 -2
- package/dist/core/p-95871655.entry.js.map +1 -0
- package/dist/core/p-9adb2a49.entry.js +2 -0
- package/dist/core/p-9adb2a49.entry.js.map +1 -0
- package/dist/core/p-9c9147fa.entry.js +2 -0
- package/dist/core/p-9c9147fa.entry.js.map +1 -0
- package/dist/core/p-9f157649.entry.js +2 -0
- package/dist/core/p-9f157649.entry.js.map +1 -0
- package/dist/core/{p-418a84d4.entry.js → p-a3d903e4.entry.js} +2 -2
- package/dist/core/{p-5348af01.entry.js → p-a4088bd7.entry.js} +2 -2
- package/dist/core/{p-b53455c3.entry.js → p-a6fb5fe3.entry.js} +2 -2
- package/dist/core/{p-5e967ea4.entry.js → p-aabb04c8.entry.js} +2 -2
- package/dist/core/{p-3a59391f.entry.js → p-b02ad2c4.entry.js} +2 -2
- package/dist/core/{p-77696f7d.entry.js → p-ba353ac3.entry.js} +2 -2
- package/dist/core/p-ba353ac3.entry.js.map +1 -0
- package/dist/core/{p-ccf72538.entry.js → p-bc24c004.entry.js} +2 -2
- package/dist/core/{p-a7331e7c.entry.js → p-c0242c21.entry.js} +2 -2
- package/dist/core/{p-21d0dea6.entry.js → p-c1b268fd.entry.js} +2 -2
- package/dist/core/{p-99185fd5.entry.js → p-d062a801.entry.js} +2 -2
- package/dist/core/p-d062a801.entry.js.map +1 -0
- package/dist/core/{p-a72af8db.entry.js → p-d171c71d.entry.js} +2 -2
- package/dist/core/p-d1e0479c.entry.js +2 -0
- package/dist/core/p-d1e0479c.entry.js.map +1 -0
- package/dist/core/{p-9e5c8813.entry.js → p-d2260763.entry.js} +2 -2
- package/dist/core/p-d2260763.entry.js.map +1 -0
- package/dist/core/p-d8988d8c.entry.js +2 -0
- package/dist/core/p-d8988d8c.entry.js.map +1 -0
- package/dist/core/p-da506987.js +2 -0
- package/dist/core/p-da506987.js.map +1 -0
- package/dist/core/p-dd550e9b.entry.js +2 -0
- package/dist/core/p-dd550e9b.entry.js.map +1 -0
- package/dist/core/p-deedc7d3.entry.js +2 -0
- package/dist/core/p-deedc7d3.entry.js.map +1 -0
- package/dist/core/p-e447ed5c.entry.js +2 -0
- package/dist/core/p-e447ed5c.entry.js.map +1 -0
- package/dist/core/p-e7439c1e.entry.js +2 -0
- package/dist/core/p-e7439c1e.entry.js.map +1 -0
- package/dist/core/p-e7b913e5.entry.js +2 -0
- package/dist/core/p-e7b913e5.entry.js.map +1 -0
- package/dist/core/{p-67ae9d37.entry.js → p-e85505ec.entry.js} +2 -2
- package/dist/core/{p-673a4a62.entry.js → p-f237940d.entry.js} +2 -2
- package/dist/core/{p-648fb902.entry.js → p-f4b76daa.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-886489d5.js → helpers-031e266e.js} +17 -2
- package/dist/esm/helpers-031e266e.js.map +1 -0
- package/dist/esm/{helpers-147b5b73.js → helpers-948df101.js} +23 -3
- package/dist/esm/helpers-948df101.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +8 -1
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +3 -10
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +9 -10
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +19 -20
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +5 -1
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +5 -1
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +9 -4
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +238 -78
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +6 -1
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +6 -1
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +49 -22
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +18 -7
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +3 -10
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +13 -11
- package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +7 -1
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +1 -1
- package/dist/esm/ic-menu.entry.js +2 -2
- package/dist/esm/ic-menu.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination_4.entry.js +24 -7
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +1 -1
- package/dist/esm/ic-radio-group.entry.js +2 -1
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +5 -1
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +5 -1
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +1 -1
- package/dist/esm/ic-side-navigation.entry.js +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +6 -2
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +5 -2
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +17 -0
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +9 -2
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +2 -2
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +10 -10
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +3 -10
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +23 -0
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +12 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +141 -4
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +1 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +1 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +8 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +2 -1
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +0 -1
- package/dist/types/components.d.ts +23 -0
- package/dist/types/utils/helpers.d.ts +3 -1
- package/dist/types/utils/types.d.ts +1 -0
- package/hydrate/index.js +497 -180
- package/package.json +3 -10
- package/dist/cjs/helpers-093368be.js.map +0 -1
- package/dist/cjs/helpers-52ab3835.js.map +0 -1
- package/dist/core/p-01bc462e.entry.js +0 -2
- package/dist/core/p-01bc462e.entry.js.map +0 -1
- package/dist/core/p-0fc36045.entry.js +0 -2
- package/dist/core/p-0fc36045.entry.js.map +0 -1
- package/dist/core/p-15edd1aa.entry.js +0 -2
- package/dist/core/p-15edd1aa.entry.js.map +0 -1
- package/dist/core/p-16a48a63.entry.js +0 -2
- package/dist/core/p-16a48a63.entry.js.map +0 -1
- package/dist/core/p-1c25353c.entry.js +0 -2
- package/dist/core/p-1c25353c.entry.js.map +0 -1
- package/dist/core/p-213a9f8f.entry.js +0 -2
- package/dist/core/p-213a9f8f.entry.js.map +0 -1
- package/dist/core/p-383ba7e8.entry.js +0 -2
- package/dist/core/p-383ba7e8.entry.js.map +0 -1
- package/dist/core/p-41916ef7.entry.js +0 -2
- package/dist/core/p-41916ef7.entry.js.map +0 -1
- package/dist/core/p-438abe40.entry.js.map +0 -1
- package/dist/core/p-43a2cad3.entry.js +0 -2
- package/dist/core/p-43a2cad3.entry.js.map +0 -1
- package/dist/core/p-4aa6b8a4.entry.js +0 -2
- package/dist/core/p-4aa6b8a4.entry.js.map +0 -1
- package/dist/core/p-521abb6e.entry.js.map +0 -1
- package/dist/core/p-5334bc96.entry.js +0 -2
- package/dist/core/p-5334bc96.entry.js.map +0 -1
- package/dist/core/p-72446de0.entry.js +0 -2
- package/dist/core/p-72446de0.entry.js.map +0 -1
- package/dist/core/p-77696f7d.entry.js.map +0 -1
- package/dist/core/p-7e5da5eb.entry.js +0 -2
- package/dist/core/p-7e5da5eb.entry.js.map +0 -1
- package/dist/core/p-7eb980aa.entry.js +0 -2
- package/dist/core/p-7eb980aa.entry.js.map +0 -1
- package/dist/core/p-8128572e.js +0 -2
- package/dist/core/p-8128572e.js.map +0 -1
- package/dist/core/p-969cadfa.entry.js.map +0 -1
- package/dist/core/p-97f141a6.entry.js +0 -2
- package/dist/core/p-97f141a6.entry.js.map +0 -1
- package/dist/core/p-99185fd5.entry.js.map +0 -1
- package/dist/core/p-9e5c8813.entry.js.map +0 -1
- package/dist/core/p-ad1e70c9.entry.js +0 -2
- package/dist/core/p-af3d4eba.entry.js +0 -2
- package/dist/core/p-af3d4eba.entry.js.map +0 -1
- package/dist/core/p-b9d9273f.js +0 -2
- package/dist/core/p-b9d9273f.js.map +0 -1
- package/dist/core/p-ca8ddad0.entry.js.map +0 -1
- package/dist/core/p-cb3afdbf.entry.js +0 -2
- package/dist/core/p-cb3afdbf.entry.js.map +0 -1
- package/dist/core/p-d56593cc.entry.js +0 -2
- package/dist/core/p-d56593cc.entry.js.map +0 -1
- package/dist/core/p-db1887ee.entry.js +0 -2
- package/dist/core/p-db1887ee.entry.js.map +0 -1
- package/dist/core/p-e210f51a.entry.js.map +0 -1
- package/dist/core/p-f10f7f37.entry.js.map +0 -1
- package/dist/esm/helpers-147b5b73.js.map +0 -1
- package/dist/esm/helpers-886489d5.js.map +0 -1
- /package/dist/core/{p-56e19b01.entry.js.map → p-0229eb46.entry.js.map} +0 -0
- /package/dist/core/{p-8d276e8f.entry.js.map → p-03d83d2c.entry.js.map} +0 -0
- /package/dist/core/{p-924548ec.entry.js.map → p-0c7d30f5.entry.js.map} +0 -0
- /package/dist/core/{p-f4e57aaf.entry.js.map → p-124279fa.entry.js.map} +0 -0
- /package/dist/core/{p-de630a67.entry.js.map → p-29a040ef.entry.js.map} +0 -0
- /package/dist/core/{p-2f7e6e38.entry.js.map → p-2b61d283.entry.js.map} +0 -0
- /package/dist/core/{p-0a01a7ae.entry.js.map → p-3156304b.entry.js.map} +0 -0
- /package/dist/core/{p-6398a726.entry.js.map → p-3169d95e.entry.js.map} +0 -0
- /package/dist/core/{p-0180e00a.entry.js.map → p-34de5ffb.entry.js.map} +0 -0
- /package/dist/core/{p-c8141cac.entry.js.map → p-3a2523df.entry.js.map} +0 -0
- /package/dist/core/{p-789ae7f5.entry.js.map → p-3b1c88ad.entry.js.map} +0 -0
- /package/dist/core/{p-6fb3d61e.entry.js.map → p-4f118361.entry.js.map} +0 -0
- /package/dist/core/{p-74abc3bb.entry.js.map → p-61ca218b.entry.js.map} +0 -0
- /package/dist/core/{p-9922cd00.entry.js.map → p-7565b23c.entry.js.map} +0 -0
- /package/dist/core/{p-486a6957.entry.js.map → p-7bba4c47.entry.js.map} +0 -0
- /package/dist/core/{p-2d063032.entry.js.map → p-8c2c86b5.entry.js.map} +0 -0
- /package/dist/core/{p-9b70d4f8.entry.js.map → p-8ef60479.entry.js.map} +0 -0
- /package/dist/core/{p-418a84d4.entry.js.map → p-a3d903e4.entry.js.map} +0 -0
- /package/dist/core/{p-5348af01.entry.js.map → p-a4088bd7.entry.js.map} +0 -0
- /package/dist/core/{p-b53455c3.entry.js.map → p-a6fb5fe3.entry.js.map} +0 -0
- /package/dist/core/{p-5e967ea4.entry.js.map → p-aabb04c8.entry.js.map} +0 -0
- /package/dist/core/{p-3a59391f.entry.js.map → p-b02ad2c4.entry.js.map} +0 -0
- /package/dist/core/{p-ccf72538.entry.js.map → p-bc24c004.entry.js.map} +0 -0
- /package/dist/core/{p-a7331e7c.entry.js.map → p-c0242c21.entry.js.map} +0 -0
- /package/dist/core/{p-21d0dea6.entry.js.map → p-c1b268fd.entry.js.map} +0 -0
- /package/dist/core/{p-a72af8db.entry.js.map → p-d171c71d.entry.js.map} +0 -0
- /package/dist/core/{p-67ae9d37.entry.js.map → p-e85505ec.entry.js.map} +0 -0
- /package/dist/core/{p-673a4a62.entry.js.map → p-f237940d.entry.js.map} +0 -0
- /package/dist/core/{p-648fb902.entry.js.map → p-f4b76daa.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as e,f as t,h as n,H as i,g as o}from"./p-8455d1bb.js";import{I as a}from"./p-fd186591.js";import{j as r,b as s,v as c,i as d,a as h,d as l}from"./p-8128572e.js";const m='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;background-color:var(--ic-theme-tertiary);color:var(--ic-theme-text);--hero-heading-bottom-margin:var(--ic-space-md)}:host(.dark){background-color:var(--ic-theme-secondary)}:host(.has-background-image){background-repeat:no-repeat;background-position:right -6.25rem;background-size:auto calc(100% + 6.25rem);box-shadow:var(--ic-elevation-inset)}@media (prefers-reduced-motion){:host(.has-background-image){background-position:right -6.25rem !important}}ic-typography.heading-bottom-spacing{margin-bottom:var(--hero-heading-bottom-margin)}.section-container{display:flex;align-items:center;height:100%}.left-container{padding:var(--ic-space-xl) 0}.left-container:not(.left-container-full-width){flex-basis:50%}.left-container-full-width{width:100%}.right-container{flex-basis:50%}.interaction-container{display:flex;gap:var(--ic-space-md);margin-top:var(--ic-space-lg);flex-wrap:wrap}.secondary-container{display:flex;flex-direction:column;justify-content:center;border-left:var(--ic-space-xxxs) solid var(--ic-theme-text)}.secondary-subheading{margin-top:var(--ic-space-xxs)}:host([content-aligned="left"]) .left-container,:host([content-aligned="left"]) .interaction-container{justify-content:flex-start;text-align:left}:host([content-aligned="center"]) .left-container,:host([content-aligned="center"]) .interaction-container{justify-content:center;text-align:center}@media (min-width: 992px){.left-container-full-width{width:66.6%}}@media (min-width: 1044px){:host,.section-container{min-height:13rem}:host(.small),:host(.small) .section-container{min-height:10.813rem}.left-container:not(.left-container-full-width){flex-basis:66.6%}.left-container{min-height:9rem}.right-container{flex-basis:33.3%;margin-left:3.125rem}.secondary-container{min-height:9rem}.secondary-heading,.secondary-subheading{margin-left:3.938rem}}@media (min-width: 801px) and (max-width: 1043px){:host(.has-background-image){background-image:none !important}:host,.section-container{min-height:16rem}:host(.small),:host(.small) .section-container{min-height:15rem}:host(.secondary-heading),:host(.secondary-heading) .section-container{min-height:14rem}.left-container{min-height:10rem}.secondary-container{min-height:10rem}.secondary-heading,.secondary-subheading{margin-left:5.922rem}.right-container{margin-left:3.125rem}}@media (min-width: 641px) and (max-width: 800px){:host(.has-background-image){background-image:none !important}:host,.section-container{min-height:16rem}:host(.small),:host(.small) .section-container{min-height:15rem}:host(.secondary-heading),:host(.secondary-heading) .section-container{min-height:14rem}.left-container{min-height:10rem}.secondary-container{min-height:10rem}.secondary-heading,.secondary-subheading{margin-left:2.125rem}.right-container{margin-left:3.125rem}}@media (min-width: 481px) and (max-width: 640px){:host(.has-background-image){background-image:none !important}:host,.section-container{min-height:13rem}:host(.small),:host(.small) .section-container{min-height:10.813rem}:host(.secondary-heading),:host(.secondary-heading) .section-container{min-height:17.5rem}:host(.secondary-heading) .section-container,:host(.small) .section-container,.section-container{flex-direction:column;align-items:flex-start}.left-container{height:-moz-fit-content;height:fit-content}.secondary-container{height:-moz-fit-content;height:fit-content;border:none}.right-container{margin-bottom:2.5rem}}@media (max-width: 480px){:host(.has-background-image){background-image:none !important}:host,.section-container{min-height:12rem}:host,.right-container{margin-bottom:var(--ic-space-md)}:host(.small),:host(.small) .section-container{min-height:10.813rem}:host(.secondary-heading),:host(.secondary-heading) .section-container{min-height:16.5rem}:host(.secondary-heading) .section-container,:host(.small) .section-container,.section-container{flex-direction:column;align-items:flex-start}.left-container{height:-moz-fit-content;height:fit-content}.secondary-container{height:-moz-fit-content;height:fit-content;border:none}}';const g=class{constructor(n){e(this,n);this.hostMutationObserver=null;this.hostMutationCallback=e=>{if(e.some((({type:e,addedNodes:t,removedNodes:n})=>e==="childList"?r(t,n,"secondary"):false))){t(this)}};this.foregroundColor=s();this.rightContent=false;this.leftContentFullWidth=!this.rightContent&&this.secondaryHeading===undefined;this.scrollFactor="right -100px";this.aligned="left";this.backgroundImage=undefined;this.contentAligned="left";this.disableBackgroundParallax=false;this.heading=undefined;this.secondaryHeading=undefined;this.secondarySubheading=undefined;this.size="default";this.small=false;this.subheading=undefined}disconnectedCallback(){var e;(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentWillLoad(){this.rightContent=c(this.el,"secondary")}componentDidLoad(){!d(this.el,"heading")&&h([{prop:this.heading,propName:"heading"}],"Hero");this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}componentWillRender(){this.rightContent=c(this.el,"secondary")}themeChangeHandler(e){const t=e.detail;this.foregroundColor=t.mode}doScroll(){if(this.disableBackgroundParallax){return}const e=document.scrollingElement.scrollTop;const t=.4;const n=-100+e*t;this.scrollFactor="right "+n+"px"}render(){const{aligned:e,small:t,size:o,heading:r,subheading:s,secondaryHeading:c,secondarySubheading:d,foregroundColor:h,backgroundImage:m,scrollFactor:g}=this;let p={};if(l(m)){p={"background-image":"url("+m+")","background-position":g}}return n(i,{class:{[a.Dark]:h===a.Dark,["has-background-image"]:m!==undefined,["small"]:t||o==="small",["secondary-heading"]:!!c},style:p},n("ic-section-container",{aligned:e,fullHeight:true,class:"section-container"},n("div",{class:{["left-container"]:true,["left-container-full-width"]:this.leftContentFullWidth}},n("div",{class:"heading"},n("slot",{name:"heading"},n("ic-typography",{variant:t||o==="small"?"h2":"h1",class:{["heading-bottom-spacing"]:!t&&o!=="small"}},r))),n("div",{class:"subheading"},n("slot",{name:"subheading"},n("ic-typography",{variant:"body"},s))),n("div",{class:"interaction-container"},n("slot",{name:"interaction"}))),(l(c)||this.rightContent)&&n("div",{class:"right-container"},n("slot",{name:"secondary"},c&&n("div",{class:"secondary-container"},n("div",{class:"secondary-heading"},n("ic-typography",{variant:"h4"},c)),n("div",{class:"secondary-subheading"},n("ic-typography",{variant:"subtitle-small"},d)))))))}get el(){return o(this)}};g.style=m;export{g as ic_hero};
|
2
|
-
//# sourceMappingURL=p-16a48a63.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icHeroCss","Hero","constructor","hostRef","this","hostMutationObserver","hostMutationCallback","mutationList","some","type","addedNodes","removedNodes","checkSlotInChildMutations","forceUpdate","foregroundColor","getThemeForegroundColor","rightContent","leftContentFullWidth","secondaryHeading","undefined","scrollFactor","aligned","backgroundImage","contentAligned","disableBackgroundParallax","heading","secondarySubheading","size","small","subheading","disconnectedCallback","_a","disconnect","componentWillLoad","slotHasContent","el","componentDidLoad","isSlotUsed","onComponentRequiredPropUndefined","prop","propName","MutationObserver","observe","childList","componentWillRender","themeChangeHandler","ev","theme","detail","mode","doScroll","scrolltotop","document","scrollingElement","scrollTop","factor","y","render","style","isPropDefined","h","Host","class","IcThemeForegroundEnum","Dark","fullHeight","name","variant"],"sources":["../web-components/dist/collection/components/ic-hero/ic-hero.css?tag=ic-hero&encapsulation=shadow","../web-components/dist/collection/components/ic-hero/ic-hero.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 background-color: var(--ic-theme-tertiary);\n color: var(--ic-theme-text);\n\n --hero-heading-bottom-margin: var(--ic-space-md);\n}\n\n:host(.dark) {\n background-color: var(--ic-theme-secondary);\n}\n\n:host(.has-background-image) {\n background-repeat: no-repeat;\n background-position: right -6.25rem;\n background-size: auto calc(100% + 6.25rem);\n box-shadow: var(--ic-elevation-inset);\n}\n\n@media (prefers-reduced-motion) {\n :host(.has-background-image) {\n background-position: right -6.25rem !important;\n }\n}\n\nic-typography.heading-bottom-spacing {\n margin-bottom: var(--hero-heading-bottom-margin);\n}\n\n.section-container {\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.left-container {\n padding: var(--ic-space-xl) 0;\n}\n\n.left-container:not(.left-container-full-width) {\n flex-basis: 50%;\n}\n\n.left-container-full-width {\n width: 100%;\n}\n\n.right-container {\n flex-basis: 50%;\n}\n\n.interaction-container {\n display: flex;\n gap: var(--ic-space-md);\n margin-top: var(--ic-space-lg);\n flex-wrap: wrap;\n}\n\n.secondary-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n border-left: var(--ic-space-xxxs) solid var(--ic-theme-text);\n}\n\n.secondary-subheading {\n margin-top: var(--ic-space-xxs);\n}\n\n:host([content-aligned=\"left\"]) .left-container,\n:host([content-aligned=\"left\"]) .interaction-container {\n justify-content: flex-start;\n text-align: left;\n}\n\n:host([content-aligned=\"center\"]) .left-container,\n:host([content-aligned=\"center\"]) .interaction-container {\n justify-content: center;\n text-align: center;\n}\n\n@media (min-width: 992px) {\n .left-container-full-width {\n width: 66.6%;\n }\n}\n\n@media (min-width: 1044px) {\n :host,\n .section-container {\n min-height: 13rem;\n }\n\n :host(.small),\n :host(.small) .section-container {\n min-height: 10.813rem;\n }\n\n .left-container:not(.left-container-full-width) {\n flex-basis: 66.6%;\n }\n\n .left-container {\n min-height: 9rem;\n }\n\n .right-container {\n flex-basis: 33.3%;\n margin-left: 3.125rem;\n }\n\n .secondary-container {\n min-height: 9rem;\n }\n\n .secondary-heading,\n .secondary-subheading {\n margin-left: 3.938rem;\n }\n}\n\n@media (min-width: 801px) and (max-width: 1043px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host,\n .section-container {\n min-height: 16rem;\n }\n\n :host(.small),\n :host(.small) .section-container {\n min-height: 15rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 14rem;\n }\n\n .left-container {\n min-height: 10rem;\n }\n\n .secondary-container {\n min-height: 10rem;\n }\n\n .secondary-heading,\n .secondary-subheading {\n margin-left: 5.922rem;\n }\n\n .right-container {\n margin-left: 3.125rem;\n }\n}\n\n@media (min-width: 641px) and (max-width: 800px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host,\n .section-container {\n min-height: 16rem;\n }\n\n :host(.small),\n :host(.small) .section-container {\n min-height: 15rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 14rem;\n }\n\n .left-container {\n min-height: 10rem;\n }\n\n .secondary-container {\n min-height: 10rem;\n }\n\n .secondary-heading,\n .secondary-subheading {\n margin-left: 2.125rem;\n }\n\n .right-container {\n margin-left: 3.125rem;\n }\n}\n\n@media (min-width: 481px) and (max-width: 640px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host,\n .section-container {\n min-height: 13rem;\n }\n\n :host(.small),\n :host(.small) .section-container {\n min-height: 10.813rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 17.5rem;\n }\n\n :host(.secondary-heading) .section-container,\n :host(.small) .section-container,\n .section-container {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .left-container {\n height: -moz-fit-content;\n height: fit-content;\n }\n\n .secondary-container {\n height: -moz-fit-content;\n height: fit-content;\n border: none;\n }\n\n .right-container {\n margin-bottom: 2.5rem;\n }\n}\n\n@media (max-width: 480px) {\n :host(.has-background-image) {\n background-image: none !important;\n }\n\n :host,\n .section-container {\n min-height: 12rem;\n }\n\n :host,\n .right-container {\n margin-bottom: var(--ic-space-md);\n }\n\n :host(.small),\n :host(.small) .section-container {\n min-height: 10.813rem;\n }\n\n :host(.secondary-heading),\n :host(.secondary-heading) .section-container {\n min-height: 16.5rem;\n }\n\n :host(.secondary-heading) .section-container,\n :host(.small) .section-container,\n .section-container {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .left-container {\n height: -moz-fit-content;\n height: fit-content;\n }\n\n .secondary-container {\n height: -moz-fit-content;\n height: fit-content;\n border: none;\n }\n}\n","import { Host, h, forceUpdate, } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nimport { slotHasContent, getThemeForegroundColor, onComponentRequiredPropUndefined, isPropDefined, isSlotUsed, checkSlotInChildMutations, } from \"../../utils/helpers\";\n/**\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot interaction - Content will be rendered in the interaction area, adjacent to the title area.\n * @slot secondary - Content will be rendered in the secondary content area.\n */\nexport class Hero {\n constructor() {\n this.hostMutationObserver = null;\n this.hostMutationCallback = (mutationList) => {\n if (mutationList.some(({ type, addedNodes, removedNodes }) => type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, \"secondary\")\n : false)) {\n forceUpdate(this);\n }\n };\n this.foregroundColor = getThemeForegroundColor();\n this.rightContent = false;\n this.leftContentFullWidth = !this.rightContent && this.secondaryHeading === undefined;\n this.scrollFactor = \"right -100px\";\n this.aligned = \"left\";\n this.backgroundImage = undefined;\n this.contentAligned = \"left\";\n this.disableBackgroundParallax = false;\n this.heading = undefined;\n this.secondaryHeading = undefined;\n this.secondarySubheading = undefined;\n this.size = \"default\";\n this.small = false;\n this.subheading = undefined;\n }\n disconnectedCallback() {\n var _a;\n (_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n componentWillLoad() {\n this.rightContent = slotHasContent(this.el, \"secondary\");\n }\n componentDidLoad() {\n !isSlotUsed(this.el, \"heading\") &&\n onComponentRequiredPropUndefined([{ prop: this.heading, propName: \"heading\" }], \"Hero\");\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n componentWillRender() {\n this.rightContent = slotHasContent(this.el, \"secondary\");\n }\n themeChangeHandler(ev) {\n const theme = ev.detail;\n this.foregroundColor = theme.mode;\n }\n doScroll() {\n if (this.disableBackgroundParallax) {\n return;\n }\n const scrolltotop = document.scrollingElement.scrollTop;\n const factor = 0.4;\n const y = -100 + scrolltotop * factor;\n this.scrollFactor = \"right \" + y + \"px\";\n }\n render() {\n const { aligned, small, size, heading, subheading, secondaryHeading, secondarySubheading, foregroundColor, backgroundImage, scrollFactor, } = this;\n let style = {};\n if (isPropDefined(backgroundImage)) {\n style = {\n \"background-image\": \"url(\" + backgroundImage + \")\",\n \"background-position\": scrollFactor,\n };\n }\n return (h(Host, { class: {\n [IcThemeForegroundEnum.Dark]: foregroundColor === IcThemeForegroundEnum.Dark,\n [\"has-background-image\"]: backgroundImage !== undefined,\n [\"small\"]: small || size === \"small\",\n [\"secondary-heading\"]: !!secondaryHeading,\n }, style: style }, h(\"ic-section-container\", { aligned: aligned, fullHeight: true, class: \"section-container\" }, h(\"div\", { class: {\n [\"left-container\"]: true,\n [\"left-container-full-width\"]: this.leftContentFullWidth,\n } }, h(\"div\", { class: \"heading\" }, h(\"slot\", { name: \"heading\" }, h(\"ic-typography\", { variant: small || size === \"small\" ? \"h2\" : \"h1\", class: {\n [\"heading-bottom-spacing\"]: !small && size !== \"small\",\n } }, heading))), h(\"div\", { class: \"subheading\" }, h(\"slot\", { name: \"subheading\" }, h(\"ic-typography\", { variant: \"body\" }, subheading))), h(\"div\", { class: \"interaction-container\" }, h(\"slot\", { name: \"interaction\" }))), (isPropDefined(secondaryHeading) || this.rightContent) && (h(\"div\", { class: \"right-container\" }, h(\"slot\", { name: \"secondary\" }, secondaryHeading && (h(\"div\", { class: \"secondary-container\" }, h(\"div\", { class: \"secondary-heading\" }, h(\"ic-typography\", { variant: \"h4\" }, secondaryHeading)), h(\"div\", { class: \"secondary-subheading\" }, h(\"ic-typography\", { variant: \"subtitle-small\" }, secondarySubheading))))))))));\n }\n static get is() { return \"ic-hero\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-hero.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-hero.css\"]\n };\n }\n static get properties() {\n return {\n \"aligned\": {\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 hero.\"\n },\n \"attribute\": \"aligned\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"left\\\"\"\n },\n \"backgroundImage\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The optional background image.\"\n },\n \"attribute\": \"background-image\",\n \"reflect\": false\n },\n \"contentAligned\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcHeroContentAlignments\",\n \"resolved\": \"\\\"center\\\" | \\\"left\\\"\",\n \"references\": {\n \"IcHeroContentAlignments\": {\n \"location\": \"import\",\n \"path\": \"./ic-hero.types\",\n \"id\": \"src/components/ic-hero/ic-hero.types.tsx::IcHeroContentAlignments\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The alignment of the hero content.\"\n },\n \"attribute\": \"content-aligned\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"left\\\"\"\n },\n \"disableBackgroundParallax\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the background image (if set) will not scroll using a parallax effect.\"\n },\n \"attribute\": \"disable-background-parallax\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"heading\": {\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 heading of the hero.\"\n },\n \"attribute\": \"heading\",\n \"reflect\": false\n },\n \"secondaryHeading\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The optional secondary heading, replaced by slotted right content.\"\n },\n \"attribute\": \"secondary-heading\",\n \"reflect\": false\n },\n \"secondarySubheading\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The optional secondary subheading, replaced by slotted right content.\"\n },\n \"attribute\": \"secondary-subheading\",\n \"reflect\": false\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizesNoLarge\",\n \"resolved\": \"\\\"default\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizesNoLarge\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizesNoLarge\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the hero component.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"small\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This prop should not be used anymore. Set prop `size` to \\\"small\\\" instead.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"small\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"subheading\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The description for the hero.\"\n },\n \"attribute\": \"subheading\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"foregroundColor\": {},\n \"rightContent\": {},\n \"leftContentFullWidth\": {},\n \"scrollFactor\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"themeChange\",\n \"method\": \"themeChangeHandler\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"scroll\",\n \"method\": \"doScroll\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": true\n }];\n }\n}\n//# sourceMappingURL=ic-hero.js.map\n"],"mappings":"2KAAA,MAAMA,EAAY,mzM,MCSLC,EAAI,MACb,WAAAC,CAAAC,G,UACIC,KAAKC,qBAAuB,KAC5BD,KAAKE,qBAAwBC,IACzB,GAAIA,EAAaC,MAAK,EAAGC,OAAMC,aAAYC,kBAAmBF,IAAS,YACjEG,EAA0BF,EAAYC,EAAc,aACpD,QAAQ,CACVE,EAAYT,K,GAGpBA,KAAKU,gBAAkBC,IACvBX,KAAKY,aAAe,MACpBZ,KAAKa,sBAAwBb,KAAKY,cAAgBZ,KAAKc,mBAAqBC,UAC5Ef,KAAKgB,aAAe,eACpBhB,KAAKiB,QAAU,OACfjB,KAAKkB,gBAAkBH,UACvBf,KAAKmB,eAAiB,OACtBnB,KAAKoB,0BAA4B,MACjCpB,KAAKqB,QAAUN,UACff,KAAKc,iBAAmBC,UACxBf,KAAKsB,oBAAsBP,UAC3Bf,KAAKuB,KAAO,UACZvB,KAAKwB,MAAQ,MACbxB,KAAKyB,WAAaV,S,CAEtB,oBAAAW,GACI,IAAIC,GACHA,EAAK3B,KAAKC,wBAA0B,MAAQ0B,SAAY,OAAS,EAAIA,EAAGC,Y,CAE7E,iBAAAC,GACI7B,KAAKY,aAAekB,EAAe9B,KAAK+B,GAAI,Y,CAEhD,gBAAAC,IACKC,EAAWjC,KAAK+B,GAAI,YACjBG,EAAiC,CAAC,CAAEC,KAAMnC,KAAKqB,QAASe,SAAU,YAAc,QACpFpC,KAAKC,qBAAuB,IAAIoC,iBAAiBrC,KAAKE,sBACtDF,KAAKC,qBAAqBqC,QAAQtC,KAAK+B,GAAI,CACvCQ,UAAW,M,CAGnB,mBAAAC,GACIxC,KAAKY,aAAekB,EAAe9B,KAAK+B,GAAI,Y,CAEhD,kBAAAU,CAAmBC,GACf,MA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AAQ,CAAEM,KAAM,mBAAqBP,EAAczC,IAAqBd,KAAKY,eAAkB4C,EAAE,MAAO,CAAEE,MAAO,mBAAqBF,EAAE,OAAQ,CAAEM,KAAM,aAAehD,GAAqB0C,EAAE,MAAO,CAAEE,MAAO,uBAAyBF,EAAE,MAAO,CAAEE,MAAO,qBAAuBF,EAAE,gBAAiB,CAAEO,QAAS,MAAQjD,IAAoB0C,EAAE,MAAO,CAAEE,MAAO,wBAA0BF,EAAE,gBAAiB,CAAEO,QAAS,kBAAoBzC,Q"}
|
@@ -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=>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")},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))},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-1c25353c.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","notDefaultDensity","density","getCellContent","cell","dataType","undefined","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","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","target","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) => 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 href={cellValue(\"href\")}>\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 {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 return 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\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 !== \"unsorted\" && sortedColumn\n ? `${sortedColumn} sorted ${sortedColumnOrder}`\n : \"table unsorted\"}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"iqBAAA,MAAMA,EAAiB,qzM,MCuDVC,EAAS,M,yHACZC,KAAAC,0BAA4B,CAClCC,MAAO,GACPC,QAAS,EACTC,SAAU,KAGJJ,KAAAK,4BAA8B,CACpCH,MAAO,EACPC,QAAS,GACTC,SAAU,IAGJJ,KAAAM,WAAa,CACnBC,SAAUC,EACVC,UAAWC,EACXC,WAAYC,GAGNZ,KAAAa,sBAAwB,KAGxBb,KAAAc,eAAiC,KACjCd,KAAAe,iBAAmB,YACnBf,KAAAgB,oBAAsB,GAAGhB,KAAKe,wBAC9Bf,KAAAiB,eAAiB,UACjBjB,KAAAkB,QAAU,MAAMlB,KAAKiB,iBACrBjB,KAAAmB,iBAAmB,YACnBnB,KA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BAC1CvK,UAAWsL,EAAqBtL,UAChCQ,WAAY8K,EAAqB9K,WACjCmK,UAAWW,EAAqBX,UAChCC,UAAWU,EAAqBV,UAChCC,eAAgBS,EAAqBT,eACrCC,wBACEQ,EAAqBR,2BAM9B1E,GACCtF,EAAA,OAAKG,MAAM,0BAAyB,YAAW,UAC5CwF,IAAsB,YAAcD,EACjC,GAAGA,YAAuBC,IAC1B,mB"}
|
@@ -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,i as a,o as l}from"./p-b9d9273f.js";const n=`<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 h=':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 d=0;const m=class{constructor(s){t(this,s);this.icTreeItemSelected=e(this,"icTreeItemSelected",7);this.treeItemId=`ic-tree-item-${d++}`;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}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()}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);!a(this.el,"label")&&l([{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(a(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:l}=this;const h=this.href&&!this.disabled?"a":"div";const d=h=="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(h,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"]:l},"aria-hidden":"true",innerHTML:n}),a(this.el,"icon")&&s("div",{class:"icon-container"},s("slot",{name:"icon"})),s("ic-typography",{class:"tree-item-label"},a(this.el,"label")?s("slot",{name:"label"}):i)),l&&s("div",{"aria-hidden":`${!l}`},s("slot",null)))}get el(){return o(this)}static get watchers(){return{selected:["watchSelectedHandler"]}}};m.style=h;export{m as ic_tree_item};
|
2
|
-
//# sourceMappingURL=p-213a9f8f.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","icTreeItemSelected","emit","disconnectedCallback","_a","disconnect","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","disabled","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} 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\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 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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K,gBAEXH,EAACT,EAASa,OAAAC,OAAA,CACRH,MAAO,CACL,oBAAqB,MAEvBI,SAAUnB,GAAY,EAAI,EAC1BoB,QAASpH,KAAKK,sBACdgH,IAAMtG,GAAQf,KAAK0F,gBAAkB3E,EAAG,gBACzBiF,EAAW,OAAS,QAAO,YAChC,UACNM,EAAK,CACTgB,QAAS,IAAMtH,KAAK2D,qBAAqB,MACzC4D,OAAQ,IAAMvH,KAAK2D,qBAAqB,SAEvC3D,KAAKM,UACJuG,EAAA,QACEE,MAAO,CACL,CAAC,kBAAmB,KACpB,CAAC,sBAAuBxG,GACzB,cACW,OACZiH,UAAWC,IAGdhD,EAAWzE,KAAKe,GAAI,SACnB8F,EAAA,OAAKE,MAAM,kBACTF,EAAA,QAAMG,KAAK,UAGfH,EAAA,iBAAeE,MAAM,mBAClBtC,EAAWzE,KAAKe,GAAI,SAAW8F,EAAA,QAAMG,KAAK,UAAapC,IAI7DrE,GACCsG,EAAA,qBAAkB,IAAItG,KACpBsG,EAAA,c"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as t,c as e,h as i,H as o,g as a}from"./p-8455d1bb.js";import{I as s}from"./p-fd186591.js";import{k as r,i as n}from"./p-8128572e.js";const c='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{--indicator-initial-color:rgba(23 89 188 / 0%);--indicator-color:var(--ic-action-default);--focus-indicator:var(--ic-border-focus);--label-color:var(--ic-color-primary-text);--background-color-hover:var(--ic-action-default-bg-hover);--background-color-active:var(--ic-action-default-bg-active);display:flex;align-items:center;border-radius:0;color:var(--label-color);height:2.5rem;padding:0 var(--ic-space-md);cursor:pointer;position:relative;border-bottom:var(--ic-space-xxs) solid var(--indicator-initial-color);gap:var(--ic-space-xs);transition:all var(--ic-easing-transition-fast)}:host(:focus){box-shadow:var(--focus-indicator);border-radius:var(--ic-border-radius)}:host(:focus-visible){outline:var(--ic-hc-focus-outline)}:host(:hover){background-color:var(--background-color-hover)}:host(:active){background-color:var(--background-color-active)}:host(.ic-tab-light){--indicator-initial-color:rgb(255 255 255 / 0%);--indicator-color:rgb(255 255 255 / 100%);--focus-indicator:var(--ic-border-focus);--label-color:white;--background-color-hover:var(--ic-action-dark-bg-hover);--background-color-active:var(--ic-action-dark-bg-active)}:host(.selected){border-bottom:var(--ic-space-xxs) solid var(--indicator-color)}:host(.disabled){pointer-events:none;color:var(--ic-architectural-300)}@media (prefers-reduced-motion: no-preference){:host(.selected.with-transition){transition:all var(--ic-easing-transition-slow),\n border-color var(--ic-transition-duration-slow)}}.ic-tab-label{pointer-events:none;text-wrap:nowrap}::slotted(svg){fill:currentcolor}@media (forced-colors: active){:host{border-bottom:var(--ic-space-xxs) solid canvas}:host(.disabled){color:GrayText}}';const l=class{constructor(i){t(this,i);this.tabClick=e(this,"tabClick",7);this.tabCreated=e(this,"tabCreated",7);this.tabEnabled=e(this,"tabEnabled",7);this.tabFocus=e(this,"tabFocus",7);this.tabRemoved=e(this,"tabRemoved",7);this.focusFromClick=false;this.isInitialRender=true;this.handleClick=()=>{this.tabClick.emit({tabId:this.tabId,contextId:this.contextId,position:this.tabPosition});if(this.focusFromClick){this.tabFocus.emit({tabId:this.tabId,contextId:this.contextId,position:this.tabPosition});this.focusFromClick=false}};this.handleFocus=()=>{if(!this.focusFromClick){this.focusTabId=this.tabId;this.tabFocus.emit({tabId:this.tabId,contextId:this.contextId,position:this.tabPosition})}};this.handleMouseDown=()=>{this.focusFromClick=true};this.appearance="dark";this.contextId="default";this.disabled=false;this.selected=false;this.tabId=undefined;this.tabPosition=undefined}disabledWatchHandler(){this.tabEnabled.emit()}connectedCallback(){this.tabCreated.emit(this.el)}disconnectedCallback(){var t;(t=document.querySelector(`ic-tab-context[context-id=${this.contextId}]`))===null||t===void 0?void 0:t.tabRemovedHandler(!!this.focusTabId)}componentWillLoad(){r(this.disabled,this.el)}componentDidUpdate(){this.isInitialRender=false}async setFocus(){if(this.el){this.el.focus()}}render(){const{disabled:t,selected:e,appearance:a,isInitialRender:r,handleClick:c,handleFocus:l,handleMouseDown:d}=this;return i(o,{class:{"with-transition":!r,"ic-tab-light":a===s.Light,selected:e,disabled:t},role:"tab","aria-selected":`${e}`,onClick:c,onFocus:l,onMouseDown:d,"aria-disabled":`${t}`,tabindex:e?0:-1},n(this.el,"icon")&&i("slot",{name:"icon"}),i("ic-typography",{class:"ic-tab-label",variant:"label"},i("span",null,i("slot",null))),n(this.el,"badge")&&i("slot",{name:"badge"}))}get el(){return a(this)}static get watchers(){return{disabled:["disabledWatchHandler"]}}};l.style=c;export{l as ic_tab};
|
2
|
-
//# sourceMappingURL=p-383ba7e8.entry.js.map
|