@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.
Files changed (289) hide show
  1. package/dist/cjs/{icons-2cd72a7d.js → icons-0d4d096d.js} +1 -4
  2. package/dist/cjs/icons-0d4d096d.js.map +1 -0
  3. package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
  4. package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
  5. package/dist/cjs/ifx-faq.cjs.entry.js +1 -1
  6. package/dist/cjs/ifx-filter-accordion.cjs.entry.js +2 -2
  7. package/dist/cjs/ifx-filter-bar.cjs.entry.js +1 -1
  8. package/dist/cjs/ifx-filter-search.cjs.entry.js +1 -1
  9. package/dist/cjs/ifx-filter-type-group.cjs.entry.js +1 -1
  10. package/dist/cjs/ifx-icon.cjs.entry.js +1 -1
  11. package/dist/cjs/ifx-icons-preview.cjs.entry.js +1 -1
  12. package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
  13. package/dist/cjs/ifx-multiselect.cjs.entry.js +545 -0
  14. package/dist/cjs/ifx-multiselect.cjs.entry.js.map +1 -0
  15. package/dist/cjs/ifx-select.cjs.entry.js +2 -2
  16. package/dist/cjs/ifx-set-filter.cjs.entry.js +2 -19
  17. package/dist/cjs/ifx-set-filter.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ifx-slider.cjs.entry.js +2 -2
  19. package/dist/cjs/ifx-spinner_2.cjs.entry.js +6 -6
  20. package/dist/cjs/ifx-status.cjs.entry.js +1 -1
  21. package/dist/cjs/ifx-step.cjs.entry.js +4 -4
  22. package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
  23. package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
  24. package/dist/cjs/ifx-tab.cjs.entry.js +1 -1
  25. package/dist/cjs/ifx-table.cjs.entry.js +2 -2
  26. package/dist/cjs/ifx-tabs.cjs.entry.js +2 -2
  27. package/dist/cjs/ifx-tag.cjs.entry.js +1 -1
  28. package/dist/cjs/ifx-templates-ui.cjs.entry.js +1 -1
  29. package/dist/cjs/ifx-textarea.cjs.entry.js +1 -1
  30. package/dist/cjs/ifx-tooltip.cjs.entry.js +4 -4
  31. package/dist/cjs/ifx-tree-view-item.cjs.entry.js +2 -2
  32. package/dist/cjs/ifx-tree-view.cjs.entry.js +1 -1
  33. package/dist/cjs/index-7f4df11a.js +14 -14
  34. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/collection/collection-manifest.json +0 -1
  37. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +1 -1
  38. package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
  39. package/dist/collection/components/select/multi-select/interfaces.js.map +1 -1
  40. package/dist/collection/components/select/multi-select/multiselect.css +65 -60
  41. package/dist/collection/components/select/multi-select/multiselect.js +427 -675
  42. package/dist/collection/components/select/multi-select/multiselect.js.map +1 -1
  43. package/dist/collection/components/select/multi-select/multiselect.stories.js +135 -439
  44. package/dist/collection/components/select/multi-select/multiselect.stories.js.map +1 -1
  45. package/dist/collection/components/select/single-select/select.js +2 -2
  46. package/dist/collection/components/slider/slider.js +2 -2
  47. package/dist/collection/components/spinner/spinner.js +2 -2
  48. package/dist/collection/components/status/status.js +1 -1
  49. package/dist/collection/components/stepper/step/step.js +4 -4
  50. package/dist/collection/components/stepper/stepper.js +2 -2
  51. package/dist/collection/components/switch/switch.js +1 -1
  52. package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +1 -1
  53. package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +2 -2
  54. package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +1 -1
  55. package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +1 -1
  56. package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +1 -1
  57. package/dist/collection/components/table-advanced-version/set-filter/setFilter.js +2 -19
  58. package/dist/collection/components/table-advanced-version/set-filter/setFilter.js.map +1 -1
  59. package/dist/collection/components/table-advanced-version/table.js +2 -2
  60. package/dist/collection/components/table-advanced-version/table.stories.js +3 -2
  61. package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
  62. package/dist/collection/components/table-basic-version/table.js +1 -1
  63. package/dist/collection/components/tabs/tab.js +1 -1
  64. package/dist/collection/components/tabs/tabs.js +2 -2
  65. package/dist/collection/components/tag/tag.js +1 -1
  66. package/dist/collection/components/templates/template/template.js +1 -1
  67. package/dist/collection/components/templates/templates-ui/templates-ui.js +1 -1
  68. package/dist/collection/components/text-field/text-field.js +4 -4
  69. package/dist/collection/components/textarea/textarea.js +1 -1
  70. package/dist/collection/components/tooltip/tooltip.js +4 -4
  71. package/dist/collection/components/tree-view/tree-view-item.js +2 -2
  72. package/dist/collection/components/tree-view/tree-view.js +1 -1
  73. package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
  74. package/dist/components/ifx-accordion-item.js +1 -1
  75. package/dist/components/ifx-alert.js +1 -1
  76. package/dist/components/ifx-basic-table.js +1 -1
  77. package/dist/components/ifx-breadcrumb-item-label.js +1 -1
  78. package/dist/components/ifx-checkbox-group.js +1 -1
  79. package/dist/components/ifx-checkbox.js +1 -1
  80. package/dist/components/ifx-chip-item.js +1 -1
  81. package/dist/components/ifx-chip.js +1 -1
  82. package/dist/components/ifx-date-picker.js +1 -1
  83. package/dist/components/ifx-dropdown-item.js +1 -1
  84. package/dist/components/ifx-dropdown-separator.js +1 -29
  85. package/dist/components/ifx-dropdown-separator.js.map +1 -1
  86. package/dist/components/ifx-dropdown-trigger-button.js +1 -1
  87. package/dist/components/ifx-faq.js +3 -3
  88. package/dist/components/ifx-file-upload.js +2 -2
  89. package/dist/components/ifx-filter-accordion.js +3 -3
  90. package/dist/components/ifx-filter-bar.js +2 -2
  91. package/dist/components/ifx-filter-search.js +3 -3
  92. package/dist/components/ifx-filter-type-group.js +1 -1
  93. package/dist/components/ifx-icon-button.js +1 -1
  94. package/dist/components/ifx-icon.js +1 -1
  95. package/dist/components/ifx-icons-preview.js +3 -3
  96. package/dist/components/ifx-list-entry.js +3 -3
  97. package/dist/components/ifx-list.js +1 -1
  98. package/dist/components/ifx-modal.js +2 -2
  99. package/dist/components/ifx-multiselect.js +1 -1
  100. package/dist/components/ifx-navbar-item.js +1 -1
  101. package/dist/components/ifx-navbar.js +1 -1
  102. package/dist/components/ifx-notification.js +1 -1
  103. package/dist/components/ifx-overview-table.js +1 -1
  104. package/dist/components/ifx-pagination.js +1 -1
  105. package/dist/components/ifx-radio-button-group.js +1 -1
  106. package/dist/components/ifx-search-bar.js +2 -2
  107. package/dist/components/ifx-search-field.js +1 -1
  108. package/dist/components/ifx-segment.js +1 -1
  109. package/dist/components/ifx-segmented-control.js +1 -1
  110. package/dist/components/ifx-select.js +1 -1
  111. package/dist/components/ifx-set-filter.js +12 -35
  112. package/dist/components/ifx-set-filter.js.map +1 -1
  113. package/dist/components/ifx-sidebar-item.js +1 -1
  114. package/dist/components/ifx-slider.js +3 -3
  115. package/dist/components/ifx-spinner.js +1 -1
  116. package/dist/components/ifx-status.js +1 -1
  117. package/dist/components/ifx-step.js +5 -5
  118. package/dist/components/ifx-stepper.js +2 -2
  119. package/dist/components/ifx-switch.js +1 -1
  120. package/dist/components/ifx-tab.js +1 -1
  121. package/dist/components/ifx-table.js +9 -9
  122. package/dist/components/ifx-tabs.js +3 -3
  123. package/dist/components/ifx-tag.js +2 -2
  124. package/dist/components/ifx-template.js +1 -1
  125. package/dist/components/ifx-templates-ui.js +7 -7
  126. package/dist/components/ifx-text-field.js +1 -1
  127. package/dist/components/ifx-textarea.js +1 -1
  128. package/dist/components/ifx-tooltip.js +5 -5
  129. package/dist/components/ifx-tree-view-item.js +4 -4
  130. package/dist/components/ifx-tree-view.js +1 -1
  131. package/dist/components/{p-f2f58eb1.js → p-0c449780.js} +2 -2
  132. package/dist/components/{p-f2f58eb1.js.map → p-0c449780.js.map} +1 -1
  133. package/dist/components/{p-b6b0d09b.js → p-186dacc8.js} +2 -2
  134. package/dist/components/{p-b6b0d09b.js.map → p-186dacc8.js.map} +1 -1
  135. package/dist/components/{p-34a36730.js → p-2a65d85a.js} +5 -5
  136. package/dist/components/{p-34a36730.js.map → p-2a65d85a.js.map} +1 -1
  137. package/dist/components/{p-afd6d4f5.js → p-38396fe7.js} +2 -2
  138. package/dist/components/{p-afd6d4f5.js.map → p-38396fe7.js.map} +1 -1
  139. package/dist/components/{p-fe3f24e7.js → p-67573b5f.js} +6 -6
  140. package/dist/components/{p-fe3f24e7.js.map → p-67573b5f.js.map} +1 -1
  141. package/dist/components/p-68016aea.js +33 -0
  142. package/dist/components/p-68016aea.js.map +1 -0
  143. package/dist/components/{p-20d6a006.js → p-6d12f845.js} +2 -2
  144. package/dist/components/{p-20d6a006.js.map → p-6d12f845.js.map} +1 -1
  145. package/dist/components/{p-351949f1.js → p-a4922416.js} +3 -3
  146. package/dist/components/{p-351949f1.js.map → p-a4922416.js.map} +1 -1
  147. package/dist/components/{p-b293963f.js → p-a8d0ef73.js} +2 -2
  148. package/dist/components/{p-b293963f.js.map → p-a8d0ef73.js.map} +1 -1
  149. package/dist/components/{p-6c0ec65a.js → p-b0039ef1.js} +2 -2
  150. package/dist/components/{p-6c0ec65a.js.map → p-b0039ef1.js.map} +1 -1
  151. package/dist/components/{p-12e75dad.js → p-bb4de57d.js} +1 -4
  152. package/dist/components/p-bb4de57d.js.map +1 -0
  153. package/dist/components/{p-98c86d16.js → p-c9aec5fa.js} +4 -4
  154. package/dist/components/{p-98c86d16.js.map → p-c9aec5fa.js.map} +1 -1
  155. package/dist/components/{p-1bfd69f4.js → p-cc5bd74b.js} +4 -4
  156. package/dist/components/{p-1bfd69f4.js.map → p-cc5bd74b.js.map} +1 -1
  157. package/dist/components/p-cd833a9b.js +598 -0
  158. package/dist/components/p-cd833a9b.js.map +1 -0
  159. package/dist/components/{p-2a500ed7.js → p-cd913238.js} +3 -3
  160. package/dist/components/{p-2a500ed7.js.map → p-cd913238.js.map} +1 -1
  161. package/dist/components/{p-5c96860f.js → p-d1790232.js} +2 -2
  162. package/dist/components/{p-5c96860f.js.map → p-d1790232.js.map} +1 -1
  163. package/dist/esm/{icons-75858876.js → icons-788fe290.js} +1 -4
  164. package/dist/esm/icons-788fe290.js.map +1 -0
  165. package/dist/esm/ifx-alert_2.entry.js +1 -1
  166. package/dist/esm/ifx-basic-table.entry.js +1 -1
  167. package/dist/esm/ifx-faq.entry.js +1 -1
  168. package/dist/esm/ifx-filter-accordion.entry.js +2 -2
  169. package/dist/esm/ifx-filter-bar.entry.js +1 -1
  170. package/dist/esm/ifx-filter-search.entry.js +1 -1
  171. package/dist/esm/ifx-filter-type-group.entry.js +1 -1
  172. package/dist/esm/ifx-icon.entry.js +1 -1
  173. package/dist/esm/ifx-icons-preview.entry.js +1 -1
  174. package/dist/esm/ifx-list-entry.entry.js +1 -1
  175. package/dist/esm/ifx-multiselect.entry.js +541 -0
  176. package/dist/esm/ifx-multiselect.entry.js.map +1 -0
  177. package/dist/esm/ifx-select.entry.js +2 -2
  178. package/dist/esm/ifx-set-filter.entry.js +2 -19
  179. package/dist/esm/ifx-set-filter.entry.js.map +1 -1
  180. package/dist/esm/ifx-slider.entry.js +2 -2
  181. package/dist/esm/ifx-spinner_2.entry.js +6 -6
  182. package/dist/esm/ifx-status.entry.js +1 -1
  183. package/dist/esm/ifx-step.entry.js +4 -4
  184. package/dist/esm/ifx-stepper.entry.js +2 -2
  185. package/dist/esm/ifx-switch.entry.js +1 -1
  186. package/dist/esm/ifx-tab.entry.js +1 -1
  187. package/dist/esm/ifx-table.entry.js +2 -2
  188. package/dist/esm/ifx-tabs.entry.js +2 -2
  189. package/dist/esm/ifx-tag.entry.js +1 -1
  190. package/dist/esm/ifx-templates-ui.entry.js +1 -1
  191. package/dist/esm/ifx-textarea.entry.js +1 -1
  192. package/dist/esm/ifx-tooltip.entry.js +4 -4
  193. package/dist/esm/ifx-tree-view-item.entry.js +2 -2
  194. package/dist/esm/ifx-tree-view.entry.js +1 -1
  195. package/dist/esm/index-6c9eba32.js +14 -14
  196. package/dist/esm/infineon-design-system-stencil.js +1 -1
  197. package/dist/esm/loader.js +1 -1
  198. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  199. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  200. package/dist/infineon-design-system-stencil/p-06bfabcf.entry.js +2 -0
  201. package/dist/infineon-design-system-stencil/{p-76e0c34f.entry.js.map → p-06bfabcf.entry.js.map} +1 -1
  202. package/dist/infineon-design-system-stencil/{p-3d037fa4.entry.js → p-0f096cf1.entry.js} +2 -2
  203. package/dist/infineon-design-system-stencil/{p-ad7b58c3.entry.js → p-1048ee19.entry.js} +2 -2
  204. package/dist/infineon-design-system-stencil/{p-d890b0de.entry.js → p-142878ee.entry.js} +2 -2
  205. package/dist/infineon-design-system-stencil/{p-4d96fed0.js → p-27d2afb4.js} +2 -2
  206. package/dist/infineon-design-system-stencil/p-27d2afb4.js.map +1 -0
  207. package/dist/infineon-design-system-stencil/{p-18a81f5f.entry.js → p-2b38c405.entry.js} +2 -2
  208. package/dist/infineon-design-system-stencil/p-34738a10.entry.js +2 -0
  209. package/dist/infineon-design-system-stencil/p-45ac2698.entry.js +2 -0
  210. package/dist/infineon-design-system-stencil/p-45ac2698.entry.js.map +1 -0
  211. package/dist/infineon-design-system-stencil/{p-4d9a4329.entry.js → p-49252616.entry.js} +2 -2
  212. package/dist/infineon-design-system-stencil/p-65e57b85.entry.js +2 -0
  213. package/dist/infineon-design-system-stencil/{p-74bee1c8.entry.js → p-65fe2246.entry.js} +2 -2
  214. package/dist/infineon-design-system-stencil/{p-7adee2dd.entry.js → p-6d99d01d.entry.js} +2 -2
  215. package/dist/infineon-design-system-stencil/{p-4764665d.entry.js → p-702a48f8.entry.js} +2 -2
  216. package/dist/infineon-design-system-stencil/{p-b6dd2ac0.entry.js → p-7440ea9d.entry.js} +2 -2
  217. package/dist/infineon-design-system-stencil/{p-c7e86c7c.entry.js → p-7b7ac7fa.entry.js} +2 -2
  218. package/dist/infineon-design-system-stencil/{p-0c1c831c.entry.js → p-87fbd617.entry.js} +2 -2
  219. package/dist/infineon-design-system-stencil/p-885adc48.entry.js +2 -0
  220. package/dist/infineon-design-system-stencil/p-885adc48.entry.js.map +1 -0
  221. package/dist/infineon-design-system-stencil/{p-aaf08082.entry.js → p-88af2e64.entry.js} +2 -2
  222. package/dist/infineon-design-system-stencil/{p-13c107bf.entry.js → p-959285a7.entry.js} +2 -2
  223. package/dist/infineon-design-system-stencil/{p-36dcebde.entry.js → p-a9cfb70d.entry.js} +2 -2
  224. package/dist/infineon-design-system-stencil/{p-6250b9f6.entry.js → p-acf0f4ed.entry.js} +2 -2
  225. package/dist/infineon-design-system-stencil/{p-02496917.entry.js → p-b637c44c.entry.js} +2 -2
  226. package/dist/infineon-design-system-stencil/{p-6c2698a3.entry.js → p-babf3f2d.entry.js} +2 -2
  227. package/dist/infineon-design-system-stencil/{p-5e376887.entry.js → p-c2791360.entry.js} +2 -2
  228. package/dist/infineon-design-system-stencil/{p-a80e321b.entry.js → p-c5a785d7.entry.js} +2 -2
  229. package/dist/infineon-design-system-stencil/{p-2e7d87ed.entry.js → p-e98d2280.entry.js} +2 -2
  230. package/dist/infineon-design-system-stencil/{p-5f38cace.entry.js → p-ecc17497.entry.js} +2 -2
  231. package/dist/infineon-design-system-stencil/{p-5285ca40.entry.js → p-f25f014d.entry.js} +2 -2
  232. package/dist/infineon-design-system-stencil/{p-04d8ea38.entry.js → p-f2bea855.entry.js} +2 -2
  233. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +1 -1
  234. package/dist/types/components/select/multi-select/interfaces.d.ts +1 -1
  235. package/dist/types/components/select/multi-select/multiselect.d.ts +61 -39
  236. package/dist/types/components/select/multi-select/multiselect.stories.d.ts +30 -219
  237. package/dist/types/components.d.ts +8 -54
  238. package/package.json +2 -2
  239. package/dist/cjs/icons-2cd72a7d.js.map +0 -1
  240. package/dist/cjs/ifx-multiselect_2.cjs.entry.js +0 -929
  241. package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +0 -1
  242. package/dist/collection/components/select/multi-select/multiselect-option.css +0 -112
  243. package/dist/collection/components/select/multi-select/multiselect-option.js +0 -505
  244. package/dist/collection/components/select/multi-select/multiselect-option.js.map +0 -1
  245. package/dist/components/ifx-multiselect-option.d.ts +0 -11
  246. package/dist/components/ifx-multiselect-option.js +0 -8
  247. package/dist/components/ifx-multiselect-option.js.map +0 -1
  248. package/dist/components/p-12e75dad.js.map +0 -1
  249. package/dist/components/p-3906f639.js +0 -432
  250. package/dist/components/p-3906f639.js.map +0 -1
  251. package/dist/components/p-aedd7be5.js +0 -599
  252. package/dist/components/p-aedd7be5.js.map +0 -1
  253. package/dist/esm/icons-75858876.js.map +0 -1
  254. package/dist/esm/ifx-multiselect_2.entry.js +0 -924
  255. package/dist/esm/ifx-multiselect_2.entry.js.map +0 -1
  256. package/dist/infineon-design-system-stencil/p-25204a1e.entry.js +0 -2
  257. package/dist/infineon-design-system-stencil/p-25204a1e.entry.js.map +0 -1
  258. package/dist/infineon-design-system-stencil/p-4d96fed0.js.map +0 -1
  259. package/dist/infineon-design-system-stencil/p-6c999b11.entry.js +0 -2
  260. package/dist/infineon-design-system-stencil/p-6c999b11.entry.js.map +0 -1
  261. package/dist/infineon-design-system-stencil/p-76e0c34f.entry.js +0 -2
  262. package/dist/infineon-design-system-stencil/p-a2a44fbe.entry.js +0 -2
  263. package/dist/infineon-design-system-stencil/p-e571c002.entry.js +0 -2
  264. package/dist/types/components/select/multi-select/multiselect-option.d.ts +0 -36
  265. /package/dist/infineon-design-system-stencil/{p-3d037fa4.entry.js.map → p-0f096cf1.entry.js.map} +0 -0
  266. /package/dist/infineon-design-system-stencil/{p-ad7b58c3.entry.js.map → p-1048ee19.entry.js.map} +0 -0
  267. /package/dist/infineon-design-system-stencil/{p-d890b0de.entry.js.map → p-142878ee.entry.js.map} +0 -0
  268. /package/dist/infineon-design-system-stencil/{p-18a81f5f.entry.js.map → p-2b38c405.entry.js.map} +0 -0
  269. /package/dist/infineon-design-system-stencil/{p-e571c002.entry.js.map → p-34738a10.entry.js.map} +0 -0
  270. /package/dist/infineon-design-system-stencil/{p-4d9a4329.entry.js.map → p-49252616.entry.js.map} +0 -0
  271. /package/dist/infineon-design-system-stencil/{p-a2a44fbe.entry.js.map → p-65e57b85.entry.js.map} +0 -0
  272. /package/dist/infineon-design-system-stencil/{p-74bee1c8.entry.js.map → p-65fe2246.entry.js.map} +0 -0
  273. /package/dist/infineon-design-system-stencil/{p-7adee2dd.entry.js.map → p-6d99d01d.entry.js.map} +0 -0
  274. /package/dist/infineon-design-system-stencil/{p-4764665d.entry.js.map → p-702a48f8.entry.js.map} +0 -0
  275. /package/dist/infineon-design-system-stencil/{p-b6dd2ac0.entry.js.map → p-7440ea9d.entry.js.map} +0 -0
  276. /package/dist/infineon-design-system-stencil/{p-c7e86c7c.entry.js.map → p-7b7ac7fa.entry.js.map} +0 -0
  277. /package/dist/infineon-design-system-stencil/{p-0c1c831c.entry.js.map → p-87fbd617.entry.js.map} +0 -0
  278. /package/dist/infineon-design-system-stencil/{p-aaf08082.entry.js.map → p-88af2e64.entry.js.map} +0 -0
  279. /package/dist/infineon-design-system-stencil/{p-13c107bf.entry.js.map → p-959285a7.entry.js.map} +0 -0
  280. /package/dist/infineon-design-system-stencil/{p-36dcebde.entry.js.map → p-a9cfb70d.entry.js.map} +0 -0
  281. /package/dist/infineon-design-system-stencil/{p-6250b9f6.entry.js.map → p-acf0f4ed.entry.js.map} +0 -0
  282. /package/dist/infineon-design-system-stencil/{p-02496917.entry.js.map → p-b637c44c.entry.js.map} +0 -0
  283. /package/dist/infineon-design-system-stencil/{p-6c2698a3.entry.js.map → p-babf3f2d.entry.js.map} +0 -0
  284. /package/dist/infineon-design-system-stencil/{p-5e376887.entry.js.map → p-c2791360.entry.js.map} +0 -0
  285. /package/dist/infineon-design-system-stencil/{p-a80e321b.entry.js.map → p-c5a785d7.entry.js.map} +0 -0
  286. /package/dist/infineon-design-system-stencil/{p-2e7d87ed.entry.js.map → p-e98d2280.entry.js.map} +0 -0
  287. /package/dist/infineon-design-system-stencil/{p-5f38cace.entry.js.map → p-ecc17497.entry.js.map} +0 -0
  288. /package/dist/infineon-design-system-stencil/{p-5285ca40.entry.js.map → p-f25f014d.entry.js.map} +0 -0
  289. /package/dist/infineon-design-system-stencil/{p-04d8ea38.entry.js.map → p-f2bea855.entry.js.map} +0 -0
