@ukic/canary-web-components 3.0.0-canary.4 → 3.0.0-canary.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-36cdc6cb.js → helpers-55099147.js} +5 -4
- package/dist/cjs/helpers-55099147.js.map +1 -0
- package/dist/cjs/{helpers-a67ad3a4.js → helpers-c80f6ce4.js} +13 -11
- package/dist/cjs/helpers-c80f6ce4.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +3 -3
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +8 -5
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +2 -2
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +43 -20
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +11 -13
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +3 -3
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +7 -6
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +7 -7
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +22 -19
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +9 -9
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +9 -5
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +2 -2
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +5 -5
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +2 -2
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +12 -5
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +11 -23
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +21 -25
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +3 -8
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +10 -9
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +7 -3
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +4 -2
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +29 -4
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -4
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +5 -3
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +31 -48
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +6 -6
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +4 -4
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +11 -7
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +5 -4
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +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 +2 -2
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +3 -19
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +28 -4
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +9 -6
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +6 -4
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +2 -2
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +10 -10
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +1 -1
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +60 -32
- package/dist/collection/components/ic-data-table/ic-data-table.js +52 -37
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +43 -0
- 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 +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +9 -4
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +5 -5
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.css +58 -6
- package/dist/collection/components/ic-date-input/ic-date-input.js +32 -8
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.css +16 -15
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +31 -3
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +1 -5
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +4 -4
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.css +4 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +2 -2
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +2 -2
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/utils/helpers.js +12 -10
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js +5 -4
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +12 -10
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-alert.js +2 -2
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +9 -5
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +1 -1
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +43 -19
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +1 -1
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +12 -13
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-horizontal.js +2 -2
- package/dist/components/ic-card-horizontal.js.map +1 -1
- package/dist/components/ic-card-vertical.js +8 -7
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-data-table-title-bar.js +6 -6
- package/dist/components/ic-data-table-title-bar.js.map +1 -1
- package/dist/components/ic-data-table.js +22 -18
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +10 -9
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +9 -4
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-dialog.js +1 -1
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +2 -2
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-hero.js +1 -1
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +13 -4
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +9 -22
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +12 -17
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +8 -8
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +4 -9
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-menu-item2.js +11 -10
- 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-navigation-button.js +7 -2
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +4 -1
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +30 -4
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +6 -4
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +5 -2
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +3 -3
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination2.js +4 -22
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +5 -5
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-search-bar.js +4 -4
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select2.js +11 -12
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +11 -7
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-status-tag.js +5 -3
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-switch.js +1 -1
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-group.js +2 -18
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-text-field2.js +18 -14
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toggle-button-group.js +35 -6
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +11 -7
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-top-navigation.js +7 -4
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-item.js +1 -1
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/components/ic-typography2.js +1 -1
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.css +844 -88
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-7c663d4a.entry.js → p-006afa83.entry.js} +2 -2
- package/dist/core/{p-5eecd3fc.entry.js → p-0687cc81.entry.js} +2 -2
- package/dist/core/{p-8bec76d1.entry.js → p-10afa533.entry.js} +2 -2
- package/dist/core/p-10afa533.entry.js.map +1 -0
- package/dist/core/p-12b1db1b.entry.js +2 -0
- package/dist/core/p-12b1db1b.entry.js.map +1 -0
- package/dist/core/p-160de322.entry.js +2 -0
- package/dist/core/p-160de322.entry.js.map +1 -0
- package/dist/core/p-199ce579.entry.js +2 -0
- package/dist/core/p-199ce579.entry.js.map +1 -0
- package/dist/core/{p-e6a330e4.js → p-25597c03.js} +2 -2
- package/dist/core/p-25597c03.js.map +1 -0
- package/dist/core/{p-3b0fae40.entry.js → p-29623ad5.entry.js} +2 -2
- package/dist/core/p-2d6fffa4.entry.js +2 -0
- package/dist/core/p-2d6fffa4.entry.js.map +1 -0
- package/dist/core/{p-fbb5c8f2.entry.js → p-3106c4fd.entry.js} +2 -2
- package/dist/core/p-31082e64.entry.js +2 -0
- package/dist/core/p-31082e64.entry.js.map +1 -0
- package/dist/core/p-3b3a8108.entry.js +2 -0
- package/dist/core/p-3b3a8108.entry.js.map +1 -0
- package/dist/core/p-3bbfefcc.entry.js +2 -0
- package/dist/core/p-3bbfefcc.entry.js.map +1 -0
- package/dist/core/p-3d478ba9.entry.js +2 -0
- package/dist/core/p-3d478ba9.entry.js.map +1 -0
- package/dist/core/{p-82aa8136.entry.js → p-40f94113.entry.js} +2 -2
- package/dist/core/p-40f94113.entry.js.map +1 -0
- package/dist/core/p-43891495.entry.js +2 -0
- package/dist/core/p-43891495.entry.js.map +1 -0
- package/dist/core/p-47ae7d10.entry.js +2 -0
- package/dist/core/p-47ae7d10.entry.js.map +1 -0
- package/dist/core/p-59d48811.entry.js +2 -0
- package/dist/core/p-59d48811.entry.js.map +1 -0
- package/dist/core/p-690d0bbd.entry.js +2 -0
- package/dist/core/p-690d0bbd.entry.js.map +1 -0
- package/dist/core/p-6f7cf143.entry.js +2 -0
- package/dist/core/p-6f7cf143.entry.js.map +1 -0
- package/dist/core/{p-606ad46f.entry.js → p-6f92ee7a.entry.js} +2 -2
- package/dist/core/p-70543f44.entry.js +2 -0
- package/dist/core/p-70543f44.entry.js.map +1 -0
- package/dist/core/p-7a1f1e0d.entry.js +2 -0
- package/dist/core/p-7a1f1e0d.entry.js.map +1 -0
- package/dist/core/{p-8ffdd236.entry.js → p-7c843bc8.entry.js} +2 -2
- package/dist/core/p-7c843bc8.entry.js.map +1 -0
- package/dist/core/p-7e358f32.entry.js +2 -0
- package/dist/core/p-7e358f32.entry.js.map +1 -0
- package/dist/core/{p-a22d335b.entry.js → p-81da002e.entry.js} +2 -2
- package/dist/core/p-83c09d8d.entry.js +2 -0
- package/dist/core/p-83c09d8d.entry.js.map +1 -0
- package/dist/core/p-8d933976.entry.js +2 -0
- package/dist/core/p-8d933976.entry.js.map +1 -0
- package/dist/core/{p-878df16f.entry.js → p-91cf88d6.entry.js} +2 -2
- package/dist/core/{p-42f1b9cc.entry.js → p-9235425c.entry.js} +2 -2
- package/dist/core/p-92f443aa.entry.js +2 -0
- package/dist/core/p-92f443aa.entry.js.map +1 -0
- package/dist/core/p-982deb94.entry.js +2 -0
- package/dist/core/p-982deb94.entry.js.map +1 -0
- package/dist/core/{p-9a62c3b8.entry.js → p-99c76218.entry.js} +2 -2
- package/dist/core/p-9ae77f11.entry.js +2 -0
- package/dist/core/p-9ae77f11.entry.js.map +1 -0
- package/dist/core/{p-7aa6b76e.entry.js → p-9da6df82.entry.js} +2 -2
- package/dist/core/{p-26613dbd.entry.js → p-a0c3f221.entry.js} +2 -2
- package/dist/core/p-a0c3f221.entry.js.map +1 -0
- package/dist/core/{p-00ff3a06.entry.js → p-a67c358a.entry.js} +2 -2
- package/dist/core/p-a67c358a.entry.js.map +1 -0
- package/dist/core/p-acb0eddb.entry.js +2 -0
- package/dist/core/p-acb0eddb.entry.js.map +1 -0
- package/dist/core/{p-043cf5de.js → p-b2389339.js} +2 -2
- package/dist/core/p-b2389339.js.map +1 -0
- package/dist/core/p-b4dd4835.entry.js +2 -0
- package/dist/core/p-b4dd4835.entry.js.map +1 -0
- package/dist/core/p-b4eb1c6d.entry.js +2 -0
- package/dist/core/p-b4eb1c6d.entry.js.map +1 -0
- package/dist/core/p-bc7d33e1.entry.js +2 -0
- package/dist/core/p-bc7d33e1.entry.js.map +1 -0
- package/dist/core/{p-80b296cd.entry.js → p-bd5aada7.entry.js} +2 -2
- package/dist/core/p-bdce46ca.entry.js +2 -0
- package/dist/core/p-bdce46ca.entry.js.map +1 -0
- package/dist/core/{p-24d03bbd.entry.js → p-be7bc371.entry.js} +2 -2
- package/dist/core/{p-2f4bec06.entry.js → p-c12f3582.entry.js} +2 -2
- package/dist/core/p-c4dc8fdf.entry.js +2 -0
- package/dist/core/p-c4dc8fdf.entry.js.map +1 -0
- package/dist/core/p-c5ea1e19.entry.js +2 -0
- package/dist/core/p-c5ea1e19.entry.js.map +1 -0
- package/dist/core/{p-53228014.entry.js → p-c894bc8f.entry.js} +2 -2
- package/dist/core/p-dd3a9cb1.entry.js +2 -0
- package/dist/core/p-dd3a9cb1.entry.js.map +1 -0
- package/dist/core/{p-e7b6d9c5.entry.js → p-df05b999.entry.js} +2 -2
- package/dist/core/{p-1d24a02a.entry.js → p-e4b9221b.entry.js} +2 -2
- package/dist/core/{p-1d24a02a.entry.js.map → p-e4b9221b.entry.js.map} +1 -1
- package/dist/core/{p-b3d93bc1.entry.js → p-e532fa26.entry.js} +2 -2
- package/dist/core/p-e89e5ec8.entry.js +2 -0
- package/dist/core/p-e89e5ec8.entry.js.map +1 -0
- package/dist/core/p-f08723ca.entry.js +2 -0
- package/dist/core/p-f08723ca.entry.js.map +1 -0
- package/dist/core/{p-72210cd4.entry.js → p-f4414801.entry.js} +2 -2
- package/dist/core/p-f4414801.entry.js.map +1 -0
- package/dist/core/p-f5d1e747.entry.js +2 -0
- package/dist/core/p-f5d1e747.entry.js.map +1 -0
- package/dist/core/{p-cc22644d.entry.js → p-fca3589b.entry.js} +2 -2
- package/dist/core/{p-7c6710f8.entry.js → p-ffe923ae.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-c326255f.js → helpers-d3091c8c.js} +6 -5
- package/dist/esm/helpers-d3091c8c.js.map +1 -0
- package/dist/esm/{helpers-1e2516ae.js → helpers-d399f9c8.js} +13 -11
- package/dist/esm/helpers-d399f9c8.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +3 -3
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +9 -6
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +2 -2
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +43 -20
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +2 -2
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +11 -13
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +3 -3
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +7 -6
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +7 -7
- package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -1
- package/dist/esm/ic-data-table.entry.js +22 -19
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +9 -9
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +9 -5
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +2 -2
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +5 -5
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +3 -3
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +2 -2
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +12 -5
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +11 -23
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +21 -25
- package/dist/esm/ic-input-label_2.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +3 -8
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +10 -9
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +7 -3
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +4 -2
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +29 -4
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +5 -4
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +5 -3
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +31 -48
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +6 -6
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +4 -4
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +11 -7
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +5 -4
- package/dist/esm/ic-status-tag.entry.js.map +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 +2 -2
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +3 -19
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +28 -4
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +9 -6
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +6 -4
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +2 -2
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +1 -1
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +2 -2
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +6 -5
- package/dist/types/components/ic-data-table/story-data.d.ts +25 -0
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +5 -1
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +5 -1
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +1 -1
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +1 -2
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +1 -2
- package/dist/types/components.d.ts +31 -17
- package/hydrate/index.js +362 -289
- package/package.json +3 -3
- package/dist/cjs/helpers-36cdc6cb.js.map +0 -1
- package/dist/cjs/helpers-a67ad3a4.js.map +0 -1
- package/dist/core/p-00ff3a06.entry.js.map +0 -1
- package/dist/core/p-036d251b.entry.js +0 -2
- package/dist/core/p-036d251b.entry.js.map +0 -1
- package/dist/core/p-043cf5de.js.map +0 -1
- package/dist/core/p-13d2db9b.entry.js +0 -2
- package/dist/core/p-13d2db9b.entry.js.map +0 -1
- package/dist/core/p-235b461f.entry.js +0 -2
- package/dist/core/p-235b461f.entry.js.map +0 -1
- package/dist/core/p-26613dbd.entry.js.map +0 -1
- package/dist/core/p-2873f871.entry.js +0 -2
- package/dist/core/p-2873f871.entry.js.map +0 -1
- package/dist/core/p-2a3bd99a.entry.js +0 -2
- package/dist/core/p-2a3bd99a.entry.js.map +0 -1
- package/dist/core/p-350074d4.entry.js +0 -2
- package/dist/core/p-350074d4.entry.js.map +0 -1
- package/dist/core/p-39101ffc.entry.js +0 -2
- package/dist/core/p-39101ffc.entry.js.map +0 -1
- package/dist/core/p-50dd2744.entry.js +0 -2
- package/dist/core/p-50dd2744.entry.js.map +0 -1
- package/dist/core/p-574355c9.entry.js +0 -2
- package/dist/core/p-574355c9.entry.js.map +0 -1
- package/dist/core/p-5af1273f.entry.js +0 -2
- package/dist/core/p-5af1273f.entry.js.map +0 -1
- package/dist/core/p-620b758c.entry.js +0 -2
- package/dist/core/p-620b758c.entry.js.map +0 -1
- package/dist/core/p-637035c3.entry.js +0 -2
- package/dist/core/p-637035c3.entry.js.map +0 -1
- package/dist/core/p-6727166b.entry.js +0 -2
- package/dist/core/p-6727166b.entry.js.map +0 -1
- package/dist/core/p-6dc00a8f.entry.js +0 -2
- package/dist/core/p-6dc00a8f.entry.js.map +0 -1
- package/dist/core/p-6dffaac0.entry.js +0 -2
- package/dist/core/p-6dffaac0.entry.js.map +0 -1
- package/dist/core/p-72210cd4.entry.js.map +0 -1
- package/dist/core/p-7b90f0ae.entry.js +0 -2
- package/dist/core/p-7b90f0ae.entry.js.map +0 -1
- package/dist/core/p-7c3c080a.entry.js +0 -2
- package/dist/core/p-7c3c080a.entry.js.map +0 -1
- package/dist/core/p-80dee118.entry.js +0 -2
- package/dist/core/p-80dee118.entry.js.map +0 -1
- package/dist/core/p-82aa8136.entry.js.map +0 -1
- package/dist/core/p-83b4efe2.entry.js +0 -2
- package/dist/core/p-83b4efe2.entry.js.map +0 -1
- package/dist/core/p-83e4d955.entry.js +0 -2
- package/dist/core/p-83e4d955.entry.js.map +0 -1
- package/dist/core/p-85d51975.entry.js +0 -2
- package/dist/core/p-85d51975.entry.js.map +0 -1
- package/dist/core/p-8bec76d1.entry.js.map +0 -1
- package/dist/core/p-8ffdd236.entry.js.map +0 -1
- package/dist/core/p-97953d8b.entry.js +0 -2
- package/dist/core/p-97953d8b.entry.js.map +0 -1
- package/dist/core/p-a22e5356.entry.js +0 -2
- package/dist/core/p-a22e5356.entry.js.map +0 -1
- package/dist/core/p-b03218df.entry.js +0 -2
- package/dist/core/p-b03218df.entry.js.map +0 -1
- package/dist/core/p-c1feb2b2.entry.js +0 -2
- package/dist/core/p-c1feb2b2.entry.js.map +0 -1
- package/dist/core/p-c40c57ee.entry.js +0 -2
- package/dist/core/p-c40c57ee.entry.js.map +0 -1
- package/dist/core/p-c883b5c1.entry.js +0 -2
- package/dist/core/p-c883b5c1.entry.js.map +0 -1
- package/dist/core/p-d7632baf.entry.js +0 -2
- package/dist/core/p-d7632baf.entry.js.map +0 -1
- package/dist/core/p-dcbfc485.entry.js +0 -2
- package/dist/core/p-dcbfc485.entry.js.map +0 -1
- package/dist/core/p-e6a330e4.js.map +0 -1
- package/dist/core/p-ea3e2419.entry.js +0 -2
- package/dist/core/p-ea3e2419.entry.js.map +0 -1
- package/dist/core/p-f32ab3de.entry.js +0 -2
- package/dist/core/p-f32ab3de.entry.js.map +0 -1
- package/dist/core/p-f3f9acbb.entry.js +0 -2
- package/dist/core/p-f3f9acbb.entry.js.map +0 -1
- package/dist/esm/helpers-1e2516ae.js.map +0 -1
- package/dist/esm/helpers-c326255f.js.map +0 -1
- /package/dist/core/{p-7c663d4a.entry.js.map → p-006afa83.entry.js.map} +0 -0
- /package/dist/core/{p-5eecd3fc.entry.js.map → p-0687cc81.entry.js.map} +0 -0
- /package/dist/core/{p-3b0fae40.entry.js.map → p-29623ad5.entry.js.map} +0 -0
- /package/dist/core/{p-fbb5c8f2.entry.js.map → p-3106c4fd.entry.js.map} +0 -0
- /package/dist/core/{p-606ad46f.entry.js.map → p-6f92ee7a.entry.js.map} +0 -0
- /package/dist/core/{p-a22d335b.entry.js.map → p-81da002e.entry.js.map} +0 -0
- /package/dist/core/{p-878df16f.entry.js.map → p-91cf88d6.entry.js.map} +0 -0
- /package/dist/core/{p-42f1b9cc.entry.js.map → p-9235425c.entry.js.map} +0 -0
- /package/dist/core/{p-9a62c3b8.entry.js.map → p-99c76218.entry.js.map} +0 -0
- /package/dist/core/{p-7aa6b76e.entry.js.map → p-9da6df82.entry.js.map} +0 -0
- /package/dist/core/{p-80b296cd.entry.js.map → p-bd5aada7.entry.js.map} +0 -0
- /package/dist/core/{p-24d03bbd.entry.js.map → p-be7bc371.entry.js.map} +0 -0
- /package/dist/core/{p-2f4bec06.entry.js.map → p-c12f3582.entry.js.map} +0 -0
- /package/dist/core/{p-53228014.entry.js.map → p-c894bc8f.entry.js.map} +0 -0
- /package/dist/core/{p-e7b6d9c5.entry.js.map → p-df05b999.entry.js.map} +0 -0
- /package/dist/core/{p-b3d93bc1.entry.js.map → p-e532fa26.entry.js.map} +0 -0
- /package/dist/core/{p-cc22644d.entry.js.map → p-fca3589b.entry.js.map} +0 -0
- /package/dist/core/{p-7c6710f8.entry.js.map → p-ffe923ae.entry.js.map} +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icDialogCss","Dialog","constructor","hostRef","this","DATA_GETS_FOCUS","DATA_GETS_FOCUS_SELECTOR","DIALOG_CONTROLS","dialogHeight","focusedElementIndex","IC_TEXT_FIELD","IC_ACCORDION","IC_ACCORDION_GROUP","resizeObserver","dialogOpened","_a","dialogRendered","disableHeightConstraint","dialogEl","show","showModal","setTimeout","fadeIn","backdropEl","scrollTop","setInitialFocus","checkResizeObserver","runResizeObserver","getFocusedElementIndex","icDialogOpened","emit","ResizeObserver","clearTimeout","resizeTimeout","window","resizeObserverCallback","observe","clientHeight","refreshInteractiveElementsOnSlotChange","contentArea","el","shadowRoot","querySelector","addEventListener","getInteractiveElements","removeSlotChangeListener","removeEventListener","sourceElement","document","activeElement","focusedElement","tagName","setFocus","focus","preventScroll","i","interactiveElementList","length","closeIconClick","open","Array","from","querySelectorAll","slottedInteractiveElements","slot","setAttribute","destructive","splice","getNextFocusEl","focusNextInteractiveElement","shiftKey","setFocusIndexBasedOnShiftKey","loopNextFocusIndexIfLastElement","nextFocusEl","isHidden","getComputedStyle","visibility","hasAttribute","renderDialog","buttons","size","heading","label","dismissLabel","hideCloseButton","h","class","disableWidthConstraint","ref","name","variant","id","innerHTML","closeIcon","onClick","isSlotUsed","cancelDialog","confirmDialog","closeOnBackdropClick","undefined","theme","watchOpenHandler","disconnect","close","icDialogClosed","disconnectedCallback","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","componentDidRender","display","body","style","overflow","handleKeyboard","ev","key","preventDefault","repeat","stopImmediatePropagation","handleClick","dialogElement","composedPath","indexOf","rect","getBoundingClientRect","isInDialog","top","clientY","height","left","clientX","width","icDialogCancelled","icDialogConfirmed","render","Host"],"sources":["../web-components/dist/collection/components/ic-dialog/ic-dialog.css?tag=ic-dialog&encapsulation=shadow","../web-components/dist/collection/components/ic-dialog/ic-dialog.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/**\n * @prop --ic-z-index-dialog: z-index of dialog \n */\n\n:host {\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100% !important;\n background: rgb(0 0 0 / 60%);\n z-index: var(--ic-z-index-dialog);\n opacity: 0;\n}\n\n:host(.ic-dialog-fade-in) {\n opacity: 1;\n}\n\n:host(.disable-height-constraint) {\n background: none;\n justify-content: unset;\n align-items: unset;\n}\n\n.dialog.disable-height-constraint {\n max-height: none;\n position: relative;\n}\n\n.dialog.disable-height-constraint .content-area {\n overflow-y: visible;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :host {\n transition: opacity var(--ic-easing-transition-slow);\n }\n\n .dialog {\n transform: translateY(-3rem);\n transition: transform 1000s;\n }\n\n :host(.ic-dialog-fade-in) .dialog {\n transform: translateY(0);\n transition: transform var(--ic-easing-transition-slow);\n }\n}\n\n:host(.ic-dialog-hidden) {\n display: none;\n}\n\n.dialog {\n background-color: var(--ic-dialog-background);\n color: var(--ic-dialog-text-primary);\n --ic-typography-color: var(--ic-dialog-text-primary);\n border: var(--ic-space-1px) solid var(--ic-dialog-border);\n border-radius: var(--ic-border-radius);\n padding: var(--ic-space-xs) 0 var(--ic-space-md);\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n overflow-x: visible;\n}\n\n.small {\n width: 50%;\n max-width: 25rem;\n min-height: 11rem;\n max-height: 70vh;\n}\n\n.medium {\n width: 70vw;\n max-width: 44rem;\n min-height: 12.5rem;\n max-height: 70vh;\n}\n\n.large {\n width: 90vw;\n max-width: 62.5rem;\n min-height: 12.5rem;\n max-height: 90vh;\n}\n\n.heading-area {\n display: flex;\n margin-bottom: var(--ic-space-xs);\n padding: 0 var(--ic-space-md);\n}\n\n.heading {\n overflow-wrap: break-word;\n}\n\n.close-icon {\n margin-left: auto;\n}\n\n.close-icon > svg {\n color: var(--ic-dialog-icon);\n}\n\n.content-area {\n -ms-overflow-style: none;\n scrollbar-width: none;\n padding: 0 var(--ic-space-md);\n margin: 0;\n overflow-y: auto;\n}\n\n.content-area::-webkit-scrollbar {\n display: none;\n}\n\n#dialog-content {\n margin-bottom: var(--ic-space-sm);\n}\n\n#dialog-content ::slotted(ic-typography) {\n overflow-wrap: break-word;\n}\n\n#dialog-content ::slotted(*) {\n position: relative;\n}\n\n.dialog-controls {\n margin-top: auto;\n padding: var(--ic-space-xs) var(--ic-space-md) 0;\n display: flex;\n justify-content: flex-end;\n gap: var(--ic-space-md);\n}\n\n.dialog-control-button {\n width: -moz-fit-content;\n width: fit-content;\n}\n\n.backdrop {\n overflow-y: auto;\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgb(0 0 0 / 60%);\n z-index: var(--ic-z-index-dialog);\n padding-top: 16px;\n padding-bottom: 16px;\n}\n\n.heading ic-typography {\n --ic-typography-color: var(--ic-dialog-text-primary);\n}\n\n.label ic-typography {\n --ic-typography-color: var(--ic-dialog-label);\n}\n\n@media (min-width: 800px) {\n :host([size=\"large\"]) .dialog:not(.disable-width-constraint) > .content-area {\n width: 75%;\n }\n}\n\n@media (max-width: 576px) {\n .dialog {\n width: 100vw;\n height: 100vh;\n transform: translateY(-5rem);\n max-width: none;\n max-height: none;\n box-sizing: border-box;\n }\n\n .backdrop {\n padding: 0;\n }\n\n .dialog.disable-height-constraint {\n height: auto;\n min-height: 100vh;\n }\n}\n\n@media (max-width: 364px) {\n .dialog-control-button {\n width: unset;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { isSlotUsed, checkResizeObserver, onComponentRequiredPropUndefined, } from \"../../utils/helpers\";\n/**\n * @slot dialog-controls - Content will be place at the bottom of the dialog.\n * @slot heading - Content will be placed at the top of the dialog.\n * @slot label - Content will be placed above the dialog heading.\n * @slot alert - Content will be placed at the top of the content area of the dialog.\n */\nexport class Dialog {\n constructor() {\n this.DATA_GETS_FOCUS = \"data-gets-focus\";\n this.DATA_GETS_FOCUS_SELECTOR = \"[data-gets-focus]\";\n this.DIALOG_CONTROLS = \"dialog-controls\";\n this.dialogHeight = 0;\n this.focusedElementIndex = 0;\n this.IC_TEXT_FIELD = \"IC-TEXT-FIELD\";\n this.IC_ACCORDION = \"IC-ACCORDION\";\n this.IC_ACCORDION_GROUP = \"IC-ACCORDION-GROUP\";\n this.resizeObserver = null;\n this.dialogOpened = () => {\n var _a;\n this.dialogRendered = true;\n if (this.disableHeightConstraint) {\n this.dialogEl.show();\n }\n else {\n (_a = this.dialogEl) === null || _a === void 0 ? void 0 : _a.showModal();\n }\n setTimeout(() => {\n this.fadeIn = true;\n /**\n * This is required to set scroll back to top if:\n * - dialog content goes below the fold\n * - is closed using cancel or confirm and reopened.\n *\n * Without this, the scroll bar will start from the dialog's last scroll-x coordinate.\n */\n if (this.disableHeightConstraint && this.backdropEl.scrollTop !== 0) {\n this.backdropEl.scrollTop = 0;\n }\n }, 10);\n setTimeout(() => {\n this.setInitialFocus();\n checkResizeObserver(this.runResizeObserver);\n }, 75);\n setTimeout(() => {\n this.getFocusedElementIndex();\n this.icDialogOpened.emit();\n }, 80);\n };\n this.runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = window.setTimeout(this.resizeObserverCallback, 80);\n });\n this.resizeObserver.observe(this.dialogEl);\n };\n this.resizeObserverCallback = () => {\n if (this.dialogEl.clientHeight !== this.dialogHeight) {\n this.dialogHeight = this.dialogEl.clientHeight;\n }\n };\n this.refreshInteractiveElementsOnSlotChange = () => {\n this.contentArea = this.el.shadowRoot.querySelector(\"#dialog-content slot\");\n this.contentArea.addEventListener(\"slotchange\", this.getInteractiveElements);\n };\n this.removeSlotChangeListener = () => {\n if (this.contentArea) {\n this.contentArea.removeEventListener(\"slotchange\", this.getInteractiveElements);\n }\n };\n this.setInitialFocus = () => {\n this.sourceElement = document.activeElement;\n let focusedElement;\n if (this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR) !== null) {\n focusedElement = this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR);\n }\n else {\n focusedElement = this.el.shadowRoot.querySelector(this.DATA_GETS_FOCUS_SELECTOR);\n }\n if (focusedElement.tagName === this.IC_TEXT_FIELD) {\n focusedElement.setFocus();\n }\n else if (focusedElement.tagName === this.IC_ACCORDION_GROUP) {\n focusedElement.setFocus();\n }\n else if (focusedElement.tagName === this.IC_ACCORDION) {\n focusedElement.setFocus();\n }\n else {\n focusedElement.focus({\n preventScroll: this.disableHeightConstraint ? true : false,\n });\n }\n };\n this.getFocusedElementIndex = () => {\n for (let i = 0; i < this.interactiveElementList.length; i++) {\n if (this.interactiveElementList[i] ===\n (this.el.shadowRoot.activeElement || document.activeElement)) {\n this.focusedElementIndex = i;\n }\n }\n };\n this.closeIconClick = () => {\n this.open = false;\n };\n this.getInteractiveElements = () => {\n this.interactiveElementList = Array.from(this.el.shadowRoot.querySelectorAll(\"ic-button\"));\n const slottedInteractiveElements = Array.from(this.el.querySelectorAll(`a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), \n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-group, ic-radio-group, \n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible=\"true\"], ic-footer-link, ic-link, ic-navigation-button, \n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion`));\n if (slottedInteractiveElements.length > 0) {\n if (slottedInteractiveElements[0].slot !== this.DIALOG_CONTROLS) {\n slottedInteractiveElements[0].setAttribute(this.DATA_GETS_FOCUS, \"\");\n }\n else if (!this.destructive) {\n slottedInteractiveElements[slottedInteractiveElements.length - 1].setAttribute(this.DATA_GETS_FOCUS, \"\");\n }\n }\n for (let i = 0; i < slottedInteractiveElements.length; i++) {\n this.interactiveElementList.splice(1 + i, 0, slottedInteractiveElements[i]);\n }\n };\n this.getNextFocusEl = (focusedElementIndex) => this.interactiveElementList[focusedElementIndex];\n this.focusNextInteractiveElement = (shiftKey) => {\n this.getFocusedElementIndex();\n this.setFocusIndexBasedOnShiftKey(shiftKey);\n this.loopNextFocusIndexIfLastElement();\n let nextFocusEl = this.getNextFocusEl(this.focusedElementIndex);\n const isHidden = getComputedStyle(nextFocusEl).visibility === \"hidden\" ||\n (nextFocusEl.tagName === this.IC_ACCORDION_GROUP &&\n nextFocusEl.hasAttribute(\"single-expansion\"));\n if (nextFocusEl.tagName === this.IC_TEXT_FIELD) {\n nextFocusEl.setFocus();\n }\n else {\n if (isHidden) {\n this.setFocusIndexBasedOnShiftKey(shiftKey);\n this.loopNextFocusIndexIfLastElement();\n nextFocusEl = this.getNextFocusEl(this.focusedElementIndex);\n }\n if (nextFocusEl.tagName === this.IC_ACCORDION_GROUP) {\n nextFocusEl.setFocus();\n }\n else if (nextFocusEl.tagName === this.IC_ACCORDION) {\n nextFocusEl.setFocus();\n }\n else {\n nextFocusEl.focus();\n }\n }\n };\n this.renderDialog = () => {\n const { buttons, size, heading, label, destructive, dismissLabel, hideCloseButton, } = this;\n return (h(\"dialog\", { class: {\n [\"dialog\"]: true,\n [`${size}`]: true,\n [\"disable-height-constraint\"]: this.disableHeightConstraint,\n [\"disable-width-constraint\"]: this.disableWidthConstraint,\n }, \"aria-labelledby\": \"dialog-label dialog-heading\", \"aria-describedby\": \"dialog-alert dialog-content\", ref: (el) => (this.dialogEl = el) }, h(\"div\", { class: \"heading-area\" }, h(\"div\", { class: \"heading-content\" }, h(\"div\", { class: \"label\" }, h(\"slot\", { name: \"label\" }, h(\"ic-typography\", { variant: \"label\", id: \"dialog-label\" }, label))), h(\"div\", { class: \"heading\" }, h(\"slot\", { name: \"heading\" }, h(\"ic-typography\", { variant: \"h4\", id: \"dialog-heading\" }, heading)))), !hideCloseButton && (h(\"ic-button\", { class: \"close-icon\", variant: \"icon\", innerHTML: closeIcon, \"aria-label\": dismissLabel, onClick: this.closeIconClick, \"data-gets-focus\": destructive || !buttons ? \"\" : null }))), h(\"div\", { class: \"content-area\" }, isSlotUsed(this.el, \"alert\") && h(\"slot\", { name: \"alert\" }), h(\"div\", { id: \"dialog-content\" }, h(\"slot\", null))), buttons &&\n (isSlotUsed(this.el, this.DIALOG_CONTROLS) ? (h(\"div\", { class: {\n [this.DIALOG_CONTROLS]: true,\n } }, h(\"slot\", { name: this.DIALOG_CONTROLS }))) : (h(\"div\", { class: {\n [this.DIALOG_CONTROLS]: true,\n } }, h(\"ic-button\", { variant: \"tertiary\", onClick: () => this.cancelDialog(), class: \"dialog-control-button\", \"data-gets-focus\": null }, \"Cancel\"), h(\"ic-button\", { variant: this.destructive ? \"destructive\" : \"primary\", onClick: () => this.confirmDialog(), class: \"dialog-control-button\", \"data-gets-focus\": \"\" }, \"Confirm\"))))));\n };\n this.dialogRendered = false;\n this.fadeIn = false;\n this.buttons = true;\n this.closeOnBackdropClick = true;\n this.destructive = false;\n this.dismissLabel = \"Dismiss\";\n this.disableHeightConstraint = false;\n this.disableWidthConstraint = false;\n this.hideCloseButton = false;\n this.heading = undefined;\n this.label = undefined;\n this.open = undefined;\n this.size = \"small\";\n this.theme = \"inherit\";\n }\n watchOpenHandler() {\n if (this.open) {\n this.dialogOpened();\n }\n else {\n this.fadeIn = false;\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n setTimeout(() => {\n var _a;\n this.dialogRendered = false;\n this.dialogEl.close();\n (_a = this.sourceElement) === null || _a === void 0 ? void 0 : _a.focus();\n this.dialogHeight = 0;\n this.icDialogClosed.emit();\n }, 80);\n }\n }\n disconnectedCallback() {\n this.removeSlotChangeListener();\n }\n componentDidLoad() {\n this.getInteractiveElements();\n this.refreshInteractiveElementsOnSlotChange();\n if (this.open) {\n this.dialogOpened();\n }\n !isSlotUsed(this.el, \"heading\") &&\n onComponentRequiredPropUndefined([{ prop: this.heading, propName: \"heading\" }], \"Dialog\");\n }\n componentDidRender() {\n if (getComputedStyle(this.el).display !== \"none\" &&\n this.disableHeightConstraint) {\n document.body.style.overflow = \"hidden\";\n }\n else {\n document.body.style.overflow = \"auto\";\n }\n }\n handleKeyboard(ev) {\n if (this.dialogRendered) {\n switch (ev.key) {\n case \"Tab\":\n ev.preventDefault();\n this.focusNextInteractiveElement(ev.shiftKey);\n break;\n case \"Escape\":\n if (!ev.repeat) {\n this.open = false;\n }\n ev.stopImmediatePropagation();\n break;\n }\n }\n }\n handleClick(ev) {\n const dialogElement = this.el.shadowRoot.querySelector(\"dialog\");\n if (this.closeOnBackdropClick &&\n ev.composedPath().indexOf(dialogElement) <= 0) {\n const rect = this.dialogEl.getBoundingClientRect();\n const isInDialog = rect.top <= ev.clientY &&\n ev.clientY <= rect.top + rect.height &&\n rect.left <= ev.clientX &&\n ev.clientX <= rect.left + rect.width;\n if (!isInDialog) {\n this.open = false;\n }\n }\n }\n /**\n * Cancels the dialog. Used by the default 'Cancel' button or can be called manually to trigger cancelling of dialog.\n */\n async cancelDialog() {\n this.icDialogCancelled.emit();\n this.open = false;\n }\n /**\n * Confirms the dialog. Used by the default 'Confirm' button or can be called manually to trigger confirming of dialog.\n */\n async confirmDialog() {\n this.icDialogConfirmed.emit();\n }\n loopNextFocusIndexIfLastElement() {\n if (this.focusedElementIndex > this.interactiveElementList.length - 1)\n this.focusedElementIndex = 0;\n else if (this.focusedElementIndex < 0) {\n this.focusedElementIndex = this.interactiveElementList.length - 1;\n }\n }\n setFocusIndexBasedOnShiftKey(shiftKey) {\n if (shiftKey) {\n this.focusedElementIndex -= 1;\n }\n else {\n this.focusedElementIndex += 1;\n }\n }\n render() {\n return (h(Host, { class: {\n [\"ic-dialog-hidden\"]: !this.dialogRendered,\n [\"ic-dialog-fade-in\"]: this.fadeIn,\n [\"disable-height-constraint\"]: this.disableHeightConstraint,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n } }, this.disableHeightConstraint ? (h(\"div\", { class: \"backdrop\", ref: (el) => (this.backdropEl = el) }, this.renderDialog())) : (this.renderDialog())));\n }\n static get is() { return \"ic-dialog\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-dialog.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-dialog.css\"]\n };\n }\n static get properties() {\n return {\n \"buttons\": {\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 set to `false`, default buttons or slotted dialog controls will not be displayed.\"\n },\n \"attribute\": \"buttons\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"closeOnBackdropClick\": {\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 set to `false`, the dialog will not close when the backdrop is clicked.\"\n },\n \"attribute\": \"close-on-backdrop-click\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"destructive\": {\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 default buttons are displayed, sets the 'primary' or rightmost button to the destructive variant. Stops initial focus being set on the 'primary' or rightmost default or slotted button.\"\n },\n \"attribute\": \"destructive\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"dismissLabel\": {\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\": \"Sets the dismiss label tooltip and aria label.\"\n },\n \"attribute\": \"dismiss-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Dismiss\\\"\"\n },\n \"disableHeightConstraint\": {\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 set to `true`, the content area max height and overflow properties are removed allowing the dialog to stretch below the fold.\\nThis prop also prevents popover elements from being cut off within the content area.\"\n },\n \"attribute\": \"disable-height-constraint\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"disableWidthConstraint\": {\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 set to `true`, the content area width property is removed, allowing content to take the full width of the dialog when using the large variant.\"\n },\n \"attribute\": \"disable-width-constraint\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"hideCloseButton\": {\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 close button will not be displayed.\"\n },\n \"attribute\": \"hide-close-button\",\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\": \"Sets the heading for the dialog.\"\n },\n \"attribute\": \"heading\",\n \"reflect\": false\n },\n \"label\": {\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\": \"Sets the optional label for the dialog which appears above the heading.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"open\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the dialog will be displayed.\"\n },\n \"attribute\": \"open\",\n \"reflect\": true,\n \"defaultValue\": \"undefined\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"small\\\" | \\\"medium\\\" | \\\"large\\\"\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the maximum and minimum height and width for the dialog.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"small\\\"\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"dialogRendered\": {},\n \"fadeIn\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icDialogCancelled\",\n \"name\": \"icDialogCancelled\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Cancelation event emitted when default 'Cancel' button clicked or 'cancelDialog' method is called.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icDialogClosed\",\n \"name\": \"icDialogClosed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when dialog has closed.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icDialogConfirmed\",\n \"name\": \"icDialogConfirmed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Confirmation event emitted when default 'Confirm' primary button clicked or 'confirmDialog' method is called.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icDialogOpened\",\n \"name\": \"icDialogOpened\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when dialog has opened.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"cancelDialog\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Cancels the dialog. Used by the default 'Cancel' button or can be called manually to trigger cancelling of dialog.\",\n \"tags\": []\n }\n },\n \"confirmDialog\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Confirms the dialog. Used by the default 'Confirm' button or can be called manually to trigger confirming of dialog.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"open\",\n \"methodName\": \"watchOpenHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"keydown\",\n \"method\": \"handleKeyboard\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"click\",\n \"method\": \"handleClick\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-dialog.js.map\n"],"mappings":"sJAAA,MAAMA,EAAc,6kK,MCSPC,EAAM,MACf,WAAAC,CAAAC,G,kNACIC,KAAKC,gBAAkB,kBACvBD,KAAKE,yBAA2B,oBAChCF,KAAKG,gBAAkB,kBACvBH,KAAKI,aAAe,EACpBJ,KAAKK,oBAAsB,EAC3BL,KAAKM,cAAgB,gBACrBN,KAAKO,aAAe,eACpBP,KAAKQ,mBAAqB,qBAC1BR,KAAKS,eAAiB,KACtBT,KAAKU,aAAe,KAChB,IAAIC,EACJX,KAAKY,eAAiB,KACtB,GAAIZ,KAAKa,wBAAyB,CAC9Bb,KAAKc,SAASC,M,KAEb,EACAJ,EAAKX,KAAKc,YAAc,MAAQH,SAAY,OAAS,EAAIA,EAAGK,W,CAEjEC,YAAW,KACPjB,KAAKkB,OAAS,KAQd,GAAIlB,KAAKa,yBAA2Bb,KAAKmB,WAAWC,YAAc,EAAG,CACjEpB,KAAKmB,WAAWC,UAAY,C,IAEjC,IACHH,YAAW,KACPjB,KAAKqB,kBACLC,EAAoBtB,KAAKuB,kBAAkB,GAC5C,IACHN,YAAW,KACPjB,KAAKwB,yBACLxB,KAAKyB,eAAeC,MAAM,GAC3B,GAAG,EAEV1B,KAAKuB,kBAAoB,KACrBvB,KAAKS,eAAiB,IAAIkB,gBAAe,KACrCC,aAAa5B,KAAK6B,eAClB7B,KAAK6B,cAAgBC,OAAOb,WAAWjB,KAAK+B,uBAAwB,GAAG,IAE3E/B,KAAKS,eAAeuB,QAAQhC,KAAKc,SAAS,EAE9Cd,KAAK+B,uBAAyB,KAC1B,GAAI/B,KAAKc,SAASmB,eAAiBjC,KAAKI,aAAc,CAClDJ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","IC_BLOCK_COLOR_EXCEPTIONS","IcInformationStatus","IcThemeForegroundEnum","IcDateInputMonths","IcShortDayNames","IcDayNames","IcWeekDays","stringEnumToArray","theEnum","arr","Object","values","forEach","val","isNaN","Number","str","push","dynamicDebounce","func","getDelay","timer","args","delay","clearTimeout","setTimeout","renderHiddenInput","always","container","name","value","disabled","undefined","hasShadowDom","inputs","querySelectorAll","inputEls","Array","from","filtered","filter","el","parentElement","input","ownerDocument","createElement","type","classList","add","appendChild","Date","toISOString","getThemeFromContext","themeFromEvent","getRootNode","host","blockColorParent","closest","join","parentTag","tagName","toLowerCase","currentTag","_a","includes","Default","contains","Dark","Light","isEmptyString","trim","length","isPropDefined","prop","getCssProperty","cssVar","getComputedStyle","document","documentElement","getPropertyValue","getSlotElements","slot","slotContent","firstElementChild","elements","assignedElements","childNodes","XS","replace","S","M","L","XL","UNDEFINED","isSlotUsed","element","slotName","children","some","child","getAttribute","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","pxToRem","px","base","parseInt","isNumeric","test","onComponentRequiredPropUndefined","props","component","i","propName","console","error","kebabToCamelCase","kebabCase","individualWords","split","camelCase","substring","toUpperCase","checkResizeObserver","callbackFn","window","ResizeObserver","getForm","addFormResetListener","form","addEventListener","removeFormResetListener","removeEventListener","removeDisabledFalse","removeAttribute","capitalize","text","charAt","slice","checkSlotInChildMutations","addedNodes","removedNodes","hasSlot","nodeList","node","addDataToPosition","dataObject","newKeys","newValue","newData","newIndexes","map","key","index","controlledIndex","keys","dataKey","indexOf"],"sources":["src/utils/constants.ts","src/utils/types.ts","src/utils/helpers.ts"],"sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-expanded\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n","import {\n IcPaginationLabelTypes,\n IcPaginationTypes,\n IcPaginationAlignmentOptions,\n} from \"../components\";\n\nexport type IcFocusableComponents =\n | HTMLIcBreadcrumbElement\n | HTMLIcButtonElement\n | HTMLIcCardVerticalElement\n | HTMLIcCheckboxElement\n | HTMLIcChipElement\n | HTMLIcLinkElement\n | HTMLIcNavigationButtonElement\n | HTMLIcNavigationGroupElement\n | HTMLIcNavigationItemElement\n | HTMLIcRadioOptionElement\n | HTMLIcSearchBarElement\n | HTMLIcSelectElement\n | HTMLIcSwitchElement\n | HTMLIcTabElement\n | HTMLIcTextFieldElement;\n\nexport type IcStatusVariants =\n | \"neutral\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport enum IcInformationStatus {\n Warning = \"warning\",\n Error = \"error\",\n Success = \"success\",\n}\n\nexport type IcSizes = \"medium\" | \"large\" | \"small\";\n\nexport type IcSizesNoLarge = \"medium\" | \"small\";\n\nexport type IcInformationStatusOrEmpty = \"warning\" | \"error\" | \"success\" | \"\";\n\nexport type IcNavType = \"side\" | \"top\" | \"page-header\";\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type IcAutocompleteTypes =\n | \"on\"\n | \"off\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level4\"\n | \"address-level3\"\n | \"address-level2\"\n | \"address-level1\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tel-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\nexport type IcAlignment = \"left\" | \"center\" | \"full-width\";\n\nexport enum IcThemeForegroundEnum {\n Default = \"default\",\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport type IcThemeForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcThemeForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcTheme = {\n mode: IcThemeForeground;\n color: IcColorRGB;\n};\n\nexport type IcThemeMode = \"dark\" | \"light\" | \"inherit\";\n\nexport type IcAdditionalFieldTypes = \"static\" | \"dynamic\";\n\nexport type IcColorRGB = {\n r: number;\n g: number;\n b: number;\n};\n\nexport type IcColorRGBA = IcColorRGB & {\n a: number;\n};\n\nexport type IcActivationTypes = \"automatic\" | \"manual\";\n\nexport type IcAutocorrectStates = \"on\" | \"off\";\n\nexport type IcNavParentDetails = {\n navType: IcNavType | \"\";\n parent: HTMLElement;\n};\n\nexport type IcTypographyVariants =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"subtitle-large\"\n | \"subtitle-small\"\n | \"body\"\n | \"label\"\n | \"label-uppercase\"\n | \"caption\"\n | \"caption-uppercase\"\n | \"code-large\"\n | \"code-small\"\n | \"code-extra-small\"\n | \"badge\"\n | \"badge-small\";\n\n/**\n * @interface IcMenuOption\n * @field {string} A label field to options. Defaults to \"label\", but can have any custom name.\n * @field {string} A value field to options. Defaults to \"value\", but can have any custom name.\n */\nexport interface IcMenuOption {\n description?: string;\n disabled?: boolean;\n recommended?: boolean;\n children?: IcMenuOption[];\n loading?: boolean;\n timedOut?: boolean;\n [key: string]: any;\n element?: {\n component: any;\n ariaLabel: string;\n };\n icon?: any;\n}\n\nexport type IcSearchMatchPositions = \"start\" | \"anywhere\";\n\nexport interface IcPaginationBarOptions {\n itemsPerPageOptions?: { label: string; value: string }[];\n rangeLabelType?: IcPaginationLabelTypes;\n type?: IcPaginationTypes;\n showItemsPerPageControl?: boolean;\n showGoToPageControl?: boolean;\n alignment?: IcPaginationAlignmentOptions;\n itemLabel?: string;\n pageLabel?: string;\n hideRangeLabel?: boolean;\n hideAllFromItemsPerPage?: boolean;\n theme?: IcThemeMode;\n monochrome?: boolean;\n}\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcDateFormat = \"DD/MM/YYYY\" | \"MM/DD/YYYY\" | \"YYYY/MM/DD\";\n\nexport enum IcDateInputMonths {\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n}\n\nexport enum IcShortDayNames {\n \"Sun\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\",\n}\n\nexport enum IcDayNames {\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n}\n\nexport enum IcWeekDays {\n Sunday = 0,\n Monday = 1,\n Tuesday = 2,\n Wednesday = 3,\n Thursday = 4,\n Friday = 5,\n Saturday = 6,\n}\n\nexport interface IcValueEventDetail {\n value: string | string[];\n keyPressed?: string;\n}\n","/**\n * To investigate:\n * IcColorRGBA works via @ukic/web-components but IcThemeForeground does not even though they are exported\n * from @ukic/web-components in the same file. Why?\n */\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n} from \"@ukic/web-components\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\"; // Using @ukic/web-components/dist/types/utils/constants does not work so duplicated constants into canary package\nimport {\n IcMenuOption,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"./types\"; // Using @ukic/web-components/dist/types/utils/types does not work so duplicated constants into canary package\nimport { EventEmitter } from \"@stencil/core\";\nimport { IcDataTableDataType } from \"../interface\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\n\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (\n theEnum: Record<string, string | number>\n): string[] => {\n const arr: string[] = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val as string;\n arr.push(str);\n }\n });\n return arr;\n};\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: string } => {\n const attributeObject: { [key: string]: string } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\n }\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\nexport const dynamicDebounce = (\n func: (...args: unknown[]) => void,\n getDelay: () => number\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n const delay = getDelay();\n clearTimeout(timer);\n timer = setTimeout(func, delay, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (\n always: boolean,\n container: HTMLElement,\n name: string,\n value: string | Date | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(\"ic-input\");\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : null;\n } else {\n input.value = value || \"\";\n }\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (\n el: Element,\n themeFromEvent: IcThemeForeground = null\n): IcThemeForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n } else if (\n themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return themeFromEvent;\n } else if (\n blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)\n ) {\n return IcThemeForegroundEnum.Dark;\n }\n\n return IcThemeForegroundEnum.Light;\n }\n\n return IcThemeForegroundEnum.Default;\n};\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean =>\n value ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string): string | null =>\n prop !== undefined ? prop : null;\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string =>\n getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n */\nexport const getThemeForegroundColor = (): IcThemeForeground =>\n getThemeColorBrightness() > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = (\n el: HTMLElement\n): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (getParentElementType(el)) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(el.parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: getParentElement(el) };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: getParentElement(el) };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\n\nexport const isSlotUsed = (element: HTMLElement, slotName: string): boolean =>\n Array.from(element.children).some(\n (child) => child.getAttribute(\"slot\") === slotName\n );\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean =>\n !!el.shadowRoot && !!el.attachShadow;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator ? navigator.maxTouchPoints > 0 : false;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[],\n valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === \"anywhere\"\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (\n options: IcMenuOption[]\n): number => {\n const optionsWithoutGroupTitles: IcMenuOption[] = [];\n\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n } else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n\n return optionsWithoutGroupTitles.length;\n};\n\nconst hex2dec = function (v: string) {\n return parseInt(v, 16);\n};\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n let c;\n if (hex.length === 4) {\n c = hex.replace(\"#\", \"\").split(\"\");\n return {\n r: hex2dec(c[0] + c[0]),\n g: hex2dec(c[1] + c[1]),\n b: hex2dec(c[2] + c[2]),\n a: 1,\n };\n } else {\n return {\n r: hex2dec(hex.slice(1, 3)),\n g: hex2dec(hex.slice(3, 5)),\n b: hex2dec(hex.slice(5)),\n a: 1,\n };\n }\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const fourthChar = rgbaStr.slice(3, 4);\n let colorRGBA: IcColorRGBA;\n if (fourthChar.toLowerCase() === \"a\") {\n colorRGBA = { r: null, g: null, b: null, a: null };\n const rgba = rgbaStr\n .substring(5, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgba[0]);\n colorRGBA.g = Number(rgba[1]);\n colorRGBA.b = Number(rgba[2]);\n colorRGBA.a = Number(rgba[3]);\n } else {\n colorRGBA = { r: null, g: null, b: null, a: 1 };\n const rgb = rgbaStr\n .substring(4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\");\n colorRGBA.r = Number(rgb[0]);\n colorRGBA.g = Number(rgb[1]);\n colorRGBA.b = Number(rgb[2]);\n }\n\n return colorRGBA;\n};\n\nexport const elementOverflowsX = (element: HTMLElement): boolean =>\n element.scrollWidth > element.clientWidth;\n\n/**\n *\n * @param child - The child element\n * @returns string\n */\nexport const getParentElementType = (child: HTMLElement): string =>\n child.parentElement.tagName;\n\nexport const getParentElement = (child: HTMLElement): HTMLElement =>\n child.parentElement;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\nexport const isNumeric = (value: string): boolean => {\n return /^-?\\d+$/.test(value);\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => {\n return status !== \"\" && !disabled;\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n for (let i = 0; i < props.length; i++) {\n const { prop, propName } = props[i];\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n }\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string => {\n kebabCase = kebabCase.toLowerCase();\n const individualWords: string[] = kebabCase.split(\"-\");\n let camelCase = individualWords[0];\n for (let i = 1; i < individualWords.length; i++) {\n camelCase +=\n individualWords[i].substring(0, 1).toUpperCase() +\n individualWords[i].substring(1);\n }\n return camelCase;\n};\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nexport const getForm = (el: HTMLElement): HTMLFormElement => el.closest(\"FORM\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.addEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n const form = getForm(el);\n if (form !== null) {\n form.removeEventListener(\"reset\", callbackFn);\n }\n};\n\nexport const removeDisabledFalse = (\n disabled: boolean,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean => {\n return window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n};\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n\nexport const capitalize = (text: string): string => {\n return text.charAt(0).toUpperCase() + text.slice(1);\n};\n\nexport const checkSlotInChildMutations = (\n addedNodes: NodeList,\n removedNodes: NodeList,\n slotName: string\n): boolean => {\n const hasSlot = (nodeList: NodeList) =>\n Array.from(nodeList).some((node) => (node as Element).slot === slotName);\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\n\nexport const addDataToPosition = (\n dataObject: IcDataTableDataType,\n newKeys: { key: string; index: number }[],\n newValue: unknown\n): IcDataTableDataType => {\n const newData: IcDataTableDataType = {};\n const newIndexes = newKeys.map((key) => key.index);\n let controlledIndex = 0; // When a new key is added to the data, need to increment the index to account for this new object value\n\n Object.keys(dataObject).forEach((dataKey) => {\n if (newIndexes.includes(controlledIndex)) {\n newData[newKeys[newIndexes.indexOf(controlledIndex)].key] = newValue;\n controlledIndex++;\n }\n newData[dataKey] = dataObject[dataKey];\n controlledIndex++;\n });\n return newData;\n};\n"],"mappings":"AAkEO,MAAMA,EAA4B,CACvC,UACA,oBACA,YACA,qBACA,YAGK,MAAMC,EAA4B,CAAC,YAMnC,MAAMC,EAA+C,CAC1D,WAAY,CAAC,Y,ICnDHC,GAAZ,SAAYA,GACVA,EAAA,qBACAA,EAAA,iBACAA,EAAA,oBACD,EAJD,CAAYA,MAAmB,K,IA0EnBC,GAAZ,SAAYA,GACVA,EAAA,qBACAA,EAAA,eACAA,EAAA,gBACD,EAJD,CAAYA,MAAqB,K,IAiGrBC,GAAZ,SAAYA,GACVA,IAAA,wBACAA,IAAA,0BACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,gBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,sBACAA,IAAA,4BACAA,IAAA,wBACAA,IAAA,2BACAA,IAAA,0BACD,EAbD,CAAYA,MAAiB,K,IAejBC,GAAZ,SAAYA,GACVA,IAAA,gBACAA,IAAA,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AAI+F,IAAS,KAAM,CACjBA,EAAKC,iBAAiB,QAASN,E,SAItBO,EAA0B,CACrCjG,EACA0F,KAEA,MAAMK,EAAOF,EAAQ7F,GACrB,GAAI+F,IAAS,KAAM,CACjBA,EAAKG,oBAAoB,QAASR,E,SAIzBS,EAAsB,CACjC7G,EACAgE,KAEA,IAAKhE,EAAU,CACbgE,EAAQ8C,gBAAgB,W,SAwBfC,EAAcC,GAClBA,EAAKC,OAAO,GAAGf,cAAgBc,EAAKE,MAAM,G,MAGtCC,EAA4B,CACvCC,EACAC,EACApD,KAEA,MAAMqD,EAAWC,GACfjH,MAAMC,KAAKgH,GAAUpD,MAAMqD,GAAUA,EAAiBtE,OAASe,IACjE,OAAOqD,EAAQF,IAAeE,EAAQD,EAAa,E,MAGxCI,EAAoB,CAC/BC,EACAC,EACAC,KAEA,MAAMC,EAA+B,GACrC,MAAMC,EAAaH,EAAQI,KAAKC,GAAQA,EAAIC,QAC5C,IAAIC,EAAkB,EAEtBvJ,OAAOwJ,KAAKT,GAAY7I,SAASuJ,IAC/B,GAAIN,EAAW7F,SAASiG,GAAkB,CACxCL,EAAQF,EAAQG,EAAWO,QAAQH,IAAkBF,KAAOJ,EAC5DM,G,CAEFL,EAAQO,GAAWV,EAAWU,GAC9BF,GAAiB,IAEnB,OAAOL,CAAO,S"}
|
@@ -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-e6a330e4.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 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 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 m=':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}ic-loading-indicator.ic-theme-dark{--inner-color:var(--ic-action-default-dark);--outer-color:var(--ic-action-neutral-light);--label-color:var(--ic-color-text-primary-dark)}ic-loading-indicator.ic-theme-dark.ic-loading-indicator-monochrome{--inner-color:var(--ic-action-light);--outer-color:var(--ic-action-neutral-dark);--label-color:var(--ic-color-text-inverse-dark)}.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-pressed)}.sort-button svg{color:var(--ic-architectural-black)}.sort-button-unsorted svg{color:var(--ic-color-text-tertiary)}.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{--ic-typography-color:var(--ic-color-text-secondary)}.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%}@media screen and (min-width: 577px){.column-header-inner-container{display:flex;align-items:center}}';const f=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:g,descending:p};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,monochrome:a}=this.updatingOptions||{};return e("th",{colSpan:this.columns.length,class:"updating-state"},e("ic-loading-indicator",{theme:t,monochrome:a,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.createCells=(t,i)=>{var n;const o=Object.values(t);const a=Object.keys(t);const l=this.getRowOptions(a,o);let h;let d;const c=a.indexOf("header");if(c>-1){h=this.getObjectValue(o[c],"rowAlignment");d=this.getObjectValue(o[c],"emphasis")}const u=(n=this.variableRowHeight)===null||n===void 0?void 0:n.call(this,Object.assign(Object.assign({},t),{index:i}));const v=u?u!=="auto"&&u:this.globalRowHeight!=="auto"&&this.globalRowHeight;return o.map(((t,n)=>{var o,c,u,g,p,m,f,b,w,y,x,O;const j=this.columns[n];const k=`${j===null||j===void 0?void 0:j.key}-${i}`;const $=this.isObject(t)&&Object.keys(t).includes("icon");const H=i=>this.getObjectValue(t,i);if(a[n]==="header"){return e("th",{scope:"row",colSpan:H("colspan"),class:{["row-header"]:true,[`row-header-alignment-${H("cellAlignment")}`]:!!H("cellAlignment"),["row-header-sticky"]:this.stickyRowHeaders}},H("title"))}if(a[n]!=="rowOptions"){return e("td",{class:{["table-cell"]:true,[`table-density-${this.density}`]:this.notDefaultDensity(),["with-overflow"]:(j===null||j===void 0?void 0:j.dataType)==="element"},style:Object.assign({},this.getColumnWidth(j.columnWidth))},e("div",{innerHTML:(j===null||j===void 0?void 0:j.dataType)==="element"&&!r(this.el,k)?t:null,class:Object.assign({"cell-container":(j===null||j===void 0?void 0:j.dataType)!=="element",[`cell-alignment-${((o=j===null||j===void 0?void 0:j.columnAlignment)===null||o===void 0?void 0:o.vertical)||((c=l===null||l===void 0?void 0:l.rowAlignment)===null||c===void 0?void 0:c.vertical)||h||this.getCellAlignment(t,"vertical")}`]:!!((u=j===null||j===void 0?void 0:j.columnAlignment)===null||u===void 0?void 0:u.vertical)||!!((g=l===null||l===void 0?void 0:l.rowAlignment)===null||g===void 0?void 0:g.vertical)||!!h||!!this.getCellAlignment(t,"vertical"),[`cell-alignment-${((p=j===null||j===void 0?void 0:j.columnAlignment)===null||p===void 0?void 0:p.horizontal)||((m=l===null||l===void 0?void 0:l.rowAlignment)===null||m===void 0?void 0:m.horizontal)||this.getCellAlignment(t,"horizontal")}`]:!!((f=j===null||j===void 0?void 0:j.columnAlignment)===null||f===void 0?void 0:f.horizontal)||!!((b=l===null||l===void 0?void 0:l.rowAlignment)===null||b===void 0?void 0:b.horizontal)||!!this.getCellAlignment(t,"horizontal"),[`data-type-${j===null||j===void 0?void 0:j.dataType}`]:true,[this.TEXT_WRAP_STRING]:(j===null||j===void 0?void 0:j.textWrap)||(l===null||l===void 0?void 0:l.textWrap)||!!this.getCellOptions(t,"textWrap"),["cell-icon"]:$||!!((w=j===null||j===void 0?void 0:j.icon)===null||w===void 0?void 0:w.icon)},this.setTruncationClass()),style:Object.assign(Object.assign({},this.getRowHeight(v,j,l===null||l===void 0?void 0:l.textWrap,t)),this.getColumnWidth(j===null||j===void 0?void 0:j.columnWidth)),"data-row-height":this.truncationPattern||v?this.setRowHeight(v):null},r(this.el,k)?e("slot",{name:k}):e(s,null,r(this.el,`${k}-icon`)?e("slot",{name:`${k}-icon`}):($||((y=j===null||j===void 0?void 0:j.icon)===null||y===void 0?void 0:y.onAllCells))&&(H("icon")||((x=j===null||j===void 0?void 0:j.icon)===null||x===void 0?void 0:x.icon))&&e("span",{class:"icon",innerHTML:H("icon")||((O=j===null||j===void 0?void 0:j.icon)===null||O===void 0?void 0:O.icon)}),(j===null||j===void 0?void 0:j.dataType)!=="element"&&!r(this.el,k)&&e("ic-typography",{variant:"body",class:{[`cell-emphasis-${this.isObject(t)&&H("emphasis")||(j===null||j===void 0?void 0:j.emphasis)||d}`]:this.isObject(t)&&!!H("emphasis")||!!(j===null||j===void 0?void 0:j.emphasis)||!!d,[`text-${this.density}`]:this.notDefaultDensity()}},this.isObject(t)&&(j===null||j===void 0?void 0:j.dataType)!=="date"?Object.keys(t).includes("href")?e("ic-link",{href:H("href")},H("data")):H("data"):this.getCellContent(t,j===null||j===void 0?void 0:j.dataType)))))}}))};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((t=>!!t));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",itemLabel:"Item",pageLabel:"Page",hideRangeLabel:false,hideAllFromItemsPerPage:false,theme:"inherit",monochrome: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()}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(){this.loadingIndicator.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(){const{caption:t,createColumnHeaders:i,createRows:s,createUpdatingIndicator:o,data:a,hideColumnHeaders:l,loading:h,loadingOptions:d,paginationBarOptions:c,scrollable:u,scrollOffset:v,showPagination:g,sortable:p,sortedColumnOrder:m,sortedColumn:f,stickyColumnHeaders:b,updateScrollOffset:w,updating:y}=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:u},tabIndex:u?0:null,onScroll:w},r(this.el,"title-bar")&&e("slot",{name:"title-bar"}),e("table",{style:{["--table-layout"]:this.tableLayout}},e("caption",{class:"table-caption"},t),!l&&e("thead",{class:{["column-header-sticky"]:b,["column-header-overlay"]:b&&v!==0}},e("tr",null,i())),y&&!h&&(l?e("thead",null,o()):o()),(a===null||a===void 0?void 0:a.length)>0&&!h&&e("tbody",null,s())),!(a===null||a===void 0?void 0:a.length)&&!h&&(r(this.el,"empty-state")?e("slot",{name:"empty-state"}):e("ic-empty-state",{aligned:"center",heading:"No Data",class:"loading-empty"}))),h&&e("ic-loading-indicator",{theme:d===null||d===void 0?void 0:d.appearance,monochrome:d===null||d===void 0?void 0:d.monochrome,class:{"loading-empty":h,loading:true,"show-background":d.showBackground},description:d.description||"Loading table data",label:d.label||"Loading...",labelDuration:d===null||d===void 0?void 0:d.labelDuration,max:d===null||d===void 0?void 0:d.max,min:d===null||d===void 0?void 0:d.min,progress:d===null||d===void 0?void 0:d.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:a.length,type:c.type,rangeLabelType:c.rangeLabelType,showItemsPerPageControl:c.showItemsPerPageControl,showGoToPageControl:c.showGoToPageControl,itemsPerPageOptions:c.itemsPerPageOptions,alignment:c.alignment,theme:c.theme,monochrome:c.monochrome,itemLabel:c.itemLabel,pageLabel:c.pageLabel,hideRangeLabel:c.hideRangeLabel,hideAllFromItemsPerPage:c.hideAllFromItemsPerPage})),p&&e("div",{class:"screen-reader-sort-text","aria-live":"polite"},m!=="unsorted"&&f?`${f} 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"]}}};f.style=m;export{f as ic_data_table};
|
2
|
-
//# sourceMappingURL=p-ea3e2419.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","monochrome","updatingOptions","h","colSpan","columns","class","theme","fullWidth","type","size","setRowHeight","pxToRem","setTruncationClass","getColumnWidth","columnWidth","columnWidthStyling","assign","minWidth","maxWidth","getRowHeight","currentRowHeight","columnProps","rowTextWrap","createCells","row","rowIndex","rowValues","values","rowKeys","rowOptions","getRowOptions","rowAlignment","rowEmphasis","headerIndex","indexOf","variableRowHeightVal","_a","variableRowHeight","call","index","globalRowHeight","map","cellSlotName","hasIcon","cellValue","scope","stickyRowHeaders","innerHTML","isSlotUsed","columnAlignment","vertical","_b","_c","_d","_e","horizontal","_f","_g","_h","_j","icon","name","Fragment","_k","onAllCells","_l","_m","variant","emphasis","href","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","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","width","fixCellTooltips","elements","element","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\nic-loading-indicator.ic-theme-dark {\n --inner-color: var(--ic-action-default-dark);\n --outer-color: var(--ic-action-neutral-light);\n --label-color: var(--ic-color-text-primary-dark);\n}\n\nic-loading-indicator.ic-theme-dark.ic-loading-indicator-monochrome {\n --inner-color: var(--ic-action-light);\n --outer-color: var(--ic-action-neutral-dark);\n --label-color: var(--ic-color-text-inverse-dark);\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-pressed);\n}\n\n.sort-button svg {\n color: var(--ic-architectural-black);\n}\n\n.sort-button-unsorted svg {\n color: var(--ic-color-text-tertiary);\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 --ic-typography-color: var(--ic-color-text-secondary);\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@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 monochrome?: 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 itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n hideAllFromItemsPerPage: false,\n theme: \"inherit\",\n monochrome: 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 monochrome?: boolean;\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 }\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, monochrome } =\n this.updatingOptions || {};\n return (\n <th colSpan={this.columns.length} class=\"updating-state\">\n <ic-loading-indicator\n theme={appearance}\n monochrome={monochrome}\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 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 <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) &&\n 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 </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((col) => !!col);\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 theme={loadingOptions?.appearance}\n monochrome={loadingOptions?.monochrome}\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}\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 theme={paginationBarOptions.theme}\n monochrome={paginationBarOptions.monochrome}\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,mkN,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,KAAAoB,gBAAkB,IAAIpB,KAAKmB,mBAC3BnB,KAAAqB,YAAc,MAEdrB,KAAAsB,aAAe,MACftB,KAAAuB,YAAc,MACdvB,KAAAwB,kBAAoB,MACpBxB,KAAAyB,mBAAqB,MACrBzB,KAAA0B,uBAAyB,kBACzB1B,KAAA2B,wBAA0B,eAE1B3B,KAAA4B,oBAAsB,GACtB5B,KAAA6B,cAAgB,MAEhB7B,KAAA8B,yBAAoC,MACpC9B,KAAA+B,sBAAwB,MACxB/B,KAAAgC,qBAAuC,KAEvChC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