@ukic/canary-web-components 2.0.0-canary.13 → 2.0.0-canary.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-6acbb97e.js → helpers-191dca49.js} +56 -89
- package/dist/cjs/helpers-191dca49.js.map +1 -0
- package/dist/cjs/{helpers-f75cf7cf.js → helpers-765a5118.js} +30 -1
- package/dist/cjs/helpers-765a5118.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +3 -1
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +15 -9
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +55 -84
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +3 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +35 -86
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +23 -16
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +32 -30
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +34 -21
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +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 +154 -31
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +6 -6
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +322 -0
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +34 -16
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +176 -35
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +3 -3
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +26 -5
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +58 -17
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +3 -2
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +40 -26
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +9 -4
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +5 -2
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +2 -1
- package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +13 -22
- package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +2 -2
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-4cf27b16.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ic-data-table/ic-data-table.css +76 -1
- package/dist/collection/components/ic-data-table/ic-data-table.js +368 -43
- 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 +258 -0
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +320 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +91 -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 +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js +4 -4
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js +176 -35
- 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 +180 -3
- 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.js +145 -116
- 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 +47 -10
- package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +55 -87
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +28 -1
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-accordion-group.js +2 -1
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-back-to-top.js +22 -9
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +59 -84
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +2 -0
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-button2.js +33 -84
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card.js +1 -1
- package/dist/components/ic-checkbox-group.js +27 -17
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +32 -30
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +39 -23
- package/dist/components/ic-chip.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 +179 -37
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +6 -6
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-empty-state.js +1 -57
- package/dist/components/ic-empty-state.js.map +1 -1
- package/dist/{esm/ic-empty-state.entry.js → components/ic-empty-state2.js} +38 -11
- package/dist/components/ic-empty-state2.js.map +1 -0
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer.js +1 -1
- package/dist/components/ic-hero.js +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-link2.js +35 -17
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +1 -1
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-item2.js +2 -2
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +2 -2
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-menu3.js +177 -36
- package/dist/components/ic-menu3.js.map +1 -1
- package/dist/components/ic-navigation-button.js +27 -6
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-pagination-bar2.js +126 -99
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +2 -2
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +1 -1
- package/dist/components/ic-popover-menu.js +3 -2
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +40 -26
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +11 -5
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-select-with-multi.js +1 -1
- package/dist/components/ic-select2.js +33 -11
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +1 -1
- package/dist/components/ic-step.js +4 -1
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-stepper.js +3 -1
- package/dist/components/ic-stepper.js.map +1 -1
- package/dist/components/ic-switch.js +1 -1
- package/dist/components/ic-tab.js +1 -1
- package/dist/components/ic-text-field2.js +27 -8
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +13 -22
- package/dist/components/ic-theme.js.map +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toggle-button.js +1 -1
- package/dist/components/ic-tooltip2.js +1 -1
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/components/ic-typography2.js +1 -1
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.css +2 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-b3d21d06.entry.js → p-005e83b0.entry.js} +2 -2
- package/dist/core/{p-b8a3b16d.entry.js → p-05df3901.entry.js} +2 -2
- package/dist/core/{p-3d0185a4.entry.js → p-0646ef0c.entry.js} +2 -2
- package/dist/core/p-0ec09955.entry.js +2 -0
- package/dist/core/p-0ec09955.entry.js.map +1 -0
- package/dist/core/p-114bea92.entry.js +2 -0
- package/dist/core/p-114bea92.entry.js.map +1 -0
- package/dist/core/p-11bbb09c.js +2 -0
- package/dist/core/p-11bbb09c.js.map +1 -0
- package/dist/core/p-11e736a3.entry.js +2 -0
- package/dist/core/p-11e736a3.entry.js.map +1 -0
- package/dist/core/{p-e0e26834.entry.js → p-16c82b13.entry.js} +2 -2
- package/dist/core/{p-094a0455.entry.js → p-1b35b6af.entry.js} +2 -2
- package/dist/core/p-1cf8a04e.entry.js +2 -0
- package/dist/core/p-1cf8a04e.entry.js.map +1 -0
- package/dist/core/{p-849f43c3.entry.js → p-2170f59e.entry.js} +2 -2
- package/dist/core/p-2e167ebb.entry.js +2 -0
- package/dist/core/p-2e167ebb.entry.js.map +1 -0
- package/dist/core/p-3f20608d.entry.js +2 -0
- package/dist/core/p-3f20608d.entry.js.map +1 -0
- package/dist/core/p-41606de1.entry.js +2 -0
- package/dist/core/p-41606de1.entry.js.map +1 -0
- package/dist/core/{p-8b1d128c.entry.js → p-4415c93f.entry.js} +2 -2
- package/dist/core/{p-6b68ee01.entry.js → p-457dd939.entry.js} +2 -2
- package/dist/core/p-457dd939.entry.js.map +1 -0
- package/dist/core/{p-04f46dac.entry.js → p-4737844f.entry.js} +2 -2
- package/dist/core/p-4737844f.entry.js.map +1 -0
- package/dist/core/{p-8ef85b15.entry.js → p-53374a27.entry.js} +2 -2
- package/dist/core/{p-7c8f85fd.entry.js → p-53e45d51.entry.js} +2 -2
- package/dist/core/{p-0707f2fc.entry.js → p-593f0318.entry.js} +2 -2
- package/dist/core/{p-aabab75f.entry.js → p-5d5979fa.entry.js} +2 -2
- package/dist/core/{p-c7b52046.entry.js → p-66af5958.entry.js} +2 -2
- package/dist/core/p-67b0faac.entry.js +2 -0
- package/dist/core/p-67b0faac.entry.js.map +1 -0
- package/dist/core/p-6b277e09.entry.js +2 -0
- package/dist/core/p-6b277e09.entry.js.map +1 -0
- package/dist/core/{p-2ec33c00.entry.js → p-72cea8fd.entry.js} +2 -2
- package/dist/core/p-73dad5cf.entry.js +2 -0
- package/dist/core/p-73dad5cf.entry.js.map +1 -0
- package/dist/core/{p-05d0ac42.entry.js → p-85e2a9af.entry.js} +2 -2
- package/dist/core/p-85e2a9af.entry.js.map +1 -0
- package/dist/core/{p-bbcd6d06.entry.js → p-872c3555.entry.js} +2 -2
- package/dist/core/{p-dae1779d.entry.js → p-87743c4a.entry.js} +2 -2
- package/dist/core/{p-55d819a6.entry.js → p-8cfc74da.entry.js} +2 -2
- package/dist/core/{p-bf316546.entry.js → p-9729086f.entry.js} +2 -2
- package/dist/core/{p-f4965c26.entry.js → p-9cc19e91.entry.js} +2 -2
- package/dist/core/{p-da578abf.entry.js → p-9de20265.entry.js} +2 -2
- package/dist/core/p-a088373e.entry.js +2 -0
- package/dist/core/p-a088373e.entry.js.map +1 -0
- package/dist/core/{p-169dcfdd.entry.js → p-a0e42564.entry.js} +2 -2
- package/dist/core/p-a8110c27.entry.js +2 -0
- package/dist/core/p-a8110c27.entry.js.map +1 -0
- package/dist/core/{p-f9fcdd21.entry.js → p-a9d07792.entry.js} +2 -2
- package/dist/core/p-a9d07792.entry.js.map +1 -0
- package/dist/core/{p-66b8f0a7.entry.js → p-b08f4371.entry.js} +2 -2
- package/dist/core/{p-a9ed6a71.entry.js → p-b79c0631.entry.js} +2 -2
- package/dist/core/p-b79c0631.entry.js.map +1 -0
- package/dist/core/p-b8247636.entry.js +2 -0
- package/dist/core/p-b8247636.entry.js.map +1 -0
- package/dist/core/{p-fdd8f3a5.entry.js → p-badfdf2a.entry.js} +2 -2
- package/dist/core/p-be56fa17.entry.js +2 -0
- package/dist/core/{p-31800427.entry.js.map → p-be56fa17.entry.js.map} +1 -1
- package/dist/core/{p-ed7379e3.entry.js → p-bebf535f.entry.js} +2 -2
- package/dist/core/p-c07cef0e.js +2 -0
- package/dist/core/p-c07cef0e.js.map +1 -0
- package/dist/core/p-c0d88af8.entry.js +2 -0
- package/dist/core/p-c0d88af8.entry.js.map +1 -0
- package/dist/core/p-c3af5dab.entry.js +2 -0
- package/dist/core/p-c3af5dab.entry.js.map +1 -0
- package/dist/core/{p-981b6f12.entry.js → p-c3dabce4.entry.js} +2 -2
- package/dist/core/{p-bcfbd465.entry.js → p-c7e932b5.entry.js} +2 -2
- package/dist/core/{p-1a4bce88.entry.js → p-d09aaa5b.entry.js} +2 -2
- package/dist/core/{p-3f4c408a.entry.js → p-d59a72a9.entry.js} +2 -2
- package/dist/core/p-d59a72a9.entry.js.map +1 -0
- package/dist/core/{p-1170c02d.entry.js → p-d71e9cb5.entry.js} +2 -2
- package/dist/core/{p-b612d68b.entry.js → p-ecd6d123.entry.js} +2 -2
- package/dist/core/p-ecd6d123.entry.js.map +1 -0
- package/dist/core/p-ee52a11a.entry.js +2 -0
- package/dist/core/p-ee52a11a.entry.js.map +1 -0
- package/dist/core/p-f11597df.entry.js +2 -0
- package/dist/core/p-f11597df.entry.js.map +1 -0
- package/dist/core/p-f1f3acd2.entry.js +2 -0
- package/dist/core/p-f1f3acd2.entry.js.map +1 -0
- package/dist/core/{p-e676069e.entry.js → p-f659e5eb.entry.js} +2 -2
- package/dist/core/{p-ffa94639.entry.js → p-fc2551c0.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-f328a7b6.js → helpers-8df79303.js} +29 -2
- package/dist/esm/helpers-8df79303.js.map +1 -0
- package/dist/esm/{helpers-451953f9.js → helpers-da05c476.js} +56 -88
- package/dist/esm/helpers-da05c476.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +3 -1
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +15 -9
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +55 -84
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +3 -1
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +35 -86
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +23 -16
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +32 -30
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +34 -21
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
- package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
- package/dist/esm/ic-data-table.entry.js +155 -32
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +6 -6
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +317 -0
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +35 -17
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +2 -2
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +176 -35
- package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
- package/dist/esm/ic-menu.entry.js +3 -3
- package/dist/esm/ic-menu.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +27 -6
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination_4.entry.js +59 -18
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +3 -2
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +40 -26
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +9 -4
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +1 -1
- package/dist/esm/ic-side-navigation.entry.js +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +5 -2
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-stepper.entry.js +2 -1
- package/dist/esm/ic-stepper.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +13 -22
- package/dist/esm/ic-theme.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-typography.entry.js +2 -2
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-93509377.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +79 -3
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +9 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +59 -0
- package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
- package/dist/types/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts +1 -0
- package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +10 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +24 -14
- package/dist/types/components.d.ts +207 -28
- package/dist/types/utils/types.d.ts +5 -5
- package/hydrate/index.js +1445 -1050
- package/package.json +3 -3
- package/dist/cjs/helpers-6acbb97e.js.map +0 -1
- package/dist/cjs/helpers-f75cf7cf.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-pagination-bar.cjs.entry.js +0 -269
- package/dist/cjs/ic-pagination-bar.cjs.entry.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/core/p-04f46dac.entry.js.map +0 -1
- package/dist/core/p-05d0ac42.entry.js.map +0 -1
- package/dist/core/p-1c3bd46d.entry.js +0 -2
- package/dist/core/p-1c3bd46d.entry.js.map +0 -1
- package/dist/core/p-28bddd8d.entry.js +0 -2
- package/dist/core/p-28bddd8d.entry.js.map +0 -1
- package/dist/core/p-31800427.entry.js +0 -2
- package/dist/core/p-3b0caac0.js +0 -2
- package/dist/core/p-3b0caac0.js.map +0 -1
- package/dist/core/p-3f4c408a.entry.js.map +0 -1
- package/dist/core/p-4020d7f7.entry.js +0 -2
- package/dist/core/p-4020d7f7.entry.js.map +0 -1
- package/dist/core/p-402fd288.entry.js +0 -2
- package/dist/core/p-402fd288.entry.js.map +0 -1
- package/dist/core/p-49449a2d.entry.js +0 -2
- package/dist/core/p-49449a2d.entry.js.map +0 -1
- package/dist/core/p-4a30b0fc.entry.js +0 -2
- package/dist/core/p-4a30b0fc.entry.js.map +0 -1
- package/dist/core/p-4b361789.entry.js +0 -2
- package/dist/core/p-4b361789.entry.js.map +0 -1
- package/dist/core/p-50cfc2bb.entry.js +0 -2
- package/dist/core/p-50cfc2bb.entry.js.map +0 -1
- package/dist/core/p-58c87b3d.entry.js +0 -2
- package/dist/core/p-58c87b3d.entry.js.map +0 -1
- package/dist/core/p-623f911f.entry.js +0 -2
- package/dist/core/p-623f911f.entry.js.map +0 -1
- package/dist/core/p-6b68ee01.entry.js.map +0 -1
- package/dist/core/p-7d1381ef.entry.js +0 -2
- package/dist/core/p-7d1381ef.entry.js.map +0 -1
- package/dist/core/p-925da2d2.entry.js +0 -2
- package/dist/core/p-925da2d2.entry.js.map +0 -1
- package/dist/core/p-9e3178e8.entry.js +0 -2
- package/dist/core/p-9e3178e8.entry.js.map +0 -1
- package/dist/core/p-a9ed6a71.entry.js.map +0 -1
- package/dist/core/p-b612d68b.entry.js.map +0 -1
- package/dist/core/p-c51496ee.entry.js +0 -2
- package/dist/core/p-c51496ee.entry.js.map +0 -1
- package/dist/core/p-c7590421.entry.js +0 -2
- package/dist/core/p-c7590421.entry.js.map +0 -1
- package/dist/core/p-cd799087.js +0 -2
- package/dist/core/p-cd799087.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-e30f2623.entry.js +0 -2
- package/dist/core/p-e30f2623.entry.js.map +0 -1
- package/dist/core/p-f9ee48f7.entry.js +0 -2
- package/dist/core/p-f9ee48f7.entry.js.map +0 -1
- package/dist/core/p-f9fcdd21.entry.js.map +0 -1
- package/dist/esm/helpers-451953f9.js.map +0 -1
- package/dist/esm/helpers-f328a7b6.js.map +0 -1
- package/dist/esm/ic-empty-state.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/types/components/ic-pagination/ic-pagination.types.d.ts +0 -6
- /package/dist/core/{p-b3d21d06.entry.js.map → p-005e83b0.entry.js.map} +0 -0
- /package/dist/core/{p-b8a3b16d.entry.js.map → p-05df3901.entry.js.map} +0 -0
- /package/dist/core/{p-3d0185a4.entry.js.map → p-0646ef0c.entry.js.map} +0 -0
- /package/dist/core/{p-e0e26834.entry.js.map → p-16c82b13.entry.js.map} +0 -0
- /package/dist/core/{p-094a0455.entry.js.map → p-1b35b6af.entry.js.map} +0 -0
- /package/dist/core/{p-849f43c3.entry.js.map → p-2170f59e.entry.js.map} +0 -0
- /package/dist/core/{p-8b1d128c.entry.js.map → p-4415c93f.entry.js.map} +0 -0
- /package/dist/core/{p-8ef85b15.entry.js.map → p-53374a27.entry.js.map} +0 -0
- /package/dist/core/{p-7c8f85fd.entry.js.map → p-53e45d51.entry.js.map} +0 -0
- /package/dist/core/{p-0707f2fc.entry.js.map → p-593f0318.entry.js.map} +0 -0
- /package/dist/core/{p-aabab75f.entry.js.map → p-5d5979fa.entry.js.map} +0 -0
- /package/dist/core/{p-c7b52046.entry.js.map → p-66af5958.entry.js.map} +0 -0
- /package/dist/core/{p-2ec33c00.entry.js.map → p-72cea8fd.entry.js.map} +0 -0
- /package/dist/core/{p-bbcd6d06.entry.js.map → p-872c3555.entry.js.map} +0 -0
- /package/dist/core/{p-dae1779d.entry.js.map → p-87743c4a.entry.js.map} +0 -0
- /package/dist/core/{p-55d819a6.entry.js.map → p-8cfc74da.entry.js.map} +0 -0
- /package/dist/core/{p-bf316546.entry.js.map → p-9729086f.entry.js.map} +0 -0
- /package/dist/core/{p-f4965c26.entry.js.map → p-9cc19e91.entry.js.map} +0 -0
- /package/dist/core/{p-da578abf.entry.js.map → p-9de20265.entry.js.map} +0 -0
- /package/dist/core/{p-169dcfdd.entry.js.map → p-a0e42564.entry.js.map} +0 -0
- /package/dist/core/{p-66b8f0a7.entry.js.map → p-b08f4371.entry.js.map} +0 -0
- /package/dist/core/{p-fdd8f3a5.entry.js.map → p-badfdf2a.entry.js.map} +0 -0
- /package/dist/core/{p-ed7379e3.entry.js.map → p-bebf535f.entry.js.map} +0 -0
- /package/dist/core/{p-981b6f12.entry.js.map → p-c3dabce4.entry.js.map} +0 -0
- /package/dist/core/{p-bcfbd465.entry.js.map → p-c7e932b5.entry.js.map} +0 -0
- /package/dist/core/{p-1a4bce88.entry.js.map → p-d09aaa5b.entry.js.map} +0 -0
- /package/dist/core/{p-1170c02d.entry.js.map → p-d71e9cb5.entry.js.map} +0 -0
- /package/dist/core/{p-e676069e.entry.js.map → p-f659e5eb.entry.js.map} +0 -0
- /package/dist/core/{p-ffa94639.entry.js.map → p-fc2551c0.entry.js.map} +0 -0
@@ -1,14 +1,37 @@
|
|
1
|
-
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
2
|
+
import { h, Fragment, } from "@stencil/core";
|
2
3
|
import unsortedIcon from "./assets/unsorted-icon.svg";
|
3
4
|
import ascendingIcon from "./assets/ascending-icon.svg";
|
4
5
|
import descendingIcon from "./assets/descending-icon.svg";
|
6
|
+
// Unable to import helper functions via @ukic/web-components
|
7
|
+
import { getSlotContent, isSlotUsed } from "../../utils/helpers";
|
8
|
+
/**
|
9
|
+
* @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.
|
10
|
+
* @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.
|
11
|
+
* @slot {COLUMN_KEY}-column-icon - The icon slot for a column header.
|
12
|
+
* @slot title-bar - A custom ic-data-table-title-bar can be slotted above the column headers to display additional information about the table.
|
13
|
+
*/
|
5
14
|
export class DataTable {
|
6
15
|
constructor() {
|
16
|
+
this.DENSITY_HEIGHT_MULTIPLIER = {
|
17
|
+
dense: 0.8,
|
18
|
+
default: 1,
|
19
|
+
spacious: 1.2,
|
20
|
+
};
|
7
21
|
this.SORT_ICONS = {
|
8
22
|
unsorted: unsortedIcon,
|
9
23
|
ascending: ascendingIcon,
|
10
24
|
descending: descendingIcon,
|
11
25
|
};
|
26
|
+
this.hasLoadedForOneSecond = true;
|
27
|
+
this.startLoadingTimer = () => {
|
28
|
+
this.hasLoadedForOneSecond = false;
|
29
|
+
this.timerStarted = Date.now();
|
30
|
+
setTimeout(() => {
|
31
|
+
this.hasLoadedForOneSecond = true;
|
32
|
+
this.timerStarted = null;
|
33
|
+
}, this.minimumLoadingDisplayDuration);
|
34
|
+
};
|
12
35
|
this.isObject = (value) => typeof value === "object";
|
13
36
|
this.notDefaultDensity = () => this.density !== "default";
|
14
37
|
this.getCellContent = (cell, dataType) => {
|
@@ -26,7 +49,11 @@ export class DataTable {
|
|
26
49
|
return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
|
27
50
|
}
|
28
51
|
};
|
29
|
-
this.
|
52
|
+
this.createUpdatingIndicator = () => {
|
53
|
+
const { appearance, description, max, min, progress } = this.updatingOptions || {};
|
54
|
+
return (h("th", { colSpan: this.columns.length, class: "updating-state" }, h("ic-loading-indicator", { appearance: appearance, description: description || "Updating table data", fullWidth: true, max: max, min: min, progress: progress, type: "linear", size: "small" })));
|
55
|
+
};
|
56
|
+
this.createCells = (row, rowIndex) => {
|
30
57
|
const rowValues = Object.values(row);
|
31
58
|
const rowKeys = Object.keys(row);
|
32
59
|
let rowAlignment;
|
@@ -37,43 +64,56 @@ export class DataTable {
|
|
37
64
|
rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
|
38
65
|
}
|
39
66
|
return rowValues.map((cell, index) => {
|
40
|
-
|
67
|
+
var _a, _b, _c, _d, _e;
|
68
|
+
const columnProps = this.columns[index];
|
69
|
+
const cellSlotName = `${columnProps === null || columnProps === void 0 ? void 0 : columnProps.key}-${rowIndex}`;
|
70
|
+
const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
|
41
71
|
const cellValue = (key) => this.getObjectValue(cell, key);
|
42
72
|
return rowKeys[index] === "header" ? (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
|
43
73
|
["row-header"]: true,
|
44
74
|
[`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
|
45
75
|
["row-header-sticky"]: this.stickyRowHeaders,
|
46
|
-
} }, cellValue("title"))) : (h("td", {
|
76
|
+
} }, cellValue("title"))) : (h("td", { class: {
|
47
77
|
["table-cell"]: true,
|
48
78
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
49
|
-
[`data-type-${dataType}`]: true,
|
50
|
-
[`cell-alignment-${(
|
51
|
-
this.getCellAlignment(cell, "horizontal")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
|
52
|
-
!!this.getCellAlignment(cell, "horizontal"),
|
53
|
-
[`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
|
79
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
80
|
+
[`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
|
54
81
|
rowAlignment ||
|
55
|
-
this.getCellAlignment(cell, "vertical")}`]: !!(
|
82
|
+
this.getCellAlignment(cell, "vertical")}`]: !!((_b = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
56
83
|
!!rowAlignment ||
|
57
84
|
!!this.getCellAlignment(cell, "vertical"),
|
58
|
-
} }, h("
|
85
|
+
} }, h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
86
|
+
!isSlotUsed(this.el, cellSlotName)
|
87
|
+
? cell
|
88
|
+
: null, class: {
|
89
|
+
"cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element",
|
90
|
+
[`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
|
91
|
+
[`cell-alignment-${((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.horizontal) ||
|
92
|
+
this.getCellAlignment(cell, "horizontal")}`]: !!((_d = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _d === void 0 ? void 0 : _d.horizontal) ||
|
93
|
+
!!this.getCellAlignment(cell, "horizontal"),
|
94
|
+
} }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _e === void 0 ? void 0 : _e.onAllCells)) && (h("span", { class: "icon", innerHTML: cellValue("icon") || (columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon.icon) }))), h("ic-typography", { variant: "body", class: {
|
59
95
|
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
60
|
-
emphasis ||
|
96
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
61
97
|
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
62
|
-
!!emphasis ||
|
98
|
+
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
63
99
|
!!rowEmphasis,
|
64
100
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
65
|
-
} }, this.isObject(cell) && dataType !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, dataType)))));
|
101
|
+
} }, this.isObject(cell) && (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType))))))));
|
66
102
|
});
|
67
103
|
};
|
68
104
|
this.createColumnHeaders = () => {
|
69
|
-
return this.columns.map(({ cellAlignment, colspan, key, title }) => (h("th", { scope: "col", class: {
|
105
|
+
return this.columns.map(({ cellAlignment, colspan, icon, key, title }) => (h("th", { scope: "col", class: {
|
70
106
|
["column-header"]: true,
|
71
|
-
[`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
|
72
107
|
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
73
|
-
|
108
|
+
["updating-state-headers"]: this.updating && !this.loading,
|
109
|
+
}, colSpan: colspan }, h("div", { class: {
|
110
|
+
"column-header-inner-container": true,
|
111
|
+
[`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
|
112
|
+
} }, isSlotUsed(this.el, `${key}-column-icon`) ? (h("slot", { name: `${key}-column-icon` })) : (icon &&
|
113
|
+
!icon.hideOnHeader && (h("span", { class: "icon", innerHTML: icon.icon }))), h("ic-typography", { variant: "body", class: {
|
74
114
|
["column-header-text"]: true,
|
75
115
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
76
|
-
} }, title), h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
|
116
|
+
} }, title), this.sortable && (h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
|
77
117
|
// eslint-disable-next-line react/jsx-no-bind
|
78
118
|
onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
|
79
119
|
? this.sortedColumnOrder
|
@@ -81,21 +121,48 @@ export class DataTable {
|
|
81
121
|
["sort-button"]: true,
|
82
122
|
["sort-button-unsorted"]: this.sortedColumn !== key ||
|
83
123
|
this.sortedColumnOrder === "unsorted",
|
84
|
-
} })))
|
85
|
-
["column-header-text"]: true,
|
86
|
-
[`text-${this.density}`]: this.notDefaultDensity(),
|
87
|
-
} }, title)))));
|
124
|
+
} }))))));
|
88
125
|
};
|
89
126
|
this.createRows = () => {
|
90
127
|
const data = this.showPagination
|
91
128
|
? this.data.slice(this.fromRow, this.toRow)
|
92
129
|
: this.data.slice();
|
130
|
+
/**
|
131
|
+
* Ensures that createCells has a value in data to map over to actually render the slot.
|
132
|
+
* Removes the need for the user to add it multiple times.
|
133
|
+
*/
|
134
|
+
this.columns.forEach(({ key }) => {
|
135
|
+
data.forEach((row, rowIndex) => {
|
136
|
+
const cellSlotName = `${key}-${rowIndex}`;
|
137
|
+
if (isSlotUsed(this.el, cellSlotName)) {
|
138
|
+
row[key] = getSlotContent(this.el, cellSlotName);
|
139
|
+
}
|
140
|
+
});
|
141
|
+
});
|
93
142
|
return data
|
94
143
|
.sort(!this.sortable ? undefined : this.getSortFunction())
|
95
|
-
.map((row
|
96
|
-
|
97
|
-
|
98
|
-
|
144
|
+
.map((row, index) => {
|
145
|
+
var _a;
|
146
|
+
const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
|
147
|
+
const findRowHeight = variableRowHeightVal
|
148
|
+
? variableRowHeightVal !== "auto" && variableRowHeightVal
|
149
|
+
: this.globalRowHeight !== "auto" && this.globalRowHeight;
|
150
|
+
return (h("tr", {
|
151
|
+
// eslint-disable-next-line react/jsx-no-bind
|
152
|
+
onClick: () => (this.selectedRow =
|
153
|
+
this.selectedRow !== row &&
|
154
|
+
!this.loading &&
|
155
|
+
!this.updating &&
|
156
|
+
row), class: {
|
157
|
+
["table-row"]: true,
|
158
|
+
["table-row-selected"]: this.selectedRow === row,
|
159
|
+
}, style: {
|
160
|
+
height: findRowHeight
|
161
|
+
? `${findRowHeight * this.DENSITY_HEIGHT_MULTIPLIER[this.density]}px`
|
162
|
+
: null,
|
163
|
+
}
|
164
|
+
}, this.createCells(row, index)));
|
165
|
+
});
|
99
166
|
};
|
100
167
|
this.getObjectValue = (cell, key) => {
|
101
168
|
return Object.values(cell)[Object.keys(cell).indexOf(key)];
|
@@ -173,15 +240,19 @@ export class DataTable {
|
|
173
240
|
this.data = undefined;
|
174
241
|
this.density = "default";
|
175
242
|
this.embedded = false;
|
243
|
+
this.globalRowHeight = 40;
|
176
244
|
this.hideColumnHeaders = false;
|
245
|
+
this.loading = false;
|
246
|
+
this.loadingOptions = undefined;
|
247
|
+
this.minimumLoadingDisplayDuration = 1000;
|
177
248
|
this.paginationOptions = {
|
178
249
|
itemsPerPage: [
|
179
250
|
{ label: "10", value: "10" },
|
180
251
|
{ label: "25", value: "25" },
|
181
252
|
{ label: "50", value: "50" },
|
182
253
|
],
|
183
|
-
|
184
|
-
|
254
|
+
rangeLabelType: "page",
|
255
|
+
type: "simple",
|
185
256
|
itemsPerPageControl: true,
|
186
257
|
goToPageControl: true,
|
187
258
|
alignment: "right",
|
@@ -194,13 +265,18 @@ export class DataTable {
|
|
194
265
|
};
|
195
266
|
this.stickyColumnHeaders = false;
|
196
267
|
this.stickyRowHeaders = false;
|
268
|
+
this.updating = false;
|
269
|
+
this.updatingOptions = undefined;
|
270
|
+
this.variableRowHeight = undefined;
|
197
271
|
}
|
198
272
|
componentWillLoad() {
|
273
|
+
var _a;
|
199
274
|
this.rowsPerPage = Number(this.paginationOptions.itemsPerPage[0].value);
|
200
275
|
this.previousRowsPerPage = this.rowsPerPage;
|
201
276
|
this.toRow = this.rowsPerPage;
|
202
277
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
203
278
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
279
|
+
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
204
280
|
}
|
205
281
|
componentDidLoad() {
|
206
282
|
const tableElement = this.el.shadowRoot.querySelector("table");
|
@@ -209,6 +285,10 @@ export class DataTable {
|
|
209
285
|
(tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
|
210
286
|
this.scrollable = true;
|
211
287
|
}
|
288
|
+
if (this.loading) {
|
289
|
+
this.startLoadingTimer();
|
290
|
+
this.showLoadingIndicator();
|
291
|
+
}
|
212
292
|
}
|
213
293
|
handleItemsPerPageChange(ev) {
|
214
294
|
this.previousRowsPerPage = this.rowsPerPage;
|
@@ -229,19 +309,63 @@ export class DataTable {
|
|
229
309
|
this.previousRowsPerPage = this.rowsPerPage;
|
230
310
|
}
|
231
311
|
}
|
312
|
+
handleDensityChange(ev) {
|
313
|
+
this.density = ev.detail.value;
|
314
|
+
}
|
232
315
|
clickListener(ev) {
|
233
316
|
if (ev.target !== this.el)
|
234
317
|
this.selectedRow = undefined;
|
235
318
|
}
|
319
|
+
loadingHandler(newValue) {
|
320
|
+
if (newValue)
|
321
|
+
this.startLoadingTimer();
|
322
|
+
if (this.loading) {
|
323
|
+
setTimeout(() => {
|
324
|
+
this.showLoadingIndicator();
|
325
|
+
}, 500);
|
326
|
+
}
|
327
|
+
}
|
328
|
+
dataHandler(newData) {
|
329
|
+
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
|
330
|
+
if (this.loading) {
|
331
|
+
!this.hasLoadedForOneSecond
|
332
|
+
? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
|
333
|
+
(Date.now() - this.timerStarted))
|
334
|
+
: (this.loading = false);
|
335
|
+
}
|
336
|
+
if (this.updating)
|
337
|
+
this.updating = false;
|
338
|
+
}
|
339
|
+
rowHeightChangeHandler() {
|
340
|
+
this.icRowHeightChange.emit();
|
341
|
+
}
|
342
|
+
/**
|
343
|
+
* Resets the `globalRowHeight` prop to `40px` and sets the `variableRowHeight` prop to `null`.
|
344
|
+
*/
|
345
|
+
async resetRowHeights() {
|
346
|
+
this.globalRowHeight = 40;
|
347
|
+
this.variableRowHeight = null;
|
348
|
+
}
|
349
|
+
showLoadingIndicator() {
|
350
|
+
this.loadingIndicator.classList.add("show");
|
351
|
+
}
|
236
352
|
render() {
|
237
|
-
const { caption, createColumnHeaders, createRows, data, hideColumnHeaders, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, } = this;
|
238
|
-
return (h("div", { class: "table-container" }, h("div", { class: {
|
353
|
+
const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
354
|
+
return (h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
|
239
355
|
["table-row-container"]: true,
|
240
356
|
scrollable,
|
241
357
|
}, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, h("table", null, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
|
242
358
|
["column-header-sticky"]: stickyColumnHeaders,
|
243
359
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
244
|
-
} }, h("tr", null, createColumnHeaders()))),
|
360
|
+
} }, h("tr", null, createColumnHeaders()))), updating &&
|
361
|
+
!loading &&
|
362
|
+
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && h("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
|
363
|
+
!loading &&
|
364
|
+
(isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
365
|
+
"loading-empty": loading,
|
366
|
+
loading: true,
|
367
|
+
"show-background": loadingOptions.showBackground,
|
368
|
+
}, 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 && (h("div", { class: "pagination-container" }, h("ic-pagination-bar", { totalItems: data.length, type: paginationOptions.type, rangeLabelType: paginationOptions.rangeLabelType, showItemsPerPageControl: paginationOptions.itemsPerPageControl, showGoToPageControl: paginationOptions.goToPageControl, itemsPerPageOptions: paginationOptions.itemsPerPage, alignment: paginationOptions.alignment }))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
|
245
369
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
246
370
|
: "table unsorted"))));
|
247
371
|
}
|
@@ -314,7 +438,7 @@ export class DataTable {
|
|
314
438
|
},
|
315
439
|
"density": {
|
316
440
|
"type": "string",
|
317
|
-
"mutable":
|
441
|
+
"mutable": true,
|
318
442
|
"complexType": {
|
319
443
|
"original": "IcDataTableDensityOptions",
|
320
444
|
"resolved": "\"default\" | \"dense\" | \"spacious\"",
|
@@ -354,6 +478,30 @@ export class DataTable {
|
|
354
478
|
"reflect": false,
|
355
479
|
"defaultValue": "false"
|
356
480
|
},
|
481
|
+
"globalRowHeight": {
|
482
|
+
"type": "any",
|
483
|
+
"mutable": true,
|
484
|
+
"complexType": {
|
485
|
+
"original": "IcDataTableRowHeights",
|
486
|
+
"resolved": "\"auto\" | number",
|
487
|
+
"references": {
|
488
|
+
"IcDataTableRowHeights": {
|
489
|
+
"location": "import",
|
490
|
+
"path": "./ic-data-table.types",
|
491
|
+
"id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableRowHeights"
|
492
|
+
}
|
493
|
+
}
|
494
|
+
},
|
495
|
+
"required": false,
|
496
|
+
"optional": true,
|
497
|
+
"docs": {
|
498
|
+
"tags": [],
|
499
|
+
"text": "Sets the row height on all rows in the table that aren't set using the `variableRowHeight` method."
|
500
|
+
},
|
501
|
+
"attribute": "global-row-height",
|
502
|
+
"reflect": false,
|
503
|
+
"defaultValue": "40"
|
504
|
+
},
|
357
505
|
"hideColumnHeaders": {
|
358
506
|
"type": "boolean",
|
359
507
|
"mutable": false,
|
@@ -372,27 +520,84 @@ export class DataTable {
|
|
372
520
|
"reflect": false,
|
373
521
|
"defaultValue": "false"
|
374
522
|
},
|
523
|
+
"loading": {
|
524
|
+
"type": "boolean",
|
525
|
+
"mutable": true,
|
526
|
+
"complexType": {
|
527
|
+
"original": "boolean",
|
528
|
+
"resolved": "boolean",
|
529
|
+
"references": {}
|
530
|
+
},
|
531
|
+
"required": false,
|
532
|
+
"optional": true,
|
533
|
+
"docs": {
|
534
|
+
"tags": [],
|
535
|
+
"text": "When set to `true`, the full table will show a loading state, featuring a radial indicator."
|
536
|
+
},
|
537
|
+
"attribute": "loading",
|
538
|
+
"reflect": false,
|
539
|
+
"defaultValue": "false"
|
540
|
+
},
|
541
|
+
"loadingOptions": {
|
542
|
+
"type": "unknown",
|
543
|
+
"mutable": false,
|
544
|
+
"complexType": {
|
545
|
+
"original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n }",
|
546
|
+
"resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; label?: string; labelDuration?: number; max?: number; min?: number; progress?: number; showBackground?: boolean; }",
|
547
|
+
"references": {
|
548
|
+
"IcThemeForegroundNoDefault": {
|
549
|
+
"location": "import",
|
550
|
+
"path": "@ukic/web-components/dist/types/utils/types",
|
551
|
+
"id": "../web-components/dist/types/utils/types.d.ts::IcThemeForegroundNoDefault"
|
552
|
+
}
|
553
|
+
}
|
554
|
+
},
|
555
|
+
"required": false,
|
556
|
+
"optional": true,
|
557
|
+
"docs": {
|
558
|
+
"tags": [],
|
559
|
+
"text": "Sets the props for the circular loading indicator used in the loading state."
|
560
|
+
}
|
561
|
+
},
|
562
|
+
"minimumLoadingDisplayDuration": {
|
563
|
+
"type": "number",
|
564
|
+
"mutable": false,
|
565
|
+
"complexType": {
|
566
|
+
"original": "number",
|
567
|
+
"resolved": "number",
|
568
|
+
"references": {}
|
569
|
+
},
|
570
|
+
"required": false,
|
571
|
+
"optional": true,
|
572
|
+
"docs": {
|
573
|
+
"tags": [],
|
574
|
+
"text": "The minimum amount of time the `loading` state displays for before showing the data. Used to prevent flashing in the component."
|
575
|
+
},
|
576
|
+
"attribute": "minimum-loading-display-duration",
|
577
|
+
"reflect": false,
|
578
|
+
"defaultValue": "1000"
|
579
|
+
},
|
375
580
|
"paginationOptions": {
|
376
581
|
"type": "unknown",
|
377
582
|
"mutable": false,
|
378
583
|
"complexType": {
|
379
|
-
"original": "{\n itemsPerPage?: { label: string; value: string }[];\n
|
380
|
-
"resolved": "{ itemsPerPage?: { label: string; value: string; }[];
|
584
|
+
"original": "{\n itemsPerPage?: { label: string; value: string }[];\n rangeLabelType?: IcPaginationLabelTypes;\n type?: IcPaginationTypes;\n itemsPerPageControl?: boolean;\n goToPageControl?: boolean;\n alignment?: IcPaginationAlignmentOptions;\n }",
|
585
|
+
"resolved": "{ itemsPerPage?: { label: string; value: string; }[]; rangeLabelType?: IcPaginationLabelTypes; type?: IcPaginationTypes; itemsPerPageControl?: boolean; goToPageControl?: boolean; alignment?: IcPaginationAlignmentOptions; }",
|
381
586
|
"references": {
|
382
|
-
"
|
587
|
+
"IcPaginationLabelTypes": {
|
383
588
|
"location": "import",
|
384
|
-
"path": "
|
385
|
-
"id": "
|
589
|
+
"path": "@ukic/web-components/dist/types/components/ic-pagination/ic-pagination.types",
|
590
|
+
"id": "../web-components/dist/types/components/ic-pagination/ic-pagination.types.d.ts::IcPaginationLabelTypes"
|
386
591
|
},
|
387
|
-
"
|
592
|
+
"IcPaginationTypes": {
|
388
593
|
"location": "import",
|
389
|
-
"path": "
|
390
|
-
"id": "
|
594
|
+
"path": "@ukic/web-components/dist/types/components/ic-pagination/ic-pagination.types",
|
595
|
+
"id": "../web-components/dist/types/components/ic-pagination/ic-pagination.types.d.ts::IcPaginationTypes"
|
391
596
|
},
|
392
597
|
"IcPaginationAlignmentOptions": {
|
393
598
|
"location": "import",
|
394
|
-
"path": "
|
395
|
-
"id": "
|
599
|
+
"path": "@ukic/web-components/dist/types/components/ic-pagination/ic-pagination.types",
|
600
|
+
"id": "../web-components/dist/types/components/ic-pagination/ic-pagination.types.d.ts::IcPaginationAlignmentOptions"
|
396
601
|
}
|
397
602
|
}
|
398
603
|
},
|
@@ -402,7 +607,7 @@ export class DataTable {
|
|
402
607
|
"tags": [],
|
403
608
|
"text": "Sets the props for the pagination bar."
|
404
609
|
},
|
405
|
-
"defaultValue": "{\n itemsPerPage: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n
|
610
|
+
"defaultValue": "{\n itemsPerPage: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n itemsPerPageControl: true,\n goToPageControl: true,\n alignment: \"right\",\n }"
|
406
611
|
},
|
407
612
|
"showPagination": {
|
408
613
|
"type": "boolean",
|
@@ -497,6 +702,66 @@ export class DataTable {
|
|
497
702
|
"attribute": "sticky-row-headers",
|
498
703
|
"reflect": false,
|
499
704
|
"defaultValue": "false"
|
705
|
+
},
|
706
|
+
"updating": {
|
707
|
+
"type": "boolean",
|
708
|
+
"mutable": false,
|
709
|
+
"complexType": {
|
710
|
+
"original": "boolean",
|
711
|
+
"resolved": "boolean",
|
712
|
+
"references": {}
|
713
|
+
},
|
714
|
+
"required": false,
|
715
|
+
"optional": true,
|
716
|
+
"docs": {
|
717
|
+
"tags": [],
|
718
|
+
"text": "If `true`, the table displays a linear loading indicator below the header row to indicate an updating state."
|
719
|
+
},
|
720
|
+
"attribute": "updating",
|
721
|
+
"reflect": false,
|
722
|
+
"defaultValue": "false"
|
723
|
+
},
|
724
|
+
"updatingOptions": {
|
725
|
+
"type": "unknown",
|
726
|
+
"mutable": false,
|
727
|
+
"complexType": {
|
728
|
+
"original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n max?: number;\n min?: number;\n progress?: number;\n }",
|
729
|
+
"resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; max?: number; min?: number; progress?: number; }",
|
730
|
+
"references": {
|
731
|
+
"IcThemeForegroundNoDefault": {
|
732
|
+
"location": "import",
|
733
|
+
"path": "@ukic/web-components/dist/types/utils/types",
|
734
|
+
"id": "../web-components/dist/types/utils/types.d.ts::IcThemeForegroundNoDefault"
|
735
|
+
}
|
736
|
+
}
|
737
|
+
},
|
738
|
+
"required": false,
|
739
|
+
"optional": true,
|
740
|
+
"docs": {
|
741
|
+
"tags": [],
|
742
|
+
"text": "Sets the props for the linear loading indicator used in the updating state."
|
743
|
+
}
|
744
|
+
},
|
745
|
+
"variableRowHeight": {
|
746
|
+
"type": "unknown",
|
747
|
+
"mutable": true,
|
748
|
+
"complexType": {
|
749
|
+
"original": "(params: {\n [key: string]: any;\n index: number;\n }) => IcDataTableRowHeights | null",
|
750
|
+
"resolved": "(params: { [key: string]: any; index: number; }) => IcDataTableRowHeights",
|
751
|
+
"references": {
|
752
|
+
"IcDataTableRowHeights": {
|
753
|
+
"location": "import",
|
754
|
+
"path": "./ic-data-table.types",
|
755
|
+
"id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableRowHeights"
|
756
|
+
}
|
757
|
+
}
|
758
|
+
},
|
759
|
+
"required": false,
|
760
|
+
"optional": true,
|
761
|
+
"docs": {
|
762
|
+
"tags": [],
|
763
|
+
"text": "Allows for custom setting of row heights on individual rows based on an individual value from the `data` prop and the row index.\nIf the function returns `null`, that row's height will be set to the `globalRowHeight` property."
|
764
|
+
}
|
500
765
|
}
|
501
766
|
};
|
502
767
|
}
|
@@ -513,7 +778,61 @@ export class DataTable {
|
|
513
778
|
"toRow": {}
|
514
779
|
};
|
515
780
|
}
|
781
|
+
static get events() {
|
782
|
+
return [{
|
783
|
+
"method": "icRowHeightChange",
|
784
|
+
"name": "icRowHeightChange",
|
785
|
+
"bubbles": true,
|
786
|
+
"cancelable": true,
|
787
|
+
"composed": true,
|
788
|
+
"docs": {
|
789
|
+
"tags": [],
|
790
|
+
"text": "Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table."
|
791
|
+
},
|
792
|
+
"complexType": {
|
793
|
+
"original": "void",
|
794
|
+
"resolved": "void",
|
795
|
+
"references": {}
|
796
|
+
}
|
797
|
+
}];
|
798
|
+
}
|
799
|
+
static get methods() {
|
800
|
+
return {
|
801
|
+
"resetRowHeights": {
|
802
|
+
"complexType": {
|
803
|
+
"signature": "() => Promise<void>",
|
804
|
+
"parameters": [],
|
805
|
+
"references": {
|
806
|
+
"Promise": {
|
807
|
+
"location": "global",
|
808
|
+
"id": "global::Promise"
|
809
|
+
}
|
810
|
+
},
|
811
|
+
"return": "Promise<void>"
|
812
|
+
},
|
813
|
+
"docs": {
|
814
|
+
"text": "Resets the `globalRowHeight` prop to `40px` and sets the `variableRowHeight` prop to `null`.",
|
815
|
+
"tags": []
|
816
|
+
}
|
817
|
+
}
|
818
|
+
};
|
819
|
+
}
|
516
820
|
static get elementRef() { return "el"; }
|
821
|
+
static get watchers() {
|
822
|
+
return [{
|
823
|
+
"propName": "loading",
|
824
|
+
"methodName": "loadingHandler"
|
825
|
+
}, {
|
826
|
+
"propName": "data",
|
827
|
+
"methodName": "dataHandler"
|
828
|
+
}, {
|
829
|
+
"propName": "globalRowHeight",
|
830
|
+
"methodName": "rowHeightChangeHandler"
|
831
|
+
}, {
|
832
|
+
"propName": "variableRowHeight",
|
833
|
+
"methodName": "rowHeightChangeHandler"
|
834
|
+
}];
|
835
|
+
}
|
517
836
|
static get listeners() {
|
518
837
|
return [{
|
519
838
|
"name": "icItemsPerPageChange",
|
@@ -527,6 +846,12 @@ export class DataTable {
|
|
527
846
|
"target": undefined,
|
528
847
|
"capture": false,
|
529
848
|
"passive": false
|
849
|
+
}, {
|
850
|
+
"name": "icTableDensityUpdate",
|
851
|
+
"method": "handleDensityChange",
|
852
|
+
"target": undefined,
|
853
|
+
"capture": false,
|
854
|
+
"passive": false
|
530
855
|
}, {
|
531
856
|
"name": "click",
|
532
857
|
"method": "clickListener",
|