igniteui-webcomponents 7.3.0-beta.0 → 7.3.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 (375) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/animations/player.d.ts +7 -2
  3. package/animations/player.js +1 -2
  4. package/animations/player.js.map +1 -1
  5. package/components/accordion/accordion.js +4 -16
  6. package/components/accordion/accordion.js.map +1 -1
  7. package/components/avatar/avatar.d.ts +0 -1
  8. package/components/avatar/avatar.js +5 -9
  9. package/components/avatar/avatar.js.map +1 -1
  10. package/components/badge/badge.d.ts +1 -3
  11. package/components/badge/badge.js +4 -8
  12. package/components/badge/badge.js.map +1 -1
  13. package/components/banner/banner.d.ts +6 -5
  14. package/components/banner/banner.js +19 -17
  15. package/components/banner/banner.js.map +1 -1
  16. package/components/button/button-base.d.ts +1 -1
  17. package/components/button/button-base.js.map +1 -1
  18. package/components/button-group/button-group.d.ts +0 -1
  19. package/components/button-group/button-group.js +12 -17
  20. package/components/button-group/button-group.js.map +1 -1
  21. package/components/calendar/base.d.ts +3 -13
  22. package/components/calendar/base.js +10 -31
  23. package/components/calendar/base.js.map +1 -1
  24. package/components/calendar/calendar.d.ts +2 -2
  25. package/components/calendar/months-view/months-view.d.ts +1 -1
  26. package/components/calendar/months-view/months-view.js.map +1 -1
  27. package/components/carousel/carousel-indicator.d.ts +1 -1
  28. package/components/carousel/carousel-indicator.js +13 -13
  29. package/components/carousel/carousel-indicator.js.map +1 -1
  30. package/components/carousel/carousel-slide.d.ts +0 -2
  31. package/components/carousel/carousel-slide.js +7 -9
  32. package/components/carousel/carousel-slide.js.map +1 -1
  33. package/components/carousel/carousel.d.ts +52 -35
  34. package/components/carousel/carousel.js +136 -122
  35. package/components/carousel/carousel.js.map +1 -1
  36. package/components/carousel/themes/carousel.base.css.js +1 -1
  37. package/components/carousel/themes/carousel.base.css.js.map +1 -1
  38. package/components/chat/chat-input.d.ts +1 -1
  39. package/components/chat/chat-input.js +21 -21
  40. package/components/chat/chat-input.js.map +1 -1
  41. package/components/chat/chat.d.ts +0 -2
  42. package/components/chat/chat.js +6 -12
  43. package/components/chat/chat.js.map +1 -1
  44. package/components/checkbox/checkbox-base.d.ts +1 -1
  45. package/components/checkbox/checkbox.d.ts +3 -5
  46. package/components/checkbox/checkbox.js +33 -44
  47. package/components/checkbox/checkbox.js.map +1 -1
  48. package/components/checkbox/switch.d.ts +1 -1
  49. package/components/checkbox/switch.js +23 -34
  50. package/components/checkbox/switch.js.map +1 -1
  51. package/components/chip/chip.d.ts +1 -14
  52. package/components/chip/chip.js +12 -33
  53. package/components/chip/chip.js.map +1 -1
  54. package/components/color-picker/color-picker.d.ts +261 -0
  55. package/components/color-picker/color-picker.js +620 -0
  56. package/components/color-picker/color-picker.js.map +1 -0
  57. package/components/color-picker/common.d.ts +37 -0
  58. package/components/color-picker/common.js +55 -0
  59. package/components/color-picker/common.js.map +1 -0
  60. package/components/color-picker/converters.d.ts +18 -0
  61. package/components/color-picker/converters.js +173 -0
  62. package/components/color-picker/converters.js.map +1 -0
  63. package/components/color-picker/model.d.ts +120 -0
  64. package/components/color-picker/model.js +174 -0
  65. package/components/color-picker/model.js.map +1 -0
  66. package/components/color-picker/picker-canvas.d.ts +95 -0
  67. package/components/color-picker/picker-canvas.js +154 -0
  68. package/components/color-picker/picker-canvas.js.map +1 -0
  69. package/components/color-picker/themes/color-picker.base.css.d.ts +1 -0
  70. package/components/color-picker/themes/color-picker.base.css.js +3 -0
  71. package/components/color-picker/themes/color-picker.base.css.js.map +1 -0
  72. package/components/color-picker/themes/dark/color-picker.bootstrap.css.d.ts +1 -0
  73. package/components/color-picker/themes/dark/color-picker.bootstrap.css.js +3 -0
  74. package/components/color-picker/themes/dark/color-picker.bootstrap.css.js.map +1 -0
  75. package/components/color-picker/themes/dark/color-picker.fluent.css.d.ts +1 -0
  76. package/components/color-picker/themes/dark/color-picker.fluent.css.js +3 -0
  77. package/components/color-picker/themes/dark/color-picker.fluent.css.js.map +1 -0
  78. package/components/color-picker/themes/dark/color-picker.indigo.css.d.ts +1 -0
  79. package/components/color-picker/themes/dark/color-picker.indigo.css.js +3 -0
  80. package/components/color-picker/themes/dark/color-picker.indigo.css.js.map +1 -0
  81. package/components/color-picker/themes/dark/color-picker.material.css.d.ts +1 -0
  82. package/components/color-picker/themes/dark/color-picker.material.css.js +3 -0
  83. package/components/color-picker/themes/dark/color-picker.material.css.js.map +1 -0
  84. package/components/color-picker/themes/light/color-picker.bootstrap.css.d.ts +1 -0
  85. package/components/color-picker/themes/light/color-picker.bootstrap.css.js +3 -0
  86. package/components/color-picker/themes/light/color-picker.bootstrap.css.js.map +1 -0
  87. package/components/color-picker/themes/light/color-picker.fluent.css.d.ts +1 -0
  88. package/components/color-picker/themes/light/color-picker.fluent.css.js +3 -0
  89. package/components/color-picker/themes/light/color-picker.fluent.css.js.map +1 -0
  90. package/components/color-picker/themes/light/color-picker.indigo.css.d.ts +1 -0
  91. package/components/color-picker/themes/light/color-picker.indigo.css.js +3 -0
  92. package/components/color-picker/themes/light/color-picker.indigo.css.js.map +1 -0
  93. package/components/color-picker/themes/light/color-picker.material.css.d.ts +1 -0
  94. package/components/color-picker/themes/light/color-picker.material.css.js +3 -0
  95. package/components/color-picker/themes/light/color-picker.material.css.js.map +1 -0
  96. package/components/color-picker/themes/light/color-picker.shared.css.d.ts +1 -0
  97. package/components/color-picker/themes/light/color-picker.shared.css.js +3 -0
  98. package/components/color-picker/themes/light/color-picker.shared.css.js.map +1 -0
  99. package/components/color-picker/themes/picker-canvas.base.css.d.ts +1 -0
  100. package/components/color-picker/themes/picker-canvas.base.css.js +3 -0
  101. package/components/color-picker/themes/picker-canvas.base.css.js.map +1 -0
  102. package/components/color-picker/themes/shared/color-picker.bootstrap.css.d.ts +1 -0
  103. package/components/color-picker/themes/shared/color-picker.bootstrap.css.js +3 -0
  104. package/components/color-picker/themes/shared/color-picker.bootstrap.css.js.map +1 -0
  105. package/components/color-picker/themes/shared/color-picker.common.css.d.ts +1 -0
  106. package/components/color-picker/themes/shared/color-picker.common.css.js +3 -0
  107. package/components/color-picker/themes/shared/color-picker.common.css.js.map +1 -0
  108. package/components/color-picker/themes/shared/color-picker.fluent.css.d.ts +1 -0
  109. package/components/color-picker/themes/shared/color-picker.fluent.css.js +3 -0
  110. package/components/color-picker/themes/shared/color-picker.fluent.css.js.map +1 -0
  111. package/components/color-picker/themes/shared/color-picker.indigo.css.d.ts +1 -0
  112. package/components/color-picker/themes/shared/color-picker.indigo.css.js +3 -0
  113. package/components/color-picker/themes/shared/color-picker.indigo.css.js.map +1 -0
  114. package/components/color-picker/themes/shared/color-picker.material.css.d.ts +1 -0
  115. package/components/color-picker/themes/shared/color-picker.material.css.js +3 -0
  116. package/components/color-picker/themes/shared/color-picker.material.css.js.map +1 -0
  117. package/components/color-picker/themes/themes.d.ts +2 -0
  118. package/components/color-picker/themes/themes.js +50 -0
  119. package/components/color-picker/themes/themes.js.map +1 -0
  120. package/components/color-picker/validators.d.ts +3 -0
  121. package/components/color-picker/validators.js +5 -0
  122. package/components/color-picker/validators.js.map +1 -0
  123. package/components/combo/combo-item.d.ts +1 -3
  124. package/components/combo/combo-item.js +5 -12
  125. package/components/combo/combo-item.js.map +1 -1
  126. package/components/combo/combo.d.ts +7 -20
  127. package/components/combo/combo.js +59 -81
  128. package/components/combo/combo.js.map +1 -1
  129. package/components/date-picker/date-picker.base.d.ts +12 -9
  130. package/components/date-picker/date-picker.base.js +24 -31
  131. package/components/date-picker/date-picker.base.js.map +1 -1
  132. package/components/date-picker/date-picker.d.ts +1 -1
  133. package/components/date-picker/date-picker.js +3 -5
  134. package/components/date-picker/date-picker.js.map +1 -1
  135. package/components/date-range-picker/date-range-input.d.ts +2 -4
  136. package/components/date-range-picker/date-range-input.js +6 -37
  137. package/components/date-range-picker/date-range-input.js.map +1 -1
  138. package/components/date-range-picker/date-range-picker.d.ts +2 -5
  139. package/components/date-range-picker/date-range-picker.js +15 -28
  140. package/components/date-range-picker/date-range-picker.js.map +1 -1
  141. package/components/date-range-picker/predefined-ranges-area.d.ts +2 -2
  142. package/components/date-range-picker/predefined-ranges-area.js +4 -6
  143. package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
  144. package/components/date-range-picker/validators.d.ts +1 -1
  145. package/components/date-range-picker/validators.js +5 -18
  146. package/components/date-range-picker/validators.js.map +1 -1
  147. package/components/date-time-input/date-part.d.ts +2 -1
  148. package/components/date-time-input/date-part.js +38 -75
  149. package/components/date-time-input/date-part.js.map +1 -1
  150. package/components/date-time-input/date-time-input.base.d.ts +31 -12
  151. package/components/date-time-input/date-time-input.base.js +43 -11
  152. package/components/date-time-input/date-time-input.base.js.map +1 -1
  153. package/components/date-time-input/date-time-input.d.ts +1 -3
  154. package/components/date-time-input/date-time-input.js +7 -40
  155. package/components/date-time-input/date-time-input.js.map +1 -1
  156. package/components/date-time-input/datetime-mask-parser.d.ts +8 -0
  157. package/components/date-time-input/datetime-mask-parser.js +8 -8
  158. package/components/date-time-input/datetime-mask-parser.js.map +1 -1
  159. package/components/date-time-input/validators.js +3 -14
  160. package/components/date-time-input/validators.js.map +1 -1
  161. package/components/dialog/dialog.d.ts +6 -7
  162. package/components/dialog/dialog.js +21 -26
  163. package/components/dialog/dialog.js.map +1 -1
  164. package/components/divider/divider.d.ts +1 -4
  165. package/components/divider/divider.js +8 -17
  166. package/components/divider/divider.js.map +1 -1
  167. package/components/dropdown/dropdown-group.js +1 -6
  168. package/components/dropdown/dropdown-group.js.map +1 -1
  169. package/components/expansion-panel/expansion-panel.d.ts +15 -5
  170. package/components/expansion-panel/expansion-panel.js +23 -34
  171. package/components/expansion-panel/expansion-panel.js.map +1 -1
  172. package/components/file-input/file-input.d.ts +2 -14
  173. package/components/file-input/file-input.js +5 -23
  174. package/components/file-input/file-input.js.map +1 -1
  175. package/components/highlight/highlight.d.ts +6 -8
  176. package/components/highlight/highlight.js +12 -20
  177. package/components/highlight/highlight.js.map +1 -1
  178. package/components/icon/icon-references.js +1 -0
  179. package/components/icon/icon-references.js.map +1 -1
  180. package/components/icon/icon.d.ts +1 -1
  181. package/components/icon/internal-icons-lib.js +3 -0
  182. package/components/icon/internal-icons-lib.js.map +1 -1
  183. package/components/icon/registry/types.d.ts +1 -1
  184. package/components/icon/registry/types.js.map +1 -1
  185. package/components/input/input.d.ts +9 -19
  186. package/components/input/input.js +30 -60
  187. package/components/input/input.js.map +1 -1
  188. package/components/input/themes/shared/input.material.css.js +1 -1
  189. package/components/input/themes/shared/input.material.css.js.map +1 -1
  190. package/components/mask-input/mask-input.d.ts +1 -1
  191. package/components/mask-input/mask-input.js +2 -4
  192. package/components/mask-input/mask-input.js.map +1 -1
  193. package/components/nav-drawer/nav-drawer.d.ts +7 -7
  194. package/components/nav-drawer/nav-drawer.js +12 -23
  195. package/components/nav-drawer/nav-drawer.js.map +1 -1
  196. package/components/progress/base.d.ts +4 -7
  197. package/components/progress/base.js +21 -45
  198. package/components/progress/base.js.map +1 -1
  199. package/components/qr-code/qr-code.d.ts +1 -1
  200. package/components/qr-code/qr-code.js +3 -2
  201. package/components/qr-code/qr-code.js.map +1 -1
  202. package/components/qr-code/types.d.ts +1 -1
  203. package/components/qr-code/types.js.map +1 -1
  204. package/components/radio/controller.d.ts +2 -30
  205. package/components/radio/controller.js +8 -94
  206. package/components/radio/controller.js.map +1 -1
  207. package/components/radio/radio.d.ts +5 -5
  208. package/components/radio/radio.js +48 -58
  209. package/components/radio/radio.js.map +1 -1
  210. package/components/radio-group/radio-group.d.ts +1 -2
  211. package/components/radio-group/radio-group.js +2 -9
  212. package/components/radio-group/radio-group.js.map +1 -1
  213. package/components/rating/rating.d.ts +24 -12
  214. package/components/rating/rating.js +79 -73
  215. package/components/rating/rating.js.map +1 -1
  216. package/components/resize-container/default-ghost.js +4 -3
  217. package/components/resize-container/default-ghost.js.map +1 -1
  218. package/components/resize-container/resize-container.d.ts +1 -1
  219. package/components/resize-container/resize-container.js +5 -3
  220. package/components/resize-container/resize-container.js.map +1 -1
  221. package/components/resize-container/resize-controller.js +4 -3
  222. package/components/resize-container/resize-controller.js.map +1 -1
  223. package/components/select/select-group.d.ts +2 -1
  224. package/components/select/select-group.js +7 -11
  225. package/components/select/select-group.js.map +1 -1
  226. package/components/select/select.d.ts +3 -4
  227. package/components/select/select.js +23 -28
  228. package/components/select/select.js.map +1 -1
  229. package/components/slider/range-slider.d.ts +3 -2
  230. package/components/slider/range-slider.js +22 -70
  231. package/components/slider/range-slider.js.map +1 -1
  232. package/components/slider/slider-base.d.ts +9 -6
  233. package/components/slider/slider-base.js +27 -28
  234. package/components/slider/slider-base.js.map +1 -1
  235. package/components/slider/slider.js +9 -5
  236. package/components/slider/slider.js.map +1 -1
  237. package/components/splitter/splitter.d.ts +1 -1
  238. package/components/splitter/splitter.js.map +1 -1
  239. package/components/stepper/step.d.ts +3 -0
  240. package/components/stepper/step.js +9 -5
  241. package/components/stepper/step.js.map +1 -1
  242. package/components/stepper/stepper.d.ts +0 -11
  243. package/components/stepper/stepper.js +21 -86
  244. package/components/stepper/stepper.js.map +1 -1
  245. package/components/tabs/tab.d.ts +1 -1
  246. package/components/tabs/tab.js +6 -5
  247. package/components/tabs/tab.js.map +1 -1
  248. package/components/tabs/tabs.d.ts +1 -5
  249. package/components/tabs/tabs.js +12 -34
  250. package/components/tabs/tabs.js.map +1 -1
  251. package/components/textarea/textarea.d.ts +6 -7
  252. package/components/textarea/textarea.js +3 -10
  253. package/components/textarea/textarea.js.map +1 -1
  254. package/components/theme-provider/theme-provider.d.ts +2 -4
  255. package/components/theme-provider/theme-provider.js +11 -21
  256. package/components/theme-provider/theme-provider.js.map +1 -1
  257. package/components/tile-manager/tile-manager.d.ts +10 -21
  258. package/components/tile-manager/tile-manager.js +43 -74
  259. package/components/tile-manager/tile-manager.js.map +1 -1
  260. package/components/tile-manager/tile.d.ts +10 -18
  261. package/components/tile-manager/tile.js +50 -67
  262. package/components/tile-manager/tile.js.map +1 -1
  263. package/components/tooltip/tooltip.d.ts +4 -7
  264. package/components/tooltip/tooltip.js +20 -28
  265. package/components/tooltip/tooltip.js.map +1 -1
  266. package/components/tree/tree.d.ts +1 -14
  267. package/components/tree/tree.js +5 -23
  268. package/components/tree/tree.js.map +1 -1
  269. package/components/tree/tree.navigation.d.ts +1 -1
  270. package/components/tree/tree.navigation.js.map +1 -1
  271. package/components/types.d.ts +2 -0
  272. package/components/types.js.map +1 -1
  273. package/components/validation-container/validation-container.d.ts +1 -2
  274. package/components/validation-container/validation-container.js.map +1 -1
  275. package/components/virtualization/engine.d.ts +40 -38
  276. package/components/virtualization/engine.js.map +1 -1
  277. package/components/virtualization/types.d.ts +6 -5
  278. package/components/virtualization/types.js.map +1 -1
  279. package/components/virtualization/virtualization.d.ts +94 -80
  280. package/components/virtualization/virtualization.js +10 -2
  281. package/components/virtualization/virtualization.js.map +1 -1
  282. package/custom-elements.json +31948 -26708
  283. package/igniteui-webcomponents.css-data.json +1 -1
  284. package/igniteui-webcomponents.html-data.json +1 -1
  285. package/index.d.ts +1 -0
  286. package/index.js +1 -0
  287. package/index.js.map +1 -1
  288. package/internals/controllers/aria-projection.d.ts +6 -6
  289. package/internals/controllers/aria-projection.js.map +1 -1
  290. package/internals/controllers/context-provider.d.ts +48 -0
  291. package/internals/controllers/context-provider.js +29 -0
  292. package/internals/controllers/context-provider.js.map +1 -0
  293. package/internals/controllers/drag.js +6 -6
  294. package/internals/controllers/drag.js.map +1 -1
  295. package/internals/controllers/gestures.js +3 -0
  296. package/internals/controllers/gestures.js.map +1 -1
  297. package/internals/controllers/group.d.ts +64 -0
  298. package/internals/controllers/group.js +104 -0
  299. package/internals/controllers/group.js.map +1 -0
  300. package/internals/controllers/internals.d.ts +16 -3
  301. package/internals/controllers/internals.js +10 -3
  302. package/internals/controllers/internals.js.map +1 -1
  303. package/internals/controllers/key-bindings.d.ts +6 -0
  304. package/internals/controllers/key-bindings.js +3 -0
  305. package/internals/controllers/key-bindings.js.map +1 -1
  306. package/internals/controllers/roving-focus.d.ts +72 -0
  307. package/internals/controllers/roving-focus.js +61 -0
  308. package/internals/controllers/roving-focus.js.map +1 -0
  309. package/internals/controllers/slot.d.ts +8 -0
  310. package/internals/controllers/slot.js +4 -0
  311. package/internals/controllers/slot.js.map +1 -1
  312. package/internals/controllers/toggle.d.ts +96 -0
  313. package/internals/controllers/toggle.js +65 -0
  314. package/internals/controllers/toggle.js.map +1 -0
  315. package/internals/date/converters.js +2 -5
  316. package/internals/date/converters.js.map +1 -1
  317. package/internals/date/model.d.ts +4 -0
  318. package/internals/date/model.js +6 -0
  319. package/internals/date/model.js.map +1 -1
  320. package/internals/decorators/coerced-property.d.ts +47 -0
  321. package/internals/decorators/coerced-property.js +36 -0
  322. package/internals/decorators/coerced-property.js.map +1 -0
  323. package/internals/definitions/defineAllComponents.js +2 -0
  324. package/internals/definitions/defineAllComponents.js.map +1 -1
  325. package/internals/i18n/i18n-controller.d.ts +22 -3
  326. package/internals/i18n/i18n-controller.js +28 -6
  327. package/internals/i18n/i18n-controller.js.map +1 -1
  328. package/internals/mixins/alert.d.ts +1 -1
  329. package/internals/mixins/alert.js +5 -3
  330. package/internals/mixins/alert.js.map +1 -1
  331. package/internals/mixins/combo-box.d.ts +3 -12
  332. package/internals/mixins/combo-box.js +6 -32
  333. package/internals/mixins/combo-box.js.map +1 -1
  334. package/internals/mixins/forms/associated.js +18 -0
  335. package/internals/mixins/forms/associated.js.map +1 -1
  336. package/internals/mixins/forms/types.d.ts +20 -1
  337. package/internals/mixins/forms/types.js.map +1 -1
  338. package/internals/mixins/i18n.d.ts +31 -0
  339. package/internals/mixins/i18n.js +36 -0
  340. package/internals/mixins/i18n.js.map +1 -0
  341. package/internals/mixins/mask-behavior.d.ts +6 -5
  342. package/internals/mixins/mask-behavior.js +1 -2
  343. package/internals/mixins/mask-behavior.js.map +1 -1
  344. package/internals/mixins/option.js +4 -2
  345. package/internals/mixins/option.js.map +1 -1
  346. package/internals/templates/masked-input.d.ts +1 -1
  347. package/internals/templates/masked-input.js.map +1 -1
  348. package/internals/templates/slotted-icon.d.ts +32 -0
  349. package/internals/templates/slotted-icon.js +19 -0
  350. package/internals/templates/slotted-icon.js.map +1 -0
  351. package/internals/templates/toggle-shell.d.ts +46 -0
  352. package/internals/templates/toggle-shell.js +38 -0
  353. package/internals/templates/toggle-shell.js.map +1 -0
  354. package/internals/timing.d.ts +32 -0
  355. package/internals/timing.js +20 -0
  356. package/internals/timing.js.map +1 -0
  357. package/internals/utils/arrays.d.ts +2 -2
  358. package/internals/utils/arrays.js.map +1 -1
  359. package/internals/utils/dom.d.ts +22 -0
  360. package/internals/utils/dom.js +15 -1
  361. package/internals/utils/dom.js.map +1 -1
  362. package/internals/utils/math.d.ts +1 -1
  363. package/internals/utils/math.js.map +1 -1
  364. package/internals/utils/types.d.ts +1 -1
  365. package/internals/utils/types.js.map +1 -1
  366. package/internals/validators.d.ts +23 -0
  367. package/internals/validators.js +21 -0
  368. package/internals/validators.js.map +1 -1
  369. package/package.json +3 -1
  370. package/theming/theming-controller.d.ts +3 -3
  371. package/theming/theming-controller.js.map +1 -1
  372. package/web-types.json +2 -2
  373. package/internals/decorators/watch.d.ts +0 -5
  374. package/internals/decorators/watch.js +0 -19
  375. package/internals/decorators/watch.js.map +0 -1