@@ -0,0 +1,598 @@
1
+ import { p as proxyCustomElement, H, c as createEvent, h } from './p-f8e6a4ef.js';
2
+ import { d as defineCustomElement$3 } from './p-186dacc8.js';
3
+ import { d as defineCustomElement$2 } from './p-68016aea.js';
4
+ import { d as defineCustomElement$1 } from './p-bb4de57d.js';
5
+
6
+ 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.small-select{height:36px}.ifx-multiselect-container.medium-select{height:40px}.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;position:relative;display:flex;align-items:center;border:1px solid #8D8786;border-radius:1px;width:100%;font-weight:400;font-style:normal}.ifx-multiselect-container .ifx-multiselect-wrapper.small-select{height:36px;padding:8px 12px;font-size:0.875rem;line-height:1.25rem}.ifx-multiselect-container .ifx-multiselect-wrapper.medium-select{height:40px;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;align-items:center;display:flex}.ifx-multiselect-container .ifx-clear-button{display:flex}.ifx-multiselect-container .ifx-clear-button.hide{display:none}.ifx-multiselect-container .ifx-multiselect-dropdown-menu{position:absolute;top:100%;left:0;width:100%;margin-top:2px;background-color:#fff;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1);max-height:300px;overflow-y:auto;z-index:1000}.ifx-multiselect-container .ifx-multiselect-dropdown-menu .search-input{position:sticky;top:0;left:0;z-index:1;width:100%;padding:8px 16px;font-size:1rem;line-height:1.5rem;font-style:normal;font-weight:400;box-sizing:border-box;background-color:#FFFFFF;border:none;border-bottom:1px solid #8D8786}.ifx-multiselect-container .ifx-multiselect-dropdown-menu .search-input:focus{outline:none;border:1px solid #0A8276}.ifx-multiselect-container .ifx-multiselect-dropdown-menu .search-input::placeholder{color:#999}.ifx-multiselect-container .option{position:relative;padding:8px 16px;gap:8px;align-items:center;display:flex;font-style:normal;font-weight:400}.ifx-multiselect-container .option.small-select{font-size:0.875rem;line-height:1.25rem}.ifx-multiselect-container .option.medium-select{font-size:1rem;line-height:1.5rem}.ifx-multiselect-container .option:hover{background-color:#EEEDED}.ifx-multiselect-container .option:focus:not(.disabled){background-color:#BFBBBB;outline:none}.ifx-multiselect-container .option.is-highlighted{background-color:#EEEDED}.ifx-multiselect-container .option.sub-option{padding-left:30px;}.ifx-multiselect-container .option.disabled:hover{cursor:default}.ifx-multiselect-container .option label{cursor:inherit}.select-all-wrapper{padding-top:8px}";
7
+ const IfxMultiselectStyle0 = multiselectCss;
8
+
9
+ // Debounce function
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 = /*@__PURE__*/ proxyCustomElement(class Multiselect extends H {
22
+ constructor() {
23
+ super();
24
+ this.__registerHost();
25
+ this.__attachShadow();
26
+ this.ifxSelect = createEvent(this, "ifxSelect", 7);
27
+ this.ifxOpen = createEvent(this, "ifxOpen", 7);
28
+ this.internals = this.attachInternals();
29
+ this.batchSize = 50;
30
+ this.size = 'medium (40px)';
31
+ this.disabled = false;
32
+ this.error = false;
33
+ this.internalError = false;
34
+ this.errorMessage = "Error";
35
+ this.label = "";
36
+ this.persistentSelectedOptions = [];
37
+ this.placeholder = "";
38
+ this.dropdownOpen = false;
39
+ this.currentIndex = 0; //needed for option selection using keyboard
40
+ this.isLoading = false;
41
+ this.loadedOptions = [];
42
+ this.filteredOptions = [];
43
+ this.showSearch = true;
44
+ this.showSelectAll = true;
45
+ this.showClearButton = true;
46
+ this.optionCount = 0; // number of all options (leaves of the tree)
47
+ this.optionsProcessed = false; // flag whether options have already been counted, intial selections saved
48
+ this.handleSearch = debounce((targetElement) => {
49
+ const searchTerm = targetElement.value.toLowerCase();
50
+ if (searchTerm === '') {
51
+ this.filteredOptions = this.loadedOptions;
52
+ }
53
+ else {
54
+ this.filteredOptions = this.loadedOptions.filter(option => {
55
+ const matchesSearchTerm = option.label.toLowerCase().includes(searchTerm);
56
+ if (option.children) {
57
+ const childrenMatch = option.children.some(child => {
58
+ return child.label.toLowerCase().includes(searchTerm);
59
+ });
60
+ return matchesSearchTerm || childrenMatch;
61
+ }
62
+ return matchesSearchTerm;
63
+ });
64
+ }
65
+ }, 300);
66
+ this.handleDocumentClick = (event) => {
67
+ const path = event.composedPath();
68
+ if (!path.includes(this.dropdownElement)) {
69
+ this.dropdownOpen = false;
70
+ document.removeEventListener('click', this.handleDocumentClick);
71
+ this.filteredOptions = this.loadedOptions;
72
+ // Dispatch the ifxMultiselectIsOpen event
73
+ this.ifxOpen.emit(this.dropdownOpen);
74
+ }
75
+ };
76
+ }
77
+ updateOptions() {
78
+ this.loadedOptions = [];
79
+ this.filteredOptions = [];
80
+ this.optionCount = 0;
81
+ this.optionsProcessed = false;
82
+ this.persistentSelectedOptions = [];
83
+ this.loadInitialOptions();
84
+ }
85
+ async loadInitialOptions() {
86
+ this.isLoading = true;
87
+ this.internalError = this.error;
88
+ this.internalErrorMessage = this.errorMessage;
89
+ // Load the first batch of options (e.g., first 20)
90
+ this.loadedOptions = await this.fetchOptions(0, this.batchSize);
91
+ this.isLoading = false;
92
+ }
93
+ async fetchMoreOptions() {
94
+ this.isLoading = true;
95
+ const moreOptions = await this.fetchOptions(this.loadedOptions.length, this.batchSize);
96
+ this.loadedOptions = [...this.loadedOptions, ...moreOptions];
97
+ this.isLoading = false;
98
+ }
99
+ handleScroll(event) {
100
+ const element = event.target;
101
+ const halfwayPoint = Math.floor((element.scrollHeight - element.clientHeight) / 2); //loading more options when the user has scrolled halfway through the current list
102
+ if (element.scrollTop >= halfwayPoint) {
103
+ this.fetchMoreOptions();
104
+ }
105
+ }
106
+ async fetchOptions(startIndex, count) {
107
+ let allOptions = [];
108
+ // Parse options if it's a string, or use directly if it's an array
109
+ if (typeof this.options === 'string') {
110
+ try {
111
+ allOptions = JSON.parse(this.options);
112
+ }
113
+ catch (err) {
114
+ console.error('Failed to parse options:', err);
115
+ }
116
+ }
117
+ else if (Array.isArray(this.options)) {
118
+ allOptions = this.options;
119
+ }
120
+ else {
121
+ console.error('Unexpected value for options:', this.options);
122
+ }
123
+ if (!this.optionsProcessed) {
124
+ this.optionCount = this.countOptions(allOptions);
125
+ const initiallySelected = this.collectSelectedOptions(allOptions);
126
+ const initallySelectedNotInState = initiallySelected.filter(init => !this.persistentSelectedOptions.some(opt => opt.value == init.value));
127
+ this.persistentSelectedOptions = [...this.persistentSelectedOptions, ...initallySelectedNotInState];
128
+ this.optionsProcessed = true;
129
+ }
130
+ // Slice the options array based on startIndex and count
131
+ const slicedOptions = allOptions.slice(startIndex, startIndex + count);
132
+ return slicedOptions;
133
+ }
134
+ /**
135
+ * Collects and returns all options that are selected.
136
+ * When the parent is selected, then the value of the children will be overriden with selected as well.
137
+ * It will only collect the leaves of the tree.
138
+ *
139
+ * @param options A list of options.
140
+ * @returns A list with all selected options
141
+ */
142
+ collectSelectedOptions(options) {
143
+ let selectedOptions = [];
144
+ for (const option of options) {
145
+ if (option.selected) {
146
+ if (option.children && option.children.length > 0) {
147
+ // if parent is selected, then select all child options
148
+ selectedOptions = selectedOptions.concat(this.collectLeafOptions(option.children));
149
+ }
150
+ else {
151
+ if (!selectedOptions.some(existingOption => existingOption.value === option.value)) {
152
+ selectedOptions.push(option);
153
+ }
154
+ }
155
+ }
156
+ else {
157
+ if (option.children && option.children.length > 0) {
158
+ selectedOptions = selectedOptions.concat(this.collectSelectedOptions(option.children));
159
+ }
160
+ }
161
+ }
162
+ return selectedOptions;
163
+ }
164
+ /**
165
+ * Collects all leaf children options.
166
+ *
167
+ * @param option A list with all leaf-children.
168
+ */
169
+ collectLeafOptions(children) {
170
+ let leafOptions = [];
171
+ for (const child of children) {
172
+ if (child.children && child.children.length > 0) {
173
+ leafOptions = leafOptions.concat(this.collectLeafOptions(child.children));
174
+ }
175
+ else {
176
+ leafOptions.push(child);
177
+ }
178
+ }
179
+ return leafOptions;
180
+ }
181
+ /**
182
+ * Count the number of options. Only counts the leaves of the options tree.
183
+ */
184
+ countOptions(options) {
185
+ let count = 0;
186
+ for (const option of options) {
187
+ if (option.children && option.children.length >= 0) {
188
+ count += this.countOptions(option.children);
189
+ }
190
+ else {
191
+ count++;
192
+ }
193
+ }
194
+ return count;
195
+ }
196
+ componentDidLoad() {
197
+ setTimeout(() => {
198
+ this.positionDropdown();
199
+ }, 500);
200
+ // setInterval(this.handleScroll, 5000); // Runs every 5 seconds (5000 milliseconds)
201
+ }
202
+ componentWillLoad() {
203
+ this.loadInitialOptions();
204
+ this.filteredOptions = [...this.loadedOptions];
205
+ }
206
+ updateInternalError() {
207
+ this.internalError = this.error;
208
+ }
209
+ updateInternalErrorMessage() {
210
+ this.internalErrorMessage = this.errorMessage;
211
+ }
212
+ loadedOptionsChanged() {
213
+ this.filteredOptions = [...this.loadedOptions];
214
+ }
215
+ onSelectionChange(newValue, _) {
216
+ const formData = new FormData();
217
+ newValue.forEach(option => formData.append(this.name, option.value));
218
+ this.internals.setFormValue(formData);
219
+ }
220
+ handleOptionClick(option) {
221
+ this.internalError = false;
222
+ if (!option.selected && this.isSelectionLimitReached(option)) {
223
+ option.checkboxRef.toggleCheckedState(false);
224
+ this.internalError = true;
225
+ this.internalErrorMessage = "Please consider the maximum number of items to choose from";
226
+ return;
227
+ }
228
+ this.updateSelection(option);
229
+ this.ifxSelect.emit(this.persistentSelectedOptions);
230
+ }
231
+ isSelectionLimitReached(option) {
232
+ let newOptionsLength = option.children ? option.children.length : 1;
233
+ return this.maxItemCount && this.persistentSelectedOptions.length + newOptionsLength > this.maxItemCount &&
234
+ !this.persistentSelectedOptions.some(selectedOption => selectedOption.value === option.value);
235
+ }
236
+ updateSelection(option) {
237
+ const wasSelected = this.persistentSelectedOptions.some(selectedOption => selectedOption.value === option.value);
238
+ if (option.children && option.children.length > 0) {
239
+ this.handleParentOptionClick(option);
240
+ }
241
+ else {
242
+ this.handleChildOptionClick(option, wasSelected);
243
+ }
244
+ }
245
+ async selectAll() {
246
+ const allOptions = await this.fetchOptions(0, this.optionCount);
247
+ this.selectAllRecursive(allOptions);
248
+ this.ifxSelect.emit(this.persistentSelectedOptions);
249
+ }
250
+ selectAllRecursive(options) {
251
+ for (const opt of options) {
252
+ if (opt.children && opt.children.length > 0) {
253
+ this.selectAllRecursive(opt.children);
254
+ }
255
+ else {
256
+ if (!this.persistentSelectedOptions.some((some) => some.value === opt.value)) {
257
+ opt.selected = true;
258
+ this.persistentSelectedOptions = [...this.persistentSelectedOptions, opt];
259
+ this.optionCount = this.countOptions(this.persistentSelectedOptions);
260
+ }
261
+ }
262
+ }
263
+ }
264
+ handleParentOptionClick(option) {
265
+ const allChildrenSelected = option.children.every(child => this.persistentSelectedOptions.some(selectedOption => selectedOption.value === child.value));
266
+ if (allChildrenSelected) {
267
+ this.persistentSelectedOptions = [...this.persistentSelectedOptions.filter(selectedOption => !option.children.some(child => child.value === selectedOption.value))];
268
+ option.selected = false;
269
+ option.children.forEach(child => {
270
+ child.selected = false;
271
+ });
272
+ }
273
+ else {
274
+ const newChildren = [...option.children.filter(childOption => !this.persistentSelectedOptions.some(selectedOption => selectedOption.value === childOption.value))];
275
+ option.selected = true;
276
+ option.children.forEach(child => {
277
+ child.selected = true;
278
+ });
279
+ this.persistentSelectedOptions = [...this.persistentSelectedOptions, ...newChildren];
280
+ }
281
+ }
282
+ handleChildOptionClick(option, wasSelected) {
283
+ if (wasSelected) {
284
+ this.persistentSelectedOptions = [...this.persistentSelectedOptions.filter(selectedOption => selectedOption.value !== option.value)];
285
+ option.selected = false;
286
+ }
287
+ else {
288
+ this.persistentSelectedOptions = [...this.persistentSelectedOptions, option];
289
+ option.selected = true;
290
+ }
291
+ this.updateParentSelectedState();
292
+ }
293
+ updateParentSelectedState() {
294
+ this.loadedOptions.forEach(option => {
295
+ var _a;
296
+ if (((_a = option.children) === null || _a === void 0 ? void 0 : _a.length) > 0) {
297
+ if (option.children.every(child => child.selected === true))
298
+ option.selected = true;
299
+ else {
300
+ option.selected = false;
301
+ if (this.isOptionIndeterminate(option)) {
302
+ option.indeterminate = true;
303
+ }
304
+ else {
305
+ option.indeterminate = false;
306
+ }
307
+ }
308
+ }
309
+ });
310
+ }
311
+ getSizeClass() {
312
+ return `${this.size}` === "s"
313
+ ? "small-select"
314
+ : "medium-select";
315
+ }
316
+ toggleDropdown() {
317
+ this.dropdownOpen = !this.dropdownOpen;
318
+ setTimeout(() => {
319
+ if (this.dropdownOpen) {
320
+ document.addEventListener('click', this.handleDocumentClick);
321
+ }
322
+ // Dispatch the ifxOpen event
323
+ this.ifxOpen.emit(this.dropdownOpen);
324
+ }, 0);
325
+ }
326
+ waitForElement(querySelectorFunc, callback, maxTries = 50) {
327
+ let tries = 0;
328
+ function request() {
329
+ requestAnimationFrame(() => {
330
+ const elements = querySelectorFunc();
331
+ if (elements.length > 0 || tries > maxTries) {
332
+ callback(elements);
333
+ }
334
+ else {
335
+ tries++;
336
+ request();
337
+ }
338
+ });
339
+ }
340
+ request();
341
+ }
342
+ handleKeyDown(event) {
343
+ if (this.disabled)
344
+ return; // If it's disabled, don't do anything.
345
+ const options = this.dropdownElement.querySelectorAll('.option');
346
+ switch (event.code) {
347
+ case 'Enter':
348
+ this.toggleDropdown();
349
+ // Wait a bit for the dropdown to finish rendering
350
+ this.waitForElement(() => {
351
+ return this.dropdownElement.querySelectorAll('.option');
352
+ }, (options) => {
353
+ this.updateHighlightedOption(options);
354
+ });
355
+ break;
356
+ case 'Space':
357
+ this.toggleDropdown();
358
+ // Wait a bit for the dropdown to finish rendering
359
+ this.waitForElement(() => {
360
+ return this.dropdownElement.querySelectorAll('.option');
361
+ }, (options) => {
362
+ this.updateHighlightedOption(options);
363
+ });
364
+ break;
365
+ case 'ArrowDown':
366
+ this.handleArrowDown(options);
367
+ if (this.dropdownOpen) {
368
+ this.updateHighlightedOption(options);
369
+ }
370
+ break;
371
+ case 'ArrowUp':
372
+ this.handleArrowUp(options);
373
+ if (this.dropdownOpen) {
374
+ this.updateHighlightedOption(options);
375
+ }
376
+ break;
377
+ }
378
+ }
379
+ handleWrapperClick(event) {
380
+ // This is your existing logic for positioning the dropdown
381
+ this.positionDropdown();
382
+ // Check if the event target is the wrapper itself and not a child element.
383
+ if (event.currentTarget === event.target) {
384
+ this.toggleDropdown();
385
+ }
386
+ }
387
+ clearSelection() {
388
+ this.persistentSelectedOptions = [];
389
+ this.ifxSelect.emit(this.persistentSelectedOptions); // if you want to emit empty selection after clearing
390
+ }
391
+ positionDropdown() {
392
+ var _a;
393
+ const wrapperRect = (_a = this.el.shadowRoot.querySelector('.ifx-multiselect-wrapper')) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
394
+ const spaceBelow = window.innerHeight - wrapperRect.bottom;
395
+ const spaceAbove = wrapperRect.top;
396
+ // If there's more space above than below the trigger and the dropdown doesn't fit below
397
+ if ((spaceAbove > spaceBelow && wrapperRect.height > spaceBelow) || (wrapperRect.bottom > window.innerHeight)) {
398
+ this.dropdownFlipped = true;
399
+ }
400
+ else {
401
+ this.dropdownFlipped = false;
402
+ }
403
+ }
404
+ // Helper function to update highlighted option based on currentIndex
405
+ updateHighlightedOption(options) {
406
+ // Clear all highlights
407
+ options.forEach((option) => option.classList.remove('is-highlighted'));
408
+ // Apply highlight to the current option
409
+ if (this.currentIndex >= 0 && this.currentIndex < options.length) {
410
+ options[this.currentIndex].classList.add('is-highlighted');
411
+ options[this.currentIndex].focus();
412
+ }
413
+ }
414
+ // Helper function to handle arrow down navigation
415
+ handleArrowDown(options) {
416
+ if (this.currentIndex < options.length - 1) {
417
+ this.currentIndex++;
418
+ }
419
+ else {
420
+ this.currentIndex = 0; // Wrap to the beginning.
421
+ }
422
+ }
423
+ // Helper function to handle arrow up navigation
424
+ handleArrowUp(options) {
425
+ if (this.currentIndex > 0) {
426
+ this.currentIndex--;
427
+ }
428
+ else {
429
+ this.currentIndex = options.length - 1; // Wrap to the end.
430
+ }
431
+ }
432
+ handleOptionKeyDown(e, option) {
433
+ if (e.key !== 'ArrowUp' && e.key !== 'ArrowDown')
434
+ e.stopPropagation();
435
+ if (e.key === 'Enter' || e.key === ' ') {
436
+ this.handleOptionClick(option);
437
+ }
438
+ }
439
+ renderOption(option, index) {
440
+ var _a;
441
+ const isIndeterminate = this.isOptionIndeterminate(option);
442
+ const isSelected = option.children ? isIndeterminate || this.isOptionSelected(option) : this.persistentSelectedOptions.some(selectedOption => selectedOption.value === option.value);
443
+ const disableCheckbox = !isSelected && this.maxItemCount && this.persistentSelectedOptions.length >= this.maxItemCount;
444
+ const uniqueId = `checkbox-${option.value}-${index}`; // Generate a unique ID using the index
445
+ return (h("div", { class: "option-wrapper" }, h("div", { class: `option ${isSelected ? 'selected' : ''} ${disableCheckbox ? 'disabled' : ''}
446
+ ${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}`))));
447
+ }
448
+ isOptionSelected(option) {
449
+ if (!option.children)
450
+ return false;
451
+ return option.children.every(child => this.persistentSelectedOptions.some(persistentOption => persistentOption.value === child.value));
452
+ }
453
+ isOptionIndeterminate(option) {
454
+ if (!option.children)
455
+ return false;
456
+ const selectedChildren = option.children.filter(child => this.persistentSelectedOptions.some(persistentOption => persistentOption.value === child.value)).length;
457
+ return selectedChildren > 0 && selectedChildren < option.children.length;
458
+ }
459
+ findInOptions(options, searchTerm) {
460
+ for (const option of options) {
461
+ if (option.value === searchTerm) {
462
+ return option;
463
+ }
464
+ if (option.children) {
465
+ const foundInChildren = this.findInOptions(option.children, searchTerm);
466
+ if (foundInChildren) {
467
+ return foundInChildren;
468
+ }
469
+ }
470
+ }
471
+ return null;
472
+ }
473
+ renderSubOption(option, index) {
474
+ var _a;
475
+ const isSelected = this.persistentSelectedOptions.some(selectedOption => selectedOption.value === option.value);
476
+ const disableCheckbox = !isSelected && this.maxItemCount && this.persistentSelectedOptions.length >= this.maxItemCount;
477
+ const uniqueId = `checkbox-${option.value}-${index}`;
478
+ 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)));
479
+ }
480
+ renderSelectAll() {
481
+ const allSelected = this.persistentSelectedOptions.length === this.optionCount;
482
+ const noneSelected = this.persistentSelectedOptions.length === 0;
483
+ const indeterminate = this.optionCount > 0 && !noneSelected && !allSelected;
484
+ const that = this;
485
+ function toggleSelectAll() {
486
+ if (allSelected) {
487
+ that.clearSelection();
488
+ }
489
+ else {
490
+ that.selectAll();
491
+ }
492
+ }
493
+ function handleSelectAllKeydown(e) {
494
+ if (e.key !== 'ArrowUp' && e.key !== 'ArrowDown')
495
+ e.stopPropagation();
496
+ if (e.key === 'Enter' || e.key === ' ') {
497
+ toggleSelectAll();
498
+ }
499
+ }
500
+ 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));
501
+ }
502
+ render() {
503
+ // Create a label for the selected options
504
+ const selectedOptionsLabels = this.persistentSelectedOptions
505
+ .filter(option => {
506
+ // check if option is a child and its parent is selected
507
+ const isChildSelectedWithParent = this.persistentSelectedOptions.some(parentOption => parentOption.children &&
508
+ parentOption.children.some(child => child.value === option.value) &&
509
+ parentOption.selected);
510
+ return !isChildSelectedWithParent;
511
+ })
512
+ .map(option => option.label)
513
+ .join(', ');
514
+ return (h("div", { class: `ifx-multiselect-container`, ref: el => this.dropdownElement = el }, this.label ?
515
+ h("div", { class: "ifx-label-wrapper" }, h("span", null, this.label)) : null, h("div", { class: `ifx-multiselect-wrapper
516
+ ${this.getSizeClass()}
517
+ ${this.dropdownOpen ? 'active' : ''}
518
+ ${this.dropdownFlipped ? 'is-flipped' : ''}
519
+ ${this.internalError ? 'error' : ""}
520
+ ${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
521
+ ${this.persistentSelectedOptions.length === 0 ? 'placeholder' : ""}
522
+ `, 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 ?
523
+ h("div", { class: "ifx-error-message-wrapper" }, h("span", null, this.internalErrorMessage)) : null));
524
+ }
525
+ static get formAssociated() { return true; }
526
+ get el() { return this; }
527
+ static get watchers() { return {
528
+ "options": ["updateOptions"],
529
+ "error": ["updateInternalError"],
530
+ "errorMessage": ["updateInternalErrorMessage"],
531
+ "loadedOptions": ["loadedOptionsChanged"],
532
+ "persistentSelectedOptions": ["onSelectionChange"]
533
+ }; }
534
+ static get style() { return IfxMultiselectStyle0; }
535
+ }, [65, "ifx-multiselect", {
536
+ "name": [1],
537
+ "options": [1],
538
+ "batchSize": [2, "batch-size"],
539
+ "size": [1],
540
+ "disabled": [4],
541
+ "error": [4],
542
+ "errorMessage": [1, "error-message"],
543
+ "label": [1],
544
+ "placeholder": [1],
545
+ "maxItemCount": [2, "max-item-count"],
546
+ "showSearch": [4, "show-search"],
547
+ "showSelectAll": [4, "show-select-all"],
548
+ "showClearButton": [4, "show-clear-button"],
549
+ "internalError": [32],
550
+ "internalErrorMessage": [32],
551
+ "persistentSelectedOptions": [32],
552
+ "dropdownOpen": [32],
553
+ "dropdownFlipped": [32],
554
+ "isLoading": [32],
555
+ "loadedOptions": [32],
556
+ "filteredOptions": [32],
557
+ "optionCount": [32],
558
+ "optionsProcessed": [32]
559
+ }, undefined, {
560
+ "options": ["updateOptions"],
561
+ "error": ["updateInternalError"],
562
+ "errorMessage": ["updateInternalErrorMessage"],
563
+ "loadedOptions": ["loadedOptionsChanged"],
564
+ "persistentSelectedOptions": ["onSelectionChange"]
565
+ }]);
566
+ Multiselect.globalZIndex = 1000; // This will be shared among all instances of the component.
567
+ function defineCustomElement() {
568
+ if (typeof customElements === "undefined") {
569
+ return;
570
+ }
571
+ const components = ["ifx-multiselect", "ifx-checkbox", "ifx-dropdown-separator", "ifx-icon"];
572
+ components.forEach(tagName => { switch (tagName) {
573
+ case "ifx-multiselect":
574
+ if (!customElements.get(tagName)) {
575
+ customElements.define(tagName, Multiselect);
576
+ }
577
+ break;
578
+ case "ifx-checkbox":
579
+ if (!customElements.get(tagName)) {
580
+ defineCustomElement$3();
581
+ }
582
+ break;
583
+ case "ifx-dropdown-separator":
584
+ if (!customElements.get(tagName)) {
585
+ defineCustomElement$2();
586
+ }
587
+ break;
588
+ case "ifx-icon":
589
+ if (!customElements.get(tagName)) {
590
+ defineCustomElement$1();
591
+ }
592
+ break;
593
+ } });
594
+ }
595
+
596
+ export { Multiselect as M, defineCustomElement as d };
597
+
598
+ //# sourceMappingURL=p-cd833a9b.js.map