@ukic/canary-web-components 2.0.0-canary.8 → 3.0.0-canary.1
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/date-helpers-c9551119.js +150 -0
- package/dist/cjs/date-helpers-c9551119.js.map +1 -0
- package/dist/cjs/{helpers-b525d45a.js → helpers-33b42cd6.js} +101 -102
- package/dist/cjs/helpers-33b42cd6.js.map +1 -0
- package/dist/cjs/{helpers-93c5fc92.js → helpers-6817cfbb.js} +209 -12
- package/dist/cjs/helpers-6817cfbb.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +31 -9
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +7 -8
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +28 -10
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +17 -8
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +67 -117
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +37 -11
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +8 -7
- package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +121 -128
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +131 -0
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-card-vertical.cjs.entry.js +149 -0
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +27 -20
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +45 -40
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +40 -29
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +14 -5
- package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-list.cjs.entry.js +32 -0
- package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-data-row.cjs.entry.js +12 -12
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +57 -0
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-data-table.cjs.entry.js +805 -65
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +1110 -0
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-date-picker.cjs.entry.js +1069 -0
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-dialog.cjs.entry.js +27 -101
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +2 -3
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +317 -0
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +9 -10
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +6 -8
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +9 -10
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +27 -12
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -8
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +156 -0
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-link.cjs.entry.js +51 -24
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +2 -3
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +6 -13
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +186 -47
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
- package/dist/cjs/{ic-input-component-container_3.cjs.entry.js → ic-menu.cjs.entry.js} +17 -86
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-navigation-button.cjs.entry.js +28 -8
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +23 -21
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +33 -38
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +3 -4
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +10 -12
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +226 -185
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +15 -21
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +75 -51
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +44 -53
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +23 -30
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +20 -69
- package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +8 -9
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-skeleton.cjs.entry.js +17 -37
- package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +7 -15
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +42 -43
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +45 -24
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +7 -9
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +35 -18
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +25 -11
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +6 -13
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +10 -9
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +39 -25
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +6 -7
- package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +88 -35
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +17 -17
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +15 -14
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +62 -86
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +241 -0
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-tree-view.cjs.entry.js +203 -0
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-typography.cjs.entry.js +55 -19
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-4cf27b16.js +38 -18
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/arrow-dropdown.svg +3 -0
- package/dist/collection/assets/calendar.svg +3 -0
- package/dist/collection/collection-manifest.json +9 -3
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +661 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +373 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js +2 -0
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js.map +1 -0
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +130 -0
- package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -0
- package/dist/collection/components/ic-data-table/ic-data-table.css +155 -10
- package/dist/collection/components/ic-data-table/ic-data-table.js +1174 -90
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +758 -40
- 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 +339 -3
- 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 +93 -0
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +160 -0
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -0
- package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js +11 -0
- package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +70 -0
- package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +1 -0
- package/dist/collection/components/ic-date-input/ic-date-input.css +560 -0
- package/dist/collection/components/ic-date-input/ic-date-input.js +1775 -0
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -0
- package/dist/collection/components/ic-date-input/story-data.js +28 -0
- package/dist/collection/components/ic-date-input/story-data.js.map +1 -0
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +1158 -0
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -0
- package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js +42 -0
- package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +1 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.css +880 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +1566 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -0
- package/dist/collection/components/ic-date-picker/ic-day-button.js +36 -0
- package/dist/collection/components/ic-date-picker/ic-day-button.js.map +1 -0
- package/dist/collection/components/ic-date-picker/ic-month-picker.js +29 -0
- package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +1 -0
- package/dist/collection/components/ic-date-picker/ic-year-picker.js +39 -0
- package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +1 -0
- package/dist/collection/components/ic-date-picker/story-data.js +148 -0
- package/dist/collection/components/ic-date-picker/story-data.js.map +1 -0
- package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js +13 -0
- package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js +207 -0
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js.map +1 -0
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +1030 -0
- package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -0
- package/dist/collection/components/ic-menu-with-multi/ic-menu.css +25 -14
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js +189 -71
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +229 -52
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +173 -158
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +56 -11
- package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
- package/dist/collection/components/ic-select-with-multi/ic-select.css +14 -12
- package/dist/collection/components/ic-select-with-multi/ic-select.js +18 -147
- package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +7 -7
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.css +172 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +592 -0
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -0
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +114 -0
- package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.css +59 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +296 -0
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -0
- package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js +85 -0
- package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js.map +1 -0
- package/dist/collection/utils/constants.js +55 -0
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/date-helpers.js +133 -0
- package/dist/collection/utils/date-helpers.js.map +1 -0
- package/dist/collection/utils/helpers.js +302 -10
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js +45 -0
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +90 -91
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +197 -12
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-accordion-group.js +39 -13
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-accordion.js +6 -6
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +132 -1
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-back-to-top.js +37 -8
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +75 -121
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +42 -10
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-breadcrumb2.js +10 -7
- package/dist/components/ic-breadcrumb2.js.map +1 -1
- package/dist/components/ic-button2.js +74 -102
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card-horizontal.d.ts +11 -0
- package/dist/components/ic-card-horizontal.js +167 -0
- package/dist/components/ic-card-horizontal.js.map +1 -0
- package/dist/components/ic-card-vertical.js +194 -0
- package/dist/components/ic-card-vertical.js.map +1 -0
- package/dist/components/ic-checkbox-group.js +31 -21
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +52 -47
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +45 -31
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-classification-banner.js +14 -5
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-data-list.js +56 -0
- package/dist/components/ic-data-list.js.map +1 -0
- package/dist/components/ic-data-row.js +14 -13
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-data-table-title-bar.d.ts +11 -0
- package/dist/components/ic-data-table-title-bar.js +136 -0
- package/dist/components/ic-data-table-title-bar.js.map +1 -0
- package/dist/components/ic-data-table.js +841 -72
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input.d.ts +11 -0
- package/dist/components/ic-date-input.js +8 -0
- package/dist/components/ic-date-input.js.map +1 -0
- package/dist/components/ic-date-input2.js +1344 -0
- package/dist/components/ic-date-input2.js.map +1 -0
- package/dist/components/ic-date-picker.d.ts +11 -0
- package/dist/components/ic-date-picker.js +1194 -0
- package/dist/components/ic-date-picker.js.map +1 -0
- package/dist/components/ic-dialog.js +29 -115
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +1 -2
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-empty-state.js +1 -57
- package/dist/components/ic-empty-state.js.map +1 -1
- package/dist/components/ic-empty-state2.js +80 -0
- package/dist/components/ic-empty-state2.js.map +1 -0
- package/dist/components/ic-footer-link-group.js +10 -10
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +13 -8
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +9 -10
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +28 -14
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +6 -8
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +26 -21
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +9 -11
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +4 -5
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-link2.js +54 -27
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +23 -19
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +2 -2
- package/dist/components/ic-menu-group.js.map +1 -1
- package/dist/components/ic-menu-item2.js +6 -12
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +15 -20
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-menu3.js +187 -49
- package/dist/components/ic-menu3.js.map +1 -1
- package/dist/components/ic-navigation-button.js +28 -8
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +23 -20
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +33 -37
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +3 -3
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-page-header.js +9 -11
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +154 -143
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +22 -12
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +50 -33
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +15 -20
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +76 -51
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +47 -60
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +21 -29
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-section-container2.js +1 -1
- package/dist/components/ic-section-container2.js.map +1 -1
- package/dist/components/ic-select-with-multi.js +15 -71
- package/dist/components/ic-select-with-multi.js.map +1 -1
- package/dist/components/ic-select2.js +59 -42
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +8 -9
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-skeleton.js +18 -43
- package/dist/components/ic-skeleton.js.map +1 -1
- package/dist/components/ic-status-tag.js +7 -15
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +48 -48
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +49 -23
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +7 -9
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +40 -20
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-group.js +27 -13
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-tab-panel.js +9 -16
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +12 -10
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +104 -113
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +45 -28
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast-region.js +7 -9
- package/dist/components/ic-toast-region.js.map +1 -1
- package/dist/components/ic-toast.js +93 -36
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +17 -17
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +16 -14
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +31 -9
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +63 -87
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/components/ic-tree-item.d.ts +11 -0
- package/dist/components/ic-tree-item.js +286 -0
- package/dist/components/ic-tree-item.js.map +1 -0
- package/dist/components/ic-tree-view.d.ts +11 -0
- package/dist/components/ic-tree-view.js +237 -0
- package/dist/components/ic-tree-view.js.map +1 -0
- package/dist/components/ic-typography2.js +62 -21
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.css +38 -20
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-06eeb7f2.entry.js +2 -0
- package/dist/core/p-06eeb7f2.entry.js.map +1 -0
- package/dist/core/p-0922c552.entry.js +2 -0
- package/dist/core/p-0922c552.entry.js.map +1 -0
- package/dist/core/p-0bc0e852.entry.js +2 -0
- package/dist/core/p-0bc0e852.entry.js.map +1 -0
- package/dist/core/p-108a9029.entry.js +2 -0
- package/dist/core/p-108a9029.entry.js.map +1 -0
- package/dist/core/p-13100d3c.entry.js +2 -0
- package/dist/core/p-13100d3c.entry.js.map +1 -0
- package/dist/core/p-1769df1d.entry.js +2 -0
- package/dist/core/p-1769df1d.entry.js.map +1 -0
- package/dist/core/p-202bc922.entry.js +2 -0
- package/dist/core/p-202bc922.entry.js.map +1 -0
- package/dist/core/p-266341f5.entry.js +2 -0
- package/dist/core/p-266341f5.entry.js.map +1 -0
- package/dist/core/p-297e99cf.js +2 -0
- package/dist/core/p-297e99cf.js.map +1 -0
- package/dist/core/p-306def43.entry.js +2 -0
- package/dist/core/p-306def43.entry.js.map +1 -0
- package/dist/core/p-30b046b2.entry.js +2 -0
- package/dist/core/p-30b046b2.entry.js.map +1 -0
- package/dist/core/p-33dd24eb.js +2 -0
- package/dist/core/p-33dd24eb.js.map +1 -0
- package/dist/core/p-3778cc5e.entry.js +2 -0
- package/dist/core/p-3778cc5e.entry.js.map +1 -0
- package/dist/core/p-383a5a76.entry.js +2 -0
- package/dist/core/p-383a5a76.entry.js.map +1 -0
- package/dist/core/p-3a0510e2.entry.js +2 -0
- package/dist/core/p-3a0510e2.entry.js.map +1 -0
- package/dist/core/p-3ace51f5.entry.js +2 -0
- package/dist/core/p-3ace51f5.entry.js.map +1 -0
- package/dist/core/p-3ef28704.entry.js +2 -0
- package/dist/core/p-3ef28704.entry.js.map +1 -0
- package/dist/core/p-3f0391c1.entry.js +2 -0
- package/dist/core/p-3f0391c1.entry.js.map +1 -0
- package/dist/core/p-41fecc61.entry.js +2 -0
- package/dist/core/p-41fecc61.entry.js.map +1 -0
- package/dist/core/p-46cb94a2.entry.js +2 -0
- package/dist/core/p-46cb94a2.entry.js.map +1 -0
- package/dist/core/p-4e67f127.entry.js +2 -0
- package/dist/core/p-4e67f127.entry.js.map +1 -0
- package/dist/core/p-505250cf.entry.js +2 -0
- package/dist/core/p-505250cf.entry.js.map +1 -0
- package/dist/core/p-50e48f4d.entry.js +2 -0
- package/dist/core/p-50e48f4d.entry.js.map +1 -0
- package/dist/core/p-56e7459a.entry.js +2 -0
- package/dist/core/p-56e7459a.entry.js.map +1 -0
- package/dist/core/p-59028160.entry.js +2 -0
- package/dist/core/p-59028160.entry.js.map +1 -0
- package/dist/core/p-5cfb5821.entry.js +2 -0
- package/dist/core/p-5cfb5821.entry.js.map +1 -0
- package/dist/core/p-5e6fd734.entry.js +2 -0
- package/dist/core/p-5e6fd734.entry.js.map +1 -0
- package/dist/core/p-5f313e1a.entry.js +2 -0
- package/dist/core/p-5f313e1a.entry.js.map +1 -0
- package/dist/core/{p-c2b5e7b1.entry.js → p-5f5403e2.entry.js} +2 -2
- package/dist/core/{p-c2b5e7b1.entry.js.map → p-5f5403e2.entry.js.map} +1 -1
- package/dist/core/p-710c6a42.entry.js +2 -0
- package/dist/core/p-710c6a42.entry.js.map +1 -0
- package/dist/core/p-73b40c79.entry.js +2 -0
- package/dist/core/p-73b40c79.entry.js.map +1 -0
- package/dist/core/p-77a32de5.entry.js +2 -0
- package/dist/core/p-77a32de5.entry.js.map +1 -0
- package/dist/core/p-7a9de008.entry.js +2 -0
- package/dist/core/p-7a9de008.entry.js.map +1 -0
- package/dist/core/p-801414e2.entry.js +2 -0
- package/dist/core/p-801414e2.entry.js.map +1 -0
- package/dist/core/p-82ba744d.entry.js +2 -0
- package/dist/core/p-82ba744d.entry.js.map +1 -0
- package/dist/core/p-897b8d16.entry.js +2 -0
- package/dist/core/p-897b8d16.entry.js.map +1 -0
- package/dist/core/p-9397b15b.js +2 -0
- package/dist/core/p-9397b15b.js.map +1 -0
- package/dist/core/p-9af6adb1.entry.js +2 -0
- package/dist/core/p-9af6adb1.entry.js.map +1 -0
- package/dist/core/p-9b54feca.entry.js +2 -0
- package/dist/core/p-9b54feca.entry.js.map +1 -0
- package/dist/core/{p-356b8a4c.entry.js → p-9f3cf053.entry.js} +2 -2
- package/dist/core/{p-356b8a4c.entry.js.map → p-9f3cf053.entry.js.map} +1 -1
- package/dist/core/p-a57cd616.entry.js +2 -0
- package/dist/core/p-a57cd616.entry.js.map +1 -0
- package/dist/core/p-a5eaed1a.entry.js +2 -0
- package/dist/core/p-a5eaed1a.entry.js.map +1 -0
- package/dist/core/p-a78cf2cb.entry.js +2 -0
- package/dist/core/p-a78cf2cb.entry.js.map +1 -0
- package/dist/core/p-a91340b4.entry.js +2 -0
- package/dist/core/p-a91340b4.entry.js.map +1 -0
- package/dist/core/p-aee8d45b.entry.js +2 -0
- package/dist/core/p-aee8d45b.entry.js.map +1 -0
- package/dist/core/{p-452985d9.entry.js → p-b40ecaef.entry.js} +2 -2
- package/dist/core/p-b40ecaef.entry.js.map +1 -0
- package/dist/core/p-badd4c8d.entry.js +2 -0
- package/dist/core/p-badd4c8d.entry.js.map +1 -0
- package/dist/core/p-bf670360.entry.js +2 -0
- package/dist/core/{p-a434c3d4.entry.js.map → p-bf670360.entry.js.map} +1 -1
- package/dist/core/p-c033e7d6.entry.js +2 -0
- package/dist/core/p-c033e7d6.entry.js.map +1 -0
- package/dist/core/p-c07af2d8.entry.js +2 -0
- package/dist/core/p-c07af2d8.entry.js.map +1 -0
- package/dist/core/p-c21d0db8.entry.js +2 -0
- package/dist/core/p-c21d0db8.entry.js.map +1 -0
- package/dist/core/p-c678f73d.entry.js +2 -0
- package/dist/core/p-c678f73d.entry.js.map +1 -0
- package/dist/core/p-c6ae9bad.entry.js +2 -0
- package/dist/core/p-c6ae9bad.entry.js.map +1 -0
- package/dist/core/p-c6c1e08e.entry.js +2 -0
- package/dist/core/p-c6c1e08e.entry.js.map +1 -0
- package/dist/core/p-cb6cebdd.entry.js +2 -0
- package/dist/core/p-cb6cebdd.entry.js.map +1 -0
- package/dist/core/p-d03374fc.entry.js +2 -0
- package/dist/core/p-d03374fc.entry.js.map +1 -0
- package/dist/core/p-d16f364a.entry.js +2 -0
- package/dist/core/p-d16f364a.entry.js.map +1 -0
- package/dist/core/p-d239c33b.entry.js +2 -0
- package/dist/core/p-d239c33b.entry.js.map +1 -0
- package/dist/core/p-d8563643.entry.js +2 -0
- package/dist/core/p-d8563643.entry.js.map +1 -0
- package/dist/core/p-da40757f.entry.js +2 -0
- package/dist/core/p-da40757f.entry.js.map +1 -0
- package/dist/core/p-de052137.entry.js +2 -0
- package/dist/core/p-de052137.entry.js.map +1 -0
- package/dist/core/p-e5d99316.entry.js +2 -0
- package/dist/core/p-e5d99316.entry.js.map +1 -0
- package/dist/core/p-e89bb650.entry.js +2 -0
- package/dist/core/p-e89bb650.entry.js.map +1 -0
- package/dist/core/{p-baf81f30.entry.js → p-f1072c28.entry.js} +2 -2
- package/dist/core/{p-452985d9.entry.js.map → p-f1072c28.entry.js.map} +1 -1
- package/dist/core/p-f37df214.entry.js +2 -0
- package/dist/core/{p-c34848da.entry.js.map → p-f37df214.entry.js.map} +1 -1
- package/dist/core/p-f743b0eb.entry.js +2 -0
- package/dist/core/p-f743b0eb.entry.js.map +1 -0
- package/dist/core/p-f98b1afc.entry.js +2 -0
- package/dist/core/p-f98b1afc.entry.js.map +1 -0
- package/dist/core/p-fe13f1ba.entry.js +2 -0
- package/dist/core/p-fe13f1ba.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/date-helpers-0e5e32a7.js +136 -0
- package/dist/esm/date-helpers-0e5e32a7.js.map +1 -0
- package/dist/esm/helpers-5bd2012a.js +368 -0
- package/dist/esm/helpers-5bd2012a.js.map +1 -0
- package/dist/esm/{helpers-12b4266a.js → helpers-dab8ddfe.js} +91 -92
- package/dist/esm/helpers-dab8ddfe.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +31 -9
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +7 -8
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +27 -9
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +17 -8
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +67 -117
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +37 -11
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +8 -7
- package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +118 -125
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +127 -0
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
- package/dist/esm/ic-card-vertical.entry.js +145 -0
- package/dist/esm/ic-card-vertical.entry.js.map +1 -0
- package/dist/esm/ic-checkbox-group.entry.js +27 -20
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +45 -40
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +40 -29
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-classification-banner.entry.js +14 -5
- package/dist/esm/ic-classification-banner.entry.js.map +1 -1
- package/dist/esm/ic-data-list.entry.js +28 -0
- package/dist/esm/ic-data-list.entry.js.map +1 -0
- package/dist/esm/ic-data-row.entry.js +12 -12
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
- package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
- package/dist/esm/ic-data-table.entry.js +806 -66
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +1106 -0
- package/dist/esm/ic-date-input.entry.js.map +1 -0
- package/dist/esm/ic-date-picker.entry.js +1065 -0
- package/dist/esm/ic-date-picker.entry.js.map +1 -0
- package/dist/esm/ic-dialog.entry.js +27 -101
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -2
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +312 -0
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
- package/dist/esm/ic-footer-link-group.entry.js +9 -10
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +6 -8
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +9 -10
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +28 -13
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +6 -8
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +149 -0
- package/dist/esm/ic-input-component-container_4.entry.js.map +1 -0
- package/dist/esm/ic-link.entry.js +52 -25
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +2 -3
- package/dist/esm/ic-menu-group.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +6 -13
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +186 -47
- package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
- package/dist/esm/{ic-input-component-container_3.entry.js → ic-menu.entry.js} +19 -86
- package/dist/esm/ic-menu.entry.js.map +1 -0
- package/dist/esm/ic-navigation-button.entry.js +28 -8
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +23 -21
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +33 -38
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +3 -4
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +10 -12
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +219 -178
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +15 -21
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +75 -51
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +44 -53
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +19 -26
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js +1 -1
- package/dist/esm/ic-section-container.entry.js.map +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +14 -63
- package/dist/esm/ic-select-with-multi.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +8 -9
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-skeleton.entry.js +17 -37
- package/dist/esm/ic-skeleton.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +7 -15
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +42 -43
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +45 -24
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +7 -9
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +35 -18
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +25 -11
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +6 -13
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +10 -9
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-theme.entry.js +39 -25
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast-region.entry.js +6 -7
- package/dist/esm/ic-toast-region.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +88 -35
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +17 -17
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +15 -14
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +62 -86
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +237 -0
- package/dist/esm/ic-tree-item.entry.js.map +1 -0
- package/dist/esm/ic-tree-view.entry.js +199 -0
- package/dist/esm/ic-tree-view.entry.js.map +1 -0
- package/dist/esm/ic-typography.entry.js +56 -20
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-93509377.js +38 -18
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +71 -0
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.types.d.ts +1 -0
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +176 -19
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +30 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +236 -3
- package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +259 -0
- package/dist/types/components/ic-date-input/story-data.d.ts +1 -0
- package/dist/types/components/ic-date-input/test/helpers/ic-date-input.d.ts +23 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +240 -0
- package/dist/types/components/ic-date-picker/ic-day-button.d.ts +16 -0
- package/dist/types/components/ic-date-picker/ic-month-picker.d.ts +14 -0
- package/dist/types/components/ic-date-picker/ic-year-picker.d.ts +16 -0
- package/dist/types/components/ic-date-picker/story-data.d.ts +22 -0
- package/dist/types/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +12 -6
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +37 -18
- package/dist/types/components/ic-select-with-multi/ic-select.d.ts +3 -33
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +95 -0
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +40 -0
- package/dist/types/components.d.ts +978 -114
- package/dist/types/interface.d.ts +1 -0
- package/dist/types/utils/constants.d.ts +37 -0
- package/dist/types/utils/date-helpers.d.ts +22 -0
- package/dist/types/utils/helpers.d.ts +92 -11
- package/dist/types/utils/types.d.ts +108 -1
- package/hydrate/index.js +6683 -2381
- package/package.json +6 -6
- package/dist/cjs/helpers-93c5fc92.js.map +0 -1
- package/dist/cjs/helpers-b525d45a.js.map +0 -1
- package/dist/cjs/ic-card.cjs.entry.js +0 -126
- package/dist/cjs/ic-card.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js +0 -29
- package/dist/cjs/ic-data-entity.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +0 -38
- package/dist/cjs/ic-empty-state.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +0 -86
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-pagination-bar.cjs.entry.js +0 -269
- package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
- package/dist/cjs/types-17dba796.js +0 -16
- package/dist/cjs/types-17dba796.js.map +0 -1
- package/dist/collection/components/ic-pagination/ic-pagination.types.js +0 -2
- package/dist/collection/components/ic-pagination/ic-pagination.types.js.map +0 -1
- package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js +0 -146
- package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js.map +0 -1
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js +0 -2040
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js.map +0 -1
- package/dist/components/ic-alert2.js +0 -117
- package/dist/components/ic-alert2.js.map +0 -1
- package/dist/components/ic-card.js +0 -171
- package/dist/components/ic-card.js.map +0 -1
- package/dist/components/ic-data-entity.js +0 -53
- package/dist/components/ic-data-entity.js.map +0 -1
- package/dist/components/types.js +0 -16
- package/dist/components/types.js.map +0 -1
- package/dist/core/p-045359e1.entry.js +0 -2
- package/dist/core/p-045359e1.entry.js.map +0 -1
- package/dist/core/p-10fb4c46.entry.js +0 -2
- package/dist/core/p-10fb4c46.entry.js.map +0 -1
- package/dist/core/p-169bfa51.entry.js +0 -2
- package/dist/core/p-169bfa51.entry.js.map +0 -1
- package/dist/core/p-1ca332ca.entry.js +0 -2
- package/dist/core/p-1ca332ca.entry.js.map +0 -1
- package/dist/core/p-204ace96.entry.js +0 -2
- package/dist/core/p-204ace96.entry.js.map +0 -1
- package/dist/core/p-21150122.entry.js +0 -2
- package/dist/core/p-21150122.entry.js.map +0 -1
- package/dist/core/p-2eac7dcc.entry.js +0 -2
- package/dist/core/p-2eac7dcc.entry.js.map +0 -1
- package/dist/core/p-3803a5b5.entry.js +0 -2
- package/dist/core/p-3803a5b5.entry.js.map +0 -1
- package/dist/core/p-4753bac8.entry.js +0 -2
- package/dist/core/p-4753bac8.entry.js.map +0 -1
- package/dist/core/p-4baa0916.entry.js +0 -2
- package/dist/core/p-4baa0916.entry.js.map +0 -1
- package/dist/core/p-4f413fc0.entry.js +0 -2
- package/dist/core/p-4f413fc0.entry.js.map +0 -1
- package/dist/core/p-595be57d.entry.js +0 -2
- package/dist/core/p-595be57d.entry.js.map +0 -1
- package/dist/core/p-5ae93c16.entry.js +0 -2
- package/dist/core/p-5ae93c16.entry.js.map +0 -1
- package/dist/core/p-5e0c830b.entry.js +0 -2
- package/dist/core/p-5e0c830b.entry.js.map +0 -1
- package/dist/core/p-624d4f5f.entry.js +0 -2
- package/dist/core/p-624d4f5f.entry.js.map +0 -1
- package/dist/core/p-6933f8e9.entry.js +0 -2
- package/dist/core/p-6933f8e9.entry.js.map +0 -1
- package/dist/core/p-6c3044b6.entry.js +0 -2
- package/dist/core/p-6c3044b6.entry.js.map +0 -1
- package/dist/core/p-73be1251.entry.js +0 -2
- package/dist/core/p-73be1251.entry.js.map +0 -1
- package/dist/core/p-75dac3d1.entry.js +0 -2
- package/dist/core/p-75dac3d1.entry.js.map +0 -1
- package/dist/core/p-76915584.entry.js +0 -2
- package/dist/core/p-76915584.entry.js.map +0 -1
- package/dist/core/p-7ef8d616.entry.js +0 -2
- package/dist/core/p-7ef8d616.entry.js.map +0 -1
- package/dist/core/p-81ddc39d.entry.js +0 -2
- package/dist/core/p-81ddc39d.entry.js.map +0 -1
- package/dist/core/p-869954a2.entry.js +0 -2
- package/dist/core/p-869954a2.entry.js.map +0 -1
- package/dist/core/p-88d54b72.entry.js +0 -2
- package/dist/core/p-88d54b72.entry.js.map +0 -1
- package/dist/core/p-8b08d8fe.entry.js +0 -2
- package/dist/core/p-8b08d8fe.entry.js.map +0 -1
- package/dist/core/p-917c5721.entry.js +0 -2
- package/dist/core/p-917c5721.entry.js.map +0 -1
- package/dist/core/p-942282cd.entry.js +0 -2
- package/dist/core/p-942282cd.entry.js.map +0 -1
- package/dist/core/p-9777ebb1.entry.js +0 -2
- package/dist/core/p-9777ebb1.entry.js.map +0 -1
- package/dist/core/p-99cad6c2.js +0 -2
- package/dist/core/p-99cad6c2.js.map +0 -1
- package/dist/core/p-9caf19eb.js +0 -2
- package/dist/core/p-9caf19eb.js.map +0 -1
- package/dist/core/p-a0f8efb2.entry.js +0 -2
- package/dist/core/p-a0f8efb2.entry.js.map +0 -1
- package/dist/core/p-a31031a5.entry.js +0 -2
- package/dist/core/p-a31031a5.entry.js.map +0 -1
- package/dist/core/p-a434c3d4.entry.js +0 -2
- package/dist/core/p-a43c12cd.entry.js +0 -2
- package/dist/core/p-a43c12cd.entry.js.map +0 -1
- package/dist/core/p-a50c3b9e.entry.js +0 -2
- package/dist/core/p-a50c3b9e.entry.js.map +0 -1
- package/dist/core/p-ab09986c.entry.js +0 -2
- package/dist/core/p-ab09986c.entry.js.map +0 -1
- package/dist/core/p-ac4e40a7.entry.js +0 -2
- package/dist/core/p-ac4e40a7.entry.js.map +0 -1
- package/dist/core/p-b2aa3d7c.entry.js +0 -2
- package/dist/core/p-b2aa3d7c.entry.js.map +0 -1
- package/dist/core/p-b82dcc29.entry.js +0 -2
- package/dist/core/p-b82dcc29.entry.js.map +0 -1
- package/dist/core/p-ba86928c.entry.js +0 -2
- package/dist/core/p-ba86928c.entry.js.map +0 -1
- package/dist/core/p-baf81f30.entry.js.map +0 -1
- package/dist/core/p-c125b65a.entry.js +0 -2
- package/dist/core/p-c125b65a.entry.js.map +0 -1
- package/dist/core/p-c34848da.entry.js +0 -2
- package/dist/core/p-d8469ac0.entry.js +0 -2
- package/dist/core/p-d8469ac0.entry.js.map +0 -1
- package/dist/core/p-db9c03c0.entry.js +0 -2
- package/dist/core/p-db9c03c0.entry.js.map +0 -1
- package/dist/core/p-e0462b23.entry.js +0 -2
- package/dist/core/p-e0462b23.entry.js.map +0 -1
- package/dist/core/p-e0a94f2d.entry.js +0 -2
- package/dist/core/p-e0a94f2d.entry.js.map +0 -1
- package/dist/core/p-e189f1d0.entry.js +0 -2
- package/dist/core/p-e189f1d0.entry.js.map +0 -1
- package/dist/core/p-e3997d60.entry.js +0 -2
- package/dist/core/p-e3997d60.entry.js.map +0 -1
- package/dist/core/p-e79e0292.entry.js +0 -2
- package/dist/core/p-e79e0292.entry.js.map +0 -1
- package/dist/core/p-e834344e.entry.js +0 -2
- package/dist/core/p-e834344e.entry.js.map +0 -1
- package/dist/core/p-f14454b1.entry.js +0 -2
- package/dist/core/p-f14454b1.entry.js.map +0 -1
- package/dist/core/p-f3c840cd.entry.js +0 -2
- package/dist/core/p-f3c840cd.entry.js.map +0 -1
- package/dist/core/p-f6888309.entry.js +0 -2
- package/dist/core/p-f6888309.entry.js.map +0 -1
- package/dist/core/p-f74a8752.entry.js +0 -2
- package/dist/core/p-f74a8752.entry.js.map +0 -1
- package/dist/core/p-f7a14c01.entry.js +0 -2
- package/dist/core/p-f7a14c01.entry.js.map +0 -1
- package/dist/core/p-f843da01.entry.js +0 -2
- package/dist/core/p-f843da01.entry.js.map +0 -1
- package/dist/core/p-fc5611e2.entry.js +0 -2
- package/dist/core/p-fc5611e2.entry.js.map +0 -1
- package/dist/core/p-fd186591.js +0 -2
- package/dist/core/p-fd186591.js.map +0 -1
- package/dist/core/p-fde45b29.entry.js +0 -2
- package/dist/core/p-fde45b29.entry.js.map +0 -1
- package/dist/esm/helpers-12b4266a.js.map +0 -1
- package/dist/esm/helpers-5271897c.js +0 -183
- package/dist/esm/helpers-5271897c.js.map +0 -1
- package/dist/esm/ic-card.entry.js +0 -122
- package/dist/esm/ic-card.entry.js.map +0 -1
- package/dist/esm/ic-data-entity.entry.js +0 -25
- package/dist/esm/ic-data-entity.entry.js.map +0 -1
- package/dist/esm/ic-empty-state.entry.js +0 -34
- package/dist/esm/ic-empty-state.entry.js.map +0 -1
- package/dist/esm/ic-input-component-container_3.entry.js.map +0 -1
- package/dist/esm/ic-input-label_2.entry.js +0 -81
- package/dist/esm/ic-input-label_2.entry.js.map +0 -1
- package/dist/esm/ic-pagination-bar.entry.js +0 -265
- package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
- package/dist/esm/types-f605c21c.js +0 -16
- package/dist/esm/types-f605c21c.js.map +0 -1
- package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +0 -6
- /package/dist/types/components/{ic-select-with-multi/test/a11y/ic-select.test.a11y.d.ts → ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts} +0 -0
@@ -3,6 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-4cf27b16.js');
|
6
|
+
const helpers = require('./helpers-6817cfbb.js');
|
6
7
|
|
7
8
|
const unsortedIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">
|
8
9
|
<path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>
|
@@ -16,16 +17,180 @@ const descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 2
|
|
16
17
|
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
17
18
|
</svg>`;
|
18
19
|
|
19
|
-
const icDataTableCss = ":host{position:relative;display:
|
20
|
+
const icDataTableCss = ":host{position:relative;display:inline-flex;max-height:100%;width:var(--table-width, 100%);height:100%;min-width:var(--table-min-width);max-width:var(--table-max-width)}tbody{vertical-align:top}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column;width:100%}.cell-container{display:flex;min-height:1.5rem;overflow-y:hidden;height:var(--row-height)}.truncation-show-hide{overflow:visible;display:block}.cell-icon.truncation-show-hide{display:flex}.cell-container:not(.data-type-element,.truncation-show-hide){overflow-x:hidden}ic-loading-indicator{position:sticky;top:20px}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination=\"true\"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:var(--table-layout, \"fixed\");border-spacing:0;width:100%;height:var(--table-height, auto)}.table-row-container:focus{outline:none;box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast);z-index:1}:host([embedded=\"true\"]) .table-row-container{border:var(--ic-border-light)}.column-header-inner-container{padding:var(--ic-space-xs);box-sizing:border-box}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{position:sticky;top:0;z-index:1;box-shadow:0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%)}.row-header-sticky{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-color:var(--ic-table-row-selected) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-action-dark-bg-hover)}.sort-button:active{background-color:var(--ic-action-dark-bg-active)}.sort-button svg{color:var(--ic-architectural-black)}.sort-button-unsorted svg{color:var(--ic-color-tertiary-text)}.table-density-dense .column-header-inner-container,td.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious .column-header-inner-container,td.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.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)}.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-secondary-text)}.cell-emphasis-high{font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}.loading-empty{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}.updating-state{padding:0;border-bottom:var(--ic-border-light)}.updating-state-headers{border-bottom:none}.loading{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow)}.loading.show-background{background-color:var(--ic-architectural-white);border:var(--ic-border-light)}.loading.show{opacity:1}.icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}.column-header-alignment-right>.icon,.row-header-alignment-right>.icon,.cell-alignment-right>.icon,.column-header-alignment-right>::slotted(svg),.row-header-alignment-right>::slotted(svg),.cell-alignment-right>::slotted(svg){margin-right:auto}.column-header-alignment-center>ic-typography,.row-header-alignment-right>ic-typography,.cell-alignment-center>ic-typography{flex:1}.icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}.truncation-tooltip ic-typography{display:-webkit-box;-webkit-line-clamp:var(--ic-line-clamp, 0);-webkit-box-orient:vertical;overflow:hidden}.truncation-tooltip ic-typography,.truncation-show-hide ic-typography{white-space:normal}.ic-tooltip-overflow{overflow:hidden;width:100%}@media screen and (min-width: 576px){.column-header-inner-container{display:flex;align-items:center}}";
|
20
21
|
|
21
22
|
const DataTable = class {
|
22
23
|
constructor(hostRef) {
|
23
24
|
index.registerInstance(this, hostRef);
|
25
|
+
this.icRowHeightChange = index.createEvent(this, "icRowHeightChange", 7);
|
26
|
+
this.icSortChange = index.createEvent(this, "icSortChange", 7);
|
27
|
+
this.DENSITY_HEIGHT_MULTIPLIER = {
|
28
|
+
dense: 0.8,
|
29
|
+
default: 1,
|
30
|
+
spacious: 1.2,
|
31
|
+
};
|
32
|
+
this.DENSITY_PADDING_HEIGHT_DIFF = {
|
33
|
+
dense: 8,
|
34
|
+
default: 16,
|
35
|
+
spacious: 20,
|
36
|
+
};
|
24
37
|
this.SORT_ICONS = {
|
25
38
|
unsorted: unsortedIcon,
|
26
39
|
ascending: ascendingIcon,
|
27
40
|
descending: descendingIcon,
|
28
41
|
};
|
42
|
+
this.hasLoadedForOneSecond = true;
|
43
|
+
this.resizeObserver = null;
|
44
|
+
this.SHOW_HIDE_STRING = "show-hide";
|
45
|
+
this.SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;
|
46
|
+
this.TOOLTIP_STRING = "tooltip";
|
47
|
+
this.TOOLTIP = `ic-${this.TOOLTIP_STRING}`;
|
48
|
+
this.TEXT_WRAP_STRING = "text-wrap";
|
49
|
+
this.TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;
|
50
|
+
this.dataUpdated = false;
|
51
|
+
this.rowHeightSet = false;
|
52
|
+
this.initialLoad = false;
|
53
|
+
this.icPageChangeEvent = false;
|
54
|
+
this.itemsPerPageChange = false;
|
55
|
+
this.DATA_ROW_HEIGHT_STRING = "data-row-height";
|
56
|
+
this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
|
57
|
+
this.DEFAULT_LINE_HEIGHT = 24;
|
58
|
+
this.densityUpdate = false;
|
59
|
+
this.truncationPatternUpdated = false;
|
60
|
+
this.isNewDebounceDelaySet = false;
|
61
|
+
this.updateSetRowHeight = (typographyEl) => {
|
62
|
+
const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
|
63
|
+
if (typographyEl) {
|
64
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
65
|
+
const rowHeight = fontSize *
|
66
|
+
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
67
|
+
if (typographyEl.scrollHeight > rowHeight) {
|
68
|
+
cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
|
69
|
+
}
|
70
|
+
}
|
71
|
+
else {
|
72
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
73
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
74
|
+
const rowHeight = fontSize *
|
75
|
+
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
76
|
+
if (typographyEl.scrollHeight > rowHeight) {
|
77
|
+
cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
|
78
|
+
}
|
79
|
+
});
|
80
|
+
}
|
81
|
+
};
|
82
|
+
this.debounceDataTruncation = () => {
|
83
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
84
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
85
|
+
if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
86
|
+
this.resizeObserver = new ResizeObserver(
|
87
|
+
// This gets triggered twice due to updated data and see more/see less button
|
88
|
+
helpers.dynamicDebounce(() => {
|
89
|
+
this.dataTruncation(typographyEl);
|
90
|
+
if (!this.isNewDebounceDelaySet) {
|
91
|
+
this.setNewDebounceDelay(200);
|
92
|
+
}
|
93
|
+
}, () => this.debounceDelay));
|
94
|
+
this.resizeObserver.observe(typographyEl);
|
95
|
+
}
|
96
|
+
});
|
97
|
+
};
|
98
|
+
this.setNewDebounceDelay = (delay) => {
|
99
|
+
this.debounceDelay = delay;
|
100
|
+
this.isNewDebounceDelaySet = true;
|
101
|
+
};
|
102
|
+
this.getLines = (height) => Math.floor(height / this.DEFAULT_LINE_HEIGHT);
|
103
|
+
this.truncate = (typographyEl, cellContainer, tooltip) => {
|
104
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
|
105
|
+
//24 is the height of a single line
|
106
|
+
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
107
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
108
|
+
this.addTooltipTruncation(typographyEl, cellContainer, tooltip);
|
109
|
+
}
|
110
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
111
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
else {
|
116
|
+
if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
|
117
|
+
typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
|
118
|
+
cellContainer.appendChild(typographyEl);
|
119
|
+
tooltip.remove();
|
120
|
+
}
|
121
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
122
|
+
!helpers.isEmptyString(typographyEl.getAttribute("max-lines"))) {
|
123
|
+
this.resetShowHideTruncation(typographyEl);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
};
|
127
|
+
this.dataTruncation = (typographyEl) => {
|
128
|
+
// Tooltip truncation mentioned in AC. Will need revisiting
|
129
|
+
const tooltip = this.getTooltip(typographyEl);
|
130
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
131
|
+
if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.classList.contains("data-type-element")) ||
|
132
|
+
this.dataUpdated) {
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
136
|
+
typographyEl.shadowRoot.querySelector("button")) {
|
137
|
+
const showHideBtn = typographyEl.shadowRoot.querySelector("button");
|
138
|
+
// If the see more/see less is present and the max lines is equal to the cell container
|
139
|
+
// remove the see more/see less button
|
140
|
+
if (showHideBtn) {
|
141
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
142
|
+
if (this.getLines(truncWrapper.scrollHeight) ===
|
143
|
+
+typographyEl.getAttribute("max-lines")) {
|
144
|
+
this.resetShowHideTruncation(typographyEl);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
// Deals with setting and resetting row height and re-truncating data
|
149
|
+
if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {
|
150
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
151
|
+
// cellContainer.clientHeight - 24 removes the extra line by see more/see less
|
152
|
+
if (truncWrapper &&
|
153
|
+
cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >
|
154
|
+
truncWrapper.scrollHeight) {
|
155
|
+
this.resetShowHideTruncation(typographyEl);
|
156
|
+
return;
|
157
|
+
}
|
158
|
+
if (typographyEl.scrollHeight > cellContainer.clientHeight) {
|
159
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
160
|
+
return;
|
161
|
+
}
|
162
|
+
}
|
163
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > 0 &&
|
164
|
+
(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > 0 &&
|
165
|
+
(typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) === (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
|
166
|
+
if (tooltip) {
|
167
|
+
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
168
|
+
}
|
169
|
+
return;
|
170
|
+
}
|
171
|
+
this.truncate(typographyEl, cellContainer, tooltip);
|
172
|
+
};
|
173
|
+
this.removeTextWrap = () => {
|
174
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
175
|
+
const tableCell = typographyEl.closest("td");
|
176
|
+
if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {
|
177
|
+
tableCell.classList.remove(this.TEXT_WRAP_STRING);
|
178
|
+
}
|
179
|
+
});
|
180
|
+
};
|
181
|
+
this.getCellContainer = (typographyEl) => {
|
182
|
+
return typographyEl.closest(".cell-container");
|
183
|
+
};
|
184
|
+
this.deleteTextWrapDataKey = (array) => Array.isArray(array) &&
|
185
|
+
array.forEach((val) => val.textWrap && delete val.textWrap);
|
186
|
+
this.startLoadingTimer = () => {
|
187
|
+
this.hasLoadedForOneSecond = false;
|
188
|
+
this.timerStarted = Date.now();
|
189
|
+
setTimeout(() => {
|
190
|
+
this.hasLoadedForOneSecond = true;
|
191
|
+
this.timerStarted = null;
|
192
|
+
}, this.minimumLoadingDisplayDuration);
|
193
|
+
};
|
29
194
|
this.isObject = (value) => typeof value === "object";
|
30
195
|
this.notDefaultDensity = () => this.density !== "default";
|
31
196
|
this.getCellContent = (cell, dataType) => {
|
@@ -43,9 +208,60 @@ const DataTable = class {
|
|
43
208
|
return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
|
44
209
|
}
|
45
210
|
};
|
46
|
-
this.
|
211
|
+
this.getCellOptions = (cell, key) => {
|
212
|
+
if (!(this.isObject(cell) && Object.keys(cell).includes(key)))
|
213
|
+
return;
|
214
|
+
return this.getObjectValue(cell, key);
|
215
|
+
};
|
216
|
+
this.createUpdatingIndicator = () => {
|
217
|
+
const { appearance, description, max, min, progress } = this.updatingOptions || {};
|
218
|
+
return (index.h("th", { colSpan: this.columns.length, class: "updating-state" }, index.h("ic-loading-indicator", { appearance: appearance, description: description || "Updating table data", fullWidth: true, max: max, min: min, progress: progress, type: "linear", size: "small" })));
|
219
|
+
};
|
220
|
+
this.setRowHeight = (height) => {
|
221
|
+
return helpers.pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
|
222
|
+
this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
|
223
|
+
};
|
224
|
+
this.setTruncationClass = () => {
|
225
|
+
if (this.truncationPattern) {
|
226
|
+
return { [`truncation-${this.truncationPattern}`]: true };
|
227
|
+
}
|
228
|
+
return {};
|
229
|
+
};
|
230
|
+
this.getColumnWidth = (columnWidth) => {
|
231
|
+
// TODO: Setting max width on columns
|
232
|
+
let columnWidthStyling = {};
|
233
|
+
if (columnWidth) {
|
234
|
+
if (typeof columnWidth === "string") {
|
235
|
+
columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-width"]: columnWidth });
|
236
|
+
}
|
237
|
+
if (typeof columnWidth === "object" && !!Object.keys(columnWidth)) {
|
238
|
+
if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth) {
|
239
|
+
columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-min-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth });
|
240
|
+
}
|
241
|
+
if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth) {
|
242
|
+
columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-max-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth });
|
243
|
+
}
|
244
|
+
}
|
245
|
+
}
|
246
|
+
return columnWidthStyling;
|
247
|
+
};
|
248
|
+
this.getRowHeight = (currentRowHeight, columnProps, rowTextWrap, cell) => {
|
249
|
+
if ((this.truncationPattern || currentRowHeight) &&
|
250
|
+
!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) &&
|
251
|
+
!rowTextWrap &&
|
252
|
+
!this.getCellOptions(cell, "textWrap") &&
|
253
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element") {
|
254
|
+
return {
|
255
|
+
[this.ROW_HEIGHT_CSS_VARIABLE]: this.setRowHeight(currentRowHeight),
|
256
|
+
};
|
257
|
+
}
|
258
|
+
return {};
|
259
|
+
};
|
260
|
+
this.createCells = (row, rowIndex) => {
|
261
|
+
var _a;
|
47
262
|
const rowValues = Object.values(row);
|
48
263
|
const rowKeys = Object.keys(row);
|
264
|
+
const rowOptions = this.getRowOptions(rowKeys, rowValues);
|
49
265
|
let rowAlignment;
|
50
266
|
let rowEmphasis;
|
51
267
|
const headerIndex = rowKeys.indexOf("header");
|
@@ -53,44 +269,70 @@ const DataTable = class {
|
|
53
269
|
rowAlignment = this.getObjectValue(rowValues[headerIndex], "rowAlignment");
|
54
270
|
rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
|
55
271
|
}
|
272
|
+
const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index: rowIndex }));
|
273
|
+
const currentRowHeight = variableRowHeightVal
|
274
|
+
? variableRowHeightVal !== "auto" && variableRowHeightVal
|
275
|
+
: this.globalRowHeight !== "auto" && this.globalRowHeight;
|
56
276
|
return rowValues.map((cell, index$1) => {
|
57
|
-
|
277
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
278
|
+
const columnProps = this.columns[index$1];
|
279
|
+
const cellSlotName = `${columnProps === null || columnProps === void 0 ? void 0 : columnProps.key}-${rowIndex}`;
|
280
|
+
const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
|
58
281
|
const cellValue = (key) => this.getObjectValue(cell, key);
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
282
|
+
if (rowKeys[index$1] === "header") {
|
283
|
+
return (index.h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
|
284
|
+
["row-header"]: true,
|
285
|
+
[`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
|
286
|
+
["row-header-sticky"]: this.stickyRowHeaders,
|
287
|
+
} }, cellValue("title")));
|
288
|
+
}
|
289
|
+
if (rowKeys[index$1] !== "rowOptions") {
|
290
|
+
return (index.h("td", { class: {
|
291
|
+
["table-cell"]: true,
|
292
|
+
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
293
|
+
}, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, index.h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
294
|
+
!helpers.isSlotUsed(this.el, cellSlotName)
|
295
|
+
? cell
|
296
|
+
: null, class: Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
|
297
|
+
((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
298
|
+
rowAlignment ||
|
299
|
+
this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
|
300
|
+
!!((_d = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _d === void 0 ? void 0 : _d.vertical) ||
|
301
|
+
!!rowAlignment ||
|
302
|
+
!!this.getCellAlignment(cell, "vertical"), [`cell-alignment-${((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _e === void 0 ? void 0 : _e.horizontal) ||
|
303
|
+
((_f = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _f === void 0 ? void 0 : _f.horizontal) ||
|
304
|
+
this.getCellAlignment(cell, "horizontal")}`]: !!((_g = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _g === void 0 ? void 0 : _g.horizontal) ||
|
305
|
+
!!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
|
306
|
+
!!this.getCellAlignment(cell, "horizontal"), [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true, [this.TEXT_WRAP_STRING]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) ||
|
307
|
+
(rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
|
308
|
+
!!this.getCellOptions(cell, "textWrap"), ["cell-icon"]: hasIcon || !!((_j = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _j === void 0 ? void 0 : _j.icon) }, this.setTruncationClass()), style: Object.assign(Object.assign({}, this.getRowHeight(currentRowHeight, columnProps, rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap, cell)), this.getColumnWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnWidth)), "data-row-height": this.truncationPattern || currentRowHeight
|
309
|
+
? this.setRowHeight(currentRowHeight)
|
310
|
+
: null }, helpers.isSlotUsed(this.el, cellSlotName) ? (index.h("slot", { name: cellSlotName })) : (index.h(index.Fragment, null, helpers.isSlotUsed(this.el, `${cellSlotName}-icon`) ? (index.h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_k = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _k === void 0 ? void 0 : _k.onAllCells)) && (index.h("span", { class: "icon", innerHTML: cellValue("icon") || (columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon.icon) }))), (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element" &&
|
311
|
+
!helpers.isSlotUsed(this.el, cellSlotName) && (index.h("ic-typography", { variant: "body", class: {
|
312
|
+
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
313
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
314
|
+
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
315
|
+
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
316
|
+
!!rowEmphasis,
|
317
|
+
[`text-${this.density}`]: this.notDefaultDensity(),
|
318
|
+
} }, this.isObject(cell) &&
|
319
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (index.h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType)))))))));
|
320
|
+
}
|
83
321
|
});
|
84
322
|
};
|
85
323
|
this.createColumnHeaders = () => {
|
86
|
-
return this.columns.map(({ cellAlignment, colspan, key, title }) => (index.h("th", { scope: "col", class: {
|
324
|
+
return this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }) => (index.h("th", { scope: "col", class: {
|
87
325
|
["column-header"]: true,
|
88
|
-
[`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
|
89
326
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
90
|
-
|
327
|
+
["updating-state-headers"]: this.updating && !this.loading,
|
328
|
+
}, style: Object.assign({}, this.getColumnWidth(columnWidth)), colSpan: colspan }, index.h("div", { class: {
|
329
|
+
"column-header-inner-container": true,
|
330
|
+
[`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
|
331
|
+
} }, helpers.isSlotUsed(this.el, `${key}-column-icon`) ? (index.h("slot", { name: `${key}-column-icon` })) : (icon &&
|
332
|
+
!icon.hideOnHeader && (index.h("span", { class: "icon", innerHTML: icon.icon }))), index.h("ic-typography", { variant: "body", class: {
|
91
333
|
["column-header-text"]: true,
|
92
334
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
93
|
-
} }, title), index.h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
|
335
|
+
} }, title), this.sortable && (index.h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
|
94
336
|
// eslint-disable-next-line react/jsx-no-bind
|
95
337
|
onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
|
96
338
|
? this.sortedColumnOrder
|
@@ -98,21 +340,41 @@ const DataTable = class {
|
|
98
340
|
["sort-button"]: true,
|
99
341
|
["sort-button-unsorted"]: this.sortedColumn !== key ||
|
100
342
|
this.sortedColumnOrder === "unsorted",
|
101
|
-
} })))
|
102
|
-
|
103
|
-
|
104
|
-
|
343
|
+
} }))))));
|
344
|
+
};
|
345
|
+
this.onRowClick = (row) => {
|
346
|
+
this.selectedRow =
|
347
|
+
this.selectedRow !== row && !this.loading && !this.updating && row;
|
105
348
|
};
|
106
349
|
this.createRows = () => {
|
107
350
|
const data = this.showPagination
|
108
351
|
? this.data.slice(this.fromRow, this.toRow)
|
109
352
|
: this.data.slice();
|
110
|
-
|
353
|
+
/**
|
354
|
+
* Ensures that createCells has a value in data to map over to actually render the slot.
|
355
|
+
* Removes the need for the user to add it multiple times.
|
356
|
+
* `addDataToPosition` used to add the element in the correct column order.
|
357
|
+
* Adding empty string value in to give `createCells` something to loop over.
|
358
|
+
*/
|
359
|
+
const organisedData = data.map((row, rowIndex) => {
|
360
|
+
const slottedColumns = this.columns
|
361
|
+
.map(({ key }, index) => helpers.isSlotUsed(this.el, `${key}-${rowIndex}`) && { key, index })
|
362
|
+
.filter((col) => !!col);
|
363
|
+
return slottedColumns.length > 0
|
364
|
+
? helpers.addDataToPosition(row, slottedColumns, "")
|
365
|
+
: row;
|
366
|
+
});
|
367
|
+
return organisedData
|
111
368
|
.sort(!this.sortable ? undefined : this.getSortFunction())
|
112
|
-
.map((row
|
113
|
-
|
114
|
-
|
115
|
-
|
369
|
+
.map((row, index$1) => {
|
370
|
+
return (index.h("tr", {
|
371
|
+
// eslint-disable-next-line react/jsx-no-bind
|
372
|
+
onClick: () => this.onRowClick(row), class: {
|
373
|
+
["table-row"]: true,
|
374
|
+
["table-row-selected"]: this.selectedRow === row,
|
375
|
+
}
|
376
|
+
}, this.createCells(row, index$1)));
|
377
|
+
});
|
116
378
|
};
|
117
379
|
this.getObjectValue = (cell, key) => {
|
118
380
|
return Object.values(cell)[Object.keys(cell).indexOf(key)];
|
@@ -172,10 +434,49 @@ const DataTable = class {
|
|
172
434
|
}
|
173
435
|
this.sortedColumnOrder = sortOrders[nextSortOrderIndex];
|
174
436
|
sortButton.setAttribute("aria-label", this.getSortButtonLabel(column));
|
437
|
+
this.tableSorted = true;
|
438
|
+
this.icSortChange.emit({
|
439
|
+
columnName: column,
|
440
|
+
sorted: this.sortedColumnOrder,
|
441
|
+
});
|
442
|
+
};
|
443
|
+
this.getTypographyElements = () => {
|
444
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text)"));
|
445
|
+
};
|
446
|
+
this.getTooltip = (typographyEl) => {
|
447
|
+
return typographyEl.closest(this.TOOLTIP);
|
448
|
+
};
|
449
|
+
this.updateTruncationTooltip = (removeTooltipOnly = false) => {
|
450
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
451
|
+
const tooltip = this.getTooltip(typographyEl);
|
452
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
453
|
+
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
454
|
+
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
455
|
+
typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
|
456
|
+
return;
|
457
|
+
}
|
458
|
+
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
459
|
+
});
|
175
460
|
};
|
176
461
|
this.updateScrollOffset = () => {
|
177
462
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
178
463
|
};
|
464
|
+
this.setTableDimensions = () => {
|
465
|
+
let tableHostDimensions = {};
|
466
|
+
if (this.width) {
|
467
|
+
tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-width"]: this.width });
|
468
|
+
}
|
469
|
+
if (this.height) {
|
470
|
+
tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-height"]: this.height });
|
471
|
+
}
|
472
|
+
if (this.maxWidth) {
|
473
|
+
tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-max-width"]: this.maxWidth });
|
474
|
+
}
|
475
|
+
if (this.minWidth) {
|
476
|
+
tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-min-width"]: this.minWidth });
|
477
|
+
}
|
478
|
+
return tableHostDimensions;
|
479
|
+
};
|
179
480
|
this.fromRow = 0;
|
180
481
|
this.previousRowsPerPage = undefined;
|
181
482
|
this.rowsPerPage = undefined;
|
@@ -185,23 +486,36 @@ const DataTable = class {
|
|
185
486
|
this.sortedColumn = undefined;
|
186
487
|
this.sortedColumnOrder = undefined;
|
187
488
|
this.toRow = undefined;
|
489
|
+
this.currentRowHeight = undefined;
|
490
|
+
this.debounceDelay = 0;
|
188
491
|
this.caption = undefined;
|
189
492
|
this.columns = undefined;
|
190
493
|
this.data = undefined;
|
191
494
|
this.density = "default";
|
192
495
|
this.embedded = false;
|
496
|
+
this.globalRowHeight = "auto";
|
497
|
+
this.height = undefined;
|
193
498
|
this.hideColumnHeaders = false;
|
194
|
-
this.
|
195
|
-
|
499
|
+
this.loading = false;
|
500
|
+
this.loadingOptions = undefined;
|
501
|
+
this.maxWidth = undefined;
|
502
|
+
this.minWidth = undefined;
|
503
|
+
this.minimumLoadingDisplayDuration = 1000;
|
504
|
+
this.paginationBarOptions = {
|
505
|
+
itemsPerPageOptions: [
|
196
506
|
{ label: "10", value: "10" },
|
197
507
|
{ label: "25", value: "25" },
|
198
508
|
{ label: "50", value: "50" },
|
199
509
|
],
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
510
|
+
rangeLabelType: "page",
|
511
|
+
type: "simple",
|
512
|
+
showItemsPerPageControl: true,
|
513
|
+
showGoToPageControl: true,
|
204
514
|
alignment: "right",
|
515
|
+
appearance: "default",
|
516
|
+
itemLabel: "Item",
|
517
|
+
pageLabel: "Page",
|
518
|
+
hideRangeLabel: false,
|
205
519
|
};
|
206
520
|
this.showPagination = false;
|
207
521
|
this.sortable = false;
|
@@ -211,58 +525,484 @@ const DataTable = class {
|
|
211
525
|
};
|
212
526
|
this.stickyColumnHeaders = false;
|
213
527
|
this.stickyRowHeaders = false;
|
528
|
+
this.tableLayout = "fixed";
|
529
|
+
this.truncationPattern = undefined;
|
530
|
+
this.updating = false;
|
531
|
+
this.updatingOptions = undefined;
|
532
|
+
this.variableRowHeight = undefined;
|
533
|
+
this.width = undefined;
|
534
|
+
}
|
535
|
+
disconnectedCallback() {
|
536
|
+
var _a;
|
537
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
214
538
|
}
|
215
539
|
componentWillLoad() {
|
216
|
-
|
540
|
+
var _a;
|
541
|
+
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
217
542
|
this.previousRowsPerPage = this.rowsPerPage;
|
218
543
|
this.toRow = this.rowsPerPage;
|
219
544
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
220
545
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
546
|
+
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
547
|
+
this.initialLoad = true;
|
548
|
+
this.previousItemsPerPage = this.rowsPerPage;
|
221
549
|
}
|
222
550
|
componentDidLoad() {
|
223
551
|
const tableElement = this.el.shadowRoot.querySelector("table");
|
224
552
|
const tableContainer = this.el.shadowRoot.querySelector(".table-container");
|
553
|
+
if (this.dataUpdated) {
|
554
|
+
this.dataUpdated = false;
|
555
|
+
}
|
225
556
|
if ((tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientHeight) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientHeight) ||
|
226
557
|
(tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
|
227
558
|
this.scrollable = true;
|
228
559
|
}
|
560
|
+
if (this.loading) {
|
561
|
+
this.startLoadingTimer();
|
562
|
+
this.showLoadingIndicator();
|
563
|
+
}
|
564
|
+
if (this.truncationPattern) {
|
565
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
566
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
567
|
+
if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
568
|
+
this.dataTruncation(typographyEl);
|
569
|
+
}
|
570
|
+
});
|
571
|
+
this.debounceDataTruncation();
|
572
|
+
}
|
573
|
+
if (this.globalRowHeight !== "auto") {
|
574
|
+
this.updateSetRowHeight();
|
575
|
+
}
|
229
576
|
}
|
230
|
-
|
231
|
-
|
232
|
-
|
577
|
+
componentDidUpdate() {
|
578
|
+
// truncation updates invoked here once new/updated data has
|
579
|
+
// rendered to take into account updated .cell-container/ic-typography box model updates.
|
580
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING ||
|
581
|
+
this.truncationPattern === this.TOOLTIP_STRING) {
|
582
|
+
this.truncateUpdatedData();
|
583
|
+
}
|
233
584
|
}
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
585
|
+
truncateUpdatedData() {
|
586
|
+
if (this.dataUpdated) {
|
587
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
588
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
589
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
590
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
591
|
+
if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >=
|
592
|
+
(truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
|
593
|
+
this.resetShowHideTruncation(typographyEl);
|
594
|
+
return;
|
595
|
+
}
|
596
|
+
setTimeout(() => {
|
597
|
+
// slight delay due to data rendering
|
598
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
|
599
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
600
|
+
}
|
601
|
+
}, 150);
|
602
|
+
});
|
603
|
+
}
|
604
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
605
|
+
this.updateTruncationTooltip();
|
606
|
+
}
|
607
|
+
this.dataUpdated = false;
|
240
608
|
}
|
241
|
-
|
242
|
-
|
243
|
-
|
609
|
+
if (this.tableSorted) {
|
610
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
611
|
+
this.updateTruncationTooltip();
|
612
|
+
}
|
613
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
614
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
615
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
616
|
+
if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
617
|
+
this.createShowHideTruncation(typographyEl, cellContainer);
|
618
|
+
}
|
619
|
+
else {
|
620
|
+
typographyEl.resetTruncation().then(() => {
|
621
|
+
cellContainer.removeAttribute("style");
|
622
|
+
});
|
623
|
+
}
|
624
|
+
});
|
625
|
+
}
|
626
|
+
this.tableSorted = false;
|
244
627
|
}
|
245
|
-
|
628
|
+
// This function recalculates the tooltip truncation when the rowHeight has been set.
|
629
|
+
// This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete
|
630
|
+
if (this.rowHeightSet) {
|
631
|
+
const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
|
632
|
+
const hasAutoRowHeight = this.globalRowHeight === "auto";
|
633
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
634
|
+
var _a;
|
635
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
636
|
+
const tooltipEl = this.getTooltip(typographyEl);
|
637
|
+
if (hasAutoRowHeight) {
|
638
|
+
cellContainer.style.height = null;
|
639
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
640
|
+
this.removeTooltip(cellContainer, typographyEl, tooltipEl);
|
641
|
+
typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
|
642
|
+
}
|
643
|
+
else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
644
|
+
this.resetShowHideTruncation(typographyEl);
|
645
|
+
}
|
646
|
+
return;
|
647
|
+
}
|
648
|
+
const rowHeight = fontSize *
|
649
|
+
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
650
|
+
// If the set row height is bigger than the cell container even
|
651
|
+
// with textWrap, set the row height
|
652
|
+
if (!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
|
653
|
+
rowHeight > cellContainer.clientHeight &&
|
654
|
+
!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
|
655
|
+
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
656
|
+
}
|
657
|
+
if (this.truncationPattern) {
|
658
|
+
// If the set row height is bigger than the typography truncation wrapper
|
659
|
+
// scroll height, remove see more / see less button
|
660
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
661
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
662
|
+
const showHideBtn = typographyEl.shadowRoot.querySelector("button");
|
663
|
+
if (showHideBtn &&
|
664
|
+
(truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) <= cellContainer.clientHeight) {
|
665
|
+
this.resetShowHideTruncation(typographyEl);
|
666
|
+
return;
|
667
|
+
}
|
668
|
+
}
|
669
|
+
this.truncate(typographyEl, cellContainer, tooltipEl);
|
670
|
+
}
|
671
|
+
else {
|
672
|
+
this.updateSetRowHeight(typographyEl);
|
673
|
+
}
|
674
|
+
});
|
675
|
+
this.rowHeightSet = false;
|
676
|
+
}
|
677
|
+
// Only run truncation on the new rows
|
678
|
+
// when the number of items per page has increased
|
679
|
+
if (this.itemsPerPageChange) {
|
680
|
+
const allRows = this.el.shadowRoot.querySelectorAll(".table-row");
|
681
|
+
if (this.rowsPerPage > this.previousItemsPerPage) {
|
682
|
+
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
683
|
+
newRows.forEach((row) => {
|
684
|
+
row
|
685
|
+
.querySelectorAll("ic-typography")
|
686
|
+
.forEach((typographyEl) => {
|
687
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
688
|
+
const tooltipEl = this.getTooltip(typographyEl);
|
689
|
+
this.truncate(typographyEl, cellContainer, tooltipEl);
|
690
|
+
});
|
691
|
+
});
|
692
|
+
}
|
693
|
+
this.previousItemsPerPage = this.rowsPerPage;
|
694
|
+
this.itemsPerPageChange = false;
|
695
|
+
}
|
696
|
+
if (!this.initialLoad && this.icPageChangeEvent) {
|
697
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
698
|
+
this.updateTruncationTooltip();
|
699
|
+
}
|
700
|
+
// set truncation to see more if opened and next/previous page is pressed
|
701
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
702
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
703
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
704
|
+
const showHideBtn = typographyEl.shadowRoot.querySelector("button");
|
705
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > cellContainer.clientHeight &&
|
706
|
+
!showHideBtn) {
|
707
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
708
|
+
}
|
709
|
+
});
|
710
|
+
}
|
711
|
+
this.icPageChangeEvent = false;
|
712
|
+
}
|
713
|
+
if (this.densityUpdate) {
|
714
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
715
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
716
|
+
const tooltipEl = this.getTooltip(typographyEl);
|
717
|
+
this.truncate(typographyEl, cellContainer, tooltipEl);
|
718
|
+
});
|
719
|
+
this.densityUpdate = false;
|
720
|
+
}
|
721
|
+
if (this.truncationPatternUpdated) {
|
722
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
723
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
724
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
725
|
+
const tooltipEl = this.getTooltip(typographyEl);
|
726
|
+
if (typographyEl.scrollHeight > cellContainer.clientHeight) {
|
727
|
+
this.addTooltipTruncation(typographyEl, cellContainer, tooltipEl);
|
728
|
+
}
|
729
|
+
});
|
730
|
+
}
|
731
|
+
else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
732
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
733
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
734
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
735
|
+
if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
|
736
|
+
(truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
|
737
|
+
this.resetShowHideTruncation(typographyEl);
|
738
|
+
return;
|
739
|
+
}
|
740
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
|
741
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
742
|
+
}
|
743
|
+
});
|
744
|
+
}
|
745
|
+
}
|
746
|
+
}
|
747
|
+
createShowHideTruncation(typographyEl, cellContainer) {
|
748
|
+
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
749
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
750
|
+
typographyEl.setShowHideExpanded(false);
|
751
|
+
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
752
|
+
}
|
753
|
+
addTooltipTruncation(typographyEl, cellContainer, tooltip) {
|
754
|
+
this.addLineClampCSS(typographyEl, cellContainer);
|
755
|
+
if (!tooltip) {
|
756
|
+
this.createTruncationTooltip(typographyEl, cellContainer);
|
757
|
+
}
|
758
|
+
}
|
759
|
+
addShowHideTruncation(cellContainer, typographyEl) {
|
760
|
+
cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);
|
761
|
+
this.createShowHideTruncation(typographyEl, cellContainer);
|
762
|
+
}
|
763
|
+
getTruncWrapper(typographyEl) {
|
764
|
+
return typographyEl.shadowRoot.querySelector(".trunc-wrapper");
|
765
|
+
}
|
766
|
+
// Set the height to initial if row height is set and the show / hide truncation
|
767
|
+
// is clicked
|
768
|
+
handleTypographyTruncationExpandToggle({ detail, }) {
|
769
|
+
const { expanded, typographyEl } = detail;
|
770
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
771
|
+
if (cellContainer.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE) &&
|
772
|
+
expanded) {
|
773
|
+
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, "inherit");
|
774
|
+
}
|
775
|
+
}
|
776
|
+
handlePageChange({ detail, target }) {
|
777
|
+
if (target.parentElement !== this.el) {
|
778
|
+
this.fromRow = (detail.value - 1) * this.rowsPerPage;
|
779
|
+
this.toRow = this.fromRow + this.rowsPerPage;
|
780
|
+
const tableRowsContainer = this.el.shadowRoot.querySelector(".table-row-container");
|
781
|
+
if (this.previousRowsPerPage === this.rowsPerPage) {
|
782
|
+
tableRowsContainer.scrollTop = 0;
|
783
|
+
}
|
784
|
+
else if (this.previousRowsPerPage < this.rowsPerPage) {
|
785
|
+
tableRowsContainer.scrollTop = this.scrollOffset;
|
786
|
+
this.previousRowsPerPage = this.rowsPerPage;
|
787
|
+
}
|
788
|
+
else {
|
789
|
+
this.previousRowsPerPage = this.rowsPerPage;
|
790
|
+
}
|
791
|
+
}
|
792
|
+
if (!this.initialLoad && this.previousPaginationPage !== detail.value) {
|
793
|
+
// This is to prevent icPageChange from triggering truncation on first load
|
794
|
+
this.icPageChangeEvent = true;
|
795
|
+
}
|
796
|
+
this.previousPaginationPage = detail.value;
|
797
|
+
this.initialLoad = false;
|
798
|
+
}
|
799
|
+
handleItemsPerPageChange({ detail, target, }) {
|
800
|
+
if (target.parentElement !== this.el) {
|
246
801
|
this.previousRowsPerPage = this.rowsPerPage;
|
802
|
+
this.rowsPerPage = detail.value;
|
247
803
|
}
|
804
|
+
this.itemsPerPageChange = true;
|
805
|
+
}
|
806
|
+
handleDensityChange(ev) {
|
807
|
+
this.density = ev.detail.value;
|
248
808
|
}
|
249
809
|
clickListener(ev) {
|
250
810
|
if (ev.target !== this.el)
|
251
811
|
this.selectedRow = undefined;
|
252
812
|
}
|
813
|
+
loadingHandler(newValue) {
|
814
|
+
if (newValue)
|
815
|
+
this.startLoadingTimer();
|
816
|
+
if (this.loading) {
|
817
|
+
setTimeout(() => {
|
818
|
+
this.showLoadingIndicator();
|
819
|
+
}, 500);
|
820
|
+
}
|
821
|
+
}
|
822
|
+
truncationPatternHandler(newValue) {
|
823
|
+
if (newValue === this.TOOLTIP_STRING) {
|
824
|
+
this.resetShowHideTruncation();
|
825
|
+
this.updateTruncationTooltip(true);
|
826
|
+
// Not using debounceDataTruncation here due to resizeObserver not being triggered
|
827
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
828
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
829
|
+
const tooltip = this.getTooltip(typographyEl);
|
830
|
+
this.truncate(typographyEl, cellContainer, tooltip);
|
831
|
+
});
|
832
|
+
}
|
833
|
+
if (newValue === this.SHOW_HIDE_STRING) {
|
834
|
+
// ResizeObserver is trigger here due to the see more/see less links being removed.
|
835
|
+
// The resizeObserver will also apply the tooltip where relevant
|
836
|
+
this.updateTruncationTooltip(true);
|
837
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
838
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
839
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
840
|
+
if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
|
841
|
+
(truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
|
842
|
+
this.resetShowHideTruncation(typographyEl);
|
843
|
+
return;
|
844
|
+
}
|
845
|
+
setTimeout(() => {
|
846
|
+
// slight delay due to data rendering
|
847
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
|
848
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
849
|
+
}
|
850
|
+
}, 150);
|
851
|
+
});
|
852
|
+
}
|
853
|
+
this.truncationPatternUpdated = true;
|
854
|
+
}
|
855
|
+
async dataHandler(newData) {
|
856
|
+
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
|
857
|
+
if (this.loading) {
|
858
|
+
!this.hasLoadedForOneSecond
|
859
|
+
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
860
|
+
(Date.now() - this.timerStarted))
|
861
|
+
: (this.loading = false);
|
862
|
+
}
|
863
|
+
if (this.updating)
|
864
|
+
this.updating = false;
|
865
|
+
this.dataUpdated = true;
|
866
|
+
}
|
867
|
+
async densityHandler() {
|
868
|
+
this.densityUpdate = true;
|
869
|
+
}
|
870
|
+
resetShowHideTruncation(typographyEl) {
|
871
|
+
if (typographyEl) {
|
872
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
873
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
874
|
+
if ((truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
875
|
+
!helpers.isEmptyString(typographyEl.getAttribute("max-lines")) &&
|
876
|
+
Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT) !==
|
877
|
+
+typographyEl.getAttribute("max-lines")) {
|
878
|
+
typographyEl.checkMaxLines(truncWrapper.scrollHeight);
|
879
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
880
|
+
typographyEl.setShowHideExpanded(false);
|
881
|
+
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
|
882
|
+
}
|
883
|
+
else {
|
884
|
+
typographyEl.resetTruncation().then(() => {
|
885
|
+
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
886
|
+
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
887
|
+
}
|
888
|
+
});
|
889
|
+
}
|
890
|
+
}
|
891
|
+
else {
|
892
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
893
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
894
|
+
typographyEl.resetTruncation().then(() => {
|
895
|
+
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
896
|
+
cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
897
|
+
}
|
898
|
+
});
|
899
|
+
});
|
900
|
+
}
|
901
|
+
}
|
902
|
+
rowHeightChangeHandler(newValue, oldValue) {
|
903
|
+
if (+newValue !== +oldValue) {
|
904
|
+
this.deleteTextWrapDataKey(this.data);
|
905
|
+
this.deleteTextWrapDataKey(this.columns);
|
906
|
+
this.removeTextWrap();
|
907
|
+
this.icRowHeightChange.emit();
|
908
|
+
this.rowHeightSet = true;
|
909
|
+
}
|
910
|
+
}
|
911
|
+
/**
|
912
|
+
* Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.
|
913
|
+
*/
|
914
|
+
async resetRowHeights(rowHeight) {
|
915
|
+
this.globalRowHeight = rowHeight || "auto";
|
916
|
+
this.variableRowHeight = null;
|
917
|
+
}
|
918
|
+
showLoadingIndicator() {
|
919
|
+
this.loadingIndicator.classList.add("show");
|
920
|
+
}
|
921
|
+
getRowOptions(rowKeys, rowValues) {
|
922
|
+
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
923
|
+
return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];
|
924
|
+
}
|
925
|
+
regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly) {
|
926
|
+
// When sorting the table, instead of regenerating the tooltip,
|
927
|
+
// the tooltip details are updated
|
928
|
+
if (tooltip) {
|
929
|
+
if (this.tableSorted) {
|
930
|
+
tooltip.setAttribute("target", typographyEl.id);
|
931
|
+
tooltip.setAttribute("label", typographyEl.textContent);
|
932
|
+
}
|
933
|
+
else {
|
934
|
+
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
935
|
+
}
|
936
|
+
if (removeTooltipOnly) {
|
937
|
+
return;
|
938
|
+
}
|
939
|
+
}
|
940
|
+
// This add line clamp to data only when
|
941
|
+
// the data object has been updated
|
942
|
+
if (!typographyEl.getAttribute("style") && this.dataUpdated) {
|
943
|
+
this.addLineClampCSS(typographyEl, cellContainer);
|
944
|
+
}
|
945
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
946
|
+
this.truncationPattern === this.TOOLTIP_STRING) {
|
947
|
+
if (!typographyEl.getAttribute("style") ||
|
948
|
+
typographyEl.style.cssText.includes("--ic-line-clamp: 0;")) {
|
949
|
+
this.addLineClampCSS(typographyEl, cellContainer);
|
950
|
+
}
|
951
|
+
this.createTruncationTooltip(typographyEl, cellContainer);
|
952
|
+
}
|
953
|
+
}
|
954
|
+
removeTooltip(cellContainer, typographyEl, tooltip) {
|
955
|
+
cellContainer.appendChild(typographyEl);
|
956
|
+
if (tooltip) {
|
957
|
+
tooltip.remove();
|
958
|
+
}
|
959
|
+
}
|
960
|
+
addLineClampCSS(typographyEl, cellContainer) {
|
961
|
+
typographyEl.setAttribute("style", `--ic-line-clamp: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
|
962
|
+
}
|
963
|
+
createTruncationTooltip(typographyEl, cellContainer) {
|
964
|
+
const tooltipEl = document.createElement("ic-tooltip");
|
965
|
+
tooltipEl.setAttribute("target", typographyEl.id);
|
966
|
+
tooltipEl.setAttribute("label", typographyEl.textContent);
|
967
|
+
tooltipEl.classList.add("ic-tooltip-overflow");
|
968
|
+
tooltipEl.setExternalPopperProps({
|
969
|
+
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
970
|
+
strategy: "fixed",
|
971
|
+
});
|
972
|
+
cellContainer.appendChild(tooltipEl);
|
973
|
+
tooltipEl.appendChild(typographyEl);
|
974
|
+
}
|
253
975
|
render() {
|
254
|
-
const { caption, createColumnHeaders, createRows, data, hideColumnHeaders,
|
255
|
-
return (index.h("div", { class: "table-container" }, index.h("div", { class: {
|
976
|
+
const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
977
|
+
return (index.h(index.Host, { style: Object.assign({}, this.setTableDimensions()) }, index.h("div", { class: "table-container" }, helpers.isSlotUsed(this.el, "title-bar") && index.h("slot", { name: "title-bar" }), index.h("div", { class: {
|
256
978
|
["table-row-container"]: true,
|
257
979
|
scrollable,
|
258
|
-
}, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset },
|
980
|
+
}, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, helpers.isSlotUsed(this.el, "title-bar") && index.h("slot", { name: "title-bar" }), index.h("table", { style: {
|
981
|
+
["--table-layout"]: this.tableLayout,
|
982
|
+
} }, index.h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (index.h("thead", { class: {
|
259
983
|
["column-header-sticky"]: stickyColumnHeaders,
|
260
984
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
261
|
-
} }, index.h("tr", null, createColumnHeaders()))),
|
985
|
+
} }, index.h("tr", null, createColumnHeaders()))), updating &&
|
986
|
+
!loading &&
|
987
|
+
(hideColumnHeaders ? (index.h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && !loading && index.h("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
|
988
|
+
!loading &&
|
989
|
+
(helpers.isSlotUsed(this.el, "empty-state") ? (index.h("slot", { name: "empty-state" })) : (index.h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (index.h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
990
|
+
"loading-empty": loading,
|
991
|
+
loading: true,
|
992
|
+
"show-background": loadingOptions.showBackground,
|
993
|
+
}, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })), (showPagination || helpers.isSlotUsed(this.el, "pagination-bar")) && (index.h("div", { class: "pagination-container" }, helpers.isSlotUsed(this.el, "pagination-bar") ? (index.h("slot", { name: "pagination-bar" })) : (index.h("ic-pagination-bar", { totalItems: data.length, type: paginationBarOptions.type, rangeLabelType: paginationBarOptions.rangeLabelType, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, showGoToPageControl: paginationBarOptions.showGoToPageControl, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, alignment: paginationBarOptions.alignment, appearance: paginationBarOptions.appearance, itemLabel: paginationBarOptions.itemLabel, pageLabel: paginationBarOptions.pageLabel, hideRangeLabel: paginationBarOptions.hideRangeLabel })))), sortable && (index.h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
|
262
994
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
263
|
-
: "table unsorted"))));
|
995
|
+
: "table unsorted")))));
|
264
996
|
}
|
265
997
|
get el() { return index.getElement(this); }
|
998
|
+
static get watchers() { return {
|
999
|
+
"loading": ["loadingHandler"],
|
1000
|
+
"truncationPattern": ["truncationPatternHandler"],
|
1001
|
+
"data": ["dataHandler"],
|
1002
|
+
"density": ["densityHandler"],
|
1003
|
+
"globalRowHeight": ["rowHeightChangeHandler"],
|
1004
|
+
"variableRowHeight": ["rowHeightChangeHandler"]
|
1005
|
+
}; }
|
266
1006
|
};
|
267
1007
|
DataTable.style = icDataTableCss;
|
268
1008
|
|