@@ -15,14 +15,16 @@ import { addRootClickController } from '#internals/controllers/root-click.js';
15
15
  import { addSlotController, setSlots } from '#internals/controllers/slot.js';
16
16
  import { blazorAdditionalDependencies } from '#internals/decorators/blazorAdditionalDependencies.js';
17
17
  import { blazorIndirectRender } from '#internals/decorators/blazorIndirectRender.js';
18
+ import { coercedProperty } from '#internals/decorators/coerced-property.js';
18
19
  import { shadowOptions } from '#internals/decorators/shadow-options.js';
19
20
  import { registerComponent } from '#internals/definitions/register.js';
20
- import { addI18nController } from '#internals/i18n/i18n-controller.js';
21
21
  import { IgcBaseComboBoxComponent } from '#internals/mixins/combo-box.js';
22
22
  import { EventEmitterMixin } from '#internals/mixins/event-emitter.js';
23
23
  import { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';
24
24
  import { createFormValueState } from '#internals/mixins/forms/form-value.js';
25
+ import { I18nMixin } from '#internals/mixins/i18n.js';
25
26
  import { partMap } from '#internals/part-map.js';
27
+ import { renderSlottedIcon } from '#internals/templates/slotted-icon.js';
26
28
  import { asArray, firstOf, isEmpty } from '#internals/utils/arrays.js';
27
29
  import { addSafeEventListener, getElementFromPath, stopPropagation, } from '#internals/utils/events.js';
28
30
  import { bindIf } from '#internals/utils/lit.js';
@@ -41,7 +43,10 @@ import { styles as shared } from './themes/shared/combo.common.css.js';
41
43
  import { all } from './themes/themes.js';
42
44
  import { comboValidators } from './validators.js';
43
45
  const SLOTS = setSlots('prefix', 'suffix', 'header', 'footer', 'empty', 'helper-text', 'toggle-icon', 'clear-icon', 'value-missing', 'custom-error', 'invalid');
44
- let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMixin(EventEmitterMixin(IgcBaseComboBoxComponent)) {
46
+ const i18n = {
47
+ defaultEN: ComboResourceStringsEN,
48
+ };
49
+ let IgcComboComponent = class IgcComboComponent extends I18nMixin(FormAssociatedRequiredMixin(EventEmitterMixin(IgcBaseComboBoxComponent)), i18n) {
45
50
  static { IgcComboComponent_1 = this; }
46
51
  static { this.tagName = 'igc-combo'; }
47
52
  static { this.styles = [styles, shared]; }
@@ -76,55 +81,19 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
76
81
  ? this.resourceStrings.combo_aria_label_no_options
77
82
  : this.resourceStrings.combo_aria_label_options;
78
83
  }
79
- set data(value) {
80
- this._data = asArray(value);
81
- this._index = undefined;
82
- }
83
- get data() {
84
- return this._data;
85
- }
86
- set singleSelect(value) {
87
- this._singleSelect = Boolean(value);
88
- this._syncSelectionFromValue();
89
- if (this.hasUpdated) {
90
- this._withPristine(() => {
91
- this._activeIndex = -1;
92
- this._searchTerm = '';
93
- this._formValue.setValueAndFormState(this.value);
94
- });
95
- }
96
- }
97
- get singleSelect() {
98
- return this._singleSelect;
99
- }
100
84
  set locale(value) {
101
- this._i18nController.locale = value;
85
+ super.locale = value;
102
86
  this._state.updateLocale(value);
103
87
  }
104
88
  get locale() {
105
- return this._i18nController.locale;
89
+ return super.locale;
106
90
  }
107
91
  set placeholderSearch(value) {
108
92
  this._placeholderSearch = value;
109
93
  }
110
94
  get placeholderSearch() {
111
95
  return (this._placeholderSearch ??
112
- this.resourceStrings.combo_filter_search_placeholder ??
113
- 'Search');
114
- }
115
- set resourceStrings(value) {
116
- this._i18nController.resourceStrings = value;
117
- }
118
- get resourceStrings() {
119
- return this._i18nController.resourceStrings;
120
- }
121
- set valueKey(value) {
122
- this._valueKey = value;
123
- this._displayKey = this._displayKey ?? this._valueKey;
124
- this._index = undefined;
125
- }
126
- get valueKey() {
127
- return this._valueKey;
96
+ this.resourceStrings.combo_filter_search_placeholder);
128
97
  }
129
98
  set displayKey(value) {
130
99
  this._displayKey = value;
@@ -133,7 +102,7 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
133
102
  }
134
103
  }
