igniteui-webcomponents 7.3.2 → 7.4.1

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 (478) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/animations/easings.d.ts +21 -31
  3. package/animations/easings.js +21 -34
  4. package/animations/easings.js.map +1 -1
  5. package/animations/player.d.ts +8 -16
  6. package/animations/player.js +5 -8
  7. package/animations/player.js.map +1 -1
  8. package/animations/view-transition.d.ts +10 -10
  9. package/animations/view-transition.js +26 -37
  10. package/animations/view-transition.js.map +1 -1
  11. package/components/breadcrumb/breadcrumb.d.ts +74 -0
  12. package/components/breadcrumb/breadcrumb.js +107 -0
  13. package/components/breadcrumb/breadcrumb.js.map +1 -0
  14. package/components/breadcrumb/breadcrumbs.d.ts +60 -0
  15. package/components/breadcrumb/breadcrumbs.js +50 -0
  16. package/components/breadcrumb/breadcrumbs.js.map +1 -0
  17. package/components/breadcrumb/themes/breadcrumb.base.css.js +3 -0
  18. package/components/breadcrumb/themes/breadcrumb.base.css.js.map +1 -0
  19. package/components/breadcrumb/themes/breadcrumbs.base.css.d.ts +1 -0
  20. package/components/{resize-container/themes/resize-container.base.css.js → breadcrumb/themes/breadcrumbs.base.css.js} +2 -2
  21. package/components/breadcrumb/themes/breadcrumbs.base.css.js.map +1 -0
  22. package/components/breadcrumb/themes/dark/breadcrumb.bootstrap.css.d.ts +1 -0
  23. package/components/breadcrumb/themes/dark/breadcrumb.bootstrap.css.js +3 -0
  24. package/components/breadcrumb/themes/dark/breadcrumb.bootstrap.css.js.map +1 -0
  25. package/components/breadcrumb/themes/dark/breadcrumb.fluent.css.d.ts +1 -0
  26. package/components/breadcrumb/themes/dark/breadcrumb.fluent.css.js +3 -0
  27. package/components/breadcrumb/themes/dark/breadcrumb.fluent.css.js.map +1 -0
  28. package/components/breadcrumb/themes/dark/breadcrumb.indigo.css.d.ts +1 -0
  29. package/components/breadcrumb/themes/dark/breadcrumb.indigo.css.js +3 -0
  30. package/components/breadcrumb/themes/dark/breadcrumb.indigo.css.js.map +1 -0
  31. package/components/breadcrumb/themes/dark/breadcrumb.material.css.d.ts +1 -0
  32. package/components/breadcrumb/themes/dark/breadcrumb.material.css.js +3 -0
  33. package/components/breadcrumb/themes/dark/breadcrumb.material.css.js.map +1 -0
  34. package/components/breadcrumb/themes/light/breadcrumb.bootstrap.css.d.ts +1 -0
  35. package/components/breadcrumb/themes/light/breadcrumb.bootstrap.css.js +3 -0
  36. package/components/breadcrumb/themes/light/breadcrumb.bootstrap.css.js.map +1 -0
  37. package/components/breadcrumb/themes/light/breadcrumb.fluent.css.d.ts +1 -0
  38. package/components/breadcrumb/themes/light/breadcrumb.fluent.css.js +3 -0
  39. package/components/breadcrumb/themes/light/breadcrumb.fluent.css.js.map +1 -0
  40. package/components/breadcrumb/themes/light/breadcrumb.indigo.css.d.ts +1 -0
  41. package/components/breadcrumb/themes/light/breadcrumb.indigo.css.js +3 -0
  42. package/components/breadcrumb/themes/light/breadcrumb.indigo.css.js.map +1 -0
  43. package/components/breadcrumb/themes/light/breadcrumb.material.css.d.ts +1 -0
  44. package/components/breadcrumb/themes/light/breadcrumb.material.css.js +3 -0
  45. package/components/breadcrumb/themes/light/breadcrumb.material.css.js.map +1 -0
  46. package/components/breadcrumb/themes/light/breadcrumb.shared.css.d.ts +1 -0
  47. package/components/breadcrumb/themes/light/breadcrumb.shared.css.js +3 -0
  48. package/components/breadcrumb/themes/light/breadcrumb.shared.css.js.map +1 -0
  49. package/components/breadcrumb/themes/shared/breadcrumb.bootstrap.css.d.ts +1 -0
  50. package/components/breadcrumb/themes/shared/breadcrumb.bootstrap.css.js +3 -0
  51. package/components/breadcrumb/themes/shared/breadcrumb.bootstrap.css.js.map +1 -0
  52. package/components/breadcrumb/themes/shared/breadcrumb.common.css.d.ts +1 -0
  53. package/components/breadcrumb/themes/shared/breadcrumb.common.css.js +3 -0
  54. package/components/breadcrumb/themes/shared/breadcrumb.common.css.js.map +1 -0
  55. package/components/breadcrumb/themes/shared/breadcrumb.fluent.css.d.ts +1 -0
  56. package/components/breadcrumb/themes/shared/breadcrumb.fluent.css.js +3 -0
  57. package/components/breadcrumb/themes/shared/breadcrumb.fluent.css.js.map +1 -0
  58. package/components/breadcrumb/themes/shared/breadcrumb.indigo.css.d.ts +1 -0
  59. package/components/breadcrumb/themes/shared/breadcrumb.indigo.css.js +3 -0
  60. package/components/breadcrumb/themes/shared/breadcrumb.indigo.css.js.map +1 -0
  61. package/components/breadcrumb/themes/shared/breadcrumb.material.css.d.ts +1 -0
  62. package/components/breadcrumb/themes/shared/breadcrumb.material.css.js +3 -0
  63. package/components/breadcrumb/themes/shared/breadcrumb.material.css.js.map +1 -0
  64. package/components/breadcrumb/themes/themes.d.ts +2 -0
  65. package/components/breadcrumb/themes/themes.js +50 -0
  66. package/components/breadcrumb/themes/themes.js.map +1 -0
  67. package/components/button/button.d.ts +0 -2
  68. package/components/button/button.js.map +1 -1
  69. package/components/button-group/button-group.d.ts +42 -12
  70. package/components/button-group/button-group.js +82 -34
  71. package/components/button-group/button-group.js.map +1 -1
  72. package/components/button-group/toggle-button.d.ts +6 -1
  73. package/components/button-group/toggle-button.js +28 -2
  74. package/components/button-group/toggle-button.js.map +1 -1
  75. package/components/calendar/base.js +2 -1
  76. package/components/calendar/base.js.map +1 -1
  77. package/components/calendar/calendar.d.ts +2 -3
  78. package/components/calendar/calendar.js.map +1 -1
  79. package/components/calendar/days-view/days-view.d.ts +2 -2
  80. package/components/calendar/days-view/days-view.js.map +1 -1
  81. package/components/carousel/carousel-indicator.js +1 -0
  82. package/components/carousel/carousel-indicator.js.map +1 -1
  83. package/components/carousel/carousel-slide.d.ts +1 -1
  84. package/components/carousel/carousel-slide.js.map +1 -1
  85. package/components/carousel/carousel.d.ts +3 -3
  86. package/components/carousel/carousel.js.map +1 -1
  87. package/components/chat/chat-input.d.ts +1 -2
  88. package/components/chat/chat-input.js +1 -1
  89. package/components/chat/chat-input.js.map +1 -1
  90. package/components/chat/chat-state.d.ts +8 -9
  91. package/components/chat/chat-state.js.map +1 -1
  92. package/components/chat/chat.d.ts +1 -3
  93. package/components/chat/chat.js +2 -2
  94. package/components/chat/chat.js.map +1 -1
  95. package/components/chat/message-attachments.d.ts +6 -15
  96. package/components/chat/message-attachments.js.map +1 -1
  97. package/components/chat/utils.d.ts +0 -1
  98. package/components/chat/utils.js +1 -1
  99. package/components/chat/utils.js.map +1 -1
  100. package/components/checkbox/checkbox-base.d.ts +3 -1
  101. package/components/checkbox/checkbox-base.js +4 -0
  102. package/components/checkbox/checkbox-base.js.map +1 -1
  103. package/components/checkbox/checkbox.js +4 -12
  104. package/components/checkbox/checkbox.js.map +1 -1
  105. package/components/checkbox/switch.js +1 -8
  106. package/components/checkbox/switch.js.map +1 -1
  107. package/components/chip/chip.d.ts +2 -2
  108. package/components/chip/chip.js.map +1 -1
  109. package/components/color-picker/color-picker.d.ts +35 -34
  110. package/components/color-picker/color-picker.js +12 -7
  111. package/components/color-picker/color-picker.js.map +1 -1
  112. package/components/color-picker/common.d.ts +0 -2
  113. package/components/color-picker/common.js +2 -2
  114. package/components/color-picker/common.js.map +1 -1
  115. package/components/color-picker/converters.js.map +1 -1
  116. package/components/color-picker/picker-canvas.js.map +1 -1
  117. package/components/combo/combo.d.ts +24 -24
  118. package/components/combo/combo.js +21 -26
  119. package/components/combo/combo.js.map +1 -1
  120. package/components/combo/controllers/data.d.ts +7 -10
  121. package/components/combo/controllers/data.js.map +1 -1
  122. package/components/date-picker/date-picker.base.d.ts +22 -27
  123. package/components/date-picker/date-picker.base.js +9 -3
  124. package/components/date-picker/date-picker.base.js.map +1 -1
  125. package/components/date-picker/date-picker.d.ts +1 -1
  126. package/components/date-picker/date-picker.js +5 -3
  127. package/components/date-picker/date-picker.js.map +1 -1
  128. package/components/date-range-picker/date-range-input.d.ts +0 -2
  129. package/components/date-range-picker/date-range-input.js +0 -6
  130. package/components/date-range-picker/date-range-input.js.map +1 -1
  131. package/components/date-range-picker/date-range-picker.d.ts +22 -31
  132. package/components/date-range-picker/date-range-picker.js +7 -7
  133. package/components/date-range-picker/date-range-picker.js.map +1 -1
  134. package/components/date-range-picker/i18n.d.ts +21 -0
  135. package/components/date-range-picker/i18n.js +10 -0
  136. package/components/date-range-picker/i18n.js.map +1 -0
  137. package/components/date-range-picker/predefined-ranges-area.d.ts +3 -3
  138. package/components/date-range-picker/predefined-ranges-area.js +2 -5
  139. package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
  140. package/components/date-range-picker/validators.d.ts +0 -4
  141. package/components/date-range-picker/validators.js +4 -4
  142. package/components/date-range-picker/validators.js.map +1 -1
  143. package/components/date-time-input/date-time-input.base.d.ts +42 -40
  144. package/components/date-time-input/date-time-input.base.js +9 -5
  145. package/components/date-time-input/date-time-input.base.js.map +1 -1
  146. package/components/date-time-input/date-time-input.d.ts +1 -11
  147. package/components/date-time-input/date-time-input.js +0 -6
  148. package/components/date-time-input/date-time-input.js.map +1 -1
  149. package/components/date-time-input/datetime-mask-parser.d.ts +0 -10
  150. package/components/date-time-input/datetime-mask-parser.js +1 -1
  151. package/components/date-time-input/datetime-mask-parser.js.map +1 -1
  152. package/components/dialog/dialog.js.map +1 -1
  153. package/components/dropdown/dropdown-group.d.ts +2 -10
  154. package/components/dropdown/dropdown-group.js +2 -27
  155. package/components/dropdown/dropdown-group.js.map +1 -1
  156. package/components/dropdown/dropdown.d.ts +17 -23
  157. package/components/dropdown/dropdown.js +5 -17
  158. package/components/dropdown/dropdown.js.map +1 -1
  159. package/components/file-input/file-input.d.ts +7 -2
  160. package/components/file-input/file-input.js +4 -0
  161. package/components/file-input/file-input.js.map +1 -1
  162. package/components/icon/icon.d.ts +1 -1
  163. package/components/icon/icon.registry.d.ts +6 -6
  164. package/components/icon/icon.registry.js.map +1 -1
  165. package/components/input/input-base.d.ts +2 -2
  166. package/components/input/input-base.js +3 -5
  167. package/components/input/input-base.js.map +1 -1
  168. package/components/input/input.d.ts +3 -3
  169. package/components/input/input.js.map +1 -1
  170. package/components/mask-input/mask-history.d.ts +22 -18
  171. package/components/mask-input/mask-history.js.map +1 -1
  172. package/components/mask-input/mask-input.d.ts +1 -1
  173. package/components/mask-input/mask-parser.d.ts +11 -13
  174. package/components/mask-input/mask-parser.js.map +1 -1
  175. package/components/popover/popover.d.ts +45 -34
  176. package/components/popover/popover.js +54 -122
  177. package/components/popover/popover.js.map +1 -1
  178. package/components/popover/position/arrow.d.ts +19 -0
  179. package/components/popover/position/arrow.js +33 -0
  180. package/components/popover/position/arrow.js.map +1 -0
  181. package/components/popover/position/floating.d.ts +40 -0
  182. package/components/popover/position/floating.js +146 -0
  183. package/components/popover/position/floating.js.map +1 -0
  184. package/components/popover/position/native.d.ts +45 -0
  185. package/components/popover/position/native.js +158 -0
  186. package/components/popover/position/native.js.map +1 -0
  187. package/components/popover/position/strategy.d.ts +37 -0
  188. package/components/popover/position/strategy.js +21 -0
  189. package/components/popover/position/strategy.js.map +1 -0
  190. package/components/popover/position/types.d.ts +26 -0
  191. package/components/popover/position/types.js +15 -0
  192. package/components/popover/position/types.js.map +1 -0
  193. package/components/popover/themes/light/popover.base.css.js +1 -1
  194. package/components/popover/themes/light/popover.base.css.js.map +1 -1
  195. package/components/progress/circular-progress.d.ts +0 -5
  196. package/components/progress/circular-progress.js.map +1 -1
  197. package/components/qr-code/qr-code.d.ts +1 -1
  198. package/components/radio/radio.d.ts +6 -4
  199. package/components/radio/radio.js +24 -25
  200. package/components/radio/radio.js.map +1 -1
  201. package/components/radio-group/radio-group.js.map +1 -1
  202. package/components/rating/rating.d.ts +9 -6
  203. package/components/rating/rating.js +17 -18
  204. package/components/rating/rating.js.map +1 -1
  205. package/components/select/select-group.d.ts +5 -10
  206. package/components/select/select-group.js +10 -34
  207. package/components/select/select-group.js.map +1 -1
  208. package/components/select/select.d.ts +12 -20
  209. package/components/select/select.js +5 -15
  210. package/components/select/select.js.map +1 -1
  211. package/components/slider/range-slider.d.ts +0 -1
  212. package/components/slider/range-slider.js +6 -11
  213. package/components/slider/range-slider.js.map +1 -1
  214. package/components/slider/slider-base.d.ts +4 -1
  215. package/components/slider/slider-base.js +20 -18
  216. package/components/slider/slider-base.js.map +1 -1
  217. package/components/slider/slider.d.ts +2 -0
  218. package/components/slider/slider.js +5 -1
  219. package/components/slider/slider.js.map +1 -1
  220. package/components/splitter/splitter.d.ts +6 -6
  221. package/components/splitter/splitter.js.map +1 -1
  222. package/components/textarea/textarea.d.ts +2 -5
  223. package/components/textarea/textarea.js +3 -5
  224. package/components/textarea/textarea.js.map +1 -1
  225. package/components/tile-manager/tile-manager.d.ts +6 -7
  226. package/components/tile-manager/tile-manager.js.map +1 -1
  227. package/components/tile-manager/tile.d.ts +3 -3
  228. package/components/tile-manager/tile.js.map +1 -1
  229. package/components/toast/toast.d.ts +0 -2
  230. package/components/toast/toast.js.map +1 -1
  231. package/components/tooltip/controller.js.map +1 -1
  232. package/components/tooltip/service.js +4 -5
  233. package/components/tooltip/service.js.map +1 -1
  234. package/components/tooltip/tooltip.d.ts +34 -13
  235. package/components/tooltip/tooltip.js +8 -4
  236. package/components/tooltip/tooltip.js.map +1 -1
  237. package/components/tree/tree-item.d.ts +6 -6
  238. package/components/tree/tree-item.js.map +1 -1
  239. package/components/tree/tree.navigation.d.ts +5 -6
  240. package/components/tree/tree.navigation.js.map +1 -1
  241. package/components/tree/tree.selection.js.map +1 -1
  242. package/components/types.d.ts +1 -1
  243. package/components/types.js.map +1 -1
  244. package/components/validation-container/validation-container.js +2 -1
  245. package/components/validation-container/validation-container.js.map +1 -1
  246. package/components/virtualization/engine.d.ts +40 -9
  247. package/components/virtualization/engine.js +126 -61
  248. package/components/virtualization/engine.js.map +1 -1
  249. package/components/virtualization/recycle.d.ts +13 -0
  250. package/components/virtualization/recycle.js +152 -0
  251. package/components/virtualization/recycle.js.map +1 -0
  252. package/components/virtualization/virtualization.d.ts +84 -65
  253. package/components/virtualization/virtualization.js +20 -16
  254. package/components/virtualization/virtualization.js.map +1 -1
  255. package/custom-elements.json +18455 -19551
  256. package/igniteui-webcomponents.css-data.json +2 -2
  257. package/igniteui-webcomponents.html-data.json +1 -1
  258. package/index.d.ts +3 -1
  259. package/index.js +2 -0
  260. package/index.js.map +1 -1
  261. package/internals/abort-handler.d.ts +13 -25
  262. package/internals/abort-handler.js +4 -6
  263. package/internals/abort-handler.js.map +1 -1
  264. package/internals/context.d.ts +13 -7
  265. package/internals/context.js +2 -1
  266. package/internals/context.js.map +1 -1
  267. package/internals/controllers/adopt-styles.d.ts +19 -20
  268. package/internals/controllers/adopt-styles.js +3 -8
  269. package/internals/controllers/adopt-styles.js.map +1 -1
  270. package/internals/controllers/aria-projection.d.ts +100 -61
  271. package/internals/controllers/aria-projection.js +81 -31
  272. package/internals/controllers/aria-projection.js.map +1 -1
  273. package/internals/controllers/async-consumer.js.map +1 -1
  274. package/internals/controllers/command.d.ts +15 -30
  275. package/internals/controllers/command.js +2 -7
  276. package/internals/controllers/command.js.map +1 -1
  277. package/internals/controllers/context-provider.d.ts +7 -13
  278. package/internals/controllers/context-provider.js.map +1 -1
  279. package/internals/controllers/focus-ring.d.ts +10 -30
  280. package/internals/controllers/focus-ring.js +6 -12
  281. package/internals/controllers/focus-ring.js.map +1 -1
  282. package/internals/controllers/fullscreen.d.ts +7 -23
  283. package/internals/controllers/fullscreen.js +3 -9
  284. package/internals/controllers/fullscreen.js.map +1 -1
  285. package/internals/controllers/gestures.d.ts +10 -29
  286. package/internals/controllers/gestures.js +1 -3
  287. package/internals/controllers/gestures.js.map +1 -1
  288. package/internals/controllers/group.d.ts +13 -30
  289. package/internals/controllers/group.js.map +1 -1
  290. package/internals/controllers/host-listeners.d.ts +28 -0
  291. package/internals/controllers/host-listeners.js +27 -0
  292. package/internals/controllers/host-listeners.js.map +1 -0
  293. package/internals/controllers/id-resolver.d.ts +8 -9
  294. package/internals/controllers/id-resolver.js +6 -14
  295. package/internals/controllers/id-resolver.js.map +1 -1
  296. package/internals/controllers/internals.d.ts +53 -104
  297. package/internals/controllers/internals.js +40 -13
  298. package/internals/controllers/internals.js.map +1 -1
  299. package/internals/controllers/key-bindings.d.ts +61 -158
  300. package/internals/controllers/key-bindings.js +68 -67
  301. package/internals/controllers/key-bindings.js.map +1 -1
  302. package/internals/controllers/keys.d.ts +32 -0
  303. package/internals/controllers/keys.js +20 -0
  304. package/internals/controllers/keys.js.map +1 -0
  305. package/internals/controllers/mutation-observer.d.ts +14 -37
  306. package/internals/controllers/mutation-observer.js +1 -1
  307. package/internals/controllers/mutation-observer.js.map +1 -1
  308. package/internals/controllers/resize-observer.d.ts +9 -19
  309. package/internals/controllers/resize-observer.js.map +1 -1
  310. package/internals/controllers/root-click.d.ts +11 -42
  311. package/internals/controllers/root-click.js +4 -6
  312. package/internals/controllers/root-click.js.map +1 -1
  313. package/internals/controllers/roving-focus.d.ts +16 -35
  314. package/internals/controllers/roving-focus.js.map +1 -1
  315. package/internals/controllers/slot.d.ts +25 -54
  316. package/internals/controllers/slot.js +6 -6
  317. package/internals/controllers/slot.js.map +1 -1
  318. package/internals/controllers/toggle.d.ts +44 -48
  319. package/internals/controllers/toggle.js.map +1 -1
  320. package/internals/date/compare.js.map +1 -1
  321. package/internals/date/converters.d.ts +10 -7
  322. package/internals/date/converters.js.map +1 -1
  323. package/internals/date/model.d.ts +9 -16
  324. package/internals/date/model.js +22 -25
  325. package/internals/date/model.js.map +1 -1
  326. package/internals/decorators/blazorAdditionalDependencies.d.ts +4 -2
  327. package/internals/decorators/blazorAdditionalDependencies.js.map +1 -1
  328. package/internals/decorators/blazorDeepImport.d.ts +1 -3
  329. package/internals/decorators/blazorDeepImport.js.map +1 -1
  330. package/internals/decorators/blazorInclude.d.ts +3 -2
  331. package/internals/decorators/blazorInclude.js.map +1 -1
  332. package/internals/decorators/blazorIndirectRender.d.ts +1 -3
  333. package/internals/decorators/blazorIndirectRender.js.map +1 -1
  334. package/internals/decorators/blazorSuppressComponent.d.ts +1 -3
  335. package/internals/decorators/blazorSuppressComponent.js.map +1 -1
  336. package/internals/decorators/coerced-property.d.ts +14 -20
  337. package/internals/decorators/coerced-property.js.map +1 -1
  338. package/internals/decorators/shadow-options.d.ts +2 -5
  339. package/internals/decorators/shadow-options.js.map +1 -1
  340. package/internals/definitions/defineAllComponents.js +2 -0
  341. package/internals/definitions/defineAllComponents.js.map +1 -1
  342. package/internals/directives/drag.d.ts +51 -81
  343. package/internals/directives/drag.js +27 -89
  344. package/internals/directives/drag.js.map +1 -1
  345. package/internals/directives/pointer-operation.d.ts +75 -0
  346. package/internals/directives/pointer-operation.js +92 -0
  347. package/internals/directives/pointer-operation.js.map +1 -0
  348. package/internals/directives/resize.d.ts +36 -64
  349. package/internals/directives/resize.js +18 -85
  350. package/internals/directives/resize.js.map +1 -1
  351. package/internals/i18n/EN/calendar.resources.d.ts +8 -2
  352. package/internals/i18n/EN/calendar.resources.js +2 -2
  353. package/internals/i18n/EN/calendar.resources.js.map +1 -1
  354. package/internals/i18n/EN/chat.resources.d.ts +8 -2
  355. package/internals/i18n/EN/chat.resources.js +3 -10
  356. package/internals/i18n/EN/chat.resources.js.map +1 -1
  357. package/internals/i18n/EN/date-picker.resources.d.ts +6 -4
  358. package/internals/i18n/EN/date-picker.resources.js +1 -7
  359. package/internals/i18n/EN/date-picker.resources.js.map +1 -1
  360. package/internals/i18n/EN/date-range-picker.resources.d.ts +9 -2
  361. package/internals/i18n/EN/date-range-picker.resources.js +2 -2
  362. package/internals/i18n/EN/date-range-picker.resources.js.map +1 -1
  363. package/internals/i18n/i18n-controller.d.ts +44 -46
  364. package/internals/i18n/i18n-controller.js +46 -33
  365. package/internals/i18n/i18n-controller.js.map +1 -1
  366. package/internals/i18n/utils.d.ts +9 -4
  367. package/internals/i18n/utils.js +4 -27
  368. package/internals/i18n/utils.js.map +1 -1
  369. package/internals/mixins/alert.d.ts +10 -25
  370. package/internals/mixins/alert.js.map +1 -1
  371. package/internals/mixins/combo-box.d.ts +21 -11
  372. package/internals/mixins/combo-box.js +16 -22
  373. package/internals/mixins/combo-box.js.map +1 -1
  374. package/internals/mixins/event-emitter.js +9 -11
  375. package/internals/mixins/event-emitter.js.map +1 -1
  376. package/internals/mixins/forms/associated-required.d.ts +4 -4
  377. package/internals/mixins/forms/associated-required.js.map +1 -1
  378. package/internals/mixins/forms/associated.d.ts +4 -2
  379. package/internals/mixins/forms/associated.js +42 -19
  380. package/internals/mixins/forms/associated.js.map +1 -1
  381. package/internals/mixins/forms/form-transformers.js.map +1 -1
  382. package/internals/mixins/forms/types.d.ts +27 -78
  383. package/internals/mixins/forms/types.js.map +1 -1
  384. package/internals/mixins/group.d.ts +18 -0
  385. package/internals/mixins/group.js +37 -0
  386. package/internals/mixins/group.js.map +1 -0
  387. package/internals/mixins/i18n.d.ts +10 -16
  388. package/internals/mixins/i18n.js.map +1 -1
  389. package/internals/mixins/mask-behavior.d.ts +8 -22
  390. package/internals/mixins/mask-behavior.js +1 -2
  391. package/internals/mixins/mask-behavior.js.map +1 -1
  392. package/internals/mixins/option.d.ts +1 -2
  393. package/internals/mixins/option.js +2 -1
  394. package/internals/mixins/option.js.map +1 -1
  395. package/internals/part-map.d.ts +4 -2
  396. package/internals/part-map.js +1 -1
  397. package/internals/part-map.js.map +1 -1
  398. package/internals/templates/input-shell.d.ts +8 -17
  399. package/internals/templates/input-shell.js +4 -1
  400. package/internals/templates/input-shell.js.map +1 -1
  401. package/internals/templates/masked-input.d.ts +7 -8
  402. package/internals/templates/masked-input.js.map +1 -1
  403. package/internals/templates/slotted-icon.d.ts +7 -12
  404. package/internals/templates/slotted-icon.js.map +1 -1
  405. package/internals/templates/toggle-shell.d.ts +19 -19
  406. package/internals/templates/toggle-shell.js +12 -8
  407. package/internals/templates/toggle-shell.js.map +1 -1
  408. package/internals/timing.d.ts +5 -14
  409. package/internals/timing.js.map +1 -1
  410. package/internals/utils/arrays.d.ts +21 -21
  411. package/internals/utils/arrays.js +14 -0
  412. package/internals/utils/arrays.js.map +1 -1
  413. package/internals/utils/dom.d.ts +53 -41
  414. package/internals/utils/dom.js +3 -4
  415. package/internals/utils/dom.js.map +1 -1
  416. package/internals/utils/events.d.ts +29 -16
  417. package/internals/utils/events.js +9 -1
  418. package/internals/utils/events.js.map +1 -1
  419. package/internals/utils/lit.d.ts +5 -2
  420. package/internals/utils/lit.js.map +1 -1
  421. package/internals/utils/math.d.ts +8 -6
  422. package/internals/utils/math.js.map +1 -1
  423. package/internals/utils/objects.d.ts +3 -20
  424. package/internals/utils/objects.js +1 -39
  425. package/internals/utils/objects.js.map +1 -1
  426. package/internals/utils/strings.d.ts +9 -11
  427. package/internals/utils/strings.js.map +1 -1
  428. package/internals/utils/types.d.ts +16 -3
  429. package/internals/utils/types.js +3 -0
  430. package/internals/utils/types.js.map +1 -1
  431. package/internals/validators.d.ts +9 -8
  432. package/internals/validators.js +12 -6
  433. package/internals/validators.js.map +1 -1
  434. package/package.json +1 -1
  435. package/skills/README.md +4 -3
  436. package/skills/igniteui-wc-choose-components/SKILL.md +2 -1
  437. package/skills/igniteui-wc-customize-component-theme/SKILL.md +2 -1
  438. package/skills/igniteui-wc-figma-to-app/SKILL.md +328 -0
  439. package/skills/igniteui-wc-figma-to-app/references/asset-extraction.md +343 -0
  440. package/skills/igniteui-wc-figma-to-app/references/design-provenance.md +199 -0
  441. package/skills/igniteui-wc-figma-to-app/references/design-token-bridge.md +489 -0
  442. package/skills/igniteui-wc-figma-to-app/references/figma-component-map.md +370 -0
  443. package/skills/igniteui-wc-figma-to-app/references/figma-exploration.md +222 -0
  444. package/skills/igniteui-wc-figma-to-app/references/mcp-setup.md +363 -0
  445. package/skills/igniteui-wc-figma-to-app/references/project-setup.md +105 -0
  446. package/skills/igniteui-wc-figma-to-app/references/theme-generation.md +180 -0
  447. package/skills/igniteui-wc-figma-to-app/references/validation-patterns.md +370 -0
  448. package/skills/igniteui-wc-generate-from-image-design/SKILL.md +2 -1
  449. package/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +3 -3
  450. package/skills/igniteui-wc-grids/SKILL.md +133 -0
  451. package/skills/igniteui-wc-integrate-with-framework/SKILL.md +2 -1
  452. package/skills/igniteui-wc-migrate-grid-lite-to-premium/SKILL.md +2 -1
  453. package/skills/igniteui-wc-optimize-bundle-size/SKILL.md +2 -1
  454. package/theming/config.d.ts +14 -5
  455. package/theming/config.js +38 -18
  456. package/theming/config.js.map +1 -1
  457. package/theming/context.d.ts +1 -23
  458. package/theming/context.js.map +1 -1
  459. package/theming/theming-controller.d.ts +2 -32
  460. package/theming/theming-controller.js +15 -21
  461. package/theming/theming-controller.js.map +1 -1
  462. package/theming/theming-event.d.ts +0 -7
  463. package/theming/theming-event.js +0 -13
  464. package/theming/theming-event.js.map +1 -1
  465. package/theming/types.d.ts +1 -8
  466. package/theming/types.js.map +1 -1
  467. package/web-types.json +3 -3
  468. package/animations/presets/slide/index.d.ts +0 -3
  469. package/animations/presets/slide/index.js +0 -16
  470. package/animations/presets/slide/index.js.map +0 -1
  471. package/components/resize-container/themes/resize-container.base.css.js.map +0 -1
  472. package/internals/controllers/root-scroll.d.ts +0 -31
  473. package/internals/controllers/root-scroll.js +0 -71
  474. package/internals/controllers/root-scroll.js.map +0 -1
  475. package/theming/utils.d.ts +0 -11
  476. package/theming/utils.js +0 -20
  477. package/theming/utils.js.map +0 -1
  478. /package/components/{resize-container/themes/resize-container.base.css.d.ts → breadcrumb/themes/breadcrumb.base.css.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"picker-canvas.js","sourceRoot":"","sources":["../../../src/components/color-picker/picker-canvas.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,GACR,MAAM,wCAAwC,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IAAI;YAClB,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI;SACpB,CAAC,CAAC;QAEH,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAK/C,OAAO,IAAI,CAAA;;eAEA,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;gBAClD,MAAM;;;qBAGD,IAAI,CAAC,WAAW;;;wBAGb,UAAU;qCACG,UAAU,iBAAiB,UAAU;;KAErE,CAAC;IACJ,CAAC;;AApMgB;IADhB,KAAK,CAAC,kBAAkB,EAAE,IAAI,CAAC;yDACU;AAOlC;IADP,KAAK,EAAE;2DACkB;AAGnB;IADN,QAAQ,EAAE;8DACc;AASlB;IADN,QAAQ,EAAE;6DACa;AAGjB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;mDAClB;AAGN;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;mDAClB;AAUN;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DACvB;AASf;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DACvB;AAIf;IADN,QAAQ,EAAE;6DACiC","sourcesContent":["import { html, LitElement, type PropertyValues } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport {\n addKeybindings,\n arrowDown,\n arrowLeft,\n arrowRight,\n arrowUp,\n} from '#internals/controllers/key-bindings.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { partMap } from '#internals/part-map.js';\nimport {\n addSafeEventListener,\n preventDefault,\n} from '#internals/utils/events.js';\nimport { asPercent, clamp } from '#internals/utils/math.js';\nimport { styles } from './themes/picker-canvas.base.css.js';\n\nexport interface IgcPickerCanvasEventMap {\n /**\n * Emitted when the color is picked in the canvas. Does not bubble.\n */\n igcColorPicked: CustomEvent<PickerCanvasEventDetail>;\n}\n\nexport type PickerCanvasEventDetail = { x: number; y: number };\n\n/** The measurements a marker position is resolved against. */\ntype CanvasGeometry = {\n rect: DOMRect;\n marker: { width: number; height: number };\n};\n\n/* blazorSuppress */\n/**\n * The saturation/value plane of {@link IgcColorPickerComponent} and the marker\n * that moves across it.\n *\n * An internal building block of `igc-color-picker` - it is registered so the\n * picker can render it, but it is not part of the public component surface and\n * is not exported from the package entry point.\n *\n * @element igc-picker-canvas\n *\n * @fires igcColorPicked - Emitted when a color is picked on the canvas. Does not bubble.\n *\n * @csspart marker - The draggable marker indicating the picked saturation/value.\n * @csspart dragging - Present on the marker while it is being dragged.\n */\nexport default class IgcPickerCanvasComponent extends EventEmitterMixin<\n IgcPickerCanvasEventMap,\n AbstractConstructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-picker-canvas';\n public static styles = styles;\n\n public static register(): void {\n registerComponent(IgcPickerCanvasComponent);\n }\n\n @query('[part~=\"marker\"]', true)\n private readonly _marker?: HTMLDivElement;\n\n /** Geometry captured for the duration of a pointer drag. */\n private _dragGeometry?: CanvasGeometry;\n\n /** Whether a pointer drag is currently in progress. */\n @state()\n private _dragging = false;\n\n @property()\n public currentColor = '';\n\n /**\n * The color the marker is filled with.\n *\n * Distinct from `currentColor`: that one is the pure hue the saturation/value\n * plane is built from, while this is the color actually picked out of it.\n */\n @property()\n public markerColor = '';\n\n @property({ attribute: false })\n public x = 0;\n\n @property({ attribute: false })\n public y = 0;\n\n /**\n * The HSV saturation the marker currently sits at (0-100).\n *\n * The canvas positions the marker in pixels and has no notion of the color\n * space behind it, so the owning picker feeds the saturation/value pair back\n * in purely to give the marker an announceable value.\n */\n @property({ type: Number, attribute: false })\n public saturation = 0;\n\n /**\n * The HSV value the marker currently sits at (0-100).\n *\n * Named for the B of HSB rather than the V of HSV - on a custom element a\n * bare `value` reads as a form value, which this is not.\n */\n @property({ type: Number, attribute: false })\n public brightness = 0;\n\n /** The accessible name of the marker. */\n @property()\n public markerLabel = 'Saturation and value';\n\n constructor() {\n super();\n\n addSafeEventListener(this, 'pointerdown', this._handlePointerDown);\n addSafeEventListener(this, 'touchmove', preventDefault, { passive: false });\n addSafeEventListener(\n this,\n 'lostpointercapture',\n this._handleLostPointerCapture\n );\n\n addKeybindings(this, { bindingDefaults: { repeat: true } })\n .set(arrowDown, this._onArrowKey.bind(this, { dx: 0, dy: 1 }))\n .set(arrowUp, this._onArrowKey.bind(this, { dx: 0, dy: -1 }))\n .set(arrowLeft, this._onArrowKey.bind(this, { dx: -1, dy: 0 }))\n .set(arrowRight, this._onArrowKey.bind(this, { dx: 1, dy: 0 }));\n }\n\n protected override updated(properties: PropertyValues<this>): void {\n if (properties.has('currentColor')) {\n this.style.color = this.currentColor;\n }\n\n // Handed to the marker through a custom property rather than an inline\n // style on the marker itself, so that a consumer styling `::part(marker)`\n // can still win - an inline style could not be overridden.\n if (properties.has('markerColor')) {\n this.style.setProperty('--_marker-fill', this.markerColor);\n }\n }\n\n /**\n * The canvas box and half-marker offsets every interaction measures against.\n *\n * Both reads force a layout, so a drag takes this once on pointerdown rather\n * than on each of the frames it spans.\n */\n private _measure(): CanvasGeometry {\n return {\n rect: this.getBoundingClientRect(),\n marker: this.getMarkerDimensions(),\n };\n }\n\n /**\n * Clamps the marker inside the canvas and reports the position it settled on\n * as saturation/value percentages.\n */\n private _commitPosition(\n x: number,\n y: number,\n { rect, marker }: CanvasGeometry\n ): void {\n const nextX = clamp(x, -marker.width, rect.width - marker.width);\n const nextY = clamp(y, -marker.height, rect.height - marker.height);\n\n if (nextX === this.x && nextY === this.y) {\n return;\n }\n\n this.x = nextX;\n this.y = nextY;\n\n this.emitEvent('igcColorPicked', {\n detail: {\n x: Math.round(asPercent(nextX + marker.width, rect.width)),\n y: Math.round(asPercent(nextY + marker.height, rect.height)),\n },\n bubbles: false,\n });\n }\n\n private _onArrowKey({ dx, dy }: { dx: number; dy: number }): void {\n this._commitPosition(this.x + dx, this.y + dy, this._measure());\n }\n\n private _move(event: PointerEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n const geometry = this._dragGeometry ?? this._measure();\n const { rect, marker } = geometry;\n\n this._commitPosition(\n event.clientX - rect.x - marker.width,\n event.clientY - rect.y - marker.height,\n geometry\n );\n }\n\n private _handlePointerDown(event: PointerEvent): void {\n if (event.button !== 0) return;\n this.setPointerCapture(event.pointerId);\n this.addEventListener('pointermove', this._handlePointerMove);\n this._dragGeometry = this._measure();\n this._dragging = true;\n this._move(event);\n }\n\n private _handleLostPointerCapture(): void {\n this.removeEventListener('pointermove', this._handlePointerMove);\n this._dragGeometry = undefined;\n this._dragging = false;\n this._marker?.focus();\n }\n\n private _handlePointerMove(event: PointerEvent): void {\n this._move(event);\n }\n\n public getMarkerDimensions(): { width: number; height: number } {\n const marker = this._marker;\n\n // Offsets rather than a client rect: the marker is scaled up while dragged\n // and a rect would report the transformed box, shifting every position\n // resolved against it.\n return marker\n ? { width: marker.offsetWidth / 2, height: marker.offsetHeight / 2 }\n : { width: 0, height: 0 };\n }\n\n protected override render() {\n const styles = styleMap({\n top: `${this.y}px`,\n left: `${this.x}px`,\n });\n\n const saturation = Math.round(this.saturation);\n const brightness = Math.round(this.brightness);\n\n // ARIA has no two-dimensional slider, so the marker is exposed as a single\n // slider tracking saturation, with `aria-valuetext` carrying both axes -\n // otherwise vertical movement would be announced as \"no change\".\n return html`\n <div\n part=${partMap({ marker: true, dragging: this._dragging })}\n style=${styles}\n tabindex=\"0\"\n role=\"slider\"\n aria-label=${this.markerLabel}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow=${saturation}\n aria-valuetext=\"Saturation ${saturation}%, brightness ${brightness}%\"\n ></div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-picker-canvas': IgcPickerCanvasComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"picker-canvas.js","sourceRoot":"","sources":["../../../src/components/color-picker/picker-canvas.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,GACR,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAiC5D,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,iBAAiB,CAGrE,UAAU,CAAC;aACY,YAAO,GAAG,mBAAmB,AAAtB,CAAuB;aACvC,WAAM,GAAG,MAAM,AAAT,CAAU;IAEvB,MAAM,CAAC,QAAQ;QACpB,iBAAiB,CAAC,wBAAwB,CAAC,CAAC;IAC9C,CAAC;IAqDD;QACE,KAAK,EAAE,CAAC;QA5CF,cAAS,GAAG,KAAK,CAAC;QAGnB,iBAAY,GAAG,EAAE,CAAC;QASlB,gBAAW,GAAG,EAAE,CAAC;QAGjB,MAAC,GAAG,CAA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AK,EAAE,CAAC;mDAClB;AAUN;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DACvB;AASf;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DACvB;AAIf;IADN,QAAQ,EAAE;6DACiC","sourcesContent":["import { html, LitElement, type PropertyValues } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport {\n addKeybindings,\n arrowDown,\n arrowLeft,\n arrowRight,\n arrowUp,\n} from '#internals/controllers/key-bindings.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { partMap } from '#internals/part-map.js';\nimport {\n addSafeEventListener,\n preventDefault,\n} from '#internals/utils/events.js';\nimport { asPercent, clamp } from '#internals/utils/math.js';\nimport { styles } from './themes/picker-canvas.base.css.js';\n\nexport interface IgcPickerCanvasEventMap {\n /**\n * Emitted when the color is picked in the canvas. Does not bubble.\n */\n igcColorPicked: CustomEvent<PickerCanvasEventDetail>;\n}\n\nexport type PickerCanvasEventDetail = { x: number; y: number };\n\n/** The measurements a marker position is resolved against. */\ntype CanvasGeometry = {\n rect: DOMRect;\n marker: { width: number; height: number };\n};\n\n/* blazorSuppress */\n/**\n * The saturation/value plane of {@link IgcColorPickerComponent} and the marker\n * that moves across it.\n *\n * An internal building block of `igc-color-picker` - it is registered so the\n * picker can render it, but it is not part of the public component surface and\n * is not exported from the package entry point.\n *\n * @element igc-picker-canvas\n *\n * @fires igcColorPicked - Emitted when a color is picked on the canvas. Does not bubble.\n *\n * @csspart marker - The draggable marker indicating the picked saturation/value.\n * @csspart dragging - Present on the marker while it is being dragged.\n */\nexport default class IgcPickerCanvasComponent extends EventEmitterMixin<\n IgcPickerCanvasEventMap,\n AbstractConstructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-picker-canvas';\n public static styles = styles;\n\n public static register(): void {\n registerComponent(IgcPickerCanvasComponent);\n }\n\n @query('[part~=\"marker\"]', true)\n private readonly _marker?: HTMLDivElement;\n\n /** Geometry captured for the duration of a pointer drag. */\n private _dragGeometry?: CanvasGeometry;\n\n /** Whether a pointer drag is currently in progress. */\n @state()\n private _dragging = false;\n\n @property()\n public currentColor = '';\n\n /**\n * The color the marker is filled with.\n *\n * Distinct from `currentColor`: that one is the pure hue the saturation/value\n * plane is built from, while this is the color actually picked out of it.\n */\n @property()\n public markerColor = '';\n\n @property({ attribute: false })\n public x = 0;\n\n @property({ attribute: false })\n public y = 0;\n\n /**\n * The HSV saturation the marker currently sits at (0-100).\n *\n * The canvas positions the marker in pixels and has no notion of the color\n * space behind it, so the owning picker feeds the saturation/value pair back\n * in purely to give the marker an announceable value.\n */\n @property({ type: Number, attribute: false })\n public saturation = 0;\n\n /**\n * The HSV value the marker currently sits at (0-100).\n *\n * Named for the B of HSB rather than the V of HSV - on a custom element a\n * bare `value` reads as a form value, which this is not.\n */\n @property({ type: Number, attribute: false })\n public brightness = 0;\n\n /** The accessible name of the marker. */\n @property()\n public markerLabel = 'Saturation and value';\n\n constructor() {\n super();\n\n addSafeEventListener(this, 'pointerdown', this._handlePointerDown);\n addSafeEventListener(this, 'touchmove', preventDefault, { passive: false });\n addSafeEventListener(\n this,\n 'lostpointercapture',\n this._handleLostPointerCapture\n );\n\n addKeybindings(this, { bindingDefaults: { repeat: true } })\n .set(arrowDown, this._onArrowKey.bind(this, { dx: 0, dy: 1 }))\n .set(arrowUp, this._onArrowKey.bind(this, { dx: 0, dy: -1 }))\n .set(arrowLeft, this._onArrowKey.bind(this, { dx: -1, dy: 0 }))\n .set(arrowRight, this._onArrowKey.bind(this, { dx: 1, dy: 0 }));\n }\n\n protected override updated(properties: PropertyValues<this>): void {\n if (properties.has('currentColor')) {\n this.style.color = this.currentColor;\n }\n\n // Given to the marker through a custom property, not an inline style on the\n // marker, so that a consumer who styles `::part(marker)` can win. An inline\n // style cannot be overridden.\n if (properties.has('markerColor')) {\n this.style.setProperty('--_marker-fill', this.markerColor);\n }\n }\n\n /**\n * The canvas box and half-marker offsets every interaction measures against.\n *\n * Both reads force a layout, so a drag takes this once on pointerdown rather\n * than on each of the frames it spans.\n */\n private _measure(): CanvasGeometry {\n return {\n rect: this.getBoundingClientRect(),\n marker: this.getMarkerDimensions(),\n };\n }\n\n /**\n * Clamps the marker inside the canvas and reports the position it settled on\n * as saturation/value percentages.\n */\n private _commitPosition(\n x: number,\n y: number,\n { rect, marker }: CanvasGeometry\n ): void {\n const nextX = clamp(x, -marker.width, rect.width - marker.width);\n const nextY = clamp(y, -marker.height, rect.height - marker.height);\n\n if (nextX === this.x && nextY === this.y) {\n return;\n }\n\n this.x = nextX;\n this.y = nextY;\n\n this.emitEvent('igcColorPicked', {\n detail: {\n x: Math.round(asPercent(nextX + marker.width, rect.width)),\n y: Math.round(asPercent(nextY + marker.height, rect.height)),\n },\n bubbles: false,\n });\n }\n\n private _onArrowKey({ dx, dy }: { dx: number; dy: number }): void {\n this._commitPosition(this.x + dx, this.y + dy, this._measure());\n }\n\n private _move(event: PointerEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n const geometry = this._dragGeometry ?? this._measure();\n const { rect, marker } = geometry;\n\n this._commitPosition(\n event.clientX - rect.x - marker.width,\n event.clientY - rect.y - marker.height,\n geometry\n );\n }\n\n private _handlePointerDown(event: PointerEvent): void {\n if (event.button !== 0) return;\n this.setPointerCapture(event.pointerId);\n this.addEventListener('pointermove', this._handlePointerMove);\n this._dragGeometry = this._measure();\n this._dragging = true;\n this._move(event);\n }\n\n private _handleLostPointerCapture(): void {\n this.removeEventListener('pointermove', this._handlePointerMove);\n this._dragGeometry = undefined;\n this._dragging = false;\n this._marker?.focus();\n }\n\n private _handlePointerMove(event: PointerEvent): void {\n this._move(event);\n }\n\n public getMarkerDimensions(): { width: number; height: number } {\n const marker = this._marker;\n\n // Offsets, not a client rect. The marker is scaled up during a drag, and a\n // rect reports the transformed box, which moves each position found\n // against it.\n return marker\n ? { width: marker.offsetWidth / 2, height: marker.offsetHeight / 2 }\n : { width: 0, height: 0 };\n }\n\n protected override render() {\n const styles = styleMap({\n top: `${this.y}px`,\n left: `${this.x}px`,\n });\n\n const saturation = Math.round(this.saturation);\n const brightness = Math.round(this.brightness);\n\n // ARIA has no two-dimensional slider, so the marker is one slider that\n // tracks saturation, and `aria-valuetext` carries both axes. Without this,\n // a vertical move is announced as \"no change\".\n return html`\n <div\n part=${partMap({ marker: true, dragging: this._dragging })}\n style=${styles}\n tabindex=\"0\"\n role=\"slider\"\n aria-label=${this.markerLabel}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow=${saturation}\n aria-valuetext=\"Saturation ${saturation}%, brightness ${brightness}%\"\n ></div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-picker-canvas': IgcPickerCanvasComponent;\n }\n}\n"]}
@@ -29,7 +29,7 @@ declare const IgcComboComponent_base: AbstractConstructor<import("#internals/mix
29
29
  * @fires igcChange - Emitted when the control's selection has changed.
30
30
  * @fires igcOpening - Emitted just before the list of options is opened.
31
31
  * @fires igcOpened - Emitted after the list of options is opened.
32
- * @fires igcClosing - Emitter just before the list of options is closed.
32
+ * @fires igcClosing - Emitted just before the list of options is closed.
33
33
  * @fires igcClosed - Emitted after the list of options is closed.
34
34
  *
35
35
  * @csspart label - The encapsulated text label of the combo.
@@ -246,27 +246,24 @@ export default class IgcComboComponent<T extends object = any> extends IgcComboC
246
246
  protected _hide(emitEvent?: boolean): Promise<boolean>;
247
247
  private _setSingleSelectionDisplayValue;
248
248
  /**
249
- * Maps every value representation in the data source to the positions of the
250
- * records carrying it. Built on demand and dropped whenever `data` or
251
- * `valueKey` changes.
249
+ * Maps each value in the data source to the positions of the records that
250
+ * carry it. Built on demand, and dropped when `data` or `valueKey` changes.
252
251
  *
253
- * Positions (rather than records) are stored so that resolution can hand back
254
- * matches in data-source order, and duplicate value keys keep resolving to
255
- * every record that carries them.
252
+ * @remarks
253
+ * Positions keep the matches in data-source order, and let a duplicate value
254
+ * key resolve to every record that carries it.
256
255
  *
257
- * The size comparison picks up in-place growth or shrink (push/splice) of the
258
- * same array. Replacing elements without changing the length is not detectable
259
- * here and still requires reassigning `data`.
256
+ * The size comparison finds in-place growth or shrink of the same array. It
257
+ * cannot find a replaced element, which still needs a new `data` array.
260
258
  */
261
259
  private get _dataIndex();
262
260
  /**
263
- * Resolves user-provided items (value keys or object references)
264
- * to actual objects from the data source, in data-source order.
261
+ * Resolves user items (value keys or object references) to records of the
262
+ * data source, in data-source order.
265
263
  *
266
264
  * @remarks
267
- * Repeating the same value in `items` resolves it once - a record cannot be
268
- * selected twice, and duplicates would otherwise reach the change event
269
- * payload.
265
+ * A repeated value resolves one time. A record cannot be selected twice, and
266
+ * duplicates would otherwise reach the change event payload.
270
267
  */
271
268
  private _resolveItems;
272
269
  /**
@@ -275,9 +272,11 @@ export default class IgcComboComponent<T extends object = any> extends IgcComboC
275
272
  */
276
273
  private _resolveItemValue;
277
274
  /**
278
- * Maps data records to their value representations - the `valueKey` property
279
- * of each, or the record itself when no `valueKey` is set.
275
+ * The value representation of a data record: its `valueKey` property, or the
276
+ * record when that property is not set.
280
277
  */
278
+ private _valueOf;
279
+ /** Maps data records to their value representations. See {@link _valueOf}. */
281
280
  private _toValues;
282
281
  /**
283
282
  * Recomputes {@link _displayValue} from the current selection and returns its
@@ -291,13 +290,14 @@ export default class IgcComboComponent<T extends object = any> extends IgcComboC
291
290
  */
292
291
  private _previewValue;
293
292
  /**
294
- * Adds the given `items` to, or removes them from, the current selection.
293
+ * Adds `items` to, or removes them from, the current selection.
295
294
  *
296
- * An empty collection is a "select all" / "deselect all" request. Single
297
- * selection has no "select all" - it only resets the current selection.
295
+ * @remarks
296
+ * An empty collection selects or deselects all. Single selection has no
297
+ * "select all" and only clears the selection.
298
298
  *
299
- * When `emit` is set, the cancellable `igcChange` event is fired *before* any
300
- * mutation takes place, so cancelling it leaves the selection untouched.
299
+ * If `emit` is set, the cancellable `igcChange` event fires before the
300
+ * mutation, so a cancel keeps the selection unchanged.
301
301
  *
302
302
  * @returns Whether the change was committed.
303
303
  */
@@ -317,8 +317,8 @@ export default class IgcComboComponent<T extends object = any> extends IgcComboC
317
317
  * "select everything".
318
318
  */
319
319
  private _recordAt;
320
- private _toggleSelection;
321
- private _selectByIndex;
320
+ /** Selects the record at `index`. With `toggle`, deselects a selected one. */
321
+ private _selectAt;
322
322
  private _clearSelection;
323
323
  private _clearSingleSelection;
324
324
  protected _handleMainInput({ detail, }: CustomEvent<string>): Promise<void>;
@@ -160,8 +160,8 @@ let IgcComboComponent = class IgcComboComponent extends I18nMixin(FormAssociated
160
160
  interactions: {
161
161
  show: () => this._show(true),
162
162
  hide: () => this._hide(true),
163
- toggleSelection: (index) => this._toggleSelection(index),
164
- select: (index) => this._selectByIndex(index),
163
+ toggleSelection: (index) => this._selectAt(index, true),
164
+ select: (index) => this._selectAt(index, false),
165
165
  clearSelection: () => this._clearSelection(),
166
166
  },
167
167
  });
@@ -221,11 +221,11 @@ let IgcComboComponent = class IgcComboComponent extends I18nMixin(FormAssociated
221
221
  hasPopup: 'listbox',
222
222
  expanded: `${this.open}`,
223
223
  disabled: `${this.disabled}`,
224
- label: this._mainAriaLabel,
225
224
  controls: this._listRef.value ? [this._listRef.value] : null,
226
225
  describedBy: this._helperText ? [this._helperText] : null,
227
- labelledBy: this._internals.labels,
228
226
  }),
227
+ hasOwnLabel: () => Boolean(this.label),
228
+ fallbackLabel: () => this._mainAriaLabel,
229
229
  });
