@infineon/infineon-design-system-stencil 36.0.0--canary.1926.3384b08beedd4bd0bf0894c709a0e3eb8096602d.0 → 36.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{icons-2cd72a7d.js → icons-0d4d096d.js} +1 -4
- package/dist/cjs/icons-0d4d096d.js.map +1 -0
- package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
- package/dist/cjs/ifx-faq.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-accordion.cjs.entry.js +2 -2
- package/dist/cjs/ifx-filter-bar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-type-group.cjs.entry.js +1 -1
- package/dist/cjs/ifx-icon.cjs.entry.js +1 -1
- package/dist/cjs/ifx-icons-preview.cjs.entry.js +1 -1
- package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
- package/dist/cjs/ifx-multiselect.cjs.entry.js +545 -0
- package/dist/cjs/ifx-multiselect.cjs.entry.js.map +1 -0
- package/dist/cjs/ifx-select.cjs.entry.js +2 -2
- package/dist/cjs/ifx-set-filter.cjs.entry.js +2 -19
- package/dist/cjs/ifx-set-filter.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-slider.cjs.entry.js +2 -2
- package/dist/cjs/ifx-spinner_2.cjs.entry.js +6 -6
- package/dist/cjs/ifx-status.cjs.entry.js +1 -1
- package/dist/cjs/ifx-step.cjs.entry.js +4 -4
- package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tab.cjs.entry.js +1 -1
- package/dist/cjs/ifx-table.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tag.cjs.entry.js +1 -1
- package/dist/cjs/ifx-templates-ui.cjs.entry.js +1 -1
- package/dist/cjs/ifx-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/ifx-tree-view-item.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/index-7f4df11a.js +14 -14
- package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
- package/dist/collection/components/select/multi-select/interfaces.js.map +1 -1
- package/dist/collection/components/select/multi-select/multiselect.css +65 -60
- package/dist/collection/components/select/multi-select/multiselect.js +427 -675
- package/dist/collection/components/select/multi-select/multiselect.js.map +1 -1
- package/dist/collection/components/select/multi-select/multiselect.stories.js +135 -439
- package/dist/collection/components/select/multi-select/multiselect.stories.js.map +1 -1
- package/dist/collection/components/select/single-select/select.js +2 -2
- package/dist/collection/components/slider/slider.js +2 -2
- package/dist/collection/components/spinner/spinner.js +2 -2
- package/dist/collection/components/status/status.js +1 -1
- package/dist/collection/components/stepper/step/step.js +4 -4
- package/dist/collection/components/stepper/stepper.js +2 -2
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +2 -2
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +1 -1
- package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +1 -1
- package/dist/collection/components/table-advanced-version/set-filter/setFilter.js +2 -19
- package/dist/collection/components/table-advanced-version/set-filter/setFilter.js.map +1 -1
- package/dist/collection/components/table-advanced-version/table.js +2 -2
- package/dist/collection/components/table-advanced-version/table.stories.js +3 -2
- package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
- package/dist/collection/components/table-basic-version/table.js +1 -1
- package/dist/collection/components/tabs/tab.js +1 -1
- package/dist/collection/components/tabs/tabs.js +2 -2
- package/dist/collection/components/tag/tag.js +1 -1
- package/dist/collection/components/templates/template/template.js +1 -1
- package/dist/collection/components/templates/templates-ui/templates-ui.js +1 -1
- package/dist/collection/components/text-field/text-field.js +4 -4
- package/dist/collection/components/textarea/textarea.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +4 -4
- package/dist/collection/components/tree-view/tree-view-item.js +2 -2
- package/dist/collection/components/tree-view/tree-view.js +1 -1
- package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
- package/dist/components/ifx-accordion-item.js +1 -1
- package/dist/components/ifx-alert.js +1 -1
- package/dist/components/ifx-basic-table.js +1 -1
- package/dist/components/ifx-breadcrumb-item-label.js +1 -1
- package/dist/components/ifx-checkbox-group.js +1 -1
- package/dist/components/ifx-checkbox.js +1 -1
- package/dist/components/ifx-chip-item.js +1 -1
- package/dist/components/ifx-chip.js +1 -1
- package/dist/components/ifx-date-picker.js +1 -1
- package/dist/components/ifx-dropdown-item.js +1 -1
- package/dist/components/ifx-dropdown-separator.js +1 -29
- package/dist/components/ifx-dropdown-separator.js.map +1 -1
- package/dist/components/ifx-dropdown-trigger-button.js +1 -1
- package/dist/components/ifx-faq.js +3 -3
- package/dist/components/ifx-file-upload.js +2 -2
- package/dist/components/ifx-filter-accordion.js +3 -3
- package/dist/components/ifx-filter-bar.js +2 -2
- package/dist/components/ifx-filter-search.js +3 -3
- package/dist/components/ifx-filter-type-group.js +1 -1
- package/dist/components/ifx-icon-button.js +1 -1
- package/dist/components/ifx-icon.js +1 -1
- package/dist/components/ifx-icons-preview.js +3 -3
- package/dist/components/ifx-list-entry.js +3 -3
- package/dist/components/ifx-list.js +1 -1
- package/dist/components/ifx-modal.js +2 -2
- package/dist/components/ifx-multiselect.js +1 -1
- package/dist/components/ifx-navbar-item.js +1 -1
- package/dist/components/ifx-navbar.js +1 -1
- package/dist/components/ifx-notification.js +1 -1
- package/dist/components/ifx-overview-table.js +1 -1
- package/dist/components/ifx-pagination.js +1 -1
- package/dist/components/ifx-radio-button-group.js +1 -1
- package/dist/components/ifx-search-bar.js +2 -2
- package/dist/components/ifx-search-field.js +1 -1
- package/dist/components/ifx-segment.js +1 -1
- package/dist/components/ifx-segmented-control.js +1 -1
- package/dist/components/ifx-select.js +1 -1
- package/dist/components/ifx-set-filter.js +12 -35
- package/dist/components/ifx-set-filter.js.map +1 -1
- package/dist/components/ifx-sidebar-item.js +1 -1
- package/dist/components/ifx-slider.js +3 -3
- package/dist/components/ifx-spinner.js +1 -1
- package/dist/components/ifx-status.js +1 -1
- package/dist/components/ifx-step.js +5 -5
- package/dist/components/ifx-stepper.js +2 -2
- package/dist/components/ifx-switch.js +1 -1
- package/dist/components/ifx-tab.js +1 -1
- package/dist/components/ifx-table.js +9 -9
- package/dist/components/ifx-tabs.js +3 -3
- package/dist/components/ifx-tag.js +2 -2
- package/dist/components/ifx-template.js +1 -1
- package/dist/components/ifx-templates-ui.js +7 -7
- package/dist/components/ifx-text-field.js +1 -1
- package/dist/components/ifx-textarea.js +1 -1
- package/dist/components/ifx-tooltip.js +5 -5
- package/dist/components/ifx-tree-view-item.js +4 -4
- package/dist/components/ifx-tree-view.js +1 -1
- package/dist/components/{p-f2f58eb1.js → p-0c449780.js} +2 -2
- package/dist/components/{p-f2f58eb1.js.map → p-0c449780.js.map} +1 -1
- package/dist/components/{p-b6b0d09b.js → p-186dacc8.js} +2 -2
- package/dist/components/{p-b6b0d09b.js.map → p-186dacc8.js.map} +1 -1
- package/dist/components/{p-34a36730.js → p-2a65d85a.js} +5 -5
- package/dist/components/{p-34a36730.js.map → p-2a65d85a.js.map} +1 -1
- package/dist/components/{p-afd6d4f5.js → p-38396fe7.js} +2 -2
- package/dist/components/{p-afd6d4f5.js.map → p-38396fe7.js.map} +1 -1
- package/dist/components/{p-fe3f24e7.js → p-67573b5f.js} +6 -6
- package/dist/components/{p-fe3f24e7.js.map → p-67573b5f.js.map} +1 -1
- package/dist/components/p-68016aea.js +33 -0
- package/dist/components/p-68016aea.js.map +1 -0
- package/dist/components/{p-20d6a006.js → p-6d12f845.js} +2 -2
- package/dist/components/{p-20d6a006.js.map → p-6d12f845.js.map} +1 -1
- package/dist/components/{p-351949f1.js → p-a4922416.js} +3 -3
- package/dist/components/{p-351949f1.js.map → p-a4922416.js.map} +1 -1
- package/dist/components/{p-b293963f.js → p-a8d0ef73.js} +2 -2
- package/dist/components/{p-b293963f.js.map → p-a8d0ef73.js.map} +1 -1
- package/dist/components/{p-6c0ec65a.js → p-b0039ef1.js} +2 -2
- package/dist/components/{p-6c0ec65a.js.map → p-b0039ef1.js.map} +1 -1
- package/dist/components/{p-12e75dad.js → p-bb4de57d.js} +1 -4
- package/dist/components/p-bb4de57d.js.map +1 -0
- package/dist/components/{p-98c86d16.js → p-c9aec5fa.js} +4 -4
- package/dist/components/{p-98c86d16.js.map → p-c9aec5fa.js.map} +1 -1
- package/dist/components/{p-1bfd69f4.js → p-cc5bd74b.js} +4 -4
- package/dist/components/{p-1bfd69f4.js.map → p-cc5bd74b.js.map} +1 -1
- package/dist/components/p-cd833a9b.js +598 -0
- package/dist/components/p-cd833a9b.js.map +1 -0
- package/dist/components/{p-2a500ed7.js → p-cd913238.js} +3 -3
- package/dist/components/{p-2a500ed7.js.map → p-cd913238.js.map} +1 -1
- package/dist/components/{p-5c96860f.js → p-d1790232.js} +2 -2
- package/dist/components/{p-5c96860f.js.map → p-d1790232.js.map} +1 -1
- package/dist/esm/{icons-75858876.js → icons-788fe290.js} +1 -4
- package/dist/esm/icons-788fe290.js.map +1 -0
- package/dist/esm/ifx-alert_2.entry.js +1 -1
- package/dist/esm/ifx-basic-table.entry.js +1 -1
- package/dist/esm/ifx-faq.entry.js +1 -1
- package/dist/esm/ifx-filter-accordion.entry.js +2 -2
- package/dist/esm/ifx-filter-bar.entry.js +1 -1
- package/dist/esm/ifx-filter-search.entry.js +1 -1
- package/dist/esm/ifx-filter-type-group.entry.js +1 -1
- package/dist/esm/ifx-icon.entry.js +1 -1
- package/dist/esm/ifx-icons-preview.entry.js +1 -1
- package/dist/esm/ifx-list-entry.entry.js +1 -1
- package/dist/esm/ifx-multiselect.entry.js +541 -0
- package/dist/esm/ifx-multiselect.entry.js.map +1 -0
- package/dist/esm/ifx-select.entry.js +2 -2
- package/dist/esm/ifx-set-filter.entry.js +2 -19
- package/dist/esm/ifx-set-filter.entry.js.map +1 -1
- package/dist/esm/ifx-slider.entry.js +2 -2
- package/dist/esm/ifx-spinner_2.entry.js +6 -6
- package/dist/esm/ifx-status.entry.js +1 -1
- package/dist/esm/ifx-step.entry.js +4 -4
- package/dist/esm/ifx-stepper.entry.js +2 -2
- package/dist/esm/ifx-switch.entry.js +1 -1
- package/dist/esm/ifx-tab.entry.js +1 -1
- package/dist/esm/ifx-table.entry.js +2 -2
- package/dist/esm/ifx-tabs.entry.js +2 -2
- package/dist/esm/ifx-tag.entry.js +1 -1
- package/dist/esm/ifx-templates-ui.entry.js +1 -1
- package/dist/esm/ifx-textarea.entry.js +1 -1
- package/dist/esm/ifx-tooltip.entry.js +4 -4
- package/dist/esm/ifx-tree-view-item.entry.js +2 -2
- package/dist/esm/ifx-tree-view.entry.js +1 -1
- package/dist/esm/index-6c9eba32.js +14 -14
- package/dist/esm/infineon-design-system-stencil.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
- package/dist/infineon-design-system-stencil/p-06bfabcf.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-76e0c34f.entry.js.map → p-06bfabcf.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-3d037fa4.entry.js → p-0f096cf1.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-ad7b58c3.entry.js → p-1048ee19.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-d890b0de.entry.js → p-142878ee.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-4d96fed0.js → p-27d2afb4.js} +2 -2
- package/dist/infineon-design-system-stencil/p-27d2afb4.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-18a81f5f.entry.js → p-2b38c405.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-34738a10.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-45ac2698.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-45ac2698.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-4d9a4329.entry.js → p-49252616.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-65e57b85.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-74bee1c8.entry.js → p-65fe2246.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-7adee2dd.entry.js → p-6d99d01d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-4764665d.entry.js → p-702a48f8.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-b6dd2ac0.entry.js → p-7440ea9d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c7e86c7c.entry.js → p-7b7ac7fa.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-0c1c831c.entry.js → p-87fbd617.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-885adc48.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-885adc48.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-aaf08082.entry.js → p-88af2e64.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-13c107bf.entry.js → p-959285a7.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-36dcebde.entry.js → p-a9cfb70d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6250b9f6.entry.js → p-acf0f4ed.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-02496917.entry.js → p-b637c44c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6c2698a3.entry.js → p-babf3f2d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-5e376887.entry.js → p-c2791360.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-a80e321b.entry.js → p-c5a785d7.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-2e7d87ed.entry.js → p-e98d2280.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-5f38cace.entry.js → p-ecc17497.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-5285ca40.entry.js → p-f25f014d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-04d8ea38.entry.js → p-f2bea855.entry.js} +2 -2
- package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +1 -1
- package/dist/types/components/select/multi-select/interfaces.d.ts +1 -1
- package/dist/types/components/select/multi-select/multiselect.d.ts +61 -39
- package/dist/types/components/select/multi-select/multiselect.stories.d.ts +30 -219
- package/dist/types/components.d.ts +8 -54
- package/package.json +2 -2
- package/dist/cjs/icons-2cd72a7d.js.map +0 -1
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js +0 -929
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +0 -1
- package/dist/collection/components/select/multi-select/multiselect-option.css +0 -112
- package/dist/collection/components/select/multi-select/multiselect-option.js +0 -505
- package/dist/collection/components/select/multi-select/multiselect-option.js.map +0 -1
- package/dist/components/ifx-multiselect-option.d.ts +0 -11
- package/dist/components/ifx-multiselect-option.js +0 -8
- package/dist/components/ifx-multiselect-option.js.map +0 -1
- package/dist/components/p-12e75dad.js.map +0 -1
- package/dist/components/p-3906f639.js +0 -432
- package/dist/components/p-3906f639.js.map +0 -1
- package/dist/components/p-aedd7be5.js +0 -599
- package/dist/components/p-aedd7be5.js.map +0 -1
- package/dist/esm/icons-75858876.js.map +0 -1
- package/dist/esm/ifx-multiselect_2.entry.js +0 -924
- package/dist/esm/ifx-multiselect_2.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-25204a1e.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-25204a1e.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-4d96fed0.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-6c999b11.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-6c999b11.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-76e0c34f.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-a2a44fbe.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-e571c002.entry.js +0 -2
- package/dist/types/components/select/multi-select/multiselect-option.d.ts +0 -36
- /package/dist/infineon-design-system-stencil/{p-3d037fa4.entry.js.map → p-0f096cf1.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-ad7b58c3.entry.js.map → p-1048ee19.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-d890b0de.entry.js.map → p-142878ee.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-18a81f5f.entry.js.map → p-2b38c405.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-e571c002.entry.js.map → p-34738a10.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-4d9a4329.entry.js.map → p-49252616.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-a2a44fbe.entry.js.map → p-65e57b85.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-74bee1c8.entry.js.map → p-65fe2246.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-7adee2dd.entry.js.map → p-6d99d01d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-4764665d.entry.js.map → p-702a48f8.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-b6dd2ac0.entry.js.map → p-7440ea9d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c7e86c7c.entry.js.map → p-7b7ac7fa.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0c1c831c.entry.js.map → p-87fbd617.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-aaf08082.entry.js.map → p-88af2e64.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-13c107bf.entry.js.map → p-959285a7.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-36dcebde.entry.js.map → p-a9cfb70d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6250b9f6.entry.js.map → p-acf0f4ed.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-02496917.entry.js.map → p-b637c44c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6c2698a3.entry.js.map → p-babf3f2d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-5e376887.entry.js.map → p-c2791360.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-a80e321b.entry.js.map → p-c5a785d7.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-2e7d87ed.entry.js.map → p-e98d2280.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-5f38cace.entry.js.map → p-ecc17497.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-5285ca40.entry.js.map → p-f25f014d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-04d8ea38.entry.js.map → p-f2bea855.entry.js.map} +0 -0
@@ -1,4 +1,5 @@
|
|
1
1
|
import { h } from "@stencil/core";
|
2
|
+
// Debounce function
|
2
3
|
function debounce(func, wait) {
|
3
4
|
let timeout;
|
4
5
|
return function executedFunction(...args) {
|
@@ -10,160 +11,128 @@ function debounce(func, wait) {
|
|
10
11
|
timeout = setTimeout(later, wait);
|
11
12
|
};
|
12
13
|
}
|
14
|
+
;
|
13
15
|
export class Multiselect {
|
14
16
|
constructor() {
|
17
|
+
this.batchSize = 50;
|
18
|
+
this.size = 'medium (40px)';
|
15
19
|
this.disabled = false;
|
16
20
|
this.error = false;
|
21
|
+
this.internalError = false;
|
17
22
|
this.errorMessage = "Error";
|
18
23
|
this.label = "";
|
24
|
+
this.persistentSelectedOptions = [];
|
19
25
|
this.placeholder = "";
|
26
|
+
this.dropdownOpen = false;
|
27
|
+
this.currentIndex = 0; //needed for option selection using keyboard
|
28
|
+
this.isLoading = false;
|
29
|
+
this.loadedOptions = [];
|
30
|
+
this.filteredOptions = [];
|
20
31
|
this.showSearch = true;
|
21
32
|
this.showSelectAll = true;
|
22
33
|
this.showClearButton = true;
|
23
|
-
this.
|
24
|
-
this.
|
25
|
-
this.showNoResultsMessage = true;
|
26
|
-
this.searchPlaceholder = "Search";
|
27
|
-
this.selectAllLabel = "Select all";
|
28
|
-
this.expandLabel = "Expand";
|
29
|
-
this.collapseLabel = "Collapse";
|
30
|
-
this.ariaMultiSelectLabel = "Multi-select dropdown";
|
31
|
-
this.ariaMultiSelectLabelledBy = "";
|
32
|
-
this.ariaMultiSelectDescribedBy = "";
|
33
|
-
this.ariaSearchLabel = "Search options";
|
34
|
-
this.ariaClearLabel = "Clear all selections";
|
35
|
-
this.ariaToggleLabel = "Toggle dropdown";
|
36
|
-
this.ariaSelectAllLabel = "Select all options";
|
37
|
-
this.ariaExpandAllLabel = "Expand all categories";
|
38
|
-
this.ariaCollapseAllLabel = "Collapse all categories";
|
39
|
-
this.internalError = false;
|
40
|
-
this.persistentSelectedOptions = [];
|
41
|
-
this.dropdownOpen = false;
|
42
|
-
this.searchTerm = '';
|
34
|
+
this.optionCount = 0; // number of all options (leaves of the tree)
|
35
|
+
this.optionsProcessed = false; // flag whether options have already been counted, intial selections saved
|
43
36
|
this.handleSearch = debounce((targetElement) => {
|
44
37
|
const searchTerm = targetElement.value.toLowerCase();
|
45
|
-
|
46
|
-
|
47
|
-
const wrapper = this.el.shadowRoot.querySelector('.ifx-multiselect-wrapper');
|
48
|
-
if (wrapper) {
|
49
|
-
if (isSearchActive) {
|
50
|
-
wrapper.classList.remove('active');
|
51
|
-
}
|
52
|
-
else {
|
53
|
-
const searchField = this.el.shadowRoot.querySelector('ifx-search-field');
|
54
|
-
const searchFieldHasFocus = searchField && searchField.matches(':focus-within');
|
55
|
-
if (!searchFieldHasFocus) {
|
56
|
-
wrapper.classList.add('active');
|
57
|
-
}
|
58
|
-
}
|
38
|
+
if (searchTerm === '') {
|
39
|
+
this.filteredOptions = this.loadedOptions;
|
59
40
|
}
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
optionsContainer.classList.remove('has-search-filter');
|
67
|
-
}
|
68
|
-
}
|
69
|
-
requestAnimationFrame(() => {
|
70
|
-
const allOptions = this.el.querySelectorAll('ifx-multiselect-option');
|
71
|
-
allOptions.forEach(option => {
|
72
|
-
const searchEvent = new CustomEvent('ifx-search-filter', {
|
73
|
-
detail: { searchTerm, isActive: isSearchActive }
|
74
|
-
});
|
75
|
-
option.dispatchEvent(searchEvent);
|
76
|
-
});
|
77
|
-
if (isSearchActive) {
|
78
|
-
setTimeout(() => {
|
79
|
-
const allOptions = this.el.querySelectorAll('ifx-multiselect-option');
|
80
|
-
let visibleCount = 0;
|
81
|
-
allOptions.forEach(option => {
|
82
|
-
const style = window.getComputedStyle(option);
|
83
|
-
const rect = option.getBoundingClientRect();
|
84
|
-
if (style.display !== 'none' &&
|
85
|
-
style.visibility !== 'hidden' &&
|
86
|
-
style.opacity !== '0' &&
|
87
|
-
rect.height > 0) {
|
88
|
-
visibleCount++;
|
89
|
-
}
|
41
|
+
else {
|
42
|
+
this.filteredOptions = this.loadedOptions.filter(option => {
|
43
|
+
const matchesSearchTerm = option.label.toLowerCase().includes(searchTerm);
|
44
|
+
if (option.children) {
|
45
|
+
const childrenMatch = option.children.some(child => {
|
46
|
+
return child.label.toLowerCase().includes(searchTerm);
|
90
47
|
});
|
91
|
-
|
92
|
-
if (optionsContainer) {
|
93
|
-
if (visibleCount === 0) {
|
94
|
-
optionsContainer.classList.add('show-no-results');
|
95
|
-
}
|
96
|
-
else {
|
97
|
-
optionsContainer.classList.remove('show-no-results');
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}, 200);
|
101
|
-
}
|
102
|
-
else {
|
103
|
-
const optionsContainer = this.el.shadowRoot.querySelector('.ifx-multiselect-options');
|
104
|
-
if (optionsContainer) {
|
105
|
-
optionsContainer.classList.remove('show-no-results');
|
48
|
+
return matchesSearchTerm || childrenMatch;
|
106
49
|
}
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
50
|
+
return matchesSearchTerm;
|
51
|
+
});
|
52
|
+
}
|
53
|
+
}, 300);
|
111
54
|
this.handleDocumentClick = (event) => {
|
112
55
|
const path = event.composedPath();
|
113
56
|
if (!path.includes(this.dropdownElement)) {
|
114
57
|
this.dropdownOpen = false;
|
115
58
|
document.removeEventListener('click', this.handleDocumentClick);
|
116
|
-
this.
|
59
|
+
this.filteredOptions = this.loadedOptions;
|
60
|
+
// Dispatch the ifxMultiselectIsOpen event
|
117
61
|
this.ifxOpen.emit(this.dropdownOpen);
|
118
62
|
}
|
119
63
|
};
|
120
64
|
}
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
options.push(option);
|
129
|
-
}
|
130
|
-
}
|
131
|
-
});
|
132
|
-
return options;
|
133
|
-
}
|
134
|
-
parseOptionElement(element, index) {
|
135
|
-
const value = element.getAttribute('value') || `option-${index}`;
|
136
|
-
const selected = element.hasAttribute('selected');
|
137
|
-
const disabled = element.hasAttribute('disabled');
|
138
|
-
const indeterminate = element.hasAttribute('indeterminate');
|
139
|
-
const option = {
|
140
|
-
value,
|
141
|
-
selected,
|
142
|
-
disabled,
|
143
|
-
indeterminate
|
144
|
-
};
|
145
|
-
const nestedOptions = Array.from(element.children)
|
146
|
-
.filter(child => child.tagName === 'IFX-MULTISELECT-OPTION')
|
147
|
-
.map((child, childIndex) => this.parseOptionElement(child, childIndex))
|
148
|
-
.filter(opt => opt !== null);
|
149
|
-
if (nestedOptions.length > 0) {
|
150
|
-
option.children = nestedOptions;
|
151
|
-
}
|
152
|
-
return option;
|
65
|
+
updateOptions() {
|
66
|
+
this.loadedOptions = [];
|
67
|
+
this.filteredOptions = [];
|
68
|
+
this.optionCount = 0;
|
69
|
+
this.optionsProcessed = false;
|
70
|
+
this.persistentSelectedOptions = [];
|
71
|
+
this.loadInitialOptions();
|
153
72
|
}
|
154
|
-
loadInitialOptions() {
|
73
|
+
async loadInitialOptions() {
|
74
|
+
this.isLoading = true;
|
155
75
|
this.internalError = this.error;
|
156
76
|
this.internalErrorMessage = this.errorMessage;
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
77
|
+
// Load the first batch of options (e.g., first 20)
|
78
|
+
this.loadedOptions = await this.fetchOptions(0, this.batchSize);
|
79
|
+
this.isLoading = false;
|
80
|
+
}
|
81
|
+
async fetchMoreOptions() {
|
82
|
+
this.isLoading = true;
|
83
|
+
const moreOptions = await this.fetchOptions(this.loadedOptions.length, this.batchSize);
|
84
|
+
this.loadedOptions = [...this.loadedOptions, ...moreOptions];
|
85
|
+
this.isLoading = false;
|
86
|
+
}
|
87
|
+
handleScroll(event) {
|
88
|
+
const element = event.target;
|
89
|
+
const halfwayPoint = Math.floor((element.scrollHeight - element.clientHeight) / 2); //loading more options when the user has scrolled halfway through the current list
|
90
|
+
if (element.scrollTop >= halfwayPoint) {
|
91
|
+
this.fetchMoreOptions();
|
92
|
+
}
|
161
93
|
}
|
94
|
+
async fetchOptions(startIndex, count) {
|
95
|
+
let allOptions = [];
|
96
|
+
// Parse options if it's a string, or use directly if it's an array
|
97
|
+
if (typeof this.options === 'string') {
|
98
|
+
try {
|
99
|
+
allOptions = JSON.parse(this.options);
|
100
|
+
}
|
101
|
+
catch (err) {
|
102
|
+
console.error('Failed to parse options:', err);
|
103
|
+
}
|
104
|
+
}
|
105
|
+
else if (Array.isArray(this.options)) {
|
106
|
+
allOptions = this.options;
|
107
|
+
}
|
108
|
+
else {
|
109
|
+
console.error('Unexpected value for options:', this.options);
|
110
|
+
}
|
111
|
+
if (!this.optionsProcessed) {
|
112
|
+
this.optionCount = this.countOptions(allOptions);
|
113
|
+
const initiallySelected = this.collectSelectedOptions(allOptions);
|
114
|
+
const initallySelectedNotInState = initiallySelected.filter(init => !this.persistentSelectedOptions.some(opt => opt.value == init.value));
|
115
|
+
this.persistentSelectedOptions = [...this.persistentSelectedOptions, ...initallySelectedNotInState];
|
116
|
+
this.optionsProcessed = true;
|
117
|
+
}
|
118
|
+
// Slice the options array based on startIndex and count
|
119
|
+
const slicedOptions = allOptions.slice(startIndex, startIndex + count);
|
120
|
+
return slicedOptions;
|
121
|
+
}
|
122
|
+
/**
|
123
|
+
* Collects and returns all options that are selected.
|
124
|
+
* When the parent is selected, then the value of the children will be overriden with selected as well.
|
125
|
+
* It will only collect the leaves of the tree.
|
126
|
+
*
|
127
|
+
* @param options A list of options.
|
128
|
+
* @returns A list with all selected options
|
129
|
+
*/
|
162
130
|
collectSelectedOptions(options) {
|
163
131
|
let selectedOptions = [];
|
164
132
|
for (const option of options) {
|
165
133
|
if (option.selected) {
|
166
134
|
if (option.children && option.children.length > 0) {
|
135
|
+
// if parent is selected, then select all child options
|
167
136
|
selectedOptions = selectedOptions.concat(this.collectLeafOptions(option.children));
|
168
137
|
}
|
169
138
|
else {
|
@@ -180,6 +149,11 @@ export class Multiselect {
|
|
180
149
|
}
|
181
150
|
return selectedOptions;
|
182
151
|
}
|
152
|
+
/**
|
153
|
+
* Collects all leaf children options.
|
154
|
+
*
|
155
|
+
* @param option A list with all leaf-children.
|
156
|
+
*/
|
183
157
|
collectLeafOptions(children) {
|
184
158
|
let leafOptions = [];
|
185
159
|
for (const child of children) {
|
@@ -192,106 +166,30 @@ export class Multiselect {
|
|
192
166
|
}
|
193
167
|
return leafOptions;
|
194
168
|
}
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
169
|
+
/**
|
170
|
+
* Count the number of options. Only counts the leaves of the options tree.
|
171
|
+
*/
|
172
|
+
countOptions(options) {
|
173
|
+
let count = 0;
|
174
|
+
for (const option of options) {
|
175
|
+
if (option.children && option.children.length >= 0) {
|
176
|
+
count += this.countOptions(option.children);
|
200
177
|
}
|
201
178
|
else {
|
202
|
-
|
203
|
-
}
|
204
|
-
}
|
205
|
-
}
|
206
|
-
positionDropdown() {
|
207
|
-
var _a;
|
208
|
-
const wrapperRect = (_a = this.el.shadowRoot.querySelector('.ifx-multiselect-wrapper')) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
209
|
-
const spaceBelow = window.innerHeight - wrapperRect.bottom;
|
210
|
-
const spaceAbove = wrapperRect.top;
|
211
|
-
if ((spaceAbove > spaceBelow && wrapperRect.height > spaceBelow) || (wrapperRect.bottom > window.innerHeight)) {
|
212
|
-
this.dropdownFlipped = true;
|
213
|
-
}
|
214
|
-
else {
|
215
|
-
this.dropdownFlipped = false;
|
216
|
-
}
|
217
|
-
}
|
218
|
-
updateSlotBasedSelections(emitEvent = false) {
|
219
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
220
|
-
const selectedLeafOptions = [];
|
221
|
-
allOptionElements.forEach((optionEl) => {
|
222
|
-
const instance = optionEl['__stencil_instance'];
|
223
|
-
if (instance && instance.selected && !instance.hasChildren) {
|
224
|
-
selectedLeafOptions.push({
|
225
|
-
value: instance.value,
|
226
|
-
selected: true,
|
227
|
-
disabled: instance.disabled
|
228
|
-
});
|
179
|
+
count++;
|
229
180
|
}
|
230
|
-
});
|
231
|
-
this.persistentSelectedOptions = selectedLeafOptions;
|
232
|
-
if (emitEvent) {
|
233
|
-
this.ifxSelect.emit(this.persistentSelectedOptions);
|
234
|
-
}
|
235
|
-
}
|
236
|
-
updateInitialParentStates() {
|
237
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
238
|
-
const optionsByDepth = Array.from(allOptionElements)
|
239
|
-
.map(el => ({
|
240
|
-
element: el,
|
241
|
-
instance: el['__stencil_instance'],
|
242
|
-
depth: parseInt(el.getAttribute('data-level') || '0')
|
243
|
-
}))
|
244
|
-
.filter(item => item.instance)
|
245
|
-
.sort((a, b) => b.depth - a.depth);
|
246
|
-
optionsByDepth.forEach(({ instance }) => {
|
247
|
-
if (instance.hasChildren) {
|
248
|
-
this.updateParentState(instance);
|
249
|
-
}
|
250
|
-
});
|
251
|
-
}
|
252
|
-
updateParentState(parentInstance) {
|
253
|
-
const directChildren = Array.from(parentInstance.el.children)
|
254
|
-
.filter((child) => child.tagName === 'IFX-MULTISELECT-OPTION')
|
255
|
-
.map(child => child['__stencil_instance'])
|
256
|
-
.filter(instance => instance !== null);
|
257
|
-
const selectedCount = directChildren.filter(child => child.selected).length;
|
258
|
-
const indeterminateCount = directChildren.filter(child => child.indeterminate).length;
|
259
|
-
const totalCount = directChildren.length;
|
260
|
-
if (selectedCount === totalCount && indeterminateCount === 0) {
|
261
|
-
parentInstance.selected = true;
|
262
|
-
parentInstance.indeterminate = false;
|
263
|
-
}
|
264
|
-
else if (selectedCount === 0 && indeterminateCount === 0) {
|
265
|
-
parentInstance.selected = false;
|
266
|
-
parentInstance.indeterminate = false;
|
267
|
-
}
|
268
|
-
else {
|
269
|
-
parentInstance.selected = false;
|
270
|
-
parentInstance.indeterminate = true;
|
271
181
|
}
|
182
|
+
return count;
|
272
183
|
}
|
273
184
|
componentDidLoad() {
|
274
185
|
setTimeout(() => {
|
275
186
|
this.positionDropdown();
|
276
187
|
}, 500);
|
277
|
-
this.
|
278
|
-
if (!this.pendingSelectionUpdate) {
|
279
|
-
this.pendingSelectionUpdate = true;
|
280
|
-
requestAnimationFrame(() => {
|
281
|
-
this.updateSlotBasedSelections(true);
|
282
|
-
setTimeout(() => {
|
283
|
-
this.pendingSelectionUpdate = false;
|
284
|
-
}, 0);
|
285
|
-
});
|
286
|
-
}
|
287
|
-
});
|
288
|
-
setTimeout(() => {
|
289
|
-
this.updateSlotBasedSelections(false);
|
290
|
-
this.updateInitialParentStates();
|
291
|
-
}, 100);
|
188
|
+
// setInterval(this.handleScroll, 5000); // Runs every 5 seconds (5000 milliseconds)
|
292
189
|
}
|
293
190
|
componentWillLoad() {
|
294
191
|
this.loadInitialOptions();
|
192
|
+
this.filteredOptions = [...this.loadedOptions];
|
295
193
|
}
|
296
194
|
updateInternalError() {
|
297
195
|
this.internalError = this.error;
|
@@ -299,66 +197,109 @@ export class Multiselect {
|
|
299
197
|
updateInternalErrorMessage() {
|
300
198
|
this.internalErrorMessage = this.errorMessage;
|
301
199
|
}
|
200
|
+
loadedOptionsChanged() {
|
201
|
+
this.filteredOptions = [...this.loadedOptions];
|
202
|
+
}
|
302
203
|
onSelectionChange(newValue, _) {
|
303
204
|
const formData = new FormData();
|
304
205
|
newValue.forEach(option => formData.append(this.name, option.value));
|
305
206
|
this.internals.setFormValue(formData);
|
306
207
|
}
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
}
|
208
|
+
handleOptionClick(option) {
|
209
|
+
this.internalError = false;
|
210
|
+
if (!option.selected && this.isSelectionLimitReached(option)) {
|
211
|
+
option.checkboxRef.toggleCheckedState(false);
|
212
|
+
this.internalError = true;
|
213
|
+
this.internalErrorMessage = "Please consider the maximum number of items to choose from";
|
214
|
+
return;
|
215
|
+
}
|
216
|
+
this.updateSelection(option);
|
217
|
+
this.ifxSelect.emit(this.persistentSelectedOptions);
|
218
|
+
}
|
219
|
+
isSelectionLimitReached(option) {
|
220
|
+
let newOptionsLength = option.children ? option.children.length : 1;
|
221
|
+
return this.maxItemCount && this.persistentSelectedOptions.length + newOptionsLength > this.maxItemCount &&
|
222
|
+
!this.persistentSelectedOptions.some(selectedOption => selectedOption.value === option.value);
|
223
|
+
}
|
224
|
+
updateSelection(option) {
|
225
|
+
const wasSelected = this.persistentSelectedOptions.some(selectedOption => selectedOption.value === option.value);
|
226
|
+
if (option.children && option.children.length > 0) {
|
227
|
+
this.handleParentOptionClick(option);
|
228
|
+
}
|
229
|
+
else {
|
230
|
+
this.handleChildOptionClick(option, wasSelected);
|
231
|
+
}
|
315
232
|
}
|
316
|
-
|
317
|
-
const
|
318
|
-
|
319
|
-
|
320
|
-
if (instance && instance.hasChildren) {
|
321
|
-
instance.isExpanded = true;
|
322
|
-
}
|
323
|
-
});
|
233
|
+
async selectAll() {
|
234
|
+
const allOptions = await this.fetchOptions(0, this.optionCount);
|
235
|
+
this.selectAllRecursive(allOptions);
|
236
|
+
this.ifxSelect.emit(this.persistentSelectedOptions);
|
324
237
|
}
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
if (
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
instance.selected = true;
|
238
|
+
selectAllRecursive(options) {
|
239
|
+
for (const opt of options) {
|
240
|
+
if (opt.children && opt.children.length > 0) {
|
241
|
+
this.selectAllRecursive(opt.children);
|
242
|
+
}
|
243
|
+
else {
|
244
|
+
if (!this.persistentSelectedOptions.some((some) => some.value === opt.value)) {
|
245
|
+
opt.selected = true;
|
246
|
+
this.persistentSelectedOptions = [...this.persistentSelectedOptions, opt];
|
247
|
+
this.optionCount = this.countOptions(this.persistentSelectedOptions);
|
336
248
|
}
|
337
249
|
}
|
338
|
-
}
|
339
|
-
setTimeout(() => {
|
340
|
-
this.updateInitialParentStates();
|
341
|
-
this.updateSlotBasedSelections(false);
|
342
|
-
this.ifxSelect.emit(this.persistentSelectedOptions);
|
343
|
-
}, 0);
|
250
|
+
}
|
344
251
|
}
|
345
|
-
|
346
|
-
const
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
252
|
+
handleParentOptionClick(option) {
|
253
|
+
const allChildrenSelected = option.children.every(child => this.persistentSelectedOptions.some(selectedOption => selectedOption.value === child.value));
|
254
|
+
if (allChildrenSelected) {
|
255
|
+
this.persistentSelectedOptions = [...this.persistentSelectedOptions.filter(selectedOption => !option.children.some(child => child.value === selectedOption.value))];
|
256
|
+
option.selected = false;
|
257
|
+
option.children.forEach(child => {
|
258
|
+
child.selected = false;
|
259
|
+
});
|
260
|
+
}
|
261
|
+
else {
|
262
|
+
const newChildren = [...option.children.filter(childOption => !this.persistentSelectedOptions.some(selectedOption => selectedOption.value === childOption.value))];
|
263
|
+
option.selected = true;
|
264
|
+
option.children.forEach(child => {
|
265
|
+
child.selected = true;
|
266
|
+
});
|
267
|
+
this.persistentSelectedOptions = [...this.persistentSelectedOptions, ...newChildren];
|
268
|
+
}
|
269
|
+
}
|
270
|
+
handleChildOptionClick(option, wasSelected) {
|
271
|
+
if (wasSelected) {
|
272
|
+
this.persistentSelectedOptions = [...this.persistentSelectedOptions.filter(selectedOption => selectedOption.value !== option.value)];
|
273
|
+
option.selected = false;
|
274
|
+
}
|
275
|
+
else {
|
276
|
+
this.persistentSelectedOptions = [...this.persistentSelectedOptions, option];
|
277
|
+
option.selected = true;
|
278
|
+
}
|
279
|
+
this.updateParentSelectedState();
|
280
|
+
}
|
281
|
+
updateParentSelectedState() {
|
282
|
+
this.loadedOptions.forEach(option => {
|
283
|
+
var _a;
|
284
|
+
if (((_a = option.children) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
285
|
+
if (option.children.every(child => child.selected === true))
|
286
|
+
option.selected = true;
|
287
|
+
else {
|
288
|
+
option.selected = false;
|
289
|
+
if (this.isOptionIndeterminate(option)) {
|
290
|
+
option.indeterminate = true;
|
291
|
+
}
|
292
|
+
else {
|
293
|
+
option.indeterminate = false;
|
294
|
+
}
|
354
295
|
}
|
355
296
|
}
|
356
297
|
});
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
298
|
+
}
|
299
|
+
getSizeClass() {
|
300
|
+
return `${this.size}` === "s"
|
301
|
+
? "small-select"
|
302
|
+
: "medium-select";
|
362
303
|
}
|
363
304
|
toggleDropdown() {
|
364
305
|
this.dropdownOpen = !this.dropdownOpen;
|
@@ -366,144 +307,207 @@ export class Multiselect {
|
|
366
307
|
if (this.dropdownOpen) {
|
367
308
|
document.addEventListener('click', this.handleDocumentClick);
|
368
309
|
}
|
369
|
-
|
370
|
-
this.resetSearch();
|
371
|
-
}
|
310
|
+
// Dispatch the ifxOpen event
|
372
311
|
this.ifxOpen.emit(this.dropdownOpen);
|
373
312
|
}, 0);
|
374
313
|
}
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
const searchEvent = new CustomEvent('ifx-search-filter', {
|
388
|
-
detail: { searchTerm: '', isActive: false }
|
314
|
+
waitForElement(querySelectorFunc, callback, maxTries = 50) {
|
315
|
+
let tries = 0;
|
316
|
+
function request() {
|
317
|
+
requestAnimationFrame(() => {
|
318
|
+
const elements = querySelectorFunc();
|
319
|
+
if (elements.length > 0 || tries > maxTries) {
|
320
|
+
callback(elements);
|
321
|
+
}
|
322
|
+
else {
|
323
|
+
tries++;
|
324
|
+
request();
|
325
|
+
}
|
389
326
|
});
|
390
|
-
option.dispatchEvent(searchEvent);
|
391
|
-
});
|
392
|
-
}
|
393
|
-
handleWrapperClick(event) {
|
394
|
-
this.positionDropdown();
|
395
|
-
if (event.currentTarget === event.target) {
|
396
|
-
this.toggleDropdown();
|
397
327
|
}
|
328
|
+
request();
|
398
329
|
}
|
399
330
|
handleKeyDown(event) {
|
400
331
|
if (this.disabled)
|
401
|
-
return;
|
402
|
-
|
403
|
-
if (!this.dropdownOpen) {
|
404
|
-
switch (event.code) {
|
405
|
-
case 'Enter':
|
406
|
-
case 'Space':
|
407
|
-
case 'ArrowDown':
|
408
|
-
event.preventDefault();
|
409
|
-
this.toggleDropdown();
|
410
|
-
break;
|
411
|
-
}
|
412
|
-
return;
|
413
|
-
}
|
414
|
-
// Dropdown is open - handle navigation and controls
|
332
|
+
return; // If it's disabled, don't do anything.
|
333
|
+
const options = this.dropdownElement.querySelectorAll('.option');
|
415
334
|
switch (event.code) {
|
416
|
-
case '
|
417
|
-
event.preventDefault();
|
335
|
+
case 'Enter':
|
418
336
|
this.toggleDropdown();
|
337
|
+
// Wait a bit for the dropdown to finish rendering
|
338
|
+
this.waitForElement(() => {
|
339
|
+
return this.dropdownElement.querySelectorAll('.option');
|
340
|
+
}, (options) => {
|
341
|
+
this.updateHighlightedOption(options);
|
342
|
+
});
|
419
343
|
break;
|
420
|
-
case 'Enter':
|
421
344
|
case 'Space':
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
345
|
+
this.toggleDropdown();
|
346
|
+
// Wait a bit for the dropdown to finish rendering
|
347
|
+
this.waitForElement(() => {
|
348
|
+
return this.dropdownElement.querySelectorAll('.option');
|
349
|
+
}, (options) => {
|
350
|
+
this.updateHighlightedOption(options);
|
351
|
+
});
|
428
352
|
break;
|
429
353
|
case 'ArrowDown':
|
354
|
+
this.handleArrowDown(options);
|
355
|
+
if (this.dropdownOpen) {
|
356
|
+
this.updateHighlightedOption(options);
|
357
|
+
}
|
358
|
+
break;
|
430
359
|
case 'ArrowUp':
|
431
|
-
|
432
|
-
|
433
|
-
|
360
|
+
this.handleArrowUp(options);
|
361
|
+
if (this.dropdownOpen) {
|
362
|
+
this.updateHighlightedOption(options);
|
363
|
+
}
|
434
364
|
break;
|
435
365
|
}
|
436
366
|
}
|
437
|
-
|
367
|
+
handleWrapperClick(event) {
|
368
|
+
// This is your existing logic for positioning the dropdown
|
369
|
+
this.positionDropdown();
|
370
|
+
// Check if the event target is the wrapper itself and not a child element.
|
371
|
+
if (event.currentTarget === event.target) {
|
372
|
+
this.toggleDropdown();
|
373
|
+
}
|
374
|
+
}
|
375
|
+
clearSelection() {
|
376
|
+
this.persistentSelectedOptions = [];
|
377
|
+
this.ifxSelect.emit(this.persistentSelectedOptions); // if you want to emit empty selection after clearing
|
378
|
+
}
|
379
|
+
positionDropdown() {
|
438
380
|
var _a;
|
439
|
-
const
|
440
|
-
|
441
|
-
|
442
|
-
|
381
|
+
const wrapperRect = (_a = this.el.shadowRoot.querySelector('.ifx-multiselect-wrapper')) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
382
|
+
const spaceBelow = window.innerHeight - wrapperRect.bottom;
|
383
|
+
const spaceAbove = wrapperRect.top;
|
384
|
+
// If there's more space above than below the trigger and the dropdown doesn't fit below
|
385
|
+
if ((spaceAbove > spaceBelow && wrapperRect.height > spaceBelow) || (wrapperRect.bottom > window.innerHeight)) {
|
386
|
+
this.dropdownFlipped = true;
|
387
|
+
}
|
388
|
+
else {
|
389
|
+
this.dropdownFlipped = false;
|
443
390
|
}
|
444
391
|
}
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
392
|
+
// Helper function to update highlighted option based on currentIndex
|
393
|
+
updateHighlightedOption(options) {
|
394
|
+
// Clear all highlights
|
395
|
+
options.forEach((option) => option.classList.remove('is-highlighted'));
|
396
|
+
// Apply highlight to the current option
|
397
|
+
if (this.currentIndex >= 0 && this.currentIndex < options.length) {
|
398
|
+
options[this.currentIndex].classList.add('is-highlighted');
|
399
|
+
options[this.currentIndex].focus();
|
400
|
+
}
|
401
|
+
}
|
402
|
+
// Helper function to handle arrow down navigation
|
403
|
+
handleArrowDown(options) {
|
404
|
+
if (this.currentIndex < options.length - 1) {
|
405
|
+
this.currentIndex++;
|
406
|
+
}
|
407
|
+
else {
|
408
|
+
this.currentIndex = 0; // Wrap to the beginning.
|
409
|
+
}
|
410
|
+
}
|
411
|
+
// Helper function to handle arrow up navigation
|
412
|
+
handleArrowUp(options) {
|
413
|
+
if (this.currentIndex > 0) {
|
414
|
+
this.currentIndex--;
|
415
|
+
}
|
416
|
+
else {
|
417
|
+
this.currentIndex = options.length - 1; // Wrap to the end.
|
418
|
+
}
|
419
|
+
}
|
420
|
+
handleOptionKeyDown(e, option) {
|
421
|
+
if (e.key !== 'ArrowUp' && e.key !== 'ArrowDown')
|
422
|
+
e.stopPropagation();
|
423
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
424
|
+
this.handleOptionClick(option);
|
425
|
+
}
|
426
|
+
}
|
427
|
+
renderOption(option, index) {
|
428
|
+
var _a;
|
429
|
+
const isIndeterminate = this.isOptionIndeterminate(option);
|
430
|
+
const isSelected = option.children ? isIndeterminate || this.isOptionSelected(option) : this.persistentSelectedOptions.some(selectedOption => selectedOption.value === option.value);
|
431
|
+
const disableCheckbox = !isSelected && this.maxItemCount && this.persistentSelectedOptions.length >= this.maxItemCount;
|
432
|
+
const uniqueId = `checkbox-${option.value}-${index}`; // Generate a unique ID using the index
|
433
|
+
return (h("div", { class: "option-wrapper" }, h("div", { class: `option ${isSelected ? 'selected' : ''} ${disableCheckbox ? 'disabled' : ''}
|
434
|
+
${this.getSizeClass()}`, "data-value": option.value, onKeyDown: (e) => !disableCheckbox && this.handleOptionKeyDown(e, option), onClick: () => !disableCheckbox && this.handleOptionClick(option), tabindex: "0", role: `${((_a = option.children) === null || _a === void 0 ? void 0 : _a.length) > 0 ? "treeitem" : "option"}` }, h("ifx-checkbox", { tabIndex: -1, ref: (el) => option.checkboxRef = el, id: uniqueId, size: "s", checked: isIndeterminate ? false : isSelected, indeterminate: isIndeterminate, disabled: disableCheckbox }), h("label", { htmlFor: uniqueId, onClick: (e) => e.stopPropagation() }, option.label)), option.children && option.children.map((child, childIndex) => this.renderSubOption(child, `${index}-${childIndex}`))));
|
435
|
+
}
|
436
|
+
isOptionSelected(option) {
|
437
|
+
if (!option.children)
|
438
|
+
return false;
|
439
|
+
return option.children.every(child => this.persistentSelectedOptions.some(persistentOption => persistentOption.value === child.value));
|
440
|
+
}
|
441
|
+
isOptionIndeterminate(option) {
|
442
|
+
if (!option.children)
|
443
|
+
return false;
|
444
|
+
const selectedChildren = option.children.filter(child => this.persistentSelectedOptions.some(persistentOption => persistentOption.value === child.value)).length;
|
445
|
+
return selectedChildren > 0 && selectedChildren < option.children.length;
|
446
|
+
}
|
447
|
+
findInOptions(options, searchTerm) {
|
448
|
+
for (const option of options) {
|
449
|
+
if (option.value === searchTerm) {
|
450
|
+
return option;
|
451
|
+
}
|
452
|
+
if (option.children) {
|
453
|
+
const foundInChildren = this.findInOptions(option.children, searchTerm);
|
454
|
+
if (foundInChildren) {
|
455
|
+
return foundInChildren;
|
456
|
+
}
|
454
457
|
}
|
458
|
+
}
|
459
|
+
return null;
|
460
|
+
}
|
461
|
+
renderSubOption(option, index) {
|
462
|
+
var _a;
|
463
|
+
const isSelected = this.persistentSelectedOptions.some(selectedOption => selectedOption.value === option.value);
|
464
|
+
const disableCheckbox = !isSelected && this.maxItemCount && this.persistentSelectedOptions.length >= this.maxItemCount;
|
465
|
+
const uniqueId = `checkbox-${option.value}-${index}`;
|
466
|
+
return (h("div", { class: `option sub-option ${isSelected ? 'selected' : ''} ${this.getSizeClass()} ${disableCheckbox ? 'disabled' : ''}`, "data-value": option.value, role: `${((_a = option.children) === null || _a === void 0 ? void 0 : _a.length) > 0 ? "option" : "treeitem"}`, onKeyDown: (e) => !disableCheckbox && this.handleOptionKeyDown(e, option), onClick: () => !disableCheckbox && this.handleOptionClick(option), tabindex: "0" }, h("ifx-checkbox", { tabIndex: -1, ref: (el) => option.checkboxRef = el, id: uniqueId, size: "s", checked: isSelected, disabled: disableCheckbox }), h("label", { htmlFor: uniqueId, onClick: (e) => e.stopPropagation() }, option.label)));
|
467
|
+
}
|
468
|
+
renderSelectAll() {
|
469
|
+
const allSelected = this.persistentSelectedOptions.length === this.optionCount;
|
470
|
+
const noneSelected = this.persistentSelectedOptions.length === 0;
|
471
|
+
const indeterminate = this.optionCount > 0 && !noneSelected && !allSelected;
|
472
|
+
const that = this;
|
473
|
+
function toggleSelectAll() {
|
455
474
|
if (allSelected) {
|
456
|
-
|
475
|
+
that.clearSelection();
|
457
476
|
}
|
458
477
|
else {
|
459
|
-
|
478
|
+
that.selectAll();
|
460
479
|
}
|
461
|
-
}
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
renderNoResultsMessage() {
|
471
|
-
return (h("div", { class: "ifx-multiselect-no-results" }, h("div", { class: "no-results-content" }, h("span", { class: "no-results-text" }, this.noResultsMessage))));
|
480
|
+
}
|
481
|
+
function handleSelectAllKeydown(e) {
|
482
|
+
if (e.key !== 'ArrowUp' && e.key !== 'ArrowDown')
|
483
|
+
e.stopPropagation();
|
484
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
485
|
+
toggleSelectAll();
|
486
|
+
}
|
487
|
+
}
|
488
|
+
return h("div", { class: "select-all-wrapper" }, h("div", { class: `option ${this.getSizeClass()}`, tabindex: '0', onKeyDown: (e) => handleSelectAllKeydown(e), onClick: toggleSelectAll }, h("ifx-checkbox", { tabIndex: -1, id: 'selectAll', checked: allSelected, indeterminate: indeterminate, size: "s" }), h("label", { htmlFor: 'selectAll' }, "Select all")), h("ifx-dropdown-separator", null));
|
472
489
|
}
|
473
490
|
render() {
|
491
|
+
// Create a label for the selected options
|
474
492
|
const selectedOptionsLabels = this.persistentSelectedOptions
|
475
|
-
.
|
476
|
-
|
477
|
-
const
|
478
|
-
|
493
|
+
.filter(option => {
|
494
|
+
// check if option is a child and its parent is selected
|
495
|
+
const isChildSelectedWithParent = this.persistentSelectedOptions.some(parentOption => parentOption.children &&
|
496
|
+
parentOption.children.some(child => child.value === option.value) &&
|
497
|
+
parentOption.selected);
|
498
|
+
return !isChildSelectedWithParent;
|
479
499
|
})
|
500
|
+
.map(option => option.label)
|
480
501
|
.join(', ');
|
481
|
-
const hasSelections = this.persistentSelectedOptions.length > 0;
|
482
|
-
let isFlatMultiselect = false;
|
483
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
484
|
-
if (allOptionElements.length > 0) {
|
485
|
-
isFlatMultiselect = Array.from(allOptionElements).every(option => option.children.length === 0);
|
486
|
-
}
|
487
502
|
return (h("div", { class: `ifx-multiselect-container`, ref: el => this.dropdownElement = el }, this.label ?
|
488
|
-
h("div", { class: "ifx-label-wrapper" }, h("span", null, this.label)) : null, h("div", { class: `ifx-multiselect-wrapper
|
489
|
-
${this.
|
503
|
+
h("div", { class: "ifx-label-wrapper" }, h("span", null, this.label)) : null, h("div", { class: `ifx-multiselect-wrapper
|
504
|
+
${this.getSizeClass()}
|
505
|
+
${this.dropdownOpen ? 'active' : ''}
|
490
506
|
${this.dropdownFlipped ? 'is-flipped' : ''}
|
491
507
|
${this.internalError ? 'error' : ""}
|
492
|
-
${this.disabled ? 'disabled' : ""}`,
|
493
|
-
${
|
494
|
-
`, onClick: this.disabled ? undefined : () => this.toggleDropdown() },
|
495
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
496
|
-
e.preventDefault();
|
497
|
-
e.stopPropagation();
|
498
|
-
this.expandAll();
|
499
|
-
}
|
500
|
-
} }, this.expandLabel), h("span", { class: "control-item", role: "button", tabIndex: 0, "aria-label": this.ariaCollapseAllLabel, onClick: (e) => { e.stopPropagation(); this.collapseAll(); }, onKeyDown: (e) => {
|
501
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
502
|
-
e.preventDefault();
|
503
|
-
e.stopPropagation();
|
504
|
-
this.collapseAll();
|
505
|
-
}
|
506
|
-
} }, this.collapseLabel)))))), h("div", { class: "ifx-multiselect-options", role: "listbox", "aria-multiselectable": "true" }, h("slot", null), this.searchTerm && this.showNoResultsMessage && this.renderNoResultsMessage()))), h("div", { class: 'ifx-multiselect-icon-container' }, this.persistentSelectedOptions.length > 0 && (h("div", { class: `ifx-clear-button ${!this.showClearButton ? 'hide' : ''}`, onClick: this.disabled ? undefined : () => this.clearSelection() }, h("ifx-icon", { icon: "cRemove16" }))), h("div", { class: "icon-wrapper-up", onClick: this.disabled ? undefined : () => this.toggleDropdown() }, h("ifx-icon", { key: 'icon-up', icon: 'chevron-up-16' })), h("div", { class: "icon-wrapper-down", onClick: this.disabled ? undefined : () => this.toggleDropdown() }, h("ifx-icon", { key: 'icon-down', icon: 'chevron-down-16' })))), this.internalError ?
|
508
|
+
${this.disabled ? 'disabled' : ""}`, tabindex: "0", onClick: this.disabled ? undefined : (event) => this.handleWrapperClick(event), onKeyDown: this.disabled ? undefined : (event) => this.handleKeyDown(event) }, h("div", { class: `ifx-multiselect-input
|
509
|
+
${this.persistentSelectedOptions.length === 0 ? 'placeholder' : ""}
|
510
|
+
`, onClick: this.disabled ? undefined : () => this.toggleDropdown() }, this.persistentSelectedOptions.length > 0 ? selectedOptionsLabels : this.placeholder), this.dropdownOpen && (h("div", { class: "ifx-multiselect-dropdown-menu", onScroll: (event) => this.handleScroll(event) }, this.showSearch && h("input", { type: "text", role: "textbox", class: "search-input", onKeyDown: (e) => { e.stopPropagation(); }, onInput: (event) => this.handleSearch(event.target), placeholder: "Search..." }), this.showSelectAll && this.renderSelectAll(), this.filteredOptions.map((option, index) => this.renderOption(option, index)), this.isLoading && h("div", null, "Loading more options..."))), h("div", { class: 'ifx-multiselect-icon-container' }, this.persistentSelectedOptions.length > 0 && (h("div", { class: `ifx-clear-button ${!this.showClearButton ? 'hide' : ''}`, onClick: this.disabled ? undefined : () => this.clearSelection() }, h("ifx-icon", { icon: "cRemove16" }))), h("div", { class: "icon-wrapper-up", onClick: this.disabled ? undefined : () => this.toggleDropdown() }, h("ifx-icon", { key: 'icon-up', icon: 'chevron-up-16' })), h("div", { class: "icon-wrapper-down", onClick: this.disabled ? undefined : () => this.toggleDropdown() }, h("ifx-icon", { key: 'icon-down', icon: 'chevron-down-16' })))), this.internalError ?
|
507
511
|
h("div", { class: "ifx-error-message-wrapper" }, h("span", null, this.internalErrorMessage)) : null));
|
508
512
|
}
|
509
513
|
static get is() { return "ifx-multiselect"; }
|
@@ -540,52 +544,12 @@ export class Multiselect {
|
|
540
544
|
"attribute": "name",
|
541
545
|
"reflect": false
|
542
546
|
},
|
543
|
-
"
|
544
|
-
"type": "boolean",
|
545
|
-
"mutable": false,
|
546
|
-
"complexType": {
|
547
|
-
"original": "boolean",
|
548
|
-
"resolved": "boolean",
|
549
|
-
"references": {}
|
550
|
-
},
|
551
|
-
"required": false,
|
552
|
-
"optional": false,
|
553
|
-
"docs": {
|
554
|
-
"tags": [],
|
555
|
-
"text": ""
|
556
|
-
},
|
557
|
-
"getter": false,
|
558
|
-
"setter": false,
|
559
|
-
"attribute": "disabled",
|
560
|
-
"reflect": false,
|
561
|
-
"defaultValue": "false"
|
562
|
-
},
|
563
|
-
"error": {
|
564
|
-
"type": "boolean",
|
565
|
-
"mutable": false,
|
566
|
-
"complexType": {
|
567
|
-
"original": "boolean",
|
568
|
-
"resolved": "boolean",
|
569
|
-
"references": {}
|
570
|
-
},
|
571
|
-
"required": false,
|
572
|
-
"optional": false,
|
573
|
-
"docs": {
|
574
|
-
"tags": [],
|
575
|
-
"text": ""
|
576
|
-
},
|
577
|
-
"getter": false,
|
578
|
-
"setter": false,
|
579
|
-
"attribute": "error",
|
580
|
-
"reflect": false,
|
581
|
-
"defaultValue": "false"
|
582
|
-
},
|
583
|
-
"errorMessage": {
|
547
|
+
"options": {
|
584
548
|
"type": "string",
|
585
549
|
"mutable": false,
|
586
550
|
"complexType": {
|
587
|
-
"original": "string",
|
588
|
-
"resolved": "string",
|
551
|
+
"original": "any[] | string",
|
552
|
+
"resolved": "any[] | string",
|
589
553
|
"references": {}
|
590
554
|
},
|
591
555
|
"required": false,
|
@@ -596,16 +560,15 @@ export class Multiselect {
|
|
596
560
|
},
|
597
561
|
"getter": false,
|
598
562
|
"setter": false,
|
599
|
-
"attribute": "
|
600
|
-
"reflect": false
|
601
|
-
"defaultValue": "\"Error\""
|
563
|
+
"attribute": "options",
|
564
|
+
"reflect": false
|
602
565
|
},
|
603
|
-
"
|
604
|
-
"type": "
|
566
|
+
"batchSize": {
|
567
|
+
"type": "number",
|
605
568
|
"mutable": false,
|
606
569
|
"complexType": {
|
607
|
-
"original": "
|
608
|
-
"resolved": "
|
570
|
+
"original": "number",
|
571
|
+
"resolved": "number",
|
609
572
|
"references": {}
|
610
573
|
},
|
611
574
|
"required": false,
|
@@ -616,11 +579,11 @@ export class Multiselect {
|
|
616
579
|
},
|
617
580
|
"getter": false,
|
618
581
|
"setter": false,
|
619
|
-
"attribute": "
|
582
|
+
"attribute": "batch-size",
|
620
583
|
"reflect": false,
|
621
|
-
"defaultValue": "
|
584
|
+
"defaultValue": "50"
|
622
585
|
},
|
623
|
-
"
|
586
|
+
"size": {
|
624
587
|
"type": "string",
|
625
588
|
"mutable": false,
|
626
589
|
"complexType": {
|
@@ -636,71 +599,11 @@ export class Multiselect {
|
|
636
599
|
},
|
637
600
|
"getter": false,
|
638
601
|
"setter": false,
|
639
|
-
"attribute": "
|
640
|
-
"reflect": false,
|
641
|
-
"defaultValue": "\"\""
|
642
|
-
},
|
643
|
-
"showSearch": {
|
644
|
-
"type": "boolean",
|
645
|
-
"mutable": false,
|
646
|
-
"complexType": {
|
647
|
-
"original": "boolean",
|
648
|
-
"resolved": "boolean",
|
649
|
-
"references": {}
|
650
|
-
},
|
651
|
-
"required": false,
|
652
|
-
"optional": false,
|
653
|
-
"docs": {
|
654
|
-
"tags": [],
|
655
|
-
"text": ""
|
656
|
-
},
|
657
|
-
"getter": false,
|
658
|
-
"setter": false,
|
659
|
-
"attribute": "show-search",
|
660
|
-
"reflect": false,
|
661
|
-
"defaultValue": "true"
|
662
|
-
},
|
663
|
-
"showSelectAll": {
|
664
|
-
"type": "boolean",
|
665
|
-
"mutable": false,
|
666
|
-
"complexType": {
|
667
|
-
"original": "boolean",
|
668
|
-
"resolved": "boolean",
|
669
|
-
"references": {}
|
670
|
-
},
|
671
|
-
"required": false,
|
672
|
-
"optional": false,
|
673
|
-
"docs": {
|
674
|
-
"tags": [],
|
675
|
-
"text": ""
|
676
|
-
},
|
677
|
-
"getter": false,
|
678
|
-
"setter": false,
|
679
|
-
"attribute": "show-select-all",
|
602
|
+
"attribute": "size",
|
680
603
|
"reflect": false,
|
681
|
-
"defaultValue": "
|
604
|
+
"defaultValue": "'medium (40px)'"
|
682
605
|
},
|
683
|
-
"
|
684
|
-
"type": "boolean",
|
685
|
-
"mutable": false,
|
686
|
-
"complexType": {
|
687
|
-
"original": "boolean",
|
688
|
-
"resolved": "boolean",
|
689
|
-
"references": {}
|
690
|
-
},
|
691
|
-
"required": false,
|
692
|
-
"optional": false,
|
693
|
-
"docs": {
|
694
|
-
"tags": [],
|
695
|
-
"text": ""
|
696
|
-
},
|
697
|
-
"getter": false,
|
698
|
-
"setter": false,
|
699
|
-
"attribute": "show-clear-button",
|
700
|
-
"reflect": false,
|
701
|
-
"defaultValue": "true"
|
702
|
-
},
|
703
|
-
"showExpandCollapse": {
|
606
|
+
"disabled": {
|
704
607
|
"type": "boolean",
|
705
608
|
"mutable": false,
|
706
609
|
"complexType": {
|
@@ -716,31 +619,11 @@ export class Multiselect {
|
|
716
619
|
},
|
717
620
|
"getter": false,
|
718
621
|
"setter": false,
|
719
|
-
"attribute": "
|
720
|
-
"reflect": false,
|
721
|
-
"defaultValue": "true"
|
722
|
-
},
|
723
|
-
"noResultsMessage": {
|
724
|
-
"type": "string",
|
725
|
-
"mutable": false,
|
726
|
-
"complexType": {
|
727
|
-
"original": "string",
|
728
|
-
"resolved": "string",
|
729
|
-
"references": {}
|
730
|
-
},
|
731
|
-
"required": false,
|
732
|
-
"optional": false,
|
733
|
-
"docs": {
|
734
|
-
"tags": [],
|
735
|
-
"text": ""
|
736
|
-
},
|
737
|
-
"getter": false,
|
738
|
-
"setter": false,
|
739
|
-
"attribute": "no-results-message",
|
622
|
+
"attribute": "disabled",
|
740
623
|
"reflect": false,
|
741
|
-
"defaultValue": "
|
624
|
+
"defaultValue": "false"
|
742
625
|
},
|
743
|
-
"
|
626
|
+
"error": {
|
744
627
|
"type": "boolean",
|
745
628
|
"mutable": false,
|
746
629
|
"complexType": {
|
@@ -756,91 +639,11 @@ export class Multiselect {
|
|
756
639
|
},
|
757
640
|
"getter": false,
|
758
641
|
"setter": false,
|
759
|
-
"attribute": "
|
760
|
-
"reflect": false,
|
761
|
-
"defaultValue": "true"
|
762
|
-
},
|
763
|
-
"searchPlaceholder": {
|
764
|
-
"type": "string",
|
765
|
-
"mutable": false,
|
766
|
-
"complexType": {
|
767
|
-
"original": "string",
|
768
|
-
"resolved": "string",
|
769
|
-
"references": {}
|
770
|
-
},
|
771
|
-
"required": false,
|
772
|
-
"optional": false,
|
773
|
-
"docs": {
|
774
|
-
"tags": [],
|
775
|
-
"text": ""
|
776
|
-
},
|
777
|
-
"getter": false,
|
778
|
-
"setter": false,
|
779
|
-
"attribute": "search-placeholder",
|
780
|
-
"reflect": false,
|
781
|
-
"defaultValue": "\"Search\""
|
782
|
-
},
|
783
|
-
"selectAllLabel": {
|
784
|
-
"type": "string",
|
785
|
-
"mutable": false,
|
786
|
-
"complexType": {
|
787
|
-
"original": "string",
|
788
|
-
"resolved": "string",
|
789
|
-
"references": {}
|
790
|
-
},
|
791
|
-
"required": false,
|
792
|
-
"optional": false,
|
793
|
-
"docs": {
|
794
|
-
"tags": [],
|
795
|
-
"text": ""
|
796
|
-
},
|
797
|
-
"getter": false,
|
798
|
-
"setter": false,
|
799
|
-
"attribute": "select-all-label",
|
800
|
-
"reflect": false,
|
801
|
-
"defaultValue": "\"Select all\""
|
802
|
-
},
|
803
|
-
"expandLabel": {
|
804
|
-
"type": "string",
|
805
|
-
"mutable": false,
|
806
|
-
"complexType": {
|
807
|
-
"original": "string",
|
808
|
-
"resolved": "string",
|
809
|
-
"references": {}
|
810
|
-
},
|
811
|
-
"required": false,
|
812
|
-
"optional": false,
|
813
|
-
"docs": {
|
814
|
-
"tags": [],
|
815
|
-
"text": ""
|
816
|
-
},
|
817
|
-
"getter": false,
|
818
|
-
"setter": false,
|
819
|
-
"attribute": "expand-label",
|
820
|
-
"reflect": false,
|
821
|
-
"defaultValue": "\"Expand\""
|
822
|
-
},
|
823
|
-
"collapseLabel": {
|
824
|
-
"type": "string",
|
825
|
-
"mutable": false,
|
826
|
-
"complexType": {
|
827
|
-
"original": "string",
|
828
|
-
"resolved": "string",
|
829
|
-
"references": {}
|
830
|
-
},
|
831
|
-
"required": false,
|
832
|
-
"optional": false,
|
833
|
-
"docs": {
|
834
|
-
"tags": [],
|
835
|
-
"text": ""
|
836
|
-
},
|
837
|
-
"getter": false,
|
838
|
-
"setter": false,
|
839
|
-
"attribute": "collapse-label",
|
642
|
+
"attribute": "error",
|
840
643
|
"reflect": false,
|
841
|
-
"defaultValue": "
|
644
|
+
"defaultValue": "false"
|
842
645
|
},
|
843
|
-
"
|
646
|
+
"errorMessage": {
|
844
647
|
"type": "string",
|
845
648
|
"mutable": false,
|
846
649
|
"complexType": {
|
@@ -856,11 +659,11 @@ export class Multiselect {
|
|
856
659
|
},
|
857
660
|
"getter": false,
|
858
661
|
"setter": false,
|
859
|
-
"attribute": "
|
662
|
+
"attribute": "error-message",
|
860
663
|
"reflect": false,
|
861
|
-
"defaultValue": "\"
|
664
|
+
"defaultValue": "\"Error\""
|
862
665
|
},
|
863
|
-
"
|
666
|
+
"label": {
|
864
667
|
"type": "string",
|
865
668
|
"mutable": false,
|
866
669
|
"complexType": {
|
@@ -876,11 +679,11 @@ export class Multiselect {
|
|
876
679
|
},
|
877
680
|
"getter": false,
|
878
681
|
"setter": false,
|
879
|
-
"attribute": "
|
682
|
+
"attribute": "label",
|
880
683
|
"reflect": false,
|
881
684
|
"defaultValue": "\"\""
|
882
685
|
},
|
883
|
-
"
|
686
|
+
"placeholder": {
|
884
687
|
"type": "string",
|
885
688
|
"mutable": false,
|
886
689
|
"complexType": {
|
@@ -896,56 +699,16 @@ export class Multiselect {
|
|
896
699
|
},
|
897
700
|
"getter": false,
|
898
701
|
"setter": false,
|
899
|
-
"attribute": "
|
702
|
+
"attribute": "placeholder",
|
900
703
|
"reflect": false,
|
901
704
|
"defaultValue": "\"\""
|
902
705
|
},
|
903
|
-
"
|
904
|
-
"type": "
|
905
|
-
"mutable": false,
|
906
|
-
"complexType": {
|
907
|
-
"original": "string",
|
908
|
-
"resolved": "string",
|
909
|
-
"references": {}
|
910
|
-
},
|
911
|
-
"required": false,
|
912
|
-
"optional": false,
|
913
|
-
"docs": {
|
914
|
-
"tags": [],
|
915
|
-
"text": ""
|
916
|
-
},
|
917
|
-
"getter": false,
|
918
|
-
"setter": false,
|
919
|
-
"attribute": "aria-search-label",
|
920
|
-
"reflect": false,
|
921
|
-
"defaultValue": "\"Search options\""
|
922
|
-
},
|
923
|
-
"ariaClearLabel": {
|
924
|
-
"type": "string",
|
925
|
-
"mutable": false,
|
926
|
-
"complexType": {
|
927
|
-
"original": "string",
|
928
|
-
"resolved": "string",
|
929
|
-
"references": {}
|
930
|
-
},
|
931
|
-
"required": false,
|
932
|
-
"optional": false,
|
933
|
-
"docs": {
|
934
|
-
"tags": [],
|
935
|
-
"text": ""
|
936
|
-
},
|
937
|
-
"getter": false,
|
938
|
-
"setter": false,
|
939
|
-
"attribute": "aria-clear-label",
|
940
|
-
"reflect": false,
|
941
|
-
"defaultValue": "\"Clear all selections\""
|
942
|
-
},
|
943
|
-
"ariaToggleLabel": {
|
944
|
-
"type": "string",
|
706
|
+
"maxItemCount": {
|
707
|
+
"type": "number",
|
945
708
|
"mutable": false,
|
946
709
|
"complexType": {
|
947
|
-
"original": "
|
948
|
-
"resolved": "
|
710
|
+
"original": "number",
|
711
|
+
"resolved": "number",
|
949
712
|
"references": {}
|
950
713
|
},
|
951
714
|
"required": false,
|
@@ -956,16 +719,15 @@ export class Multiselect {
|
|
956
719
|
},
|
957
720
|
"getter": false,
|
958
721
|
"setter": false,
|
959
|
-
"attribute": "
|
960
|
-
"reflect": false
|
961
|
-
"defaultValue": "\"Toggle dropdown\""
|
722
|
+
"attribute": "max-item-count",
|
723
|
+
"reflect": false
|
962
724
|
},
|
963
|
-
"
|
964
|
-
"type": "
|
725
|
+
"showSearch": {
|
726
|
+
"type": "boolean",
|
965
727
|
"mutable": false,
|
966
728
|
"complexType": {
|
967
|
-
"original": "
|
968
|
-
"resolved": "
|
729
|
+
"original": "boolean",
|
730
|
+
"resolved": "boolean",
|
969
731
|
"references": {}
|
970
732
|
},
|
971
733
|
"required": false,
|
@@ -976,16 +738,16 @@ export class Multiselect {
|
|
976
738
|
},
|
977
739
|
"getter": false,
|
978
740
|
"setter": false,
|
979
|
-
"attribute": "
|
741
|
+
"attribute": "show-search",
|
980
742
|
"reflect": false,
|
981
|
-
"defaultValue": "
|
743
|
+
"defaultValue": "true"
|
982
744
|
},
|
983
|
-
"
|
984
|
-
"type": "
|
745
|
+
"showSelectAll": {
|
746
|
+
"type": "boolean",
|
985
747
|
"mutable": false,
|
986
748
|
"complexType": {
|
987
|
-
"original": "
|
988
|
-
"resolved": "
|
749
|
+
"original": "boolean",
|
750
|
+
"resolved": "boolean",
|
989
751
|
"references": {}
|
990
752
|
},
|
991
753
|
"required": false,
|
@@ -996,16 +758,16 @@ export class Multiselect {
|
|
996
758
|
},
|
997
759
|
"getter": false,
|
998
760
|
"setter": false,
|
999
|
-
"attribute": "
|
761
|
+
"attribute": "show-select-all",
|
1000
762
|
"reflect": false,
|
1001
|
-
"defaultValue": "
|
763
|
+
"defaultValue": "true"
|
1002
764
|
},
|
1003
|
-
"
|
1004
|
-
"type": "
|
765
|
+
"showClearButton": {
|
766
|
+
"type": "boolean",
|
1005
767
|
"mutable": false,
|
1006
768
|
"complexType": {
|
1007
|
-
"original": "
|
1008
|
-
"resolved": "
|
769
|
+
"original": "boolean",
|
770
|
+
"resolved": "boolean",
|
1009
771
|
"references": {}
|
1010
772
|
},
|
1011
773
|
"required": false,
|
@@ -1016,9 +778,9 @@ export class Multiselect {
|
|
1016
778
|
},
|
1017
779
|
"getter": false,
|
1018
780
|
"setter": false,
|
1019
|
-
"attribute": "
|
781
|
+
"attribute": "show-clear-button",
|
1020
782
|
"reflect": false,
|
1021
|
-
"defaultValue": "
|
783
|
+
"defaultValue": "true"
|
1022
784
|
}
|
1023
785
|
};
|
1024
786
|
}
|
@@ -1029,7 +791,11 @@ export class Multiselect {
|
|
1029
791
|
"persistentSelectedOptions": {},
|
1030
792
|
"dropdownOpen": {},
|
1031
793
|
"dropdownFlipped": {},
|
1032
|
-
"
|
794
|
+
"isLoading": {},
|
795
|
+
"loadedOptions": {},
|
796
|
+
"filteredOptions": {},
|
797
|
+
"optionCount": {},
|
798
|
+
"optionsProcessed": {}
|
1033
799
|
};
|
1034
800
|
}
|
1035
801
|
static get events() {
|
@@ -1065,35 +831,20 @@ export class Multiselect {
|
|
1065
831
|
}
|
1066
832
|
}];
|
1067
833
|
}
|
1068
|
-
static get methods() {
|
1069
|
-
return {
|
1070
|
-
"clearSelection": {
|
1071
|
-
"complexType": {
|
1072
|
-
"signature": "() => Promise<void>",
|
1073
|
-
"parameters": [],
|
1074
|
-
"references": {
|
1075
|
-
"Promise": {
|
1076
|
-
"location": "global",
|
1077
|
-
"id": "global::Promise"
|
1078
|
-
}
|
1079
|
-
},
|
1080
|
-
"return": "Promise<void>"
|
1081
|
-
},
|
1082
|
-
"docs": {
|
1083
|
-
"text": "",
|
1084
|
-
"tags": []
|
1085
|
-
}
|
1086
|
-
}
|
1087
|
-
};
|
1088
|
-
}
|
1089
834
|
static get elementRef() { return "el"; }
|
1090
835
|
static get watchers() {
|
1091
836
|
return [{
|
837
|
+
"propName": "options",
|
838
|
+
"methodName": "updateOptions"
|
839
|
+
}, {
|
1092
840
|
"propName": "error",
|
1093
841
|
"methodName": "updateInternalError"
|
1094
842
|
}, {
|
1095
843
|
"propName": "errorMessage",
|
1096
844
|
"methodName": "updateInternalErrorMessage"
|
845
|
+
}, {
|
846
|
+
"propName": "loadedOptions",
|
847
|
+
"methodName": "loadedOptionsChanged"
|
1097
848
|
}, {
|
1098
849
|
"propName": "persistentSelectedOptions",
|
1099
850
|
"methodName": "onSelectionChange"
|
@@ -1101,4 +852,5 @@ export class Multiselect {
|
|
1101
852
|
}
|
1102
853
|
static get attachInternalsMemberName() { return "internals"; }
|
1103
854
|
}
|
855
|
+
Multiselect.globalZIndex = 1000; // This will be shared among all instances of the component.
|
1104
856
|
//# sourceMappingURL=multiselect.js.map
|