135
104
  get displayKey() {
136
- return this._displayKey ?? this._valueKey;
105
+ return this._displayKey ?? this.valueKey;
137
106
  }
138
107
  set filteringOptions(value) {
139
108
  this._filteringOptions = { ...this._filteringOptions, ...value };
@@ -141,13 +110,6 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
141
110
  get filteringOptions() {
142
111
  return this._filteringOptions;
143
112
  }
144
- set disableFiltering(value) {
145
- this._disableFiltering = value;
146
- this._searchTerm = '';
147
- }
148
- get disableFiltering() {
149
- return this._disableFiltering;
150
- }
151
113
  set value(items) {
152
114
  this._formValue.setValueAndFormState(items);
153
115
  this._syncSelectionFromValue();
@@ -167,9 +129,6 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
167
129
  this._rootClickController = addRootClickController(this, {
168
130
  onHide: this._handleClosing,
169
131
  });
170
- this._i18nController = addI18nController(this, {
171
- defaultEN: ComboResourceStringsEN,
172
- });
173
132
  this._formValue = createFormValueState(this, {
174
133
  initialValue: [],
175
134
  transformers: {
@@ -206,10 +165,7 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
206
165
  clearSelection: () => this._clearSelection(),
207
166
  },
208
167
  });
209
- this._data = [];
210
168
  this._indexSize = 0;
211
- this._disableFiltering = false;
212
- this._singleSelect = false;
213
169
  this._selected = new Set();
214
170
  this._filteringOptions = {
215
171
  filterKey: undefined,
@@ -217,10 +173,14 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
217
173
  matchDiacritics: false,
218
174
  };
219
175
  this._displayValue = '';
176
+ this.data = [];
220
177
  this.outlined = false;
178
+ this.singleSelect = false;
221
179
  this.autofocusList = false;
180
+ this.valueKey = undefined;
222
181
  this.groupSorting = 'asc';
223
182
  this.caseSensitiveIcon = false;
183
+ this.disableFiltering = false;
224
184
  this.disableClear = false;
225
185
  this.itemTemplate = ({ item }) => html `${this.displayKey ? item[this.displayKey] : item}`;
226
186
  this.groupHeaderTemplate = ({ item }) => html `${this.groupKey && item[this.groupKey]}`;
@@ -571,13 +531,10 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
571
531
  filled: !isEmpty(this.value),
572
532
  })}
573
533
  >
574
- <slot name="toggle-icon">
575
- <igc-icon
576
- name=${this.open ? 'input_collapse' : 'input_expand'}
577
- collection="default"
578
- aria-hidden="true"
579
- ></igc-icon>
580
- </slot>
534
+ ${renderSlottedIcon({
535
+ slot: 'toggle-icon',
536
+ icon: this.open ? 'input_collapse' : 'input_expand',
537
+ })}
581
538
  </span>
582
539
  `;
583
540
  }
@@ -591,13 +548,7 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
591
548
  ?hidden=${this.disableClear || isEmpty(this._selected)}
592
549
  aria-label=${ifDefined(this.resourceStrings.combo_clearItems_placeholder)}
593
550
  >
594
- <slot name="clear-icon">
595
- <igc-icon
596
- name="input_clear"
597
- collection="default"
598
- aria-hidden="true"
599
- ></igc-icon>
600
- </slot>
551
+ ${renderSlottedIcon({ slot: 'clear-icon', icon: 'input_clear' })}
601
552
  </span>
602
553
  `;
603
554
  }
