@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,929 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-7f4df11a.js');
|
6
|
-
|
7
|
-
const multiselectCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}.ifx-multiselect-container{position:relative;box-sizing:border-box;font-family:var(--ifx-font-family)}.ifx-multiselect-container:hover{cursor:pointer}.ifx-multiselect-container .ifx-label-wrapper{font-size:1rem;line-height:1.5rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%}.ifx-multiselect-container .ifx-error-message-wrapper{color:#CD002F;font-size:0.75rem;line-height:1rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%}.ifx-multiselect-container .ifx-multiselect-wrapper{background-color:#FFFFFF;box-sizing:border-box;display:flex;align-items:center;border:1px solid #8D8786;border-radius:1px;width:100%;font-weight:400;font-style:normal;height:40px;line-height:24px;padding:8px 16px;font-size:1rem;line-height:1.5rem}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible{outline:none}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible:not(.active):not(:active){outline:none}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible:not(.active):not(:active)::before{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%);border:2px solid #0A8276;border-radius:2px}.ifx-multiselect-container .ifx-multiselect-wrapper.disabled{background:#EEEDED;color:#575352;border-color:#575352;cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ifx-multiselect-container .ifx-multiselect-wrapper.error{border-color:#CD002F}.ifx-multiselect-container .ifx-multiselect-wrapper:hover:not(.focus,:focus){border-color:#575352}.ifx-multiselect-container .ifx-multiselect-wrapper.active{border-color:#0A8276 !important}.ifx-multiselect-container .ifx-multiselect-wrapper.active .icon-wrapper-up{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-multiselect-container .ifx-multiselect-wrapper.active .icon-wrapper-down{display:none}.ifx-multiselect-container .ifx-multiselect-wrapper .icon-wrapper-up{display:none}.ifx-multiselect-container .ifx-multiselect-wrapper .icon-wrapper-down{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-multiselect-container .ifx-multiselect-wrapper.is-flipped .ifx-multiselect-dropdown-menu{top:auto;bottom:100%}.ifx-multiselect-container .ifx-multiselect-input{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ifx-multiselect-container .ifx-multiselect-input.placeholder{opacity:0.5}.ifx-multiselect-container .ifx-multiselect-icon-container{margin-left:auto;display:flex;align-items:center;gap:8px}.ifx-multiselect-container .ifx-multiselect-icon-container .ifx-multiselect-icon-container{display:flex}.ifx-multiselect-container .ifx-multiselect-icon-container .icon-wrapper{display:flex;align-items:center;transition:transform 0.2s ease-in-out}.ifx-multiselect-container .ifx-multiselect-icon-container .icon-wrapper--open{transform:rotate(180deg)}.ifx-multiselect-container .ifx-clear-button{display:flex;align-items:center}.ifx-multiselect-container .ifx-clear-button.hide{display:none}.ifx-multiselect-container .ifx-multiselect-dropdown-menu{box-sizing:border-box;position:absolute;top:100%;left:0;width:100%;margin-top:4px;border:1px solid #EEEDED;background-color:#fff;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1);max-height:300px;z-index:1000;display:flex;flex-direction:column}.ifx-multiselect-dropdown-functions{padding:12px 16px;border-bottom:1px solid #EEEDED;flex-shrink:0}.ifx-multiselect-dropdown-search{margin-bottom:12px}.ifx-multiselect-dropdown-controls{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}.ifx-multiselect-dropdown-controls .select-all-wrapper{display:flex}.ifx-multiselect-dropdown-controls .expand-collapse-controls{display:flex;gap:12px}.ifx-multiselect-dropdown-controls .control-item{font-size:0.875rem;line-height:1.25rem}.ifx-multiselect-dropdown-controls .control-item:hover{color:#0A8276}.ifx-multiselect-dropdown-controls .control-item:active{color:#08665C}.ifx-multiselect-dropdown-controls .control-item:focus{outline:none}.ifx-multiselect-dropdown-controls .control-item:focus-visible{outline:2px solid #0A8276;outline-offset:2px;border-radius:1px}.ifx-multiselect-options{flex:1;overflow-y:auto;padding-top:12px;padding-bottom:12px}.ifx-multiselect-options.show-no-results .ifx-multiselect-no-results{display:block}.ifx-multiselect-no-results{padding-left:16px;padding-right:16px;display:none}";
|
8
|
-
const IfxMultiselectStyle0 = multiselectCss;
|
9
|
-
|
10
|
-
function debounce(func, wait) {
|
11
|
-
let timeout;
|
12
|
-
return function executedFunction(...args) {
|
13
|
-
const later = () => {
|
14
|
-
clearTimeout(timeout);
|
15
|
-
func(...args);
|
16
|
-
};
|
17
|
-
clearTimeout(timeout);
|
18
|
-
timeout = setTimeout(later, wait);
|
19
|
-
};
|
20
|
-
}
|
21
|
-
const Multiselect = class {
|
22
|
-
constructor(hostRef) {
|
23
|
-
index.registerInstance(this, hostRef);
|
24
|
-
this.ifxSelect = index.createEvent(this, "ifxSelect", 7);
|
25
|
-
this.ifxOpen = index.createEvent(this, "ifxOpen", 7);
|
26
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
27
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
28
|
-
}
|
29
|
-
else {
|
30
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
31
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
32
|
-
}
|
33
|
-
this.disabled = false;
|
34
|
-
this.error = false;
|
35
|
-
this.errorMessage = "Error";
|
36
|
-
this.label = "";
|
37
|
-
this.placeholder = "";
|
38
|
-
this.showSearch = true;
|
39
|
-
this.showSelectAll = true;
|
40
|
-
this.showClearButton = true;
|
41
|
-
this.showExpandCollapse = true;
|
42
|
-
this.noResultsMessage = "No results found.";
|
43
|
-
this.showNoResultsMessage = true;
|
44
|
-
this.searchPlaceholder = "Search";
|
45
|
-
this.selectAllLabel = "Select all";
|
46
|
-
this.expandLabel = "Expand";
|
47
|
-
this.collapseLabel = "Collapse";
|
48
|
-
this.ariaMultiSelectLabel = "Multi-select dropdown";
|
49
|
-
this.ariaMultiSelectLabelledBy = "";
|
50
|
-
this.ariaMultiSelectDescribedBy = "";
|
51
|
-
this.ariaSearchLabel = "Search options";
|
52
|
-
this.ariaClearLabel = "Clear all selections";
|
53
|
-
this.ariaToggleLabel = "Toggle dropdown";
|
54
|
-
this.ariaSelectAllLabel = "Select all options";
|
55
|
-
this.ariaExpandAllLabel = "Expand all categories";
|
56
|
-
this.ariaCollapseAllLabel = "Collapse all categories";
|
57
|
-
this.internalError = false;
|
58
|
-
this.persistentSelectedOptions = [];
|
59
|
-
this.dropdownOpen = false;
|
60
|
-
this.searchTerm = '';
|
61
|
-
this.handleSearch = debounce((targetElement) => {
|
62
|
-
const searchTerm = targetElement.value.toLowerCase();
|
63
|
-
const isSearchActive = searchTerm !== '';
|
64
|
-
this.searchTerm = searchTerm;
|
65
|
-
const wrapper = this.el.shadowRoot.querySelector('.ifx-multiselect-wrapper');
|
66
|
-
if (wrapper) {
|
67
|
-
if (isSearchActive) {
|
68
|
-
wrapper.classList.remove('active');
|
69
|
-
}
|
70
|
-
else {
|
71
|
-
const searchField = this.el.shadowRoot.querySelector('ifx-search-field');
|
72
|
-
const searchFieldHasFocus = searchField && searchField.matches(':focus-within');
|
73
|
-
if (!searchFieldHasFocus) {
|
74
|
-
wrapper.classList.add('active');
|
75
|
-
}
|
76
|
-
}
|
77
|
-
}
|
78
|
-
const optionsContainer = this.el.shadowRoot.querySelector('.ifx-multiselect-options');
|
79
|
-
if (optionsContainer) {
|
80
|
-
if (isSearchActive) {
|
81
|
-
optionsContainer.classList.add('has-search-filter');
|
82
|
-
}
|
83
|
-
else {
|
84
|
-
optionsContainer.classList.remove('has-search-filter');
|
85
|
-
}
|
86
|
-
}
|
87
|
-
requestAnimationFrame(() => {
|
88
|
-
const allOptions = this.el.querySelectorAll('ifx-multiselect-option');
|
89
|
-
allOptions.forEach(option => {
|
90
|
-
const searchEvent = new CustomEvent('ifx-search-filter', {
|
91
|
-
detail: { searchTerm, isActive: isSearchActive }
|
92
|
-
});
|
93
|
-
option.dispatchEvent(searchEvent);
|
94
|
-
});
|
95
|
-
if (isSearchActive) {
|
96
|
-
setTimeout(() => {
|
97
|
-
const allOptions = this.el.querySelectorAll('ifx-multiselect-option');
|
98
|
-
let visibleCount = 0;
|
99
|
-
allOptions.forEach(option => {
|
100
|
-
const style = window.getComputedStyle(option);
|
101
|
-
const rect = option.getBoundingClientRect();
|
102
|
-
if (style.display !== 'none' &&
|
103
|
-
style.visibility !== 'hidden' &&
|
104
|
-
style.opacity !== '0' &&
|
105
|
-
rect.height > 0) {
|
106
|
-
visibleCount++;
|
107
|
-
}
|
108
|
-
});
|
109
|
-
const optionsContainer = this.el.shadowRoot.querySelector('.ifx-multiselect-options');
|
110
|
-
if (optionsContainer) {
|
111
|
-
if (visibleCount === 0) {
|
112
|
-
optionsContainer.classList.add('show-no-results');
|
113
|
-
}
|
114
|
-
else {
|
115
|
-
optionsContainer.classList.remove('show-no-results');
|
116
|
-
}
|
117
|
-
}
|
118
|
-
}, 200);
|
119
|
-
}
|
120
|
-
else {
|
121
|
-
const optionsContainer = this.el.shadowRoot.querySelector('.ifx-multiselect-options');
|
122
|
-
if (optionsContainer) {
|
123
|
-
optionsContainer.classList.remove('show-no-results');
|
124
|
-
}
|
125
|
-
}
|
126
|
-
});
|
127
|
-
}, 150);
|
128
|
-
this.pendingSelectionUpdate = false;
|
129
|
-
this.handleDocumentClick = (event) => {
|
130
|
-
const path = event.composedPath();
|
131
|
-
if (!path.includes(this.dropdownElement)) {
|
132
|
-
this.dropdownOpen = false;
|
133
|
-
document.removeEventListener('click', this.handleDocumentClick);
|
134
|
-
this.resetSearch();
|
135
|
-
this.ifxOpen.emit(this.dropdownOpen);
|
136
|
-
}
|
137
|
-
};
|
138
|
-
}
|
139
|
-
parseChildOptions() {
|
140
|
-
const options = [];
|
141
|
-
const childElements = Array.from(this.el.children);
|
142
|
-
childElements.forEach((child, index) => {
|
143
|
-
if (child.tagName === 'IFX-MULTISELECT-OPTION') {
|
144
|
-
const option = this.parseOptionElement(child, index);
|
145
|
-
if (option) {
|
146
|
-
options.push(option);
|
147
|
-
}
|
148
|
-
}
|
149
|
-
});
|
150
|
-
return options;
|
151
|
-
}
|
152
|
-
parseOptionElement(element, index) {
|
153
|
-
const value = element.getAttribute('value') || `option-${index}`;
|
154
|
-
const selected = element.hasAttribute('selected');
|
155
|
-
const disabled = element.hasAttribute('disabled');
|
156
|
-
const indeterminate = element.hasAttribute('indeterminate');
|
157
|
-
const option = {
|
158
|
-
value,
|
159
|
-
selected,
|
160
|
-
disabled,
|
161
|
-
indeterminate
|
162
|
-
};
|
163
|
-
const nestedOptions = Array.from(element.children)
|
164
|
-
.filter(child => child.tagName === 'IFX-MULTISELECT-OPTION')
|
165
|
-
.map((child, childIndex) => this.parseOptionElement(child, childIndex))
|
166
|
-
.filter(opt => opt !== null);
|
167
|
-
if (nestedOptions.length > 0) {
|
168
|
-
option.children = nestedOptions;
|
169
|
-
}
|
170
|
-
return option;
|
171
|
-
}
|
172
|
-
loadInitialOptions() {
|
173
|
-
this.internalError = this.error;
|
174
|
-
this.internalErrorMessage = this.errorMessage;
|
175
|
-
const allOptions = this.parseChildOptions();
|
176
|
-
const initiallySelected = this.collectSelectedOptions(allOptions);
|
177
|
-
const initiallySelectedNotInState = initiallySelected.filter(init => !this.persistentSelectedOptions.some(opt => opt.value == init.value));
|
178
|
-
this.persistentSelectedOptions = [...this.persistentSelectedOptions, ...initiallySelectedNotInState];
|
179
|
-
}
|
180
|
-
collectSelectedOptions(options) {
|
181
|
-
let selectedOptions = [];
|
182
|
-
for (const option of options) {
|
183
|
-
if (option.selected) {
|
184
|
-
if (option.children && option.children.length > 0) {
|
185
|
-
selectedOptions = selectedOptions.concat(this.collectLeafOptions(option.children));
|
186
|
-
}
|
187
|
-
else {
|
188
|
-
if (!selectedOptions.some(existingOption => existingOption.value === option.value)) {
|
189
|
-
selectedOptions.push(option);
|
190
|
-
}
|
191
|
-
}
|
192
|
-
}
|
193
|
-
else {
|
194
|
-
if (option.children && option.children.length > 0) {
|
195
|
-
selectedOptions = selectedOptions.concat(this.collectSelectedOptions(option.children));
|
196
|
-
}
|
197
|
-
}
|
198
|
-
}
|
199
|
-
return selectedOptions;
|
200
|
-
}
|
201
|
-
collectLeafOptions(children) {
|
202
|
-
let leafOptions = [];
|
203
|
-
for (const child of children) {
|
204
|
-
if (child.children && child.children.length > 0) {
|
205
|
-
leafOptions = leafOptions.concat(this.collectLeafOptions(child.children));
|
206
|
-
}
|
207
|
-
else {
|
208
|
-
leafOptions.push(child);
|
209
|
-
}
|
210
|
-
}
|
211
|
-
return leafOptions;
|
212
|
-
}
|
213
|
-
handleSearchFocus(hasFocus) {
|
214
|
-
const wrapper = this.el.shadowRoot.querySelector('.ifx-multiselect-wrapper');
|
215
|
-
if (wrapper) {
|
216
|
-
if (hasFocus || this.searchTerm !== '') {
|
217
|
-
wrapper.classList.remove('active');
|
218
|
-
}
|
219
|
-
else {
|
220
|
-
wrapper.classList.add('active');
|
221
|
-
}
|
222
|
-
}
|
223
|
-
}
|
224
|
-
positionDropdown() {
|
225
|
-
var _a;
|
226
|
-
const wrapperRect = (_a = this.el.shadowRoot.querySelector('.ifx-multiselect-wrapper')) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
227
|
-
const spaceBelow = window.innerHeight - wrapperRect.bottom;
|
228
|
-
const spaceAbove = wrapperRect.top;
|
229
|
-
if ((spaceAbove > spaceBelow && wrapperRect.height > spaceBelow) || (wrapperRect.bottom > window.innerHeight)) {
|
230
|
-
this.dropdownFlipped = true;
|
231
|
-
}
|
232
|
-
else {
|
233
|
-
this.dropdownFlipped = false;
|
234
|
-
}
|
235
|
-
}
|
236
|
-
updateSlotBasedSelections(emitEvent = false) {
|
237
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
238
|
-
const selectedLeafOptions = [];
|
239
|
-
allOptionElements.forEach((optionEl) => {
|
240
|
-
const instance = optionEl['__stencil_instance'];
|
241
|
-
if (instance && instance.selected && !instance.hasChildren) {
|
242
|
-
selectedLeafOptions.push({
|
243
|
-
value: instance.value,
|
244
|
-
selected: true,
|
245
|
-
disabled: instance.disabled
|
246
|
-
});
|
247
|
-
}
|
248
|
-
});
|
249
|
-
this.persistentSelectedOptions = selectedLeafOptions;
|
250
|
-
if (emitEvent) {
|
251
|
-
this.ifxSelect.emit(this.persistentSelectedOptions);
|
252
|
-
}
|
253
|
-
}
|
254
|
-
updateInitialParentStates() {
|
255
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
256
|
-
const optionsByDepth = Array.from(allOptionElements)
|
257
|
-
.map(el => ({
|
258
|
-
element: el,
|
259
|
-
instance: el['__stencil_instance'],
|
260
|
-
depth: parseInt(el.getAttribute('data-level') || '0')
|
261
|
-
}))
|
262
|
-
.filter(item => item.instance)
|
263
|
-
.sort((a, b) => b.depth - a.depth);
|
264
|
-
optionsByDepth.forEach(({ instance }) => {
|
265
|
-
if (instance.hasChildren) {
|
266
|
-
this.updateParentState(instance);
|
267
|
-
}
|
268
|
-
});
|
269
|
-
}
|
270
|
-
updateParentState(parentInstance) {
|
271
|
-
const directChildren = Array.from(parentInstance.el.children)
|
272
|
-
.filter((child) => child.tagName === 'IFX-MULTISELECT-OPTION')
|
273
|
-
.map(child => child['__stencil_instance'])
|
274
|
-
.filter(instance => instance !== null);
|
275
|
-
const selectedCount = directChildren.filter(child => child.selected).length;
|
276
|
-
const indeterminateCount = directChildren.filter(child => child.indeterminate).length;
|
277
|
-
const totalCount = directChildren.length;
|
278
|
-
if (selectedCount === totalCount && indeterminateCount === 0) {
|
279
|
-
parentInstance.selected = true;
|
280
|
-
parentInstance.indeterminate = false;
|
281
|
-
}
|
282
|
-
else if (selectedCount === 0 && indeterminateCount === 0) {
|
283
|
-
parentInstance.selected = false;
|
284
|
-
parentInstance.indeterminate = false;
|
285
|
-
}
|
286
|
-
else {
|
287
|
-
parentInstance.selected = false;
|
288
|
-
parentInstance.indeterminate = true;
|
289
|
-
}
|
290
|
-
}
|
291
|
-
componentDidLoad() {
|
292
|
-
setTimeout(() => {
|
293
|
-
this.positionDropdown();
|
294
|
-
}, 500);
|
295
|
-
this.el.addEventListener('ifx-option-changed', () => {
|
296
|
-
if (!this.pendingSelectionUpdate) {
|
297
|
-
this.pendingSelectionUpdate = true;
|
298
|
-
requestAnimationFrame(() => {
|
299
|
-
this.updateSlotBasedSelections(true);
|
300
|
-
setTimeout(() => {
|
301
|
-
this.pendingSelectionUpdate = false;
|
302
|
-
}, 0);
|
303
|
-
});
|
304
|
-
}
|
305
|
-
});
|
306
|
-
setTimeout(() => {
|
307
|
-
this.updateSlotBasedSelections(false);
|
308
|
-
this.updateInitialParentStates();
|
309
|
-
}, 100);
|
310
|
-
}
|
311
|
-
componentWillLoad() {
|
312
|
-
this.loadInitialOptions();
|
313
|
-
}
|
314
|
-
updateInternalError() {
|
315
|
-
this.internalError = this.error;
|
316
|
-
}
|
317
|
-
updateInternalErrorMessage() {
|
318
|
-
this.internalErrorMessage = this.errorMessage;
|
319
|
-
}
|
320
|
-
onSelectionChange(newValue, _) {
|
321
|
-
const formData = new FormData();
|
322
|
-
newValue.forEach(option => formData.append(this.name, option.value));
|
323
|
-
this.internals.setFormValue(formData);
|
324
|
-
}
|
325
|
-
collapseAll() {
|
326
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
327
|
-
allOptionElements.forEach((optionEl) => {
|
328
|
-
const instance = optionEl['__stencil_instance'];
|
329
|
-
if (instance && instance.hasChildren) {
|
330
|
-
instance.isExpanded = false;
|
331
|
-
}
|
332
|
-
});
|
333
|
-
}
|
334
|
-
expandAll() {
|
335
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
336
|
-
allOptionElements.forEach((optionEl) => {
|
337
|
-
const instance = optionEl['__stencil_instance'];
|
338
|
-
if (instance && instance.hasChildren) {
|
339
|
-
instance.isExpanded = true;
|
340
|
-
}
|
341
|
-
});
|
342
|
-
}
|
343
|
-
selectAll() {
|
344
|
-
this.resetSearch();
|
345
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
346
|
-
allOptionElements.forEach((optionEl) => {
|
347
|
-
const instance = optionEl['__stencil_instance'];
|
348
|
-
if (instance) {
|
349
|
-
if (instance.hasChildren) {
|
350
|
-
instance.isExpanded = true;
|
351
|
-
}
|
352
|
-
else {
|
353
|
-
instance.selected = true;
|
354
|
-
}
|
355
|
-
}
|
356
|
-
});
|
357
|
-
setTimeout(() => {
|
358
|
-
this.updateInitialParentStates();
|
359
|
-
this.updateSlotBasedSelections(false);
|
360
|
-
this.ifxSelect.emit(this.persistentSelectedOptions);
|
361
|
-
}, 0);
|
362
|
-
}
|
363
|
-
async clearSelection() {
|
364
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
365
|
-
allOptionElements.forEach((optionEl) => {
|
366
|
-
const instance = optionEl['__stencil_instance'];
|
367
|
-
if (instance) {
|
368
|
-
instance.selected = false;
|
369
|
-
instance.indeterminate = false;
|
370
|
-
if (instance.hasChildren) {
|
371
|
-
instance.isExpanded = false;
|
372
|
-
}
|
373
|
-
}
|
374
|
-
});
|
375
|
-
this.persistentSelectedOptions = [];
|
376
|
-
setTimeout(() => {
|
377
|
-
this.updateSlotBasedSelections(false);
|
378
|
-
this.ifxSelect.emit(this.persistentSelectedOptions);
|
379
|
-
}, 0);
|
380
|
-
}
|
381
|
-
toggleDropdown() {
|
382
|
-
this.dropdownOpen = !this.dropdownOpen;
|
383
|
-
setTimeout(() => {
|
384
|
-
if (this.dropdownOpen) {
|
385
|
-
document.addEventListener('click', this.handleDocumentClick);
|
386
|
-
}
|
387
|
-
else {
|
388
|
-
this.resetSearch();
|
389
|
-
}
|
390
|
-
this.ifxOpen.emit(this.dropdownOpen);
|
391
|
-
}, 0);
|
392
|
-
}
|
393
|
-
resetSearch() {
|
394
|
-
this.searchTerm = '';
|
395
|
-
const searchField = this.el.shadowRoot.querySelector('ifx-search-field');
|
396
|
-
if (searchField) {
|
397
|
-
searchField.value = '';
|
398
|
-
}
|
399
|
-
const optionsContainer = this.el.shadowRoot.querySelector('.ifx-multiselect-options');
|
400
|
-
if (optionsContainer) {
|
401
|
-
optionsContainer.classList.remove('has-search-filter');
|
402
|
-
}
|
403
|
-
const allOptions = this.el.querySelectorAll('ifx-multiselect-option');
|
404
|
-
allOptions.forEach(option => {
|
405
|
-
const searchEvent = new CustomEvent('ifx-search-filter', {
|
406
|
-
detail: { searchTerm: '', isActive: false }
|
407
|
-
});
|
408
|
-
option.dispatchEvent(searchEvent);
|
409
|
-
});
|
410
|
-
}
|
411
|
-
handleWrapperClick(event) {
|
412
|
-
this.positionDropdown();
|
413
|
-
if (event.currentTarget === event.target) {
|
414
|
-
this.toggleDropdown();
|
415
|
-
}
|
416
|
-
}
|
417
|
-
handleKeyDown(event) {
|
418
|
-
if (this.disabled)
|
419
|
-
return;
|
420
|
-
// If dropdown is closed, only allow opening
|
421
|
-
if (!this.dropdownOpen) {
|
422
|
-
switch (event.code) {
|
423
|
-
case 'Enter':
|
424
|
-
case 'Space':
|
425
|
-
case 'ArrowDown':
|
426
|
-
event.preventDefault();
|
427
|
-
this.toggleDropdown();
|
428
|
-
break;
|
429
|
-
}
|
430
|
-
return;
|
431
|
-
}
|
432
|
-
// Dropdown is open - handle navigation and controls
|
433
|
-
switch (event.code) {
|
434
|
-
case 'Escape':
|
435
|
-
event.preventDefault();
|
436
|
-
this.toggleDropdown();
|
437
|
-
break;
|
438
|
-
case 'Enter':
|
439
|
-
case 'Space':
|
440
|
-
// Don't close dropdown when pressing space/enter in controls area
|
441
|
-
const target = event.target;
|
442
|
-
if (!target.closest('.ifx-multiselect-dropdown-functions')) {
|
443
|
-
event.preventDefault();
|
444
|
-
this.toggleDropdown();
|
445
|
-
}
|
446
|
-
break;
|
447
|
-
case 'ArrowDown':
|
448
|
-
case 'ArrowUp':
|
449
|
-
// Focus first/last option for navigation
|
450
|
-
event.preventDefault();
|
451
|
-
this.focusFirstOption();
|
452
|
-
break;
|
453
|
-
}
|
454
|
-
}
|
455
|
-
focusFirstOption() {
|
456
|
-
var _a;
|
457
|
-
const firstOption = this.el.querySelector('ifx-multiselect-option:not(.search-hidden)');
|
458
|
-
if (firstOption) {
|
459
|
-
const labelElement = (_a = firstOption.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.option-label');
|
460
|
-
labelElement === null || labelElement === void 0 ? void 0 : labelElement.focus();
|
461
|
-
}
|
462
|
-
}
|
463
|
-
renderSelectAll() {
|
464
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
465
|
-
const leafOptions = Array.from(allOptionElements).filter((el) => !el.hasChildren);
|
466
|
-
const selectedLeafOptions = Array.from(allOptionElements).filter((el) => !el.hasChildren && el.selected);
|
467
|
-
const allSelected = leafOptions.length > 0 && selectedLeafOptions.length === leafOptions.length;
|
468
|
-
const toggleSelectAll = (event) => {
|
469
|
-
if (event) {
|
470
|
-
event.preventDefault();
|
471
|
-
event.stopPropagation();
|
472
|
-
}
|
473
|
-
if (allSelected) {
|
474
|
-
this.clearSelection();
|
475
|
-
}
|
476
|
-
else {
|
477
|
-
this.selectAll();
|
478
|
-
}
|
479
|
-
};
|
480
|
-
return (index.h("div", { class: "select-all-wrapper" }, index.h("ifx-checkbox", { id: 'selectAll', checked: allSelected, size: "s", "aria-label": this.ariaSelectAllLabel, onClick: toggleSelectAll, onKeyDown: (e) => {
|
481
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
482
|
-
e.preventDefault();
|
483
|
-
e.stopPropagation();
|
484
|
-
toggleSelectAll(e);
|
485
|
-
}
|
486
|
-
} }, this.selectAllLabel)));
|
487
|
-
}
|
488
|
-
renderNoResultsMessage() {
|
489
|
-
return (index.h("div", { class: "ifx-multiselect-no-results" }, index.h("div", { class: "no-results-content" }, index.h("span", { class: "no-results-text" }, this.noResultsMessage))));
|
490
|
-
}
|
491
|
-
render() {
|
492
|
-
const selectedOptionsLabels = this.persistentSelectedOptions
|
493
|
-
.map((option) => {
|
494
|
-
var _a;
|
495
|
-
const optionElement = this.el.querySelector(`ifx-multiselect-option[value="${option.value}"]`);
|
496
|
-
return ((_a = optionElement === null || optionElement === void 0 ? void 0 : optionElement.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || option.value;
|
497
|
-
})
|
498
|
-
.join(', ');
|
499
|
-
const hasSelections = this.persistentSelectedOptions.length > 0;
|
500
|
-
let isFlatMultiselect = false;
|
501
|
-
const allOptionElements = this.el.querySelectorAll('ifx-multiselect-option');
|
502
|
-
if (allOptionElements.length > 0) {
|
503
|
-
isFlatMultiselect = Array.from(allOptionElements).every(option => option.children.length === 0);
|
504
|
-
}
|
505
|
-
return (index.h("div", { class: `ifx-multiselect-container`, ref: el => this.dropdownElement = el }, this.label ?
|
506
|
-
index.h("div", { class: "ifx-label-wrapper" }, index.h("span", null, this.label)) : null, index.h("div", { class: `ifx-multiselect-wrapper
|
507
|
-
${this.dropdownOpen ? 'active' : ''}
|
508
|
-
${this.dropdownFlipped ? 'is-flipped' : ''}
|
509
|
-
${this.internalError ? 'error' : ""}
|
510
|
-
${this.disabled ? 'disabled' : ""}`, role: "combobox", "aria-label": this.ariaMultiSelectLabel, "aria-labelledby": this.ariaMultiSelectLabelledBy || undefined, "aria-describedby": this.ariaMultiSelectDescribedBy || undefined, "aria-expanded": this.dropdownOpen, "aria-haspopup": "listbox", "aria-disabled": this.disabled, tabindex: "0", onClick: this.disabled ? undefined : (event) => this.handleWrapperClick(event), onKeyDown: this.disabled ? undefined : (event) => this.handleKeyDown(event) }, index.h("div", { class: `ifx-multiselect-input
|
511
|
-
${hasSelections ? '' : 'placeholder'}
|
512
|
-
`, onClick: this.disabled ? undefined : () => this.toggleDropdown() }, hasSelections ? selectedOptionsLabels : this.placeholder), this.dropdownOpen && (index.h("div", { class: "ifx-multiselect-dropdown-menu" }, (this.showSearch || this.showSelectAll || (this.showExpandCollapse && !isFlatMultiselect)) && (index.h("div", { class: "ifx-multiselect-dropdown-functions", onClick: (e) => e.stopPropagation() }, this.showSearch && (index.h("div", { class: "ifx-multiselect-dropdown-search" }, index.h("ifx-search-field", { class: "search-input", placeholder: this.searchPlaceholder, size: "s", "show-delete-icon": "true", "aria-label": this.ariaSearchLabel, onKeyDown: (e) => { e.stopPropagation(); }, onIfxInput: (event) => this.handleSearch(event.target), onFocus: () => this.handleSearchFocus(true), onBlur: () => this.handleSearchFocus(false) }))), index.h("div", { class: "ifx-multiselect-dropdown-controls" }, this.showSelectAll && this.renderSelectAll(), this.showExpandCollapse && !isFlatMultiselect && (index.h("div", { class: "expand-collapse-controls" }, index.h("span", { class: "control-item", role: "button", tabIndex: 0, "aria-label": this.ariaExpandAllLabel, onClick: (e) => { e.stopPropagation(); this.expandAll(); }, onKeyDown: (e) => {
|
513
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
514
|
-
e.preventDefault();
|
515
|
-
e.stopPropagation();
|
516
|
-
this.expandAll();
|
517
|
-
}
|
518
|
-
} }, this.expandLabel), index.h("span", { class: "control-item", role: "button", tabIndex: 0, "aria-label": this.ariaCollapseAllLabel, onClick: (e) => { e.stopPropagation(); this.collapseAll(); }, onKeyDown: (e) => {
|
519
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
520
|
-
e.preventDefault();
|
521
|
-
e.stopPropagation();
|
522
|
-
this.collapseAll();
|
523
|
-
}
|
524
|
-
} }, this.collapseLabel)))))), index.h("div", { class: "ifx-multiselect-options", role: "listbox", "aria-multiselectable": "true" }, index.h("slot", null), this.searchTerm && this.showNoResultsMessage && this.renderNoResultsMessage()))), index.h("div", { class: 'ifx-multiselect-icon-container' }, this.persistentSelectedOptions.length > 0 && (index.h("div", { class: `ifx-clear-button ${!this.showClearButton ? 'hide' : ''}`, onClick: this.disabled ? undefined : () => this.clearSelection() }, index.h("ifx-icon", { icon: "cRemove16" }))), index.h("div", { class: "icon-wrapper-up", onClick: this.disabled ? undefined : () => this.toggleDropdown() }, index.h("ifx-icon", { key: 'icon-up', icon: 'chevron-up-16' })), index.h("div", { class: "icon-wrapper-down", onClick: this.disabled ? undefined : () => this.toggleDropdown() }, index.h("ifx-icon", { key: 'icon-down', icon: 'chevron-down-16' })))), this.internalError ?
|
525
|
-
index.h("div", { class: "ifx-error-message-wrapper" }, index.h("span", null, this.internalErrorMessage)) : null));
|
526
|
-
}
|
527
|
-
static get formAssociated() { return true; }
|
528
|
-
get el() { return index.getElement(this); }
|
529
|
-
static get watchers() { return {
|
530
|
-
"error": ["updateInternalError"],
|
531
|
-
"errorMessage": ["updateInternalErrorMessage"],
|
532
|
-
"persistentSelectedOptions": ["onSelectionChange"]
|
533
|
-
}; }
|
534
|
-
};
|
535
|
-
Multiselect.style = IfxMultiselectStyle0;
|
536
|
-
|
537
|
-
const multiselectOptionCss = ":host{display:block;width:100%}.option{display:flex;flex-direction:column;position:relative;cursor:pointer;list-style:none}.option.option--expanded{position:relative}.option.option--has-children{position:relative}.option.option--has-children .option-item>.chevron-wrapper{display:flex}.option--disabled{cursor:not-allowed;pointer-events:none;color:#BFBBBB}.option.search-hidden{display:none !important}.option.search-match .option-item .option-label .search-highlight{font-weight:bold}.option-item{display:flex;flex-direction:row;align-items:center;white-space:nowrap;min-height:20px;padding:4px 16px;background-color:#FFFFFF;transition:background-color 0.2s ease-in-out}.option-item:hover{background-color:#F7F7F7}.option--disabled .option-item:hover{background-color:transparent}.option-children{display:block}.chevron-wrapper{display:none;align-items:center;justify-content:center;margin-right:8px;width:20px;height:20px;flex-shrink:0}.chevron-wrapper:focus{outline:none}.chevron-wrapper:focus-visible{outline:2px solid #0A8276;outline-offset:2px;border-radius:1px}.option--has-children .chevron-wrapper{display:flex}.chevron-wrapper .chevron{transition:transform 0.2s ease-in-out;color:#3C3A39}.chevron-wrapper .chevron.chevron--expanded{transform:rotate(90deg)}.chevron-wrapper .chevron.chevron--collapsed{transform:rotate(0deg)}.checkbox-wrapper{display:flex;align-items:center;margin-right:8px;flex-shrink:0}.option-label{flex-grow:1;display:flex;align-items:center;cursor:pointer;padding:2px 0;font-size:0.875rem}.option-label:focus{outline:none}.option-label:focus-visible{outline:2px solid #0A8276;outline-offset:2px;border-radius:1px}.option--disabled .option-label{cursor:not-allowed;color:#BFBBBB}";
|
538
|
-
const IfxMultiselectOptionStyle0 = multiselectOptionCss;
|
539
|
-
|
540
|
-
const MultiselectOption = class {
|
541
|
-
constructor(hostRef) {
|
542
|
-
index.registerInstance(this, hostRef);
|
543
|
-
this.selected = false;
|
544
|
-
this.disabled = false;
|
545
|
-
this.indeterminate = false;
|
546
|
-
this.isExpanded = false;
|
547
|
-
this.hasChildren = false;
|
548
|
-
this.depth = 0;
|
549
|
-
this.searchTerm = '';
|
550
|
-
this.isSearchActive = false;
|
551
|
-
this.isSearchDisabled = false;
|
552
|
-
this.handleSearchFilter = (event) => {
|
553
|
-
const { searchTerm, isActive } = event.detail;
|
554
|
-
this.searchTerm = searchTerm.toLowerCase();
|
555
|
-
this.isSearchActive = isActive;
|
556
|
-
requestAnimationFrame(() => {
|
557
|
-
this.updateSearchClasses();
|
558
|
-
});
|
559
|
-
};
|
560
|
-
this.handleCheckboxClick = (event) => {
|
561
|
-
if (this.disabled || (this.isSearchActive && this.isSearchDisabled))
|
562
|
-
return;
|
563
|
-
event.stopPropagation();
|
564
|
-
let newSelectedState;
|
565
|
-
if (this.indeterminate) {
|
566
|
-
newSelectedState = true;
|
567
|
-
}
|
568
|
-
else {
|
569
|
-
newSelectedState = !this.selected;
|
570
|
-
}
|
571
|
-
this.selected = newSelectedState;
|
572
|
-
this.indeterminate = false;
|
573
|
-
if (this.hasChildren) {
|
574
|
-
this.isExpanded = newSelectedState;
|
575
|
-
requestAnimationFrame(() => {
|
576
|
-
this.selectAllChildren(newSelectedState);
|
577
|
-
this.expandAllChildren(newSelectedState);
|
578
|
-
});
|
579
|
-
}
|
580
|
-
this.updateParentStates();
|
581
|
-
this.notifyMultiselect();
|
582
|
-
};
|
583
|
-
this.handleHeaderClick = (event) => {
|
584
|
-
event.stopPropagation();
|
585
|
-
if (!this.disabled && !(this.isSearchActive && this.isSearchDisabled)) {
|
586
|
-
this.handleClick(event);
|
587
|
-
}
|
588
|
-
};
|
589
|
-
}
|
590
|
-
componentWillLoad() {
|
591
|
-
this.hasChildren = this.el.children.length > 0;
|
592
|
-
this.depth = this.calculateDepth();
|
593
|
-
this.el.setAttribute('data-level', this.depth.toString());
|
594
|
-
if (this.hasChildren) {
|
595
|
-
const hasSelectedChildren = this.hasAnySelectedChildren();
|
596
|
-
if (hasSelectedChildren) {
|
597
|
-
this.isExpanded = true;
|
598
|
-
}
|
599
|
-
}
|
600
|
-
}
|
601
|
-
componentDidLoad() {
|
602
|
-
this.el['__stencil_instance'] = this;
|
603
|
-
this.notifyMultiselect();
|
604
|
-
this.el.addEventListener('ifx-search-filter', this.handleSearchFilter);
|
605
|
-
}
|
606
|
-
disconnectedCallback() {
|
607
|
-
this.el.removeEventListener('ifx-search-filter', this.handleSearchFilter);
|
608
|
-
}
|
609
|
-
updateSearchClasses() {
|
610
|
-
var _a;
|
611
|
-
const optionDiv = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.option');
|
612
|
-
if (!optionDiv)
|
613
|
-
return;
|
614
|
-
if (!this.isSearchActive) {
|
615
|
-
optionDiv.classList.remove('search-hidden', 'search-parent', 'search-match');
|
616
|
-
this.removeHighlighting();
|
617
|
-
this.isSearchDisabled = false;
|
618
|
-
return;
|
619
|
-
}
|
620
|
-
const textContent = this.getTextContent().toLowerCase();
|
621
|
-
const matchesSearch = textContent.includes(this.searchTerm);
|
622
|
-
const hasMatchingParent = this.hasMatchingParent();
|
623
|
-
requestAnimationFrame(() => {
|
624
|
-
const hasMatchingChildren = this.hasMatchingChildren();
|
625
|
-
optionDiv.classList.remove('search-hidden', 'search-parent', 'search-match');
|
626
|
-
this.isSearchDisabled = false;
|
627
|
-
if (matchesSearch && !this.hasChildren) {
|
628
|
-
optionDiv.classList.add('search-match');
|
629
|
-
this.highlightSearchTerm();
|
630
|
-
}
|
631
|
-
else if (matchesSearch && this.hasChildren) {
|
632
|
-
optionDiv.classList.add('search-match');
|
633
|
-
this.highlightSearchTerm();
|
634
|
-
this.isExpanded = true;
|
635
|
-
}
|
636
|
-
else if (!matchesSearch && this.hasChildren && hasMatchingChildren) {
|
637
|
-
optionDiv.classList.add('search-parent');
|
638
|
-
this.removeHighlighting();
|
639
|
-
this.isExpanded = true;
|
640
|
-
this.isSearchDisabled = true;
|
641
|
-
}
|
642
|
-
else if (hasMatchingParent) {
|
643
|
-
optionDiv.classList.add('search-match');
|
644
|
-
this.removeHighlighting();
|
645
|
-
}
|
646
|
-
else {
|
647
|
-
optionDiv.classList.add('search-hidden');
|
648
|
-
this.removeHighlighting();
|
649
|
-
}
|
650
|
-
});
|
651
|
-
}
|
652
|
-
highlightSearchTerm() {
|
653
|
-
var _a;
|
654
|
-
if (!this.searchTerm)
|
655
|
-
return;
|
656
|
-
const labelElement = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.option-label');
|
657
|
-
if (!labelElement)
|
658
|
-
return;
|
659
|
-
const slotElement = labelElement.querySelector('slot');
|
660
|
-
if (!slotElement)
|
661
|
-
return;
|
662
|
-
this.removeHighlighting();
|
663
|
-
const originalText = this.getTextContent();
|
664
|
-
const searchTermLower = this.searchTerm.toLowerCase();
|
665
|
-
const originalTextLower = originalText.toLowerCase();
|
666
|
-
if (!originalTextLower.includes(searchTermLower))
|
667
|
-
return;
|
668
|
-
const searchIndex = originalTextLower.indexOf(searchTermLower);
|
669
|
-
if (searchIndex === -1)
|
670
|
-
return;
|
671
|
-
const beforeMatch = originalText.substring(0, searchIndex);
|
672
|
-
const matchText = originalText.substring(searchIndex, searchIndex + searchTermLower.length);
|
673
|
-
const afterMatch = originalText.substring(searchIndex + searchTermLower.length);
|
674
|
-
const highlightedContent = document.createElement('span');
|
675
|
-
highlightedContent.className = 'highlighted-text';
|
676
|
-
if (beforeMatch) {
|
677
|
-
highlightedContent.appendChild(document.createTextNode(beforeMatch));
|
678
|
-
}
|
679
|
-
const boldElement = document.createElement('strong');
|
680
|
-
boldElement.className = 'search-highlight';
|
681
|
-
boldElement.textContent = matchText;
|
682
|
-
highlightedContent.appendChild(boldElement);
|
683
|
-
if (afterMatch) {
|
684
|
-
highlightedContent.appendChild(document.createTextNode(afterMatch));
|
685
|
-
}
|
686
|
-
labelElement.setAttribute('data-original-content', 'true');
|
687
|
-
slotElement.style.display = 'none';
|
688
|
-
labelElement.appendChild(highlightedContent);
|
689
|
-
}
|
690
|
-
removeHighlighting() {
|
691
|
-
var _a;
|
692
|
-
const labelElement = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.option-label');
|
693
|
-
if (!labelElement)
|
694
|
-
return;
|
695
|
-
const slotElement = labelElement.querySelector('slot');
|
696
|
-
const highlightedElement = labelElement.querySelector('.highlighted-text');
|
697
|
-
if (highlightedElement) {
|
698
|
-
labelElement.removeChild(highlightedElement);
|
699
|
-
}
|
700
|
-
if (slotElement) {
|
701
|
-
slotElement.style.display = '';
|
702
|
-
}
|
703
|
-
labelElement.removeAttribute('data-original-content');
|
704
|
-
}
|
705
|
-
getTextContent() {
|
706
|
-
let text = '';
|
707
|
-
Array.from(this.el.childNodes).forEach(node => {
|
708
|
-
var _a;
|
709
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
710
|
-
text += ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
711
|
-
}
|
712
|
-
});
|
713
|
-
return text || this.value || '';
|
714
|
-
}
|
715
|
-
hasMatchingChildren() {
|
716
|
-
if (!this.hasChildren)
|
717
|
-
return false;
|
718
|
-
const childOptions = Array.from(this.el.children)
|
719
|
-
.filter(child => child.tagName === 'IFX-MULTISELECT-OPTION');
|
720
|
-
return childOptions.some(child => {
|
721
|
-
const childInstance = child['__stencil_instance'];
|
722
|
-
if (!childInstance)
|
723
|
-
return false;
|
724
|
-
const childText = childInstance.getTextContent().toLowerCase();
|
725
|
-
const childMatches = childText.includes(this.searchTerm);
|
726
|
-
const grandChildrenMatch = childInstance.hasMatchingChildren();
|
727
|
-
return childMatches || grandChildrenMatch;
|
728
|
-
});
|
729
|
-
}
|
730
|
-
hasMatchingParent() {
|
731
|
-
let parent = this.el.parentElement;
|
732
|
-
while (parent && parent.tagName === 'IFX-MULTISELECT-OPTION') {
|
733
|
-
const parentInstance = parent['__stencil_instance'];
|
734
|
-
if (parentInstance) {
|
735
|
-
const parentText = parentInstance.getTextContent().toLowerCase();
|
736
|
-
if (parentText.includes(this.searchTerm)) {
|
737
|
-
return true;
|
738
|
-
}
|
739
|
-
}
|
740
|
-
parent = parent.parentElement;
|
741
|
-
}
|
742
|
-
return false;
|
743
|
-
}
|
744
|
-
calculateDepth() {
|
745
|
-
let depth = 0;
|
746
|
-
let parent = this.el.parentElement;
|
747
|
-
while (parent && parent.tagName !== 'IFX-MULTISELECT') {
|
748
|
-
if (parent.tagName === 'IFX-MULTISELECT-OPTION') {
|
749
|
-
depth++;
|
750
|
-
}
|
751
|
-
parent = parent.parentElement;
|
752
|
-
}
|
753
|
-
return depth;
|
754
|
-
}
|
755
|
-
handleClick(event) {
|
756
|
-
if (this.disabled || (this.isSearchActive && this.isSearchDisabled))
|
757
|
-
return;
|
758
|
-
event.stopPropagation();
|
759
|
-
if (event.type === 'click' && event.target.closest('.chevron-wrapper')) {
|
760
|
-
this.toggleExpansion();
|
761
|
-
return;
|
762
|
-
}
|
763
|
-
let newSelectedState;
|
764
|
-
if (this.indeterminate) {
|
765
|
-
newSelectedState = true;
|
766
|
-
}
|
767
|
-
else {
|
768
|
-
newSelectedState = !this.selected;
|
769
|
-
}
|
770
|
-
this.selected = newSelectedState;
|
771
|
-
this.indeterminate = false;
|
772
|
-
if (this.hasChildren) {
|
773
|
-
this.isExpanded = newSelectedState;
|
774
|
-
requestAnimationFrame(() => {
|
775
|
-
this.selectAllChildren(newSelectedState);
|
776
|
-
this.expandAllChildren(newSelectedState);
|
777
|
-
});
|
778
|
-
}
|
779
|
-
this.updateParentStates();
|
780
|
-
this.notifyMultiselect();
|
781
|
-
}
|
782
|
-
handleKeyDown(event) {
|
783
|
-
if (this.disabled || (this.isSearchActive && this.isSearchDisabled))
|
784
|
-
return;
|
785
|
-
const target = event.target;
|
786
|
-
if (target.closest('.chevron-wrapper') || target.closest('.checkbox-wrapper')) {
|
787
|
-
return;
|
788
|
-
}
|
789
|
-
if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') {
|
790
|
-
event.stopPropagation();
|
791
|
-
}
|
792
|
-
if (event.key === 'ArrowRight' && this.hasChildren) {
|
793
|
-
this.isExpanded = true;
|
794
|
-
}
|
795
|
-
if (event.key === 'ArrowLeft' && this.hasChildren) {
|
796
|
-
this.isExpanded = false;
|
797
|
-
}
|
798
|
-
}
|
799
|
-
notifyMultiselect() {
|
800
|
-
const updateEvent = new CustomEvent('ifx-option-changed', {
|
801
|
-
bubbles: true,
|
802
|
-
detail: {
|
803
|
-
value: this.value,
|
804
|
-
selected: this.selected,
|
805
|
-
indeterminate: this.indeterminate
|
806
|
-
}
|
807
|
-
});
|
808
|
-
this.el.dispatchEvent(updateEvent);
|
809
|
-
}
|
810
|
-
selectAllChildren(selected) {
|
811
|
-
const directChildren = Array.from(this.el.children)
|
812
|
-
.filter(child => child.tagName === 'IFX-MULTISELECT-OPTION');
|
813
|
-
directChildren.forEach((child) => {
|
814
|
-
var _a;
|
815
|
-
const childInstance = child['__stencil_instance'];
|
816
|
-
if (childInstance) {
|
817
|
-
childInstance.selected = selected;
|
818
|
-
childInstance.indeterminate = false;
|
819
|
-
if (childInstance.hasChildren) {
|
820
|
-
childInstance.isExpanded = selected;
|
821
|
-
childInstance.selectAllChildren(selected);
|
822
|
-
}
|
823
|
-
(_a = childInstance.notifyMultiselect) === null || _a === void 0 ? void 0 : _a.call(childInstance);
|
824
|
-
}
|
825
|
-
});
|
826
|
-
}
|
827
|
-
expandAllChildren(expanded) {
|
828
|
-
const directChildren = Array.from(this.el.children)
|
829
|
-
.filter(child => child.tagName === 'IFX-MULTISELECT-OPTION');
|
830
|
-
directChildren.forEach((child) => {
|
831
|
-
const childInstance = child['__stencil_instance'];
|
832
|
-
if (childInstance && childInstance.hasChildren) {
|
833
|
-
childInstance.isExpanded = expanded;
|
834
|
-
childInstance.expandAllChildren(expanded);
|
835
|
-
}
|
836
|
-
});
|
837
|
-
}
|
838
|
-
updateParentStates() {
|
839
|
-
var _a;
|
840
|
-
let parent = this.el.parentElement;
|
841
|
-
while (parent && parent.tagName === 'IFX-MULTISELECT-OPTION') {
|
842
|
-
const parentInstance = parent['__stencil_instance'];
|
843
|
-
if (!parentInstance) {
|
844
|
-
parent = parent.parentElement;
|
845
|
-
continue;
|
846
|
-
}
|
847
|
-
const siblings = Array.from(parent.children)
|
848
|
-
.filter(child => child.tagName === 'IFX-MULTISELECT-OPTION')
|
849
|
-
.map(child => child['__stencil_instance'])
|
850
|
-
.filter(instance => instance !== null);
|
851
|
-
const selectedCount = siblings.filter(sibling => sibling.selected).length;
|
852
|
-
const indeterminateCount = siblings.filter(sibling => sibling.indeterminate).length;
|
853
|
-
const totalCount = siblings.length;
|
854
|
-
if (selectedCount === totalCount && indeterminateCount === 0) {
|
855
|
-
parentInstance.selected = true;
|
856
|
-
parentInstance.indeterminate = false;
|
857
|
-
}
|
858
|
-
else if (selectedCount === 0 && indeterminateCount === 0) {
|
859
|
-
parentInstance.selected = false;
|
860
|
-
parentInstance.indeterminate = false;
|
861
|
-
}
|
862
|
-
else {
|
863
|
-
parentInstance.selected = false;
|
864
|
-
parentInstance.indeterminate = true;
|
865
|
-
}
|
866
|
-
(_a = parentInstance.notifyMultiselect) === null || _a === void 0 ? void 0 : _a.call(parentInstance);
|
867
|
-
parent = parent.parentElement;
|
868
|
-
}
|
869
|
-
}
|
870
|
-
toggleExpansion() {
|
871
|
-
this.isExpanded = !this.isExpanded;
|
872
|
-
}
|
873
|
-
hasAnySelectedChildren() {
|
874
|
-
const childOptions = Array.from(this.el.children)
|
875
|
-
.filter(child => child.tagName === 'IFX-MULTISELECT-OPTION');
|
876
|
-
return childOptions.some(child => {
|
877
|
-
const hasSelected = child.hasAttribute('selected');
|
878
|
-
const hasSelectedDescendants = this.checkForSelectedDescendants(child);
|
879
|
-
return hasSelected || hasSelectedDescendants;
|
880
|
-
});
|
881
|
-
}
|
882
|
-
checkForSelectedDescendants(element) {
|
883
|
-
const nestedOptions = Array.from(element.children)
|
884
|
-
.filter(child => child.tagName === 'IFX-MULTISELECT-OPTION');
|
885
|
-
return nestedOptions.some(nestedChild => {
|
886
|
-
const isSelected = nestedChild.hasAttribute('selected');
|
887
|
-
const hasSelectedNested = this.checkForSelectedDescendants(nestedChild);
|
888
|
-
return isSelected || hasSelectedNested;
|
889
|
-
});
|
890
|
-
}
|
891
|
-
render() {
|
892
|
-
let isFlatMultiselect = false;
|
893
|
-
const parentMultiselect = this.el.closest('ifx-multiselect');
|
894
|
-
if (parentMultiselect) {
|
895
|
-
const allOptions = Array.from(parentMultiselect.querySelectorAll('ifx-multiselect-option'));
|
896
|
-
isFlatMultiselect = allOptions.every(option => option.children.length === 0);
|
897
|
-
}
|
898
|
-
const basePadding = this.depth * 28 + 16;
|
899
|
-
const additionalPadding = this.hasChildren ? 0 : 28;
|
900
|
-
let totalPadding = basePadding + additionalPadding;
|
901
|
-
const optionItemStyle = isFlatMultiselect ? undefined : { paddingLeft: `${totalPadding}px` };
|
902
|
-
return (index.h(index.Host, { key: 'f836f58884e2e57c4c5fb4953f10d5ff4a34c8da' }, index.h("div", { key: '9eca6e87bb3c21512a051596b1e92931b707e88f', class: {
|
903
|
-
'option': true,
|
904
|
-
'option--has-children': this.hasChildren,
|
905
|
-
'option--expanded': this.isExpanded,
|
906
|
-
'option--disabled': this.disabled,
|
907
|
-
'option--selected': this.selected,
|
908
|
-
}, role: "option", "aria-expanded": this.hasChildren ? (this.isExpanded ? 'true' : 'false') : undefined, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "data-level": this.depth, "data-value": this.value }, index.h("div", { key: '41d24ef38470f5f7f8aa36daa33b339b7d8079f3', class: "option-item", style: optionItemStyle }, index.h("div", { key: '27d33336e7d15ccce1703429b70494fe86808214', class: "chevron-wrapper", tabIndex: this.hasChildren ? 0 : -1, role: this.hasChildren ? "button" : undefined, "aria-label": this.hasChildren ? (this.isExpanded ? "Collapse" : "Expand") : undefined, onClick: (e) => { e.stopPropagation(); this.toggleExpansion(); }, onKeyDown: (e) => {
|
909
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
910
|
-
e.preventDefault();
|
911
|
-
e.stopPropagation();
|
912
|
-
this.toggleExpansion();
|
913
|
-
}
|
914
|
-
} }, this.hasChildren && (index.h("ifx-icon", { key: '68e975b49b4aa9edf564b80644c5a55809185629', class: `chevron ${this.isExpanded ? 'chevron--expanded' : 'chevron--collapsed'}`, icon: "chevron-right-16" }))), index.h("div", { key: 'f651aefe4cc30db6056331ffaafd8e6ea17039fc', class: "checkbox-wrapper", onClick: (e) => e.stopPropagation() }, index.h("ifx-checkbox", { key: 'e8cb2c7a75921a81e0321ff22718d9373cb6f437', size: 's', checked: (this.isSearchActive && this.isSearchDisabled) ? false : (this.indeterminate ? false : this.selected), indeterminate: (this.isSearchActive && this.isSearchDisabled) ? false : this.indeterminate, onClick: this.handleCheckboxClick, disabled: this.disabled || (this.isSearchActive && this.isSearchDisabled), onKeyDown: (e) => {
|
915
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
916
|
-
e.preventDefault();
|
917
|
-
e.stopPropagation();
|
918
|
-
this.handleCheckboxClick(e);
|
919
|
-
}
|
920
|
-
} })), index.h("div", { key: '4f626380753927d4bedca0f78643e6647eff6356', class: "option-label", onClick: this.handleHeaderClick, tabIndex: -1 }, index.h("slot", { key: '8207d9f952bff231fda0bf0be43e1c567aa6a6da' }))), this.isExpanded && index.h("div", { key: '930d611f27451ff393d1403386bb6cd6b4a54980', class: "option-children" }, index.h("slot", { key: '269eb6381257f82b74b888188646559e6881a9d9', name: "children" })))));
|
921
|
-
}
|
922
|
-
get el() { return index.getElement(this); }
|
923
|
-
};
|
924
|
-
MultiselectOption.style = IfxMultiselectOptionStyle0;
|
925
|
-
|
926
|
-
exports.ifx_multiselect = Multiselect;
|
927
|
-
exports.ifx_multiselect_option = MultiselectOption;
|
928
|
-
|
929
|
-
//# sourceMappingURL=ifx-multiselect_2.cjs.entry.js.map
|