230
230
  addSafeEventListener(this, 'blur', this._handleBlur);
231
231
  addSafeEventListener(this, 'focusin', this._handleFocusIn);
@@ -318,20 +318,18 @@ let IgcComboComponent = class IgcComboComponent extends I18nMixin(FormAssociated
318
318
  _resolveItemValue(record) {
319
319
  return this.valueKey ? record[this.valueKey] : record;
320
320
  }
321
+ _valueOf(item) {
322
+ return (this.valueKey ? item[this.valueKey] : undefined) ?? item;
323
+ }
321
324
  _toValues(items) {
322
- const { valueKey } = this;
323
- const values = [];
324
- for (const item of items) {
325
- values.push((valueKey ? item[valueKey] : undefined) ?? item);
326
- }
327
- return values;
325
+ return Array.from(items, (item) => this._valueOf(item));
328
326
  }
329
327
  _projectSelection() {
330
- const { valueKey, displayKey } = this;
328
+ const { displayKey } = this;
331
329
  const values = [];
332
330
  const display = [];
333
331
  for (const item of this._selected) {
334
- values.push((valueKey ? item[valueKey] : undefined) ?? item);
332
+ values.push(this._valueOf(item));
335
333
  display.push(String((displayKey ? item[displayKey] : undefined) ?? item));
336
334
  }
337
335
  this._displayValue = display.join(', ');
@@ -422,21 +420,12 @@ let IgcComboComponent = class IgcComboComponent extends I18nMixin(FormAssociated
422
420
  const record = this._state.dataState[index];
423
421
  return record && !record.header ? record.value : undefined;
424
422
  }
425
- _toggleSelection(index) {
423
+ _selectAt(index, toggle) {
426
424
  const record = this._recordAt(index);
427
425
  if (!record) {
428
426
  return;
429
427
  }
430
- this._updateSelection(this._resolveItemValue(record), this._selected.has(record) ? 'deselection' : 'selection', true);
431
- this._activeIndex = index;
432
- this._syncValueFromSelection();
433
- }
434
- _selectByIndex(index) {
435
- const record = this._recordAt(index);
436
- if (!record) {
437
- return;
438
- }
439
- this._updateSelection(this._resolveItemValue(record), 'selection', true);
428
+ this._updateSelection(this._resolveItemValue(record), toggle && this._selected.has(record) ? 'deselection' : 'selection', true);
440
429
  this._activeIndex = index;
441
430
  this._syncValueFromSelection();
442
431
  }
@@ -489,7 +478,7 @@ let IgcComboComponent = class IgcComboComponent extends I18nMixin(FormAssociated
489
478
  return;
490
479
  }
491
480
  this._setTouchedState();
492
- this._toggleSelection(target.index);
481
+ this._selectAt(target.index, true);
493
482
  if (this.singleSelect) {
494
483
  this._inputRef.value?.focus();
495
484
  await this._hide(true);
@@ -651,14 +640,20 @@ let IgcComboComponent = class IgcComboComponent extends I18nMixin(FormAssociated
651
640
  `;
652
641
  }
653
642
  _renderHelperText() {
654
- return this._renderValidationContainer({
643
+ return IgcValidationContainerComponent.create(this, {
655
644
  id: 'combo-helper-text',
656
645
  hasHelperText: true,
657
646
  });
658
647
  }
659
648
  render() {
660
649
  return html `
661
- <igc-popover ?open=${this.open} flip shift same-width>
650
+ <igc-popover
651
+ ?open=${this.open}
652
+ flip
653
+ same-width
654
+ .scrollStrategy=${this.scrollStrategy}
655
+ @igcPopoverScrollClose=${this._handleClosing}
656
+ >
662
657
  ${this._renderMainInput()} ${this._renderList()}
663
658
  </igc-popover>
664
659
  ${this._renderHelperText()}
@@ -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,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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AE,CAAC;uDAE2B;AAQnD;IADN,QAAQ,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"]}
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,C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AQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;IAC3D,eAAe,CAAgC;QAC9C,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;YACrB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACxB,CAAC;KACF,CAAC;2DAC8B;AAQzB;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;AAnZkB,iBAAiB;IAHrC,4BAA4B,CAAC,qCAAqC,CAAC;IACnE,oBAAoB;IACpB,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,iBAAiB,CA4pCrC;eA5pCoB,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 - Emitted 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._selectAt(index, true),\n select: (index: number) => this._selectAt(index, false),\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 renders into the shadow root of this component and\n // shares it with the theming controller below. A theme change adopts the\n // stylesheets of that root again, which drops the structural stylesheet of\n // the list, because nothing else refreshes it. The update request lets the\n // list check and adopt its stylesheet again on its next render.\n addThemingController(this, all, {\n themeChange: () => this._listRef.value?.requestUpdate(),\n });\n\n // Projects the name and the combobox semantics of the host onto the native\n // input in `igc-input`. See ProjectedARIA. `aria-activedescendant` stays\n // on the listbox, 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 controls: this._listRef.value ? [this._listRef.value] : null,\n describedBy: this._helperText ? [this._helperText] : null,\n }),\n hasOwnLabel: () => Boolean(this.label),\n fallbackLabel: () => this._mainAriaLabel,\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 each value in the data source to the positions of the records that\n * carry it. Built on demand, and dropped when `data` or `valueKey` changes.\n *\n * @remarks\n * Positions keep the matches in data-source order, and let a duplicate value\n * key resolve to every record that carries it.\n *\n * The size comparison finds in-place growth or shrink of the same array. It\n * cannot find a replaced element, which still needs a new `data` array.\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 items (value keys or object references) to records of the\n * data source, in data-source order.\n *\n * @remarks\n * A repeated value resolves one time. A record cannot be selected twice, and\n * duplicates would otherwise reach the change event 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 * The value representation of a data record: its `valueKey` property, or the\n * record when that property is not set.\n */\n private _valueOf(item: T): ComboValue<T> {\n return (this.valueKey ? item[this.valueKey] : undefined) ?? item;\n }\n\n /** Maps data records to their value representations. See {@link _valueOf}. */\n private _toValues(items: Iterable<T>): ComboValue<T>[] {\n return Array.from(items, (item) => this._valueOf(item));\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 { displayKey } = this;\n const values: ComboValue<T>[] = [];\n const display: string[] = [];\n\n for (const item of this._selected) {\n values.push(this._valueOf(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 `items` to, or removes them from, the current selection.\n *\n * @remarks\n * An empty collection selects or deselects all. Single selection has no\n * \"select all\" and only clears the selection.\n *\n * If `emit` is set, the cancellable `igcChange` event fires before the\n * mutation, so a cancel keeps the selection unchanged.\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 /** Selects the record at `index`. With `toggle`, deselects a selected one. */\n private _selectAt(index: number, toggle: boolean): void {\n const record = this._recordAt(index);\n\n if (!record) {\n return;\n }\n\n this._updateSelection(\n this._resolveItemValue(record),\n toggle && this._selected.has(record) ? 'deselection' : 'selection',\n true\n );\n\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 // Reset the form state directly, not through `_syncValueFromSelection`, to\n // keep the text the user types in the main input.\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._selectAt(target.index, true);\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 IgcValidationContainerComponent.create(this, {\n id: 'combo-helper-text',\n hasHelperText: true,\n });\n }\n\n protected override render() {\n return html`\n <igc-popover\n ?open=${this.open}\n flip\n same-width\n .scrollStrategy=${this.scrollStrategy}\n @igcPopoverScrollClose=${this._handleClosing}\n >\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"]}