@ukic/canary-web-components 3.0.0-canary.2 → 3.0.0-canary.4
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-33b42cd6.js → helpers-36cdc6cb.js} +24 -1
- package/dist/cjs/helpers-36cdc6cb.js.map +1 -0
- package/dist/cjs/{helpers-6817cfbb.js → helpers-a67ad3a4.js} +15 -129
- package/dist/cjs/helpers-a67ad3a4.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +10 -10
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +5 -5
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +7 -5
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +2 -2
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +21 -26
- package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-vertical.cjs.entry.js +22 -24
- package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +17 -6
- package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +6 -4
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
- package/dist/cjs/ic-classification-banner.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 +86 -10
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +13 -11
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +4 -2
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +4 -2
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-divider.cjs.entry.js +71 -7
- package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +31 -16
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +2 -2
- package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +2 -2
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +4 -3
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1013 -0
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-input-label_2.cjs.entry.js +86 -0
- package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +3 -3
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +11 -11
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +5 -4
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +29 -2
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +5 -5
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +191 -62
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +11 -11
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +15 -6
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +31 -22
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +12 -9
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +4 -3
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +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 +7 -4
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +2 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +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 +3 -3
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +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 +10 -6
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +19 -11
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/index-4cf27b16.js +4 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -2
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +18 -21
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +44 -25
- package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +20 -0
- package/dist/collection/components/ic-data-table/ic-data-table.js +106 -10
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +7 -0
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +17 -0
- 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.css +8 -0
- package/dist/collection/components/ic-date-input/ic-date-input.js +29 -9
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.css +1 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +20 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +8 -7
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +87 -36
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.css +25 -21
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +51 -32
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.css +8 -9
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +51 -23
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/utils/helpers.js +1 -1
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers.js +22 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +14 -121
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-accordion-group.js +11 -11
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-accordion.js +5 -5
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert.js +8 -5
- package/dist/components/ic-alert.js.map +1 -1
- package/dist/components/ic-card-horizontal.js +22 -26
- package/dist/components/ic-card-horizontal.js.map +1 -1
- package/dist/components/ic-card-vertical.js +23 -24
- package/dist/components/ic-card-vertical.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +19 -6
- package/dist/components/ic-checkbox-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +6 -3
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-classification-banner.js +1 -1
- package/dist/components/ic-classification-banner.js.map +1 -1
- package/dist/components/ic-data-table.js +88 -10
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +14 -11
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +5 -2
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-dialog.js +4 -1
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +86 -9
- package/dist/components/ic-divider2.js.map +1 -1
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link-group.js.map +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer-link.js.map +1 -1
- package/dist/components/ic-footer.js +2 -2
- package/dist/components/ic-footer.js.map +1 -1
- package/dist/components/ic-hero.js +1 -1
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +4 -3
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +1 -1
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +10 -6
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-input-validation2.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +1 -1
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu-group.js +2 -2
- package/dist/components/ic-menu-group.js.map +1 -1
- package/dist/components/ic-menu-item2.js +11 -11
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +453 -169
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-group.js +5 -4
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +31 -3
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-page-header.js +4 -4
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +34 -17
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +10 -12
- package/dist/components/ic-pagination-item2.js.map +1 -1
- package/dist/components/ic-pagination2.js +38 -15
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +12 -11
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +17 -6
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-radio-option.js +32 -22
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +13 -9
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select2.js +148 -37
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +4 -3
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-switch.js +7 -3
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +2 -1
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-text-field2.js +2 -2
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +3 -3
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +1 -1
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/components/ic-tree-item.js +11 -6
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +24 -14
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/core/core.css +692 -10
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-00ff3a06.entry.js +2 -0
- package/dist/core/p-00ff3a06.entry.js.map +1 -0
- package/dist/core/{p-7e1603cc.entry.js → p-01ab3a15.entry.js} +2 -2
- package/dist/core/p-01ab3a15.entry.js.map +1 -0
- package/dist/core/{p-c033e7d6.entry.js → p-036d251b.entry.js} +2 -2
- package/dist/core/{p-9397b15b.js → p-043cf5de.js} +2 -2
- package/dist/core/p-043cf5de.js.map +1 -0
- package/dist/core/{p-d2e7a256.entry.js → p-13d2db9b.entry.js} +2 -2
- package/dist/core/p-1d24a02a.entry.js +2 -0
- package/dist/core/{p-7c80d79c.entry.js.map → p-1d24a02a.entry.js.map} +1 -1
- package/dist/core/p-235b461f.entry.js +2 -0
- package/dist/core/p-235b461f.entry.js.map +1 -0
- package/dist/core/{p-897b8d16.entry.js → p-24d03bbd.entry.js} +2 -2
- package/dist/core/{p-bb1252fa.entry.js → p-26613dbd.entry.js} +2 -2
- package/dist/core/p-2873f871.entry.js +2 -0
- package/dist/core/p-2873f871.entry.js.map +1 -0
- package/dist/core/{p-77a32de5.entry.js → p-2a3bd99a.entry.js} +2 -2
- package/dist/core/p-2f4bec06.entry.js +2 -0
- package/dist/core/p-2f4bec06.entry.js.map +1 -0
- package/dist/core/p-350074d4.entry.js +2 -0
- package/dist/core/p-350074d4.entry.js.map +1 -0
- package/dist/core/{p-5cfb5821.entry.js → p-39101ffc.entry.js} +2 -2
- package/dist/core/{p-5cfb5821.entry.js.map → p-39101ffc.entry.js.map} +1 -1
- package/dist/core/p-3b0fae40.entry.js +2 -0
- package/dist/core/p-3b0fae40.entry.js.map +1 -0
- package/dist/core/p-42f1b9cc.entry.js +2 -0
- package/dist/core/p-42f1b9cc.entry.js.map +1 -0
- package/dist/core/p-50dd2744.entry.js +2 -0
- package/dist/core/p-50dd2744.entry.js.map +1 -0
- package/dist/core/p-53228014.entry.js +2 -0
- package/dist/core/p-53228014.entry.js.map +1 -0
- package/dist/core/p-574355c9.entry.js +2 -0
- package/dist/core/p-574355c9.entry.js.map +1 -0
- package/dist/core/p-5af1273f.entry.js +2 -0
- package/dist/core/p-5af1273f.entry.js.map +1 -0
- package/dist/core/p-5eecd3fc.entry.js +2 -0
- package/dist/core/p-5eecd3fc.entry.js.map +1 -0
- package/dist/core/{p-4e28ef60.entry.js → p-606ad46f.entry.js} +2 -2
- package/dist/core/p-606ad46f.entry.js.map +1 -0
- package/dist/core/{p-4dcc37e7.entry.js → p-620b758c.entry.js} +2 -2
- package/dist/core/p-637035c3.entry.js +2 -0
- package/dist/core/p-637035c3.entry.js.map +1 -0
- package/dist/core/{p-6beffd0e.entry.js → p-6727166b.entry.js} +2 -2
- package/dist/core/{p-8ca2e329.entry.js → p-6dc00a8f.entry.js} +2 -2
- package/dist/core/{p-aeb6016c.entry.js → p-6dffaac0.entry.js} +2 -2
- package/dist/core/{p-aeb6016c.entry.js.map → p-6dffaac0.entry.js.map} +1 -1
- package/dist/core/p-72210cd4.entry.js +2 -0
- package/dist/core/p-72210cd4.entry.js.map +1 -0
- package/dist/core/{p-d5ca3bcb.entry.js → p-7aa6b76e.entry.js} +2 -2
- package/dist/core/{p-e5d99316.entry.js → p-7b90f0ae.entry.js} +2 -2
- package/dist/core/p-7c3c080a.entry.js +2 -0
- package/dist/core/p-7c3c080a.entry.js.map +1 -0
- package/dist/core/p-7c663d4a.entry.js +2 -0
- package/dist/core/p-7c663d4a.entry.js.map +1 -0
- package/dist/core/p-7c6710f8.entry.js +2 -0
- package/dist/core/p-7c6710f8.entry.js.map +1 -0
- package/dist/core/{p-50019ede.entry.js → p-80b296cd.entry.js} +2 -2
- package/dist/core/{p-b0751bd9.entry.js → p-80dee118.entry.js} +2 -2
- package/dist/core/p-80dee118.entry.js.map +1 -0
- package/dist/core/{p-eb65e556.entry.js → p-82aa8136.entry.js} +2 -2
- package/dist/core/{p-2e49fb22.entry.js → p-83b4efe2.entry.js} +2 -2
- package/dist/core/p-83e4d955.entry.js +2 -0
- package/dist/core/p-83e4d955.entry.js.map +1 -0
- package/dist/core/p-85d51975.entry.js +2 -0
- package/dist/core/p-85d51975.entry.js.map +1 -0
- package/dist/core/{p-5accf0bb.entry.js → p-878df16f.entry.js} +2 -2
- package/dist/core/{p-1fe35de1.entry.js → p-8bec76d1.entry.js} +2 -2
- package/dist/core/p-8ffdd236.entry.js +2 -0
- package/dist/core/p-8ffdd236.entry.js.map +1 -0
- package/dist/core/p-97953d8b.entry.js +2 -0
- package/dist/core/p-97953d8b.entry.js.map +1 -0
- package/dist/core/p-9a62c3b8.entry.js +2 -0
- package/dist/core/p-9a62c3b8.entry.js.map +1 -0
- package/dist/core/p-a22d335b.entry.js +2 -0
- package/dist/core/p-a22d335b.entry.js.map +1 -0
- package/dist/core/p-a22e5356.entry.js +2 -0
- package/dist/core/p-a22e5356.entry.js.map +1 -0
- package/dist/core/p-b03218df.entry.js +2 -0
- package/dist/core/p-b03218df.entry.js.map +1 -0
- package/dist/core/{p-486d8d43.entry.js → p-b3d93bc1.entry.js} +2 -2
- package/dist/core/p-c1feb2b2.entry.js +2 -0
- package/dist/core/p-c1feb2b2.entry.js.map +1 -0
- package/dist/core/{p-ed4cde5a.entry.js → p-c40c57ee.entry.js} +2 -2
- package/dist/core/p-c883b5c1.entry.js +2 -0
- package/dist/core/p-c883b5c1.entry.js.map +1 -0
- package/dist/core/{p-0ab10600.entry.js → p-cc22644d.entry.js} +2 -2
- package/dist/core/{p-505250cf.entry.js → p-d7632baf.entry.js} +2 -2
- package/dist/core/p-dcbfc485.entry.js +2 -0
- package/dist/core/p-dcbfc485.entry.js.map +1 -0
- package/dist/core/{p-44ee5375.entry.js → p-e3e0cf46.entry.js} +2 -2
- package/dist/core/p-e3e0cf46.entry.js.map +1 -0
- package/dist/core/p-e6a330e4.js +2 -0
- package/dist/core/p-e6a330e4.js.map +1 -0
- package/dist/core/{p-1109636a.entry.js → p-e7b6d9c5.entry.js} +2 -2
- package/dist/core/{p-1109636a.entry.js.map → p-e7b6d9c5.entry.js.map} +1 -1
- package/dist/core/p-ea3e2419.entry.js +2 -0
- package/dist/core/p-ea3e2419.entry.js.map +1 -0
- package/dist/core/p-f32ab3de.entry.js +2 -0
- package/dist/core/p-f32ab3de.entry.js.map +1 -0
- package/dist/core/p-f3f9acbb.entry.js +2 -0
- package/dist/core/p-f3f9acbb.entry.js.map +1 -0
- package/dist/core/{p-d03374fc.entry.js → p-fbb5c8f2.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-5bd2012a.js → helpers-1e2516ae.js} +15 -122
- package/dist/esm/helpers-1e2516ae.js.map +1 -0
- package/dist/esm/{helpers-dab8ddfe.js → helpers-c326255f.js} +23 -2
- package/dist/esm/helpers-c326255f.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +10 -10
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +5 -5
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +7 -5
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +2 -2
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +22 -27
- package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
- package/dist/esm/ic-card-vertical.entry.js +23 -25
- package/dist/esm/ic-card-vertical.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +17 -6
- package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +6 -4
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-classification-banner.entry.js +1 -1
- package/dist/esm/ic-classification-banner.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 +86 -10
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +13 -11
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +4 -2
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +4 -2
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +72 -8
- package/dist/esm/ic-divider.entry.js.map +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +31 -16
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +2 -2
- package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
- package/dist/esm/ic-footer-link.entry.js +2 -2
- package/dist/esm/ic-footer-link.entry.js.map +1 -1
- package/dist/esm/ic-footer.entry.js +2 -2
- package/dist/esm/ic-footer.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +2 -2
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +4 -3
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/{collection/components/ic-menu-with-multi/ic-menu.js → esm/ic-input-component-container_3.entry.js} +160 -729
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -0
- package/dist/esm/ic-input-label_2.entry.js +81 -0
- package/dist/esm/ic-input-label_2.entry.js.map +1 -0
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +3 -3
- package/dist/esm/ic-menu-group.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +11 -11
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +5 -4
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +30 -3
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +5 -5
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +191 -62
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +11 -11
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +15 -6
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +31 -22
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +12 -9
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +4 -3
- package/dist/esm/ic-side-navigation.entry.js.map +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 +7 -4
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +2 -1
- package/dist/esm/ic-tab-context.entry.js.map +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 +3 -3
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js.map +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 +10 -6
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +19 -11
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/index-93509377.js +4 -12
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +6 -2
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +13 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +1 -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-pagination-bar/ic-pagination-bar.d.ts +15 -6
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +11 -6
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +10 -4
- package/dist/types/components.d.ts +94 -484
- package/dist/types/utils/helpers.d.ts +1 -1
- package/dist/types/utils/types.d.ts +4 -1
- package/hydrate/index.js +3373 -6380
- package/package.json +3 -3
- package/dist/cjs/helpers-33b42cd6.js.map +0 -1
- package/dist/cjs/helpers-6817cfbb.js.map +0 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +0 -156
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +0 -2738
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-menu.cjs.entry.js +0 -658
- package/dist/cjs/ic-menu.cjs.entry.js.map +0 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +0 -788
- package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +0 -1
- package/dist/collection/components/ic-menu-with-multi/ic-menu.css +0 -712
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +0 -1
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +0 -1057
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +0 -1
- package/dist/collection/components/ic-select-with-multi/assets/Check.svg +0 -3
- package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +0 -3
- package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +0 -3
- package/dist/collection/components/ic-select-with-multi/ic-select.css +0 -695
- package/dist/collection/components/ic-select-with-multi/ic-select.js +0 -1520
- package/dist/collection/components/ic-select-with-multi/ic-select.js.map +0 -1
- package/dist/collection/components/ic-select-with-multi/story-data.js +0 -216
- package/dist/collection/components/ic-select-with-multi/story-data.js.map +0 -1
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +0 -1518
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +0 -1
- package/dist/components/ic-menu-with-multi.d.ts +0 -11
- package/dist/components/ic-menu-with-multi.js +0 -8
- package/dist/components/ic-menu-with-multi.js.map +0 -1
- package/dist/components/ic-menu3.js +0 -2803
- package/dist/components/ic-menu3.js.map +0 -1
- package/dist/components/ic-select-with-multi.d.ts +0 -11
- package/dist/components/ic-select-with-multi.js +0 -906
- package/dist/components/ic-select-with-multi.js.map +0 -1
- package/dist/core/p-0894cab1.entry.js +0 -2
- package/dist/core/p-0894cab1.entry.js.map +0 -1
- package/dist/core/p-130a05cf.entry.js +0 -2
- package/dist/core/p-130a05cf.entry.js.map +0 -1
- package/dist/core/p-1e2aa8a6.entry.js +0 -2
- package/dist/core/p-1e2aa8a6.entry.js.map +0 -1
- package/dist/core/p-202bc922.entry.js +0 -2
- package/dist/core/p-202bc922.entry.js.map +0 -1
- package/dist/core/p-28323849.entry.js +0 -2
- package/dist/core/p-28323849.entry.js.map +0 -1
- package/dist/core/p-297e99cf.js +0 -2
- package/dist/core/p-297e99cf.js.map +0 -1
- package/dist/core/p-2ff4e283.entry.js +0 -2
- package/dist/core/p-2ff4e283.entry.js.map +0 -1
- package/dist/core/p-30b046b2.entry.js +0 -2
- package/dist/core/p-30b046b2.entry.js.map +0 -1
- package/dist/core/p-3db785f0.entry.js +0 -2
- package/dist/core/p-3db785f0.entry.js.map +0 -1
- package/dist/core/p-42883e4c.entry.js +0 -2
- package/dist/core/p-42883e4c.entry.js.map +0 -1
- package/dist/core/p-42e0f3bd.entry.js +0 -2
- package/dist/core/p-42e0f3bd.entry.js.map +0 -1
- package/dist/core/p-44ee5375.entry.js.map +0 -1
- package/dist/core/p-4e28ef60.entry.js.map +0 -1
- package/dist/core/p-53e00a8a.entry.js +0 -2
- package/dist/core/p-53e00a8a.entry.js.map +0 -1
- package/dist/core/p-59028160.entry.js +0 -2
- package/dist/core/p-59028160.entry.js.map +0 -1
- package/dist/core/p-5b7dfe57.entry.js +0 -2
- package/dist/core/p-5b7dfe57.entry.js.map +0 -1
- package/dist/core/p-603fea14.entry.js +0 -2
- package/dist/core/p-603fea14.entry.js.map +0 -1
- package/dist/core/p-64933069.entry.js +0 -2
- package/dist/core/p-64933069.entry.js.map +0 -1
- package/dist/core/p-7c268030.entry.js +0 -2
- package/dist/core/p-7c268030.entry.js.map +0 -1
- package/dist/core/p-7c78f6c6.entry.js +0 -2
- package/dist/core/p-7c78f6c6.entry.js.map +0 -1
- package/dist/core/p-7c80d79c.entry.js +0 -2
- package/dist/core/p-7e1603cc.entry.js.map +0 -1
- package/dist/core/p-8df49808.entry.js +0 -2
- package/dist/core/p-8df49808.entry.js.map +0 -1
- package/dist/core/p-8f12659d.entry.js +0 -2
- package/dist/core/p-8f12659d.entry.js.map +0 -1
- package/dist/core/p-903ee57e.entry.js +0 -2
- package/dist/core/p-903ee57e.entry.js.map +0 -1
- package/dist/core/p-92e3ccb9.entry.js +0 -2
- package/dist/core/p-92e3ccb9.entry.js.map +0 -1
- package/dist/core/p-9397b15b.js.map +0 -1
- package/dist/core/p-9b54feca.entry.js +0 -2
- package/dist/core/p-9b54feca.entry.js.map +0 -1
- package/dist/core/p-a78cf2cb.entry.js +0 -2
- package/dist/core/p-a78cf2cb.entry.js.map +0 -1
- package/dist/core/p-a9151d0b.entry.js +0 -2
- package/dist/core/p-a9151d0b.entry.js.map +0 -1
- package/dist/core/p-acc76b80.entry.js +0 -2
- package/dist/core/p-acc76b80.entry.js.map +0 -1
- package/dist/core/p-b0751bd9.entry.js.map +0 -1
- package/dist/core/p-c1698936.entry.js +0 -2
- package/dist/core/p-c1698936.entry.js.map +0 -1
- package/dist/core/p-c1e90c85.entry.js +0 -2
- package/dist/core/p-c1e90c85.entry.js.map +0 -1
- package/dist/core/p-cb63e656.entry.js +0 -2
- package/dist/core/p-cb63e656.entry.js.map +0 -1
- package/dist/core/p-d3c0bffb.entry.js +0 -2
- package/dist/core/p-d3c0bffb.entry.js.map +0 -1
- package/dist/core/p-da3e8c54.entry.js +0 -2
- package/dist/core/p-da3e8c54.entry.js.map +0 -1
- package/dist/core/p-ec53b435.entry.js +0 -2
- package/dist/core/p-ec53b435.entry.js.map +0 -1
- package/dist/core/p-f9810621.entry.js +0 -2
- package/dist/core/p-f9810621.entry.js.map +0 -1
- package/dist/core/p-fb7b99dd.entry.js +0 -2
- package/dist/core/p-fb7b99dd.entry.js.map +0 -1
- package/dist/esm/helpers-5bd2012a.js.map +0 -1
- package/dist/esm/helpers-dab8ddfe.js.map +0 -1
- package/dist/esm/ic-input-component-container_4.entry.js +0 -149
- package/dist/esm/ic-input-component-container_4.entry.js.map +0 -1
- package/dist/esm/ic-menu-with-multi.entry.js +0 -2734
- package/dist/esm/ic-menu-with-multi.entry.js.map +0 -1
- package/dist/esm/ic-menu.entry.js +0 -654
- package/dist/esm/ic-menu.entry.js.map +0 -1
- package/dist/esm/ic-select-with-multi.entry.js +0 -784
- package/dist/esm/ic-select-with-multi.entry.js.map +0 -1
- package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +0 -214
- package/dist/types/components/ic-select-with-multi/ic-select.d.ts +0 -259
- package/dist/types/components/ic-select-with-multi/story-data.d.ts +0 -32
- /package/dist/core/{p-c033e7d6.entry.js.map → p-036d251b.entry.js.map} +0 -0
- /package/dist/core/{p-d2e7a256.entry.js.map → p-13d2db9b.entry.js.map} +0 -0
- /package/dist/core/{p-897b8d16.entry.js.map → p-24d03bbd.entry.js.map} +0 -0
- /package/dist/core/{p-bb1252fa.entry.js.map → p-26613dbd.entry.js.map} +0 -0
- /package/dist/core/{p-77a32de5.entry.js.map → p-2a3bd99a.entry.js.map} +0 -0
- /package/dist/core/{p-4dcc37e7.entry.js.map → p-620b758c.entry.js.map} +0 -0
- /package/dist/core/{p-6beffd0e.entry.js.map → p-6727166b.entry.js.map} +0 -0
- /package/dist/core/{p-8ca2e329.entry.js.map → p-6dc00a8f.entry.js.map} +0 -0
- /package/dist/core/{p-d5ca3bcb.entry.js.map → p-7aa6b76e.entry.js.map} +0 -0
- /package/dist/core/{p-e5d99316.entry.js.map → p-7b90f0ae.entry.js.map} +0 -0
- /package/dist/core/{p-50019ede.entry.js.map → p-80b296cd.entry.js.map} +0 -0
- /package/dist/core/{p-eb65e556.entry.js.map → p-82aa8136.entry.js.map} +0 -0
- /package/dist/core/{p-2e49fb22.entry.js.map → p-83b4efe2.entry.js.map} +0 -0
- /package/dist/core/{p-5accf0bb.entry.js.map → p-878df16f.entry.js.map} +0 -0
- /package/dist/core/{p-1fe35de1.entry.js.map → p-8bec76d1.entry.js.map} +0 -0
- /package/dist/core/{p-486d8d43.entry.js.map → p-b3d93bc1.entry.js.map} +0 -0
- /package/dist/core/{p-ed4cde5a.entry.js.map → p-c40c57ee.entry.js.map} +0 -0
- /package/dist/core/{p-0ab10600.entry.js.map → p-cc22644d.entry.js.map} +0 -0
- /package/dist/core/{p-505250cf.entry.js.map → p-d7632baf.entry.js.map} +0 -0
- /package/dist/core/{p-d03374fc.entry.js.map → p-fbb5c8f2.entry.js.map} +0 -0
@@ -1,1520 +0,0 @@
|
|
1
|
-
import { Host, h, } from "@stencil/core";
|
2
|
-
import { getInputDescribedByText, getLabelFromValue, hasValidationStatus, inheritAttributes, onComponentRequiredPropUndefined, renderHiddenInput, isMobileOrTablet, getFilteredMenuOptions, getOptionsWithoutGroupTitlesCount, addFormResetListener, removeFormResetListener, removeDisabledFalse, } from "../../utils/helpers";
|
3
|
-
import { IC_INHERITED_ARIA } from "../../utils/constants";
|
4
|
-
import { IcInformationStatus, IcThemeForegroundEnum, } from "../../utils/types";
|
5
|
-
import Expand from "./assets/Expand.svg";
|
6
|
-
import Clear from "./assets/Clear.svg";
|
7
|
-
let inputIds = 0;
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
9
|
-
export class Select {
|
10
|
-
constructor() {
|
11
|
-
this.hasSetDefaultValue = false;
|
12
|
-
this.inheritedAttributes = {};
|
13
|
-
this.initialOptionsEmpty = false;
|
14
|
-
this.inputId = `ic-select-input-${inputIds++}`;
|
15
|
-
this.menuId = `${this.inputId}-menu`;
|
16
|
-
this.searchableMenuItemSelected = false;
|
17
|
-
this.ungroupedOptions = [];
|
18
|
-
this.handleRetry = (ev) => {
|
19
|
-
var _a;
|
20
|
-
if (ev.detail.keyPressed)
|
21
|
-
(_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
|
22
|
-
this.blurredBecauseButtonPressed = true;
|
23
|
-
this.retryButtonClick = true;
|
24
|
-
this.hasSetDefaultValue = true;
|
25
|
-
this.icRetryLoad.emit({ value: this.hiddenInputValue });
|
26
|
-
};
|
27
|
-
this.emitIcChange = (value) => {
|
28
|
-
if (!this.searchable) {
|
29
|
-
// If "Select all" button clicked, replace value with new value (array of all option values)
|
30
|
-
if (this.multiple && !Array.isArray(value) && value !== null) {
|
31
|
-
this.handleMultipleSelectChange(value);
|
32
|
-
}
|
33
|
-
else {
|
34
|
-
this.value = value;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
clearTimeout(this.debounceIcChange);
|
38
|
-
this.debounceIcChange = window.setTimeout(() => {
|
39
|
-
const valueToEmit = this.multiple ? this.value : value;
|
40
|
-
this.icChange.emit({ value: valueToEmit });
|
41
|
-
}, this.currDebounce);
|
42
|
-
};
|
43
|
-
this.emitImmediateIcChange = (value) => {
|
44
|
-
this.value = value;
|
45
|
-
clearTimeout(this.debounceIcChange);
|
46
|
-
this.icChange.emit({ value });
|
47
|
-
};
|
48
|
-
/**
|
49
|
-
* Processes the provided array of IcMenuOptions, removing duplicates and reporting them with a console.warn
|
50
|
-
* @param options array of IcMenuOptions
|
51
|
-
* @returns a new options object, with all entries possessing a duplicate 'value' field removed
|
52
|
-
*/
|
53
|
-
this.deduplicateOptions = (options) => {
|
54
|
-
const uniqueValues = [];
|
55
|
-
const dedupedOptions = [];
|
56
|
-
let dedupedChildren;
|
57
|
-
options.forEach((option) => {
|
58
|
-
if (option.children) {
|
59
|
-
//If an option has children, we will loop through them
|
60
|
-
dedupedChildren = [];
|
61
|
-
option.children.forEach((child) => {
|
62
|
-
if (uniqueValues.includes(child.value)) {
|
63
|
-
console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${child.value}) which has been removed.`);
|
64
|
-
}
|
65
|
-
else {
|
66
|
-
uniqueValues.push(child.value);
|
67
|
-
dedupedChildren.push(child);
|
68
|
-
}
|
69
|
-
});
|
70
|
-
// construct a modified option, inserting the deduplicated children alongside the original information
|
71
|
-
const modifiedParent = Object.assign(Object.assign({}, option), { children: dedupedChildren });
|
72
|
-
dedupedOptions.push(modifiedParent);
|
73
|
-
}
|
74
|
-
else {
|
75
|
-
// If an option does not have children, assess to see if it's value has been included already
|
76
|
-
if (uniqueValues.includes(option.value)) {
|
77
|
-
console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`);
|
78
|
-
}
|
79
|
-
else {
|
80
|
-
uniqueValues.push(option.value);
|
81
|
-
dedupedOptions.push(option);
|
82
|
-
}
|
83
|
-
}
|
84
|
-
});
|
85
|
-
return dedupedOptions;
|
86
|
-
};
|
87
|
-
/**
|
88
|
-
* Loop through options array and for all options with no value, infer it from the label
|
89
|
-
*/
|
90
|
-
this.setOptionsValuesFromLabels = () => {
|
91
|
-
if (this.options.length > 0 && this.options.map) {
|
92
|
-
this.options.map((option) => {
|
93
|
-
if (!option.value) {
|
94
|
-
option.value = option.label;
|
95
|
-
}
|
96
|
-
});
|
97
|
-
}
|
98
|
-
};
|
99
|
-
this.setUngroupedOptions = (event) => {
|
100
|
-
this.ungroupedOptions = event.detail.options;
|
101
|
-
};
|
102
|
-
this.setTextColor = () => {
|
103
|
-
if (this.nativeSelectElement.selectedIndex === 0) {
|
104
|
-
this.nativeSelectElement.className = "placeholder";
|
105
|
-
}
|
106
|
-
else {
|
107
|
-
this.nativeSelectElement.className = "select-option-selected";
|
108
|
-
}
|
109
|
-
};
|
110
|
-
this.setMenuChange = (open) => {
|
111
|
-
if (this.open !== open) {
|
112
|
-
this.open = open;
|
113
|
-
}
|
114
|
-
};
|
115
|
-
this.getLabelFromValue = (value) => {
|
116
|
-
return getLabelFromValue(value, this.uniqueOptions);
|
117
|
-
};
|
118
|
-
this.getMultipleOptionsString = (selectedValues) => {
|
119
|
-
const selectedLabels = selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map((value) => this.getLabelFromValue(value));
|
120
|
-
return selectedLabels === null || selectedLabels === void 0 ? void 0 : selectedLabels.join(", ");
|
121
|
-
};
|
122
|
-
this.getFilteredChildMenuOptions = (option) => {
|
123
|
-
let children = option.children;
|
124
|
-
if (this.searchable) {
|
125
|
-
children = getFilteredMenuOptions(option.children, this.includeDescriptionsInSearch, this.searchableSelectInputValue, this.searchMatchPosition);
|
126
|
-
}
|
127
|
-
else {
|
128
|
-
children = getFilteredMenuOptions(option.children, false, this.pressedCharacters, "start");
|
129
|
-
}
|
130
|
-
const newOption = Object.assign({}, option);
|
131
|
-
newOption.children = children;
|
132
|
-
return newOption;
|
133
|
-
};
|
134
|
-
// (For multi-select) get value array, i.e. selected option values, in order they appear in option list
|
135
|
-
this.getValueSortedByOptions = (value) => {
|
136
|
-
const valueArray = value;
|
137
|
-
const valuesFromAllOptions = this.ungroupedOptions.map((option) => option.value);
|
138
|
-
valueArray.sort((a, b) => valuesFromAllOptions.indexOf(a) - valuesFromAllOptions.indexOf(b));
|
139
|
-
return valueArray;
|
140
|
-
};
|
141
|
-
this.handleNativeSelectChange = () => {
|
142
|
-
this.icOptionSelect.emit({ value: this.nativeSelectElement.value });
|
143
|
-
this.emitImmediateIcChange(this.nativeSelectElement.value);
|
144
|
-
this.setTextColor();
|
145
|
-
};
|
146
|
-
// Handle option select for when a custom input box and menu is rendered
|
147
|
-
// (rather than native <select> - rendered when viewed on a mobile / tablet screen)
|
148
|
-
this.handleCustomSelectChange = (event) => {
|
149
|
-
var _a;
|
150
|
-
const value = event.detail.value;
|
151
|
-
if (this.searchable && event.detail.label === this.emptyOptionListText) {
|
152
|
-
this.searchableSelectElement.focus();
|
153
|
-
return;
|
154
|
-
}
|
155
|
-
if (this.searchable) {
|
156
|
-
this.value = value;
|
157
|
-
this.searchableMenuItemSelected = true;
|
158
|
-
// After editing the input, if selecting the same option as before, set the input value to label again
|
159
|
-
if (this.value === this.currValue) {
|
160
|
-
this.searchableSelectInputValue = this.getLabelFromValue(this.value);
|
161
|
-
}
|
162
|
-
this.inputValueToFilter = null;
|
163
|
-
this.hiddenInputValue = this.getValueFromLabel(this.searchableSelectInputValue);
|
164
|
-
}
|
165
|
-
if (this.multiple && ((_a = this.value) === null || _a === void 0 ? void 0 : _a.includes(value))) {
|
166
|
-
this.icOptionDeselect.emit({ value });
|
167
|
-
}
|
168
|
-
else {
|
169
|
-
this.icOptionSelect.emit({ value });
|
170
|
-
}
|
171
|
-
this.ariaActiveDescendant = event.detail.optionId;
|
172
|
-
this.emitIcChange(value);
|
173
|
-
};
|
174
|
-
// Update selected options - adds / removes them, in order of option list
|
175
|
-
// Create new array if value prop is undefined
|
176
|
-
this.handleMultipleSelectChange = (value) => {
|
177
|
-
if (this.value) {
|
178
|
-
let valueArray = this.value.slice();
|
179
|
-
if (this.value.includes(value)) {
|
180
|
-
const valueIndex = valueArray.indexOf(value);
|
181
|
-
valueArray.splice(valueIndex, 1);
|
182
|
-
}
|
183
|
-
else {
|
184
|
-
valueArray.push(value);
|
185
|
-
valueArray = this.getValueSortedByOptions(valueArray);
|
186
|
-
}
|
187
|
-
this.value = valueArray.length === 0 ? null : valueArray;
|
188
|
-
}
|
189
|
-
else {
|
190
|
-
const valueArray = [];
|
191
|
-
valueArray.push(value);
|
192
|
-
this.value = valueArray;
|
193
|
-
}
|
194
|
-
};
|
195
|
-
this.handleSelectAllChange = (event) => {
|
196
|
-
const selectAllOptions = event.detail.select;
|
197
|
-
const allEnabledOptions = this.ungroupedOptions.filter((option) => !option.disabled);
|
198
|
-
const allValues = allEnabledOptions.map((option) => option.value);
|
199
|
-
let newValue;
|
200
|
-
if (selectAllOptions) {
|
201
|
-
let unselectedValues;
|
202
|
-
// Only emit icOptionSelect for all values that are newly selected
|
203
|
-
if (this.value) {
|
204
|
-
unselectedValues = allValues.filter((value) => this.value && !this.value.includes(value));
|
205
|
-
}
|
206
|
-
else {
|
207
|
-
unselectedValues = allValues;
|
208
|
-
}
|
209
|
-
unselectedValues.forEach((value) => this.icOptionSelect.emit({ value }));
|
210
|
-
newValue = allValues;
|
211
|
-
}
|
212
|
-
else {
|
213
|
-
// Only emit icOptionDeselect for values that were selected
|
214
|
-
this.value.forEach((value) => this.icOptionDeselect.emit({ value }));
|
215
|
-
newValue = null;
|
216
|
-
}
|
217
|
-
this.emitIcChange(newValue);
|
218
|
-
};
|
219
|
-
this.handleMenuChange = (event) => {
|
220
|
-
this.open = event.detail.open;
|
221
|
-
this.pressedCharacters = "";
|
222
|
-
this.searchable && this.handleFocusIndicatorDisplay();
|
223
|
-
};
|
224
|
-
// clears the debounce delay when navigating the menu with arrow keys etc
|
225
|
-
// to prevent delay in change event, which should only occur when typing in input
|
226
|
-
this.handleMenuKeyPress = (ev) => {
|
227
|
-
ev.cancelBubble = true;
|
228
|
-
if (!this.multiple) {
|
229
|
-
this.handleCharacterKeyDown(ev.detail.key);
|
230
|
-
}
|
231
|
-
};
|
232
|
-
this.handleFocusIndicatorDisplay = () => {
|
233
|
-
const focusIndicator = this.el.shadowRoot.querySelector(".focus-indicator");
|
234
|
-
if (this.open) {
|
235
|
-
focusIndicator.classList.add("focus-indicator-enabled");
|
236
|
-
}
|
237
|
-
else {
|
238
|
-
focusIndicator.classList.remove("focus-indicator-enabled");
|
239
|
-
}
|
240
|
-
};
|
241
|
-
this.handleMouseDown = (event) => {
|
242
|
-
if (!this.open) {
|
243
|
-
event.preventDefault();
|
244
|
-
}
|
245
|
-
};
|
246
|
-
this.isExternalFiltering = () => this.searchable && this.disableAutoFiltering;
|
247
|
-
this.handleClick = (event) => {
|
248
|
-
var _a;
|
249
|
-
if (!this.open) {
|
250
|
-
if (this.isExternalFiltering()) {
|
251
|
-
this.menu.options = this.filteredOptions;
|
252
|
-
}
|
253
|
-
else if (!this.hasTimedOut &&
|
254
|
-
!this.loading &&
|
255
|
-
!((_a = this.noOptions) === null || _a === void 0 ? void 0 : _a.length) &&
|
256
|
-
(!this.searchable || this.searchableMenuItemSelected)) {
|
257
|
-
this.noOptions = null;
|
258
|
-
this.menu.options = this.uniqueOptions;
|
259
|
-
}
|
260
|
-
}
|
261
|
-
if (event.detail !== 0) {
|
262
|
-
this.menu.handleClickOpen();
|
263
|
-
}
|
264
|
-
};
|
265
|
-
this.handleExpandIconMouseDown = (event) => {
|
266
|
-
if (!this.disabled) {
|
267
|
-
event.preventDefault();
|
268
|
-
this.searchableSelectElement.focus();
|
269
|
-
this.handleClick(event);
|
270
|
-
}
|
271
|
-
};
|
272
|
-
this.handleClear = (event) => {
|
273
|
-
event.stopPropagation();
|
274
|
-
this.hasTimedOut = false;
|
275
|
-
clearTimeout(this.timeoutTimer);
|
276
|
-
this.noOptions = null;
|
277
|
-
this.emitImmediateIcChange(null);
|
278
|
-
this.icClear.emit();
|
279
|
-
if (this.searchable) {
|
280
|
-
this.searchableSelectElement.value = null;
|
281
|
-
this.searchableSelectInputValue = null;
|
282
|
-
this.filteredOptions = this.uniqueOptions;
|
283
|
-
this.hiddenInputValue = null;
|
284
|
-
this.searchableSelectElement.focus();
|
285
|
-
}
|
286
|
-
else {
|
287
|
-
this.customSelectElement.focus();
|
288
|
-
}
|
289
|
-
};
|
290
|
-
this.handleCharacterKeyDown = (key) => {
|
291
|
-
// Only close menu when space is pressed if not being used alongside character keys to quickly select options
|
292
|
-
if (this.open &&
|
293
|
-
key === " " &&
|
294
|
-
this.pressedCharacters.length === 0 &&
|
295
|
-
!this.hasTimedOut &&
|
296
|
-
!this.loading) {
|
297
|
-
this.setMenuChange(false);
|
298
|
-
}
|
299
|
-
if (key.length === 1 && !this.searchable) {
|
300
|
-
window.clearTimeout(this.characterKeyPressTimer);
|
301
|
-
this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
|
302
|
-
if (!(key === " " && !this.pressedCharacters)) {
|
303
|
-
this.pressedCharacters += key;
|
304
|
-
this.handleFilter();
|
305
|
-
if (!this.noOptions) {
|
306
|
-
this.emitImmediateIcChange(this.filteredOptions[0].value);
|
307
|
-
}
|
308
|
-
}
|
309
|
-
}
|
310
|
-
else {
|
311
|
-
this.pressedCharacters = "";
|
312
|
-
}
|
313
|
-
};
|
314
|
-
this.handleNativeSelectKeyDown = (event) => {
|
315
|
-
if ((event.key !== "Escape" && event.key !== "Tab") || this.open) {
|
316
|
-
event.cancelBubble = true;
|
317
|
-
}
|
318
|
-
this.handleCharacterKeyDown(event.key);
|
319
|
-
};
|
320
|
-
this.handleKeyDown = (event) => {
|
321
|
-
if ((event.key !== "Escape" && event.key !== "Tab") || this.open) {
|
322
|
-
event.cancelBubble = true;
|
323
|
-
}
|
324
|
-
const isArrowKey = event.key === "ArrowDown" || event.key === "ArrowUp";
|
325
|
-
if (!this.open) {
|
326
|
-
if (this.isExternalFiltering() && (event.key === "Enter" || isArrowKey)) {
|
327
|
-
this.menu.options = this.filteredOptions;
|
328
|
-
}
|
329
|
-
else {
|
330
|
-
if (!this.hasTimedOut) {
|
331
|
-
this.noOptions = null;
|
332
|
-
this.menu.options = this.uniqueOptions;
|
333
|
-
}
|
334
|
-
}
|
335
|
-
}
|
336
|
-
if (this.open && event.key === "Enter") {
|
337
|
-
this.setMenuChange(false);
|
338
|
-
}
|
339
|
-
else {
|
340
|
-
if (!(isArrowKey && this.noOptions !== null)) {
|
341
|
-
if (!(event.key === " " && this.pressedCharacters.length > 0)) {
|
342
|
-
// Keyboard events get passed onto ic-menu
|
343
|
-
this.menu.handleKeyboardOpen(event);
|
344
|
-
}
|
345
|
-
if (!this.multiple) {
|
346
|
-
this.handleCharacterKeyDown(event.key);
|
347
|
-
}
|
348
|
-
}
|
349
|
-
}
|
350
|
-
};
|
351
|
-
this.handleClearButtonFocus = () => {
|
352
|
-
this.clearButtonFocused = true;
|
353
|
-
};
|
354
|
-
this.handleClearButtonBlur = (ev) => {
|
355
|
-
var _a;
|
356
|
-
const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
|
357
|
-
if (!(this.searchableSelectElement &&
|
358
|
-
ev.relatedTarget === this.searchableSelectElement) &&
|
359
|
-
!(retryButton && ev.relatedTarget === retryButton)) {
|
360
|
-
this.setMenuChange(false);
|
361
|
-
this.handleFocusIndicatorDisplay();
|
362
|
-
}
|
363
|
-
this.clearButtonFocused = false;
|
364
|
-
};
|
365
|
-
this.handleFilter = () => {
|
366
|
-
var _a;
|
367
|
-
const options = this.deduplicateOptions(this.searchable ? [...this.uniqueOptions] : this.ungroupedOptions);
|
368
|
-
let isGrouped = false;
|
369
|
-
let newFilteredOptions = [];
|
370
|
-
options.map((option) => {
|
371
|
-
if (option.children)
|
372
|
-
isGrouped = true;
|
373
|
-
});
|
374
|
-
let menuOptionsFiltered;
|
375
|
-
if (this.searchable) {
|
376
|
-
menuOptionsFiltered = getFilteredMenuOptions(options, this.includeDescriptionsInSearch, this.inputValueToFilter, this.searchMatchPosition);
|
377
|
-
this.searchableMenuItemSelected = false;
|
378
|
-
}
|
379
|
-
else {
|
380
|
-
menuOptionsFiltered = getFilteredMenuOptions(options, false, this.pressedCharacters, "start");
|
381
|
-
}
|
382
|
-
if (!isGrouped &&
|
383
|
-
((_a = menuOptionsFiltered[0]) === null || _a === void 0 ? void 0 : _a.label) !== this.emptyOptionListText) {
|
384
|
-
newFilteredOptions = menuOptionsFiltered;
|
385
|
-
}
|
386
|
-
else if (isGrouped) {
|
387
|
-
options.map((option) => {
|
388
|
-
if (this.includeGroupTitlesInSearch) {
|
389
|
-
if (menuOptionsFiltered.indexOf(option) !== -1) {
|
390
|
-
newFilteredOptions.push(option);
|
391
|
-
}
|
392
|
-
else {
|
393
|
-
newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
|
394
|
-
}
|
395
|
-
}
|
396
|
-
else {
|
397
|
-
newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
|
398
|
-
}
|
399
|
-
});
|
400
|
-
}
|
401
|
-
let noChildOptionsWhenFiltered = false;
|
402
|
-
if (isGrouped) {
|
403
|
-
noChildOptionsWhenFiltered = true;
|
404
|
-
newFilteredOptions.map((option) => {
|
405
|
-
if (option.children.length > 0) {
|
406
|
-
noChildOptionsWhenFiltered = false;
|
407
|
-
}
|
408
|
-
});
|
409
|
-
}
|
410
|
-
if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {
|
411
|
-
this.noOptions = null;
|
412
|
-
this.filteredOptions = newFilteredOptions;
|
413
|
-
}
|
414
|
-
else {
|
415
|
-
this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
|
416
|
-
this.filteredOptions = this.noOptions;
|
417
|
-
}
|
418
|
-
};
|
419
|
-
/**
|
420
|
-
* Put the select component into loading state.
|
421
|
-
* Replace options with the loading message. If timeout is enabled, set the timeout and once passed, replace options with the loading error message
|
422
|
-
*/
|
423
|
-
this.triggerLoading = () => {
|
424
|
-
this.hasTimedOut = false;
|
425
|
-
this.noOptions = [{ label: this.loadingLabel, value: "", loading: true }];
|
426
|
-
if (this.filteredOptions !== this.noOptions && this.searchable) {
|
427
|
-
this.filteredOptions = this.noOptions;
|
428
|
-
}
|
429
|
-
else if (this.uniqueOptions !== this.noOptions && !this.searchable) {
|
430
|
-
this.uniqueOptions = this.noOptions;
|
431
|
-
}
|
432
|
-
if (this.timeout) {
|
433
|
-
this.timeoutTimer = window.setTimeout(() => {
|
434
|
-
this.loading = false;
|
435
|
-
this.hasTimedOut = true;
|
436
|
-
this.noOptions = [
|
437
|
-
{ label: this.loadingErrorLabel, value: "", timedOut: true },
|
438
|
-
];
|
439
|
-
this.filteredOptions = this.noOptions;
|
440
|
-
if (!this.searchable)
|
441
|
-
this.uniqueOptions = this.noOptions;
|
442
|
-
}, this.timeout);
|
443
|
-
}
|
444
|
-
};
|
445
|
-
this.getValueFromLabel = (label) => {
|
446
|
-
var _a;
|
447
|
-
return (_a = this.uniqueOptions.find((option) => option.label === label)) === null || _a === void 0 ? void 0 : _a.value;
|
448
|
-
};
|
449
|
-
this.handleSearchableSelectInput = (event) => {
|
450
|
-
this.searchableSelectInputValue = event.target.value;
|
451
|
-
this.icInput.emit({ value: this.searchableSelectInputValue });
|
452
|
-
this.emitIcChange(this.searchableSelectInputValue);
|
453
|
-
this.hiddenInputValue = this.searchableSelectInputValue;
|
454
|
-
this.inputValueToFilter = this.searchableSelectInputValue;
|
455
|
-
this.setMenuChange(true);
|
456
|
-
if (!this.disableAutoFiltering) {
|
457
|
-
this.handleFilter();
|
458
|
-
this.debounceAriaLiveUpdate();
|
459
|
-
}
|
460
|
-
};
|
461
|
-
this.updateSearchableSelectResultAriaLive = () => {
|
462
|
-
const searchableSelectResultsStatusEl = this.el.shadowRoot.querySelector(".searchable-select-results-status");
|
463
|
-
if (searchableSelectResultsStatusEl) {
|
464
|
-
if (this.noOptions !== null) {
|
465
|
-
searchableSelectResultsStatusEl.innerText = this.emptyOptionListText;
|
466
|
-
}
|
467
|
-
else {
|
468
|
-
searchableSelectResultsStatusEl.innerText = "";
|
469
|
-
}
|
470
|
-
}
|
471
|
-
};
|
472
|
-
this.updateMultiSelectedCountAriaLive = () => {
|
473
|
-
var _a;
|
474
|
-
const multiSelectSelectedCountEl = this.el.shadowRoot.querySelector(".multi-select-selected-count");
|
475
|
-
const selectedCount = `${(_a = this.currValue) === null || _a === void 0 ? void 0 : _a.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
|
476
|
-
if (multiSelectSelectedCountEl &&
|
477
|
-
multiSelectSelectedCountEl.innerText !== selectedCount) {
|
478
|
-
multiSelectSelectedCountEl.innerText = selectedCount;
|
479
|
-
}
|
480
|
-
};
|
481
|
-
this.getDefaultValue = (value) => this.getLabelFromValue(value) || value || null;
|
482
|
-
this.setDefaultValue = () => {
|
483
|
-
if (!this.hasSetDefaultValue && this.currValue) {
|
484
|
-
this.searchableSelectInputValue =
|
485
|
-
this.searchable && this.getDefaultValue(this.currValue);
|
486
|
-
this.initialValue = this.currValue;
|
487
|
-
this.hasSetDefaultValue = true;
|
488
|
-
}
|
489
|
-
};
|
490
|
-
this.onFocus = () => {
|
491
|
-
this.icFocus.emit();
|
492
|
-
};
|
493
|
-
this.onBlur = (event) => {
|
494
|
-
var _a;
|
495
|
-
const target = event.relatedTarget;
|
496
|
-
if (target !== null &&
|
497
|
-
target.tagName === "UL" &&
|
498
|
-
target.className.includes("menu")) {
|
499
|
-
return;
|
500
|
-
}
|
501
|
-
const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
|
502
|
-
const isSearchableAndNoFocusedInternalElements = this.searchable &&
|
503
|
-
event.relatedTarget !== this.menu &&
|
504
|
-
!Array.from(this.menu.querySelectorAll("[role='option']")).includes(event.relatedTarget) &&
|
505
|
-
!(this.clearButton && event.relatedTarget === this.clearButton) &&
|
506
|
-
!(retryButton && event.relatedTarget === retryButton);
|
507
|
-
if (isSearchableAndNoFocusedInternalElements) {
|
508
|
-
if (!this.retryButtonClick) {
|
509
|
-
this.setMenuChange(false);
|
510
|
-
}
|
511
|
-
this.handleFocusIndicatorDisplay();
|
512
|
-
}
|
513
|
-
this.retryButtonClick = false;
|
514
|
-
this.icBlur.emit();
|
515
|
-
};
|
516
|
-
this.onTimeoutBlur = (ev) => {
|
517
|
-
if (ev.detail.ev.relatedTarget !==
|
518
|
-
this.searchableSelectElement &&
|
519
|
-
!this.blurredBecauseButtonPressed) {
|
520
|
-
this.setMenuChange(false);
|
521
|
-
this.handleFocusIndicatorDisplay();
|
522
|
-
this.icBlur.emit();
|
523
|
-
}
|
524
|
-
this.blurredBecauseButtonPressed = false;
|
525
|
-
};
|
526
|
-
this.handleFormReset = () => {
|
527
|
-
this.value = this.initialValue;
|
528
|
-
if (this.searchable) {
|
529
|
-
this.searchableSelectInputValue = this.getDefaultValue(this.value);
|
530
|
-
this.hiddenInputValue = this.value;
|
531
|
-
}
|
532
|
-
};
|
533
|
-
this.ariaActiveDescendant = undefined;
|
534
|
-
this.clearButtonFocused = false;
|
535
|
-
this.debounceIcChange = undefined;
|
536
|
-
this.hiddenInputValue = undefined;
|
537
|
-
this.noOptions = null;
|
538
|
-
this.open = false;
|
539
|
-
this.pressedCharacters = "";
|
540
|
-
this.searchableSelectInputValue = null;
|
541
|
-
this.disabled = false;
|
542
|
-
this.disableAutoFiltering = false;
|
543
|
-
this.emptyOptionListText = "No results found";
|
544
|
-
this.form = undefined;
|
545
|
-
this.fullWidth = false;
|
546
|
-
this.helperText = "";
|
547
|
-
this.hideLabel = false;
|
548
|
-
this.includeDescriptionsInSearch = false;
|
549
|
-
this.includeGroupTitlesInSearch = false;
|
550
|
-
this.label = undefined;
|
551
|
-
this.loadingErrorLabel = "Loading Error";
|
552
|
-
this.loadingLabel = "Loading...";
|
553
|
-
this.multiple = false;
|
554
|
-
this.name = this.inputId;
|
555
|
-
this.placeholder = "Select an option";
|
556
|
-
this.readonly = false;
|
557
|
-
this.required = false;
|
558
|
-
this.searchable = false;
|
559
|
-
this.searchMatchPosition = "anywhere";
|
560
|
-
this.selectOnEnter = false;
|
561
|
-
this.showClearButton = false;
|
562
|
-
this.size = "medium";
|
563
|
-
this.timeout = undefined;
|
564
|
-
this.validationStatus = "";
|
565
|
-
this.validationText = "";
|
566
|
-
this.loading = false;
|
567
|
-
this.options = [];
|
568
|
-
this.filteredOptions = this.options;
|
569
|
-
this.uniqueOptions = this.options;
|
570
|
-
this.debounce = 0;
|
571
|
-
this.currDebounce = this.debounce;
|
572
|
-
this.value = undefined;
|
573
|
-
this.initialValue = this.value;
|
574
|
-
this.inputValueToFilter = this.value;
|
575
|
-
this.currValue = this.value;
|
576
|
-
}
|
577
|
-
loadingHandler(newValue) {
|
578
|
-
newValue && this.triggerLoading();
|
579
|
-
}
|
580
|
-
watchOptionsHandler() {
|
581
|
-
if (!this.hasTimedOut && this.options !== this.noOptions) {
|
582
|
-
this.loading = false;
|
583
|
-
clearTimeout(this.timeoutTimer);
|
584
|
-
if (this.isExternalFiltering()) {
|
585
|
-
// When searchable select
|
586
|
-
if (this.options.length > 0) {
|
587
|
-
this.setOptionsValuesFromLabels();
|
588
|
-
this.noOptions = null;
|
589
|
-
this.uniqueOptions = this.deduplicateOptions(this.options);
|
590
|
-
this.filteredOptions = this.uniqueOptions;
|
591
|
-
}
|
592
|
-
else {
|
593
|
-
this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
|
594
|
-
this.uniqueOptions = this.noOptions;
|
595
|
-
this.filteredOptions = this.noOptions;
|
596
|
-
}
|
597
|
-
this.updateSearchableSelectResultAriaLive();
|
598
|
-
this.setDefaultValue();
|
599
|
-
}
|
600
|
-
else {
|
601
|
-
this.setOptionsValuesFromLabels();
|
602
|
-
this.uniqueOptions = this.deduplicateOptions(this.options);
|
603
|
-
this.filteredOptions = this.uniqueOptions;
|
604
|
-
if (this.initialOptionsEmpty) {
|
605
|
-
this.setDefaultValue();
|
606
|
-
this.initialOptionsEmpty = false;
|
607
|
-
}
|
608
|
-
}
|
609
|
-
}
|
610
|
-
else {
|
611
|
-
if (!this.searchable)
|
612
|
-
this.options = this.noOptions;
|
613
|
-
}
|
614
|
-
}
|
615
|
-
debounceChangedHandler(newValue) {
|
616
|
-
this.updateOnChangeDebounce(newValue);
|
617
|
-
}
|
618
|
-
valueChangedHandler() {
|
619
|
-
if (this.value !== this.currValue) {
|
620
|
-
if (this.value && this.multiple) {
|
621
|
-
this.currValue = this.getValueSortedByOptions(this.value);
|
622
|
-
this.updateMultiSelectedCountAriaLive();
|
623
|
-
}
|
624
|
-
else {
|
625
|
-
this.currValue = this.value;
|
626
|
-
}
|
627
|
-
}
|
628
|
-
if (this.searchable) {
|
629
|
-
this.searchableSelectInputValue =
|
630
|
-
this.getLabelFromValue(this.currValue) ||
|
631
|
-
this.currValue;
|
632
|
-
}
|
633
|
-
}
|
634
|
-
disconnectedCallback() {
|
635
|
-
removeFormResetListener(this.el, this.handleFormReset);
|
636
|
-
}
|
637
|
-
componentWillLoad() {
|
638
|
-
this.inheritedAttributes = inheritAttributes(this.el, [
|
639
|
-
...IC_INHERITED_ARIA,
|
640
|
-
"tabindex",
|
641
|
-
"title",
|
642
|
-
]);
|
643
|
-
removeDisabledFalse(this.disabled, this.el);
|
644
|
-
this.setOptionsValuesFromLabels();
|
645
|
-
addFormResetListener(this.el, this.handleFormReset);
|
646
|
-
if (!this.options.length) {
|
647
|
-
this.initialOptionsEmpty = true;
|
648
|
-
this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
|
649
|
-
this.uniqueOptions = this.noOptions;
|
650
|
-
this.filteredOptions = this.noOptions;
|
651
|
-
}
|
652
|
-
else {
|
653
|
-
this.setDefaultValue();
|
654
|
-
this.uniqueOptions = this.deduplicateOptions(this.options);
|
655
|
-
}
|
656
|
-
}
|
657
|
-
componentDidLoad() {
|
658
|
-
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Select");
|
659
|
-
if (this.loading) {
|
660
|
-
this.triggerLoading();
|
661
|
-
}
|
662
|
-
this.hiddenInputValue = this.searchable && this.currValue;
|
663
|
-
}
|
664
|
-
componentDidRender() {
|
665
|
-
if (this.nativeSelectElement && !this.disabled) {
|
666
|
-
this.setTextColor();
|
667
|
-
}
|
668
|
-
}
|
669
|
-
/**
|
670
|
-
* Sets focus on the input box.
|
671
|
-
*/
|
672
|
-
async setFocus() {
|
673
|
-
if (this.nativeSelectElement) {
|
674
|
-
this.nativeSelectElement.focus();
|
675
|
-
}
|
676
|
-
else if (this.customSelectElement) {
|
677
|
-
this.customSelectElement.focus();
|
678
|
-
}
|
679
|
-
else if (this.searchableSelectElement) {
|
680
|
-
this.searchableSelectElement.focus();
|
681
|
-
}
|
682
|
-
}
|
683
|
-
updateOnChangeDebounce(newValue) {
|
684
|
-
if (this.currDebounce !== newValue) {
|
685
|
-
this.currDebounce = newValue;
|
686
|
-
}
|
687
|
-
}
|
688
|
-
debounceAriaLiveUpdate() {
|
689
|
-
clearTimeout(this.debounceAria);
|
690
|
-
window.setTimeout(() => {
|
691
|
-
this.updateSearchableSelectResultAriaLive();
|
692
|
-
}, 800);
|
693
|
-
}
|
694
|
-
render() {
|
695
|
-
const { size, disabled, fullWidth, helperText, hideLabel, label, menuId, multiple, name, options, placeholder, readonly, required, searchable, showClearButton, validationStatus, validationText, currValue, } = this;
|
696
|
-
// HTML inputs only accept 'string' for their value
|
697
|
-
// Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string
|
698
|
-
renderHiddenInput(true, this.el, name, this.searchable ? this.hiddenInputValue : currValue, disabled);
|
699
|
-
const invalid = validationStatus === IcInformationStatus.Error ? "true" : "false";
|
700
|
-
const describedBy = getInputDescribedByText(this.inputId, helperText !== "", hasValidationStatus(this.validationStatus, this.disabled)).trim();
|
701
|
-
const optionsSelectedCount = `${currValue === null || currValue === void 0 ? void 0 : currValue.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
|
702
|
-
return (h(Host, { class: {
|
703
|
-
["ic-select-disabled"]: disabled,
|
704
|
-
["ic-select-searchable"]: searchable,
|
705
|
-
[`ic-select-${size}`]: size !== "medium",
|
706
|
-
["ic-select-full-width"]: fullWidth,
|
707
|
-
}, onBlur: this.onBlur }, h("ic-input-container", { readonly: readonly }, !hideLabel && (h("ic-input-label", { for: this.inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly })), h("ic-input-component-container", { ref: (el) => (this.anchorEl = el), class: { "menu-open": this.open }, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, readonly ? (h("ic-typography", null, h("p", null, multiple
|
708
|
-
? this.getMultipleOptionsString(currValue)
|
709
|
-
: this.getLabelFromValue(currValue)))) : isMobileOrTablet() && !multiple ? (h("select", Object.assign({ ref: (el) => (this.nativeSelectElement = el), disabled: disabled, onChange: this.handleNativeSelectChange, required: required, id: this.inputId, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.handleNativeSelectKeyDown, form: this.form }, this.inheritedAttributes), h("option", { value: "", selected: true, disabled: !showClearButton }, placeholder), options.map((option) => {
|
710
|
-
if (option.children) {
|
711
|
-
return (h("optgroup", { label: option.label }, option.children.map((option) => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label)))));
|
712
|
-
}
|
713
|
-
else {
|
714
|
-
return (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label));
|
715
|
-
}
|
716
|
-
}))) : searchable ? (h("div", { class: "searchable-select-container" }, h("input", { class: {
|
717
|
-
"select-input": true,
|
718
|
-
"with-clear-button": !!this.searchableSelectInputValue,
|
719
|
-
}, role: "combobox", autocomplete: "off", "aria-label": label, "aria-describedby": describedBy, "aria-activedescendant": this.ariaActiveDescendant, "aria-autocomplete": "list", "aria-expanded": this.open ? "true" : "false", "aria-invalid": invalid, "aria-required": required ? "true" : "false", "aria-controls": menuId, ref: (el) => (this.searchableSelectElement = el), id: this.inputId, value: this.searchableSelectInputValue, placeholder: placeholder, disabled: disabled, onInput: this.handleSearchableSelectInput, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, form: this.form }), this.searchableSelectInputValue &&
|
720
|
-
(showClearButton || searchable) && (h("div", { class: "clear-button-container" }, h("ic-button", { id: "clear-button", ref: (el) => (this.clearButton = el), "aria-label": this.searchableSelectInputValue && currValue === null
|
721
|
-
? "Clear input"
|
722
|
-
: "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", appearance: this.clearButtonFocused
|
723
|
-
? IcThemeForegroundEnum.Light
|
724
|
-
: IcThemeForegroundEnum.Dark }), h("div", { class: "divider" }))), h("span", { onMouseDown: this.handleExpandIconMouseDown, class: {
|
725
|
-
"expand-icon": true,
|
726
|
-
"expand-icon-open": this.open,
|
727
|
-
}, innerHTML: Expand, "aria-hidden": "true" }), h("div", { "aria-live": "polite", role: "status", class: "searchable-select-results-status" }))) : (h("div", { class: "select-container" }, h("button", { class: "select-input", ref: (el) => (this.customSelectElement = el), id: this.inputId, "aria-label": `${label}, ${(multiple && currValue
|
728
|
-
? `${optionsSelectedCount}, ${this.getMultipleOptionsString(currValue)}`
|
729
|
-
: this.getLabelFromValue(currValue)) ||
|
730
|
-
placeholder}${required ? ", required" : ""}`, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-haspopup": "listbox", "aria-expanded": this.open ? "true" : "false", "aria-owns": menuId, "aria-controls": menuId, disabled: disabled, onBlur: this.onBlur, onFocus: this.onFocus, onClick: this.handleClick, onMouseDown: this.handleMouseDown, onKeyDown: this.handleKeyDown }, h("ic-typography", { variant: "body", class: {
|
731
|
-
"value-text": true,
|
732
|
-
"with-clear-button": currValue && showClearButton,
|
733
|
-
placeholder: !this.value || (multiple && this.value.length < 1),
|
734
|
-
} }, h("p", null, (multiple
|
735
|
-
? this.getMultipleOptionsString(currValue)
|
736
|
-
: this.getLabelFromValue(currValue)) ||
|
737
|
-
placeholder)), h("div", { class: "select-input-end" }, currValue && showClearButton && (h("div", { class: "divider" })), h("span", { class: {
|
738
|
-
"expand-icon": true,
|
739
|
-
"expand-icon-open": this.open,
|
740
|
-
}, innerHTML: Expand, "aria-hidden": "true" }))), currValue && showClearButton && (h("ic-button", { id: "clear-button", "aria-label": "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", appearance: this.clearButtonFocused
|
741
|
-
? IcThemeForegroundEnum.Light
|
742
|
-
: IcThemeForegroundEnum.Dark }))))), (!isMobileOrTablet() || multiple) && (h("ic-menu-with-multi", { class: {
|
743
|
-
"no-results": this.loading ||
|
744
|
-
this.hasTimedOut ||
|
745
|
-
(this.noOptions !== null &&
|
746
|
-
this.noOptions[0] &&
|
747
|
-
this.noOptions[0].label === this.emptyOptionListText),
|
748
|
-
}, ref: (el) => (this.menu = el), inputEl: searchable
|
749
|
-
? this.searchableSelectElement
|
750
|
-
: this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, size: size, menuId: menuId, open: this.open, options: searchable ? this.filteredOptions : this.uniqueOptions, value: multiple ? currValue : currValue, fullWidth: fullWidth, selectOnEnter: this.selectOnEnter, onMenuStateChange: this.handleMenuChange, onMenuOptionSelect: this.handleCustomSelectChange, onMenuOptionSelectAll: this.handleSelectAllChange, onMenuKeyPress: this.handleMenuKeyPress, onUngroupedOptionsSet: this.setUngroupedOptions, onRetryButtonClicked: this.handleRetry, parentEl: this.el, onTimeoutBlur: this.onTimeoutBlur, activationType: this.searchable || multiple || this.selectOnEnter
|
751
|
-
? "manual"
|
752
|
-
: "automatic", closeOnSelect: !multiple })), this.multiple && (h("div", { "aria-live": "polite", role: "status", class: "multi-select-selected-count" })), hasValidationStatus(this.validationStatus, this.disabled) && (h("ic-input-validation", { class: { "menu-open": this.open }, ariaLiveMode: "polite", status: validationStatus, message: validationText, for: this.inputId })))));
|
753
|
-
}
|
754
|
-
static get is() { return "ic-select-with-multi"; }
|
755
|
-
static get encapsulation() { return "shadow"; }
|
756
|
-
static get delegatesFocus() { return true; }
|
757
|
-
static get originalStyleUrls() {
|
758
|
-
return {
|
759
|
-
"$": ["ic-select.css"]
|
760
|
-
};
|
761
|
-
}
|
762
|
-
static get styleUrls() {
|
763
|
-
return {
|
764
|
-
"$": ["ic-select.css"]
|
765
|
-
};
|
766
|
-
}
|
767
|
-
static get properties() {
|
768
|
-
return {
|
769
|
-
"disabled": {
|
770
|
-
"type": "boolean",
|
771
|
-
"mutable": false,
|
772
|
-
"complexType": {
|
773
|
-
"original": "boolean",
|
774
|
-
"resolved": "boolean",
|
775
|
-
"references": {}
|
776
|
-
},
|
777
|
-
"required": false,
|
778
|
-
"optional": true,
|
779
|
-
"docs": {
|
780
|
-
"tags": [],
|
781
|
-
"text": "If `true`, the disabled state will be set."
|
782
|
-
},
|
783
|
-
"attribute": "disabled",
|
784
|
-
"reflect": true,
|
785
|
-
"defaultValue": "false"
|
786
|
-
},
|
787
|
-
"disableAutoFiltering": {
|
788
|
-
"type": "boolean",
|
789
|
-
"mutable": false,
|
790
|
-
"complexType": {
|
791
|
-
"original": "boolean",
|
792
|
-
"resolved": "boolean",
|
793
|
-
"references": {}
|
794
|
-
},
|
795
|
-
"required": false,
|
796
|
-
"optional": true,
|
797
|
-
"docs": {
|
798
|
-
"tags": [],
|
799
|
-
"text": "If `true`, the built in filtering will be disabled for a searchable variant. For example, if options will already be filtered from external source."
|
800
|
-
},
|
801
|
-
"attribute": "disable-auto-filtering",
|
802
|
-
"reflect": false,
|
803
|
-
"defaultValue": "false"
|
804
|
-
},
|
805
|
-
"emptyOptionListText": {
|
806
|
-
"type": "string",
|
807
|
-
"mutable": false,
|
808
|
-
"complexType": {
|
809
|
-
"original": "string",
|
810
|
-
"resolved": "string",
|
811
|
-
"references": {}
|
812
|
-
},
|
813
|
-
"required": false,
|
814
|
-
"optional": false,
|
815
|
-
"docs": {
|
816
|
-
"tags": [],
|
817
|
-
"text": "The text displayed when there are no options in the option list."
|
818
|
-
},
|
819
|
-
"attribute": "empty-option-list-text",
|
820
|
-
"reflect": false,
|
821
|
-
"defaultValue": "\"No results found\""
|
822
|
-
},
|
823
|
-
"form": {
|
824
|
-
"type": "string",
|
825
|
-
"mutable": false,
|
826
|
-
"complexType": {
|
827
|
-
"original": "string",
|
828
|
-
"resolved": "string",
|
829
|
-
"references": {}
|
830
|
-
},
|
831
|
-
"required": false,
|
832
|
-
"optional": true,
|
833
|
-
"docs": {
|
834
|
-
"tags": [],
|
835
|
-
"text": "The <form> element to associate the select with."
|
836
|
-
},
|
837
|
-
"attribute": "form",
|
838
|
-
"reflect": false
|
839
|
-
},
|
840
|
-
"fullWidth": {
|
841
|
-
"type": "boolean",
|
842
|
-
"mutable": false,
|
843
|
-
"complexType": {
|
844
|
-
"original": "boolean",
|
845
|
-
"resolved": "boolean",
|
846
|
-
"references": {}
|
847
|
-
},
|
848
|
-
"required": false,
|
849
|
-
"optional": false,
|
850
|
-
"docs": {
|
851
|
-
"tags": [],
|
852
|
-
"text": "If `true`, the select element will fill the width of the container. This prop should only be used with searchable select and will only be applied if searchable is true."
|
853
|
-
},
|
854
|
-
"attribute": "full-width",
|
855
|
-
"reflect": false,
|
856
|
-
"defaultValue": "false"
|
857
|
-
},
|
858
|
-
"helperText": {
|
859
|
-
"type": "string",
|
860
|
-
"mutable": false,
|
861
|
-
"complexType": {
|
862
|
-
"original": "string",
|
863
|
-
"resolved": "string",
|
864
|
-
"references": {}
|
865
|
-
},
|
866
|
-
"required": false,
|
867
|
-
"optional": true,
|
868
|
-
"docs": {
|
869
|
-
"tags": [],
|
870
|
-
"text": "The helper text that will be displayed for additional field guidance."
|
871
|
-
},
|
872
|
-
"attribute": "helper-text",
|
873
|
-
"reflect": false,
|
874
|
-
"defaultValue": "\"\""
|
875
|
-
},
|
876
|
-
"hideLabel": {
|
877
|
-
"type": "boolean",
|
878
|
-
"mutable": false,
|
879
|
-
"complexType": {
|
880
|
-
"original": "boolean",
|
881
|
-
"resolved": "boolean",
|
882
|
-
"references": {}
|
883
|
-
},
|
884
|
-
"required": false,
|
885
|
-
"optional": true,
|
886
|
-
"docs": {
|
887
|
-
"tags": [],
|
888
|
-
"text": "If `true`, the label will be hidden and the required label value will be applied as an aria-label."
|
889
|
-
},
|
890
|
-
"attribute": "hide-label",
|
891
|
-
"reflect": false,
|
892
|
-
"defaultValue": "false"
|
893
|
-
},
|
894
|
-
"includeDescriptionsInSearch": {
|
895
|
-
"type": "boolean",
|
896
|
-
"mutable": false,
|
897
|
-
"complexType": {
|
898
|
-
"original": "boolean",
|
899
|
-
"resolved": "boolean",
|
900
|
-
"references": {}
|
901
|
-
},
|
902
|
-
"required": false,
|
903
|
-
"optional": true,
|
904
|
-
"docs": {
|
905
|
-
"tags": [],
|
906
|
-
"text": "If `true`, descriptions of options will be included when filtering options in a searchable select. Only applies to built in filtering."
|
907
|
-
},
|
908
|
-
"attribute": "include-descriptions-in-search",
|
909
|
-
"reflect": false,
|
910
|
-
"defaultValue": "false"
|
911
|
-
},
|
912
|
-
"includeGroupTitlesInSearch": {
|
913
|
-
"type": "boolean",
|
914
|
-
"mutable": false,
|
915
|
-
"complexType": {
|
916
|
-
"original": "boolean",
|
917
|
-
"resolved": "boolean",
|
918
|
-
"references": {}
|
919
|
-
},
|
920
|
-
"required": false,
|
921
|
-
"optional": true,
|
922
|
-
"docs": {
|
923
|
-
"tags": [],
|
924
|
-
"text": "If `true`, group titles of grouped options will be included when filtering options in a searchable select. Only applies to built in filtering."
|
925
|
-
},
|
926
|
-
"attribute": "include-group-titles-in-search",
|
927
|
-
"reflect": false,
|
928
|
-
"defaultValue": "false"
|
929
|
-
},
|
930
|
-
"label": {
|
931
|
-
"type": "string",
|
932
|
-
"mutable": false,
|
933
|
-
"complexType": {
|
934
|
-
"original": "string",
|
935
|
-
"resolved": "string",
|
936
|
-
"references": {}
|
937
|
-
},
|
938
|
-
"required": true,
|
939
|
-
"optional": false,
|
940
|
-
"docs": {
|
941
|
-
"tags": [],
|
942
|
-
"text": "The label for the select."
|
943
|
-
},
|
944
|
-
"attribute": "label",
|
945
|
-
"reflect": false
|
946
|
-
},
|
947
|
-
"loadingErrorLabel": {
|
948
|
-
"type": "string",
|
949
|
-
"mutable": false,
|
950
|
-
"complexType": {
|
951
|
-
"original": "string",
|
952
|
-
"resolved": "string",
|
953
|
-
"references": {}
|
954
|
-
},
|
955
|
-
"required": false,
|
956
|
-
"optional": true,
|
957
|
-
"docs": {
|
958
|
-
"tags": [],
|
959
|
-
"text": "The message displayed when external loading times out."
|
960
|
-
},
|
961
|
-
"attribute": "loading-error-label",
|
962
|
-
"reflect": false,
|
963
|
-
"defaultValue": "\"Loading Error\""
|
964
|
-
},
|
965
|
-
"loadingLabel": {
|
966
|
-
"type": "string",
|
967
|
-
"mutable": false,
|
968
|
-
"complexType": {
|
969
|
-
"original": "string",
|
970
|
-
"resolved": "string",
|
971
|
-
"references": {}
|
972
|
-
},
|
973
|
-
"required": false,
|
974
|
-
"optional": true,
|
975
|
-
"docs": {
|
976
|
-
"tags": [],
|
977
|
-
"text": "The message displayed whilst the options are being loaded externally."
|
978
|
-
},
|
979
|
-
"attribute": "loading-label",
|
980
|
-
"reflect": false,
|
981
|
-
"defaultValue": "\"Loading...\""
|
982
|
-
},
|
983
|
-
"multiple": {
|
984
|
-
"type": "boolean",
|
985
|
-
"mutable": false,
|
986
|
-
"complexType": {
|
987
|
-
"original": "boolean",
|
988
|
-
"resolved": "boolean",
|
989
|
-
"references": {}
|
990
|
-
},
|
991
|
-
"required": false,
|
992
|
-
"optional": true,
|
993
|
-
"docs": {
|
994
|
-
"tags": [],
|
995
|
-
"text": "If `true`, multiple options can be selected."
|
996
|
-
},
|
997
|
-
"attribute": "multiple",
|
998
|
-
"reflect": false,
|
999
|
-
"defaultValue": "false"
|
1000
|
-
},
|
1001
|
-
"name": {
|
1002
|
-
"type": "string",
|
1003
|
-
"mutable": false,
|
1004
|
-
"complexType": {
|
1005
|
-
"original": "string",
|
1006
|
-
"resolved": "string",
|
1007
|
-
"references": {}
|
1008
|
-
},
|
1009
|
-
"required": false,
|
1010
|
-
"optional": true,
|
1011
|
-
"docs": {
|
1012
|
-
"tags": [],
|
1013
|
-
"text": "The name of the control, which is submitted with the form data."
|
1014
|
-
},
|
1015
|
-
"attribute": "name",
|
1016
|
-
"reflect": false,
|
1017
|
-
"defaultValue": "this.inputId"
|
1018
|
-
},
|
1019
|
-
"placeholder": {
|
1020
|
-
"type": "string",
|
1021
|
-
"mutable": false,
|
1022
|
-
"complexType": {
|
1023
|
-
"original": "string",
|
1024
|
-
"resolved": "string",
|
1025
|
-
"references": {}
|
1026
|
-
},
|
1027
|
-
"required": false,
|
1028
|
-
"optional": true,
|
1029
|
-
"docs": {
|
1030
|
-
"tags": [],
|
1031
|
-
"text": "The placeholder value to be displayed."
|
1032
|
-
},
|
1033
|
-
"attribute": "placeholder",
|
1034
|
-
"reflect": false,
|
1035
|
-
"defaultValue": "\"Select an option\""
|
1036
|
-
},
|
1037
|
-
"readonly": {
|
1038
|
-
"type": "boolean",
|
1039
|
-
"mutable": false,
|
1040
|
-
"complexType": {
|
1041
|
-
"original": "boolean",
|
1042
|
-
"resolved": "boolean",
|
1043
|
-
"references": {}
|
1044
|
-
},
|
1045
|
-
"required": false,
|
1046
|
-
"optional": true,
|
1047
|
-
"docs": {
|
1048
|
-
"tags": [],
|
1049
|
-
"text": "If `true`, the readonly state will be set."
|
1050
|
-
},
|
1051
|
-
"attribute": "readonly",
|
1052
|
-
"reflect": false,
|
1053
|
-
"defaultValue": "false"
|
1054
|
-
},
|
1055
|
-
"required": {
|
1056
|
-
"type": "boolean",
|
1057
|
-
"mutable": false,
|
1058
|
-
"complexType": {
|
1059
|
-
"original": "boolean",
|
1060
|
-
"resolved": "boolean",
|
1061
|
-
"references": {}
|
1062
|
-
},
|
1063
|
-
"required": false,
|
1064
|
-
"optional": true,
|
1065
|
-
"docs": {
|
1066
|
-
"tags": [],
|
1067
|
-
"text": "If `true`, the select will require a value."
|
1068
|
-
},
|
1069
|
-
"attribute": "required",
|
1070
|
-
"reflect": false,
|
1071
|
-
"defaultValue": "false"
|
1072
|
-
},
|
1073
|
-
"searchable": {
|
1074
|
-
"type": "boolean",
|
1075
|
-
"mutable": false,
|
1076
|
-
"complexType": {
|
1077
|
-
"original": "boolean",
|
1078
|
-
"resolved": "boolean",
|
1079
|
-
"references": {}
|
1080
|
-
},
|
1081
|
-
"required": false,
|
1082
|
-
"optional": true,
|
1083
|
-
"docs": {
|
1084
|
-
"tags": [],
|
1085
|
-
"text": "If `true`, a searchable variant of the select will be displayed which can be typed in to filter options."
|
1086
|
-
},
|
1087
|
-
"attribute": "searchable",
|
1088
|
-
"reflect": false,
|
1089
|
-
"defaultValue": "false"
|
1090
|
-
},
|
1091
|
-
"searchMatchPosition": {
|
1092
|
-
"type": "string",
|
1093
|
-
"mutable": false,
|
1094
|
-
"complexType": {
|
1095
|
-
"original": "IcSearchMatchPositions",
|
1096
|
-
"resolved": "\"anywhere\" | \"start\"",
|
1097
|
-
"references": {
|
1098
|
-
"IcSearchMatchPositions": {
|
1099
|
-
"location": "import",
|
1100
|
-
"path": "../../utils/types",
|
1101
|
-
"id": "src/utils/types.ts::IcSearchMatchPositions"
|
1102
|
-
}
|
1103
|
-
}
|
1104
|
-
},
|
1105
|
-
"required": false,
|
1106
|
-
"optional": true,
|
1107
|
-
"docs": {
|
1108
|
-
"tags": [],
|
1109
|
-
"text": "Whether the search string of the searchable select should match the start of or anywhere in the options. Only applies to built in filtering."
|
1110
|
-
},
|
1111
|
-
"attribute": "search-match-position",
|
1112
|
-
"reflect": false,
|
1113
|
-
"defaultValue": "\"anywhere\""
|
1114
|
-
},
|
1115
|
-
"selectOnEnter": {
|
1116
|
-
"type": "boolean",
|
1117
|
-
"mutable": false,
|
1118
|
-
"complexType": {
|
1119
|
-
"original": "boolean",
|
1120
|
-
"resolved": "boolean",
|
1121
|
-
"references": {}
|
1122
|
-
},
|
1123
|
-
"required": false,
|
1124
|
-
"optional": true,
|
1125
|
-
"docs": {
|
1126
|
-
"tags": [],
|
1127
|
-
"text": "If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown."
|
1128
|
-
},
|
1129
|
-
"attribute": "select-on-enter",
|
1130
|
-
"reflect": false,
|
1131
|
-
"defaultValue": "false"
|
1132
|
-
},
|
1133
|
-
"showClearButton": {
|
1134
|
-
"type": "boolean",
|
1135
|
-
"mutable": false,
|
1136
|
-
"complexType": {
|
1137
|
-
"original": "boolean",
|
1138
|
-
"resolved": "boolean",
|
1139
|
-
"references": {}
|
1140
|
-
},
|
1141
|
-
"required": false,
|
1142
|
-
"optional": true,
|
1143
|
-
"docs": {
|
1144
|
-
"tags": [],
|
1145
|
-
"text": "If `true`, a button which clears the select input when clicked will be displayed. The button will always appear on the searchable select."
|
1146
|
-
},
|
1147
|
-
"attribute": "show-clear-button",
|
1148
|
-
"reflect": false,
|
1149
|
-
"defaultValue": "false"
|
1150
|
-
},
|
1151
|
-
"size": {
|
1152
|
-
"type": "string",
|
1153
|
-
"mutable": false,
|
1154
|
-
"complexType": {
|
1155
|
-
"original": "IcSizes",
|
1156
|
-
"resolved": "\"large\" | \"medium\" | \"small\"",
|
1157
|
-
"references": {
|
1158
|
-
"IcSizes": {
|
1159
|
-
"location": "import",
|
1160
|
-
"path": "../../utils/types",
|
1161
|
-
"id": "src/utils/types.ts::IcSizes"
|
1162
|
-
}
|
1163
|
-
}
|
1164
|
-
},
|
1165
|
-
"required": false,
|
1166
|
-
"optional": true,
|
1167
|
-
"docs": {
|
1168
|
-
"tags": [],
|
1169
|
-
"text": "The size of the select."
|
1170
|
-
},
|
1171
|
-
"attribute": "size",
|
1172
|
-
"reflect": false,
|
1173
|
-
"defaultValue": "\"medium\""
|
1174
|
-
},
|
1175
|
-
"timeout": {
|
1176
|
-
"type": "number",
|
1177
|
-
"mutable": false,
|
1178
|
-
"complexType": {
|
1179
|
-
"original": "number",
|
1180
|
-
"resolved": "number",
|
1181
|
-
"references": {}
|
1182
|
-
},
|
1183
|
-
"required": false,
|
1184
|
-
"optional": true,
|
1185
|
-
"docs": {
|
1186
|
-
"tags": [],
|
1187
|
-
"text": "If using external filtering, set a timeout for when loading takes too long."
|
1188
|
-
},
|
1189
|
-
"attribute": "timeout",
|
1190
|
-
"reflect": false
|
1191
|
-
},
|
1192
|
-
"validationStatus": {
|
1193
|
-
"type": "string",
|
1194
|
-
"mutable": false,
|
1195
|
-
"complexType": {
|
1196
|
-
"original": "IcInformationStatusOrEmpty",
|
1197
|
-
"resolved": "\"\" | \"error\" | \"success\" | \"warning\"",
|
1198
|
-
"references": {
|
1199
|
-
"IcInformationStatusOrEmpty": {
|
1200
|
-
"location": "import",
|
1201
|
-
"path": "../../utils/types",
|
1202
|
-
"id": "src/utils/types.ts::IcInformationStatusOrEmpty"
|
1203
|
-
}
|
1204
|
-
}
|
1205
|
-
},
|
1206
|
-
"required": false,
|
1207
|
-
"optional": true,
|
1208
|
-
"docs": {
|
1209
|
-
"tags": [],
|
1210
|
-
"text": "The validation status - e.g. 'error' | 'warning' | 'success'."
|
1211
|
-
},
|
1212
|
-
"attribute": "validation-status",
|
1213
|
-
"reflect": false,
|
1214
|
-
"defaultValue": "\"\""
|
1215
|
-
},
|
1216
|
-
"validationText": {
|
1217
|
-
"type": "string",
|
1218
|
-
"mutable": false,
|
1219
|
-
"complexType": {
|
1220
|
-
"original": "string",
|
1221
|
-
"resolved": "string",
|
1222
|
-
"references": {}
|
1223
|
-
},
|
1224
|
-
"required": false,
|
1225
|
-
"optional": true,
|
1226
|
-
"docs": {
|
1227
|
-
"tags": [],
|
1228
|
-
"text": "The text to display as the validation message."
|
1229
|
-
},
|
1230
|
-
"attribute": "validation-text",
|
1231
|
-
"reflect": false,
|
1232
|
-
"defaultValue": "\"\""
|
1233
|
-
},
|
1234
|
-
"loading": {
|
1235
|
-
"type": "boolean",
|
1236
|
-
"mutable": true,
|
1237
|
-
"complexType": {
|
1238
|
-
"original": "boolean",
|
1239
|
-
"resolved": "boolean",
|
1240
|
-
"references": {}
|
1241
|
-
},
|
1242
|
-
"required": false,
|
1243
|
-
"optional": true,
|
1244
|
-
"docs": {
|
1245
|
-
"tags": [],
|
1246
|
-
"text": "If `true`, the loading state will be triggered when fetching options asynchronously."
|
1247
|
-
},
|
1248
|
-
"attribute": "loading",
|
1249
|
-
"reflect": false,
|
1250
|
-
"defaultValue": "false"
|
1251
|
-
},
|
1252
|
-
"options": {
|
1253
|
-
"type": "unknown",
|
1254
|
-
"mutable": false,
|
1255
|
-
"complexType": {
|
1256
|
-
"original": "IcMenuOption[]",
|
1257
|
-
"resolved": "IcMenuOption[]",
|
1258
|
-
"references": {
|
1259
|
-
"IcMenuOption": {
|
1260
|
-
"location": "import",
|
1261
|
-
"path": "@ukic/web-components/dist/types/utils/types",
|
1262
|
-
"id": "../web-components/dist/types/utils/types.d.ts::IcMenuOption"
|
1263
|
-
}
|
1264
|
-
}
|
1265
|
-
},
|
1266
|
-
"required": false,
|
1267
|
-
"optional": true,
|
1268
|
-
"docs": {
|
1269
|
-
"tags": [],
|
1270
|
-
"text": "The possible selection options."
|
1271
|
-
},
|
1272
|
-
"defaultValue": "[]"
|
1273
|
-
},
|
1274
|
-
"debounce": {
|
1275
|
-
"type": "number",
|
1276
|
-
"mutable": false,
|
1277
|
-
"complexType": {
|
1278
|
-
"original": "number",
|
1279
|
-
"resolved": "number",
|
1280
|
-
"references": {}
|
1281
|
-
},
|
1282
|
-
"required": false,
|
1283
|
-
"optional": true,
|
1284
|
-
"docs": {
|
1285
|
-
"tags": [],
|
1286
|
-
"text": "The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke."
|
1287
|
-
},
|
1288
|
-
"attribute": "debounce",
|
1289
|
-
"reflect": false,
|
1290
|
-
"defaultValue": "0"
|
1291
|
-
},
|
1292
|
-
"value": {
|
1293
|
-
"type": "string",
|
1294
|
-
"mutable": true,
|
1295
|
-
"complexType": {
|
1296
|
-
"original": "string | string[]",
|
1297
|
-
"resolved": "string | string[]",
|
1298
|
-
"references": {}
|
1299
|
-
},
|
1300
|
-
"required": false,
|
1301
|
-
"optional": true,
|
1302
|
-
"docs": {
|
1303
|
-
"tags": [],
|
1304
|
-
"text": "The value of the select, reflected by the value of the currently selected option.\nFor the searchable variant, the value is also reflected by the user input.\nFor the multi-select variant, the value must be an array of option values."
|
1305
|
-
},
|
1306
|
-
"attribute": "value",
|
1307
|
-
"reflect": false
|
1308
|
-
}
|
1309
|
-
};
|
1310
|
-
}
|
1311
|
-
static get states() {
|
1312
|
-
return {
|
1313
|
-
"ariaActiveDescendant": {},
|
1314
|
-
"clearButtonFocused": {},
|
1315
|
-
"debounceIcChange": {},
|
1316
|
-
"hiddenInputValue": {},
|
1317
|
-
"noOptions": {},
|
1318
|
-
"open": {},
|
1319
|
-
"pressedCharacters": {},
|
1320
|
-
"searchableSelectInputValue": {},
|
1321
|
-
"filteredOptions": {},
|
1322
|
-
"uniqueOptions": {},
|
1323
|
-
"currDebounce": {},
|
1324
|
-
"initialValue": {},
|
1325
|
-
"inputValueToFilter": {},
|
1326
|
-
"currValue": {}
|
1327
|
-
};
|
1328
|
-
}
|
1329
|
-
static get events() {
|
1330
|
-
return [{
|
1331
|
-
"method": "icBlur",
|
1332
|
-
"name": "icBlur",
|
1333
|
-
"bubbles": true,
|
1334
|
-
"cancelable": true,
|
1335
|
-
"composed": true,
|
1336
|
-
"docs": {
|
1337
|
-
"tags": [],
|
1338
|
-
"text": "Emitted when the select loses focus."
|
1339
|
-
},
|
1340
|
-
"complexType": {
|
1341
|
-
"original": "void",
|
1342
|
-
"resolved": "void",
|
1343
|
-
"references": {}
|
1344
|
-
}
|
1345
|
-
}, {
|
1346
|
-
"method": "icChange",
|
1347
|
-
"name": "icChange",
|
1348
|
-
"bubbles": true,
|
1349
|
-
"cancelable": true,
|
1350
|
-
"composed": true,
|
1351
|
-
"docs": {
|
1352
|
-
"tags": [],
|
1353
|
-
"text": "Emitted when the value changes."
|
1354
|
-
},
|
1355
|
-
"complexType": {
|
1356
|
-
"original": "IcValueEventDetail",
|
1357
|
-
"resolved": "IcValueEventDetail",
|
1358
|
-
"references": {
|
1359
|
-
"IcValueEventDetail": {
|
1360
|
-
"location": "import",
|
1361
|
-
"path": "../../utils/types",
|
1362
|
-
"id": "src/utils/types.ts::IcValueEventDetail"
|
1363
|
-
}
|
1364
|
-
}
|
1365
|
-
}
|
1366
|
-
}, {
|
1367
|
-
"method": "icClear",
|
1368
|
-
"name": "icClear",
|
1369
|
-
"bubbles": true,
|
1370
|
-
"cancelable": true,
|
1371
|
-
"composed": true,
|
1372
|
-
"docs": {
|
1373
|
-
"tags": [],
|
1374
|
-
"text": "Emitted when the clear button is clicked."
|
1375
|
-
},
|
1376
|
-
"complexType": {
|
1377
|
-
"original": "void",
|
1378
|
-
"resolved": "void",
|
1379
|
-
"references": {}
|
1380
|
-
}
|
1381
|
-
}, {
|
1382
|
-
"method": "icFocus",
|
1383
|
-
"name": "icFocus",
|
1384
|
-
"bubbles": true,
|
1385
|
-
"cancelable": true,
|
1386
|
-
"composed": true,
|
1387
|
-
"docs": {
|
1388
|
-
"tags": [],
|
1389
|
-
"text": "Emitted when the select gains focus."
|
1390
|
-
},
|
1391
|
-
"complexType": {
|
1392
|
-
"original": "void",
|
1393
|
-
"resolved": "void",
|
1394
|
-
"references": {}
|
1395
|
-
}
|
1396
|
-
}, {
|
1397
|
-
"method": "icInput",
|
1398
|
-
"name": "icInput",
|
1399
|
-
"bubbles": true,
|
1400
|
-
"cancelable": true,
|
1401
|
-
"composed": true,
|
1402
|
-
"docs": {
|
1403
|
-
"tags": [],
|
1404
|
-
"text": "Emitted when a keyboard input occurred."
|
1405
|
-
},
|
1406
|
-
"complexType": {
|
1407
|
-
"original": "IcValueEventDetail",
|
1408
|
-
"resolved": "IcValueEventDetail",
|
1409
|
-
"references": {
|
1410
|
-
"IcValueEventDetail": {
|
1411
|
-
"location": "import",
|
1412
|
-
"path": "../../utils/types",
|
1413
|
-
"id": "src/utils/types.ts::IcValueEventDetail"
|
1414
|
-
}
|
1415
|
-
}
|
1416
|
-
}
|
1417
|
-
}, {
|
1418
|
-
"method": "icOptionSelect",
|
1419
|
-
"name": "icOptionSelect",
|
1420
|
-
"bubbles": true,
|
1421
|
-
"cancelable": true,
|
1422
|
-
"composed": true,
|
1423
|
-
"docs": {
|
1424
|
-
"tags": [],
|
1425
|
-
"text": "Emitted when an option is selected.\nSelecting an option will also trigger an `icChange/onIcChange` due to the value being updated."
|
1426
|
-
},
|
1427
|
-
"complexType": {
|
1428
|
-
"original": "IcOptionSelectEventDetail",
|
1429
|
-
"resolved": "IcOptionSelectEventDetail",
|
1430
|
-
"references": {
|
1431
|
-
"IcOptionSelectEventDetail": {
|
1432
|
-
"location": "import",
|
1433
|
-
"path": "@ukic/web-components/dist/types/components",
|
1434
|
-
"id": "../web-components/dist/types/components.d.ts::IcOptionSelectEventDetail"
|
1435
|
-
}
|
1436
|
-
}
|
1437
|
-
}
|
1438
|
-
}, {
|
1439
|
-
"method": "icOptionDeselect",
|
1440
|
-
"name": "icOptionDeselect",
|
1441
|
-
"bubbles": true,
|
1442
|
-
"cancelable": true,
|
1443
|
-
"composed": true,
|
1444
|
-
"docs": {
|
1445
|
-
"tags": [],
|
1446
|
-
"text": "Emitted when `multiple` is `true` and an option is deselected."
|
1447
|
-
},
|
1448
|
-
"complexType": {
|
1449
|
-
"original": "IcOptionSelectEventDetail",
|
1450
|
-
"resolved": "IcOptionSelectEventDetail",
|
1451
|
-
"references": {
|
1452
|
-
"IcOptionSelectEventDetail": {
|
1453
|
-
"location": "import",
|
1454
|
-
"path": "@ukic/web-components/dist/types/components",
|
1455
|
-
"id": "../web-components/dist/types/components.d.ts::IcOptionSelectEventDetail"
|
1456
|
-
}
|
1457
|
-
}
|
1458
|
-
}
|
1459
|
-
}, {
|
1460
|
-
"method": "icRetryLoad",
|
1461
|
-
"name": "icRetryLoad",
|
1462
|
-
"bubbles": true,
|
1463
|
-
"cancelable": true,
|
1464
|
-
"composed": true,
|
1465
|
-
"docs": {
|
1466
|
-
"tags": [],
|
1467
|
-
"text": "Emitted when the 'retry loading' button is clicked for a searchable variant."
|
1468
|
-
},
|
1469
|
-
"complexType": {
|
1470
|
-
"original": "IcValueEventDetail",
|
1471
|
-
"resolved": "IcValueEventDetail",
|
1472
|
-
"references": {
|
1473
|
-
"IcValueEventDetail": {
|
1474
|
-
"location": "import",
|
1475
|
-
"path": "../../utils/types",
|
1476
|
-
"id": "src/utils/types.ts::IcValueEventDetail"
|
1477
|
-
}
|
1478
|
-
}
|
1479
|
-
}
|
1480
|
-
}];
|
1481
|
-
}
|
1482
|
-
static get methods() {
|
1483
|
-
return {
|
1484
|
-
"setFocus": {
|
1485
|
-
"complexType": {
|
1486
|
-
"signature": "() => Promise<void>",
|
1487
|
-
"parameters": [],
|
1488
|
-
"references": {
|
1489
|
-
"Promise": {
|
1490
|
-
"location": "global",
|
1491
|
-
"id": "global::Promise"
|
1492
|
-
}
|
1493
|
-
},
|
1494
|
-
"return": "Promise<void>"
|
1495
|
-
},
|
1496
|
-
"docs": {
|
1497
|
-
"text": "Sets focus on the input box.",
|
1498
|
-
"tags": []
|
1499
|
-
}
|
1500
|
-
}
|
1501
|
-
};
|
1502
|
-
}
|
1503
|
-
static get elementRef() { return "el"; }
|
1504
|
-
static get watchers() {
|
1505
|
-
return [{
|
1506
|
-
"propName": "loading",
|
1507
|
-
"methodName": "loadingHandler"
|
1508
|
-
}, {
|
1509
|
-
"propName": "options",
|
1510
|
-
"methodName": "watchOptionsHandler"
|
1511
|
-
}, {
|
1512
|
-
"propName": "debounce",
|
1513
|
-
"methodName": "debounceChangedHandler"
|
1514
|
-
}, {
|
1515
|
-
"propName": "value",
|
1516
|
-
"methodName": "valueChangedHandler"
|
1517
|
-
}];
|
1518
|
-
}
|
1519
|
-
}
|
1520
|
-
//# sourceMappingURL=ic-select.js.map
|