@ukic/canary-web-components 2.0.0-canary.21 → 2.0.0-canary.22
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-081d6031.js → helpers-093368be.js} +3 -1
- package/dist/cjs/helpers-093368be.js.map +1 -0
- package/dist/cjs/{helpers-261701cd.js → helpers-85c5ca15.js} +14 -1
- package/dist/cjs/helpers-85c5ca15.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +11 -6
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +9 -3
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +526 -71
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +4 -3
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +5 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +41 -22
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +1 -1
- package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +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 +47 -12
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/index-4cf27b16.js +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/arrow-dropdown.svg +3 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +55 -5
- package/dist/collection/components/ic-data-table/ic-data-table.js +570 -77
- 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 +364 -21
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js +21 -2
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +7 -0
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +22 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.css +150 -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 +56 -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/components/helpers.js +2 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +11 -1
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-alert2.js +1 -1
- package/dist/components/ic-back-to-top.js +1 -1
- package/dist/components/ic-badge.js +1 -1
- package/dist/components/ic-breadcrumb-group.js +1 -1
- package/dist/components/ic-breadcrumb2.js +1 -1
- package/dist/components/ic-button2.js +1 -1
- package/dist/components/ic-card.js +1 -1
- package/dist/components/ic-checkbox-group.js +1 -1
- package/dist/components/ic-checkbox.js +1 -1
- package/dist/components/ic-chip.js +9 -3
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-data-row.js +1 -1
- package/dist/components/ic-data-table.js +531 -72
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +5 -3
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +6 -1
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-dialog.js +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-empty-state2.js +1 -1
- 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-input-component-container2.js +1 -1
- package/dist/components/ic-input-label2.js +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-link2.js +1 -1
- package/dist/components/ic-loading-indicator2.js +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-item2.js +1 -1
- package/dist/components/ic-menu3.js +1 -1
- package/dist/components/ic-navigation-button.js +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-page-header.js +1 -1
- package/dist/components/ic-pagination-bar2.js +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-popover-menu.js +1 -1
- package/dist/components/ic-radio-group.js +41 -22
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-select-with-multi.js +1 -1
- package/dist/components/ic-select2.js +1 -1
- package/dist/components/ic-side-navigation.js +1 -1
- package/dist/components/ic-step.js +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-switch.js +1 -1
- package/dist/components/ic-tab-panel.js +1 -1
- package/dist/components/ic-text-field2.js +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-tooltip2.js +12 -5
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +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 +53 -15
- package/dist/components/ic-typography2.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-e5b1dd58.entry.js → p-0180e00a.entry.js} +2 -2
- package/dist/core/{p-7f690fa3.entry.js → p-046f4de6.entry.js} +2 -2
- package/dist/core/{p-d5d36143.entry.js → p-06732eaf.entry.js} +2 -2
- package/dist/core/p-0ec04c16.entry.js +2 -0
- package/dist/core/p-0ec04c16.entry.js.map +1 -0
- package/dist/core/{p-01297278.entry.js → p-13993bf3.entry.js} +2 -2
- package/dist/core/{p-693a77bb.entry.js → p-16a48a63.entry.js} +2 -2
- package/dist/core/{p-d91428b4.entry.js → p-216fbd5e.entry.js} +2 -2
- package/dist/core/{p-a8c97918.entry.js → p-2d063032.entry.js} +2 -2
- package/dist/core/{p-2647931d.entry.js → p-2ee5d3fb.entry.js} +2 -2
- package/dist/core/p-355c8532.entry.js +2 -0
- package/dist/core/p-355c8532.entry.js.map +1 -0
- package/dist/core/p-3a59391f.entry.js +2 -0
- package/dist/core/{p-66595f5f.entry.js.map → p-3a59391f.entry.js.map} +1 -1
- package/dist/core/{p-007da09d.entry.js → p-3f2723aa.entry.js} +2 -2
- package/dist/core/p-401d0c66.entry.js +2 -0
- package/dist/core/p-401d0c66.entry.js.map +1 -0
- package/dist/core/p-413e68be.entry.js +2 -0
- package/dist/core/{p-a4585c7e.entry.js.map → p-413e68be.entry.js.map} +1 -1
- package/dist/core/{p-a970d653.entry.js → p-418a84d4.entry.js} +2 -2
- package/dist/core/{p-354e5dbe.entry.js → p-41916ef7.entry.js} +2 -2
- package/dist/core/p-4309460f.entry.js +2 -0
- package/dist/core/p-4309460f.entry.js.map +1 -0
- package/dist/core/{p-6f8fd43e.entry.js → p-486a6957.entry.js} +2 -2
- package/dist/core/{p-b3ed5423.entry.js → p-5348af01.entry.js} +2 -2
- package/dist/core/p-57043b1e.entry.js +2 -0
- package/dist/core/{p-d68e0c94.entry.js.map → p-57043b1e.entry.js.map} +1 -1
- package/dist/core/{p-6b74397a.entry.js → p-59993f36.entry.js} +2 -2
- package/dist/core/{p-be4c0cc8.entry.js → p-6398a726.entry.js} +2 -2
- package/dist/core/{p-9e7a5c72.entry.js → p-648fb902.entry.js} +2 -2
- package/dist/core/{p-d3ea79e1.entry.js → p-673a4a62.entry.js} +2 -2
- package/dist/core/{p-fb4219d6.entry.js → p-67ae9d37.entry.js} +2 -2
- package/dist/core/{p-0ea28e7a.entry.js → p-6b01e096.entry.js} +2 -2
- package/dist/core/{p-40fc7162.entry.js → p-6b1fcf87.entry.js} +2 -2
- package/dist/core/{p-1d0cff8a.entry.js → p-6fb3d61e.entry.js} +2 -2
- package/dist/core/{p-1733278a.entry.js → p-789ae7f5.entry.js} +2 -2
- package/dist/core/{p-45ebcb74.js → p-8128572e.js} +2 -2
- package/dist/{esm/helpers-d41662f3.js.map → core/p-8128572e.js.map} +1 -1
- package/dist/core/p-84eaa486.entry.js +2 -0
- package/dist/core/p-84eaa486.entry.js.map +1 -0
- package/dist/core/{p-0944d33b.entry.js → p-89c7ea3e.entry.js} +2 -2
- package/dist/core/{p-96670e29.entry.js → p-8d276e8f.entry.js} +2 -2
- package/dist/core/{p-569a68c0.entry.js → p-91cf89c8.entry.js} +2 -2
- package/dist/core/p-91cf89c8.entry.js.map +1 -0
- package/dist/core/p-969cadfa.entry.js +2 -0
- package/dist/core/p-969cadfa.entry.js.map +1 -0
- package/dist/core/{p-d44b7f21.entry.js → p-97f141a6.entry.js} +2 -2
- package/dist/core/{p-9f8ef2bc.entry.js → p-99185fd5.entry.js} +2 -2
- package/dist/core/{p-1ac733c1.entry.js → p-99f96c33.entry.js} +2 -2
- package/dist/core/{p-4e6f7cfe.entry.js → p-a052bb95.entry.js} +2 -2
- package/dist/core/{p-9e69f517.entry.js → p-a72af8db.entry.js} +2 -2
- package/dist/core/{p-ae7c2c39.entry.js → p-a787bba7.entry.js} +2 -2
- package/dist/core/{p-e393e53c.entry.js → p-aa72f551.entry.js} +2 -2
- package/dist/core/{p-3d9eca50.entry.js → p-aaaa9261.entry.js} +2 -2
- package/dist/core/p-adbe0d89.js +2 -0
- package/dist/core/p-adbe0d89.js.map +1 -0
- package/dist/core/{p-a589ead8.entry.js → p-b29e96b5.entry.js} +2 -2
- package/dist/core/p-b97eba08.entry.js +2 -0
- package/dist/core/p-b97eba08.entry.js.map +1 -0
- package/dist/core/{p-fab8da25.entry.js → p-bfc5f3f4.entry.js} +2 -2
- package/dist/core/{p-e2421111.entry.js → p-cb3afdbf.entry.js} +2 -2
- package/dist/core/{p-d06c0049.entry.js → p-ccf72538.entry.js} +2 -2
- package/dist/core/{p-0551f0cf.entry.js → p-ce0999f1.entry.js} +2 -2
- package/dist/core/{p-01008e8d.entry.js → p-d02a4d1b.entry.js} +2 -2
- package/dist/core/{p-ffeca3c7.entry.js → p-d8322108.entry.js} +2 -2
- package/dist/core/{p-fdacc7f7.entry.js → p-d86cdbc8.entry.js} +2 -2
- package/dist/core/{p-59d9ea22.entry.js → p-da8255b8.entry.js} +2 -2
- package/dist/core/{p-6e697a16.entry.js → p-e9f5ebb3.entry.js} +2 -2
- package/dist/core/p-e9f5ebb3.entry.js.map +1 -0
- package/dist/core/{p-145c8074.entry.js → p-ede631c5.entry.js} +2 -2
- package/dist/core/{p-d39239be.entry.js → p-f09b2041.entry.js} +2 -2
- package/dist/core/{p-169bcf0f.entry.js → p-f1044e4d.entry.js} +2 -2
- package/dist/core/{p-3be4aae0.entry.js → p-f10f7f37.entry.js} +2 -2
- package/dist/core/{p-a6d3743c.entry.js → p-fa77211d.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-d41662f3.js → helpers-886489d5.js} +3 -2
- package/dist/esm/helpers-886489d5.js.map +1 -0
- package/dist/esm/{helpers-e75fd113.js → helpers-f543bc77.js} +12 -2
- package/dist/esm/helpers-f543bc77.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +11 -6
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +1 -1
- package/dist/esm/ic-card.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js +9 -3
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +526 -71
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +4 -3
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +5 -1
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +1 -1
- package/dist/esm/ic-menu.entry.js +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination_4.entry.js +1 -1
- package/dist/esm/ic-popover-menu.entry.js +1 -1
- package/dist/esm/ic-radio-group.entry.js +41 -22
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +1 -1
- package/dist/esm/ic-side-navigation.entry.js +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js +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 +48 -13
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/index-93509377.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +68 -7
- 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 +112 -0
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +4 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
- 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 +173 -6
- package/hydrate/index.js +1175 -161
- package/package.json +3 -3
- package/dist/cjs/helpers-081d6031.js.map +0 -1
- package/dist/cjs/helpers-261701cd.js.map +0 -1
- package/dist/core/p-32a3b6c8.entry.js +0 -2
- package/dist/core/p-32a3b6c8.entry.js.map +0 -1
- package/dist/core/p-45ebcb74.js.map +0 -1
- package/dist/core/p-569a68c0.entry.js.map +0 -1
- package/dist/core/p-66595f5f.entry.js +0 -2
- package/dist/core/p-6e697a16.entry.js.map +0 -1
- package/dist/core/p-a4585c7e.entry.js +0 -2
- package/dist/core/p-c04f1bfb.entry.js +0 -2
- package/dist/core/p-c04f1bfb.entry.js.map +0 -1
- package/dist/core/p-d448bdbd.entry.js +0 -2
- package/dist/core/p-d448bdbd.entry.js.map +0 -1
- package/dist/core/p-d68e0c94.entry.js +0 -2
- package/dist/core/p-e191290c.entry.js +0 -2
- package/dist/core/p-e191290c.entry.js.map +0 -1
- package/dist/core/p-f6735e4a.js +0 -2
- package/dist/core/p-f6735e4a.js.map +0 -1
- package/dist/core/p-fc0eac8b.entry.js +0 -2
- package/dist/core/p-fc0eac8b.entry.js.map +0 -1
- package/dist/esm/helpers-e75fd113.js.map +0 -1
- /package/dist/core/{p-e5b1dd58.entry.js.map → p-0180e00a.entry.js.map} +0 -0
- /package/dist/core/{p-7f690fa3.entry.js.map → p-046f4de6.entry.js.map} +0 -0
- /package/dist/core/{p-d5d36143.entry.js.map → p-06732eaf.entry.js.map} +0 -0
- /package/dist/core/{p-01297278.entry.js.map → p-13993bf3.entry.js.map} +0 -0
- /package/dist/core/{p-693a77bb.entry.js.map → p-16a48a63.entry.js.map} +0 -0
- /package/dist/core/{p-d91428b4.entry.js.map → p-216fbd5e.entry.js.map} +0 -0
- /package/dist/core/{p-a8c97918.entry.js.map → p-2d063032.entry.js.map} +0 -0
- /package/dist/core/{p-2647931d.entry.js.map → p-2ee5d3fb.entry.js.map} +0 -0
- /package/dist/core/{p-007da09d.entry.js.map → p-3f2723aa.entry.js.map} +0 -0
- /package/dist/core/{p-a970d653.entry.js.map → p-418a84d4.entry.js.map} +0 -0
- /package/dist/core/{p-354e5dbe.entry.js.map → p-41916ef7.entry.js.map} +0 -0
- /package/dist/core/{p-6f8fd43e.entry.js.map → p-486a6957.entry.js.map} +0 -0
- /package/dist/core/{p-b3ed5423.entry.js.map → p-5348af01.entry.js.map} +0 -0
- /package/dist/core/{p-6b74397a.entry.js.map → p-59993f36.entry.js.map} +0 -0
- /package/dist/core/{p-be4c0cc8.entry.js.map → p-6398a726.entry.js.map} +0 -0
- /package/dist/core/{p-9e7a5c72.entry.js.map → p-648fb902.entry.js.map} +0 -0
- /package/dist/core/{p-d3ea79e1.entry.js.map → p-673a4a62.entry.js.map} +0 -0
- /package/dist/core/{p-fb4219d6.entry.js.map → p-67ae9d37.entry.js.map} +0 -0
- /package/dist/core/{p-0ea28e7a.entry.js.map → p-6b01e096.entry.js.map} +0 -0
- /package/dist/core/{p-40fc7162.entry.js.map → p-6b1fcf87.entry.js.map} +0 -0
- /package/dist/core/{p-1d0cff8a.entry.js.map → p-6fb3d61e.entry.js.map} +0 -0
- /package/dist/core/{p-1733278a.entry.js.map → p-789ae7f5.entry.js.map} +0 -0
- /package/dist/core/{p-0944d33b.entry.js.map → p-89c7ea3e.entry.js.map} +0 -0
- /package/dist/core/{p-96670e29.entry.js.map → p-8d276e8f.entry.js.map} +0 -0
- /package/dist/core/{p-d44b7f21.entry.js.map → p-97f141a6.entry.js.map} +0 -0
- /package/dist/core/{p-9f8ef2bc.entry.js.map → p-99185fd5.entry.js.map} +0 -0
- /package/dist/core/{p-1ac733c1.entry.js.map → p-99f96c33.entry.js.map} +0 -0
- /package/dist/core/{p-4e6f7cfe.entry.js.map → p-a052bb95.entry.js.map} +0 -0
- /package/dist/core/{p-9e69f517.entry.js.map → p-a72af8db.entry.js.map} +0 -0
- /package/dist/core/{p-ae7c2c39.entry.js.map → p-a787bba7.entry.js.map} +0 -0
- /package/dist/core/{p-e393e53c.entry.js.map → p-aa72f551.entry.js.map} +0 -0
- /package/dist/core/{p-3d9eca50.entry.js.map → p-aaaa9261.entry.js.map} +0 -0
- /package/dist/core/{p-a589ead8.entry.js.map → p-b29e96b5.entry.js.map} +0 -0
- /package/dist/core/{p-fab8da25.entry.js.map → p-bfc5f3f4.entry.js.map} +0 -0
- /package/dist/core/{p-e2421111.entry.js.map → p-cb3afdbf.entry.js.map} +0 -0
- /package/dist/core/{p-d06c0049.entry.js.map → p-ccf72538.entry.js.map} +0 -0
- /package/dist/core/{p-0551f0cf.entry.js.map → p-ce0999f1.entry.js.map} +0 -0
- /package/dist/core/{p-01008e8d.entry.js.map → p-d02a4d1b.entry.js.map} +0 -0
- /package/dist/core/{p-ffeca3c7.entry.js.map → p-d8322108.entry.js.map} +0 -0
- /package/dist/core/{p-fdacc7f7.entry.js.map → p-d86cdbc8.entry.js.map} +0 -0
- /package/dist/core/{p-59d9ea22.entry.js.map → p-da8255b8.entry.js.map} +0 -0
- /package/dist/core/{p-145c8074.entry.js.map → p-ede631c5.entry.js.map} +0 -0
- /package/dist/core/{p-d39239be.entry.js.map → p-f09b2041.entry.js.map} +0 -0
- /package/dist/core/{p-169bcf0f.entry.js.map → p-f1044e4d.entry.js.map} +0 -0
- /package/dist/core/{p-3be4aae0.entry.js.map → p-f10f7f37.entry.js.map} +0 -0
- /package/dist/core/{p-a6d3743c.entry.js.map → p-fa77211d.entry.js.map} +0 -0
package/hydrate/index.js
CHANGED
@@ -7692,10 +7692,10 @@ const debounceEvent = (event, wait) => {
|
|
7692
7692
|
const original = event._original || event;
|
7693
7693
|
return {
|
7694
7694
|
_original: event,
|
7695
|
-
emit: debounce$
|
7695
|
+
emit: debounce$3(original.emit.bind(original), wait),
|
7696
7696
|
};
|
7697
7697
|
};
|
7698
|
-
const debounce$
|
7698
|
+
const debounce$3 = (func, wait = 0) => {
|
7699
7699
|
let timer;
|
7700
7700
|
return (...args) => {
|
7701
7701
|
clearTimeout(timer);
|
@@ -7844,7 +7844,7 @@ const handleHiddenFormButtonClick = (form, button) => {
|
|
7844
7844
|
};
|
7845
7845
|
const isEmptyString$1 = (value) => value ? value.trim().length === 0 : true;
|
7846
7846
|
// A helper function that checks if a prop has been defined
|
7847
|
-
const isPropDefined = (prop) => prop !== undefined ? prop : null;
|
7847
|
+
const isPropDefined$1 = (prop) => prop !== undefined ? prop : null;
|
7848
7848
|
/**
|
7849
7849
|
* Extracts the label using the value from an object. Requires the object to have a label and value property.
|
7850
7850
|
* @param value - value from object
|
@@ -8052,7 +8052,7 @@ const removeFormResetListener$1 = (el, callbackFn) => {
|
|
8052
8052
|
var _a;
|
8053
8053
|
(_a = el.closest("FORM")) === null || _a === void 0 ? void 0 : _a.removeEventListener("reset", callbackFn);
|
8054
8054
|
};
|
8055
|
-
const pxToRem = (px, base = 16) => `${(1 / base) * parseInt(px)}rem`;
|
8055
|
+
const pxToRem$1 = (px, base = 16) => `${(1 / base) * parseInt(px)}rem`;
|
8056
8056
|
const removeDisabledFalse$1 = (disabled, element) => {
|
8057
8057
|
if (!disabled) {
|
8058
8058
|
element.removeAttribute("disabled");
|
@@ -8073,6 +8073,7 @@ const checkSlotInChildMutations$1 = (addedNodes, removedNodes, slotName) => {
|
|
8073
8073
|
: node.slot === slotName);
|
8074
8074
|
return hasSlot(addedNodes) || hasSlot(removedNodes);
|
8075
8075
|
};
|
8076
|
+
const isElInAGGrid = (el) => !!el.closest(".ag-cell") && !!el.closest(".ag-root");
|
8076
8077
|
|
8077
8078
|
var chevronIcon = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
8078
8079
|
<path d="M9.70687 6L8.29688 7.41L12.8769 12L8.29688 16.59L9.70687 18L15.7069 12L9.70687 6Z" fill="currentColor"/>
|
@@ -8659,7 +8660,7 @@ class Badge {
|
|
8659
8660
|
}
|
8660
8661
|
}
|
8661
8662
|
};
|
8662
|
-
this.isAccessibleLabelDefined = () => isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;
|
8663
|
+
this.isAccessibleLabelDefined = () => isPropDefined$1(this.accessibleLabel) && this.accessibleLabel !== null;
|
8663
8664
|
this.accessibleLabel = undefined;
|
8664
8665
|
this.customColor = null;
|
8665
8666
|
this.maxNumber = undefined;
|
@@ -8763,7 +8764,7 @@ class Breadcrumb {
|
|
8763
8764
|
constructor(hostRef) {
|
8764
8765
|
registerInstance(this, hostRef);
|
8765
8766
|
this.renderDefaultBreadcrumb = (current, pageTitle, describedById, href) => {
|
8766
|
-
const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== "";
|
8767
|
+
const hasPageTitle = pageTitle !== null && isPropDefined$1(pageTitle) && pageTitle !== "";
|
8767
8768
|
if (current && hasPageTitle) {
|
8768
8769
|
return (hAsync("span", { class: {
|
8769
8770
|
"current-page-container": current,
|
@@ -8805,8 +8806,8 @@ class Breadcrumb {
|
|
8805
8806
|
render() {
|
8806
8807
|
const { current, href, pageTitle } = this;
|
8807
8808
|
const describedById = `${pageTitle && pageTitle.toLowerCase().replace(" ", "-")}-describedby`;
|
8808
|
-
const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== "";
|
8809
|
-
const hasHref = href !== null && isPropDefined(href) && href !== "";
|
8809
|
+
const hasPageTitle = pageTitle !== null && isPropDefined$1(pageTitle) && pageTitle !== "";
|
8810
|
+
const hasHref = href !== null && isPropDefined$1(href) && href !== "";
|
8810
8811
|
return (hAsync(Host, { class: {
|
8811
8812
|
back: this.showBackIcon,
|
8812
8813
|
}, "aria-current": current && "page", role: "listitem" }, hAsync("div", { class: "breadcrumb" }, hAsync("span", { innerHTML: chevronIcon, class: "chevron", "aria-hidden": "true" }), this.showBackIcon && describedById && (hAsync("span", { id: describedById, class: "hide" }, `Back to ${pageTitle}`)), hasPageTitle && hasHref ? (this.renderDefaultBreadcrumb(current, pageTitle, describedById, href)) : (hAsync("slot", null)))));
|
@@ -9045,7 +9046,7 @@ class BreadcrumbGroup {
|
|
9045
9046
|
}; }
|
9046
9047
|
}
|
9047
9048
|
|
9048
|
-
var arrowDropdown = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
9049
|
+
var arrowDropdown$1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
9049
9050
|
<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor"/>
|
9050
9051
|
</svg>`;
|
9051
9052
|
|
@@ -9328,7 +9329,7 @@ class Button {
|
|
9328
9329
|
this.variant !== "destructive" && (hAsync("span", { class: {
|
9329
9330
|
["arrow-dropdown"]: !this.dropdownExpanded,
|
9330
9331
|
["dropdown-expanded"]: this.dropdownExpanded,
|
9331
|
-
}, innerHTML: arrowDropdown }))));
|
9332
|
+
}, innerHTML: arrowDropdown$1 }))));
|
9332
9333
|
};
|
9333
9334
|
return (hAsync(Host, { class: {
|
9334
9335
|
["disabled"]: this.disabled && !this.loading,
|
@@ -9707,6 +9708,13 @@ const inheritAttributes = (element, attributes = []) => {
|
|
9707
9708
|
});
|
9708
9709
|
return attributeObject;
|
9709
9710
|
};
|
9711
|
+
const debounce$2 = (func, wait = 0) => {
|
9712
|
+
let timer;
|
9713
|
+
return (...args) => {
|
9714
|
+
clearTimeout(timer);
|
9715
|
+
timer = setTimeout(func, wait, ...args);
|
9716
|
+
};
|
9717
|
+
};
|
9710
9718
|
/**
|
9711
9719
|
* This method is used to add a hidden input to a host element that contains
|
9712
9720
|
* a Shadow DOM. It does not add the input inside of the Shadow root which
|
@@ -9776,6 +9784,8 @@ const getThemeFromContext = (el, themeFromEvent = null) => {
|
|
9776
9784
|
return IcThemeForegroundEnum.Default;
|
9777
9785
|
};
|
9778
9786
|
const isEmptyString = (value) => value ? value.trim().length === 0 : true;
|
9787
|
+
// A helper function that checks if a prop has been defined
|
9788
|
+
const isPropDefined = (prop) => prop !== undefined ? prop : null;
|
9779
9789
|
const getCssProperty = (cssVar) => getComputedStyle(document.documentElement).getPropertyValue(cssVar);
|
9780
9790
|
const getSlot = (element, name) => {
|
9781
9791
|
if (element && element.querySelector) {
|
@@ -9883,6 +9893,7 @@ const getOptionsWithoutGroupTitlesCount = (options) => {
|
|
9883
9893
|
}
|
9884
9894
|
return optionsWithoutGroupTitles.length;
|
9885
9895
|
};
|
9896
|
+
const pxToRem = (px, base = 16) => `${(1 / base) * parseInt(px)}rem`;
|
9886
9897
|
const isNumeric = (value) => {
|
9887
9898
|
return /^-?\d+$/.test(value);
|
9888
9899
|
};
|
@@ -10186,7 +10197,7 @@ class Checkbox {
|
|
10186
10197
|
}
|
10187
10198
|
render() {
|
10188
10199
|
const { additionalFieldDisplay, checked, disabled, dynamicText, el, form, formaction, formenctype, formmethod, formnovalidate, formtarget, displayIndeterminate, groupLabel, label, name, size, small, value, } = this;
|
10189
|
-
const id = `ic-checkbox-${isPropDefined(label) || value}-${groupLabel}`.replace(/ /g, "-");
|
10200
|
+
const id = `ic-checkbox-${isPropDefined$1(label) || value}-${groupLabel}`.replace(/ /g, "-");
|
10190
10201
|
const parentElementSize = el.parentElement
|
10191
10202
|
.size;
|
10192
10203
|
checked
|
@@ -10340,7 +10351,7 @@ var dismissIcon = `<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org
|
|
10340
10351
|
</svg>
|
10341
10352
|
`;
|
10342
10353
|
|
10343
|
-
const icChipCss = "/*!@html*/html.sc-ic-chip{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-chip{margin:0}/*!@main*/main.sc-ic-chip{display:block}/*!@h1*/h1.sc-ic-chip{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-chip{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-chip{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-chip{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-chip{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-chip,strong.sc-ic-chip{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-chip,kbd.sc-ic-chip,samp.sc-ic-chip{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-chip{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-chip,sup.sc-ic-chip{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-chip{bottom:-0.25em}/*!@sup*/sup.sc-ic-chip{top:-0.5em}/*!@img*/img.sc-ic-chip{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-chip,input.sc-ic-chip,optgroup.sc-ic-chip,select.sc-ic-chip,textarea.sc-ic-chip{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-chip,input.sc-ic-chip{overflow:visible}/*!@button,\nselect*/button.sc-ic-chip,select.sc-ic-chip{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-chip,[type=\"button\"].sc-ic-chip,[type=\"reset\"].sc-ic-chip,[type=\"submit\"].sc-ic-chip{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-chip::-moz-focus-inner,[type=\"button\"].sc-ic-chip::-moz-focus-inner,[type=\"reset\"].sc-ic-chip::-moz-focus-inner,[type=\"submit\"].sc-ic-chip::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-chip:-moz-focusring,[type=\"button\"].sc-ic-chip:-moz-focusring,[type=\"reset\"].sc-ic-chip:-moz-focusring,[type=\"submit\"].sc-ic-chip:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-chip{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-chip{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-chip{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-chip{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-chip,[type=\"radio\"].sc-ic-chip{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-chip::-webkit-inner-spin-button,[type=\"number\"].sc-ic-chip::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-chip{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-chip::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-chip::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-chip{display:block}/*!@summary*/summary.sc-ic-chip{display:list-item}/*!@template*/template.sc-ic-chip{display:none}/*!@[hidden]*/[hidden].sc-ic-chip{display:none}/*!@html,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo*/html.sc-ic-chip,body.sc-ic-chip,div.sc-ic-chip,span.sc-ic-chip,applet.sc-ic-chip,object.sc-ic-chip,iframe.sc-ic-chip,h1.sc-ic-chip,h2.sc-ic-chip,h3.sc-ic-chip,h4.sc-ic-chip,h5.sc-ic-chip,h6.sc-ic-chip,p.sc-ic-chip,blockquote.sc-ic-chip,pre.sc-ic-chip,a.sc-ic-chip,abbr.sc-ic-chip,acronym.sc-ic-chip,address.sc-ic-chip,big.sc-ic-chip,cite.sc-ic-chip,code.sc-ic-chip,del.sc-ic-chip,dfn.sc-ic-chip,em.sc-ic-chip,img.sc-ic-chip,ins.sc-ic-chip,kbd.sc-ic-chip,q.sc-ic-chip,s.sc-ic-chip,samp.sc-ic-chip,small.sc-ic-chip,strike.sc-ic-chip,strong.sc-ic-chip,sub.sc-ic-chip,sup.sc-ic-chip,tt.sc-ic-chip,var.sc-ic-chip,b.sc-ic-chip,u.sc-ic-chip,i.sc-ic-chip,center.sc-ic-chip,dl.sc-ic-chip,dt.sc-ic-chip,dd.sc-ic-chip,ol.sc-ic-chip,ul.sc-ic-chip,li.sc-ic-chip,fieldset.sc-ic-chip,form.sc-ic-chip,label.sc-ic-chip,legend.sc-ic-chip,table.sc-ic-chip,caption.sc-ic-chip,tbody.sc-ic-chip,tfoot.sc-ic-chip,thead.sc-ic-chip,tr.sc-ic-chip,th.sc-ic-chip,td.sc-ic-chip,article.sc-ic-chip,aside.sc-ic-chip,canvas.sc-ic-chip,details.sc-ic-chip,embed.sc-ic-chip,figure.sc-ic-chip,figcaption.sc-ic-chip,footer.sc-ic-chip,header.sc-ic-chip,hgroup.sc-ic-chip,menu.sc-ic-chip,nav.sc-ic-chip,output.sc-ic-chip,ruby.sc-ic-chip,section.sc-ic-chip,summary.sc-ic-chip,time.sc-ic-chip,mark.sc-ic-chip,audio.sc-ic-chip,video.sc-ic-chip{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-chip-h{display:inline-block}/*!@.chip*/.chip.sc-ic-chip{display:flex;padding:var(--ic-space-xxs);font-size:0.875rem;border-radius:var(--ic-space-md);text-align:left;text-decoration:none;transition:var(--ic-easing-transition-fast);position:relative}/*!@.chip.small*/.chip.small.sc-ic-chip{padding:var(--ic-space-xxxs);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}/*!@.chip.large*/.chip.large.sc-ic-chip{padding:var(--ic-space-xs);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}/*!@.label*/.label.sc-ic-chip{padding:0 var(--ic-space-xs)}/*!@.chip.hovered:not(:focus-within)*/.chip.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-architectural-300)}/*!@.chip:focus-within*/.chip.sc-ic-chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}/*!@.chip.outline.hovered:not(:focus-within),\n.chip.outlined.hovered:not(:focus-within)*/.chip.outline.hovered.sc-ic-chip:not(:focus-within),.chip.outlined.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}/*!@ic-tooltip:focus-within*/ic-tooltip.sc-ic-chip:focus-within{z-index:1}/*!@.filled*/.filled.sc-ic-chip{background-color:var(--chip-custom-color, var(--ic-architectural-200));color:var(--chip-custom-foreground-color, black);border:none}/*!@.filled.disabled*/.filled.disabled.sc-ic-chip{background-color:var(--ic-architectural-100)}/*!@.outline,\n.outlined*/.outline.sc-ic-chip,.outlined.sc-ic-chip{color:var(--ic-architectural-900);border:var(--ic-border-width) solid\n var(--chip-custom-color, var(--ic-architectural-900));padding:calc(var(--ic-space-xxs) - var(--ic-space-1px))}/*!@.outline.small,\n.outlined.small*/.outline.small.sc-ic-chip,.outlined.small.sc-ic-chip{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}/*!@.outline.large,\n.outlined.large*/.outline.large.sc-ic-chip,.outlined.large.sc-ic-chip{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}/*!@.outline.disabled,\n.outlined.disabled*/.outline.disabled.sc-ic-chip,.outlined.disabled.sc-ic-chip{border:var(--ic-border-disabled);background:none}/*!@.chip.disabled ic-typography*/.chip.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:var(--ic-architectural-500)}/*!@.filled.disabled ic-typography*/.filled.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:var(--ic-architectural-600)}/*!@.dismiss-icon*/.dismiss-icon.sc-ic-chip{border:none;border-radius:50%;padding:0;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs))}/*!@.dismiss-icon:focus*/.dismiss-icon.sc-ic-chip:focus{outline:var(--ic-hc-focus-outline)}/*!@.dismiss-icon[disabled]*/.dismiss-icon[disabled].sc-ic-chip{pointer-events:none;color:var(--ic-architectural-200)}/*!@.icon*/.icon.sc-ic-chip{padding:var(--ic-space-xxxs);box-sizing:border-box}/*!@.icon,\nic-tooltip*/.icon.sc-ic-chip,ic-tooltip.sc-ic-chip{width:var(--ic-space-lg);height:var(--ic-space-lg)}/*!@.chip.disabled path,\n.chip.disabled ::slotted(svg)*/.chip.disabled.sc-ic-chip path.sc-ic-chip,.chip.disabled.sc-ic-chip-s>svg,.chip.disabled .sc-ic-chip-s>svg{fill:var(--ic-architectural-200)}/*!@.chip.white-background*/.chip.white-background.sc-ic-chip{background-color:var(--ic-architectural-white)}/*!@.chip.white-background.hovered:not(:focus-within)*/.chip.white-background.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-action-dark-bg-hover-no-alpha) !important}@media (forced-colors: active){/*!@.chip*/.chip.sc-ic-chip{border:var(--ic-hc-border)}/*!@.filled.small*/.filled.small.sc-ic-chip{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}/*!@.filled*/.filled.sc-ic-chip{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}/*!@.filled.large*/.filled.large.sc-ic-chip{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}/*!@.chip.disabled*/.chip.disabled.sc-ic-chip{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}/*!@.chip.disabled ic-typography*/.chip.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:GrayText}/*!@.chip.disabled path,\n .chip.disabled ::slotted(svg)*/.chip.disabled.sc-ic-chip path.sc-ic-chip,.chip.disabled.sc-ic-chip-s>svg,.chip.disabled .sc-ic-chip-s>svg{fill:GrayText}/*!@.chip:focus-within*/.chip.sc-ic-chip:focus-within{outline:none;border-color:Highlight}}";
|
10354
|
+
const icChipCss = "/*!@html*/html.sc-ic-chip{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-chip{margin:0}/*!@main*/main.sc-ic-chip{display:block}/*!@h1*/h1.sc-ic-chip{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-chip{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-chip{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-chip{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-chip{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-chip,strong.sc-ic-chip{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-chip,kbd.sc-ic-chip,samp.sc-ic-chip{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-chip{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-chip,sup.sc-ic-chip{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-chip{bottom:-0.25em}/*!@sup*/sup.sc-ic-chip{top:-0.5em}/*!@img*/img.sc-ic-chip{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-chip,input.sc-ic-chip,optgroup.sc-ic-chip,select.sc-ic-chip,textarea.sc-ic-chip{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-chip,input.sc-ic-chip{overflow:visible}/*!@button,\nselect*/button.sc-ic-chip,select.sc-ic-chip{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-chip,[type=\"button\"].sc-ic-chip,[type=\"reset\"].sc-ic-chip,[type=\"submit\"].sc-ic-chip{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-chip::-moz-focus-inner,[type=\"button\"].sc-ic-chip::-moz-focus-inner,[type=\"reset\"].sc-ic-chip::-moz-focus-inner,[type=\"submit\"].sc-ic-chip::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-chip:-moz-focusring,[type=\"button\"].sc-ic-chip:-moz-focusring,[type=\"reset\"].sc-ic-chip:-moz-focusring,[type=\"submit\"].sc-ic-chip:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-chip{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-chip{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-chip{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-chip{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-chip,[type=\"radio\"].sc-ic-chip{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-chip::-webkit-inner-spin-button,[type=\"number\"].sc-ic-chip::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-chip{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-chip::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-chip::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-chip{display:block}/*!@summary*/summary.sc-ic-chip{display:list-item}/*!@template*/template.sc-ic-chip{display:none}/*!@[hidden]*/[hidden].sc-ic-chip{display:none}/*!@html,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo*/html.sc-ic-chip,body.sc-ic-chip,div.sc-ic-chip,span.sc-ic-chip,applet.sc-ic-chip,object.sc-ic-chip,iframe.sc-ic-chip,h1.sc-ic-chip,h2.sc-ic-chip,h3.sc-ic-chip,h4.sc-ic-chip,h5.sc-ic-chip,h6.sc-ic-chip,p.sc-ic-chip,blockquote.sc-ic-chip,pre.sc-ic-chip,a.sc-ic-chip,abbr.sc-ic-chip,acronym.sc-ic-chip,address.sc-ic-chip,big.sc-ic-chip,cite.sc-ic-chip,code.sc-ic-chip,del.sc-ic-chip,dfn.sc-ic-chip,em.sc-ic-chip,img.sc-ic-chip,ins.sc-ic-chip,kbd.sc-ic-chip,q.sc-ic-chip,s.sc-ic-chip,samp.sc-ic-chip,small.sc-ic-chip,strike.sc-ic-chip,strong.sc-ic-chip,sub.sc-ic-chip,sup.sc-ic-chip,tt.sc-ic-chip,var.sc-ic-chip,b.sc-ic-chip,u.sc-ic-chip,i.sc-ic-chip,center.sc-ic-chip,dl.sc-ic-chip,dt.sc-ic-chip,dd.sc-ic-chip,ol.sc-ic-chip,ul.sc-ic-chip,li.sc-ic-chip,fieldset.sc-ic-chip,form.sc-ic-chip,label.sc-ic-chip,legend.sc-ic-chip,table.sc-ic-chip,caption.sc-ic-chip,tbody.sc-ic-chip,tfoot.sc-ic-chip,thead.sc-ic-chip,tr.sc-ic-chip,th.sc-ic-chip,td.sc-ic-chip,article.sc-ic-chip,aside.sc-ic-chip,canvas.sc-ic-chip,details.sc-ic-chip,embed.sc-ic-chip,figure.sc-ic-chip,figcaption.sc-ic-chip,footer.sc-ic-chip,header.sc-ic-chip,hgroup.sc-ic-chip,menu.sc-ic-chip,nav.sc-ic-chip,output.sc-ic-chip,ruby.sc-ic-chip,section.sc-ic-chip,summary.sc-ic-chip,time.sc-ic-chip,mark.sc-ic-chip,audio.sc-ic-chip,video.sc-ic-chip{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-chip-h{display:inline-block;max-width:100%}/*!@.chip*/.chip.sc-ic-chip{display:flex;padding:var(--ic-space-xxs);font-size:0.875rem;border-radius:var(--ic-space-md);text-align:left;text-decoration:none;transition:var(--ic-easing-transition-fast);position:relative}/*!@.chip.small*/.chip.small.sc-ic-chip{padding:var(--ic-space-xxxs);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}/*!@.chip.large*/.chip.large.sc-ic-chip{padding:var(--ic-space-xs);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}/*!@.label*/.label.sc-ic-chip{padding:0 var(--ic-space-xs)}/*!@.chip.hovered:not(:focus-within)*/.chip.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-architectural-300)}/*!@.chip:focus-within*/.chip.sc-ic-chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}/*!@.chip.outline.hovered:not(:focus-within),\n.chip.outlined.hovered:not(:focus-within)*/.chip.outline.hovered.sc-ic-chip:not(:focus-within),.chip.outlined.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}/*!@ic-tooltip:focus-within*/ic-tooltip.sc-ic-chip:focus-within{z-index:1}/*!@.filled*/.filled.sc-ic-chip{background-color:var(--chip-custom-color, var(--ic-architectural-200));color:var(--chip-custom-foreground-color, black);border:none}/*!@.filled.disabled*/.filled.disabled.sc-ic-chip{background-color:var(--ic-architectural-100)}/*!@.outline,\n.outlined*/.outline.sc-ic-chip,.outlined.sc-ic-chip{color:var(--ic-architectural-900);border:var(--ic-border-width) solid\n var(--chip-custom-color, var(--ic-architectural-900));padding:calc(var(--ic-space-xxs) - var(--ic-space-1px))}/*!@.outline.small,\n.outlined.small*/.outline.small.sc-ic-chip,.outlined.small.sc-ic-chip{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}/*!@.outline.large,\n.outlined.large*/.outline.large.sc-ic-chip,.outlined.large.sc-ic-chip{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}/*!@.outline.disabled,\n.outlined.disabled*/.outline.disabled.sc-ic-chip,.outlined.disabled.sc-ic-chip{border:var(--ic-border-disabled);background:none}/*!@.chip.disabled ic-typography*/.chip.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:var(--ic-architectural-500)}/*!@.filled.disabled ic-typography*/.filled.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:var(--ic-architectural-600)}/*!@.dismiss-icon*/.dismiss-icon.sc-ic-chip{border:none;border-radius:50%;padding:0;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs))}/*!@.dismiss-icon:focus*/.dismiss-icon.sc-ic-chip:focus{outline:var(--ic-hc-focus-outline)}/*!@.dismiss-icon[disabled]*/.dismiss-icon[disabled].sc-ic-chip{pointer-events:none;color:var(--ic-architectural-200)}/*!@.icon*/.icon.sc-ic-chip{padding:var(--ic-space-xxxs);box-sizing:border-box}/*!@.icon,\nic-tooltip*/.icon.sc-ic-chip,ic-tooltip.sc-ic-chip{width:var(--ic-space-lg);height:var(--ic-space-lg)}/*!@.chip.disabled path,\n.chip.disabled ::slotted(svg)*/.chip.disabled.sc-ic-chip path.sc-ic-chip,.chip.disabled.sc-ic-chip-s>svg,.chip.disabled .sc-ic-chip-s>svg{fill:var(--ic-architectural-200)}/*!@.chip.white-background*/.chip.white-background.sc-ic-chip{background-color:var(--ic-architectural-white)}/*!@.chip.white-background.hovered:not(:focus-within)*/.chip.white-background.hovered.sc-ic-chip:not(:focus-within){background-color:var(--ic-action-dark-bg-hover-no-alpha) !important}@media (forced-colors: active){/*!@.chip*/.chip.sc-ic-chip{border:var(--ic-hc-border)}/*!@.filled.small*/.filled.small.sc-ic-chip{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}/*!@.filled*/.filled.sc-ic-chip{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}/*!@.filled.large*/.filled.large.sc-ic-chip{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}/*!@.chip.disabled*/.chip.disabled.sc-ic-chip{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}/*!@.chip.disabled ic-typography*/.chip.disabled.sc-ic-chip ic-typography.sc-ic-chip{color:GrayText}/*!@.chip.disabled path,\n .chip.disabled ::slotted(svg)*/.chip.disabled.sc-ic-chip path.sc-ic-chip,.chip.disabled.sc-ic-chip-s>svg,.chip.disabled .sc-ic-chip-s>svg{fill:GrayText}/*!@.chip:focus-within*/.chip.sc-ic-chip:focus-within{outline:none;border-color:Highlight}}";
|
10344
10355
|
|
10345
10356
|
/**
|
10346
10357
|
* @slot icon - Content will be rendered at the start of the chip.
|
@@ -10351,6 +10362,7 @@ class Chip {
|
|
10351
10362
|
registerInstance(this, hostRef);
|
10352
10363
|
this.dismiss = createEvent(this, "dismiss", 7);
|
10353
10364
|
this.icDismiss = createEvent(this, "icDismiss", 7);
|
10365
|
+
this.inAGGrid = false;
|
10354
10366
|
this.dismissAction = () => {
|
10355
10367
|
this.dismiss.emit();
|
10356
10368
|
this.icDismiss.emit();
|
@@ -10394,6 +10406,11 @@ class Chip {
|
|
10394
10406
|
this.variant = "outlined";
|
10395
10407
|
}
|
10396
10408
|
}
|
10409
|
+
componentWillRender() {
|
10410
|
+
if (isElInAGGrid(this.el)) {
|
10411
|
+
this.inAGGrid = true;
|
10412
|
+
}
|
10413
|
+
}
|
10397
10414
|
componentDidLoad() {
|
10398
10415
|
onComponentRequiredPropUndefined$1([{ prop: this.label, propName: "label" }], "Chip");
|
10399
10416
|
}
|
@@ -10418,7 +10435,7 @@ class Chip {
|
|
10418
10435
|
dismissible,
|
10419
10436
|
hovered,
|
10420
10437
|
"white-background": this.variant === "outlined" && !this.transparentBackground,
|
10421
|
-
} }, isSlotUsed$1(this.el, "icon") && (hAsync("div", { class: "icon" }, hAsync("slot", { name: "icon" }))), hAsync("ic-typography", { variant: "label", "apply-vertical-margins": false, class:
|
10438
|
+
} }, isSlotUsed$1(this.el, "icon") && (hAsync("div", { class: "icon" }, hAsync("slot", { name: "icon" }))), hAsync("ic-typography", { variant: "label", "apply-vertical-margins": false, class: { label: true, "in-ag-grid": this.inAGGrid } }, hAsync("span", null, label)), dismissible && (hAsync("ic-tooltip", { label: "Dismiss", target: "dismiss-icon", class: { "tooltip-disabled": disabled } }, hAsync("button", { id: "dismiss-icon", class: "dismiss-icon", "aria-label": `Dismiss ${label} chip`, disabled: disabled, tabindex: disabled ? -1 : 0, onClick: this.dismissAction, onMouseEnter: this.mouseEnterHandler, onMouseLeave: this.mouseLeaveHandler, innerHTML: dismissIcon }))), isSlotUsed$1(this.el, "badge") && hAsync("slot", { name: "badge" }))));
|
10422
10439
|
}
|
10423
10440
|
static get delegatesFocus() { return true; }
|
10424
10441
|
get el() { return getElement(this); }
|
@@ -10638,18 +10655,8 @@ var descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24
|
|
10638
10655
|
<path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
|
10639
10656
|
</svg>`;
|
10640
10657
|
|
10641
|
-
const icDataTableCss = "/*!@:host*/.sc-ic-data-table-h{position:relative;display:block;height:100%;max-height:100%}/*!@.table-container*/.table-container.sc-ic-data-table{position:relative;height:calc(100% - var(--ic-space-xxxs))}/*!@ic-loading-indicator*/ic-loading-indicator.sc-ic-data-table{position:sticky;top:20px}/*!@.table-row-container*/.table-row-container.sc-ic-data-table{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}/*!@:host([show-pagination=\"true\"]) .table-row-container*/[show-pagination=\"true\"].sc-ic-data-table-h .table-row-container.sc-ic-data-table{height:calc(100% - 3.5625rem)}/*!@table*/table.sc-ic-data-table{table-layout:fixed;border-spacing:0;width:100%}/*!@.table-row-container:focus*/.table-row-container.sc-ic-data-table: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*/[embedded=\"true\"].sc-ic-data-table-h .table-row-container.sc-ic-data-table{border:var(--ic-border-light)}/*!@.column-header-sticky*/.column-header-sticky.sc-ic-data-table{position:sticky;top:0;z-index:1}/*!@.column-header-overlay*/.column-header-overlay.sc-ic-data-table{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*/.row-header-sticky.sc-ic-data-table{position:sticky;left:0}/*!@.column-header,\n.table-row*/.column-header.sc-ic-data-table,.table-row.sc-ic-data-table{box-sizing:border-box}/*!@.table-row-selected*/.table-row-selected.sc-ic-data-table{background-color:var(--ic-table-row-selected) !important}/*!@.sort-button*/.sort-button.sc-ic-data-table{margin-left:auto}/*!@.sort-button:hover*/.sort-button.sc-ic-data-table:hover{background-color:var(--ic-action-dark-bg-hover)}/*!@.sort-button:active*/.sort-button.sc-ic-data-table:active{background-color:var(--ic-action-dark-bg-active)}/*!@.sort-button svg*/.sort-button.sc-ic-data-table svg.sc-ic-data-table{color:var(--ic-architectural-black)}/*!@.sort-button-unsorted svg*/.sort-button-unsorted.sc-ic-data-table svg.sc-ic-data-table{color:var(--ic-color-tertiary-text)}/*!@.table-density-dense*/.table-density-dense.sc-ic-data-table{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}/*!@.text-dense*/.text-dense.sc-ic-data-table{font-size:var(--ic-font-size-label)}/*!@.table-density-spacious*/.table-density-spacious.sc-ic-data-table{padding:0.625rem var(--ic-space-xs) !important}/*!@.text-spacious*/.text-spacious.sc-ic-data-table{font-size:1.125rem}/*!@.column-header-text*/.column-header-text.sc-ic-data-table{font-weight:var(--ic-font-weight-bold)}/*!@.column-header,\n.row-header*/.column-header.sc-ic-data-table,.row-header.sc-ic-data-table{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:last-child*/.column-header.sc-ic-data-table:last-child{border-right:none}/*!@.scrollable .column-header:last-child*/.scrollable.sc-ic-data-table .column-header.sc-ic-data-table:last-child{border-right:var(--ic-border-light) !important}/*!@:host([embedded=\"true\"]) tr:last-child .table-cell,\n:host([embedded=\"true\"]) tr:last-child .row-header*/[embedded=\"true\"].sc-ic-data-table-h tr.sc-ic-data-table:last-child .table-cell.sc-ic-data-table,[embedded=\"true\"].sc-ic-data-table-h tr.sc-ic-data-table:last-child .row-header.sc-ic-data-table{border-bottom:none}/*!@.column-header-alignment-left,\n.row-header-alignment-left,\n.cell-alignment-left*/.column-header-alignment-left.sc-ic-data-table,.row-header-alignment-left.sc-ic-data-table,.cell-alignment-left.sc-ic-data-table{text-align:left !important;justify-content:start !important}/*!@.column-header-alignment-right,\n.row-header-alignment-right,\n.cell-alignment-right*/.column-header-alignment-right.sc-ic-data-table,.row-header-alignment-right.sc-ic-data-table,.cell-alignment-right.sc-ic-data-table{text-align:right !important;justify-content:end !important}/*!@.column-header-alignment-center,\n.row-header-alignment-center,\n.cell-alignment-center*/.column-header-alignment-center.sc-ic-data-table,.row-header-alignment-center.sc-ic-data-table,.cell-alignment-center.sc-ic-data-table{text-align:center !important;justify-content:center !important}/*!@.table-row:nth-child(even)*/.table-row.sc-ic-data-table:nth-child(even){background-color:var(--ic-architectural-20)}/*!@.table-cell*/.table-cell.sc-ic-data-table{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px)}/*!@.data-type-string*/.data-type-string.sc-ic-data-table{text-align:left;vertical-align:top}/*!@.data-type-number,\n.data-type-date*/.data-type-number.sc-ic-data-table,.data-type-date.sc-ic-data-table{text-align:right;justify-content:end;vertical-align:top}/*!@.cell-alignment-top*/.cell-alignment-top.sc-ic-data-table{vertical-align:top}/*!@.cell-alignment-middle*/.cell-alignment-middle.sc-ic-data-table{vertical-align:middle}/*!@.cell-alignment-bottom*/.cell-alignment-bottom.sc-ic-data-table{vertical-align:bottom}/*!@.cell-emphasis-low*/.cell-emphasis-low.sc-ic-data-table{color:var(--ic-color-secondary-text)}/*!@.cell-emphasis-high*/.cell-emphasis-high.sc-ic-data-table{font-weight:var(--ic-font-weight-bold)}/*!@.pagination-container*/.pagination-container.sc-ic-data-table{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}/*!@.screen-reader-sort-text,\n.table-caption*/.screen-reader-sort-text.sc-ic-data-table,.table-caption.sc-ic-data-table{position:absolute;left:-100rem}/*!@.table-cell,\n.column-header,\n.row-header*/.table-cell.sc-ic-data-table,.column-header.sc-ic-data-table,.row-header.sc-ic-data-table{word-wrap:break-word;white-space:pre-wrap}/*!@.loading-empty*/.loading-empty.sc-ic-data-table{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}/*!@.updating-state*/.updating-state.sc-ic-data-table{padding:0;border-bottom:var(--ic-border-light)}/*!@.updating-state-headers*/.updating-state-headers.sc-ic-data-table{border-bottom:none}/*!@.loading*/.loading.sc-ic-data-table{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow)}/*!@.loading.show-background*/.loading.show-background.sc-ic-data-table{background-color:var(--ic-architectural-white);border:var(--ic-border-light)}/*!@.loading.show*/.loading.show.sc-ic-data-table{opacity:1}/*!@.icon,\n::slotted(svg)*/.icon.sc-ic-data-table,.sc-ic-data-table-s>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}/*!@.column-header-alignment-right > .icon,\n.row-header-alignment-right > .icon,\n.cell-alignment-right > .icon,\n.column-header-alignment-right > ::slotted(svg),\n.row-header-alignment-right > ::slotted(svg),\n.cell-alignment-right > ::slotted(svg)*/.column-header-alignment-right.sc-ic-data-table>.icon.sc-ic-data-table,.row-header-alignment-right.sc-ic-data-table>.icon.sc-ic-data-table,.cell-alignment-right.sc-ic-data-table>.icon.sc-ic-data-table,.column-header-alignment-right>.sc-ic-data-table-s>svg,.row-header-alignment-right>.sc-ic-data-table-s>svg,.cell-alignment-right>.sc-ic-data-table-s>svg{margin-right:auto}/*!@.column-header-alignment-center > ic-typography,\n.row-header-alignment-right > ic-typography,\n.cell-alignment-center > ic-typography*/.column-header-alignment-center.sc-ic-data-table>ic-typography.sc-ic-data-table,.row-header-alignment-right.sc-ic-data-table>ic-typography.sc-ic-data-table,.cell-alignment-center.sc-ic-data-table>ic-typography.sc-ic-data-table{flex:1}/*!@.icon > svg*/.icon.sc-ic-data-table>svg.sc-ic-data-table{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}@media screen and (min-width: 576px){/*!@.column-header-inner-container*/.column-header-inner-container.sc-ic-data-table{display:flex;align-items:center}
|
10658
|
+
const icDataTableCss = "/*!@:host*/.sc-ic-data-table-h{position:relative;display:block;height:100%;max-height:100%}/*!@tbody*/tbody.sc-ic-data-table{vertical-align:top}/*!@.table-container*/.table-container.sc-ic-data-table{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column}/*!@.cell-container*/.cell-container.sc-ic-data-table{display:flex;min-height:1.5rem;overflow-y:hidden}/*!@.truncation-show-hide*/.truncation-show-hide.sc-ic-data-table{overflow:visible;display:block}/*!@.cell-icon.truncation-show-hide*/.cell-icon.truncation-show-hide.sc-ic-data-table{display:flex}/*!@.cell-container:not(.data-type-element, .truncation-show-hide)*/.cell-container.sc-ic-data-table:not(.data-type-element,.truncation-show-hide).sc-ic-data-table{overflow-x:hidden}/*!@ic-loading-indicator*/ic-loading-indicator.sc-ic-data-table{position:sticky;top:20px}/*!@.table-row-container*/.table-row-container.sc-ic-data-table{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}/*!@:host([show-pagination=\"true\"]) .table-row-container*/[show-pagination=\"true\"].sc-ic-data-table-h .table-row-container.sc-ic-data-table{height:calc(100% - 3.5625rem)}/*!@table*/table.sc-ic-data-table{table-layout:fixed;border-spacing:0;width:100%}/*!@.table-row-container:focus*/.table-row-container.sc-ic-data-table: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*/[embedded=\"true\"].sc-ic-data-table-h .table-row-container.sc-ic-data-table{border:var(--ic-border-light)}/*!@.column-header-sticky*/.column-header-sticky.sc-ic-data-table{position:sticky;top:0;z-index:1}/*!@.column-header-overlay*/.column-header-overlay.sc-ic-data-table{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*/.row-header-sticky.sc-ic-data-table{position:sticky;left:0}/*!@.column-header,\n.table-row*/.column-header.sc-ic-data-table,.table-row.sc-ic-data-table{box-sizing:border-box}/*!@.table-row-selected*/.table-row-selected.sc-ic-data-table{background-color:var(--ic-table-row-selected) !important}/*!@.sort-button*/.sort-button.sc-ic-data-table{margin-left:auto}/*!@.sort-button:hover*/.sort-button.sc-ic-data-table:hover{background-color:var(--ic-action-dark-bg-hover)}/*!@.sort-button:active*/.sort-button.sc-ic-data-table:active{background-color:var(--ic-action-dark-bg-active)}/*!@.sort-button svg*/.sort-button.sc-ic-data-table svg.sc-ic-data-table{color:var(--ic-architectural-black)}/*!@.sort-button-unsorted svg*/.sort-button-unsorted.sc-ic-data-table svg.sc-ic-data-table{color:var(--ic-color-tertiary-text)}/*!@.table-density-dense*/.table-density-dense.sc-ic-data-table{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}/*!@.text-dense*/.text-dense.sc-ic-data-table{font-size:var(--ic-font-size-label)}/*!@.table-density-spacious*/.table-density-spacious.sc-ic-data-table{padding:0.625rem var(--ic-space-xs) !important}/*!@.text-spacious*/.text-spacious.sc-ic-data-table{font-size:1.125rem}/*!@.column-header-text*/.column-header-text.sc-ic-data-table{font-weight:var(--ic-font-weight-bold)}/*!@.column-header,\n.row-header*/.column-header.sc-ic-data-table,.row-header.sc-ic-data-table{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:last-child*/.column-header.sc-ic-data-table:last-child{border-right:none}/*!@.scrollable .column-header:last-child*/.scrollable.sc-ic-data-table .column-header.sc-ic-data-table:last-child{border-right:var(--ic-border-light) !important}/*!@:host([embedded=\"true\"]) tr:last-child .table-cell,\n:host([embedded=\"true\"]) tr:last-child .row-header*/[embedded=\"true\"].sc-ic-data-table-h tr.sc-ic-data-table:last-child .table-cell.sc-ic-data-table,[embedded=\"true\"].sc-ic-data-table-h tr.sc-ic-data-table:last-child .row-header.sc-ic-data-table{border-bottom:none}/*!@.column-header-alignment-left,\n.row-header-alignment-left,\n.cell-alignment-left*/.column-header-alignment-left.sc-ic-data-table,.row-header-alignment-left.sc-ic-data-table,.cell-alignment-left.sc-ic-data-table{text-align:left !important;justify-content:start !important}/*!@.column-header-alignment-right,\n.row-header-alignment-right,\n.cell-alignment-right*/.column-header-alignment-right.sc-ic-data-table,.row-header-alignment-right.sc-ic-data-table,.cell-alignment-right.sc-ic-data-table{text-align:right !important;justify-content:end !important}/*!@.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography*/.cell-alignment-right.truncation-tooltip.sc-ic-data-table ic-tooltip.sc-ic-data-table ic-typography.sc-ic-data-table{padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}/*!@.cell-alignment-right.truncation-show-hide ic-typography*/.cell-alignment-right.truncation-show-hide.sc-ic-data-table ic-typography.sc-ic-data-table{--ellipsis-padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}/*!@.column-header-alignment-center,\n.row-header-alignment-center,\n.cell-alignment-center*/.column-header-alignment-center.sc-ic-data-table,.row-header-alignment-center.sc-ic-data-table,.cell-alignment-center.sc-ic-data-table{text-align:center !important;justify-content:center !important}/*!@.table-row:nth-child(even)*/.table-row.sc-ic-data-table:nth-child(even){background-color:var(--ic-architectural-20)}/*!@.table-cell*/.table-cell.sc-ic-data-table{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px);overflow:hidden}/*!@.data-type-string,\n.data-type-address*/.data-type-string.sc-ic-data-table,.data-type-address.sc-ic-data-table{text-align:left;vertical-align:top}/*!@.data-type-number,\n.data-type-date*/.data-type-number.sc-ic-data-table,.data-type-date.sc-ic-data-table{text-align:right;justify-content:end;vertical-align:top}/*!@.cell-alignment-top*/.cell-alignment-top.sc-ic-data-table{vertical-align:top;align-items:flex-start}/*!@.cell-alignment-middle*/.cell-alignment-middle.sc-ic-data-table{vertical-align:middle;align-items:center}/*!@.cell-alignment-bottom*/.cell-alignment-bottom.sc-ic-data-table{vertical-align:bottom;align-items:flex-end}/*!@.cell-emphasis-low*/.cell-emphasis-low.sc-ic-data-table{color:var(--ic-color-secondary-text)}/*!@.cell-emphasis-high*/.cell-emphasis-high.sc-ic-data-table{font-weight:var(--ic-font-weight-bold)}/*!@.pagination-container*/.pagination-container.sc-ic-data-table{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}/*!@.screen-reader-sort-text,\n.table-caption*/.screen-reader-sort-text.sc-ic-data-table,.table-caption.sc-ic-data-table{position:absolute;left:-100rem}/*!@.table-cell,\n.column-header,\n.row-header*/.table-cell.sc-ic-data-table,.column-header.sc-ic-data-table,.row-header.sc-ic-data-table{word-wrap:break-word;white-space:pre-wrap}/*!@.loading-empty*/.loading-empty.sc-ic-data-table{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}/*!@.updating-state*/.updating-state.sc-ic-data-table{padding:0;border-bottom:var(--ic-border-light)}/*!@.updating-state-headers*/.updating-state-headers.sc-ic-data-table{border-bottom:none}/*!@.loading*/.loading.sc-ic-data-table{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow)}/*!@.loading.show-background*/.loading.show-background.sc-ic-data-table{background-color:var(--ic-architectural-white);border:var(--ic-border-light)}/*!@.loading.show*/.loading.show.sc-ic-data-table{opacity:1}/*!@.icon,\n::slotted(svg)*/.icon.sc-ic-data-table,.sc-ic-data-table-s>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}/*!@.column-header-alignment-right > .icon,\n.row-header-alignment-right > .icon,\n.cell-alignment-right > .icon,\n.column-header-alignment-right > ::slotted(svg),\n.row-header-alignment-right > ::slotted(svg),\n.cell-alignment-right > ::slotted(svg)*/.column-header-alignment-right.sc-ic-data-table>.icon.sc-ic-data-table,.row-header-alignment-right.sc-ic-data-table>.icon.sc-ic-data-table,.cell-alignment-right.sc-ic-data-table>.icon.sc-ic-data-table,.column-header-alignment-right>.sc-ic-data-table-s>svg,.row-header-alignment-right>.sc-ic-data-table-s>svg,.cell-alignment-right>.sc-ic-data-table-s>svg{margin-right:auto}/*!@.column-header-alignment-center > ic-typography,\n.row-header-alignment-right > ic-typography,\n.cell-alignment-center > ic-typography*/.column-header-alignment-center.sc-ic-data-table>ic-typography.sc-ic-data-table,.row-header-alignment-right.sc-ic-data-table>ic-typography.sc-ic-data-table,.cell-alignment-center.sc-ic-data-table>ic-typography.sc-ic-data-table{flex:1}/*!@.icon > svg*/.icon.sc-ic-data-table>svg.sc-ic-data-table{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}/*!@.truncation-tooltip ic-typography*/.truncation-tooltip.sc-ic-data-table ic-typography.sc-ic-data-table{display:-webkit-box;-webkit-line-clamp:var(--ic-line-clamp, 0);-webkit-box-orient:vertical;overflow:hidden}/*!@.truncation-tooltip ic-typography,\n.truncation-show-hide ic-typography*/.truncation-tooltip.sc-ic-data-table ic-typography.sc-ic-data-table,.truncation-show-hide.sc-ic-data-table ic-typography.sc-ic-data-table{white-space:normal}/*!@.ic-tooltip-overflow*/.ic-tooltip-overflow.sc-ic-data-table{overflow:hidden}@media screen and (min-width: 576px){/*!@.column-header-inner-container*/.column-header-inner-container.sc-ic-data-table{display:flex;align-items:center}}";
|
10642
10659
|
|
10643
|
-
const DENSITY_HEIGHT_MULTIPLIER = {
|
10644
|
-
dense: 0.8,
|
10645
|
-
default: 1,
|
10646
|
-
spacious: 1.2,
|
10647
|
-
};
|
10648
|
-
const SORT_ICONS = {
|
10649
|
-
unsorted: unsortedIcon,
|
10650
|
-
ascending: ascendingIcon,
|
10651
|
-
descending: descendingIcon,
|
10652
|
-
};
|
10653
10660
|
/**
|
10654
10661
|
* @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.
|
10655
10662
|
* @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.
|
@@ -10661,7 +10668,155 @@ class DataTable {
|
|
10661
10668
|
constructor(hostRef) {
|
10662
10669
|
registerInstance(this, hostRef);
|
10663
10670
|
this.icRowHeightChange = createEvent(this, "icRowHeightChange", 7);
|
10671
|
+
this.DENSITY_HEIGHT_MULTIPLIER = {
|
10672
|
+
dense: 0.8,
|
10673
|
+
default: 1,
|
10674
|
+
spacious: 1.2,
|
10675
|
+
};
|
10676
|
+
this.DENSITY_PADDING_HEIGHT_DIFF = {
|
10677
|
+
dense: 8,
|
10678
|
+
default: 16,
|
10679
|
+
spacious: 20,
|
10680
|
+
};
|
10681
|
+
this.SORT_ICONS = {
|
10682
|
+
unsorted: unsortedIcon,
|
10683
|
+
ascending: ascendingIcon,
|
10684
|
+
descending: descendingIcon,
|
10685
|
+
};
|
10664
10686
|
this.hasLoadedForOneSecond = true;
|
10687
|
+
this.resizeObserver = null;
|
10688
|
+
this.SHOW_HIDE_STRING = "show-hide";
|
10689
|
+
this.SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;
|
10690
|
+
this.TOOLTIP_STRING = "tooltip";
|
10691
|
+
this.TOOLTIP = `ic-${this.TOOLTIP_STRING}`;
|
10692
|
+
this.TEXT_WRAP_STRING = "text-wrap";
|
10693
|
+
this.TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;
|
10694
|
+
this.dataUpdated = false;
|
10695
|
+
this.rowHeightSet = false;
|
10696
|
+
this.initialLoad = false;
|
10697
|
+
this.icPageChangeEvent = false;
|
10698
|
+
this.itemsPerPageChange = false;
|
10699
|
+
this.DATA_ROW_HEIGHT_STRING = "data-row-height";
|
10700
|
+
this.DEFAULT_LINE_HEIGHT = 24;
|
10701
|
+
this.densityUpdate = false;
|
10702
|
+
this.updateSetRowHeight = (typographyEl) => {
|
10703
|
+
const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
|
10704
|
+
if (typographyEl) {
|
10705
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
10706
|
+
const rowHeight = fontSize *
|
10707
|
+
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
10708
|
+
if (typographyEl.scrollHeight > rowHeight) {
|
10709
|
+
cellContainer.style.removeProperty("height");
|
10710
|
+
}
|
10711
|
+
}
|
10712
|
+
else {
|
10713
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
10714
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
10715
|
+
const rowHeight = fontSize *
|
10716
|
+
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
10717
|
+
if (typographyEl.scrollHeight > rowHeight) {
|
10718
|
+
cellContainer.style.removeProperty("height");
|
10719
|
+
}
|
10720
|
+
});
|
10721
|
+
}
|
10722
|
+
};
|
10723
|
+
this.debounceDataTruncation = () => {
|
10724
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
10725
|
+
if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {
|
10726
|
+
this.resizeObserver = new ResizeObserver(
|
10727
|
+
// This gets triggered twice due to updated data and see more/see less button
|
10728
|
+
debounce$2(() => {
|
10729
|
+
// console.log("resizeObserver triggered");
|
10730
|
+
this.dataTruncation(typographyEl);
|
10731
|
+
}, 200));
|
10732
|
+
this.resizeObserver.observe(typographyEl);
|
10733
|
+
}
|
10734
|
+
});
|
10735
|
+
};
|
10736
|
+
this.getLines = (height) => Math.floor(height / this.DEFAULT_LINE_HEIGHT);
|
10737
|
+
this.truncate = (typographyEl, cellContainer, tooltip) => {
|
10738
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
|
10739
|
+
//24 is the height of a single line
|
10740
|
+
if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
10741
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
10742
|
+
this.addTooltipTruncation(typographyEl, cellContainer, tooltip);
|
10743
|
+
}
|
10744
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
10745
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
10746
|
+
}
|
10747
|
+
}
|
10748
|
+
}
|
10749
|
+
else {
|
10750
|
+
if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
|
10751
|
+
typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
|
10752
|
+
cellContainer.appendChild(typographyEl);
|
10753
|
+
tooltip.remove();
|
10754
|
+
}
|
10755
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
10756
|
+
!isEmptyString(typographyEl.getAttribute("max-lines"))) {
|
10757
|
+
this.resetShowHideTruncation(typographyEl);
|
10758
|
+
}
|
10759
|
+
}
|
10760
|
+
};
|
10761
|
+
this.dataTruncation = (typographyEl) => {
|
10762
|
+
// Tooltip truncation mentioned in AC. Will need revisiting
|
10763
|
+
const tooltip = this.getTooltip(typographyEl);
|
10764
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
10765
|
+
if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.classList.contains("data-type-element")) ||
|
10766
|
+
this.dataUpdated) {
|
10767
|
+
return;
|
10768
|
+
}
|
10769
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING &&
|
10770
|
+
typographyEl.shadowRoot.querySelector("button")) {
|
10771
|
+
const showHideBtn = typographyEl.shadowRoot.querySelector("button");
|
10772
|
+
// If the see more/see less is present and the max lines is equal to the cell container
|
10773
|
+
// remove the see more/see less button
|
10774
|
+
if (showHideBtn) {
|
10775
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
10776
|
+
if (this.getLines(truncWrapper.scrollHeight) ===
|
10777
|
+
+typographyEl.getAttribute("max-lines")) {
|
10778
|
+
this.resetShowHideTruncation(typographyEl);
|
10779
|
+
}
|
10780
|
+
}
|
10781
|
+
}
|
10782
|
+
// Deals with setting and resetting row height and re-truncating data
|
10783
|
+
if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {
|
10784
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
10785
|
+
// cellContainer.clientHeight - 24 removes the extra line by see more/see less
|
10786
|
+
if (truncWrapper &&
|
10787
|
+
cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >
|
10788
|
+
truncWrapper.scrollHeight) {
|
10789
|
+
this.resetShowHideTruncation(typographyEl);
|
10790
|
+
return;
|
10791
|
+
}
|
10792
|
+
if (typographyEl.scrollHeight > cellContainer.clientHeight) {
|
10793
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
10794
|
+
return;
|
10795
|
+
}
|
10796
|
+
}
|
10797
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > 0 &&
|
10798
|
+
(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > 0 &&
|
10799
|
+
(typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) === (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
|
10800
|
+
if (tooltip) {
|
10801
|
+
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
10802
|
+
}
|
10803
|
+
return;
|
10804
|
+
}
|
10805
|
+
this.truncate(typographyEl, cellContainer, tooltip);
|
10806
|
+
};
|
10807
|
+
this.removeTextWrap = () => {
|
10808
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
10809
|
+
const tableCell = typographyEl.closest("td");
|
10810
|
+
if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {
|
10811
|
+
tableCell.classList.remove(this.TEXT_WRAP_STRING);
|
10812
|
+
}
|
10813
|
+
});
|
10814
|
+
};
|
10815
|
+
this.getCellContainer = (typographyEl) => {
|
10816
|
+
return typographyEl.closest(".cell-container");
|
10817
|
+
};
|
10818
|
+
this.deleteTextWrapDataKey = (array) => Array.isArray(array) &&
|
10819
|
+
array.forEach((val) => val.textWrap && delete val.textWrap);
|
10665
10820
|
this.startLoadingTimer = () => {
|
10666
10821
|
this.hasLoadedForOneSecond = false;
|
10667
10822
|
this.timerStarted = Date.now();
|
@@ -10687,13 +10842,31 @@ class DataTable {
|
|
10687
10842
|
return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
|
10688
10843
|
}
|
10689
10844
|
};
|
10845
|
+
this.getCellOptions = (cell, key) => {
|
10846
|
+
if (!(this.isObject(cell) && Object.keys(cell).includes(key)))
|
10847
|
+
return;
|
10848
|
+
return this.getObjectValue(cell, key);
|
10849
|
+
};
|
10690
10850
|
this.createUpdatingIndicator = () => {
|
10691
10851
|
const { appearance, description, max, min, progress } = this.updatingOptions || {};
|
10692
10852
|
return (hAsync("th", { colSpan: this.columns.length, class: "updating-state" }, hAsync("ic-loading-indicator", { appearance: appearance, description: description || "Updating table data", fullWidth: true, max: max, min: min, progress: progress, type: "linear", size: "small" })));
|
10693
10853
|
};
|
10854
|
+
this.setRowHeight = (height) => {
|
10855
|
+
return pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
|
10856
|
+
this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
|
10857
|
+
};
|
10858
|
+
this.setTruncationClass = () => {
|
10859
|
+
if (this.truncationPattern) {
|
10860
|
+
return { [`truncation-${this.truncationPattern}`]: true };
|
10861
|
+
}
|
10862
|
+
return {};
|
10863
|
+
};
|
10694
10864
|
this.createCells = (row, rowIndex) => {
|
10865
|
+
var _a;
|
10695
10866
|
const rowValues = Object.values(row);
|
10696
10867
|
const rowKeys = Object.keys(row);
|
10868
|
+
const index = rowIndex;
|
10869
|
+
const rowOptions = this.getRowOptions(rowKeys, rowValues);
|
10697
10870
|
let rowAlignment;
|
10698
10871
|
let rowEmphasis;
|
10699
10872
|
const headerIndex = rowKeys.indexOf("header");
|
@@ -10701,42 +10874,63 @@ class DataTable {
|
|
10701
10874
|
rowAlignment = this.getObjectValue(rowValues[headerIndex], "rowAlignment");
|
10702
10875
|
rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
|
10703
10876
|
}
|
10877
|
+
const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
|
10878
|
+
const currentRowHeight = variableRowHeightVal
|
10879
|
+
? variableRowHeightVal !== "auto" && variableRowHeightVal
|
10880
|
+
: this.globalRowHeight !== "auto" && this.globalRowHeight;
|
10704
10881
|
return rowValues.map((cell, index) => {
|
10705
|
-
var _a, _b, _c, _d, _e;
|
10882
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
10706
10883
|
const columnProps = this.columns[index];
|
10707
10884
|
const cellSlotName = `${columnProps === null || columnProps === void 0 ? void 0 : columnProps.key}-${rowIndex}`;
|
10708
10885
|
const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
|
10709
10886
|
const cellValue = (key) => this.getObjectValue(cell, key);
|
10710
|
-
|
10711
|
-
|
10712
|
-
|
10713
|
-
|
10714
|
-
|
10715
|
-
|
10716
|
-
|
10717
|
-
|
10718
|
-
|
10719
|
-
|
10720
|
-
this.
|
10721
|
-
|
10722
|
-
|
10723
|
-
|
10724
|
-
|
10725
|
-
|
10726
|
-
|
10727
|
-
|
10728
|
-
|
10729
|
-
|
10730
|
-
|
10731
|
-
|
10732
|
-
|
10733
|
-
|
10734
|
-
|
10735
|
-
|
10736
|
-
|
10737
|
-
|
10738
|
-
|
10739
|
-
|
10887
|
+
if (rowKeys[index] === "header") {
|
10888
|
+
return (hAsync("th", { scope: "row", colSpan: cellValue("colspan"), class: {
|
10889
|
+
["row-header"]: true,
|
10890
|
+
[`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
|
10891
|
+
["row-header-sticky"]: this.stickyRowHeaders,
|
10892
|
+
} }, cellValue("title")));
|
10893
|
+
}
|
10894
|
+
if (rowKeys[index] !== "rowOptions") {
|
10895
|
+
return (hAsync("td", { class: {
|
10896
|
+
["table-cell"]: true,
|
10897
|
+
[`table-density-${this.density}`]: this.notDefaultDensity(),
|
10898
|
+
} }, hAsync("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
|
10899
|
+
!isSlotUsed(this.el, cellSlotName)
|
10900
|
+
? cell
|
10901
|
+
: 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) ||
|
10902
|
+
((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
|
10903
|
+
rowAlignment ||
|
10904
|
+
this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
|
10905
|
+
!!((_d = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _d === void 0 ? void 0 : _d.vertical) ||
|
10906
|
+
!!rowAlignment ||
|
10907
|
+
!!this.getCellAlignment(cell, "vertical"), [`cell-alignment-${((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _e === void 0 ? void 0 : _e.horizontal) ||
|
10908
|
+
((_f = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _f === void 0 ? void 0 : _f.horizontal) ||
|
10909
|
+
this.getCellAlignment(cell, "horizontal")}`]: !!((_g = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _g === void 0 ? void 0 : _g.horizontal) ||
|
10910
|
+
!!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
|
10911
|
+
!!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) ||
|
10912
|
+
(rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
|
10913
|
+
!!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: {
|
10914
|
+
height: (this.truncationPattern || currentRowHeight) &&
|
10915
|
+
!columnProps.textWrap &&
|
10916
|
+
!rowOptions.textWrap &&
|
10917
|
+
!this.getCellOptions(cell, "textWrap") &&
|
10918
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element"
|
10919
|
+
? this.setRowHeight(currentRowHeight)
|
10920
|
+
: null,
|
10921
|
+
}, "data-row-height": this.truncationPattern || currentRowHeight
|
10922
|
+
? this.setRowHeight(currentRowHeight)
|
10923
|
+
: null }, isSlotUsed(this.el, cellSlotName) ? (hAsync("slot", { name: cellSlotName })) : (hAsync(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (hAsync("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_k = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _k === void 0 ? void 0 : _k.onAllCells)) && (hAsync("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" &&
|
10924
|
+
!isSlotUsed(this.el, cellSlotName) && (hAsync("ic-typography", { variant: "body", class: {
|
10925
|
+
[`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
|
10926
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
10927
|
+
rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
|
10928
|
+
!!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
|
10929
|
+
!!rowEmphasis,
|
10930
|
+
[`text-${this.density}`]: this.notDefaultDensity(),
|
10931
|
+
} }, this.isObject(cell) &&
|
10932
|
+
(columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (hAsync("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType)))))))));
|
10933
|
+
}
|
10740
10934
|
});
|
10741
10935
|
};
|
10742
10936
|
this.createColumnHeaders = () => {
|
@@ -10753,7 +10947,7 @@ class DataTable {
|
|
10753
10947
|
[`text-${this.density}`]: this.notDefaultDensity(),
|
10754
10948
|
} }, title), this.sortable && (hAsync("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
|
10755
10949
|
// eslint-disable-next-line react/jsx-no-bind
|
10756
|
-
onClick: () => this.sortRows(key), innerHTML: SORT_ICONS[this.sortedColumn === key
|
10950
|
+
onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
|
10757
10951
|
? this.sortedColumnOrder
|
10758
10952
|
: "unsorted"], class: {
|
10759
10953
|
["sort-button"]: true,
|
@@ -10761,6 +10955,10 @@ class DataTable {
|
|
10761
10955
|
this.sortedColumnOrder === "unsorted",
|
10762
10956
|
} }))))));
|
10763
10957
|
};
|
10958
|
+
this.onRowClick = (row) => {
|
10959
|
+
this.selectedRow =
|
10960
|
+
this.selectedRow !== row && !this.loading && !this.updating && row;
|
10961
|
+
};
|
10764
10962
|
this.createRows = () => {
|
10765
10963
|
const data = this.showPagination
|
10766
10964
|
? this.data.slice(this.fromRow, this.toRow)
|
@@ -10780,24 +10978,11 @@ class DataTable {
|
|
10780
10978
|
return data
|
10781
10979
|
.sort(!this.sortable ? undefined : this.getSortFunction())
|
10782
10980
|
.map((row, index) => {
|
10783
|
-
var _a;
|
10784
|
-
const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
|
10785
|
-
const findRowHeight = variableRowHeightVal
|
10786
|
-
? variableRowHeightVal !== "auto" && variableRowHeightVal
|
10787
|
-
: this.globalRowHeight !== "auto" && this.globalRowHeight;
|
10788
10981
|
return (hAsync("tr", {
|
10789
10982
|
// eslint-disable-next-line react/jsx-no-bind
|
10790
|
-
onClick: () =>
|
10791
|
-
this.selectedRow !== row &&
|
10792
|
-
!this.loading &&
|
10793
|
-
!this.updating &&
|
10794
|
-
row), class: {
|
10983
|
+
onClick: () => this.onRowClick(row), class: {
|
10795
10984
|
["table-row"]: true,
|
10796
10985
|
["table-row-selected"]: this.selectedRow === row,
|
10797
|
-
}, style: {
|
10798
|
-
height: findRowHeight
|
10799
|
-
? `${findRowHeight * DENSITY_HEIGHT_MULTIPLIER[this.density]}px`
|
10800
|
-
: null,
|
10801
10986
|
}
|
10802
10987
|
}, this.createCells(row, index)));
|
10803
10988
|
});
|
@@ -10860,6 +11045,25 @@ class DataTable {
|
|
10860
11045
|
}
|
10861
11046
|
this.sortedColumnOrder = sortOrders[nextSortOrderIndex];
|
10862
11047
|
sortButton.setAttribute("aria-label", this.getSortButtonLabel(column));
|
11048
|
+
this.tableSorted = true;
|
11049
|
+
};
|
11050
|
+
this.getTypographyElements = () => {
|
11051
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text)"));
|
11052
|
+
};
|
11053
|
+
this.getTooltip = (typographyEl) => {
|
11054
|
+
return typographyEl.closest(this.TOOLTIP);
|
11055
|
+
};
|
11056
|
+
this.updateTruncationTooltip = (removeTooltipOnly = false) => {
|
11057
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11058
|
+
const tooltip = this.getTooltip(typographyEl);
|
11059
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11060
|
+
if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
|
11061
|
+
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
11062
|
+
typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
|
11063
|
+
return;
|
11064
|
+
}
|
11065
|
+
this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
|
11066
|
+
});
|
10863
11067
|
};
|
10864
11068
|
this.updateScrollOffset = () => {
|
10865
11069
|
this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
|
@@ -10873,12 +11077,13 @@ class DataTable {
|
|
10873
11077
|
this.sortedColumn = undefined;
|
10874
11078
|
this.sortedColumnOrder = undefined;
|
10875
11079
|
this.toRow = undefined;
|
11080
|
+
this.currentRowHeight = undefined;
|
10876
11081
|
this.caption = undefined;
|
10877
11082
|
this.columns = undefined;
|
10878
11083
|
this.data = undefined;
|
10879
11084
|
this.density = "default";
|
10880
11085
|
this.embedded = false;
|
10881
|
-
this.globalRowHeight =
|
11086
|
+
this.globalRowHeight = "auto";
|
10882
11087
|
this.hideColumnHeaders = false;
|
10883
11088
|
this.loading = false;
|
10884
11089
|
this.loadingOptions = undefined;
|
@@ -10907,10 +11112,15 @@ class DataTable {
|
|
10907
11112
|
};
|
10908
11113
|
this.stickyColumnHeaders = false;
|
10909
11114
|
this.stickyRowHeaders = false;
|
11115
|
+
this.truncationPattern = undefined;
|
10910
11116
|
this.updating = false;
|
10911
11117
|
this.updatingOptions = undefined;
|
10912
11118
|
this.variableRowHeight = undefined;
|
10913
11119
|
}
|
11120
|
+
disconnectedCallback() {
|
11121
|
+
var _a;
|
11122
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
11123
|
+
}
|
10914
11124
|
componentWillLoad() {
|
10915
11125
|
var _a;
|
10916
11126
|
this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
|
@@ -10919,10 +11129,15 @@ class DataTable {
|
|
10919
11129
|
this.sortedColumn = this.sortOptions.defaultColumn;
|
10920
11130
|
this.sortedColumnOrder = this.sortOptions.sortOrders[0];
|
10921
11131
|
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
|
11132
|
+
this.initialLoad = true;
|
11133
|
+
this.previousItemsPerPage = this.rowsPerPage;
|
10922
11134
|
}
|
10923
11135
|
componentDidLoad() {
|
10924
11136
|
const tableElement = this.el.shadowRoot.querySelector("table");
|
10925
11137
|
const tableContainer = this.el.shadowRoot.querySelector(".table-container");
|
11138
|
+
if (this.dataUpdated) {
|
11139
|
+
this.dataUpdated = false;
|
11140
|
+
}
|
10926
11141
|
if ((tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientHeight) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientHeight) ||
|
10927
11142
|
(tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
|
10928
11143
|
this.scrollable = true;
|
@@ -10931,11 +11146,144 @@ class DataTable {
|
|
10931
11146
|
this.startLoadingTimer();
|
10932
11147
|
this.showLoadingIndicator();
|
10933
11148
|
}
|
11149
|
+
if (this.truncationPattern) {
|
11150
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11151
|
+
if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {
|
11152
|
+
this.dataTruncation(typographyEl);
|
11153
|
+
}
|
11154
|
+
});
|
11155
|
+
this.debounceDataTruncation();
|
11156
|
+
}
|
11157
|
+
if (this.globalRowHeight !== "auto") {
|
11158
|
+
this.updateSetRowHeight();
|
11159
|
+
}
|
10934
11160
|
}
|
10935
|
-
|
10936
|
-
|
10937
|
-
|
10938
|
-
|
11161
|
+
componentDidUpdate() {
|
11162
|
+
this.truncateUpdatedData();
|
11163
|
+
}
|
11164
|
+
truncateUpdatedData() {
|
11165
|
+
if (this.dataUpdated) {
|
11166
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
11167
|
+
this.resetShowHideTruncation();
|
11168
|
+
}
|
11169
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
11170
|
+
this.updateTruncationTooltip();
|
11171
|
+
}
|
11172
|
+
this.dataUpdated = false;
|
11173
|
+
}
|
11174
|
+
if (this.tableSorted) {
|
11175
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
11176
|
+
this.updateTruncationTooltip();
|
11177
|
+
}
|
11178
|
+
this.tableSorted = false;
|
11179
|
+
}
|
11180
|
+
// This function recalculates the tooltip truncation when the rowHeight has been set.
|
11181
|
+
// This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete
|
11182
|
+
if (this.rowHeightSet) {
|
11183
|
+
const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
|
11184
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11185
|
+
var _a;
|
11186
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11187
|
+
const tooltipEl = this.getTooltip(typographyEl);
|
11188
|
+
const rowHeight = fontSize *
|
11189
|
+
parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
11190
|
+
// If the set row height is bigger than the cell container even
|
11191
|
+
// with textWrap, set the row height
|
11192
|
+
if (!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
|
11193
|
+
rowHeight > cellContainer.clientHeight) {
|
11194
|
+
cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
11195
|
+
}
|
11196
|
+
if (this.truncationPattern) {
|
11197
|
+
// If the set row height is bigger than the typography truncation wrapper
|
11198
|
+
// scroll height, remove see more / see less button
|
11199
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
11200
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
11201
|
+
const showHideBtn = typographyEl.shadowRoot.querySelector("button");
|
11202
|
+
if (showHideBtn &&
|
11203
|
+
(truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) <= cellContainer.clientHeight) {
|
11204
|
+
this.resetShowHideTruncation(typographyEl);
|
11205
|
+
return;
|
11206
|
+
}
|
11207
|
+
}
|
11208
|
+
this.truncate(typographyEl, cellContainer, tooltipEl);
|
11209
|
+
}
|
11210
|
+
else {
|
11211
|
+
this.updateSetRowHeight(typographyEl);
|
11212
|
+
}
|
11213
|
+
});
|
11214
|
+
this.rowHeightSet = false;
|
11215
|
+
}
|
11216
|
+
// Only run truncation on the new rows
|
11217
|
+
// when the number of items per page has increased
|
11218
|
+
if (this.itemsPerPageChange) {
|
11219
|
+
const allRows = this.el.shadowRoot.querySelectorAll(".table-row");
|
11220
|
+
if (this.rowsPerPage > this.previousItemsPerPage) {
|
11221
|
+
const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
|
11222
|
+
newRows.forEach((row) => {
|
11223
|
+
row
|
11224
|
+
.querySelectorAll("ic-typography")
|
11225
|
+
.forEach((typographyEl) => {
|
11226
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11227
|
+
const tooltipEl = this.getTooltip(typographyEl);
|
11228
|
+
this.truncate(typographyEl, cellContainer, tooltipEl);
|
11229
|
+
});
|
11230
|
+
});
|
11231
|
+
}
|
11232
|
+
this.previousItemsPerPage = this.rowsPerPage;
|
11233
|
+
this.itemsPerPageChange = false;
|
11234
|
+
}
|
11235
|
+
if (!this.initialLoad && this.icPageChangeEvent) {
|
11236
|
+
if (this.truncationPattern === this.TOOLTIP_STRING) {
|
11237
|
+
this.updateTruncationTooltip();
|
11238
|
+
}
|
11239
|
+
// set truncation to see more if opened and next/previous page is pressed
|
11240
|
+
if (this.truncationPattern === this.SHOW_HIDE_STRING) {
|
11241
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11242
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11243
|
+
const showHideBtn = typographyEl.shadowRoot.querySelector("button");
|
11244
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > cellContainer.clientHeight &&
|
11245
|
+
!showHideBtn) {
|
11246
|
+
this.addShowHideTruncation(cellContainer, typographyEl);
|
11247
|
+
}
|
11248
|
+
});
|
11249
|
+
}
|
11250
|
+
this.icPageChangeEvent = false;
|
11251
|
+
}
|
11252
|
+
if (this.densityUpdate) {
|
11253
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11254
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11255
|
+
const tooltipEl = this.getTooltip(typographyEl);
|
11256
|
+
this.truncate(typographyEl, cellContainer, tooltipEl);
|
11257
|
+
});
|
11258
|
+
this.densityUpdate = false;
|
11259
|
+
}
|
11260
|
+
}
|
11261
|
+
createShowHideTruncation(typographyEl, cellContainer) {
|
11262
|
+
typographyEl.checkMaxLines(typographyEl.scrollHeight);
|
11263
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
11264
|
+
typographyEl.setShowHideExpanded(false);
|
11265
|
+
cellContainer.style.height = null;
|
11266
|
+
}
|
11267
|
+
addTooltipTruncation(typographyEl, cellContainer, tooltip) {
|
11268
|
+
this.addLineClampCSS(typographyEl, cellContainer);
|
11269
|
+
if (!tooltip) {
|
11270
|
+
this.createTruncationTooltip(typographyEl, cellContainer);
|
11271
|
+
}
|
11272
|
+
}
|
11273
|
+
addShowHideTruncation(cellContainer, typographyEl) {
|
11274
|
+
cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);
|
11275
|
+
this.createShowHideTruncation(typographyEl, cellContainer);
|
11276
|
+
}
|
11277
|
+
getTruncWrapper(typographyEl) {
|
11278
|
+
return typographyEl.shadowRoot.querySelector(".trunc-wrapper");
|
11279
|
+
}
|
11280
|
+
// Set the height to initial if row height is set and the show / hide truncation
|
11281
|
+
// is clicked
|
11282
|
+
handleTypographyTruncationExpandToggle({ detail, }) {
|
11283
|
+
const { expanded, typographyEl } = detail;
|
11284
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11285
|
+
if (cellContainer.style.height && expanded) {
|
11286
|
+
cellContainer.style.height = "inherit";
|
10939
11287
|
}
|
10940
11288
|
}
|
10941
11289
|
handlePageChange({ detail, target }) {
|
@@ -10954,6 +11302,19 @@ class DataTable {
|
|
10954
11302
|
this.previousRowsPerPage = this.rowsPerPage;
|
10955
11303
|
}
|
10956
11304
|
}
|
11305
|
+
if (!this.initialLoad && this.previousPaginationPage !== detail.value) {
|
11306
|
+
// This is to prevent icPageChange from triggering truncation on first load
|
11307
|
+
this.icPageChangeEvent = true;
|
11308
|
+
}
|
11309
|
+
this.previousPaginationPage = detail.value;
|
11310
|
+
this.initialLoad = false;
|
11311
|
+
}
|
11312
|
+
handleItemsPerPageChange({ detail, target, }) {
|
11313
|
+
if (target.parentElement !== this.el) {
|
11314
|
+
this.previousRowsPerPage = this.rowsPerPage;
|
11315
|
+
this.rowsPerPage = detail.value;
|
11316
|
+
}
|
11317
|
+
this.itemsPerPageChange = true;
|
10957
11318
|
}
|
10958
11319
|
handleDensityChange(ev) {
|
10959
11320
|
this.density = ev.detail.value;
|
@@ -10971,7 +11332,23 @@ class DataTable {
|
|
10971
11332
|
}, 500);
|
10972
11333
|
}
|
10973
11334
|
}
|
10974
|
-
|
11335
|
+
truncationPatternHandler(newValue) {
|
11336
|
+
if (newValue === this.SHOW_HIDE_STRING) {
|
11337
|
+
this.updateTruncationTooltip(true);
|
11338
|
+
// Not using debounceDataTruncation here due to resizeObserver not being triggered
|
11339
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11340
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11341
|
+
const tooltip = this.getTooltip(typographyEl);
|
11342
|
+
this.truncate(typographyEl, cellContainer, tooltip);
|
11343
|
+
});
|
11344
|
+
}
|
11345
|
+
if (newValue === this.TOOLTIP_STRING) {
|
11346
|
+
// ResizeObserver is trigger here due to the see more/see less links being removed.
|
11347
|
+
// The resizeObserver will also apply the tooltip where relevant
|
11348
|
+
this.resetShowHideTruncation();
|
11349
|
+
}
|
11350
|
+
}
|
11351
|
+
async dataHandler(newData) {
|
10975
11352
|
this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
|
10976
11353
|
if (this.loading) {
|
10977
11354
|
!this.hasLoadedForOneSecond
|
@@ -10981,31 +11358,124 @@ class DataTable {
|
|
10981
11358
|
}
|
10982
11359
|
if (this.updating)
|
10983
11360
|
this.updating = false;
|
11361
|
+
this.dataUpdated = true;
|
11362
|
+
}
|
11363
|
+
async densityHandler() {
|
11364
|
+
this.densityUpdate = true;
|
11365
|
+
}
|
11366
|
+
resetShowHideTruncation(typographyEl) {
|
11367
|
+
if (typographyEl) {
|
11368
|
+
const truncWrapper = this.getTruncWrapper(typographyEl);
|
11369
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11370
|
+
if ((truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
11371
|
+
!isEmptyString(typographyEl.getAttribute("max-lines")) &&
|
11372
|
+
Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT) !==
|
11373
|
+
+typographyEl.getAttribute("max-lines")) {
|
11374
|
+
typographyEl.checkMaxLines(truncWrapper.scrollHeight);
|
11375
|
+
typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
|
11376
|
+
typographyEl.setShowHideExpanded(false);
|
11377
|
+
cellContainer.style.height = null;
|
11378
|
+
}
|
11379
|
+
else {
|
11380
|
+
typographyEl.resetTruncation().then(() => {
|
11381
|
+
cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
11382
|
+
});
|
11383
|
+
}
|
11384
|
+
}
|
11385
|
+
else {
|
11386
|
+
this.getTypographyElements().forEach((typographyEl) => {
|
11387
|
+
const cellContainer = this.getCellContainer(typographyEl);
|
11388
|
+
typographyEl.resetTruncation().then(() => {
|
11389
|
+
cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
|
11390
|
+
});
|
11391
|
+
});
|
11392
|
+
}
|
10984
11393
|
}
|
10985
|
-
rowHeightChangeHandler() {
|
10986
|
-
|
11394
|
+
rowHeightChangeHandler(newValue, oldValue) {
|
11395
|
+
if (+newValue !== +oldValue) {
|
11396
|
+
this.deleteTextWrapDataKey(this.data);
|
11397
|
+
this.deleteTextWrapDataKey(this.columns);
|
11398
|
+
this.removeTextWrap();
|
11399
|
+
this.icRowHeightChange.emit();
|
11400
|
+
this.rowHeightSet = true;
|
11401
|
+
}
|
10987
11402
|
}
|
10988
11403
|
/**
|
10989
|
-
* Resets the `globalRowHeight` prop to
|
11404
|
+
* Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.
|
10990
11405
|
*/
|
10991
|
-
async resetRowHeights() {
|
10992
|
-
this.globalRowHeight =
|
11406
|
+
async resetRowHeights(rowHeight) {
|
11407
|
+
this.globalRowHeight = rowHeight || "auto";
|
10993
11408
|
this.variableRowHeight = null;
|
10994
11409
|
}
|
10995
11410
|
showLoadingIndicator() {
|
10996
11411
|
this.loadingIndicator.classList.add("show");
|
10997
11412
|
}
|
11413
|
+
getRowOptions(rowKeys, rowValues) {
|
11414
|
+
const rowOptionsIndex = rowKeys.indexOf("rowOptions");
|
11415
|
+
return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];
|
11416
|
+
}
|
11417
|
+
regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly) {
|
11418
|
+
// When sorting the table, instead of regenerating the tooltip,
|
11419
|
+
// the tooltip details are updated
|
11420
|
+
if (tooltip) {
|
11421
|
+
if (this.tableSorted) {
|
11422
|
+
tooltip.setAttribute("target", typographyEl.id);
|
11423
|
+
tooltip.setAttribute("label", typographyEl.textContent);
|
11424
|
+
}
|
11425
|
+
else {
|
11426
|
+
this.removeTooltip(cellContainer, typographyEl, tooltip);
|
11427
|
+
}
|
11428
|
+
if (removeTooltipOnly) {
|
11429
|
+
return;
|
11430
|
+
}
|
11431
|
+
}
|
11432
|
+
// This add line clamp to data only when
|
11433
|
+
// the data object has been updated
|
11434
|
+
if (!typographyEl.getAttribute("style") && this.dataUpdated) {
|
11435
|
+
this.addLineClampCSS(typographyEl, cellContainer);
|
11436
|
+
}
|
11437
|
+
// Adding the tableSorted boolean prevents the tooltip
|
11438
|
+
// being regenerated and flashing
|
11439
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
|
11440
|
+
!this.tableSorted) {
|
11441
|
+
if (!typographyEl.getAttribute("style")) {
|
11442
|
+
this.addLineClampCSS(typographyEl, cellContainer);
|
11443
|
+
}
|
11444
|
+
this.createTruncationTooltip(typographyEl, cellContainer);
|
11445
|
+
}
|
11446
|
+
}
|
11447
|
+
removeTooltip(cellContainer, typographyEl, tooltip) {
|
11448
|
+
cellContainer.appendChild(typographyEl);
|
11449
|
+
if (tooltip) {
|
11450
|
+
tooltip.remove();
|
11451
|
+
}
|
11452
|
+
}
|
11453
|
+
addLineClampCSS(typographyEl, cellContainer) {
|
11454
|
+
typographyEl.setAttribute("style", `--ic-line-clamp: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
|
11455
|
+
}
|
11456
|
+
createTruncationTooltip(typographyEl, cellContainer) {
|
11457
|
+
const tooltipEl = document.createElement("ic-tooltip");
|
11458
|
+
tooltipEl.setAttribute("target", typographyEl.id);
|
11459
|
+
tooltipEl.setAttribute("label", typographyEl.textContent);
|
11460
|
+
tooltipEl.classList.add("ic-tooltip-overflow");
|
11461
|
+
tooltipEl.setExternalPopperProps({
|
11462
|
+
// This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
|
11463
|
+
strategy: "fixed",
|
11464
|
+
});
|
11465
|
+
cellContainer.appendChild(tooltipEl);
|
11466
|
+
tooltipEl.appendChild(typographyEl);
|
11467
|
+
}
|
10998
11468
|
render() {
|
10999
11469
|
const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
11000
11470
|
return (hAsync("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && hAsync("slot", { name: "title-bar" }), hAsync("div", { class: {
|
11001
11471
|
["table-row-container"]: true,
|
11002
11472
|
scrollable,
|
11003
|
-
}, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, hAsync("table", null, hAsync("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (hAsync("thead", { class: {
|
11473
|
+
}, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, isSlotUsed(this.el, "title-bar") && hAsync("slot", { name: "title-bar" }), hAsync("table", null, hAsync("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (hAsync("thead", { class: {
|
11004
11474
|
["column-header-sticky"]: stickyColumnHeaders,
|
11005
11475
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
11006
11476
|
} }, hAsync("tr", null, createColumnHeaders()))), updating &&
|
11007
11477
|
!loading &&
|
11008
|
-
(hideColumnHeaders ? (hAsync("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && hAsync("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
|
11478
|
+
(hideColumnHeaders ? (hAsync("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && !loading && hAsync("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
|
11009
11479
|
!loading &&
|
11010
11480
|
(isSlotUsed(this.el, "empty-state") ? (hAsync("slot", { name: "empty-state" })) : (hAsync("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (hAsync("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
|
11011
11481
|
"loading-empty": loading,
|
@@ -11018,7 +11488,9 @@ class DataTable {
|
|
11018
11488
|
get el() { return getElement(this); }
|
11019
11489
|
static get watchers() { return {
|
11020
11490
|
"loading": ["loadingHandler"],
|
11491
|
+
"truncationPattern": ["truncationPatternHandler"],
|
11021
11492
|
"data": ["dataHandler"],
|
11493
|
+
"density": ["densityHandler"],
|
11022
11494
|
"globalRowHeight": ["rowHeightChangeHandler"],
|
11023
11495
|
"variableRowHeight": ["rowHeightChangeHandler"]
|
11024
11496
|
}; }
|
@@ -11043,6 +11515,7 @@ class DataTable {
|
|
11043
11515
|
"sortOptions": [16],
|
11044
11516
|
"stickyColumnHeaders": [4, "sticky-column-headers"],
|
11045
11517
|
"stickyRowHeaders": [4, "sticky-row-headers"],
|
11518
|
+
"truncationPattern": [1, "truncation-pattern"],
|
11046
11519
|
"updating": [4],
|
11047
11520
|
"updatingOptions": [16],
|
11048
11521
|
"variableRowHeight": [1040],
|
@@ -11055,9 +11528,10 @@ class DataTable {
|
|
11055
11528
|
"sortedColumn": [32],
|
11056
11529
|
"sortedColumnOrder": [32],
|
11057
11530
|
"toRow": [32],
|
11531
|
+
"currentRowHeight": [32],
|
11058
11532
|
"resetRowHeights": [64]
|
11059
11533
|
},
|
11060
|
-
"$listeners$": [[0, "
|
11534
|
+
"$listeners$": [[0, "typographyTruncationExpandToggle", "handleTypographyTruncationExpandToggle"], [0, "icPageChange", "handlePageChange"], [0, "icItemsPerPageChange", "handleItemsPerPageChange"], [0, "icTableDensityUpdate", "handleDensityChange"], [8, "click", "clickListener"]],
|
11061
11535
|
"$lazyBundleId$": "-",
|
11062
11536
|
"$attrsToReflect$": []
|
11063
11537
|
}; }
|
@@ -12083,6 +12557,7 @@ class DateInput {
|
|
12083
12557
|
this.disablePast = false;
|
12084
12558
|
this.disablePastMessage = "Dates in the past are not allowed. Please select a date in the future.";
|
12085
12559
|
this.helperText = undefined;
|
12560
|
+
this.hideHelperText = false;
|
12086
12561
|
this.inputId = `ic-date-input-${inputIds$5++}`;
|
12087
12562
|
this.label = undefined;
|
12088
12563
|
this.max = "";
|
@@ -12326,7 +12801,7 @@ class DateInput {
|
|
12326
12801
|
}
|
12327
12802
|
}
|
12328
12803
|
render() {
|
12329
|
-
const { inputId, label, disabled, helperText, showClearButton, showCalendarButton, size, } = this;
|
12804
|
+
const { inputId, label, disabled, helperText, hideHelperText, showClearButton, showCalendarButton, size, } = this;
|
12330
12805
|
const hasCustomValidation = !isEmptyString(this.validationStatus) &&
|
12331
12806
|
!isEmptyString(this.validationText);
|
12332
12807
|
const validationStatus = hasCustomValidation
|
@@ -12336,7 +12811,7 @@ class DateInput {
|
|
12336
12811
|
: "";
|
12337
12812
|
const assistiveHint = `Type or use the up and down arrow keys to change the values for the ${this.getDescOfInputsOrder()}.`;
|
12338
12813
|
renderHiddenInput(true, this.el, this.name, this.convertToDate(this.year, this.month, this.day), this.disabled);
|
12339
|
-
return (hAsync(Host, { onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, hAsync("ic-input-container", { disabled: disabled }, hAsync("ic-input-label", { for: inputId, label: label, helperText: helperText, disabled: disabled }), hAsync("span", { id: this.screenReaderInfoId, class: "sr-only", "aria-hidden": "true" }, this.getScreenReaderInfo(validationStatus), `${this.defaultHelperText}.`), hAsync("span", { id: this.assistiveHintId, class: "sr-only", "aria-hidden": "true" }, assistiveHint), hAsync("span", { id: "live-region", "aria-live": "assertive", class: "sr-only" }), hAsync("ic-input-component-container", { id: inputId, ref: (el) => (this.inputCompContainerEl = el), disabled: disabled, validationStatus: validationStatus, size: size, role: "group" }, hAsync("div", { class: "input-container" }, hAsync("div", { class: "date-inputs" }, this.getInputsInOrder()[0], "/", this.getInputsInOrder()[1], "/", this.getInputsInOrder()[2]), hAsync("div", { class: "action-buttons" }, showClearButton && (hAsync("ic-button", { id: "clear-button", "aria-label": "Clear input", class: {
|
12814
|
+
return (hAsync(Host, { onBlur: this.handleHostBlur, onFocus: this.handleHostFocus }, hAsync("ic-input-container", { disabled: disabled }, hAsync("ic-input-label", { for: inputId, label: label, helperText: !hideHelperText ? helperText : null, disabled: disabled }), hAsync("span", { id: this.screenReaderInfoId, class: "sr-only", "aria-hidden": "true" }, this.getScreenReaderInfo(validationStatus), hideHelperText && `${helperText}\n`, `${this.defaultHelperText}.`), hAsync("span", { id: this.assistiveHintId, class: "sr-only", "aria-hidden": "true" }, assistiveHint), hAsync("span", { id: "live-region", "aria-live": "assertive", class: "sr-only" }), hAsync("ic-input-component-container", { id: inputId, ref: (el) => (this.inputCompContainerEl = el), disabled: disabled, validationStatus: validationStatus, size: size, role: "group" }, hAsync("div", { class: "input-container" }, hAsync("div", { class: "date-inputs" }, this.getInputsInOrder()[0], "/", this.getInputsInOrder()[1], "/", this.getInputsInOrder()[2]), hAsync("div", { class: "action-buttons" }, showClearButton && (hAsync("ic-button", { id: "clear-button", "aria-label": "Clear input", class: {
|
12340
12815
|
["clear-button"]: true,
|
12341
12816
|
["hidden"]: isEmptyString(this.day) &&
|
12342
12817
|
isEmptyString(this.month) &&
|
@@ -12370,6 +12845,7 @@ class DateInput {
|
|
12370
12845
|
"disablePast": [4, "disable-past"],
|
12371
12846
|
"disablePastMessage": [1, "disable-past-message"],
|
12372
12847
|
"helperText": [1025, "helper-text"],
|
12848
|
+
"hideHelperText": [4, "hide-helper-text"],
|
12373
12849
|
"inputId": [1, "input-id"],
|
12374
12850
|
"label": [1],
|
12375
12851
|
"max": [1],
|
@@ -13185,6 +13661,9 @@ class DatePicker {
|
|
13185
13661
|
if (this.helperText !== undefined) {
|
13186
13662
|
inputProps.helperText = this.helperText;
|
13187
13663
|
}
|
13664
|
+
if (this.hideHelperText !== false) {
|
13665
|
+
inputProps.hideHelperText = this.hideHelperText;
|
13666
|
+
}
|
13188
13667
|
if (this.inputId !== undefined) {
|
13189
13668
|
inputProps.inputId = this.inputId;
|
13190
13669
|
}
|
@@ -13235,6 +13714,7 @@ class DatePicker {
|
|
13235
13714
|
this.disablePast = false;
|
13236
13715
|
this.disablePastMessage = "Dates in the past are not allowed. Please select a date in the future.";
|
13237
13716
|
this.helperText = undefined;
|
13717
|
+
this.hideHelperText = false;
|
13238
13718
|
this.inputId = undefined;
|
13239
13719
|
this.label = undefined;
|
13240
13720
|
this.max = "";
|
@@ -13465,6 +13945,7 @@ class DatePicker {
|
|
13465
13945
|
"disablePast": [4, "disable-past"],
|
13466
13946
|
"disablePastMessage": [1, "disable-past-message"],
|
13467
13947
|
"helperText": [1, "helper-text"],
|
13948
|
+
"hideHelperText": [4, "hide-helper-text"],
|
13468
13949
|
"inputId": [1, "input-id"],
|
13469
13950
|
"label": [1],
|
13470
13951
|
"max": [1],
|
@@ -13614,7 +14095,7 @@ class Dialog {
|
|
13614
14095
|
}
|
13615
14096
|
};
|
13616
14097
|
this.setAlertVariant = () => {
|
13617
|
-
if (isPropDefined(this.status) && this.status !== null) {
|
14098
|
+
if (isPropDefined$1(this.status) && this.status !== null) {
|
13618
14099
|
const alert = this.el.shadowRoot.querySelector("ic-alert");
|
13619
14100
|
alert.setAttribute("variant", this.status);
|
13620
14101
|
}
|
@@ -14333,7 +14814,7 @@ class Hero {
|
|
14333
14814
|
render() {
|
14334
14815
|
const { aligned, small, size, heading, subheading, secondaryHeading, secondarySubheading, foregroundColor, backgroundImage, scrollFactor, } = this;
|
14335
14816
|
let style = {};
|
14336
|
-
if (isPropDefined(backgroundImage)) {
|
14817
|
+
if (isPropDefined$1(backgroundImage)) {
|
14337
14818
|
style = {
|
14338
14819
|
"background-image": "url(" + backgroundImage + ")",
|
14339
14820
|
"background-position": scrollFactor,
|
@@ -14349,7 +14830,7 @@ class Hero {
|
|
14349
14830
|
["left-container-full-width"]: this.leftContentFullWidth,
|
14350
14831
|
} }, hAsync("div", { class: "heading" }, hAsync("slot", { name: "heading" }, hAsync("ic-typography", { variant: small || size === "small" ? "h2" : "h1", class: {
|
14351
14832
|
["heading-bottom-spacing"]: !small && size !== "small",
|
14352
|
-
} }, heading))), hAsync("div", { class: "subheading" }, hAsync("slot", { name: "subheading" }, hAsync("ic-typography", { variant: "body" }, subheading))), hAsync("div", { class: "interaction-container" }, hAsync("slot", { name: "interaction" }))), (isPropDefined(secondaryHeading) || this.rightContent) && (hAsync("div", { class: "right-container" }, hAsync("slot", { name: "secondary" }, secondaryHeading && (hAsync("div", { class: "secondary-container" }, hAsync("div", { class: "secondary-heading" }, hAsync("ic-typography", { variant: "h4" }, secondaryHeading)), hAsync("div", { class: "secondary-subheading" }, hAsync("ic-typography", { variant: "subtitle-small" }, secondarySubheading))))))))));
|
14833
|
+
} }, heading))), hAsync("div", { class: "subheading" }, hAsync("slot", { name: "subheading" }, hAsync("ic-typography", { variant: "body" }, subheading))), hAsync("div", { class: "interaction-container" }, hAsync("slot", { name: "interaction" }))), (isPropDefined$1(secondaryHeading) || this.rightContent) && (hAsync("div", { class: "right-container" }, hAsync("slot", { name: "secondary" }, secondaryHeading && (hAsync("div", { class: "secondary-container" }, hAsync("div", { class: "secondary-heading" }, hAsync("ic-typography", { variant: "h4" }, secondaryHeading)), hAsync("div", { class: "secondary-subheading" }, hAsync("ic-typography", { variant: "subtitle-small" }, secondarySubheading))))))))));
|
14353
14834
|
}
|
14354
14835
|
get el() { return getElement(this); }
|
14355
14836
|
static get style() { return icHeroCss; }
|
@@ -14947,7 +15428,7 @@ class LoadingIndicator {
|
|
14947
15428
|
return cls;
|
14948
15429
|
};
|
14949
15430
|
this.updateLabel = () => {
|
14950
|
-
if (isPropDefined(this.label)) {
|
15431
|
+
if (isPropDefined$1(this.label)) {
|
14951
15432
|
this.labelList = this.label.split("/");
|
14952
15433
|
const labelIndex = 0;
|
14953
15434
|
this.indicatorLabel = this.labelList[labelIndex];
|
@@ -20332,7 +20813,7 @@ class MenuGroup {
|
|
20332
20813
|
}
|
20333
20814
|
render() {
|
20334
20815
|
const parentMenu = this.el.closest("ic-popover-menu");
|
20335
|
-
return (hAsync(Host, { "aria-label": this.label !== null ? this.label : "" }, isPropDefined(this.label) && (hAsync("ic-typography", { variant: "subtitle-small" }, this.label)), hAsync("ul", { role: "group" }, hAsync("slot", null)), this.el !== (parentMenu === null || parentMenu === void 0 ? void 0 : parentMenu.querySelector("ic-menu-group:last-child")) && (hAsync("hr", null))));
|
20816
|
+
return (hAsync(Host, { "aria-label": this.label !== null ? this.label : "" }, isPropDefined$1(this.label) && (hAsync("ic-typography", { variant: "subtitle-small" }, this.label)), hAsync("ul", { role: "group" }, hAsync("slot", null)), this.el !== (parentMenu === null || parentMenu === void 0 ? void 0 : parentMenu.querySelector("ic-menu-group:last-child")) && (hAsync("hr", null))));
|
20336
20817
|
}
|
20337
20818
|
get el() { return getElement(this); }
|
20338
20819
|
static get style() { return icMenuGroupCss; }
|
@@ -20360,7 +20841,7 @@ class MenuItem {
|
|
20360
20841
|
this.handleMenuItemClick = createEvent(this, "handleMenuItemClick", 7);
|
20361
20842
|
this.triggerPopoverMenuInstance = createEvent(this, "triggerPopoverMenuInstance", 7);
|
20362
20843
|
this.handleClick = (e) => {
|
20363
|
-
if (isPropDefined(this.submenuTriggerFor)) {
|
20844
|
+
if (isPropDefined$1(this.submenuTriggerFor)) {
|
20364
20845
|
this.triggerPopoverMenuInstance.emit();
|
20365
20846
|
}
|
20366
20847
|
else if (this.variant === "toggle") {
|
@@ -20374,16 +20855,16 @@ class MenuItem {
|
|
20374
20855
|
};
|
20375
20856
|
this.getMenuItemAriaLabel = () => {
|
20376
20857
|
let ariaLabel = this.label;
|
20377
|
-
if (isPropDefined(this.description)) {
|
20858
|
+
if (isPropDefined$1(this.description)) {
|
20378
20859
|
ariaLabel = `${ariaLabel}, ${this.description}`;
|
20379
20860
|
}
|
20380
|
-
if (isPropDefined(this.keyboardShortcut)) {
|
20861
|
+
if (isPropDefined$1(this.keyboardShortcut)) {
|
20381
20862
|
ariaLabel = `${ariaLabel}, ${this.keyboardShortcut}`;
|
20382
20863
|
}
|
20383
20864
|
if (this.variant === "destructive") {
|
20384
20865
|
ariaLabel = `${ariaLabel}, destructive`;
|
20385
20866
|
}
|
20386
|
-
if (isPropDefined(this.submenuTriggerFor)) {
|
20867
|
+
if (isPropDefined$1(this.submenuTriggerFor)) {
|
20387
20868
|
ariaLabel = `${ariaLabel}, triggers submenu`;
|
20388
20869
|
}
|
20389
20870
|
if (this.el.classList.contains("ic-popover-submenu-back-button")) {
|
@@ -20413,7 +20894,7 @@ class MenuItem {
|
|
20413
20894
|
}
|
20414
20895
|
componentWillLoad() {
|
20415
20896
|
// This ensures that trigger menu items are always set to the default variant
|
20416
|
-
if (isPropDefined(this.submenuTriggerFor) && this.variant !== "default") {
|
20897
|
+
if (isPropDefined$1(this.submenuTriggerFor) && this.variant !== "default") {
|
20417
20898
|
this.variant = "default";
|
20418
20899
|
}
|
20419
20900
|
removeDisabledFalse$1(this.disabled, this.el);
|
@@ -20433,17 +20914,17 @@ class MenuItem {
|
|
20433
20914
|
};
|
20434
20915
|
return (hAsync(Host, { class: {
|
20435
20916
|
["disabled"]: this.disabled,
|
20436
|
-
} }, hAsync("li", { role: this.variant === "toggle" ? "menuitemcheckbox" : "menuitem", "aria-disabled": `${this.disabled}`, "aria-checked": this.variant === "toggle" ? this.toggleChecked : undefined }, hAsync("ic-button", { fullWidth: true, variant: "tertiary", onClick: this.handleClick, href: isPropDefined(this.href), hreflang: isPropDefined(this.hreflang), target: isPropDefined(this.target), rel: isPropDefined(this.rel), referrerpolicy: this.referrerpolicy !== undefined ? this.referrerpolicy : null, "aria-disabled": `${this.disabled}`, "aria-label": this.getMenuItemAriaLabel(), ariaControlsId: isPropDefined(this.submenuTriggerFor)
|
20917
|
+
} }, hAsync("li", { role: this.variant === "toggle" ? "menuitemcheckbox" : "menuitem", "aria-disabled": `${this.disabled}`, "aria-checked": this.variant === "toggle" ? this.toggleChecked : undefined }, hAsync("ic-button", { fullWidth: true, variant: "tertiary", onClick: this.handleClick, href: isPropDefined$1(this.href), hreflang: isPropDefined$1(this.hreflang), target: isPropDefined$1(this.target), rel: isPropDefined$1(this.rel), referrerpolicy: this.referrerpolicy !== undefined ? this.referrerpolicy : null, "aria-disabled": `${this.disabled}`, "aria-label": this.getMenuItemAriaLabel(), ariaControlsId: isPropDefined$1(this.submenuTriggerFor)
|
20437
20918
|
? `ic-popover-submenu-${this.submenuTriggerFor}`
|
20438
|
-
: false, "aria-haspopup": isPropDefined(this.submenuTriggerFor) ||
|
20919
|
+
: false, "aria-haspopup": isPropDefined$1(this.submenuTriggerFor) ||
|
20439
20920
|
this.el.classList.contains("ic-popover-submenu-back-button")
|
20440
20921
|
? "menu"
|
20441
|
-
: false, ariaOwnsId: isPropDefined(this.submenuTriggerFor)
|
20922
|
+
: false, ariaOwnsId: isPropDefined$1(this.submenuTriggerFor)
|
20442
20923
|
? `ic-popover-submenu-${this.submenuTriggerFor}`
|
20443
20924
|
: false }, hAsync("div", { class: "focus-border" }, isSlotUsed$1(this.el, "icon") && (hAsync("span", { class: "icon" }, hAsync("slot", { name: "icon" }))), hAsync(MenuItemInformation, null), this.variant === "toggle" && (hAsync("span", { class: {
|
20444
20925
|
["check-icon"]: true,
|
20445
20926
|
["hide"]: !this.toggleChecked,
|
20446
|
-
}, "aria-hidden": "true", innerHTML: checkIcon })), isPropDefined(this.submenuTriggerFor) && (hAsync("span", { class: { ["submenu-icon"]: true }, "aria-hidden": "true", innerHTML: chevronIcon })))))));
|
20927
|
+
}, "aria-hidden": "true", innerHTML: checkIcon })), isPropDefined$1(this.submenuTriggerFor) && (hAsync("span", { class: { ["submenu-icon"]: true }, "aria-hidden": "true", innerHTML: chevronIcon })))))));
|
20447
20928
|
}
|
20448
20929
|
static get delegatesFocus() { return true; }
|
20449
20930
|
get el() { return getElement(this); }
|
@@ -22063,7 +22544,7 @@ class PopoverMenu {
|
|
22063
22544
|
};
|
22064
22545
|
this.getMenuAriaLabel = () => {
|
22065
22546
|
const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);
|
22066
|
-
if (isPropDefined(this.submenuId)) {
|
22547
|
+
if (isPropDefined$1(this.submenuId)) {
|
22067
22548
|
return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;
|
22068
22549
|
}
|
22069
22550
|
else {
|
@@ -22109,7 +22590,7 @@ class PopoverMenu {
|
|
22109
22590
|
!this.popoverMenuEls.some((menuItem) => menuItem.id)) {
|
22110
22591
|
this.popoverMenuEls.unshift(this.backButton);
|
22111
22592
|
}
|
22112
|
-
this.currentFocus = isPropDefined(this.submenuId) ? 1 : 0;
|
22593
|
+
this.currentFocus = isPropDefined$1(this.submenuId) ? 1 : 0;
|
22113
22594
|
// Needed so that anchorEl isn't always focused
|
22114
22595
|
setTimeout(this.setButtonFocus, 50);
|
22115
22596
|
}
|
@@ -22222,9 +22703,9 @@ class PopoverMenu {
|
|
22222
22703
|
}, tabindex: open ? "0" : "-1" }, hAsync("div", { class: {
|
22223
22704
|
"opening-from-parent": this.openingFromParent,
|
22224
22705
|
"opening-from-child": this.openingFromChild,
|
22225
|
-
} }, isPropDefined(this.submenuId) && (hAsync("div", null, hAsync("ic-menu-item", { class: "ic-popover-submenu-back-button", ref: (el) => (this.backButton = el), label: "Back", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, hAsync("svg", { slot: "icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "submenu-back-icon" }, hAsync("path", { d: "M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z", fill: "currentColor" }))), hAsync("ic-typography", { variant: "subtitle-small", class: "parent-label" }, this.parentLabel))), hAsync("ul", { class: "button", "aria-label": this.getMenuAriaLabel(), role: "menu", "aria-owns": isPropDefined(this.submenuId)
|
22706
|
+
} }, isPropDefined$1(this.submenuId) && (hAsync("div", null, hAsync("ic-menu-item", { class: "ic-popover-submenu-back-button", ref: (el) => (this.backButton = el), label: "Back", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, hAsync("svg", { slot: "icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "submenu-back-icon" }, hAsync("path", { d: "M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z", fill: "currentColor" }))), hAsync("ic-typography", { variant: "subtitle-small", class: "parent-label" }, this.parentLabel))), hAsync("ul", { class: "button", "aria-label": this.getMenuAriaLabel(), role: "menu", "aria-owns": isPropDefined$1(this.submenuId)
|
22226
22707
|
? `ic-popover-submenu-back-button-${this.submenuLevel}`
|
22227
|
-
: false, "aria-controls": isPropDefined(this.submenuId)
|
22708
|
+
: false, "aria-controls": isPropDefined$1(this.submenuId)
|
22228
22709
|
? `ic-popover-submenu-back-button-${this.submenuLevel}`
|
22229
22710
|
: false }, hAsync("slot", null))))));
|
22230
22711
|
}
|
@@ -22262,6 +22743,9 @@ class RadioGroup {
|
|
22262
22743
|
registerInstance(this, hostRef);
|
22263
22744
|
this.icChange = createEvent(this, "icChange", 7);
|
22264
22745
|
this.resizeObserver = null;
|
22746
|
+
this.ADDITIONAL_FIELD = "additional-field";
|
22747
|
+
this.RADIO_HORIZONTAL = "horizontal";
|
22748
|
+
this.RADIO_VERTICAL = "vertical";
|
22265
22749
|
this.runResizeObserver = () => {
|
22266
22750
|
this.resizeObserver = new ResizeObserver(() => {
|
22267
22751
|
this.checkOrientation();
|
@@ -22323,14 +22807,14 @@ class RadioGroup {
|
|
22323
22807
|
}
|
22324
22808
|
});
|
22325
22809
|
this.setFirstRadioOptionTabIndex(this.selectedChild > 0 ? -1 : 0);
|
22326
|
-
|
22327
|
-
|
22328
|
-
|
22329
|
-
|
22330
|
-
|
22331
|
-
|
22332
|
-
|
22333
|
-
|
22810
|
+
if (this.initialOrientation === this.RADIO_HORIZONTAL &&
|
22811
|
+
this.radioOptions !== undefined &&
|
22812
|
+
(this.radioOptions.length > 2 ||
|
22813
|
+
(this.radioOptions.length === 2 &&
|
22814
|
+
(isSlotUsed$1(this.radioOptions[0], this.ADDITIONAL_FIELD) ||
|
22815
|
+
isSlotUsed$1(this.radioOptions[1], this.ADDITIONAL_FIELD))))) {
|
22816
|
+
this.currentOrientation = this.RADIO_VERTICAL;
|
22817
|
+
}
|
22334
22818
|
}
|
22335
22819
|
};
|
22336
22820
|
this.checkedValue = "";
|
@@ -22351,6 +22835,7 @@ class RadioGroup {
|
|
22351
22835
|
}
|
22352
22836
|
orientationChangeHandler() {
|
22353
22837
|
this.initialOrientation = this.orientation;
|
22838
|
+
this.checkOrientation();
|
22354
22839
|
}
|
22355
22840
|
disconnectedCallback() {
|
22356
22841
|
var _a, _b;
|
@@ -22400,20 +22885,35 @@ class RadioGroup {
|
|
22400
22885
|
}
|
22401
22886
|
}
|
22402
22887
|
checkOrientation() {
|
22403
|
-
|
22888
|
+
var _a, _b;
|
22889
|
+
if (this.initialOrientation === this.RADIO_HORIZONTAL) {
|
22404
22890
|
let totalWidth = 0;
|
22405
|
-
this.radioOptions
|
22406
|
-
|
22407
|
-
|
22408
|
-
|
22409
|
-
|
22410
|
-
|
22411
|
-
totalWidth > this.radioContainer.clientWidth) {
|
22412
|
-
this.currentOrientation = "vertical";
|
22891
|
+
if (Array.isArray(this.radioOptions) && this.radioOptions.length > 0) {
|
22892
|
+
this.radioOptions.forEach(({ clientWidth }, i, arr) => {
|
22893
|
+
totalWidth += clientWidth;
|
22894
|
+
if (i < arr.length - 1)
|
22895
|
+
totalWidth += 40;
|
22896
|
+
});
|
22413
22897
|
}
|
22414
|
-
else
|
22415
|
-
totalWidth
|
22416
|
-
|
22898
|
+
else {
|
22899
|
+
totalWidth = 0;
|
22900
|
+
}
|
22901
|
+
if (this.initialOrientation == this.RADIO_HORIZONTAL) {
|
22902
|
+
if (this.radioOptions !== undefined &&
|
22903
|
+
(this.radioOptions.length > 2 ||
|
22904
|
+
(this.radioOptions.length === 2 &&
|
22905
|
+
(isSlotUsed$1(this.radioOptions[0], this.ADDITIONAL_FIELD) ||
|
22906
|
+
isSlotUsed$1(this.radioOptions[1], this.ADDITIONAL_FIELD))))) {
|
22907
|
+
this.currentOrientation = this.RADIO_VERTICAL;
|
22908
|
+
}
|
22909
|
+
else {
|
22910
|
+
if (totalWidth >= ((_a = this.radioContainer) === null || _a === void 0 ? void 0 : _a.clientWidth)) {
|
22911
|
+
this.currentOrientation = this.RADIO_VERTICAL;
|
22912
|
+
}
|
22913
|
+
else if (totalWidth < ((_b = this.radioContainer) === null || _b === void 0 ? void 0 : _b.clientWidth)) {
|
22914
|
+
this.currentOrientation = this.RADIO_HORIZONTAL;
|
22915
|
+
}
|
22916
|
+
}
|
22417
22917
|
}
|
22418
22918
|
}
|
22419
22919
|
}
|
@@ -22421,7 +22921,7 @@ class RadioGroup {
|
|
22421
22921
|
renderHiddenInput$1(true, this.el, this.name, this.checkedValue, this.disabled);
|
22422
22922
|
return (hAsync(Host, { onKeyDown: this.handleKeyDown, class: { small: this.small || this.size === "small" } }, hAsync("div", { role: "radiogroup", "aria-label": `${this.label}${this.required ? ", required" : ""}` }, !this.hideLabel && (hAsync("ic-input-label", { class: { [`${this.validationStatus}`]: true }, label: this.label, helperText: this.helperText, required: this.required, disabled: this.disabled })), hAsync("div", { class: {
|
22423
22923
|
"radio-buttons-container": true,
|
22424
|
-
horizontal: this.currentOrientation ===
|
22924
|
+
horizontal: this.currentOrientation === this.RADIO_HORIZONTAL,
|
22425
22925
|
}, ref: (el) => (this.radioContainer = el) }, hAsync("slot", null))), hasValidationStatus$1(this.validationStatus, this.disabled) && (hAsync("ic-input-validation", { ariaLiveMode: "polite", status: this.validationStatus, message: this.validationText }))));
|
22426
22926
|
}
|
22427
22927
|
get el() { return getElement(this); }
|
@@ -22583,7 +23083,7 @@ class RadioOption {
|
|
22583
23083
|
}
|
22584
23084
|
render() {
|
22585
23085
|
const { additionalFieldDisplay, disabled, dynamicText, form, formaction, formenctype, formmethod, formnovalidate, formtarget, groupLabel, handleClick, hasAdditionalField, label, name, selected, swallowClick, value, } = this;
|
22586
|
-
const id = `ic-radio-option-${isPropDefined(label) || value}-${groupLabel}`;
|
23086
|
+
const id = `ic-radio-option-${isPropDefined$1(label) || value}-${groupLabel}`;
|
22587
23087
|
return (hAsync(Host, { onClick: handleClick, class: { disabled } }, hAsync("div", { class: { ["container"]: true, disabled } }, hAsync("div", null, hAsync("input", { role: "radio", tabindex: selected ? "0" : "-1", type: "radio", name: name, id: id, value: value, disabled: disabled ? true : null, checked: selected, ref: (el) => (this.radioElement = el), form: form, formaction: formaction, formenctype: formenctype, formmethod: formmethod, formnovalidate: formnovalidate, formtarget: formtarget }), hAsync("span", { class: "checkmark" })), hAsync("ic-typography", { class: "radio-label", variant: "body" }, hAsync("label", { htmlFor: id }, label))), hasAdditionalField && (hAsync("div", { onClick: swallowClick, class: {
|
22588
23088
|
"dynamic-container": true,
|
22589
23089
|
hidden: additionalFieldDisplay === "dynamic" && !selected,
|
@@ -25153,7 +25653,7 @@ class SideNavigation {
|
|
25153
25653
|
});
|
25154
25654
|
};
|
25155
25655
|
this.renderTopBar = ({ isSDevice, foregroundColor, menuOpen, href, isAppNameSubtitleVariant, }) => {
|
25156
|
-
const hasTitle = this.appTitle !== "" && isPropDefined(this.appTitle);
|
25656
|
+
const hasTitle = this.appTitle !== "" && isPropDefined$1(this.appTitle);
|
25157
25657
|
const Component = isSlotUsed$1(this.el, "app-title") ? "div" : "a";
|
25158
25658
|
const attrs = Component == "a" && {
|
25159
25659
|
href: href,
|
@@ -25420,7 +25920,7 @@ class Step {
|
|
25420
25920
|
}
|
25421
25921
|
// STEP STATUS
|
25422
25922
|
let stepStatus;
|
25423
|
-
if (isPropDefined(this.stepStatus)) {
|
25923
|
+
if (isPropDefined$1(this.stepStatus)) {
|
25424
25924
|
stepStatus = this.stepStatus[0].toUpperCase() + this.stepStatus.slice(1);
|
25425
25925
|
}
|
25426
25926
|
// STEP TYPE
|
@@ -25458,7 +25958,7 @@ class Step {
|
|
25458
25958
|
!!this.compactStepStyling &&
|
25459
25959
|
this.compactStepStyling !== "active") ||
|
25460
25960
|
!!this.stepStatus) && (hAsync("div", { class: "step-status" }, statusIcon !== undefined && statusIcon, (this.stepSubtitle || stepType) && (hAsync("ic-typography", { variant: "caption" }, this.stepSubtitle !== null &&
|
25461
|
-
isPropDefined(this.stepSubtitle)
|
25961
|
+
isPropDefined$1(this.stepSubtitle)
|
25462
25962
|
? this.stepSubtitle
|
25463
25963
|
: this.stepType === "disabled" ||
|
25464
25964
|
(this.variant === "compact" &&
|
@@ -25467,7 +25967,7 @@ class Step {
|
|
25467
25967
|
(this.variant === "compact" &&
|
25468
25968
|
this.compactStepStyling === "completed")
|
25469
25969
|
? stepType
|
25470
|
-
: this.stepStatus && stepStatus))))), this.lastStep ? (hAsync("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Last step")) : (isPropDefined(this.nextStepTitle) && (hAsync("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Next", hAsync("span", { class: "visually-hidden" }, " step is"), ":", " ", this.nextStepTitle))))));
|
25970
|
+
: this.stepStatus && stepStatus))))), this.lastStep ? (hAsync("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Last step")) : (isPropDefined$1(this.nextStepTitle) && (hAsync("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Next", hAsync("span", { class: "visually-hidden" }, " step is"), ":", " ", this.nextStepTitle))))));
|
25471
25971
|
// ICON FOR DEFAULT STEP
|
25472
25972
|
let icon;
|
25473
25973
|
if (this.stepType !== "completed") {
|
@@ -25487,7 +25987,7 @@ class Step {
|
|
25487
25987
|
const defaultStep = (hAsync("div", { class: {
|
25488
25988
|
["step"]: true,
|
25489
25989
|
[`${this.stepType}`]: true,
|
25490
|
-
} }, hAsync("div", { class: "step-top" }, hAsync("div", { class: "step-icon" }, icon), finalStep), (this.stepTitle || this.stepSubtitle || this.stepStatus) && (hAsync("div", { class: "step-title-area" }, this.stepTitle && (hAsync("ic-typography", { variant: "subtitle-large", class: "step-title" }, this.stepTitle)), this.stepTitle && (this.stepSubtitle || this.stepStatus) && (hAsync("ic-typography", { variant: "caption", class: "step-subtitle" }, this.stepSubtitle !== null && isPropDefined(this.stepSubtitle)
|
25990
|
+
} }, hAsync("div", { class: "step-top" }, hAsync("div", { class: "step-icon" }, icon), finalStep), (this.stepTitle || this.stepSubtitle || this.stepStatus) && (hAsync("div", { class: "step-title-area" }, this.stepTitle && (hAsync("ic-typography", { variant: "subtitle-large", class: "step-title" }, this.stepTitle)), this.stepTitle && (this.stepSubtitle || this.stepStatus) && (hAsync("ic-typography", { variant: "caption", class: "step-subtitle" }, this.stepSubtitle !== null && isPropDefined$1(this.stepSubtitle)
|
25491
25991
|
? this.stepSubtitle
|
25492
25992
|
: stepStatus))))));
|
25493
25993
|
return (hAsync(Host, { role: "listitem", "aria-label": `Step ${this.stepNum}${ariaLabel}`, "aria-current": (this.current || this.stepType === "current") && "step", class: {
|
@@ -25563,7 +26063,7 @@ class Stepper {
|
|
25563
26063
|
lastStep.style.maxWidth = "none";
|
25564
26064
|
if (this.alignedFullWidth) {
|
25565
26065
|
this.stepperWidth = this.el.offsetWidth;
|
25566
|
-
lastStep.style.maxWidth = pxToRem(`${this.stepperWidth / this.steps.length}px`);
|
26066
|
+
lastStep.style.maxWidth = pxToRem$1(`${this.stepperWidth / this.steps.length}px`);
|
25567
26067
|
this.lastStepWidth = lastStep.offsetWidth;
|
25568
26068
|
}
|
25569
26069
|
};
|
@@ -25634,9 +26134,9 @@ class Stepper {
|
|
25634
26134
|
if (this.variant === "default") {
|
25635
26135
|
if (!step.lastStep) {
|
25636
26136
|
if (this.alignedFullWidth) {
|
25637
|
-
step.style.width = pxToRem(`${(this.stepperWidth - this.lastStepWidth) /
|
26137
|
+
step.style.width = pxToRem$1(`${(this.stepperWidth - this.lastStepWidth) /
|
25638
26138
|
(this.steps.length - 1)}px`);
|
25639
|
-
step.style.minWidth = pxToRem("148px");
|
26139
|
+
step.style.minWidth = pxToRem$1("148px");
|
25640
26140
|
}
|
25641
26141
|
}
|
25642
26142
|
else if (step.lastStep) {
|
@@ -25647,21 +26147,21 @@ class Stepper {
|
|
25647
26147
|
else {
|
25648
26148
|
step.style.maxWidth =
|
25649
26149
|
this.connectorWidth > 100
|
25650
|
-
? pxToRem(`${this.connectorWidth + 48}px`)
|
25651
|
-
: pxToRem("148px");
|
26150
|
+
? pxToRem$1(`${this.connectorWidth + 48}px`)
|
26151
|
+
: pxToRem$1("148px");
|
25652
26152
|
}
|
25653
26153
|
}
|
25654
26154
|
if (this.aligned === "left") {
|
25655
26155
|
step.style.width =
|
25656
26156
|
this.connectorWidth > 100
|
25657
|
-
? pxToRem(`${this.connectorWidth + 48}px`)
|
25658
|
-
: pxToRem("148px");
|
26157
|
+
? pxToRem$1(`${this.connectorWidth + 48}px`)
|
26158
|
+
: pxToRem$1("148px");
|
25659
26159
|
const stepConnect = step.shadowRoot.querySelector(".step > .step-top > .step-connect");
|
25660
26160
|
if (stepConnect) {
|
25661
26161
|
stepConnect.style.width =
|
25662
26162
|
this.connectorWidth > 100
|
25663
|
-
? pxToRem(`${this.connectorWidth}px`)
|
25664
|
-
: pxToRem("100px");
|
26163
|
+
? pxToRem$1(`${this.connectorWidth}px`)
|
26164
|
+
: pxToRem$1("100px");
|
25665
26165
|
}
|
25666
26166
|
}
|
25667
26167
|
if (this.hideStepInfo && stepTitleArea !== null) {
|
@@ -26364,7 +26864,7 @@ class TabPanel {
|
|
26364
26864
|
const { panelId, selectedTab, appearance } = this;
|
26365
26865
|
return (hAsync(Host, { class: {
|
26366
26866
|
["ic-tab-panel-light"]: appearance === IcThemeForegroundEnum$1.Light,
|
26367
|
-
}, role: "tabpanel", hidden: isPropDefined(panelId) && isPropDefined(selectedTab)
|
26867
|
+
}, role: "tabpanel", hidden: isPropDefined$1(panelId) && isPropDefined$1(selectedTab)
|
26368
26868
|
? !(panelId === selectedTab)
|
26369
26869
|
: true }, hAsync("div", null, hAsync("slot", null))));
|
26370
26870
|
}
|
@@ -26798,7 +27298,7 @@ class Toast {
|
|
26798
27298
|
(_b = this.neutralIconAriaLabel) !== null && _b !== void 0 ? _b : VARIANT_ICONS[this.variant].ariaLabel;
|
26799
27299
|
}
|
26800
27300
|
if (this.isManual) {
|
26801
|
-
const toastMessage = isPropDefined(this.message)
|
27301
|
+
const toastMessage = isPropDefined$1(this.message)
|
26802
27302
|
? `. ${this.message}`
|
26803
27303
|
: "";
|
26804
27304
|
this.el.setAttribute("aria-label", this.variant
|
@@ -27360,9 +27860,7 @@ class Tooltip {
|
|
27360
27860
|
.getBoundingClientRect();
|
27361
27861
|
this.getTooltipTranslate(dialogEl);
|
27362
27862
|
}
|
27363
|
-
this.popperInstance = createPopper$1(this.el, this.toolTip, {
|
27364
|
-
placement: this.placement,
|
27365
|
-
modifiers: [
|
27863
|
+
this.popperInstance = createPopper$1(this.el, this.toolTip, Object.assign({ placement: this.placement, modifiers: [
|
27366
27864
|
{
|
27367
27865
|
name: "offset",
|
27368
27866
|
options: {
|
@@ -27379,8 +27877,7 @@ class Tooltip {
|
|
27379
27877
|
name: "eventListeners",
|
27380
27878
|
options: { scroll: false, resize: false },
|
27381
27879
|
},
|
27382
|
-
],
|
27383
|
-
});
|
27880
|
+
] }, this.popperProps));
|
27384
27881
|
}
|
27385
27882
|
else {
|
27386
27883
|
console.warn(`Tooltip can't display without prop 'label' set`);
|
@@ -27440,6 +27937,14 @@ class Tooltip {
|
|
27440
27937
|
this.silent = false;
|
27441
27938
|
this.target = undefined;
|
27442
27939
|
this.label = undefined;
|
27940
|
+
this.popperProps = {};
|
27941
|
+
}
|
27942
|
+
/**
|
27943
|
+
* @internal This method allows props to be added to the PopperJS createPopper instance outside of tooltip
|
27944
|
+
* @param props object - createPopper props set externally
|
27945
|
+
*/
|
27946
|
+
async setExternalPopperProps(props) {
|
27947
|
+
this.popperProps = props;
|
27443
27948
|
}
|
27444
27949
|
disconnectedCallback() {
|
27445
27950
|
this.manageEventListeners("remove");
|
@@ -27493,6 +27998,8 @@ class Tooltip {
|
|
27493
27998
|
"silent": [4],
|
27494
27999
|
"target": [513],
|
27495
28000
|
"label": [1],
|
28001
|
+
"popperProps": [32],
|
28002
|
+
"setExternalPopperProps": [64],
|
27496
28003
|
"displayTooltip": [64],
|
27497
28004
|
"isTooltipVisible": [64]
|
27498
28005
|
},
|
@@ -27666,7 +28173,7 @@ class TopNavigation {
|
|
27666
28173
|
const hasVersion = version !== "";
|
27667
28174
|
const hasMenuContent = hasNavigation || hasIconButtons || hasStatus || hasVersion;
|
27668
28175
|
const searchButtonSize = deviceSize <= DEVICE_SIZES.S ? "default" : "large";
|
27669
|
-
const hasTitle = appTitle !== "" && isPropDefined(appTitle);
|
28176
|
+
const hasTitle = appTitle !== "" && isPropDefined$1(appTitle);
|
27670
28177
|
const overMobileBreakpoint = deviceSize <= customMobileBreakpoint;
|
27671
28178
|
const appTitleVariant = overMobileBreakpoint
|
27672
28179
|
? deviceSize <= DEVICE_SIZES.S
|
@@ -27723,27 +28230,492 @@ class TopNavigation {
|
|
27723
28230
|
}; }
|
27724
28231
|
}
|
27725
28232
|
|
27726
|
-
const icTypographyCss = "/*!@html*/html.sc-ic-typography{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-typography{margin:0}/*!@main*/main.sc-ic-typography{display:block}/*!@h1*/h1.sc-ic-typography{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-typography{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-typography{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-typography{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-typography{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-typography,strong.sc-ic-typography{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-typography,kbd.sc-ic-typography,samp.sc-ic-typography{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-typography{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-typography,sup.sc-ic-typography{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-typography{bottom:-0.25em}/*!@sup*/sup.sc-ic-typography{top:-0.5em}/*!@img*/img.sc-ic-typography{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-typography,input.sc-ic-typography,optgroup.sc-ic-typography,select.sc-ic-typography,textarea.sc-ic-typography{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-typography,input.sc-ic-typography{overflow:visible}/*!@button,\nselect*/button.sc-ic-typography,select.sc-ic-typography{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-typography,[type=\"button\"].sc-ic-typography,[type=\"reset\"].sc-ic-typography,[type=\"submit\"].sc-ic-typography{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-typography::-moz-focus-inner,[type=\"button\"].sc-ic-typography::-moz-focus-inner,[type=\"reset\"].sc-ic-typography::-moz-focus-inner,[type=\"submit\"].sc-ic-typography::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-typography:-moz-focusring,[type=\"button\"].sc-ic-typography:-moz-focusring,[type=\"reset\"].sc-ic-typography:-moz-focusring,[type=\"submit\"].sc-ic-typography:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-typography{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-typography{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-typography{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-typography{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-typography,[type=\"radio\"].sc-ic-typography{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-typography::-webkit-inner-spin-button,[type=\"number\"].sc-ic-typography::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-typography{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-typography::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-typography::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-typography{display:block}/*!@summary*/summary.sc-ic-typography{display:list-item}/*!@template*/template.sc-ic-typography{display:none}/*!@[hidden]*/[hidden].sc-ic-typography{display:none}/*!@html,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo*/html.sc-ic-typography,body.sc-ic-typography,div.sc-ic-typography,span.sc-ic-typography,applet.sc-ic-typography,object.sc-ic-typography,iframe.sc-ic-typography,h1.sc-ic-typography,h2.sc-ic-typography,h3.sc-ic-typography,h4.sc-ic-typography,h5.sc-ic-typography,h6.sc-ic-typography,p.sc-ic-typography,blockquote.sc-ic-typography,pre.sc-ic-typography,a.sc-ic-typography,abbr.sc-ic-typography,acronym.sc-ic-typography,address.sc-ic-typography,big.sc-ic-typography,cite.sc-ic-typography,code.sc-ic-typography,del.sc-ic-typography,dfn.sc-ic-typography,em.sc-ic-typography,img.sc-ic-typography,ins.sc-ic-typography,kbd.sc-ic-typography,q.sc-ic-typography,s.sc-ic-typography,samp.sc-ic-typography,small.sc-ic-typography,strike.sc-ic-typography,strong.sc-ic-typography,sub.sc-ic-typography,sup.sc-ic-typography,tt.sc-ic-typography,var.sc-ic-typography,b.sc-ic-typography,u.sc-ic-typography,i.sc-ic-typography,center.sc-ic-typography,dl.sc-ic-typography,dt.sc-ic-typography,dd.sc-ic-typography,ol.sc-ic-typography,ul.sc-ic-typography,li.sc-ic-typography,fieldset.sc-ic-typography,form.sc-ic-typography,label.sc-ic-typography,legend.sc-ic-typography,table.sc-ic-typography,caption.sc-ic-typography,tbody.sc-ic-typography,tfoot.sc-ic-typography,thead.sc-ic-typography,tr.sc-ic-typography,th.sc-ic-typography,td.sc-ic-typography,article.sc-ic-typography,aside.sc-ic-typography,canvas.sc-ic-typography,details.sc-ic-typography,embed.sc-ic-typography,figure.sc-ic-typography,figcaption.sc-ic-typography,footer.sc-ic-typography,header.sc-ic-typography,hgroup.sc-ic-typography,menu.sc-ic-typography,nav.sc-ic-typography,output.sc-ic-typography,ruby.sc-ic-typography,section.sc-ic-typography,summary.sc-ic-typography,time.sc-ic-typography,mark.sc-ic-typography,audio.sc-ic-typography,video.sc-ic-typography{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-typography-h{display:block;position:relative}/*!@:host(.ic-typography-vertical-margins-h1)*/.ic-typography-vertical-margins-h1.sc-ic-typography-h{margin:0 0 var(--ic-space-xl)}/*!@:host(.ic-typography-vertical-margins-h2)*/.ic-typography-vertical-margins-h2.sc-ic-typography-h{margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}/*!@:host(.ic-typography-vertical-margins-h3)*/.ic-typography-vertical-margins-h3.sc-ic-typography-h{margin:var(--ic-space-xl) 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-h4)*/.ic-typography-vertical-margins-h4.sc-ic-typography-h{margin:var(--ic-space-lg) 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-subtitle-large),\n:host(.ic-typography-vertical-margins-subtitle-small),\n:host(.ic-typography-vertical-margins-body),\n:host(.ic-typography-vertical-margins-code-large),\n:host(.ic-typography-vertical-margins-code-small),\n:host(.ic-typography-vertical-margins-code-extra-small)*/.ic-typography-vertical-margins-subtitle-large.sc-ic-typography-h,.ic-typography-vertical-margins-subtitle-small.sc-ic-typography-h,.ic-typography-vertical-margins-body.sc-ic-typography-h,.ic-typography-vertical-margins-code-large.sc-ic-typography-h,.ic-typography-vertical-margins-code-small.sc-ic-typography-h,.ic-typography-vertical-margins-code-extra-small.sc-ic-typography-h{margin:0 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-caption),\n:host(.ic-typography-vertical-margins-caption-uppercase)*/.ic-typography-vertical-margins-caption.sc-ic-typography-h,.ic-typography-vertical-margins-caption-uppercase.sc-ic-typography-h{margin:0 0 var(--ic-space-xs)}/*!@:host(.ic-typography-vertical-margins-h2:first-child),\n:host(.ic-typography-vertical-margins-h3:first-child),\n:host(.ic-typography-vertical-margins-h4:first-child)*/.ic-typography-vertical-margins-h2.sc-ic-typography-h:first-child,.ic-typography-vertical-margins-h3.sc-ic-typography-h:first-child,.ic-typography-vertical-margins-h4.sc-ic-typography-h:first-child{margin-top:0}/*!@:host(.ic-typography-h1)*/.ic-typography-h1.sc-ic-typography-h{font:var(--ic-font-h1) !important}/*!@:host(.ic-typography-h2)*/.ic-typography-h2.sc-ic-typography-h{font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-h3)*/.ic-typography-h3.sc-ic-typography-h{font:var(--ic-font-h3)}/*!@:host(.ic-typography-h4)*/.ic-typography-h4.sc-ic-typography-h{font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-subtitle-large)*/.ic-typography-subtitle-large.sc-ic-typography-h{font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-subtitle-small)*/.ic-typography-subtitle-small.sc-ic-typography-h{font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-body)*/.ic-typography-body.sc-ic-typography-h{font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}/*!@:host(.ic-typography-caption)*/.ic-typography-caption.sc-ic-typography-h{font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-caption-uppercase)*/.ic-typography-caption-uppercase.sc-ic-typography-h{font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}/*!@:host(.ic-typography-label)*/.ic-typography-label.sc-ic-typography-h{font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-label-uppercase)*/.ic-typography-label-uppercase.sc-ic-typography-h{font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}/*!@:host(.ic-typography-code-large)*/.ic-typography-code-large.sc-ic-typography-h{font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-code-small)*/.ic-typography-code-small.sc-ic-typography-h{font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}/*!@:host(.ic-typography-code-extra-small)*/.ic-typography-code-extra-small.sc-ic-typography-h{font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-badge)*/.ic-typography-badge.sc-ic-typography-h{font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-badge-small)*/.ic-typography-badge-small.sc-ic-typography-h{font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-no-wrap)*/.ic-typography-no-wrap.sc-ic-typography-h{white-space:nowrap}/*!@:host ::slotted(h1),\n:host ::slotted(h2),\n:host ::slotted(h3),\n:host ::slotted(h4),\n:host ::slotted(h5),\n:host ::slotted(h6),\n:host ::slotted(p),\n:host ::slotted(label)*/.sc-ic-typography-h .sc-ic-typography-s>h1,.sc-ic-typography-h.sc-ic-typography-s>h2,.sc-ic-typography-h .sc-ic-typography-s>h2,.sc-ic-typography-h.sc-ic-typography-s>h3,.sc-ic-typography-h .sc-ic-typography-s>h3,.sc-ic-typography-h.sc-ic-typography-s>h4,.sc-ic-typography-h .sc-ic-typography-s>h4,.sc-ic-typography-h.sc-ic-typography-s>h5,.sc-ic-typography-h .sc-ic-typography-s>h5,.sc-ic-typography-h.sc-ic-typography-s>h6,.sc-ic-typography-h .sc-ic-typography-s>h6,.sc-ic-typography-h.sc-ic-typography-s>p,.sc-ic-typography-h .sc-ic-typography-s>p,.sc-ic-typography-h.sc-ic-typography-s>label,.sc-ic-typography-h .sc-ic-typography-s>label{font:inherit;letter-spacing:inherit}/*!@.trunc-wrapper*/.trunc-wrapper.sc-ic-typography{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden}/*!@.trunc-btn*/.trunc-btn.sc-ic-typography{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}/*!@.trunc-btn:hover,\n.trunc-btn.focus*/.trunc-btn.sc-ic-typography:hover,.trunc-btn.focus.sc-ic-typography{outline:none;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none;cursor:pointer}/*!@:host(.strikethrough)*/.strikethrough.sc-ic-typography-h{text-decoration:line-through}/*!@:host(.underline)*/.underline.sc-ic-typography-h{text-decoration:underline}/*!@:host(.underline.strikethrough)*/.underline.strikethrough.sc-ic-typography-h{text-decoration:line-through underline}/*!@:host(.italic)*/.italic.sc-ic-typography-h{font-style:italic !important}/*!@:host(.bold)*/.bold.sc-ic-typography-h{font-weight:var(--ic-font-weight-bold)}@supports (text-underline-offset: 25%){/*!@.trunc-btn:hover,\n .trunc-btn.focus*/.trunc-btn.sc-ic-typography:hover,.trunc-btn.focus.sc-ic-typography{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";
|
28233
|
+
var arrowDropdown = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
28234
|
+
<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor"/>
|
28235
|
+
</svg>`;
|
28236
|
+
|
28237
|
+
const icTreeItemCss = "/*!@:host*/.sc-ic-tree-item-h{display:block;border:none;position:relative}/*!@:host .tree-item-content*/.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item{display:flex;align-items:center;height:calc(var(--ic-space-xl) + var(--ic-space-xs));padding:0 var(--ic-space-xs);text-decoration:none;color:var(--ic-primary-text)}/*!@::slotted([slot=\"router-item\"])*/.sc-ic-tree-item-s>[slot=\"router-item\"]{display:flex;align-items:center;height:calc(var(--ic-space-xl) + var(--ic-space-xs));text-decoration:none;font-family:var(--ic-font-body-family);color:var(--ic-primary-text);padding:0 var(--ic-space-xs) !important}/*!@::slotted([slot=\"router-item\"].ic-tree-item-single)*/.sc-ic-tree-item-s>[slot=\"router-item\"].ic-tree-item-single{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xs)) !important}/*!@:host .tree-item-content:focus,\n::slotted([slot=\"router-item\"]:focus)*/.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item:focus,.sc-ic-tree-item-s>[slot=\"router-item\"]:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast);outline:none}/*!@:host .tree-item-content:hover,\n::slotted([slot=\"router-item\"]:hover)*/.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item:hover,.sc-ic-tree-item-s>[slot=\"router-item\"]:hover{background-color:var(--ic-action-dark-bg-hover) !important;cursor:pointer}/*!@:host .tree-item-content:active,\n::slotted([slot=\"router-item\"]:active)*/.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item:active,.sc-ic-tree-item-s>[slot=\"router-item\"]:active{background-color:var(--ic-action-dark-bg-active) !important}/*!@:host(.ic-tree-item-selected) .tree-item-content,\n:host(.ic-tree-item-selected) ::slotted([slot=\"router-item\"])*/.ic-tree-item-selected.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-selected.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-selected .sc-ic-tree-item-s>[slot=\"router-item\"]{background-color:var(--ic-action-default-bg-hover) !important}/*!@:host(.ic-tree-item-small) .tree-item-content,\n:host(.ic-tree-item-small) ::slotted([slot=\"router-item\"])*/.ic-tree-item-small.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-small.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-small .sc-ic-tree-item-s>[slot=\"router-item\"]{height:var(--ic-space-xl)}/*!@:host(.ic-tree-item-large) .tree-item-content,\n:host(.ic-tree-item-large) ::slotted([slot=\"router-item\"])*/.ic-tree-item-large.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-large.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-large .sc-ic-tree-item-s>[slot=\"router-item\"]{height:var(--ic-space-xxl)}/*!@:host(.ic-tree-item-disabled)*/.ic-tree-item-disabled.sc-ic-tree-item-h{pointer-events:none}/*!@:host(.ic-tree-item-disabled) .tree-item-content,\n:host(.ic-tree-item-disabled) .arrow-dropdown,\n:host(.ic-tree-item-disabled) ::slotted([slot=\"icon\"]),\n:host(.ic-tree-item-disabled) ::slotted([slot=\"router-item\"])*/.ic-tree-item-disabled.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.ic-tree-item-disabled.sc-ic-tree-item-h .arrow-dropdown.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-disabled.sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-disabled .sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-disabled.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-disabled .sc-ic-tree-item-s>[slot=\"router-item\"]{color:var(--ic-architectural-200) !important;fill:var(--ic-architectural-200);pointer-events:none}/*!@:host(.ic-tree-item-light) .tree-item-content,\n:host(.ic-tree-item-light) .arrow-dropdown,\n:host(.ic-tree-item-light) ::slotted([slot=\"icon\"]),\n:host(.ic-tree-item-light) ::slotted([slot=\"router-item\"])*/.ic-tree-item-light.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.ic-tree-item-light.sc-ic-tree-item-h .arrow-dropdown.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-light.sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-light .sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-light.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-light .sc-ic-tree-item-s>[slot=\"router-item\"]{color:var(--ic-architectural-white);fill:var(--ic-architectural-white)}/*!@:host .arrow-dropdown*/.sc-ic-tree-item-h .arrow-dropdown.sc-ic-tree-item{color:var(--ic-action-default);margin-right:var(--ic-space-xs)}/*!@:host(.ic-tree-item-small) .arrow-dropdown*/.ic-tree-item-small.sc-ic-tree-item-h .arrow-dropdown.sc-ic-tree-item{margin-right:var(--ic-space-xxs)}/*!@:host .tree-item-expanded*/.sc-ic-tree-item-h .tree-item-expanded.sc-ic-tree-item{transform:rotate(180deg);margin-top:calc(-1 * var(--ic-space-xxs))}/*!@:host .ic-tree-item-single*/.sc-ic-tree-item-h .ic-tree-item-single.sc-ic-tree-item{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xs))}/*!@:host(.ic-tree-item-small) .ic-tree-item-single*/.ic-tree-item-small.sc-ic-tree-item-h .ic-tree-item-single.sc-ic-tree-item{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xxs))}/*!@.icon-container*/.icon-container.sc-ic-tree-item{width:var(--ic-space-lg);height:var(--ic-space-lg);margin:0 var(--ic-space-xs) 0 0}/*!@:host(.ic-tree-item-small) .icon-container*/.ic-tree-item-small.sc-ic-tree-item-h .icon-container.sc-ic-tree-item{margin:0 var(--ic-space-xxs) 0 0}/*!@.ic-text-overflow*/.ic-text-overflow.sc-ic-tree-item{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}/*!@.ic-tooltip-overflow*/.ic-tooltip-overflow.sc-ic-tree-item{overflow:hidden}@media (forced-colors: active){/*!@::slotted([slot=\"icon\"])*/.sc-ic-tree-item-s>[slot=\"icon\"]{fill:currentcolor}/*!@:host(.ic-tree-item-disabled) .tree-item-content,\n :host(.ic-tree-item-disabled) .arrow-dropdown,\n :host(.ic-tree-item-disabled) ::slotted([slot=\"icon\"]),\n :host(.ic-tree-item-disabled) ::slotted([slot=\"router-item\"])*/.ic-tree-item-disabled.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.ic-tree-item-disabled.sc-ic-tree-item-h .arrow-dropdown.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-disabled.sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-disabled .sc-ic-tree-item-s>[slot=\"icon\"],.sc-ic-tree-item-h.ic-tree-item-disabled.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-disabled .sc-ic-tree-item-s>[slot=\"router-item\"]{color:GrayText !important;fill:GrayText !important}/*!@:host .tree-item-content:focus,\n ::slotted([slot=\"router-item\"]:focus)*/.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item:focus,.sc-ic-tree-item-s>[slot=\"router-item\"]:focus{border:var(--ic-hc-border) !important}/*!@:host(.ic-tree-item-selected) .tree-item-content,\n :host(.ic-tree-item-selected) ::slotted([slot=\"router-item\"])*/.ic-tree-item-selected.sc-ic-tree-item-h .tree-item-content.sc-ic-tree-item,.sc-ic-tree-item-h.ic-tree-item-selected.sc-ic-tree-item-s>[slot=\"router-item\"],.sc-ic-tree-item-h.ic-tree-item-selected .sc-ic-tree-item-s>[slot=\"router-item\"]{color:Highlight !important}}";
|
28238
|
+
|
28239
|
+
let treeItemIds = 0;
|
28240
|
+
/**
|
28241
|
+
* @slot label - Content is set as the tree item label.
|
28242
|
+
* @slot icon - Content is placed to the left of the label.
|
28243
|
+
* @slot router-item - Handle routing by nesting your routes in this slot.
|
28244
|
+
*/
|
28245
|
+
class TreeItem {
|
28246
|
+
constructor(hostRef) {
|
28247
|
+
registerInstance(this, hostRef);
|
28248
|
+
this.icTreeItemSelected = createEvent(this, "icTreeItemSelected", 7);
|
28249
|
+
this.treeItemId = `ic-tree-item-${treeItemIds++}`;
|
28250
|
+
this.treeItemTag = "IC-TREE-ITEM";
|
28251
|
+
this.hostMutationObserver = null;
|
28252
|
+
this.TOOLTIP = "ic-tooltip";
|
28253
|
+
this.handleTreeItemClicked = () => {
|
28254
|
+
if (this.isParent) {
|
28255
|
+
this.expanded = !this.expanded;
|
28256
|
+
this.hasParentExpanded = true;
|
28257
|
+
}
|
28258
|
+
this.updateAriaLabel();
|
28259
|
+
this.selected = true;
|
28260
|
+
this.watchSelectedHandler();
|
28261
|
+
};
|
28262
|
+
this.setTreeItemPadding = () => {
|
28263
|
+
let level = 1;
|
28264
|
+
let parentElement = this.el.parentElement;
|
28265
|
+
const treeItemContent = this.el.shadowRoot.querySelector(".tree-item-content");
|
28266
|
+
const isSiblingOfParent = Array.from(parentElement.children)
|
28267
|
+
.map((sibling) => {
|
28268
|
+
if (sibling !== this.el &&
|
28269
|
+
!sibling.querySelector('[slot="router-item"]') &&
|
28270
|
+
!sibling.querySelector('[slot="label"]')) {
|
28271
|
+
return sibling.children.length > 0;
|
28272
|
+
}
|
28273
|
+
else {
|
28274
|
+
return false;
|
28275
|
+
}
|
28276
|
+
})
|
28277
|
+
.includes(true);
|
28278
|
+
const isChild = parentElement.tagName === this.treeItemTag;
|
28279
|
+
const isRouterItem = this.hasRouterSlot();
|
28280
|
+
if ((isSiblingOfParent && !this.el.isParent) ||
|
28281
|
+
(isChild && !this.el.isParent)) {
|
28282
|
+
if (isRouterItem) {
|
28283
|
+
this.routerSlot.classList.add("ic-tree-item-single");
|
28284
|
+
}
|
28285
|
+
else {
|
28286
|
+
treeItemContent.classList.add("ic-tree-item-single");
|
28287
|
+
}
|
28288
|
+
}
|
28289
|
+
while (parentElement) {
|
28290
|
+
if (parentElement.tagName === this.treeItemTag) {
|
28291
|
+
level++;
|
28292
|
+
if (!this.el.isParent && isSiblingOfParent) {
|
28293
|
+
treeItemContent.style.paddingLeft = `calc(var(--ic-space-xl) + ${level * 16}px)`;
|
28294
|
+
}
|
28295
|
+
else if (!this.el.isParent) {
|
28296
|
+
treeItemContent.style.paddingLeft = `calc(var(--ic-space-xs) + ${level * 24}px`;
|
28297
|
+
}
|
28298
|
+
else {
|
28299
|
+
treeItemContent.style.paddingLeft = `${level * 16}px`;
|
28300
|
+
}
|
28301
|
+
}
|
28302
|
+
parentElement = parentElement.parentElement;
|
28303
|
+
}
|
28304
|
+
};
|
28305
|
+
this.truncateTreeItemLabel = (treeItem) => {
|
28306
|
+
const typographyEl = treeItem.shadowRoot.querySelector(".tree-item-label");
|
28307
|
+
const tooltip = typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.closest(this.TOOLTIP);
|
28308
|
+
const treeContent = treeItem.shadowRoot.querySelector(".tree-item-content");
|
28309
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (treeContent === null || treeContent === void 0 ? void 0 : treeContent.clientHeight)) {
|
28310
|
+
typographyEl.classList.add("ic-text-overflow");
|
28311
|
+
if (!tooltip) {
|
28312
|
+
const tooltipEl = document.createElement("ic-tooltip");
|
28313
|
+
tooltipEl.setAttribute("target", this.el.id);
|
28314
|
+
tooltipEl.setAttribute("label", typographyEl.textContent);
|
28315
|
+
tooltipEl.classList.add("ic-tooltip-overflow");
|
28316
|
+
tooltipEl.setAttribute("placement", "right");
|
28317
|
+
treeContent.appendChild(tooltipEl);
|
28318
|
+
tooltipEl.appendChild(typographyEl);
|
28319
|
+
}
|
28320
|
+
}
|
28321
|
+
};
|
28322
|
+
this.hostMutationCallback = (mutationList) => {
|
28323
|
+
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
28324
|
+
? checkSlotInChildMutations(addedNodes, removedNodes, "icon")
|
28325
|
+
: false)) ;
|
28326
|
+
};
|
28327
|
+
this.handleDisplayTooltip = (display) => {
|
28328
|
+
const typographyEl = this.el.shadowRoot.querySelector(".tree-item-label");
|
28329
|
+
const tooltip = typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.closest(this.TOOLTIP);
|
28330
|
+
tooltip === null || tooltip === void 0 ? void 0 : tooltip.displayTooltip(display);
|
28331
|
+
};
|
28332
|
+
this.childTreeItems = undefined;
|
28333
|
+
this.appearance = "dark";
|
28334
|
+
this.disabled = false;
|
28335
|
+
this.expanded = false;
|
28336
|
+
this.hasParentExpanded = false;
|
28337
|
+
this.href = undefined;
|
28338
|
+
this.hreflang = "";
|
28339
|
+
this.isParent = false;
|
28340
|
+
this.label = "";
|
28341
|
+
this.referrerpolicy = undefined;
|
28342
|
+
this.rel = undefined;
|
28343
|
+
this.selected = false;
|
28344
|
+
this.size = "default";
|
28345
|
+
this.target = undefined;
|
28346
|
+
}
|
28347
|
+
watchSelectedHandler() {
|
28348
|
+
if (this.selected) {
|
28349
|
+
this.icTreeItemSelected.emit({ id: this.el.id });
|
28350
|
+
}
|
28351
|
+
this.updateAriaLabel();
|
28352
|
+
}
|
28353
|
+
disconnectedCallback() {
|
28354
|
+
var _a;
|
28355
|
+
(_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
28356
|
+
}
|
28357
|
+
componentDidLoad() {
|
28358
|
+
this.childTreeItems = Array.from(this.el.children).filter((child) => child.tagName === this.treeItemTag);
|
28359
|
+
if (this.childTreeItems.length > 0) {
|
28360
|
+
this.isParent = true;
|
28361
|
+
}
|
28362
|
+
this.setTreeItemPadding();
|
28363
|
+
this.updateAriaLabel();
|
28364
|
+
this.truncateTreeItemLabel(this.el);
|
28365
|
+
!isSlotUsed(this.el, "label") &&
|
28366
|
+
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Tree item");
|
28367
|
+
this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
|
28368
|
+
this.hostMutationObserver.observe(this.el, {
|
28369
|
+
childList: true,
|
28370
|
+
});
|
28371
|
+
}
|
28372
|
+
componentDidUpdate() {
|
28373
|
+
if (this.hasParentExpanded) {
|
28374
|
+
this.childTreeItems.forEach((child) => {
|
28375
|
+
this.truncateTreeItemLabel(child);
|
28376
|
+
});
|
28377
|
+
this.hasParentExpanded = false;
|
28378
|
+
}
|
28379
|
+
}
|
28380
|
+
handleKeyDown(ev) {
|
28381
|
+
if (ev.key === "Enter" || ev.key === " ") {
|
28382
|
+
ev.stopImmediatePropagation();
|
28383
|
+
this.handleTreeItemClicked();
|
28384
|
+
}
|
28385
|
+
}
|
28386
|
+
/**
|
28387
|
+
* Sets focus on the native `input`.
|
28388
|
+
*/
|
28389
|
+
async setFocus() {
|
28390
|
+
var _a, _b;
|
28391
|
+
if (this.hasRouterSlot()) {
|
28392
|
+
(_a = this.routerSlot) === null || _a === void 0 ? void 0 : _a.focus();
|
28393
|
+
}
|
28394
|
+
else {
|
28395
|
+
(_b = this.treeItemElement) === null || _b === void 0 ? void 0 : _b.focus();
|
28396
|
+
}
|
28397
|
+
}
|
28398
|
+
/**
|
28399
|
+
* @internal Updates the aria-label of the tree item.
|
28400
|
+
*/
|
28401
|
+
async updateAriaLabel() {
|
28402
|
+
let ariaLabel;
|
28403
|
+
if (this.hasRouterSlot()) {
|
28404
|
+
ariaLabel = this.routerSlot.textContent;
|
28405
|
+
}
|
28406
|
+
else if (isSlotUsed(this.el, "label")) {
|
28407
|
+
ariaLabel = this.el.querySelector('[slot="label"]').textContent;
|
28408
|
+
}
|
28409
|
+
else {
|
28410
|
+
ariaLabel = this.label;
|
28411
|
+
}
|
28412
|
+
if (this.isParent) {
|
28413
|
+
ariaLabel = `${ariaLabel}, triggers submenu, ${this.expanded ? "expanded" : "collapsed"}`;
|
28414
|
+
}
|
28415
|
+
if (this.el.parentElement) {
|
28416
|
+
const treeItems = Array.from(this.el.parentElement.children).filter((child) => child.tagName === this.treeItemTag);
|
28417
|
+
const index = treeItems.indexOf(this.el) + 1;
|
28418
|
+
const parentChildren = treeItems.length;
|
28419
|
+
ariaLabel = `${ariaLabel}, ${index} of ${parentChildren}`;
|
28420
|
+
}
|
28421
|
+
if (this.selected) {
|
28422
|
+
ariaLabel = `${ariaLabel}, active`;
|
28423
|
+
}
|
28424
|
+
if (this.disabled) {
|
28425
|
+
ariaLabel = `${ariaLabel}, dimmed`;
|
28426
|
+
}
|
28427
|
+
if (this.hasRouterSlot()) {
|
28428
|
+
this.routerSlot.ariaLabel = ariaLabel;
|
28429
|
+
}
|
28430
|
+
else {
|
28431
|
+
this.treeItemElement.ariaLabel = ariaLabel;
|
28432
|
+
}
|
28433
|
+
}
|
28434
|
+
hasRouterSlot() {
|
28435
|
+
this.routerSlot = this.el.querySelector('[slot="router-item"]');
|
28436
|
+
return !!this.routerSlot;
|
28437
|
+
}
|
28438
|
+
render() {
|
28439
|
+
const { appearance, disabled, label, selected, size, expanded } = this;
|
28440
|
+
const Component = this.href && !this.disabled ? "a" : "div";
|
28441
|
+
const attrs = Component == "a" && {
|
28442
|
+
href: this.href,
|
28443
|
+
hrefLang: this.hreflang,
|
28444
|
+
referrerPolicy: this.referrerpolicy,
|
28445
|
+
rel: this.rel,
|
28446
|
+
target: this.target,
|
28447
|
+
};
|
28448
|
+
return (hAsync(Host, { class: {
|
28449
|
+
[`ic-tree-item-${appearance}`]: true,
|
28450
|
+
"ic-tree-item-disabled": disabled,
|
28451
|
+
"ic-tree-item-selected": !disabled && selected,
|
28452
|
+
[`ic-tree-item-${size}`]: size !== "default",
|
28453
|
+
}, id: this.treeItemId }, this.hasRouterSlot() ? (hAsync("slot", { name: "router-item" })) : (hAsync(Component, Object.assign({ class: {
|
28454
|
+
"tree-item-content": true,
|
28455
|
+
}, tabIndex: disabled ? -1 : 0, onClick: this.handleTreeItemClicked, ref: (el) => (this.treeItemElement = el), "aria-disabled": disabled ? "true" : "false", "aria-live": "polite" }, attrs, { onFocus: () => this.handleDisplayTooltip(true), onBlur: () => this.handleDisplayTooltip(false) }), this.isParent && (hAsync("span", { class: {
|
28456
|
+
["arrow-dropdown"]: true,
|
28457
|
+
["tree-item-expanded"]: expanded,
|
28458
|
+
}, "aria-hidden": "true", innerHTML: arrowDropdown })), isSlotUsed(this.el, "icon") && (hAsync("div", { class: "icon-container" }, hAsync("slot", { name: "icon" }))), hAsync("ic-typography", { class: "tree-item-label" }, isSlotUsed(this.el, "label") ? hAsync("slot", { name: "label" }) : label))), expanded && (hAsync("div", { "aria-hidden": `${!expanded}` }, hAsync("slot", null)))));
|
28459
|
+
}
|
28460
|
+
get el() { return getElement(this); }
|
28461
|
+
static get watchers() { return {
|
28462
|
+
"selected": ["watchSelectedHandler"]
|
28463
|
+
}; }
|
28464
|
+
static get style() { return icTreeItemCss; }
|
28465
|
+
static get cmpMeta() { return {
|
28466
|
+
"$flags$": 9,
|
28467
|
+
"$tagName$": "ic-tree-item",
|
28468
|
+
"$members$": {
|
28469
|
+
"appearance": [1],
|
28470
|
+
"disabled": [4],
|
28471
|
+
"expanded": [1028],
|
28472
|
+
"hasParentExpanded": [1028, "has-parent-expanded"],
|
28473
|
+
"href": [1],
|
28474
|
+
"hreflang": [1],
|
28475
|
+
"isParent": [1028, "is-parent"],
|
28476
|
+
"label": [1],
|
28477
|
+
"referrerpolicy": [1],
|
28478
|
+
"rel": [1],
|
28479
|
+
"selected": [1028],
|
28480
|
+
"size": [1],
|
28481
|
+
"target": [1],
|
28482
|
+
"childTreeItems": [32],
|
28483
|
+
"setFocus": [64],
|
28484
|
+
"updateAriaLabel": [64]
|
28485
|
+
},
|
28486
|
+
"$listeners$": [[0, "keydown", "handleKeyDown"]],
|
28487
|
+
"$lazyBundleId$": "-",
|
28488
|
+
"$attrsToReflect$": []
|
28489
|
+
}; }
|
28490
|
+
}
|
28491
|
+
|
28492
|
+
const icTreeViewCss = "/*!@:host*/.sc-ic-tree-view-h{display:block;width:var(--tree-view-width, 100%)}/*!@:host .heading-area-container*/.sc-ic-tree-view-h .heading-area-container.sc-ic-tree-view{border-bottom:var(--ic-border-default);display:flex;align-items:center;height:calc(var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px));padding:0 var(--ic-space-xs)}/*!@:host(.ic-tree-view-small) .heading-area-container*/.ic-tree-view-small.sc-ic-tree-view-h .heading-area-container.sc-ic-tree-view{height:calc(var(--ic-space-xl) - var(--ic-space-1px))}/*!@:host(.ic-tree-view-large) .heading-area-container*/.ic-tree-view-large.sc-ic-tree-view-h .heading-area-container.sc-ic-tree-view{height:calc(var(--ic-space-xxl) - var(--ic-space-1px))}/*!@:host(.ic-tree-view-light) .heading-area-container*/.ic-tree-view-light.sc-ic-tree-view-h .heading-area-container.sc-ic-tree-view{color:var(--ic-architectural-white);fill:var(--ic-architectural-white)}/*!@.icon-container*/.icon-container.sc-ic-tree-view{width:var(--ic-space-lg);height:var(--ic-space-lg);margin:0 var(--ic-space-xs) 0 0}/*!@:host(.ic-tree-view-small) .icon-container*/.ic-tree-view-small.sc-ic-tree-view-h .icon-container.sc-ic-tree-view{margin:0 var(--ic-space-xxs) 0 0}/*!@.ic-text-overflow*/.ic-text-overflow.sc-ic-tree-view{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}/*!@.ic-tooltip-overflow*/.ic-tooltip-overflow.sc-ic-tree-view{overflow:hidden}@media (forced-colors: active){/*!@::slotted([slot=\"icon\"])*/.sc-ic-tree-view-s>[slot=\"icon\"]{fill:currentcolor}}";
|
28493
|
+
|
28494
|
+
let treeViewIds = 0;
|
28495
|
+
/**
|
28496
|
+
* @slot heading - Content is set as the tree view heading.
|
28497
|
+
* @slot icon - Content is placed to the left of the heading.
|
28498
|
+
*/
|
28499
|
+
class TreeView {
|
28500
|
+
constructor(hostRef) {
|
28501
|
+
registerInstance(this, hostRef);
|
28502
|
+
this.treeViewId = `ic-tree-view-${treeViewIds++}`;
|
28503
|
+
this.treeItemTag = "IC-TREE-ITEM";
|
28504
|
+
this.hostMutationObserver = null;
|
28505
|
+
this.handleKeyDown = (event) => {
|
28506
|
+
var _a;
|
28507
|
+
const focussedChild = this.treeItems.indexOf(this.treeItems.filter((el) => el === document.activeElement)[0]);
|
28508
|
+
const expanded = (_a = this.treeItems[focussedChild]) === null || _a === void 0 ? void 0 : _a.expanded;
|
28509
|
+
switch (event.key) {
|
28510
|
+
case "ArrowDown":
|
28511
|
+
this.treeItems[this.getNextItemToSelect(focussedChild, true)].setFocus();
|
28512
|
+
if (focussedChild !== this.treeItems.length - 1) {
|
28513
|
+
event.preventDefault();
|
28514
|
+
}
|
28515
|
+
break;
|
28516
|
+
case "ArrowUp":
|
28517
|
+
this.treeItems[this.getNextItemToSelect(focussedChild, false)].setFocus();
|
28518
|
+
if (focussedChild !== 0) {
|
28519
|
+
event.preventDefault();
|
28520
|
+
}
|
28521
|
+
break;
|
28522
|
+
case "ArrowRight":
|
28523
|
+
if (this.treeItems[focussedChild].isParent && !expanded) {
|
28524
|
+
this.treeItems[focussedChild].expanded = true;
|
28525
|
+
this.treeItems[focussedChild].hasParentExpanded = true;
|
28526
|
+
this.treeItems[focussedChild].updateAriaLabel();
|
28527
|
+
}
|
28528
|
+
else if (this.treeItems[focussedChild].isParent && expanded) {
|
28529
|
+
this.treeItems[focussedChild].children[0].setFocus();
|
28530
|
+
}
|
28531
|
+
event.preventDefault();
|
28532
|
+
break;
|
28533
|
+
case "ArrowLeft":
|
28534
|
+
if (this.treeItems[focussedChild].isParent && expanded) {
|
28535
|
+
this.treeItems[focussedChild].expanded = false;
|
28536
|
+
this.treeItems[focussedChild].hasParentExpanded = false;
|
28537
|
+
this.treeItems[focussedChild].updateAriaLabel();
|
28538
|
+
}
|
28539
|
+
else if (this.treeItems[focussedChild].parentElement.tagName ===
|
28540
|
+
this.treeItemTag) {
|
28541
|
+
this.treeItems[focussedChild].parentElement.setFocus();
|
28542
|
+
}
|
28543
|
+
event.preventDefault();
|
28544
|
+
break;
|
28545
|
+
}
|
28546
|
+
};
|
28547
|
+
this.getNextItemToSelect = (currentItem, movingDown) => {
|
28548
|
+
const numItems = this.treeItems.length - 1;
|
28549
|
+
if (currentItem < 1) {
|
28550
|
+
currentItem = 0;
|
28551
|
+
}
|
28552
|
+
let nextItem = movingDown ? currentItem + 1 : currentItem - 1;
|
28553
|
+
if (nextItem < 0) {
|
28554
|
+
nextItem = 0;
|
28555
|
+
}
|
28556
|
+
else if (nextItem > numItems) {
|
28557
|
+
nextItem = numItems;
|
28558
|
+
}
|
28559
|
+
const maxAttempts = numItems + 1;
|
28560
|
+
let attempts = 0;
|
28561
|
+
while (attempts < maxAttempts) {
|
28562
|
+
if (nextItem < 0 || nextItem > numItems) {
|
28563
|
+
return currentItem;
|
28564
|
+
}
|
28565
|
+
if (!this.treeItems[nextItem].disabled &&
|
28566
|
+
(this.treeItems[nextItem].parentElement.tagName !== this.treeItemTag ||
|
28567
|
+
this.treeItems[nextItem].parentElement
|
28568
|
+
.expanded)) {
|
28569
|
+
return nextItem;
|
28570
|
+
}
|
28571
|
+
if (nextItem === numItems && this.treeItems[nextItem].disabled) {
|
28572
|
+
return currentItem;
|
28573
|
+
}
|
28574
|
+
nextItem = movingDown ? nextItem + 1 : nextItem - 1;
|
28575
|
+
attempts++;
|
28576
|
+
}
|
28577
|
+
return currentItem;
|
28578
|
+
};
|
28579
|
+
this.linkTreeItems = () => {
|
28580
|
+
this.treeItems.forEach((treeItem) => {
|
28581
|
+
treeItem.setAttribute("context-id", this.treeViewId);
|
28582
|
+
});
|
28583
|
+
};
|
28584
|
+
this.setTreeItems = () => {
|
28585
|
+
this.treeItems = this.getAllTreeItems(this.el);
|
28586
|
+
this.linkTreeItems();
|
28587
|
+
};
|
28588
|
+
this.addSlotChangeListener = () => {
|
28589
|
+
this.el.addEventListener("slotchange", this.setTreeItems);
|
28590
|
+
};
|
28591
|
+
this.truncateTreeViewHeading = () => {
|
28592
|
+
const typographyEl = this.el.shadowRoot.querySelector(".tree-view-header");
|
28593
|
+
const tooltip = typographyEl.closest("ic-tooltip");
|
28594
|
+
const headingContainer = this.el.shadowRoot.querySelector(".heading-area-container");
|
28595
|
+
if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (headingContainer === null || headingContainer === void 0 ? void 0 : headingContainer.clientHeight)) {
|
28596
|
+
typographyEl.classList.add("ic-text-overflow");
|
28597
|
+
if (!tooltip) {
|
28598
|
+
const tooltipEl = document.createElement("ic-tooltip");
|
28599
|
+
tooltipEl.setAttribute("target", this.el.id);
|
28600
|
+
tooltipEl.setAttribute("label", typographyEl.textContent);
|
28601
|
+
tooltipEl.classList.add("ic-tooltip-overflow");
|
28602
|
+
tooltipEl.setAttribute("placement", "right");
|
28603
|
+
headingContainer.appendChild(tooltipEl);
|
28604
|
+
tooltipEl.appendChild(typographyEl);
|
28605
|
+
}
|
28606
|
+
}
|
28607
|
+
};
|
28608
|
+
this.hostMutationCallback = (mutationList) => {
|
28609
|
+
if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
|
28610
|
+
? checkSlotInChildMutations(addedNodes, removedNodes, "icon")
|
28611
|
+
: false)) ;
|
28612
|
+
};
|
28613
|
+
this.isHeadingDefined = () => isPropDefined(this.heading) && this.heading !== null;
|
28614
|
+
this.hasHeadingAreaContent = () => {
|
28615
|
+
return (isSlotUsed(this.el, "heading") ||
|
28616
|
+
this.isHeadingDefined() ||
|
28617
|
+
isSlotUsed(this.el, "icon"));
|
28618
|
+
};
|
28619
|
+
this.treeItems = undefined;
|
28620
|
+
this.appearance = "dark";
|
28621
|
+
this.heading = "";
|
28622
|
+
this.size = "default";
|
28623
|
+
}
|
28624
|
+
watchAppearanceHandler() {
|
28625
|
+
this.treeItems.forEach((treeItem) => {
|
28626
|
+
treeItem.appearance = this.appearance;
|
28627
|
+
});
|
28628
|
+
}
|
28629
|
+
watchSizeHandler() {
|
28630
|
+
this.treeItems.forEach((treeItem) => {
|
28631
|
+
treeItem.size = this.size;
|
28632
|
+
});
|
28633
|
+
}
|
28634
|
+
disconnectedCallback() {
|
28635
|
+
var _a, _b;
|
28636
|
+
(_a = this.el) === null || _a === void 0 ? void 0 : _a.removeEventListener("slotchange", this.setTreeItems);
|
28637
|
+
(_b = this.hostMutationObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
28638
|
+
}
|
28639
|
+
componentDidLoad() {
|
28640
|
+
this.setTreeItems();
|
28641
|
+
this.watchAppearanceHandler();
|
28642
|
+
this.watchSizeHandler();
|
28643
|
+
setTimeout(() => {
|
28644
|
+
this.truncateTreeViewHeading();
|
28645
|
+
}, 100);
|
28646
|
+
this.addSlotChangeListener();
|
28647
|
+
this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
|
28648
|
+
this.hostMutationObserver.observe(this.el, {
|
28649
|
+
childList: true,
|
28650
|
+
});
|
28651
|
+
}
|
28652
|
+
handleTreeItemSelected(event) {
|
28653
|
+
this.treeItems.forEach((treeItem) => {
|
28654
|
+
if (treeItem.selected && treeItem.id !== event.detail.id) {
|
28655
|
+
treeItem.selected = false;
|
28656
|
+
}
|
28657
|
+
});
|
28658
|
+
}
|
28659
|
+
getAllTreeItems(element) {
|
28660
|
+
const treeItems = [];
|
28661
|
+
const collectTreeItems = (el) => {
|
28662
|
+
Array.from(el.children).forEach((child) => {
|
28663
|
+
if (child.tagName === this.treeItemTag) {
|
28664
|
+
treeItems.push(child);
|
28665
|
+
}
|
28666
|
+
collectTreeItems(child);
|
28667
|
+
});
|
28668
|
+
};
|
28669
|
+
collectTreeItems(element);
|
28670
|
+
return treeItems;
|
28671
|
+
}
|
28672
|
+
render() {
|
28673
|
+
const { appearance, heading, size } = this;
|
28674
|
+
return (hAsync(Host, { "context-id": this.treeViewId, class: {
|
28675
|
+
[`ic-tree-view-${appearance}`]: true,
|
28676
|
+
[`ic-tree-view-${size}`]: size !== "default",
|
28677
|
+
}, onKeyDown: this.handleKeyDown, "aria-label": this.isHeadingDefined() ? heading : null }, this.hasHeadingAreaContent() && (hAsync("div", { class: "heading-area-container" }, isSlotUsed(this.el, "icon") && (hAsync("div", { class: "icon-container" }, hAsync("slot", { name: "icon" }))), hAsync("ic-typography", { variant: "subtitle-large", class: "tree-view-header" }, isSlotUsed(this.el, "heading") ? (hAsync("slot", { name: "heading" })) : (heading)))), hAsync("slot", null)));
|
28678
|
+
}
|
28679
|
+
get el() { return getElement(this); }
|
28680
|
+
static get watchers() { return {
|
28681
|
+
"appearance": ["watchAppearanceHandler"],
|
28682
|
+
"size": ["watchSizeHandler"]
|
28683
|
+
}; }
|
28684
|
+
static get style() { return icTreeViewCss; }
|
28685
|
+
static get cmpMeta() { return {
|
28686
|
+
"$flags$": 9,
|
28687
|
+
"$tagName$": "ic-tree-view",
|
28688
|
+
"$members$": {
|
28689
|
+
"appearance": [1],
|
28690
|
+
"heading": [1],
|
28691
|
+
"size": [1],
|
28692
|
+
"treeItems": [32]
|
28693
|
+
},
|
28694
|
+
"$listeners$": [[0, "icTreeItemSelected", "handleTreeItemSelected"]],
|
28695
|
+
"$lazyBundleId$": "-",
|
28696
|
+
"$attrsToReflect$": []
|
28697
|
+
}; }
|
28698
|
+
}
|
28699
|
+
|
28700
|
+
const icTypographyCss = "/*!@html*/html.sc-ic-typography{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-typography{margin:0}/*!@main*/main.sc-ic-typography{display:block}/*!@h1*/h1.sc-ic-typography{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-typography{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-typography{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-typography{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-typography{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-typography,strong.sc-ic-typography{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-typography,kbd.sc-ic-typography,samp.sc-ic-typography{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-typography{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-typography,sup.sc-ic-typography{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-typography{bottom:-0.25em}/*!@sup*/sup.sc-ic-typography{top:-0.5em}/*!@img*/img.sc-ic-typography{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-typography,input.sc-ic-typography,optgroup.sc-ic-typography,select.sc-ic-typography,textarea.sc-ic-typography{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-typography,input.sc-ic-typography{overflow:visible}/*!@button,\nselect*/button.sc-ic-typography,select.sc-ic-typography{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-typography,[type=\"button\"].sc-ic-typography,[type=\"reset\"].sc-ic-typography,[type=\"submit\"].sc-ic-typography{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-typography::-moz-focus-inner,[type=\"button\"].sc-ic-typography::-moz-focus-inner,[type=\"reset\"].sc-ic-typography::-moz-focus-inner,[type=\"submit\"].sc-ic-typography::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-typography:-moz-focusring,[type=\"button\"].sc-ic-typography:-moz-focusring,[type=\"reset\"].sc-ic-typography:-moz-focusring,[type=\"submit\"].sc-ic-typography:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-typography{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-typography{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-typography{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-typography{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-typography,[type=\"radio\"].sc-ic-typography{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-typography::-webkit-inner-spin-button,[type=\"number\"].sc-ic-typography::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-typography{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-typography::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-typography::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-typography{display:block}/*!@summary*/summary.sc-ic-typography{display:list-item}/*!@template*/template.sc-ic-typography{display:none}/*!@[hidden]*/[hidden].sc-ic-typography{display:none}/*!@html,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo*/html.sc-ic-typography,body.sc-ic-typography,div.sc-ic-typography,span.sc-ic-typography,applet.sc-ic-typography,object.sc-ic-typography,iframe.sc-ic-typography,h1.sc-ic-typography,h2.sc-ic-typography,h3.sc-ic-typography,h4.sc-ic-typography,h5.sc-ic-typography,h6.sc-ic-typography,p.sc-ic-typography,blockquote.sc-ic-typography,pre.sc-ic-typography,a.sc-ic-typography,abbr.sc-ic-typography,acronym.sc-ic-typography,address.sc-ic-typography,big.sc-ic-typography,cite.sc-ic-typography,code.sc-ic-typography,del.sc-ic-typography,dfn.sc-ic-typography,em.sc-ic-typography,img.sc-ic-typography,ins.sc-ic-typography,kbd.sc-ic-typography,q.sc-ic-typography,s.sc-ic-typography,samp.sc-ic-typography,small.sc-ic-typography,strike.sc-ic-typography,strong.sc-ic-typography,sub.sc-ic-typography,sup.sc-ic-typography,tt.sc-ic-typography,var.sc-ic-typography,b.sc-ic-typography,u.sc-ic-typography,i.sc-ic-typography,center.sc-ic-typography,dl.sc-ic-typography,dt.sc-ic-typography,dd.sc-ic-typography,ol.sc-ic-typography,ul.sc-ic-typography,li.sc-ic-typography,fieldset.sc-ic-typography,form.sc-ic-typography,label.sc-ic-typography,legend.sc-ic-typography,table.sc-ic-typography,caption.sc-ic-typography,tbody.sc-ic-typography,tfoot.sc-ic-typography,thead.sc-ic-typography,tr.sc-ic-typography,th.sc-ic-typography,td.sc-ic-typography,article.sc-ic-typography,aside.sc-ic-typography,canvas.sc-ic-typography,details.sc-ic-typography,embed.sc-ic-typography,figure.sc-ic-typography,figcaption.sc-ic-typography,footer.sc-ic-typography,header.sc-ic-typography,hgroup.sc-ic-typography,menu.sc-ic-typography,nav.sc-ic-typography,output.sc-ic-typography,ruby.sc-ic-typography,section.sc-ic-typography,summary.sc-ic-typography,time.sc-ic-typography,mark.sc-ic-typography,audio.sc-ic-typography,video.sc-ic-typography{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-typography-h{display:block;position:relative}/*!@:host(.ic-typography-vertical-margins-h1)*/.ic-typography-vertical-margins-h1.sc-ic-typography-h{margin:0 0 var(--ic-space-xl)}/*!@:host(.ic-typography-vertical-margins-h2)*/.ic-typography-vertical-margins-h2.sc-ic-typography-h{margin:var(--ic-space-xxl) 0 var(--ic-space-lg)}/*!@:host(.ic-typography-vertical-margins-h3)*/.ic-typography-vertical-margins-h3.sc-ic-typography-h{margin:var(--ic-space-xl) 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-h4)*/.ic-typography-vertical-margins-h4.sc-ic-typography-h{margin:var(--ic-space-lg) 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-subtitle-large),\n:host(.ic-typography-vertical-margins-subtitle-small),\n:host(.ic-typography-vertical-margins-body),\n:host(.ic-typography-vertical-margins-code-large),\n:host(.ic-typography-vertical-margins-code-small),\n:host(.ic-typography-vertical-margins-code-extra-small)*/.ic-typography-vertical-margins-subtitle-large.sc-ic-typography-h,.ic-typography-vertical-margins-subtitle-small.sc-ic-typography-h,.ic-typography-vertical-margins-body.sc-ic-typography-h,.ic-typography-vertical-margins-code-large.sc-ic-typography-h,.ic-typography-vertical-margins-code-small.sc-ic-typography-h,.ic-typography-vertical-margins-code-extra-small.sc-ic-typography-h{margin:0 0 var(--ic-space-md)}/*!@:host(.ic-typography-vertical-margins-caption),\n:host(.ic-typography-vertical-margins-caption-uppercase)*/.ic-typography-vertical-margins-caption.sc-ic-typography-h,.ic-typography-vertical-margins-caption-uppercase.sc-ic-typography-h{margin:0 0 var(--ic-space-xs)}/*!@:host(.ic-typography-vertical-margins-h2:first-child),\n:host(.ic-typography-vertical-margins-h3:first-child),\n:host(.ic-typography-vertical-margins-h4:first-child)*/.ic-typography-vertical-margins-h2.sc-ic-typography-h:first-child,.ic-typography-vertical-margins-h3.sc-ic-typography-h:first-child,.ic-typography-vertical-margins-h4.sc-ic-typography-h:first-child{margin-top:0}/*!@:host(.ic-typography-h1)*/.ic-typography-h1.sc-ic-typography-h{font:var(--ic-font-h1) !important}/*!@:host(.ic-typography-h2)*/.ic-typography-h2.sc-ic-typography-h{font:var(--ic-font-h2);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-h3)*/.ic-typography-h3.sc-ic-typography-h{font:var(--ic-font-h3)}/*!@:host(.ic-typography-h4)*/.ic-typography-h4.sc-ic-typography-h{font:var(--ic-font-h4);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-subtitle-large)*/.ic-typography-subtitle-large.sc-ic-typography-h{font:var(--ic-font-subtitle-large);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-subtitle-small)*/.ic-typography-subtitle-small.sc-ic-typography-h{font:var(--ic-font-subtitle-small);letter-spacing:var(--ic-font-letter-spacing-0pt0015)}/*!@:host(.ic-typography-body)*/.ic-typography-body.sc-ic-typography-h{font:var(--ic-font-body);letter-spacing:var(--ic-font-letter-spacing-0pt005)}/*!@:host(.ic-typography-caption)*/.ic-typography-caption.sc-ic-typography-h{font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-caption-uppercase)*/.ic-typography-caption-uppercase.sc-ic-typography-h{font:var(--ic-font-caption);letter-spacing:var(--ic-font-letter-spacing-0pt0025);text-transform:uppercase}/*!@:host(.ic-typography-label)*/.ic-typography-label.sc-ic-typography-h{font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-label-uppercase)*/.ic-typography-label-uppercase.sc-ic-typography-h{font:var(--ic-font-label);letter-spacing:var(--ic-font-letter-spacing-0pt025);text-transform:uppercase}/*!@:host(.ic-typography-code-large)*/.ic-typography-code-large.sc-ic-typography-h{font:var(--ic-font-code-large);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-code-small)*/.ic-typography-code-small.sc-ic-typography-h{font:var(--ic-font-code-small);letter-spacing:var(--ic-font-letter-spacing-0pt005)}/*!@:host(.ic-typography-code-extra-small)*/.ic-typography-code-extra-small.sc-ic-typography-h{font:var(--ic-font-code-extra-small);letter-spacing:var(--ic-font-letter-spacing-0pt025)}/*!@:host(.ic-typography-badge)*/.ic-typography-badge.sc-ic-typography-h{font:var(--ic-font-badge);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-badge-small)*/.ic-typography-badge-small.sc-ic-typography-h{font:var(--ic-font-badge-small);letter-spacing:var(--ic-font-letter-spacing-0pt0025)}/*!@:host(.ic-typography-no-wrap)*/.ic-typography-no-wrap.sc-ic-typography-h{white-space:nowrap}/*!@:host ::slotted(h1),\n:host ::slotted(h2),\n:host ::slotted(h3),\n:host ::slotted(h4),\n:host ::slotted(h5),\n:host ::slotted(h6),\n:host ::slotted(p),\n:host ::slotted(label)*/.sc-ic-typography-h .sc-ic-typography-s>h1,.sc-ic-typography-h.sc-ic-typography-s>h2,.sc-ic-typography-h .sc-ic-typography-s>h2,.sc-ic-typography-h.sc-ic-typography-s>h3,.sc-ic-typography-h .sc-ic-typography-s>h3,.sc-ic-typography-h.sc-ic-typography-s>h4,.sc-ic-typography-h .sc-ic-typography-s>h4,.sc-ic-typography-h.sc-ic-typography-s>h5,.sc-ic-typography-h .sc-ic-typography-s>h5,.sc-ic-typography-h.sc-ic-typography-s>h6,.sc-ic-typography-h .sc-ic-typography-s>h6,.sc-ic-typography-h.sc-ic-typography-s>p,.sc-ic-typography-h .sc-ic-typography-s>p,.sc-ic-typography-h.sc-ic-typography-s>label,.sc-ic-typography-h .sc-ic-typography-s>label{font:inherit;letter-spacing:inherit}/*!@.trunc-wrapper*/.trunc-wrapper.sc-ic-typography{display:-webkit-box;-webkit-box-orient:vertical;line-clamp:var(--truncation-max-lines, initial);-webkit-line-clamp:var(--truncation-max-lines, initial);overflow:hidden;padding-right:var(--ellipsis-padding-right, 0)}/*!@.trunc-btn*/.trunc-btn.sc-ic-typography{border:none;background:none;padding:0;color:var(--ic-color-primary-text);text-decoration:underline;font-weight:var(--ic-font-weight-bold);transition:var(--ic-easing-transition-fast)}/*!@.trunc-btn:hover,\n.trunc-btn.focus*/.trunc-btn.sc-ic-typography:hover,.trunc-btn.focus.sc-ic-typography{outline:none;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none;cursor:pointer}/*!@:host(.strikethrough)*/.strikethrough.sc-ic-typography-h{text-decoration:line-through}/*!@:host(.underline)*/.underline.sc-ic-typography-h{text-decoration:underline}/*!@:host(.underline.strikethrough)*/.underline.strikethrough.sc-ic-typography-h{text-decoration:line-through underline}/*!@:host(.italic)*/.italic.sc-ic-typography-h{font-style:italic !important}/*!@:host(.bold)*/.bold.sc-ic-typography-h{font-weight:var(--ic-font-weight-bold)}/*!@:host(.in-ag-grid),\n:host(.in-ag-grid) ::slotted(*)*/.in-ag-grid.sc-ic-typography-h,.sc-ic-typography-h.in-ag-grid.sc-ic-typography-s>*,.sc-ic-typography-h.in-ag-grid .sc-ic-typography-s>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@supports (text-underline-offset: 25%){/*!@.trunc-btn:hover,\n .trunc-btn.focus*/.trunc-btn.sc-ic-typography:hover,.trunc-btn.focus.sc-ic-typography{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";
|
27727
28701
|
|
27728
28702
|
class Typography {
|
27729
28703
|
constructor(hostRef) {
|
27730
28704
|
registerInstance(this, hostRef);
|
28705
|
+
this.typographyTruncationExpandToggle = createEvent(this, "typographyTruncationExpandToggle", 7);
|
27731
28706
|
this.focusBtnFromKeyboard = true;
|
28707
|
+
this.inAGGrid = false;
|
27732
28708
|
this.lastMarkerTop = 0;
|
27733
28709
|
this.lastWidth = 0;
|
27734
28710
|
this.resizeObserver = null;
|
27735
28711
|
this.truncatedHeight = 0;
|
27736
|
-
this.toggleExpanded = () => {
|
28712
|
+
this.toggleExpanded = (ev) => {
|
28713
|
+
ev.stopPropagation();
|
27737
28714
|
this.expanded = !this.expanded;
|
27738
|
-
|
27739
|
-
|
27740
|
-
|
27741
|
-
|
27742
|
-
if (numLines > this.maxLines) {
|
27743
|
-
this.el.setAttribute("style", `--truncation-max-lines: ${this.maxLines}`);
|
27744
|
-
this.truncatedHeight = this.el.clientHeight;
|
27745
|
-
this.truncated = true;
|
27746
|
-
}
|
28715
|
+
this.typographyTruncationExpandToggle.emit({
|
28716
|
+
expanded: this.expanded,
|
28717
|
+
typographyEl: this.el,
|
28718
|
+
});
|
27747
28719
|
};
|
27748
28720
|
this.checkMarkerPosition = (elTop, markerTop) => {
|
27749
28721
|
if (markerTop - elTop < this.truncatedHeight) {
|
@@ -27811,6 +28783,18 @@ class Typography {
|
|
27811
28783
|
this.resizeObserver.disconnect();
|
27812
28784
|
}
|
27813
28785
|
}
|
28786
|
+
/**
|
28787
|
+
* @internal This is used by data table to remove all truncation in certain events
|
28788
|
+
*/
|
28789
|
+
async resetTruncation() {
|
28790
|
+
if (this.truncated) {
|
28791
|
+
this.truncated = false;
|
28792
|
+
this.maxLines = 0;
|
28793
|
+
this.el.removeAttribute("max-lines");
|
28794
|
+
this.expanded = false;
|
28795
|
+
this.el.removeAttribute("style");
|
28796
|
+
}
|
28797
|
+
}
|
27814
28798
|
componentDidLoad() {
|
27815
28799
|
var _a, _b;
|
27816
28800
|
if ((this.variant === "body" ||
|
@@ -27826,6 +28810,30 @@ class Typography {
|
|
27826
28810
|
checkResizeObserver$1(this.runResizeObserver);
|
27827
28811
|
}
|
27828
28812
|
}
|
28813
|
+
componentWillRender() {
|
28814
|
+
if (isElInAGGrid(this.el)) {
|
28815
|
+
this.inAGGrid = true;
|
28816
|
+
}
|
28817
|
+
}
|
28818
|
+
/**
|
28819
|
+
* @internal This checks if the number of lines of text exceeds the maxLines prop. If so, set the line clamp CSS to the max lines
|
28820
|
+
* @param height - text container height
|
28821
|
+
*/
|
28822
|
+
async checkMaxLines(height) {
|
28823
|
+
//24 is the height of a single line
|
28824
|
+
const numLines = Math.floor(height / 24);
|
28825
|
+
if (numLines > this.maxLines) {
|
28826
|
+
this.el.setAttribute("style", `--truncation-max-lines: ${this.maxLines}`);
|
28827
|
+
this.truncatedHeight = this.el.clientHeight;
|
28828
|
+
this.truncated = true;
|
28829
|
+
}
|
28830
|
+
}
|
28831
|
+
/**
|
28832
|
+
* @internal This method makes it possible to set the expanded status of truncated text outside of ic-typography component
|
28833
|
+
*/
|
28834
|
+
async setShowHideExpanded(expanded) {
|
28835
|
+
this.expanded = expanded;
|
28836
|
+
}
|
27829
28837
|
render() {
|
27830
28838
|
var _a, _b;
|
27831
28839
|
const { variant, applyVerticalMargins, maxLines, truncated, expanded, strikethrough, underline, italic, bold, } = this;
|
@@ -27836,6 +28844,7 @@ class Typography {
|
|
27836
28844
|
["italic"]: italic,
|
27837
28845
|
["strikethrough"]: strikethrough,
|
27838
28846
|
["underline"]: underline,
|
28847
|
+
["in-ag-grid"]: this.inAGGrid,
|
27839
28848
|
} }, (variant === "body" ||
|
27840
28849
|
((_b = (_a = this.el.getRootNode()) === null || _a === void 0 ? void 0 : _a.host) === null || _b === void 0 ? void 0 : _b.tagName) ===
|
27841
28850
|
"IC-TOOLTIP") &&
|
@@ -27853,13 +28862,16 @@ class Typography {
|
|
27853
28862
|
"applyVerticalMargins": [4, "apply-vertical-margins"],
|
27854
28863
|
"bold": [4],
|
27855
28864
|
"italic": [4],
|
27856
|
-
"maxLines": [
|
28865
|
+
"maxLines": [1026, "max-lines"],
|
27857
28866
|
"strikethrough": [4],
|
27858
28867
|
"underline": [4],
|
27859
28868
|
"variant": [1],
|
27860
28869
|
"truncated": [32],
|
27861
28870
|
"truncButtonFocussed": [32],
|
27862
|
-
"expanded": [32]
|
28871
|
+
"expanded": [32],
|
28872
|
+
"resetTruncation": [64],
|
28873
|
+
"checkMaxLines": [64],
|
28874
|
+
"setShowHideExpanded": [64]
|
27863
28875
|
},
|
27864
28876
|
"$listeners$": undefined,
|
27865
28877
|
"$lazyBundleId$": "-",
|
@@ -27939,6 +28951,8 @@ registerComponents([
|
|
27939
28951
|
ToggleButtonGroup,
|
27940
28952
|
Tooltip,
|
27941
28953
|
TopNavigation,
|
28954
|
+
TreeItem,
|
28955
|
+
TreeView,
|
27942
28956
|
Typography,
|
27943
28957
|
]);
|
27944
28958
|
|