@@ -700,7 +651,7 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
700
651
  `;
701
652
  }
702
653
  _renderHelperText() {
703
- return IgcValidationContainerComponent.create(this, {
654
+ return this._renderValidationContainer({
704
655
  id: 'combo-helper-text',
705
656
  hasHelperText: true,
706
657
  });
@@ -727,14 +678,33 @@ __decorate([
727
678
  state()
728
679
  ], IgcComboComponent.prototype, "_displayValue", void 0);
729
680
  __decorate([
730
- property({ attribute: false })
731
- ], IgcComboComponent.prototype, "data", null);
681
+ property({ attribute: false }),
682
+ coercedProperty({
683
+ transform: ({ value }) => asArray(value),
684
+ onChange: ({ host }) => {
685
+ host._index = undefined;
686
+ },
687
+ })
688
+ ], IgcComboComponent.prototype, "data", void 0);
732
689
  __decorate([
733
690
  property({ type: Boolean, reflect: true })
734
691
  ], IgcComboComponent.prototype, "outlined", void 0);
735
692
  __decorate([
736
- property({ type: Boolean, reflect: true, attribute: 'single-select' })
737
- ], IgcComboComponent.prototype, "singleSelect", null);
693
+ property({ type: Boolean, reflect: true, attribute: 'single-select' }),
694
+ coercedProperty({
695
+ transform: ({ value }) => Boolean(value),
696
+ onChange: ({ host }) => {
697
+ host._syncSelectionFromValue();
698
+ if (host.hasUpdated) {
699
+ host._withPristine(() => {
700
+ host._activeIndex = -1;
701
+ host._searchTerm = '';
702
+ host._formValue.setValueAndFormState(host.value);
703
+ });
704
+ }
705
+ },
706
+ })
707
+ ], IgcComboComponent.prototype, "singleSelect", void 0);
738
708
  __decorate([
739
709
  property({ type: Boolean })
740
710
  ], IgcComboComponent.prototype, "autofocus", void 0);
@@ -754,11 +724,14 @@ __decorate([
754
724
  property({ attribute: 'placeholder-search' })
755
725
  ], IgcComboComponent.prototype, "placeholderSearch", null);
756
726
  __decorate([
757
- property({ attribute: false })
758
- ], IgcComboComponent.prototype, "resourceStrings", null);
759
- __decorate([
760
- property({ attribute: 'value-key' })
761
- ], IgcComboComponent.prototype, "valueKey", null);
727
+ property({ attribute: 'value-key' }),
728
+ coercedProperty({
729
+ onChange: ({ value, host }) => {
730
+ host._displayKey = host._displayKey ?? value;
731
+ host._index = undefined;
732
+ },
733
+ })
734
+ ], IgcComboComponent.prototype, "valueKey", void 0);
762
735
  __decorate([
763
736
  property({ attribute: 'display-key' })
764
737
  ], IgcComboComponent.prototype, "displayKey", null);
@@ -775,8 +748,13 @@ __decorate([
775
748
  property({ type: Boolean, attribute: 'case-sensitive-icon' })
776
749
  ], IgcComboComponent.prototype, "caseSensitiveIcon", void 0);
777
750
  __decorate([
778
- property({ type: Boolean, attribute: 'disable-filtering' })
779
- ], IgcComboComponent.prototype, "disableFiltering", null);
751
+ property({ type: Boolean, attribute: 'disable-filtering' }),
752
+ coercedProperty({
753
+ onChange: ({ host }) => {
754
+ host._searchTerm = '';
755
+ },
756
+ })
757
+ ], IgcComboComponent.prototype, "disableFiltering", void 0);
780
758
  __decorate([
781
759
  property({ type: Boolean, attribute: 'disable-clear' })
782
760
  ], IgcComboComponent.prototype, "disableClear", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"combo.js","sourceRoot":"","sources":["../../../src/components/combo/combo.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EACL,sBAAsB,GAEvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAA4C,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE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AC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;yDAG1D;AAYM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;4DAC7B;AAQjC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;yDAI3D;AAYM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;uDAC5B;AAQrB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;uDAE2B;AAQnD;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;8DAE4B;AAiC3D;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CAQzB;AA7akB,iBAAiB;IAHrC,4BAA4B,CAAC,qCAAqC,CAAC;IACnE,oBAAoB;IACpB,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,iBAAiB,CA2sCrC;eA3sCoB,iBAAiB","sourcesContent":["import {\n ComboResourceStringsEN,\n type IComboResourceStrings,\n} from 'igniteui-i18n-core';\nimport { html, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { addAriaProjector } from '#internals/controllers/aria-projection.js';\nimport { addRootClickController } from '#internals/controllers/root-click.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { blazorAdditionalDependencies } from '#internals/decorators/blazorAdditionalDependencies.js';\nimport { blazorIndirectRender } from '#internals/decorators/blazorIndirectRender.js';\nimport { shadowOptions } from '#internals/decorators/shadow-options.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport { addI18nController } from '#internals/i18n/i18n-controller.js';\nimport { IgcBaseComboBoxComponent } from '#internals/mixins/combo-box.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';\nimport { createFormValueState } from '#internals/mixins/forms/form-value.js';\nimport { partMap } from '#internals/part-map.js';\nimport { asArray, firstOf, isEmpty } from '#internals/utils/arrays.js';\nimport {\n addSafeEventListener,\n getElementFromPath,\n stopPropagation,\n} from '#internals/utils/events.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport type { Validator } from '#internals/validators.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcInputComponent from '../input/input.js';\nimport IgcPopoverComponent from '../popover/popover.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport type { VirtualScrollItemContext } from '../virtualization/types.js';\nimport IgcVirtualScrollComponent from '../virtualization/virtualization.js';\nimport IgcComboHeaderComponent from './combo-header.js';\nimport IgcComboItemComponent from './combo-item.js';\nimport { DataState } from './controllers/data.js';\nimport { ComboNavigationController } from './controllers/navigation.js';\nimport { styles } from './themes/combo.base.css.js';\nimport { styles as shared } from './themes/shared/combo.common.css.js';\nimport { all } from './themes/themes.js';\nimport type {\n ComboItemTemplate,\n ComboRecord,\n ComboRenderFunction,\n ComboValue,\n FilteringOptions,\n GroupingDirection,\n IgcComboChangeEventArgs,\n IgcComboComponentEventMap,\n Item,\n Keys,\n} from './types.js';\nimport { comboValidators } from './validators.js';\n\nconst SLOTS = setSlots(\n 'prefix',\n 'suffix',\n 'header',\n 'footer',\n 'empty',\n 'helper-text',\n 'toggle-icon',\n 'clear-icon',\n 'value-missing',\n 'custom-error',\n 'invalid'\n);\n\n/* blazorSupportsVisualChildren */\n/**\n * The Combo component is similar to the Select component in that it provides a list of options from which the user can make a selection.\n * In contrast to the Select component, the Combo component displays all options in a virtualized list of items,\n * meaning the combo box can simultaneously show thousands of options, where one or more options can be selected.\n * Additionally, users can create custom item templates, allowing for robust data visualization.\n * The Combo component features case-sensitive filtering, grouping, complex data binding, dynamic addition of values and more.\n *\n * @element igc-combo\n *\n * @slot prefix - Renders content before the input of the combo.\n * @slot suffix - Renders content after the input of the combo.\n * @slot header - Renders a container before the list of options of the combo.\n * @slot footer - Renders a container after the list of options of the combo.\n * @slot empty - Renders content when the combo dropdown list has no items/data.\n * @slot helper-text - Renders content below the input of the combo.\n * @slot toggle-icon - Renders content inside the suffix container of the combo.\n * @slot clear-icon - Renders content inside the suffix container of the combo.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcChange - Emitted when the control's selection has changed.\n * @fires igcOpening - Emitted just before the list of options is opened.\n * @fires igcOpened - Emitted after the list of options is opened.\n * @fires igcClosing - Emitter just before the list of options is closed.\n * @fires igcClosed - Emitted after the list of options is closed.\n *\n * @csspart label - The encapsulated text label of the combo.\n * @csspart input - The main input field of the combo.\n * @csspart native-input - The native input of the main input field of the combo.\n * @csspart prefix - The prefix wrapper of the combo.\n * @csspart suffix - The suffix wrapper of the combo.\n * @csspart toggle-icon - The toggle icon wrapper of the combo.\n * @csspart clear-icon - The clear icon wrapper of the combo.\n * @csspart case-icon - The case icon wrapper of the combo.\n * @csspart helper-text - The helper text wrapper of the combo.\n * @csspart search-input - The search input field of the combo.\n * @csspart list-wrapper - The list of options wrapper of the combo.\n * @csspart list - The list of options box of the combo.\n * @csspart item - Represents each item in the list of options of the combo.\n * @csspart group-header - Represents each header in the list of options of the combo.\n * @csspart active - Appended to the item parts list when the item is active of the combo.\n * @csspart selected - Appended to the item parts list when the item is selected of the combo.\n * @csspart checkbox - Represents each checkbox of each list item of the combo.\n * @csspart checkbox-indicator - Represents the checkbox indicator of each list item of the combo.\n * @csspart checked - Appended to checkbox parts list when checkbox is checked in the combo.\n * @csspart header - The container holding the header content of the combo.\n * @csspart footer - The container holding the footer content of the combo.\n * @csspart empty - The container holding the empty content of the combo.\n */\n@blazorAdditionalDependencies('IgcIconComponent, IgcInputComponent')\n@blazorIndirectRender\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcComboComponent<\n T extends object = any,\n> extends FormAssociatedRequiredMixin(\n EventEmitterMixin<\n IgcComboComponentEventMap,\n AbstractConstructor<IgcBaseComboBoxComponent>\n >(IgcBaseComboBoxComponent)\n) {\n public static readonly tagName = 'igc-combo';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcComboComponent,\n IgcIconComponent,\n IgcVirtualScrollComponent,\n IgcComboItemComponent,\n IgcComboHeaderComponent,\n IgcInputComponent,\n IgcPopoverComponent,\n IgcValidationContainerComponent\n );\n }\n\n // #region Internal state and controllers\n\n protected override get __validators(): Validator<IgcComboComponent<T>>[] {\n return comboValidators;\n }\n\n private readonly _slots = addSlotController(this, { slots: SLOTS });\n\n protected override readonly _rootClickController = addRootClickController(\n this,\n {\n onHide: this._handleClosing,\n }\n );\n\n protected readonly _i18nController = addI18nController<IComboResourceStrings>(\n this,\n {\n defaultEN: ComboResourceStringsEN,\n }\n );\n\n protected override readonly _formValue = createFormValueState<\n ComboValue<T>[]\n >(this, {\n initialValue: [],\n transformers: {\n setValue: asArray,\n setDefaultValue: asArray,\n setFormValue: (value) => {\n if (isEmpty(value) || !this.name) {\n return null;\n }\n\n if (this.singleSelect) {\n return String(firstOf(value));\n }\n\n const formData = new FormData();\n\n for (const item of value) {\n formData.append(this.name, String(item));\n }\n\n return formData;\n },\n },\n });\n\n /** The primary input of the combo component. */\n private readonly _inputRef = createRef<IgcInputComponent>();\n\n @query('#combo-helper-text')\n private readonly _helperText!: IgcValidationContainerComponent | null;\n\n /** The search input of the combo component. */\n private readonly _searchRef = createRef<IgcInputComponent>();\n\n /** The combo virtualized dropdown list. */\n private readonly _listRef = createRef<IgcVirtualScrollComponent>();\n\n private readonly _state = new DataState<T>(this);\n private readonly _navigation = new ComboNavigationController(\n this,\n this._state,\n {\n input: this._inputRef,\n search: this._searchRef,\n list: this._listRef,\n interactions: {\n show: () => this._show(true),\n hide: () => this._hide(true),\n toggleSelection: (index: number) => this._toggleSelection(index),\n select: (index: number) => this._selectByIndex(index),\n clearSelection: () => this._clearSelection(),\n },\n }\n );\n\n private _data: T[] = [];\n private _index?: Map<Item<T>, number[]>;\n private _indexSize = 0;\n private _valueKey?: Keys<T>;\n private _displayKey?: Keys<T>;\n private _placeholderSearch?: string;\n private _disableFiltering = false;\n private _singleSelect = false;\n private _selected: Set<T> = new Set();\n // `filterKey` is left unset here - both key fields are still undefined at\n // field-initialization time. The `displayKey` setter fills it in.\n private _filteringOptions: FilteringOptions<T> = {\n filterKey: undefined,\n caseSensitive: false,\n matchDiacritics: false,\n };\n\n @state()\n private set _activeIndex(index: number) {\n this._navigation.active = index;\n this._listRef.value?.requestUpdate();\n }\n\n private get _activeIndex(): number {\n return this._navigation.active;\n }\n\n @state()\n private set _searchTerm(value: string) {\n this._state.searchTerm = value;\n }\n\n private get _searchTerm(): string {\n return this._state.searchTerm;\n }\n\n @state()\n private _displayValue = '';\n\n /** The DOM id of the option rendered at `index` in the current data state. */\n private _itemId(index: number): string {\n const position = index + 1;\n return this.id ? `${this.id}-item-${position}` : `item-${position}`;\n }\n\n /**\n * Derived from {@link _activeIndex} rather than tracked separately, so that it\n * cannot go stale and does not have to be assigned while rendering an item.\n */\n private get _activeDescendant(): string | undefined {\n return this._activeIndex > -1 ? this._itemId(this._activeIndex) : undefined;\n }\n\n private get _mainAriaLabel(): string {\n return isEmpty(this._selected)\n ? this.resourceStrings.combo_aria_label_no_options!\n : this.resourceStrings.combo_aria_label_options!;\n }\n\n // #endregion\n\n //#region Public attributes and properties\n\n /** The data source used to generate the list of options. */\n /* treatAsRef */\n @property({ attribute: false })\n public set data(value: T[]) {\n this._data = asArray(value);\n this._index = undefined;\n }\n\n public get data(): T[] {\n return this._data;\n }\n\n /**\n * Whether the control has an outlined appearance.\n * @attr outlined\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * Enables single selection mode and moves item filtering to the main input.\n * @attr single-select\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'single-select' })\n public set singleSelect(value: boolean) {\n this._singleSelect = Boolean(value);\n this._syncSelectionFromValue();\n\n if (this.hasUpdated) {\n this._withPristine(() => {\n this._activeIndex = -1;\n this._searchTerm = '';\n this._formValue.setValueAndFormState(this.value);\n });\n }\n }\n\n public get singleSelect(): boolean {\n return this._singleSelect;\n }\n\n /**\n * Whether the control should receive focus automatically.\n * @attr autofocus\n */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /**\n * Focuses the list of options when the menu opens.\n * @attr autofocus-list\n * @default false\n */\n @property({ type: Boolean, attribute: 'autofocus-list' })\n public autofocusList = false;\n\n /**\n * Gets/Sets the locale used for getting language, affecting resource strings.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n this._state.updateLocale(value);\n }\n\n public get locale(): string {\n return this._i18nController.locale;\n }\n\n /**\n * The label of the control.\n * @attr label\n */\n @property()\n public label?: string;\n\n /**\n * The placeholder text of the control.\n * @attr placeholder\n */\n @property()\n public placeholder?: string;\n\n /**\n * The placeholder text of the search input.\n * @attr placeholder-search\n */\n @property({ attribute: 'placeholder-search' })\n public set placeholderSearch(value: string | undefined) {\n this._placeholderSearch = value;\n }\n\n public get placeholderSearch(): string {\n return (\n this._placeholderSearch ??\n this.resourceStrings.combo_filter_search_placeholder ??\n 'Search'\n );\n }\n\n /**\n * The resource strings for localization.\n */\n @property({ attribute: false })\n public set resourceStrings(value: IComboResourceStrings) {\n this._i18nController.resourceStrings = value;\n }\n\n public get resourceStrings(): IComboResourceStrings {\n return this._i18nController.resourceStrings;\n }\n\n /**\n * The key in the data source used when selecting items.\n * @attr value-key\n */\n @property({ attribute: 'value-key' })\n public set valueKey(value: Keys<T> | undefined) {\n this._valueKey = value;\n this._displayKey = this._displayKey ?? this._valueKey;\n this._index = undefined;\n }\n\n public get valueKey() {\n return this._valueKey;\n }\n\n /**\n * The key in the data source used to display items in the list.\n * @attr display-key\n */\n @property({ attribute: 'display-key' })\n public set displayKey(value: Keys<T> | undefined) {\n this._displayKey = value;\n if (!this.filteringOptions.filterKey) {\n this.filteringOptions = { filterKey: this.displayKey };\n }\n }\n\n public get displayKey() {\n return this._displayKey ?? this._valueKey;\n }\n\n /**\n * The key in the data source used to group items in the list.\n * @attr group-key\n */\n @property({ attribute: 'group-key' })\n public groupKey?: Keys<T> | string;\n\n /**\n * Sorts the items in each group by ascending or descending order.\n * @attr group-sorting\n * @default \"asc\"\n * @type {\"asc\" | \"desc\" | \"none\"}\n */\n @property({ attribute: 'group-sorting' })\n public groupSorting: GroupingDirection = 'asc';\n\n /**\n * An object that configures the filtering of the combo.\n * @attr filtering-options\n */\n @property({ type: Object, attribute: 'filtering-options' })\n public set filteringOptions(value: Partial<FilteringOptions<T>>) {\n this._filteringOptions = { ...this._filteringOptions, ...value };\n }\n\n public get filteringOptions(): FilteringOptions<T> {\n return this._filteringOptions;\n }\n\n /**\n * Enables the case sensitive search icon in the filtering input.\n * @attr case-sensitive-icon\n * @default false\n */\n @property({ type: Boolean, attribute: 'case-sensitive-icon' })\n public caseSensitiveIcon = false;\n\n /**\n * Disables the filtering of the list of options.\n * @attr disable-filtering\n * @default false\n */\n @property({ type: Boolean, attribute: 'disable-filtering' })\n public set disableFiltering(value: boolean) {\n this._disableFiltering = value;\n this._searchTerm = '';\n }\n\n public get disableFiltering(): boolean {\n return this._disableFiltering;\n }\n\n /**\n * Hides the clear button.\n * @attr disable-clear\n * @default false\n */\n @property({ type: Boolean, attribute: 'disable-clear' })\n public disableClear = false;\n\n /* blazorSuppress */\n /**\n * The template used for the content of each combo item.\n * @type {ComboItemTemplate<T>}\n */\n @property({ attribute: false })\n public itemTemplate: ComboItemTemplate<T> = ({ item }) =>\n html`${this.displayKey ? item[this.displayKey] : item}`;\n\n /* blazorSuppress */\n /**\n * The template used for the content of each combo group header.\n * @type {ComboItemTemplate<T>}\n */\n @property({ attribute: false })\n public groupHeaderTemplate: ComboItemTemplate<T> = ({ item }) =>\n html`${this.groupKey && item[this.groupKey as Keys<T>]}`;\n\n /**\n * Sets the value (selected items). The passed value must be a valid JSON array.\n * If the data source is an array of complex objects, the `valueKey` must be set.\n * Note that when `displayKey` is not explicitly set, it falls back to the value of `valueKey`.\n *\n * @attr value\n *\n * @example\n * ```tsx\n * <igc-combo\n * .data=${[\n * {\n * id: 'BG01',\n * name: 'Sofia'\n * },\n * {\n * id: 'BG02',\n * name: 'Plovdiv'\n * }\n * ]}\n * display-key='name'\n * value-key='id'\n * value='[\"BG01\", \"BG02\"]'>\n * </igc-combo>\n * ```\n */\n /* blazorPrimitiveValue */\n /* blazorByValueArray */\n /* blazorGenericType */\n /* @tsTwoWayProperty (true, \"Change\", \"Detail.NewValue\", false) */\n @property({ type: Array })\n public set value(items: ComboValue<T>[]) {\n this._formValue.setValueAndFormState(items);\n this._syncSelectionFromValue();\n\n if (this.hasUpdated) {\n this._validate();\n }\n }\n\n /**\n * Returns the current selection as a list of comma separated values,\n * represented by the value key, when provided.\n */\n public get value(): ComboValue<T>[] {\n return this._formValue.value;\n }\n\n /**\n * Returns the current selection as an array of objects as provided in the `data` source.\n */\n public get selection(): T[] {\n return Array.from(this._selected);\n }\n\n //#endregion\n\n //#region Life-cycle\n\n constructor() {\n super();\n\n // TODO: Either fix this in the theming controller or come up with another solution.\n // Check virtualization `willUpdate` for more details.\n\n // The virtualized list is rendered into this component's own shadow root\n // (light DOM child), sharing it with the theming controller below. Theme\n // changes re-adopt this shadow root's stylesheets wholesale, which would\n // otherwise silently drop the list's own structural stylesheet since\n // nothing else forces it to refresh. Requesting an update lets the list\n // re-verify (and re-adopt, if needed) its stylesheet on its next render.\n addThemingController(this, all, {\n themeChange: () => this._listRef.value?.requestUpdate(),\n });\n\n // Projects the host's labels and combobox semantics onto the native\n // input inside `igc-input` (see ProjectedARIA for why the host cannot\n // publish these itself). `aria-activedescendant` stays on the listbox,\n // which holds DOM focus while the list is navigated.\n addAriaProjector(this, {\n target: () => this._inputRef.value,\n state: () => ({\n role: 'combobox',\n hasPopup: 'listbox',\n expanded: `${this.open}`,\n disabled: `${this.disabled}`,\n label: this._mainAriaLabel,\n controls: this._listRef.value ? [this._listRef.value] : null,\n describedBy: this._helperText ? [this._helperText] : null,\n labelledBy: this._internals.labels,\n }),\n });\n addSafeEventListener(this, 'blur', this._handleBlur);\n addSafeEventListener(this, 'focusin', this._handleFocusIn);\n }\n\n protected override willUpdate(props: PropertyValues<this>): void {\n if (props.has('open')) {\n this._rootClickController.update();\n }\n\n if (\n props.has('groupKey') ||\n props.has('groupSorting') ||\n props.has('filteringOptions') ||\n props.has('data')\n ) {\n this._state.invalidate();\n }\n\n // When data changes, re-sync selection and form\n // This handles the delayed data scenario where value was set before data\n if (props.has('data') && !isEmpty(this.data) && !isEmpty(this.value)) {\n this._withPristine(() => {\n this._syncSelectionFromValue();\n this._formValue.setValueAndFormState(this.value);\n });\n }\n }\n\n /**\n * Runs `callback`, restoring the pristine flag afterwards.\n *\n * Re-syncing the form value in reaction to a configuration change (as opposed\n * to user interaction) must not count as the control having been dirtied.\n */\n private _withPristine(callback: () => void): void {\n const pristine = this._pristine;\n\n try {\n callback();\n } finally {\n this._pristine = pristine;\n }\n }\n\n //#endregion\n\n // #region Form Associated overrides\n\n protected override _setDefaultValue(current: string | null): void {\n try {\n this.defaultValue = JSON.parse(current || '[]');\n } catch {\n // A malformed `value` attribute keeps the previous default rather than\n // discarding it - see the \"invalid JSON\" form integration test.\n }\n }\n\n // #endregion\n\n //#region Overrides for combo box behavior\n\n protected override async _show(emitEvent = false): Promise<boolean> {\n const [canOpen, _] = await Promise.all([\n super._show(emitEvent),\n this.updateComplete,\n ]);\n\n if (canOpen) {\n if (!this.singleSelect) {\n this._listRef.value?.focus();\n }\n\n if (!this.autofocusList) {\n this._searchRef.value?.focus();\n }\n }\n\n return canOpen;\n }\n\n protected override async _hide(emitEvent = false): Promise<boolean> {\n const [canClose, _] = await Promise.all([\n super._hide(emitEvent),\n this.updateComplete,\n ]);\n\n if (canClose) {\n this._activeIndex = -1;\n }\n\n return canClose;\n }\n\n private _setSingleSelectionDisplayValue(value: string): void {\n if (this.singleSelect && this._inputRef.value) {\n this._inputRef.value.value = value;\n }\n }\n\n //#endregion\n\n // #region Selection helpers\n\n /**\n * Maps every value representation in the data source to the positions of the\n * records carrying it. Built on demand and dropped whenever `data` or\n * `valueKey` changes.\n *\n * Positions (rather than records) are stored so that resolution can hand back\n * matches in data-source order, and duplicate value keys keep resolving to\n * every record that carries them.\n *\n * The size comparison picks up in-place growth or shrink (push/splice) of the\n * same array. Replacing elements without changing the length is not detectable\n * here and still requires reassigning `data`.\n */\n private get _dataIndex(): Map<Item<T>, number[]> {\n if (!this._index || this._indexSize !== this.data.length) {\n this._index = Map.groupBy(this.data.keys(), (position) =>\n this._resolveItemValue(this.data[position])\n );\n this._indexSize = this.data.length;\n }\n\n return this._index;\n }\n\n /**\n * Resolves user-provided items (value keys or object references)\n * to actual objects from the data source, in data-source order.\n *\n * @remarks\n * Repeating the same value in `items` resolves it once - a record cannot be\n * selected twice, and duplicates would otherwise reach the change event\n * payload.\n */\n private _resolveItems(items: Item<T>[]): T[] {\n const index = this._dataIndex;\n const positions = new Set<number>();\n\n for (const item of items) {\n const matches = index.get(item);\n\n if (matches) {\n for (const position of matches) {\n positions.add(position);\n }\n }\n }\n\n return Array.from(positions)\n .sort((a, b) => a - b)\n .map((position) => this.data[position]);\n }\n\n /**\n * Gets the value representation of a data record\n * (its value-key property, or the record itself).\n */\n private _resolveItemValue(record: T): Item<T> {\n return this.valueKey ? record[this.valueKey] : record;\n }\n\n /**\n * Maps data records to their value representations - the `valueKey` property\n * of each, or the record itself when no `valueKey` is set.\n */\n private _toValues(items: Iterable<T>): ComboValue<T>[] {\n const { valueKey } = this;\n const values: ComboValue<T>[] = [];\n\n for (const item of items) {\n values.push((valueKey ? item[valueKey] : undefined) ?? item);\n }\n\n return values;\n }\n\n /**\n * Recomputes {@link _displayValue} from the current selection and returns its\n * value representation, walking the selection once for both projections.\n */\n private _projectSelection(): ComboValue<T>[] {\n const { valueKey, displayKey } = this;\n const values: ComboValue<T>[] = [];\n const display: string[] = [];\n\n for (const item of this._selected) {\n values.push((valueKey ? item[valueKey] : undefined) ?? item);\n display.push(String((displayKey ? item[displayKey] : undefined) ?? item));\n }\n\n this._displayValue = display.join(', ');\n return values;\n }\n\n private _emitSelectionChange(detail: IgcComboChangeEventArgs): boolean {\n return this.emitEvent('igcChange', { cancelable: true, detail });\n }\n\n /**\n * Builds the value the component would have if `resolved` were applied to the\n * current selection. Used as the `newValue` payload of the change event.\n */\n private _previewValue(resolved: T[], selecting: boolean): ComboValue<T>[] {\n if (selecting) {\n return this._toValues(\n this.singleSelect ? resolved : new Set([...resolved, ...this._selected])\n );\n }\n\n const removed = new Set(resolved);\n\n return this._toValues(\n Iterator.from(this._selected).filter((item) => !removed.has(item))\n );\n }\n\n /**\n * Adds the given `items` to, or removes them from, the current selection.\n *\n * An empty collection is a \"select all\" / \"deselect all\" request. Single\n * selection has no \"select all\" - it only resets the current selection.\n *\n * When `emit` is set, the cancellable `igcChange` event is fired *before* any\n * mutation takes place, so cancelling it leaves the selection untouched.\n *\n * @returns Whether the change was committed.\n */\n private _updateSelection(\n items: Item<T> | Item<T>[] | undefined,\n type: 'selection' | 'deselection',\n emit: boolean\n ): boolean {\n const singleSelect = this.singleSelect;\n const selecting = type === 'selection';\n const collection = singleSelect\n ? asArray(items).slice(0, 1)\n : asArray(items);\n\n if (isEmpty(collection)) {\n if (selecting) {\n this._selected = singleSelect ? new Set() : new Set(this.data);\n\n if (singleSelect) {\n this._searchTerm = '';\n }\n } else {\n if (\n emit &&\n !this._emitSelectionChange({\n newValue: [],\n items: this.selection,\n type,\n })\n ) {\n return false;\n }\n\n this._selected.clear();\n }\n\n this.requestUpdate();\n return true;\n }\n\n const resolved = this._resolveItems(collection);\n\n if (\n emit &&\n !this._emitSelectionChange({\n newValue: this._previewValue(resolved, selecting),\n items: resolved,\n type,\n })\n ) {\n return false;\n }\n\n // Past this point the change is committed - only now is it safe to drop\n // the previous single selection and its search term.\n if (selecting && singleSelect) {\n this._selected.clear();\n this._searchTerm = '';\n }\n\n for (const item of resolved) {\n selecting ? this._selected.add(item) : this._selected.delete(item);\n }\n\n this.requestUpdate();\n return true;\n }\n\n /**\n * Syncs the internal `_selected` set from the current `_formValue`.\n * This is a one-way sync: source of truth (_formValue) → view (_selected).\n */\n private _syncSelectionFromValue(): void {\n this._selected.clear();\n\n if (!isEmpty(this._formValue.value)) {\n const values = this.singleSelect\n ? asArray(firstOf(this._formValue.value))\n : this._formValue.value;\n\n if (this.singleSelect && values.length !== this._formValue.value.length) {\n this._formValue.setValueAndFormState(values);\n }\n\n const index = this._dataIndex;\n\n for (const value of values) {\n // First match only - mirrors resolving a value against the data source\n const position = index.get(value)?.[0];\n\n if (position !== undefined) {\n this._selected.add(this.data[position]);\n }\n }\n }\n\n this._projectSelection();\n }\n\n protected _syncValueFromSelection(): void {\n this._formValue.setValueAndFormState(this._projectSelection());\n this._setSingleSelectionDisplayValue(this._displayValue);\n this._validate();\n this._listRef.value?.requestUpdate();\n }\n\n /**\n * The data record rendered at `index`, or undefined when that position holds\n * a group header instead of a selectable option.\n *\n * Guarding on this matters: an unresolvable record would reach\n * {@link _updateSelection} as an empty collection, which reads as\n * \"select everything\".\n */\n private _recordAt(index: number): T | undefined {\n const record = this._state.dataState[index];\n return record && !record.header ? record.value : undefined;\n }\n\n private _toggleSelection(index: number): void {\n const record = this._recordAt(index);\n\n if (!record) {\n return;\n }\n\n this._updateSelection(\n this._resolveItemValue(record),\n this._selected.has(record) ? 'deselection' : 'selection',\n true\n );\n\n this._activeIndex = index;\n this._syncValueFromSelection();\n }\n\n private _selectByIndex(index: number): void {\n const record = this._recordAt(index);\n\n if (!record) {\n return;\n }\n\n this._updateSelection(this._resolveItemValue(record), 'selection', true);\n this._activeIndex = index;\n this._syncValueFromSelection();\n }\n\n private _clearSelection(): void {\n if (this.singleSelect) {\n this._searchTerm = '';\n this._clearSingleSelection();\n } else {\n this._updateSelection([], 'deselection', true);\n }\n this._syncValueFromSelection();\n }\n\n private _clearSingleSelection(): void {\n const [selection] = this._selected;\n\n // The form state is reset directly rather than through\n // `_syncValueFromSelection` so that the text the user is currently typing\n // into the main input is left alone.\n if (\n selection &&\n this._updateSelection(\n this._resolveItemValue(selection),\n 'deselection',\n true\n )\n ) {\n this._formValue.setValueAndFormState([]);\n }\n }\n\n // #endregion\n\n //#region Event handlers\n\n protected async _handleMainInput({\n detail,\n }: CustomEvent<string>): Promise<void> {\n this._setTouchedState();\n void this._show(true);\n\n // In single selection mode the main input doubles as the filtering input,\n // so it is the only place `disableFiltering` can be honored.\n if (!this.disableFiltering) {\n this._searchTerm = detail;\n }\n\n // wait for the dataState to update after filtering\n await this.updateComplete;\n\n this._activeIndex = this._state.firstItemIndex;\n // clear the selection upon typing\n this._clearSingleSelection();\n }\n\n protected _handleFocusIn(): void {\n this._setTouchedState();\n }\n\n protected override _handleBlur(): void {\n if (isEmpty(this._selected)) {\n this._searchTerm = '';\n this._setSingleSelectionDisplayValue('');\n }\n super._handleBlur();\n }\n\n protected _handleSearchInput({ detail }: CustomEvent<string>): void {\n this._searchTerm = detail;\n }\n\n private _handleClosing(): void {\n this._hide(true);\n }\n\n private async _itemClickHandler(event: PointerEvent): Promise<void> {\n const target = getElementFromPath(IgcComboItemComponent.tagName, event);\n\n if (!target) {\n return;\n }\n\n this._setTouchedState();\n this._toggleSelection(target.index);\n\n if (this.singleSelect) {\n this._inputRef.value?.focus();\n await this._hide(true);\n } else {\n this._searchRef.value?.focus();\n }\n }\n\n private _handleClearIconClick(event: PointerEvent): void {\n event.stopPropagation();\n this._clearSelection();\n this._activeIndex = -1;\n }\n\n private _handleCaseSensitivity(): void {\n this.filteringOptions = {\n caseSensitive: !this.filteringOptions.caseSensitive,\n };\n }\n\n //#endregion\n\n //#region Public methods\n\n /* alternateName: focusComponent */\n /** Sets focus on the component. */\n public override focus(options?: FocusOptions): void {\n this._inputRef.value?.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the component. */\n public override blur(): void {\n this._inputRef.value?.blur();\n }\n\n /**\n * Selects option(s) in the list by either reference or valueKey.\n * If not argument is provided all items will be selected.\n * @param { Item<T> | Item<T>[] } items - One or more items to be selected. Multiple items should be passed as an array.\n * When valueKey is specified, the corresponding value should be used in place of the item reference.\n *\n * @example\n * ```typescript\n * const combo<IgcComboComponent<T>> = document.querySelector('igc-combo');\n *\n * // Select one item at a time by reference when valueKey is not specified.\n * combo.select(combo.data[0]);\n *\n * // Select multiple items at a time by reference when valueKey is not specified.\n * combo.select([combo.data[0], combo.data[1]]);\n *\n * // Select one item at a time when valueKey is specified.\n * combo.select('BG01');\n *\n * // Select multiple items at a time when valueKey is specified.\n * combo.select(['BG01', 'BG02']);\n * ```\n */\n public select(items?: Item<T> | Item<T>[]): void {\n this._updateSelection(items, 'selection', false);\n this._syncValueFromSelection();\n }\n\n /**\n * Deselects option(s) in the list by either reference or valueKey.\n * If not argument is provided all items will be deselected.\n * @param { Item<T> | Item<T>[] } items - One or more items to be deselected. Multiple items should be passed as an array.\n * When valueKey is specified, the corresponding value should be used in place of the item reference.\n *\n * @example\n * ```typescript\n * const combo<IgcComboComponent<T>> = document.querySelector('igc-combo');\n *\n * // Deselect one item at a time by reference when valueKey is not specified.\n * combo.deselect(combo.data[0]);\n *\n * // Deselect multiple items at a time by reference when valueKey is not specified.\n * combo.deselect([combo.data[0], combo.data[1]]);\n *\n * // Deselect one item at a time when valueKey is specified.\n * combo.deselect('BG01');\n *\n * // Deselect multiple items at a time when valueKey is specified.\n * combo.deselect(['BG01', 'BG02']);\n * ```\n */\n public deselect(items?: Item<T> | Item<T>[]): void {\n this._updateSelection(items, 'deselection', false);\n this._syncValueFromSelection();\n }\n\n //#endregion\n\n protected _itemRenderer: ComboRenderFunction<T> = (\n context: VirtualScrollItemContext<ComboRecord<T>>\n ) => {\n const { value: item, index } = context;\n\n if (this.groupKey && item.header) {\n return html`\n <igc-combo-header part=\"group-header\">\n ${this.groupHeaderTemplate({ item: item.value })}\n </igc-combo-header>\n `;\n }\n\n const active = this._activeIndex === index;\n const selected = this._selected.has(item.value);\n\n return html`\n <igc-combo-item\n id=${this._itemId(index)}\n part=${partMap({ item: true, selected, active })}\n aria-setsize=${this._state.itemCount}\n aria-posinset=${item.position}\n exportparts=\"checkbox, checkbox-indicator, checked\"\n .index=${index}\n ?active=${active}\n ?selected=${selected}\n ?hide-checkbox=${this.singleSelect}\n >\n ${this.itemTemplate({ item: item.value })}\n </igc-combo-item>\n `;\n };\n\n private _renderToggleIcon() {\n return html`\n <span\n slot=\"suffix\"\n part=${partMap({\n 'toggle-icon': true,\n filled: !isEmpty(this.value),\n })}\n >\n <slot name=\"toggle-icon\">\n <igc-icon\n name=${this.open ? 'input_collapse' : 'input_expand'}\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </span>\n `;\n }\n\n private _renderClearIcon() {\n return html`\n <span\n slot=\"suffix\"\n part=\"clear-icon\"\n role=\"button\"\n @click=${this._handleClearIconClick}\n ?hidden=${this.disableClear || isEmpty(this._selected)}\n aria-label=${ifDefined(\n this.resourceStrings.combo_clearItems_placeholder\n )}\n >\n <slot name=\"clear-icon\">\n <igc-icon\n name=\"input_clear\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </span>\n `;\n }\n\n private _renderMainInput() {\n const hasPrefix = this._slots.hasAssignedElements('prefix');\n const hasSuffix = this._slots.hasAssignedElements('suffix');\n\n return html`\n <igc-input\n ${ref(this._inputRef)}\n id=\"target\"\n slot=\"anchor\"\n exportparts=\"container: input, input: native-input, label, prefix, suffix\"\n @click=${this._handleAnchorClick}\n placeholder=${ifDefined(this.placeholder)}\n label=${ifDefined(this.label)}\n @igcChange=${stopPropagation}\n @igcInput=${this._handleMainInput}\n .value=${this._displayValue}\n .disabled=${this.disabled}\n .required=${this.required}\n .invalid=${this.invalid}\n .outlined=${this.outlined}\n .autofocus=${this.autofocus}\n ?readonly=${!this.singleSelect}\n >\n <span slot=${bindIf(hasPrefix, 'prefix')}>\n <slot name=\"prefix\"></slot>\n </span>\n ${this._renderClearIcon()}\n <span slot=${bindIf(hasSuffix, 'suffix')}>\n <slot name=\"suffix\"></slot>\n </span>\n ${this._renderToggleIcon()}\n </igc-input>\n `;\n }\n\n private _renderSearchInput() {\n return html`\n <div\n part=\"filter-input\"\n ?hidden=${this.disableFiltering || this.singleSelect}\n >\n <igc-input\n ${ref(this._searchRef)}\n .value=${this._searchTerm}\n part=\"search-input\"\n placeholder=${this.placeholderSearch}\n exportparts=\"input: search-input\"\n @igcInput=${this._handleSearchInput}\n >\n <igc-icon\n slot=${bindIf(this.caseSensitiveIcon, 'suffix')}\n name=\"case_sensitive\"\n collection=\"default\"\n part=${partMap({\n 'case-icon': true,\n active: this.filteringOptions.caseSensitive,\n })}\n @click=${this._handleCaseSensitivity}\n ></igc-icon>\n </igc-input>\n </div>\n `;\n }\n\n private _renderEmptyTemplate() {\n return html`\n <div part=\"empty\" ?hidden=${!isEmpty(this._state.dataState)}>\n <slot name=\"empty\">${this.resourceStrings.combo_empty_message}</slot>\n </div>\n `;\n }\n\n private _renderList() {\n return html`\n <div .inert=${!this.open} part=\"list-wrapper\">\n ${this._renderSearchInput()}\n <div part=\"header\">\n <slot name=\"header\"></slot>\n </div>\n <igc-virtual-scroll\n ${ref(this._listRef)}\n aria-multiselectable=${!this.singleSelect}\n id=\"dropdown\"\n part=\"list\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-labelledby=\"target\"\n over-scan=\"15\"\n aria-activedescendant=${ifDefined(this._activeDescendant)}\n .data=${this._state.dataState}\n .itemTemplate=${this._itemRenderer}\n ?hidden=${isEmpty(this._state.dataState)}\n @click=${this._itemClickHandler}\n >\n </igc-virtual-scroll>\n ${this._renderEmptyTemplate()}\n <div part=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n `;\n }\n\n private _renderHelperText(): TemplateResult {\n return IgcValidationContainerComponent.create(this, {\n id: 'combo-helper-text',\n hasHelperText: true,\n });\n }\n\n protected override render() {\n return html`\n <igc-popover ?open=${this.open} flip shift same-width>\n ${this._renderMainInput()} ${this._renderList()}\n </igc-popover>\n ${this._renderHelperText()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-combo': IgcComboComponent<object>;\n }\n}\n"]}
