@ukic/canary-web-components 2.0.0-canary.6 → 2.0.0-canary.8
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-93c5fc92.js +198 -0
- package/dist/cjs/helpers-93c5fc92.js.map +1 -0
- package/dist/cjs/{helpers-86375e76.js → helpers-b525d45a.js} +45 -4
- package/dist/cjs/helpers-b525d45a.js.map +1 -0
- package/dist/cjs/ic-accordion-group.cjs.entry.js +6 -2
- package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +2 -2
- 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 +4 -3
- package/dist/cjs/ic-badge.cjs.entry.js.map +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 +34 -10
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +7 -7
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js +3 -6
- package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +21 -35
- package/dist/cjs/ic-data-row.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 +1 -1
- package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-footer.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +12 -10
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +2599 -0
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-pagination-bar.cjs.entry.js +2 -18
- package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +21 -13
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +837 -0
- package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -5
- 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 +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +1 -1
- package/dist/cjs/ic-theme.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +184 -0
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -0
- package/dist/cjs/ic-toggle-button.cjs.entry.js +6 -3
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +1 -1
- package/dist/cjs/index-4cf27b16.js +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/ic-menu-with-multi/ic-menu.css +701 -0
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js +1458 -0
- package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -0
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +880 -0
- package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/assets/Check.svg +3 -0
- package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +3 -0
- package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +3 -0
- package/dist/collection/components/ic-select-with-multi/ic-select.css +693 -0
- package/dist/collection/components/ic-select-with-multi/ic-select.js +1649 -0
- package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/story-data.js +216 -0
- package/dist/collection/components/ic-select-with-multi/story-data.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js +146 -0
- package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js +2040 -0
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js.map +1 -0
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +1518 -0
- package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -0
- package/dist/collection/utils/constants.js +28 -0
- package/dist/collection/utils/constants.js.map +1 -0
- package/dist/collection/utils/helpers.js +168 -5
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/types.js +13 -0
- package/dist/collection/utils/types.js.map +1 -0
- package/dist/components/helpers.js +44 -4
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/helpers2.js +183 -0
- package/dist/components/helpers2.js.map +1 -0
- package/dist/components/ic-accordion-group.js +7 -2
- package/dist/components/ic-accordion-group.js.map +1 -1
- package/dist/components/ic-alert2.js +1 -1
- package/dist/components/ic-alert2.js.map +1 -1
- package/dist/components/ic-back-to-top.js +1 -1
- package/dist/components/ic-badge.js +4 -3
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +1 -1
- package/dist/components/ic-breadcrumb2.js +1 -1
- package/dist/components/ic-button2.js +38 -9
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card.js +8 -20
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox-group.js +1 -1
- package/dist/components/ic-checkbox.js +1 -1
- package/dist/components/ic-chip.js +1 -1
- package/dist/components/ic-data-entity.js +3 -6
- package/dist/components/ic-data-entity.js.map +1 -1
- package/dist/components/ic-data-row.js +21 -35
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-dialog.js +5 -2
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-divider2.js +1 -1
- package/dist/components/ic-footer-link-group.js +1 -1
- package/dist/components/ic-footer-link.js +1 -1
- package/dist/components/ic-footer.js +1 -1
- package/dist/components/ic-hero.js +1 -1
- package/dist/components/ic-horizontal-scroll2.js +1 -1
- package/dist/components/ic-input-component-container2.js +7 -6
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-input-label2.js +1 -1
- package/dist/components/ic-input-validation2.js +1 -1
- package/dist/components/ic-loading-indicator2.js +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-item2.js +1 -1
- package/dist/components/ic-menu-with-multi.d.ts +11 -0
- package/dist/components/ic-menu-with-multi.js +8 -0
- package/dist/components/ic-menu-with-multi.js.map +1 -0
- package/dist/components/ic-menu2.js +5 -4
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-menu3.js +2665 -0
- package/dist/components/ic-menu3.js.map +1 -0
- package/dist/components/ic-navigation-button.js +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-menu2.js +1 -1
- package/dist/components/ic-page-header.js +1 -1
- package/dist/components/ic-pagination-bar2.js +1 -17
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-pagination-item2.js +1 -1
- package/dist/components/ic-pagination2.js +1 -1
- package/dist/components/ic-popover-menu.js +2 -2
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +1 -1
- package/dist/components/ic-radio-option.js +1 -1
- package/dist/components/ic-search-bar.js +1 -1
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select-with-multi.d.ts +11 -0
- package/dist/components/ic-select-with-multi.js +962 -0
- package/dist/components/ic-select-with-multi.js.map +1 -0
- package/dist/components/ic-select2.js +23 -14
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +1 -5
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-step.js +1 -1
- package/dist/components/ic-stepper.js +1 -1
- package/dist/components/ic-switch.js +1 -1
- package/dist/components/ic-tab-panel.js +1 -1
- package/dist/components/ic-tab.js +1 -1
- package/dist/components/ic-text-field2.js +1 -1
- package/dist/components/ic-theme.js +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toggle-button-group.js +210 -0
- package/dist/components/ic-toggle-button-group.js.map +1 -0
- package/dist/components/ic-toggle-button.js +6 -3
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tooltip2.js +1 -1
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +1 -1
- package/dist/core/core.css +8 -5
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-4119a26b.entry.js → p-045359e1.entry.js} +2 -2
- package/dist/core/{p-cae71c32.entry.js → p-10fb4c46.entry.js} +2 -2
- package/dist/core/{p-7a0790e4.entry.js → p-169bfa51.entry.js} +2 -2
- package/dist/core/{p-56645c00.entry.js → p-1ca332ca.entry.js} +2 -2
- package/dist/core/{p-fddc7254.entry.js → p-204ace96.entry.js} +2 -2
- package/dist/core/p-21150122.entry.js +2 -0
- package/dist/core/p-21150122.entry.js.map +1 -0
- package/dist/core/{p-5332a426.entry.js → p-2eac7dcc.entry.js} +2 -2
- package/dist/core/{p-3294eba4.entry.js → p-3803a5b5.entry.js} +2 -2
- package/dist/core/{p-24945ee5.entry.js → p-452985d9.entry.js} +2 -2
- package/dist/core/p-452985d9.entry.js.map +1 -0
- package/dist/core/p-4753bac8.entry.js +2 -0
- package/dist/core/p-4753bac8.entry.js.map +1 -0
- package/dist/core/{p-a048beab.entry.js → p-4baa0916.entry.js} +2 -2
- package/dist/core/{p-7e0197a4.entry.js → p-4f413fc0.entry.js} +2 -2
- package/dist/core/{p-a6a90c56.entry.js → p-595be57d.entry.js} +2 -2
- package/dist/core/{p-5f8c4c83.entry.js → p-5ae93c16.entry.js} +2 -2
- package/dist/core/{p-03fdee20.entry.js → p-5e0c830b.entry.js} +2 -2
- package/dist/core/{p-03fdee20.entry.js.map → p-5e0c830b.entry.js.map} +1 -1
- package/dist/core/p-624d4f5f.entry.js +2 -0
- package/dist/core/p-624d4f5f.entry.js.map +1 -0
- package/dist/core/{p-fff91bd9.entry.js → p-6933f8e9.entry.js} +2 -2
- package/dist/core/{p-043e4073.entry.js → p-6c3044b6.entry.js} +2 -2
- package/dist/core/{p-7b17f3ce.entry.js → p-73be1251.entry.js} +2 -2
- package/dist/core/{p-e0d8d7a5.entry.js → p-75dac3d1.entry.js} +2 -2
- package/dist/core/{p-a3ab9f4c.entry.js → p-76915584.entry.js} +2 -2
- package/dist/core/p-76915584.entry.js.map +1 -0
- package/dist/core/{p-78ad0c34.entry.js → p-7ef8d616.entry.js} +2 -2
- package/dist/core/{p-78ad0c34.entry.js.map → p-7ef8d616.entry.js.map} +1 -1
- package/dist/core/{p-f2318ddc.entry.js → p-81ddc39d.entry.js} +2 -2
- package/dist/core/{p-3e36c9e4.entry.js → p-869954a2.entry.js} +2 -2
- package/dist/core/{p-a561980f.entry.js → p-88d54b72.entry.js} +2 -2
- package/dist/core/{p-f4c11be0.entry.js → p-8b08d8fe.entry.js} +2 -2
- package/dist/core/p-8b08d8fe.entry.js.map +1 -0
- package/dist/core/{p-c2884fcd.entry.js → p-917c5721.entry.js} +2 -2
- package/dist/core/{p-217db3af.entry.js → p-942282cd.entry.js} +2 -2
- package/dist/core/p-99cad6c2.js +2 -0
- package/dist/core/p-99cad6c2.js.map +1 -0
- package/dist/core/p-9caf19eb.js +2 -0
- package/dist/core/p-9caf19eb.js.map +1 -0
- package/dist/core/{p-99a9ce86.entry.js → p-a0f8efb2.entry.js} +2 -2
- package/dist/core/{p-234edce6.entry.js → p-a31031a5.entry.js} +2 -2
- package/dist/core/{p-faaa06d7.entry.js → p-a434c3d4.entry.js} +2 -2
- package/dist/core/{p-ae337896.entry.js → p-a43c12cd.entry.js} +2 -2
- package/dist/core/{p-010053ab.entry.js → p-a50c3b9e.entry.js} +2 -2
- package/dist/core/{p-b4591bfe.entry.js → p-ab09986c.entry.js} +2 -2
- package/dist/core/p-ab09986c.entry.js.map +1 -0
- package/dist/core/p-ac4e40a7.entry.js +2 -0
- package/dist/core/p-ac4e40a7.entry.js.map +1 -0
- package/dist/core/{p-cedabab7.entry.js → p-b82dcc29.entry.js} +2 -2
- package/dist/core/{p-8eaed5b7.entry.js → p-ba86928c.entry.js} +2 -2
- package/dist/core/{p-9c6e48fb.entry.js → p-c125b65a.entry.js} +2 -2
- package/dist/core/{p-452be32a.entry.js → p-c34848da.entry.js} +2 -2
- package/dist/core/{p-1e9f689b.entry.js → p-d8469ac0.entry.js} +2 -2
- package/dist/core/{p-79b39c8a.entry.js → p-db9c03c0.entry.js} +2 -2
- package/dist/core/{p-dd0a5ef0.entry.js → p-e0462b23.entry.js} +2 -2
- package/dist/core/p-e0462b23.entry.js.map +1 -0
- package/dist/core/p-e0a94f2d.entry.js +2 -0
- package/dist/core/p-e0a94f2d.entry.js.map +1 -0
- package/dist/core/{p-eb922333.entry.js → p-e3997d60.entry.js} +2 -2
- package/dist/core/p-e79e0292.entry.js +2 -0
- package/dist/core/p-e79e0292.entry.js.map +1 -0
- package/dist/core/{p-26ca8030.entry.js → p-e834344e.entry.js} +2 -2
- package/dist/core/{p-2addb040.entry.js → p-f14454b1.entry.js} +2 -2
- package/dist/core/{p-e9bc9ee2.entry.js → p-f3c840cd.entry.js} +2 -2
- package/dist/core/{p-e9bc9ee2.entry.js.map → p-f3c840cd.entry.js.map} +1 -1
- package/dist/core/{p-fc406db5.entry.js → p-f6888309.entry.js} +2 -2
- package/dist/core/p-f74a8752.entry.js +2 -0
- package/dist/core/p-f74a8752.entry.js.map +1 -0
- package/dist/core/{p-e31125df.entry.js → p-f7a14c01.entry.js} +2 -2
- package/dist/core/{p-da1f0a53.entry.js → p-f843da01.entry.js} +2 -2
- package/dist/core/{p-da1f0a53.entry.js.map → p-f843da01.entry.js.map} +1 -1
- package/dist/core/{p-b7d5ced3.entry.js → p-fc5611e2.entry.js} +2 -2
- package/dist/core/p-fc5611e2.entry.js.map +1 -0
- package/dist/core/p-fde45b29.entry.js +2 -0
- package/dist/core/p-fde45b29.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-229a5574.js → helpers-12b4266a.js} +45 -5
- package/dist/esm/helpers-12b4266a.js.map +1 -0
- package/dist/esm/helpers-5271897c.js +183 -0
- package/dist/esm/helpers-5271897c.js.map +1 -0
- package/dist/esm/ic-accordion-group.entry.js +6 -2
- package/dist/esm/ic-accordion-group.entry.js.map +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +2 -2
- 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 +4 -3
- package/dist/esm/ic-badge.entry.js.map +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 +34 -10
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +7 -7
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-entity.entry.js +3 -6
- package/dist/esm/ic-data-entity.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +21 -35
- package/dist/esm/ic-data-row.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 +1 -1
- package/dist/esm/ic-empty-state.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +12 -10
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-input-label_2.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +2595 -0
- package/dist/esm/ic-menu-with-multi.entry.js.map +1 -0
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination-bar.entry.js +1 -17
- package/dist/esm/ic-pagination-bar.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +21 -13
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +1 -1
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +833 -0
- package/dist/esm/ic-select-with-multi.entry.js.map +1 -0
- package/dist/esm/ic-side-navigation.entry.js +1 -5
- 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 +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +180 -0
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -0
- package/dist/esm/ic-toggle-button.entry.js +6 -3
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/esm/index-93509377.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +208 -0
- package/dist/types/components/ic-select-with-multi/ic-select.d.ts +289 -0
- package/dist/types/components/ic-select-with-multi/story-data.d.ts +32 -0
- package/dist/types/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.d.ts +1 -0
- package/dist/types/components.d.ts +531 -0
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/helpers.d.ts +61 -2
- package/dist/types/utils/types.d.ts +16 -0
- package/hydrate/index.js +6853 -2907
- package/package.json +3 -3
- package/dist/cjs/helpers-86375e76.js.map +0 -1
- package/dist/core/p-0aa1fe4e.entry.js +0 -2
- package/dist/core/p-0aa1fe4e.entry.js.map +0 -1
- package/dist/core/p-24945ee5.entry.js.map +0 -1
- package/dist/core/p-8cde58bf.entry.js +0 -2
- package/dist/core/p-8cde58bf.entry.js.map +0 -1
- package/dist/core/p-93828f0e.entry.js +0 -2
- package/dist/core/p-93828f0e.entry.js.map +0 -1
- package/dist/core/p-9fdd7d73.entry.js +0 -2
- package/dist/core/p-9fdd7d73.entry.js.map +0 -1
- package/dist/core/p-a3ab9f4c.entry.js.map +0 -1
- package/dist/core/p-b4591bfe.entry.js.map +0 -1
- package/dist/core/p-b7d5ced3.entry.js.map +0 -1
- package/dist/core/p-dd0a5ef0.entry.js.map +0 -1
- package/dist/core/p-e0102744.js +0 -2
- package/dist/core/p-e0102744.js.map +0 -1
- package/dist/core/p-e2ccb52b.entry.js +0 -2
- package/dist/core/p-e2ccb52b.entry.js.map +0 -1
- package/dist/core/p-f4c11be0.entry.js.map +0 -1
- package/dist/esm/helpers-229a5574.js.map +0 -1
- /package/dist/core/{p-4119a26b.entry.js.map → p-045359e1.entry.js.map} +0 -0
- /package/dist/core/{p-cae71c32.entry.js.map → p-10fb4c46.entry.js.map} +0 -0
- /package/dist/core/{p-7a0790e4.entry.js.map → p-169bfa51.entry.js.map} +0 -0
- /package/dist/core/{p-56645c00.entry.js.map → p-1ca332ca.entry.js.map} +0 -0
- /package/dist/core/{p-fddc7254.entry.js.map → p-204ace96.entry.js.map} +0 -0
- /package/dist/core/{p-5332a426.entry.js.map → p-2eac7dcc.entry.js.map} +0 -0
- /package/dist/core/{p-3294eba4.entry.js.map → p-3803a5b5.entry.js.map} +0 -0
- /package/dist/core/{p-a048beab.entry.js.map → p-4baa0916.entry.js.map} +0 -0
- /package/dist/core/{p-7e0197a4.entry.js.map → p-4f413fc0.entry.js.map} +0 -0
- /package/dist/core/{p-a6a90c56.entry.js.map → p-595be57d.entry.js.map} +0 -0
- /package/dist/core/{p-5f8c4c83.entry.js.map → p-5ae93c16.entry.js.map} +0 -0
- /package/dist/core/{p-fff91bd9.entry.js.map → p-6933f8e9.entry.js.map} +0 -0
- /package/dist/core/{p-043e4073.entry.js.map → p-6c3044b6.entry.js.map} +0 -0
- /package/dist/core/{p-7b17f3ce.entry.js.map → p-73be1251.entry.js.map} +0 -0
- /package/dist/core/{p-e0d8d7a5.entry.js.map → p-75dac3d1.entry.js.map} +0 -0
- /package/dist/core/{p-f2318ddc.entry.js.map → p-81ddc39d.entry.js.map} +0 -0
- /package/dist/core/{p-3e36c9e4.entry.js.map → p-869954a2.entry.js.map} +0 -0
- /package/dist/core/{p-a561980f.entry.js.map → p-88d54b72.entry.js.map} +0 -0
- /package/dist/core/{p-c2884fcd.entry.js.map → p-917c5721.entry.js.map} +0 -0
- /package/dist/core/{p-217db3af.entry.js.map → p-942282cd.entry.js.map} +0 -0
- /package/dist/core/{p-99a9ce86.entry.js.map → p-a0f8efb2.entry.js.map} +0 -0
- /package/dist/core/{p-234edce6.entry.js.map → p-a31031a5.entry.js.map} +0 -0
- /package/dist/core/{p-faaa06d7.entry.js.map → p-a434c3d4.entry.js.map} +0 -0
- /package/dist/core/{p-ae337896.entry.js.map → p-a43c12cd.entry.js.map} +0 -0
- /package/dist/core/{p-010053ab.entry.js.map → p-a50c3b9e.entry.js.map} +0 -0
- /package/dist/core/{p-cedabab7.entry.js.map → p-b82dcc29.entry.js.map} +0 -0
- /package/dist/core/{p-8eaed5b7.entry.js.map → p-ba86928c.entry.js.map} +0 -0
- /package/dist/core/{p-9c6e48fb.entry.js.map → p-c125b65a.entry.js.map} +0 -0
- /package/dist/core/{p-452be32a.entry.js.map → p-c34848da.entry.js.map} +0 -0
- /package/dist/core/{p-1e9f689b.entry.js.map → p-d8469ac0.entry.js.map} +0 -0
- /package/dist/core/{p-79b39c8a.entry.js.map → p-db9c03c0.entry.js.map} +0 -0
- /package/dist/core/{p-eb922333.entry.js.map → p-e3997d60.entry.js.map} +0 -0
- /package/dist/core/{p-26ca8030.entry.js.map → p-e834344e.entry.js.map} +0 -0
- /package/dist/core/{p-2addb040.entry.js.map → p-f14454b1.entry.js.map} +0 -0
- /package/dist/core/{p-fc406db5.entry.js.map → p-f6888309.entry.js.map} +0 -0
- /package/dist/core/{p-e31125df.entry.js.map → p-f7a14c01.entry.js.map} +0 -0
@@ -0,0 +1,1649 @@
|
|
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.disableFilter;
|
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.disableFilter) {
|
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.charactersUntilSuggestions = 0;
|
542
|
+
this.disabled = false;
|
543
|
+
this.disableFilter = false;
|
544
|
+
this.emptyOptionListText = "No results found";
|
545
|
+
this.form = undefined;
|
546
|
+
this.formaction = undefined;
|
547
|
+
this.formenctype = undefined;
|
548
|
+
this.formmethod = undefined;
|
549
|
+
this.formnovalidate = undefined;
|
550
|
+
this.formtarget = undefined;
|
551
|
+
this.fullWidth = false;
|
552
|
+
this.helperText = "";
|
553
|
+
this.hideLabel = false;
|
554
|
+
this.includeDescriptionsInSearch = false;
|
555
|
+
this.includeGroupTitlesInSearch = false;
|
556
|
+
this.label = undefined;
|
557
|
+
this.loadingErrorLabel = "Loading Error";
|
558
|
+
this.loadingLabel = "Loading...";
|
559
|
+
this.multiple = false;
|
560
|
+
this.name = this.inputId;
|
561
|
+
this.placeholder = "Select an option";
|
562
|
+
this.readonly = false;
|
563
|
+
this.required = false;
|
564
|
+
this.searchable = false;
|
565
|
+
this.searchMatchPosition = "anywhere";
|
566
|
+
this.selectOnEnter = false;
|
567
|
+
this.showClearButton = false;
|
568
|
+
this.size = "default";
|
569
|
+
this.small = false;
|
570
|
+
this.timeout = undefined;
|
571
|
+
this.validationStatus = "";
|
572
|
+
this.validationText = "";
|
573
|
+
this.loading = false;
|
574
|
+
this.options = [];
|
575
|
+
this.filteredOptions = this.options;
|
576
|
+
this.uniqueOptions = this.options;
|
577
|
+
this.debounce = 0;
|
578
|
+
this.currDebounce = this.debounce;
|
579
|
+
this.value = undefined;
|
580
|
+
this.initialValue = this.value;
|
581
|
+
this.inputValueToFilter = this.value;
|
582
|
+
this.currValue = this.value;
|
583
|
+
}
|
584
|
+
loadingHandler(newValue) {
|
585
|
+
newValue && this.triggerLoading();
|
586
|
+
}
|
587
|
+
watchOptionsHandler() {
|
588
|
+
if (!this.hasTimedOut && this.options !== this.noOptions) {
|
589
|
+
this.loading = false;
|
590
|
+
clearTimeout(this.timeoutTimer);
|
591
|
+
if (this.isExternalFiltering()) {
|
592
|
+
// When searchable select
|
593
|
+
if (this.options.length > 0) {
|
594
|
+
this.setOptionsValuesFromLabels();
|
595
|
+
this.noOptions = null;
|
596
|
+
this.uniqueOptions = this.deduplicateOptions(this.options);
|
597
|
+
this.filteredOptions = this.uniqueOptions;
|
598
|
+
}
|
599
|
+
else {
|
600
|
+
this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
|
601
|
+
this.uniqueOptions = this.noOptions;
|
602
|
+
this.filteredOptions = this.noOptions;
|
603
|
+
}
|
604
|
+
this.updateSearchableSelectResultAriaLive();
|
605
|
+
this.setDefaultValue();
|
606
|
+
}
|
607
|
+
else {
|
608
|
+
this.setOptionsValuesFromLabels();
|
609
|
+
this.uniqueOptions = this.deduplicateOptions(this.options);
|
610
|
+
this.filteredOptions = this.uniqueOptions;
|
611
|
+
if (this.initialOptionsEmpty) {
|
612
|
+
this.setDefaultValue();
|
613
|
+
this.initialOptionsEmpty = false;
|
614
|
+
}
|
615
|
+
}
|
616
|
+
}
|
617
|
+
else {
|
618
|
+
if (!this.searchable)
|
619
|
+
this.options = this.noOptions;
|
620
|
+
}
|
621
|
+
}
|
622
|
+
debounceChangedHandler(newValue) {
|
623
|
+
this.updateOnChangeDebounce(newValue);
|
624
|
+
}
|
625
|
+
valueChangedHandler() {
|
626
|
+
if (this.value !== this.currValue) {
|
627
|
+
if (this.value && this.multiple) {
|
628
|
+
this.currValue = this.getValueSortedByOptions(this.value);
|
629
|
+
this.updateMultiSelectedCountAriaLive();
|
630
|
+
}
|
631
|
+
else {
|
632
|
+
this.currValue = this.value;
|
633
|
+
}
|
634
|
+
}
|
635
|
+
if (this.searchable) {
|
636
|
+
this.searchableSelectInputValue =
|
637
|
+
this.getLabelFromValue(this.currValue) ||
|
638
|
+
this.currValue;
|
639
|
+
}
|
640
|
+
}
|
641
|
+
disconnectedCallback() {
|
642
|
+
removeFormResetListener(this.el, this.handleFormReset);
|
643
|
+
}
|
644
|
+
componentWillLoad() {
|
645
|
+
this.inheritedAttributes = inheritAttributes(this.el, [
|
646
|
+
...IC_INHERITED_ARIA,
|
647
|
+
"tabindex",
|
648
|
+
"title",
|
649
|
+
]);
|
650
|
+
removeDisabledFalse(this.disabled, this.el);
|
651
|
+
this.setOptionsValuesFromLabels();
|
652
|
+
addFormResetListener(this.el, this.handleFormReset);
|
653
|
+
if (!this.options.length) {
|
654
|
+
this.initialOptionsEmpty = true;
|
655
|
+
this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
|
656
|
+
this.uniqueOptions = this.noOptions;
|
657
|
+
this.filteredOptions = this.noOptions;
|
658
|
+
}
|
659
|
+
else {
|
660
|
+
this.setDefaultValue();
|
661
|
+
this.uniqueOptions = this.deduplicateOptions(this.options);
|
662
|
+
}
|
663
|
+
}
|
664
|
+
componentDidLoad() {
|
665
|
+
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Select");
|
666
|
+
if (this.loading) {
|
667
|
+
this.triggerLoading();
|
668
|
+
}
|
669
|
+
this.hiddenInputValue = this.searchable && this.currValue;
|
670
|
+
}
|
671
|
+
componentDidRender() {
|
672
|
+
if (this.nativeSelectElement && !this.disabled) {
|
673
|
+
this.setTextColor();
|
674
|
+
}
|
675
|
+
}
|
676
|
+
/**
|
677
|
+
* Sets focus on the input box.
|
678
|
+
*/
|
679
|
+
async setFocus() {
|
680
|
+
if (this.nativeSelectElement) {
|
681
|
+
this.nativeSelectElement.focus();
|
682
|
+
}
|
683
|
+
else if (this.customSelectElement) {
|
684
|
+
this.customSelectElement.focus();
|
685
|
+
}
|
686
|
+
else if (this.searchableSelectElement) {
|
687
|
+
this.searchableSelectElement.focus();
|
688
|
+
}
|
689
|
+
}
|
690
|
+
updateOnChangeDebounce(newValue) {
|
691
|
+
if (this.currDebounce !== newValue) {
|
692
|
+
this.currDebounce = newValue;
|
693
|
+
}
|
694
|
+
}
|
695
|
+
debounceAriaLiveUpdate() {
|
696
|
+
clearTimeout(this.debounceAria);
|
697
|
+
window.setTimeout(() => {
|
698
|
+
this.updateSearchableSelectResultAriaLive();
|
699
|
+
}, 800);
|
700
|
+
}
|
701
|
+
render() {
|
702
|
+
const { size, small, disabled, fullWidth, helperText, hideLabel, label, menuId, multiple, name, options, placeholder, readonly, required, searchable, showClearButton, validationStatus, validationText, currValue, } = this;
|
703
|
+
// HTML inputs only accept 'string' for their value
|
704
|
+
// Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string
|
705
|
+
renderHiddenInput(true, this.el, name, this.searchable ? this.hiddenInputValue : currValue, disabled);
|
706
|
+
const invalid = validationStatus === IcInformationStatus.Error ? "true" : "false";
|
707
|
+
const describedBy = getInputDescribedByText(this.inputId, helperText !== "", hasValidationStatus(this.validationStatus, this.disabled)).trim();
|
708
|
+
const optionsSelectedCount = `${currValue === null || currValue === void 0 ? void 0 : currValue.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
|
709
|
+
return (h(Host, { class: {
|
710
|
+
disabled: disabled,
|
711
|
+
searchable: searchable,
|
712
|
+
small: small,
|
713
|
+
[size]: size !== "default",
|
714
|
+
"full-width": fullWidth,
|
715
|
+
}, 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 }, small: small, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, readonly ? (h("ic-typography", null, h("p", null, multiple
|
716
|
+
? this.getMultipleOptionsString(currValue)
|
717
|
+
: 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) => {
|
718
|
+
if (option.children) {
|
719
|
+
return (h("optgroup", { label: option.label }, option.children.map((option) => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label)))));
|
720
|
+
}
|
721
|
+
else {
|
722
|
+
return (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label));
|
723
|
+
}
|
724
|
+
}))) : searchable ? (h("div", { class: "searchable-select-container" }, h("input", { class: {
|
725
|
+
"select-input": true,
|
726
|
+
"with-clear-button": !!this.searchableSelectInputValue,
|
727
|
+
}, 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, formaction: this.formaction, formenctype: this.formenctype, formmethod: this.formmethod, formnovalidate: this.formnovalidate, formtarget: this.formtarget }), this.searchableSelectInputValue &&
|
728
|
+
(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
|
729
|
+
? "Clear input"
|
730
|
+
: "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", appearance: this.clearButtonFocused
|
731
|
+
? IcThemeForegroundEnum.Light
|
732
|
+
: IcThemeForegroundEnum.Dark }), h("div", { class: "divider" }))), h("span", { onMouseDown: this.handleExpandIconMouseDown, class: {
|
733
|
+
"expand-icon": true,
|
734
|
+
"expand-icon-open": this.open,
|
735
|
+
}, 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
|
736
|
+
? `${optionsSelectedCount}, ${this.getMultipleOptionsString(currValue)}`
|
737
|
+
: this.getLabelFromValue(currValue)) ||
|
738
|
+
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: {
|
739
|
+
"value-text": true,
|
740
|
+
"with-clear-button": currValue && showClearButton,
|
741
|
+
placeholder: !this.value || (multiple && this.value.length < 1),
|
742
|
+
} }, h("p", null, (multiple
|
743
|
+
? this.getMultipleOptionsString(currValue)
|
744
|
+
: this.getLabelFromValue(currValue)) ||
|
745
|
+
placeholder)), h("div", { class: "select-input-end" }, currValue && showClearButton && (h("div", { class: "divider" })), h("span", { class: {
|
746
|
+
"expand-icon": true,
|
747
|
+
"expand-icon-open": this.open,
|
748
|
+
}, 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
|
749
|
+
? IcThemeForegroundEnum.Light
|
750
|
+
: IcThemeForegroundEnum.Dark }))))), (!isMobileOrTablet() || multiple) && (h("ic-menu-with-multi", { class: {
|
751
|
+
"no-results": this.loading ||
|
752
|
+
this.hasTimedOut ||
|
753
|
+
(this.noOptions !== null &&
|
754
|
+
this.noOptions[0] &&
|
755
|
+
this.noOptions[0].label === this.emptyOptionListText),
|
756
|
+
}, ref: (el) => (this.menu = el), inputEl: searchable
|
757
|
+
? this.searchableSelectElement
|
758
|
+
: this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, small: small, 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
|
759
|
+
? "manual"
|
760
|
+
: "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 })))));
|
761
|
+
}
|
762
|
+
static get is() { return "ic-select-with-multi"; }
|
763
|
+
static get encapsulation() { return "shadow"; }
|
764
|
+
static get delegatesFocus() { return true; }
|
765
|
+
static get originalStyleUrls() {
|
766
|
+
return {
|
767
|
+
"$": ["ic-select.css"]
|
768
|
+
};
|
769
|
+
}
|
770
|
+
static get styleUrls() {
|
771
|
+
return {
|
772
|
+
"$": ["ic-select.css"]
|
773
|
+
};
|
774
|
+
}
|
775
|
+
static get properties() {
|
776
|
+
return {
|
777
|
+
"charactersUntilSuggestions": {
|
778
|
+
"type": "number",
|
779
|
+
"mutable": false,
|
780
|
+
"complexType": {
|
781
|
+
"original": "number",
|
782
|
+
"resolved": "number",
|
783
|
+
"references": {}
|
784
|
+
},
|
785
|
+
"required": false,
|
786
|
+
"optional": true,
|
787
|
+
"docs": {
|
788
|
+
"tags": [],
|
789
|
+
"text": "**[DEPRECATED]** This prop should not be used anymore."
|
790
|
+
},
|
791
|
+
"attribute": "characters-until-suggestions",
|
792
|
+
"reflect": false,
|
793
|
+
"defaultValue": "0"
|
794
|
+
},
|
795
|
+
"disabled": {
|
796
|
+
"type": "boolean",
|
797
|
+
"mutable": false,
|
798
|
+
"complexType": {
|
799
|
+
"original": "boolean",
|
800
|
+
"resolved": "boolean",
|
801
|
+
"references": {}
|
802
|
+
},
|
803
|
+
"required": false,
|
804
|
+
"optional": true,
|
805
|
+
"docs": {
|
806
|
+
"tags": [],
|
807
|
+
"text": "If `true`, the disabled state will be set."
|
808
|
+
},
|
809
|
+
"attribute": "disabled",
|
810
|
+
"reflect": true,
|
811
|
+
"defaultValue": "false"
|
812
|
+
},
|
813
|
+
"disableFilter": {
|
814
|
+
"type": "boolean",
|
815
|
+
"mutable": false,
|
816
|
+
"complexType": {
|
817
|
+
"original": "boolean",
|
818
|
+
"resolved": "boolean",
|
819
|
+
"references": {}
|
820
|
+
},
|
821
|
+
"required": false,
|
822
|
+
"optional": true,
|
823
|
+
"docs": {
|
824
|
+
"tags": [],
|
825
|
+
"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."
|
826
|
+
},
|
827
|
+
"attribute": "disable-filter",
|
828
|
+
"reflect": false,
|
829
|
+
"defaultValue": "false"
|
830
|
+
},
|
831
|
+
"emptyOptionListText": {
|
832
|
+
"type": "string",
|
833
|
+
"mutable": false,
|
834
|
+
"complexType": {
|
835
|
+
"original": "string",
|
836
|
+
"resolved": "string",
|
837
|
+
"references": {}
|
838
|
+
},
|
839
|
+
"required": false,
|
840
|
+
"optional": false,
|
841
|
+
"docs": {
|
842
|
+
"tags": [],
|
843
|
+
"text": "The text displayed when there are no options in the option list."
|
844
|
+
},
|
845
|
+
"attribute": "empty-option-list-text",
|
846
|
+
"reflect": false,
|
847
|
+
"defaultValue": "\"No results found\""
|
848
|
+
},
|
849
|
+
"form": {
|
850
|
+
"type": "string",
|
851
|
+
"mutable": false,
|
852
|
+
"complexType": {
|
853
|
+
"original": "string",
|
854
|
+
"resolved": "string",
|
855
|
+
"references": {}
|
856
|
+
},
|
857
|
+
"required": false,
|
858
|
+
"optional": true,
|
859
|
+
"docs": {
|
860
|
+
"tags": [],
|
861
|
+
"text": "The <form> element to associate the select with."
|
862
|
+
},
|
863
|
+
"attribute": "form",
|
864
|
+
"reflect": false
|
865
|
+
},
|
866
|
+
"formaction": {
|
867
|
+
"type": "string",
|
868
|
+
"mutable": false,
|
869
|
+
"complexType": {
|
870
|
+
"original": "string",
|
871
|
+
"resolved": "string",
|
872
|
+
"references": {}
|
873
|
+
},
|
874
|
+
"required": false,
|
875
|
+
"optional": true,
|
876
|
+
"docs": {
|
877
|
+
"tags": [],
|
878
|
+
"text": "The URL that processes the information submitted by the select. It overrides the action attribute of the select's form owner. Does nothing if there is no form owner.\nThis prop should only be used with searchable select and will only be applied if searchable is true."
|
879
|
+
},
|
880
|
+
"attribute": "formaction",
|
881
|
+
"reflect": false
|
882
|
+
},
|
883
|
+
"formenctype": {
|
884
|
+
"type": "string",
|
885
|
+
"mutable": false,
|
886
|
+
"complexType": {
|
887
|
+
"original": "string",
|
888
|
+
"resolved": "string",
|
889
|
+
"references": {}
|
890
|
+
},
|
891
|
+
"required": false,
|
892
|
+
"optional": true,
|
893
|
+
"docs": {
|
894
|
+
"tags": [],
|
895
|
+
"text": "The way the submitted form data is encoded. This prop should only be used with searchable select and will only be applied if searchable is true."
|
896
|
+
},
|
897
|
+
"attribute": "formenctype",
|
898
|
+
"reflect": false
|
899
|
+
},
|
900
|
+
"formmethod": {
|
901
|
+
"type": "string",
|
902
|
+
"mutable": false,
|
903
|
+
"complexType": {
|
904
|
+
"original": "string",
|
905
|
+
"resolved": "string",
|
906
|
+
"references": {}
|
907
|
+
},
|
908
|
+
"required": false,
|
909
|
+
"optional": true,
|
910
|
+
"docs": {
|
911
|
+
"tags": [],
|
912
|
+
"text": "The HTTP method used to submit the form. This prop should only be used with searchable select and will only be applied if searchable is true."
|
913
|
+
},
|
914
|
+
"attribute": "formmethod",
|
915
|
+
"reflect": false
|
916
|
+
},
|
917
|
+
"formnovalidate": {
|
918
|
+
"type": "boolean",
|
919
|
+
"mutable": false,
|
920
|
+
"complexType": {
|
921
|
+
"original": "boolean",
|
922
|
+
"resolved": "boolean",
|
923
|
+
"references": {}
|
924
|
+
},
|
925
|
+
"required": false,
|
926
|
+
"optional": true,
|
927
|
+
"docs": {
|
928
|
+
"tags": [],
|
929
|
+
"text": "If `true`, the form will not be validated when submitted. This prop should only be used with searchable select and will only be applied if searchable is true."
|
930
|
+
},
|
931
|
+
"attribute": "formnovalidate",
|
932
|
+
"reflect": false
|
933
|
+
},
|
934
|
+
"formtarget": {
|
935
|
+
"type": "string",
|
936
|
+
"mutable": false,
|
937
|
+
"complexType": {
|
938
|
+
"original": "string",
|
939
|
+
"resolved": "string",
|
940
|
+
"references": {}
|
941
|
+
},
|
942
|
+
"required": false,
|
943
|
+
"optional": true,
|
944
|
+
"docs": {
|
945
|
+
"tags": [],
|
946
|
+
"text": "The place to display the response from submitting the form. It overrides the target attribute of the select's form owner.\nThis prop should only be used with searchable select and will only be applied if searchable is true."
|
947
|
+
},
|
948
|
+
"attribute": "formtarget",
|
949
|
+
"reflect": false
|
950
|
+
},
|
951
|
+
"fullWidth": {
|
952
|
+
"type": "boolean",
|
953
|
+
"mutable": false,
|
954
|
+
"complexType": {
|
955
|
+
"original": "boolean",
|
956
|
+
"resolved": "boolean",
|
957
|
+
"references": {}
|
958
|
+
},
|
959
|
+
"required": false,
|
960
|
+
"optional": false,
|
961
|
+
"docs": {
|
962
|
+
"tags": [],
|
963
|
+
"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."
|
964
|
+
},
|
965
|
+
"attribute": "full-width",
|
966
|
+
"reflect": false,
|
967
|
+
"defaultValue": "false"
|
968
|
+
},
|
969
|
+
"helperText": {
|
970
|
+
"type": "string",
|
971
|
+
"mutable": false,
|
972
|
+
"complexType": {
|
973
|
+
"original": "string",
|
974
|
+
"resolved": "string",
|
975
|
+
"references": {}
|
976
|
+
},
|
977
|
+
"required": false,
|
978
|
+
"optional": true,
|
979
|
+
"docs": {
|
980
|
+
"tags": [],
|
981
|
+
"text": "The helper text that will be displayed for additional field guidance."
|
982
|
+
},
|
983
|
+
"attribute": "helper-text",
|
984
|
+
"reflect": false,
|
985
|
+
"defaultValue": "\"\""
|
986
|
+
},
|
987
|
+
"hideLabel": {
|
988
|
+
"type": "boolean",
|
989
|
+
"mutable": false,
|
990
|
+
"complexType": {
|
991
|
+
"original": "boolean",
|
992
|
+
"resolved": "boolean",
|
993
|
+
"references": {}
|
994
|
+
},
|
995
|
+
"required": false,
|
996
|
+
"optional": true,
|
997
|
+
"docs": {
|
998
|
+
"tags": [],
|
999
|
+
"text": "If `true`, the label will be hidden and the required label value will be applied as an aria-label."
|
1000
|
+
},
|
1001
|
+
"attribute": "hide-label",
|
1002
|
+
"reflect": false,
|
1003
|
+
"defaultValue": "false"
|
1004
|
+
},
|
1005
|
+
"includeDescriptionsInSearch": {
|
1006
|
+
"type": "boolean",
|
1007
|
+
"mutable": false,
|
1008
|
+
"complexType": {
|
1009
|
+
"original": "boolean",
|
1010
|
+
"resolved": "boolean",
|
1011
|
+
"references": {}
|
1012
|
+
},
|
1013
|
+
"required": false,
|
1014
|
+
"optional": true,
|
1015
|
+
"docs": {
|
1016
|
+
"tags": [],
|
1017
|
+
"text": "If `true`, descriptions of options will be included when filtering options in a searchable select. Only applies to built in filtering."
|
1018
|
+
},
|
1019
|
+
"attribute": "include-descriptions-in-search",
|
1020
|
+
"reflect": false,
|
1021
|
+
"defaultValue": "false"
|
1022
|
+
},
|
1023
|
+
"includeGroupTitlesInSearch": {
|
1024
|
+
"type": "boolean",
|
1025
|
+
"mutable": false,
|
1026
|
+
"complexType": {
|
1027
|
+
"original": "boolean",
|
1028
|
+
"resolved": "boolean",
|
1029
|
+
"references": {}
|
1030
|
+
},
|
1031
|
+
"required": false,
|
1032
|
+
"optional": true,
|
1033
|
+
"docs": {
|
1034
|
+
"tags": [],
|
1035
|
+
"text": "If `true`, group titles of grouped options will be included when filtering options in a searchable select. Only applies to built in filtering."
|
1036
|
+
},
|
1037
|
+
"attribute": "include-group-titles-in-search",
|
1038
|
+
"reflect": false,
|
1039
|
+
"defaultValue": "false"
|
1040
|
+
},
|
1041
|
+
"label": {
|
1042
|
+
"type": "string",
|
1043
|
+
"mutable": false,
|
1044
|
+
"complexType": {
|
1045
|
+
"original": "string",
|
1046
|
+
"resolved": "string",
|
1047
|
+
"references": {}
|
1048
|
+
},
|
1049
|
+
"required": true,
|
1050
|
+
"optional": false,
|
1051
|
+
"docs": {
|
1052
|
+
"tags": [],
|
1053
|
+
"text": "The label for the select."
|
1054
|
+
},
|
1055
|
+
"attribute": "label",
|
1056
|
+
"reflect": false
|
1057
|
+
},
|
1058
|
+
"loadingErrorLabel": {
|
1059
|
+
"type": "string",
|
1060
|
+
"mutable": false,
|
1061
|
+
"complexType": {
|
1062
|
+
"original": "string",
|
1063
|
+
"resolved": "string",
|
1064
|
+
"references": {}
|
1065
|
+
},
|
1066
|
+
"required": false,
|
1067
|
+
"optional": true,
|
1068
|
+
"docs": {
|
1069
|
+
"tags": [],
|
1070
|
+
"text": "The message displayed when external loading times out."
|
1071
|
+
},
|
1072
|
+
"attribute": "loading-error-label",
|
1073
|
+
"reflect": false,
|
1074
|
+
"defaultValue": "\"Loading Error\""
|
1075
|
+
},
|
1076
|
+
"loadingLabel": {
|
1077
|
+
"type": "string",
|
1078
|
+
"mutable": false,
|
1079
|
+
"complexType": {
|
1080
|
+
"original": "string",
|
1081
|
+
"resolved": "string",
|
1082
|
+
"references": {}
|
1083
|
+
},
|
1084
|
+
"required": false,
|
1085
|
+
"optional": true,
|
1086
|
+
"docs": {
|
1087
|
+
"tags": [],
|
1088
|
+
"text": "The message displayed whilst the options are being loaded externally."
|
1089
|
+
},
|
1090
|
+
"attribute": "loading-label",
|
1091
|
+
"reflect": false,
|
1092
|
+
"defaultValue": "\"Loading...\""
|
1093
|
+
},
|
1094
|
+
"multiple": {
|
1095
|
+
"type": "boolean",
|
1096
|
+
"mutable": false,
|
1097
|
+
"complexType": {
|
1098
|
+
"original": "boolean",
|
1099
|
+
"resolved": "boolean",
|
1100
|
+
"references": {}
|
1101
|
+
},
|
1102
|
+
"required": false,
|
1103
|
+
"optional": true,
|
1104
|
+
"docs": {
|
1105
|
+
"tags": [],
|
1106
|
+
"text": "If `true`, multiple options can be selected."
|
1107
|
+
},
|
1108
|
+
"attribute": "multiple",
|
1109
|
+
"reflect": false,
|
1110
|
+
"defaultValue": "false"
|
1111
|
+
},
|
1112
|
+
"name": {
|
1113
|
+
"type": "string",
|
1114
|
+
"mutable": false,
|
1115
|
+
"complexType": {
|
1116
|
+
"original": "string",
|
1117
|
+
"resolved": "string",
|
1118
|
+
"references": {}
|
1119
|
+
},
|
1120
|
+
"required": false,
|
1121
|
+
"optional": true,
|
1122
|
+
"docs": {
|
1123
|
+
"tags": [],
|
1124
|
+
"text": "The name of the control, which is submitted with the form data."
|
1125
|
+
},
|
1126
|
+
"attribute": "name",
|
1127
|
+
"reflect": false,
|
1128
|
+
"defaultValue": "this.inputId"
|
1129
|
+
},
|
1130
|
+
"placeholder": {
|
1131
|
+
"type": "string",
|
1132
|
+
"mutable": false,
|
1133
|
+
"complexType": {
|
1134
|
+
"original": "string",
|
1135
|
+
"resolved": "string",
|
1136
|
+
"references": {}
|
1137
|
+
},
|
1138
|
+
"required": false,
|
1139
|
+
"optional": true,
|
1140
|
+
"docs": {
|
1141
|
+
"tags": [],
|
1142
|
+
"text": "The placeholder value to be displayed."
|
1143
|
+
},
|
1144
|
+
"attribute": "placeholder",
|
1145
|
+
"reflect": false,
|
1146
|
+
"defaultValue": "\"Select an option\""
|
1147
|
+
},
|
1148
|
+
"readonly": {
|
1149
|
+
"type": "boolean",
|
1150
|
+
"mutable": false,
|
1151
|
+
"complexType": {
|
1152
|
+
"original": "boolean",
|
1153
|
+
"resolved": "boolean",
|
1154
|
+
"references": {}
|
1155
|
+
},
|
1156
|
+
"required": false,
|
1157
|
+
"optional": true,
|
1158
|
+
"docs": {
|
1159
|
+
"tags": [],
|
1160
|
+
"text": "If `true`, the readonly state will be set."
|
1161
|
+
},
|
1162
|
+
"attribute": "readonly",
|
1163
|
+
"reflect": false,
|
1164
|
+
"defaultValue": "false"
|
1165
|
+
},
|
1166
|
+
"required": {
|
1167
|
+
"type": "boolean",
|
1168
|
+
"mutable": false,
|
1169
|
+
"complexType": {
|
1170
|
+
"original": "boolean",
|
1171
|
+
"resolved": "boolean",
|
1172
|
+
"references": {}
|
1173
|
+
},
|
1174
|
+
"required": false,
|
1175
|
+
"optional": true,
|
1176
|
+
"docs": {
|
1177
|
+
"tags": [],
|
1178
|
+
"text": "If `true`, the select will require a value."
|
1179
|
+
},
|
1180
|
+
"attribute": "required",
|
1181
|
+
"reflect": false,
|
1182
|
+
"defaultValue": "false"
|
1183
|
+
},
|
1184
|
+
"searchable": {
|
1185
|
+
"type": "boolean",
|
1186
|
+
"mutable": false,
|
1187
|
+
"complexType": {
|
1188
|
+
"original": "boolean",
|
1189
|
+
"resolved": "boolean",
|
1190
|
+
"references": {}
|
1191
|
+
},
|
1192
|
+
"required": false,
|
1193
|
+
"optional": true,
|
1194
|
+
"docs": {
|
1195
|
+
"tags": [],
|
1196
|
+
"text": "If `true`, a searchable variant of the select will be displayed which can be typed in to filter options."
|
1197
|
+
},
|
1198
|
+
"attribute": "searchable",
|
1199
|
+
"reflect": false,
|
1200
|
+
"defaultValue": "false"
|
1201
|
+
},
|
1202
|
+
"searchMatchPosition": {
|
1203
|
+
"type": "string",
|
1204
|
+
"mutable": false,
|
1205
|
+
"complexType": {
|
1206
|
+
"original": "IcSearchMatchPositions",
|
1207
|
+
"resolved": "\"anywhere\" | \"start\"",
|
1208
|
+
"references": {
|
1209
|
+
"IcSearchMatchPositions": {
|
1210
|
+
"location": "import",
|
1211
|
+
"path": "../../utils/types",
|
1212
|
+
"id": "src/utils/types.ts::IcSearchMatchPositions"
|
1213
|
+
}
|
1214
|
+
}
|
1215
|
+
},
|
1216
|
+
"required": false,
|
1217
|
+
"optional": true,
|
1218
|
+
"docs": {
|
1219
|
+
"tags": [],
|
1220
|
+
"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."
|
1221
|
+
},
|
1222
|
+
"attribute": "search-match-position",
|
1223
|
+
"reflect": false,
|
1224
|
+
"defaultValue": "\"anywhere\""
|
1225
|
+
},
|
1226
|
+
"selectOnEnter": {
|
1227
|
+
"type": "boolean",
|
1228
|
+
"mutable": false,
|
1229
|
+
"complexType": {
|
1230
|
+
"original": "boolean",
|
1231
|
+
"resolved": "boolean",
|
1232
|
+
"references": {}
|
1233
|
+
},
|
1234
|
+
"required": false,
|
1235
|
+
"optional": true,
|
1236
|
+
"docs": {
|
1237
|
+
"tags": [],
|
1238
|
+
"text": "If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown."
|
1239
|
+
},
|
1240
|
+
"attribute": "select-on-enter",
|
1241
|
+
"reflect": false,
|
1242
|
+
"defaultValue": "false"
|
1243
|
+
},
|
1244
|
+
"showClearButton": {
|
1245
|
+
"type": "boolean",
|
1246
|
+
"mutable": false,
|
1247
|
+
"complexType": {
|
1248
|
+
"original": "boolean",
|
1249
|
+
"resolved": "boolean",
|
1250
|
+
"references": {}
|
1251
|
+
},
|
1252
|
+
"required": false,
|
1253
|
+
"optional": true,
|
1254
|
+
"docs": {
|
1255
|
+
"tags": [],
|
1256
|
+
"text": "If `true`, a button which clears the select input when clicked will be displayed. The button will always appear on the searchable select."
|
1257
|
+
},
|
1258
|
+
"attribute": "show-clear-button",
|
1259
|
+
"reflect": false,
|
1260
|
+
"defaultValue": "false"
|
1261
|
+
},
|
1262
|
+
"size": {
|
1263
|
+
"type": "string",
|
1264
|
+
"mutable": false,
|
1265
|
+
"complexType": {
|
1266
|
+
"original": "IcSizes",
|
1267
|
+
"resolved": "\"default\" | \"large\" | \"small\"",
|
1268
|
+
"references": {
|
1269
|
+
"IcSizes": {
|
1270
|
+
"location": "import",
|
1271
|
+
"path": "@ukic/web-components/dist/types/utils/types",
|
1272
|
+
"id": "../web-components/dist/types/utils/types.d.ts::IcSizes"
|
1273
|
+
}
|
1274
|
+
}
|
1275
|
+
},
|
1276
|
+
"required": false,
|
1277
|
+
"optional": true,
|
1278
|
+
"docs": {
|
1279
|
+
"tags": [],
|
1280
|
+
"text": "The size of the select."
|
1281
|
+
},
|
1282
|
+
"attribute": "size",
|
1283
|
+
"reflect": false,
|
1284
|
+
"defaultValue": "\"default\""
|
1285
|
+
},
|
1286
|
+
"small": {
|
1287
|
+
"type": "boolean",
|
1288
|
+
"mutable": false,
|
1289
|
+
"complexType": {
|
1290
|
+
"original": "boolean",
|
1291
|
+
"resolved": "boolean",
|
1292
|
+
"references": {}
|
1293
|
+
},
|
1294
|
+
"required": false,
|
1295
|
+
"optional": true,
|
1296
|
+
"docs": {
|
1297
|
+
"tags": [],
|
1298
|
+
"text": "**[DEPRECATED]** This prop should not be used anymore. Set prop `size` to \"small\" instead."
|
1299
|
+
},
|
1300
|
+
"attribute": "small",
|
1301
|
+
"reflect": false,
|
1302
|
+
"defaultValue": "false"
|
1303
|
+
},
|
1304
|
+
"timeout": {
|
1305
|
+
"type": "number",
|
1306
|
+
"mutable": false,
|
1307
|
+
"complexType": {
|
1308
|
+
"original": "number",
|
1309
|
+
"resolved": "number",
|
1310
|
+
"references": {}
|
1311
|
+
},
|
1312
|
+
"required": false,
|
1313
|
+
"optional": true,
|
1314
|
+
"docs": {
|
1315
|
+
"tags": [],
|
1316
|
+
"text": "If using external filtering, set a timeout for when loading takes too long."
|
1317
|
+
},
|
1318
|
+
"attribute": "timeout",
|
1319
|
+
"reflect": false
|
1320
|
+
},
|
1321
|
+
"validationStatus": {
|
1322
|
+
"type": "string",
|
1323
|
+
"mutable": false,
|
1324
|
+
"complexType": {
|
1325
|
+
"original": "IcInformationStatusOrEmpty",
|
1326
|
+
"resolved": "\"\" | \"error\" | \"success\" | \"warning\"",
|
1327
|
+
"references": {
|
1328
|
+
"IcInformationStatusOrEmpty": {
|
1329
|
+
"location": "import",
|
1330
|
+
"path": "../../utils/types",
|
1331
|
+
"id": "src/utils/types.ts::IcInformationStatusOrEmpty"
|
1332
|
+
}
|
1333
|
+
}
|
1334
|
+
},
|
1335
|
+
"required": false,
|
1336
|
+
"optional": true,
|
1337
|
+
"docs": {
|
1338
|
+
"tags": [],
|
1339
|
+
"text": "The validation status - e.g. 'error' | 'warning' | 'success'."
|
1340
|
+
},
|
1341
|
+
"attribute": "validation-status",
|
1342
|
+
"reflect": false,
|
1343
|
+
"defaultValue": "\"\""
|
1344
|
+
},
|
1345
|
+
"validationText": {
|
1346
|
+
"type": "string",
|
1347
|
+
"mutable": false,
|
1348
|
+
"complexType": {
|
1349
|
+
"original": "string",
|
1350
|
+
"resolved": "string",
|
1351
|
+
"references": {}
|
1352
|
+
},
|
1353
|
+
"required": false,
|
1354
|
+
"optional": true,
|
1355
|
+
"docs": {
|
1356
|
+
"tags": [],
|
1357
|
+
"text": "The text to display as the validation message."
|
1358
|
+
},
|
1359
|
+
"attribute": "validation-text",
|
1360
|
+
"reflect": false,
|
1361
|
+
"defaultValue": "\"\""
|
1362
|
+
},
|
1363
|
+
"loading": {
|
1364
|
+
"type": "boolean",
|
1365
|
+
"mutable": true,
|
1366
|
+
"complexType": {
|
1367
|
+
"original": "boolean",
|
1368
|
+
"resolved": "boolean",
|
1369
|
+
"references": {}
|
1370
|
+
},
|
1371
|
+
"required": false,
|
1372
|
+
"optional": true,
|
1373
|
+
"docs": {
|
1374
|
+
"tags": [],
|
1375
|
+
"text": "If `true`, the loading state will be triggered when fetching options asynchronously."
|
1376
|
+
},
|
1377
|
+
"attribute": "loading",
|
1378
|
+
"reflect": false,
|
1379
|
+
"defaultValue": "false"
|
1380
|
+
},
|
1381
|
+
"options": {
|
1382
|
+
"type": "unknown",
|
1383
|
+
"mutable": false,
|
1384
|
+
"complexType": {
|
1385
|
+
"original": "IcMenuOption[]",
|
1386
|
+
"resolved": "IcMenuOption[]",
|
1387
|
+
"references": {
|
1388
|
+
"IcMenuOption": {
|
1389
|
+
"location": "import",
|
1390
|
+
"path": "@ukic/web-components/dist/types/utils/types",
|
1391
|
+
"id": "../web-components/dist/types/utils/types.d.ts::IcMenuOption"
|
1392
|
+
}
|
1393
|
+
}
|
1394
|
+
},
|
1395
|
+
"required": false,
|
1396
|
+
"optional": true,
|
1397
|
+
"docs": {
|
1398
|
+
"tags": [],
|
1399
|
+
"text": "The possible selection options."
|
1400
|
+
},
|
1401
|
+
"defaultValue": "[]"
|
1402
|
+
},
|
1403
|
+
"debounce": {
|
1404
|
+
"type": "number",
|
1405
|
+
"mutable": false,
|
1406
|
+
"complexType": {
|
1407
|
+
"original": "number",
|
1408
|
+
"resolved": "number",
|
1409
|
+
"references": {}
|
1410
|
+
},
|
1411
|
+
"required": false,
|
1412
|
+
"optional": true,
|
1413
|
+
"docs": {
|
1414
|
+
"tags": [],
|
1415
|
+
"text": "The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke."
|
1416
|
+
},
|
1417
|
+
"attribute": "debounce",
|
1418
|
+
"reflect": false,
|
1419
|
+
"defaultValue": "0"
|
1420
|
+
},
|
1421
|
+
"value": {
|
1422
|
+
"type": "string",
|
1423
|
+
"mutable": true,
|
1424
|
+
"complexType": {
|
1425
|
+
"original": "string | string[]",
|
1426
|
+
"resolved": "string | string[]",
|
1427
|
+
"references": {}
|
1428
|
+
},
|
1429
|
+
"required": false,
|
1430
|
+
"optional": true,
|
1431
|
+
"docs": {
|
1432
|
+
"tags": [],
|
1433
|
+
"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."
|
1434
|
+
},
|
1435
|
+
"attribute": "value",
|
1436
|
+
"reflect": false
|
1437
|
+
}
|
1438
|
+
};
|
1439
|
+
}
|
1440
|
+
static get states() {
|
1441
|
+
return {
|
1442
|
+
"ariaActiveDescendant": {},
|
1443
|
+
"clearButtonFocused": {},
|
1444
|
+
"debounceIcChange": {},
|
1445
|
+
"hiddenInputValue": {},
|
1446
|
+
"noOptions": {},
|
1447
|
+
"open": {},
|
1448
|
+
"pressedCharacters": {},
|
1449
|
+
"searchableSelectInputValue": {},
|
1450
|
+
"filteredOptions": {},
|
1451
|
+
"uniqueOptions": {},
|
1452
|
+
"currDebounce": {},
|
1453
|
+
"initialValue": {},
|
1454
|
+
"inputValueToFilter": {},
|
1455
|
+
"currValue": {}
|
1456
|
+
};
|
1457
|
+
}
|
1458
|
+
static get events() {
|
1459
|
+
return [{
|
1460
|
+
"method": "icBlur",
|
1461
|
+
"name": "icBlur",
|
1462
|
+
"bubbles": true,
|
1463
|
+
"cancelable": true,
|
1464
|
+
"composed": true,
|
1465
|
+
"docs": {
|
1466
|
+
"tags": [],
|
1467
|
+
"text": "Emitted when the select loses focus."
|
1468
|
+
},
|
1469
|
+
"complexType": {
|
1470
|
+
"original": "void",
|
1471
|
+
"resolved": "void",
|
1472
|
+
"references": {}
|
1473
|
+
}
|
1474
|
+
}, {
|
1475
|
+
"method": "icChange",
|
1476
|
+
"name": "icChange",
|
1477
|
+
"bubbles": true,
|
1478
|
+
"cancelable": true,
|
1479
|
+
"composed": true,
|
1480
|
+
"docs": {
|
1481
|
+
"tags": [],
|
1482
|
+
"text": "Emitted when the value changes."
|
1483
|
+
},
|
1484
|
+
"complexType": {
|
1485
|
+
"original": "IcValueEventDetail",
|
1486
|
+
"resolved": "IcValueEventDetail",
|
1487
|
+
"references": {
|
1488
|
+
"IcValueEventDetail": {
|
1489
|
+
"location": "import",
|
1490
|
+
"path": "../../utils/types",
|
1491
|
+
"id": "src/utils/types.ts::IcValueEventDetail"
|
1492
|
+
}
|
1493
|
+
}
|
1494
|
+
}
|
1495
|
+
}, {
|
1496
|
+
"method": "icClear",
|
1497
|
+
"name": "icClear",
|
1498
|
+
"bubbles": true,
|
1499
|
+
"cancelable": true,
|
1500
|
+
"composed": true,
|
1501
|
+
"docs": {
|
1502
|
+
"tags": [],
|
1503
|
+
"text": "Emitted when the clear button is clicked."
|
1504
|
+
},
|
1505
|
+
"complexType": {
|
1506
|
+
"original": "void",
|
1507
|
+
"resolved": "void",
|
1508
|
+
"references": {}
|
1509
|
+
}
|
1510
|
+
}, {
|
1511
|
+
"method": "icFocus",
|
1512
|
+
"name": "icFocus",
|
1513
|
+
"bubbles": true,
|
1514
|
+
"cancelable": true,
|
1515
|
+
"composed": true,
|
1516
|
+
"docs": {
|
1517
|
+
"tags": [],
|
1518
|
+
"text": "Emitted when the select gains focus."
|
1519
|
+
},
|
1520
|
+
"complexType": {
|
1521
|
+
"original": "void",
|
1522
|
+
"resolved": "void",
|
1523
|
+
"references": {}
|
1524
|
+
}
|
1525
|
+
}, {
|
1526
|
+
"method": "icInput",
|
1527
|
+
"name": "icInput",
|
1528
|
+
"bubbles": true,
|
1529
|
+
"cancelable": true,
|
1530
|
+
"composed": true,
|
1531
|
+
"docs": {
|
1532
|
+
"tags": [],
|
1533
|
+
"text": "Emitted when a keyboard input occurred."
|
1534
|
+
},
|
1535
|
+
"complexType": {
|
1536
|
+
"original": "IcValueEventDetail",
|
1537
|
+
"resolved": "IcValueEventDetail",
|
1538
|
+
"references": {
|
1539
|
+
"IcValueEventDetail": {
|
1540
|
+
"location": "import",
|
1541
|
+
"path": "../../utils/types",
|
1542
|
+
"id": "src/utils/types.ts::IcValueEventDetail"
|
1543
|
+
}
|
1544
|
+
}
|
1545
|
+
}
|
1546
|
+
}, {
|
1547
|
+
"method": "icOptionSelect",
|
1548
|
+
"name": "icOptionSelect",
|
1549
|
+
"bubbles": true,
|
1550
|
+
"cancelable": true,
|
1551
|
+
"composed": true,
|
1552
|
+
"docs": {
|
1553
|
+
"tags": [],
|
1554
|
+
"text": "Emitted when an option is selected.\nSelecting an option will also trigger an `icChange/onIcChange` due to the value being updated."
|
1555
|
+
},
|
1556
|
+
"complexType": {
|
1557
|
+
"original": "IcOptionSelectEventDetail",
|
1558
|
+
"resolved": "IcOptionSelectEventDetail",
|
1559
|
+
"references": {
|
1560
|
+
"IcOptionSelectEventDetail": {
|
1561
|
+
"location": "import",
|
1562
|
+
"path": "@ukic/web-components/dist/types/components",
|
1563
|
+
"id": "../web-components/dist/types/components.d.ts::IcOptionSelectEventDetail"
|
1564
|
+
}
|
1565
|
+
}
|
1566
|
+
}
|
1567
|
+
}, {
|
1568
|
+
"method": "icOptionDeselect",
|
1569
|
+
"name": "icOptionDeselect",
|
1570
|
+
"bubbles": true,
|
1571
|
+
"cancelable": true,
|
1572
|
+
"composed": true,
|
1573
|
+
"docs": {
|
1574
|
+
"tags": [],
|
1575
|
+
"text": "Emitted when `multiple` is `true` and an option is deselected."
|
1576
|
+
},
|
1577
|
+
"complexType": {
|
1578
|
+
"original": "IcOptionSelectEventDetail",
|
1579
|
+
"resolved": "IcOptionSelectEventDetail",
|
1580
|
+
"references": {
|
1581
|
+
"IcOptionSelectEventDetail": {
|
1582
|
+
"location": "import",
|
1583
|
+
"path": "@ukic/web-components/dist/types/components",
|
1584
|
+
"id": "../web-components/dist/types/components.d.ts::IcOptionSelectEventDetail"
|
1585
|
+
}
|
1586
|
+
}
|
1587
|
+
}
|
1588
|
+
}, {
|
1589
|
+
"method": "icRetryLoad",
|
1590
|
+
"name": "icRetryLoad",
|
1591
|
+
"bubbles": true,
|
1592
|
+
"cancelable": true,
|
1593
|
+
"composed": true,
|
1594
|
+
"docs": {
|
1595
|
+
"tags": [],
|
1596
|
+
"text": "Emitted when the 'retry loading' button is clicked for a searchable variant."
|
1597
|
+
},
|
1598
|
+
"complexType": {
|
1599
|
+
"original": "IcValueEventDetail",
|
1600
|
+
"resolved": "IcValueEventDetail",
|
1601
|
+
"references": {
|
1602
|
+
"IcValueEventDetail": {
|
1603
|
+
"location": "import",
|
1604
|
+
"path": "../../utils/types",
|
1605
|
+
"id": "src/utils/types.ts::IcValueEventDetail"
|
1606
|
+
}
|
1607
|
+
}
|
1608
|
+
}
|
1609
|
+
}];
|
1610
|
+
}
|
1611
|
+
static get methods() {
|
1612
|
+
return {
|
1613
|
+
"setFocus": {
|
1614
|
+
"complexType": {
|
1615
|
+
"signature": "() => Promise<void>",
|
1616
|
+
"parameters": [],
|
1617
|
+
"references": {
|
1618
|
+
"Promise": {
|
1619
|
+
"location": "global",
|
1620
|
+
"id": "global::Promise"
|
1621
|
+
}
|
1622
|
+
},
|
1623
|
+
"return": "Promise<void>"
|
1624
|
+
},
|
1625
|
+
"docs": {
|
1626
|
+
"text": "Sets focus on the input box.",
|
1627
|
+
"tags": []
|
1628
|
+
}
|
1629
|
+
}
|
1630
|
+
};
|
1631
|
+
}
|
1632
|
+
static get elementRef() { return "el"; }
|
1633
|
+
static get watchers() {
|
1634
|
+
return [{
|
1635
|
+
"propName": "loading",
|
1636
|
+
"methodName": "loadingHandler"
|
1637
|
+
}, {
|
1638
|
+
"propName": "options",
|
1639
|
+
"methodName": "watchOptionsHandler"
|
1640
|
+
}, {
|
1641
|
+
"propName": "debounce",
|
1642
|
+
"methodName": "debounceChangedHandler"
|
1643
|
+
}, {
|
1644
|
+
"propName": "value",
|
1645
|
+
"methodName": "valueChangedHandler"
|
1646
|
+
}];
|
1647
|
+
}
|
1648
|
+
}
|
1649
|
+
//# sourceMappingURL=ic-select.js.map
|