1
+ {"version":3,"file":"combo.js","sourceRoot":"","sources":["../../../src/components/combo/combo.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EACL,sBAAsB,GAEvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAA4C,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,wBAAwB,EAAE,MAA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AAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;8DAE4B;AAiC3D;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CAQzB;AAnZkB,iBAAiB;IAHrC,4BAA4B,CAAC,qCAAqC,CAAC;IACnE,oBAAoB;IACpB,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,iBAAiB,CAwqCrC;eAxqCoB,iBAAiB","sourcesContent":["import {\n ComboResourceStringsEN,\n type IComboResourceStrings,\n} from 'igniteui-i18n-core';\nimport { html, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { addAriaProjector } from '#internals/controllers/aria-projection.js';\nimport { addRootClickController } from '#internals/controllers/root-click.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { blazorAdditionalDependencies } from '#internals/decorators/blazorAdditionalDependencies.js';\nimport { blazorIndirectRender } from '#internals/decorators/blazorIndirectRender.js';\nimport { coercedProperty } from '#internals/decorators/coerced-property.js';\nimport { shadowOptions } from '#internals/decorators/shadow-options.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport type { I18nControllerConfig } from '#internals/i18n/i18n-controller.js';\nimport { IgcBaseComboBoxComponent } from '#internals/mixins/combo-box.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';\nimport { createFormValueState } from '#internals/mixins/forms/form-value.js';\nimport { I18nMixin } from '#internals/mixins/i18n.js';\nimport { partMap } from '#internals/part-map.js';\nimport { renderSlottedIcon } from '#internals/templates/slotted-icon.js';\nimport { asArray, firstOf, isEmpty } from '#internals/utils/arrays.js';\nimport {\n addSafeEventListener,\n getElementFromPath,\n stopPropagation,\n} from '#internals/utils/events.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport type { Validator } from '#internals/validators.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcInputComponent from '../input/input.js';\nimport IgcPopoverComponent from '../popover/popover.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport type { VirtualScrollItemContext } from '../virtualization/types.js';\nimport IgcVirtualScrollComponent from '../virtualization/virtualization.js';\nimport IgcComboHeaderComponent from './combo-header.js';\nimport IgcComboItemComponent from './combo-item.js';\nimport { DataState } from './controllers/data.js';\nimport { ComboNavigationController } from './controllers/navigation.js';\nimport { styles } from './themes/combo.base.css.js';\nimport { styles as shared } from './themes/shared/combo.common.css.js';\nimport { all } from './themes/themes.js';\nimport type {\n ComboItemTemplate,\n ComboRecord,\n ComboRenderFunction,\n ComboValue,\n FilteringOptions,\n GroupingDirection,\n IgcComboChangeEventArgs,\n IgcComboComponentEventMap,\n Item,\n Keys,\n} from './types.js';\nimport { comboValidators } from './validators.js';\n\nconst SLOTS = setSlots(\n 'prefix',\n 'suffix',\n 'header',\n 'footer',\n 'empty',\n 'helper-text',\n 'toggle-icon',\n 'clear-icon',\n 'value-missing',\n 'custom-error',\n 'invalid'\n);\n\nconst i18n: I18nControllerConfig<IComboResourceStrings> = {\n defaultEN: ComboResourceStringsEN,\n};\n\n/* blazorSupportsVisualChildren */\n/**\n * The Combo component is similar to the Select component in that it provides a list of options from which the user can make a selection.\n * In contrast to the Select component, the Combo component displays all options in a virtualized list of items,\n * meaning the combo box can simultaneously show thousands of options, where one or more options can be selected.\n * Additionally, users can create custom item templates, allowing for robust data visualization.\n * The Combo component features case-sensitive filtering, grouping, complex data binding, dynamic addition of values and more.\n *\n * @element igc-combo\n *\n * @slot prefix - Renders content before the input of the combo.\n * @slot suffix - Renders content after the input of the combo.\n * @slot header - Renders a container before the list of options of the combo.\n * @slot footer - Renders a container after the list of options of the combo.\n * @slot empty - Renders content when the combo dropdown list has no items/data.\n * @slot helper-text - Renders content below the input of the combo.\n * @slot toggle-icon - Renders content inside the suffix container of the combo.\n * @slot clear-icon - Renders content inside the suffix container of the combo.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcChange - Emitted when the control's selection has changed.\n * @fires igcOpening - Emitted just before the list of options is opened.\n * @fires igcOpened - Emitted after the list of options is opened.\n * @fires igcClosing - Emitter just before the list of options is closed.\n * @fires igcClosed - Emitted after the list of options is closed.\n *\n * @csspart label - The encapsulated text label of the combo.\n * @csspart input - The main input field of the combo.\n * @csspart native-input - The native input of the main input field of the combo.\n * @csspart prefix - The prefix wrapper of the combo.\n * @csspart suffix - The suffix wrapper of the combo.\n * @csspart toggle-icon - The toggle icon wrapper of the combo.\n * @csspart clear-icon - The clear icon wrapper of the combo.\n * @csspart case-icon - The case icon wrapper of the combo.\n * @csspart helper-text - The helper text wrapper of the combo.\n * @csspart search-input - The search input field of the combo.\n * @csspart list-wrapper - The list of options wrapper of the combo.\n * @csspart list - The list of options box of the combo.\n * @csspart item - Represents each item in the list of options of the combo.\n * @csspart group-header - Represents each header in the list of options of the combo.\n * @csspart active - Appended to the item parts list when the item is active of the combo.\n * @csspart selected - Appended to the item parts list when the item is selected of the combo.\n * @csspart checkbox - Represents each checkbox of each list item of the combo.\n * @csspart checkbox-indicator - Represents the checkbox indicator of each list item of the combo.\n * @csspart checked - Appended to checkbox parts list when checkbox is checked in the combo.\n * @csspart header - The container holding the header content of the combo.\n * @csspart footer - The container holding the footer content of the combo.\n * @csspart empty - The container holding the empty content of the combo.\n */\n@blazorAdditionalDependencies('IgcIconComponent, IgcInputComponent')\n@blazorIndirectRender\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcComboComponent<\n T extends object = any,\n> extends I18nMixin(\n FormAssociatedRequiredMixin(\n EventEmitterMixin<\n IgcComboComponentEventMap,\n AbstractConstructor<IgcBaseComboBoxComponent>\n >(IgcBaseComboBoxComponent)\n ),\n i18n\n) {\n public static readonly tagName = 'igc-combo';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcComboComponent,\n IgcIconComponent,\n IgcVirtualScrollComponent,\n IgcComboItemComponent,\n IgcComboHeaderComponent,\n IgcInputComponent,\n IgcPopoverComponent,\n IgcValidationContainerComponent\n );\n }\n\n // #region Internal state and controllers\n\n protected override get __validators(): Validator<IgcComboComponent<T>>[] {\n return comboValidators;\n }\n\n private readonly _slots = addSlotController(this, { slots: SLOTS });\n\n protected override readonly _rootClickController = addRootClickController(\n this,\n {\n onHide: this._handleClosing,\n }\n );\n\n protected override readonly _formValue = createFormValueState<\n ComboValue<T>[]\n >(this, {\n initialValue: [],\n transformers: {\n setValue: asArray,\n setDefaultValue: asArray,\n setFormValue: (value) => {\n if (isEmpty(value) || !this.name) {\n return null;\n }\n\n if (this.singleSelect) {\n return String(firstOf(value));\n }\n\n const formData = new FormData();\n\n for (const item of value) {\n formData.append(this.name, String(item));\n }\n\n return formData;\n },\n },\n });\n\n /** The primary input of the combo component. */\n private readonly _inputRef = createRef<IgcInputComponent>();\n\n @query('#combo-helper-text')\n private readonly _helperText!: IgcValidationContainerComponent | null;\n\n /** The search input of the combo component. */\n private readonly _searchRef = createRef<IgcInputComponent>();\n\n /** The combo virtualized dropdown list. */\n private readonly _listRef = createRef<IgcVirtualScrollComponent>();\n\n private readonly _state = new DataState<T>(this);\n private readonly _navigation = new ComboNavigationController(\n this,\n this._state,\n {\n input: this._inputRef,\n search: this._searchRef,\n list: this._listRef,\n interactions: {\n show: () => this._show(true),\n hide: () => this._hide(true),\n toggleSelection: (index: number) => this._toggleSelection(index),\n select: (index: number) => this._selectByIndex(index),\n clearSelection: () => this._clearSelection(),\n },\n }\n );\n\n private _index?: Map<Item<T>, number[]>;\n private _indexSize = 0;\n private _displayKey?: Keys<T>;\n private _placeholderSearch?: string;\n private _selected: Set<T> = new Set();\n // `filterKey` is left unset here - both key fields are still undefined at\n // field-initialization time. The `displayKey` setter fills it in.\n private _filteringOptions: FilteringOptions<T> = {\n filterKey: undefined,\n caseSensitive: false,\n matchDiacritics: false,\n };\n\n @state()\n private set _activeIndex(index: number) {\n this._navigation.active = index;\n this._listRef.value?.requestUpdate();\n }\n\n private get _activeIndex(): number {\n return this._navigation.active;\n }\n\n @state()\n private set _searchTerm(value: string) {\n this._state.searchTerm = value;\n }\n\n private get _searchTerm(): string {\n return this._state.searchTerm;\n }\n\n @state()\n private _displayValue = '';\n\n /** The DOM id of the option rendered at `index` in the current data state. */\n private _itemId(index: number): string {\n const position = index + 1;\n return this.id ? `${this.id}-item-${position}` : `item-${position}`;\n }\n\n /**\n * Derived from {@link _activeIndex} rather than tracked separately, so that it\n * cannot go stale and does not have to be assigned while rendering an item.\n */\n private get _activeDescendant(): string | undefined {\n return this._activeIndex > -1 ? this._itemId(this._activeIndex) : undefined;\n }\n\n private get _mainAriaLabel(): string {\n return isEmpty(this._selected)\n ? this.resourceStrings.combo_aria_label_no_options\n : this.resourceStrings.combo_aria_label_options;\n }\n\n // #endregion\n\n //#region Public attributes and properties\n\n /** The data source used to generate the list of options. */\n /* treatAsRef */\n @property({ attribute: false })\n @coercedProperty<T[], IgcComboComponent<T>>({\n transform: ({ value }) => asArray(value),\n onChange: ({ host }) => {\n host._index = undefined;\n },\n })\n public data: T[] = [];\n\n /**\n * Whether the control has an outlined appearance.\n * @attr outlined\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * Enables single selection mode and moves item filtering to the main input.\n * @attr single-select\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'single-select' })\n @coercedProperty<boolean, IgcComboComponent<T>>({\n transform: ({ value }) => Boolean(value),\n onChange: ({ host }) => {\n host._syncSelectionFromValue();\n\n if (host.hasUpdated) {\n host._withPristine(() => {\n host._activeIndex = -1;\n host._searchTerm = '';\n host._formValue.setValueAndFormState(host.value);\n });\n }\n },\n })\n public singleSelect = false;\n\n /**\n * Whether the control should receive focus automatically.\n * @attr autofocus\n */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /**\n * Focuses the list of options when the menu opens.\n * @attr autofocus-list\n * @default false\n */\n @property({ type: Boolean, attribute: 'autofocus-list' })\n public autofocusList = false;\n\n /**\n * The locale used to resolve the component's resource strings.\n * Falls back to the global locale when not set.\n * @attr locale\n */\n @property()\n public override set locale(value: string) {\n super.locale = value;\n this._state.updateLocale(value);\n }\n\n public override get locale(): string {\n return super.locale;\n }\n\n /**\n * The label of the control.\n * @attr label\n */\n @property()\n public label?: string;\n\n /**\n * The placeholder text of the control.\n * @attr placeholder\n */\n @property()\n public placeholder?: string;\n\n /**\n * The placeholder text of the search input.\n * @attr placeholder-search\n */\n @property({ attribute: 'placeholder-search' })\n public set placeholderSearch(value: string | undefined) {\n this._placeholderSearch = value;\n }\n\n public get placeholderSearch(): string {\n return (\n this._placeholderSearch ??\n this.resourceStrings.combo_filter_search_placeholder\n );\n }\n\n /**\n * The key in the data source used when selecting items.\n * @attr value-key\n */\n @property({ attribute: 'value-key' })\n @coercedProperty<Keys<T> | undefined, IgcComboComponent<T>>({\n onChange: ({ value, host }) => {\n host._displayKey = host._displayKey ?? value;\n host._index = undefined;\n },\n })\n public valueKey?: Keys<T> = undefined;\n\n /**\n * The key in the data source used to display items in the list.\n * @attr display-key\n */\n @property({ attribute: 'display-key' })\n public set displayKey(value: Keys<T> | undefined) {\n this._displayKey = value;\n if (!this.filteringOptions.filterKey) {\n this.filteringOptions = { filterKey: this.displayKey };\n }\n }\n\n public get displayKey() {\n return this._displayKey ?? this.valueKey;\n }\n\n /**\n * The key in the data source used to group items in the list.\n * @attr group-key\n */\n @property({ attribute: 'group-key' })\n public groupKey?: Keys<T> | string;\n\n /**\n * Sorts the items in each group by ascending or descending order.\n * @attr group-sorting\n * @default \"asc\"\n * @type {\"asc\" | \"desc\" | \"none\"}\n */\n @property({ attribute: 'group-sorting' })\n public groupSorting: GroupingDirection = 'asc';\n\n /**\n * An object that configures the filtering of the combo.\n * @attr filtering-options\n */\n @property({ type: Object, attribute: 'filtering-options' })\n public set filteringOptions(value: Partial<FilteringOptions<T>>) {\n this._filteringOptions = { ...this._filteringOptions, ...value };\n }\n\n public get filteringOptions(): FilteringOptions<T> {\n return this._filteringOptions;\n }\n\n /**\n * Enables the case sensitive search icon in the filtering input.\n * @attr case-sensitive-icon\n * @default false\n */\n @property({ type: Boolean, attribute: 'case-sensitive-icon' })\n public caseSensitiveIcon = false;\n\n /**\n * Disables the filtering of the list of options.\n * @attr disable-filtering\n * @default false\n */\n @property({ type: Boolean, attribute: 'disable-filtering' })\n @coercedProperty<boolean, IgcComboComponent<T>>({\n onChange: ({ host }) => {\n host._searchTerm = '';\n },\n })\n public disableFiltering = false;\n\n /**\n * Hides the clear button.\n * @attr disable-clear\n * @default false\n */\n @property({ type: Boolean, attribute: 'disable-clear' })\n public disableClear = false;\n\n /* blazorSuppress */\n /**\n * The template used for the content of each combo item.\n * @type {ComboItemTemplate<T>}\n */\n @property({ attribute: false })\n public itemTemplate: ComboItemTemplate<T> = ({ item }) =>\n html`${this.displayKey ? item[this.displayKey] : item}`;\n\n /* blazorSuppress */\n /**\n * The template used for the content of each combo group header.\n * @type {ComboItemTemplate<T>}\n */\n @property({ attribute: false })\n public groupHeaderTemplate: ComboItemTemplate<T> = ({ item }) =>\n html`${this.groupKey && item[this.groupKey as Keys<T>]}`;\n\n /**\n * Sets the value (selected items). The passed value must be a valid JSON array.\n * If the data source is an array of complex objects, the `valueKey` must be set.\n * Note that when `displayKey` is not explicitly set, it falls back to the value of `valueKey`.\n *\n * @attr value\n *\n * @example\n * ```tsx\n * <igc-combo\n * .data=${[\n * {\n * id: 'BG01',\n * name: 'Sofia'\n * },\n * {\n * id: 'BG02',\n * name: 'Plovdiv'\n * }\n * ]}\n * display-key='name'\n * value-key='id'\n * value='[\"BG01\", \"BG02\"]'>\n * </igc-combo>\n * ```\n */\n /* blazorPrimitiveValue */\n /* blazorByValueArray */\n /* blazorGenericType */\n /* @tsTwoWayProperty (true, \"Change\", \"Detail.NewValue\", false) */\n @property({ type: Array })\n public set value(items: ComboValue<T>[]) {\n this._formValue.setValueAndFormState(items);\n this._syncSelectionFromValue();\n\n if (this.hasUpdated) {\n this._validate();\n }\n }\n\n /**\n * Returns the current selection as a list of comma separated values,\n * represented by the value key, when provided.\n */\n public get value(): ComboValue<T>[] {\n return this._formValue.value;\n }\n\n /**\n * Returns the current selection as an array of objects as provided in the `data` source.\n */\n public get selection(): T[] {\n return Array.from(this._selected);\n }\n\n //#endregion\n\n //#region Life-cycle\n\n constructor() {\n super();\n\n // TODO: Either fix this in the theming controller or come up with another solution.\n // Check virtualization `willUpdate` for more details.\n\n // The virtualized list is rendered into this component's own shadow root\n // (light DOM child), sharing it with the theming controller below. Theme\n // changes re-adopt this shadow root's stylesheets wholesale, which would\n // otherwise silently drop the list's own structural stylesheet since\n // nothing else forces it to refresh. Requesting an update lets the list\n // re-verify (and re-adopt, if needed) its stylesheet on its next render.\n addThemingController(this, all, {\n themeChange: () => this._listRef.value?.requestUpdate(),\n });\n\n // Projects the host's labels and combobox semantics onto the native\n // input inside `igc-input` (see ProjectedARIA for why the host cannot\n // publish these itself). `aria-activedescendant` stays on the listbox,\n // which holds DOM focus while the list is navigated.\n addAriaProjector(this, {\n target: () => this._inputRef.value,\n state: () => ({\n role: 'combobox',\n hasPopup: 'listbox',\n expanded: `${this.open}`,\n disabled: `${this.disabled}`,\n label: this._mainAriaLabel,\n controls: this._listRef.value ? [this._listRef.value] : null,\n describedBy: this._helperText ? [this._helperText] : null,\n labelledBy: this._internals.labels,\n }),\n });\n addSafeEventListener(this, 'blur', this._handleBlur);\n addSafeEventListener(this, 'focusin', this._handleFocusIn);\n }\n\n protected override willUpdate(props: PropertyValues<this>): void {\n if (props.has('open')) {\n this._rootClickController.update();\n }\n\n if (\n props.has('groupKey') ||\n props.has('groupSorting') ||\n props.has('filteringOptions') ||\n props.has('data')\n ) {\n this._state.invalidate();\n }\n\n // When data changes, re-sync selection and form\n // This handles the delayed data scenario where value was set before data\n if (props.has('data') && !isEmpty(this.data) && !isEmpty(this.value)) {\n this._withPristine(() => {\n this._syncSelectionFromValue();\n this._formValue.setValueAndFormState(this.value);\n });\n }\n }\n\n /**\n * Runs `callback`, restoring the pristine flag afterwards.\n *\n * Re-syncing the form value in reaction to a configuration change (as opposed\n * to user interaction) must not count as the control having been dirtied.\n */\n private _withPristine(callback: () => void): void {\n const pristine = this._pristine;\n\n try {\n callback();\n } finally {\n this._pristine = pristine;\n }\n }\n\n //#endregion\n\n // #region Form Associated overrides\n\n protected override _setDefaultValue(current: string | null): void {\n try {\n this.defaultValue = JSON.parse(current || '[]');\n } catch {\n // A malformed `value` attribute keeps the previous default rather than\n // discarding it - see the \"invalid JSON\" form integration test.\n }\n }\n\n // #endregion\n\n //#region Overrides for combo box behavior\n\n protected override async _show(emitEvent = false): Promise<boolean> {\n const [canOpen, _] = await Promise.all([\n super._show(emitEvent),\n this.updateComplete,\n ]);\n\n if (canOpen) {\n if (!this.singleSelect) {\n this._listRef.value?.focus();\n }\n\n if (!this.autofocusList) {\n this._searchRef.value?.focus();\n }\n }\n\n return canOpen;\n }\n\n protected override async _hide(emitEvent = false): Promise<boolean> {\n const [canClose, _] = await Promise.all([\n super._hide(emitEvent),\n this.updateComplete,\n ]);\n\n if (canClose) {\n this._activeIndex = -1;\n }\n\n return canClose;\n }\n\n private _setSingleSelectionDisplayValue(value: string): void {\n if (this.singleSelect && this._inputRef.value) {\n this._inputRef.value.value = value;\n }\n }\n\n //#endregion\n\n // #region Selection helpers\n\n /**\n * Maps every value representation in the data source to the positions of the\n * records carrying it. Built on demand and dropped whenever `data` or\n * `valueKey` changes.\n *\n * Positions (rather than records) are stored so that resolution can hand back\n * matches in data-source order, and duplicate value keys keep resolving to\n * every record that carries them.\n *\n * The size comparison picks up in-place growth or shrink (push/splice) of the\n * same array. Replacing elements without changing the length is not detectable\n * here and still requires reassigning `data`.\n */\n private get _dataIndex(): Map<Item<T>, number[]> {\n if (!this._index || this._indexSize !== this.data.length) {\n this._index = Map.groupBy(this.data.keys(), (position) =>\n this._resolveItemValue(this.data[position])\n );\n this._indexSize = this.data.length;\n }\n\n return this._index;\n }\n\n /**\n * Resolves user-provided items (value keys or object references)\n * to actual objects from the data source, in data-source order.\n *\n * @remarks\n * Repeating the same value in `items` resolves it once - a record cannot be\n * selected twice, and duplicates would otherwise reach the change event\n * payload.\n */\n private _resolveItems(items: Item<T>[]): T[] {\n const index = this._dataIndex;\n const positions = new Set<number>();\n\n for (const item of items) {\n const matches = index.get(item);\n\n if (matches) {\n for (const position of matches) {\n positions.add(position);\n }\n }\n }\n\n return Array.from(positions)\n .sort((a, b) => a - b)\n .map((position) => this.data[position]);\n }\n\n /**\n * Gets the value representation of a data record\n * (its value-key property, or the record itself).\n */\n private _resolveItemValue(record: T): Item<T> {\n return this.valueKey ? record[this.valueKey] : record;\n }\n\n /**\n * Maps data records to their value representations - the `valueKey` property\n * of each, or the record itself when no `valueKey` is set.\n */\n private _toValues(items: Iterable<T>): ComboValue<T>[] {\n const { valueKey } = this;\n const values: ComboValue<T>[] = [];\n\n for (const item of items) {\n values.push((valueKey ? item[valueKey] : undefined) ?? item);\n }\n\n return values;\n }\n\n /**\n * Recomputes {@link _displayValue} from the current selection and returns its\n * value representation, walking the selection once for both projections.\n */\n private _projectSelection(): ComboValue<T>[] {\n const { valueKey, displayKey } = this;\n const values: ComboValue<T>[] = [];\n const display: string[] = [];\n\n for (const item of this._selected) {\n values.push((valueKey ? item[valueKey] : undefined) ?? item);\n display.push(String((displayKey ? item[displayKey] : undefined) ?? item));\n }\n\n this._displayValue = display.join(', ');\n return values;\n }\n\n private _emitSelectionChange(detail: IgcComboChangeEventArgs): boolean {\n return this.emitEvent('igcChange', { cancelable: true, detail });\n }\n\n /**\n * Builds the value the component would have if `resolved` were applied to the\n * current selection. Used as the `newValue` payload of the change event.\n */\n private _previewValue(resolved: T[], selecting: boolean): ComboValue<T>[] {\n if (selecting) {\n return this._toValues(\n this.singleSelect ? resolved : new Set([...resolved, ...this._selected])\n );\n }\n\n const removed = new Set(resolved);\n\n return this._toValues(\n Iterator.from(this._selected).filter((item) => !removed.has(item))\n );\n }\n\n /**\n * Adds the given `items` to, or removes them from, the current selection.\n *\n * An empty collection is a \"select all\" / \"deselect all\" request. Single\n * selection has no \"select all\" - it only resets the current selection.\n *\n * When `emit` is set, the cancellable `igcChange` event is fired *before* any\n * mutation takes place, so cancelling it leaves the selection untouched.\n *\n * @returns Whether the change was committed.\n */\n private _updateSelection(\n items: Item<T> | Item<T>[] | undefined,\n type: 'selection' | 'deselection',\n emit: boolean\n ): boolean {\n const singleSelect = this.singleSelect;\n const selecting = type === 'selection';\n const collection = singleSelect\n ? asArray(items).slice(0, 1)\n : asArray(items);\n\n if (isEmpty(collection)) {\n if (selecting) {\n this._selected = singleSelect ? new Set() : new Set(this.data);\n\n if (singleSelect) {\n this._searchTerm = '';\n }\n } else {\n if (\n emit &&\n !this._emitSelectionChange({\n newValue: [],\n items: this.selection,\n type,\n })\n ) {\n return false;\n }\n\n this._selected.clear();\n }\n\n this.requestUpdate();\n return true;\n }\n\n const resolved = this._resolveItems(collection);\n\n if (\n emit &&\n !this._emitSelectionChange({\n newValue: this._previewValue(resolved, selecting),\n items: resolved,\n type,\n })\n ) {\n return false;\n }\n\n // Past this point the change is committed - only now is it safe to drop\n // the previous single selection and its search term.\n if (selecting && singleSelect) {\n this._selected.clear();\n this._searchTerm = '';\n }\n\n for (const item of resolved) {\n selecting ? this._selected.add(item) : this._selected.delete(item);\n }\n\n this.requestUpdate();\n return true;\n }\n\n /**\n * Syncs the internal `_selected` set from the current `_formValue`.\n * This is a one-way sync: source of truth (_formValue) → view (_selected).\n */\n private _syncSelectionFromValue(): void {\n this._selected.clear();\n\n if (!isEmpty(this._formValue.value)) {\n const values = this.singleSelect\n ? asArray(firstOf(this._formValue.value))\n : this._formValue.value;\n\n if (this.singleSelect && values.length !== this._formValue.value.length) {\n this._formValue.setValueAndFormState(values);\n }\n\n const index = this._dataIndex;\n\n for (const value of values) {\n // First match only - mirrors resolving a value against the data source\n const position = index.get(value)?.[0];\n\n if (position !== undefined) {\n this._selected.add(this.data[position]);\n }\n }\n }\n\n this._projectSelection();\n }\n\n protected _syncValueFromSelection(): void {\n this._formValue.setValueAndFormState(this._projectSelection());\n this._setSingleSelectionDisplayValue(this._displayValue);\n this._validate();\n this._listRef.value?.requestUpdate();\n }\n\n /**\n * The data record rendered at `index`, or undefined when that position holds\n * a group header instead of a selectable option.\n *\n * Guarding on this matters: an unresolvable record would reach\n * {@link _updateSelection} as an empty collection, which reads as\n * \"select everything\".\n */\n private _recordAt(index: number): T | undefined {\n const record = this._state.dataState[index];\n return record && !record.header ? record.value : undefined;\n }\n\n private _toggleSelection(index: number): void {\n const record = this._recordAt(index);\n\n if (!record) {\n return;\n }\n\n this._updateSelection(\n this._resolveItemValue(record),\n this._selected.has(record) ? 'deselection' : 'selection',\n true\n );\n\n this._activeIndex = index;\n this._syncValueFromSelection();\n }\n\n private _selectByIndex(index: number): void {\n const record = this._recordAt(index);\n\n if (!record) {\n return;\n }\n\n this._updateSelection(this._resolveItemValue(record), 'selection', true);\n this._activeIndex = index;\n this._syncValueFromSelection();\n }\n\n private _clearSelection(): void {\n if (this.singleSelect) {\n this._searchTerm = '';\n this._clearSingleSelection();\n } else {\n this._updateSelection([], 'deselection', true);\n }\n this._syncValueFromSelection();\n }\n\n private _clearSingleSelection(): void {\n const [selection] = this._selected;\n\n // The form state is reset directly rather than through\n // `_syncValueFromSelection` so that the text the user is currently typing\n // into the main input is left alone.\n if (\n selection &&\n this._updateSelection(\n this._resolveItemValue(selection),\n 'deselection',\n true\n )\n ) {\n this._formValue.setValueAndFormState([]);\n }\n }\n\n // #endregion\n\n //#region Event handlers\n\n protected async _handleMainInput({\n detail,\n }: CustomEvent<string>): Promise<void> {\n this._setTouchedState();\n void this._show(true);\n\n // In single selection mode the main input doubles as the filtering input,\n // so it is the only place `disableFiltering` can be honored.\n if (!this.disableFiltering) {\n this._searchTerm = detail;\n }\n\n // wait for the dataState to update after filtering\n await this.updateComplete;\n\n this._activeIndex = this._state.firstItemIndex;\n // clear the selection upon typing\n this._clearSingleSelection();\n }\n\n protected _handleFocusIn(): void {\n this._setTouchedState();\n }\n\n protected override _handleBlur(): void {\n if (isEmpty(this._selected)) {\n this._searchTerm = '';\n this._setSingleSelectionDisplayValue('');\n }\n super._handleBlur();\n }\n\n protected _handleSearchInput({ detail }: CustomEvent<string>): void {\n this._searchTerm = detail;\n }\n\n private _handleClosing(): void {\n this._hide(true);\n }\n\n private async _itemClickHandler(event: PointerEvent): Promise<void> {\n const target = getElementFromPath(IgcComboItemComponent.tagName, event);\n\n if (!target) {\n return;\n }\n\n this._setTouchedState();\n this._toggleSelection(target.index);\n\n if (this.singleSelect) {\n this._inputRef.value?.focus();\n await this._hide(true);\n } else {\n this._searchRef.value?.focus();\n }\n }\n\n private _handleClearIconClick(event: PointerEvent): void {\n event.stopPropagation();\n this._clearSelection();\n this._activeIndex = -1;\n }\n\n private _handleCaseSensitivity(): void {\n this.filteringOptions = {\n caseSensitive: !this.filteringOptions.caseSensitive,\n };\n }\n\n //#endregion\n\n //#region Public methods\n\n /* alternateName: focusComponent */\n /** Sets focus on the component. */\n public override focus(options?: FocusOptions): void {\n this._inputRef.value?.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the component. */\n public override blur(): void {\n this._inputRef.value?.blur();\n }\n\n /**\n * Selects option(s) in the list by either reference or valueKey.\n * If not argument is provided all items will be selected.\n * @param { Item<T> | Item<T>[] } items - One or more items to be selected. Multiple items should be passed as an array.\n * When valueKey is specified, the corresponding value should be used in place of the item reference.\n *\n * @example\n * ```typescript\n * const combo<IgcComboComponent<T>> = document.querySelector('igc-combo');\n *\n * // Select one item at a time by reference when valueKey is not specified.\n * combo.select(combo.data[0]);\n *\n * // Select multiple items at a time by reference when valueKey is not specified.\n * combo.select([combo.data[0], combo.data[1]]);\n *\n * // Select one item at a time when valueKey is specified.\n * combo.select('BG01');\n *\n * // Select multiple items at a time when valueKey is specified.\n * combo.select(['BG01', 'BG02']);\n * ```\n */\n public select(items?: Item<T> | Item<T>[]): void {\n this._updateSelection(items, 'selection', false);\n this._syncValueFromSelection();\n }\n\n /**\n * Deselects option(s) in the list by either reference or valueKey.\n * If not argument is provided all items will be deselected.\n * @param { Item<T> | Item<T>[] } items - One or more items to be deselected. Multiple items should be passed as an array.\n * When valueKey is specified, the corresponding value should be used in place of the item reference.\n *\n * @example\n * ```typescript\n * const combo<IgcComboComponent<T>> = document.querySelector('igc-combo');\n *\n * // Deselect one item at a time by reference when valueKey is not specified.\n * combo.deselect(combo.data[0]);\n *\n * // Deselect multiple items at a time by reference when valueKey is not specified.\n * combo.deselect([combo.data[0], combo.data[1]]);\n *\n * // Deselect one item at a time when valueKey is specified.\n * combo.deselect('BG01');\n *\n * // Deselect multiple items at a time when valueKey is specified.\n * combo.deselect(['BG01', 'BG02']);\n * ```\n */\n public deselect(items?: Item<T> | Item<T>[]): void {\n this._updateSelection(items, 'deselection', false);\n this._syncValueFromSelection();\n }\n\n //#endregion\n\n protected _itemRenderer: ComboRenderFunction<T> = (\n context: VirtualScrollItemContext<ComboRecord<T>>\n ) => {\n const { value: item, index } = context;\n\n if (this.groupKey && item.header) {\n return html`\n <igc-combo-header part=\"group-header\">\n ${this.groupHeaderTemplate({ item: item.value })}\n </igc-combo-header>\n `;\n }\n\n const active = this._activeIndex === index;\n const selected = this._selected.has(item.value);\n\n return html`\n <igc-combo-item\n id=${this._itemId(index)}\n part=${partMap({ item: true, selected, active })}\n aria-setsize=${this._state.itemCount}\n aria-posinset=${item.position}\n exportparts=\"checkbox, checkbox-indicator, checked\"\n .index=${index}\n ?active=${active}\n ?selected=${selected}\n ?hide-checkbox=${this.singleSelect}\n >\n ${this.itemTemplate({ item: item.value })}\n </igc-combo-item>\n `;\n };\n\n private _renderToggleIcon() {\n return html`\n <span\n slot=\"suffix\"\n part=${partMap({\n 'toggle-icon': true,\n filled: !isEmpty(this.value),\n })}\n >\n ${renderSlottedIcon({\n slot: 'toggle-icon',\n icon: this.open ? 'input_collapse' : 'input_expand',\n })}\n </span>\n `;\n }\n\n private _renderClearIcon() {\n return html`\n <span\n slot=\"suffix\"\n part=\"clear-icon\"\n role=\"button\"\n @click=${this._handleClearIconClick}\n ?hidden=${this.disableClear || isEmpty(this._selected)}\n aria-label=${ifDefined(\n this.resourceStrings.combo_clearItems_placeholder\n )}\n >\n ${renderSlottedIcon({ slot: 'clear-icon', icon: 'input_clear' })}\n </span>\n `;\n }\n\n private _renderMainInput() {\n const hasPrefix = this._slots.hasAssignedElements('prefix');\n const hasSuffix = this._slots.hasAssignedElements('suffix');\n\n return html`\n <igc-input\n ${ref(this._inputRef)}\n id=\"target\"\n slot=\"anchor\"\n exportparts=\"container: input, input: native-input, label, prefix, suffix\"\n @click=${this._handleAnchorClick}\n placeholder=${ifDefined(this.placeholder)}\n label=${ifDefined(this.label)}\n @igcChange=${stopPropagation}\n @igcInput=${this._handleMainInput}\n .value=${this._displayValue}\n .disabled=${this.disabled}\n .required=${this.required}\n .invalid=${this.invalid}\n .outlined=${this.outlined}\n .autofocus=${this.autofocus}\n ?readonly=${!this.singleSelect}\n >\n <span slot=${bindIf(hasPrefix, 'prefix')}>\n <slot name=\"prefix\"></slot>\n </span>\n ${this._renderClearIcon()}\n <span slot=${bindIf(hasSuffix, 'suffix')}>\n <slot name=\"suffix\"></slot>\n </span>\n ${this._renderToggleIcon()}\n </igc-input>\n `;\n }\n\n private _renderSearchInput() {\n return html`\n <div\n part=\"filter-input\"\n ?hidden=${this.disableFiltering || this.singleSelect}\n >\n <igc-input\n ${ref(this._searchRef)}\n .value=${this._searchTerm}\n part=\"search-input\"\n placeholder=${this.placeholderSearch}\n exportparts=\"input: search-input\"\n @igcInput=${this._handleSearchInput}\n >\n <igc-icon\n slot=${bindIf(this.caseSensitiveIcon, 'suffix')}\n name=\"case_sensitive\"\n collection=\"default\"\n part=${partMap({\n 'case-icon': true,\n active: this.filteringOptions.caseSensitive,\n })}\n @click=${this._handleCaseSensitivity}\n ></igc-icon>\n </igc-input>\n </div>\n `;\n }\n\n private _renderEmptyTemplate() {\n return html`\n <div part=\"empty\" ?hidden=${!isEmpty(this._state.dataState)}>\n <slot name=\"empty\">${this.resourceStrings.combo_empty_message}</slot>\n </div>\n `;\n }\n\n private _renderList() {\n return html`\n <div .inert=${!this.open} part=\"list-wrapper\">\n ${this._renderSearchInput()}\n <div part=\"header\">\n <slot name=\"header\"></slot>\n </div>\n <igc-virtual-scroll\n ${ref(this._listRef)}\n aria-multiselectable=${!this.singleSelect}\n id=\"dropdown\"\n part=\"list\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-labelledby=\"target\"\n over-scan=\"15\"\n aria-activedescendant=${ifDefined(this._activeDescendant)}\n .data=${this._state.dataState}\n .itemTemplate=${this._itemRenderer}\n ?hidden=${isEmpty(this._state.dataState)}\n @click=${this._itemClickHandler}\n >\n </igc-virtual-scroll>\n ${this._renderEmptyTemplate()}\n <div part=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n `;\n }\n\n private _renderHelperText(): TemplateResult {\n return this._renderValidationContainer({\n id: 'combo-helper-text',\n hasHelperText: true,\n });\n }\n\n protected override render() {\n return html`\n <igc-popover ?open=${this.open} flip shift same-width>\n ${this._renderMainInput()} ${this._renderList()}\n </igc-popover>\n ${this._renderHelperText()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-combo': IgcComboComponent<object>;\n }\n}\n"]}