@coveo/atomic 3.35.0-pre.e38c46e295 → 3.35.0-pre.e9982a2757

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 (335) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/components/_index.js +19 -19
  3. package/dist/atomic/components/atomic-field-condition.js +1 -1
  4. package/dist/atomic/components/atomic-field-condition.js.map +1 -1
  5. package/dist/atomic/components/atomic-insight-result-action.js +2 -2
  6. package/dist/atomic/components/atomic-insight-result-action.js.map +1 -1
  7. package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js +2 -2
  8. package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js.map +1 -1
  9. package/dist/atomic/components/atomic-insight-result-attach-to-case-indicator.js +2 -2
  10. package/dist/atomic/components/atomic-insight-result-attach-to-case-indicator.js.map +1 -1
  11. package/dist/atomic/components/atomic-insight-result-quickview-action.js +2 -2
  12. package/dist/atomic/components/atomic-insight-result-quickview-action.js.map +1 -1
  13. package/dist/atomic/components/atomic-ipx-result-link.js +2 -2
  14. package/dist/atomic/components/atomic-ipx-result-link.js.map +1 -1
  15. package/dist/atomic/components/atomic-quickview-modal2.js +1 -1
  16. package/dist/atomic/components/atomic-quickview.js +2 -2
  17. package/dist/atomic/components/atomic-quickview.js.map +1 -1
  18. package/dist/atomic/components/atomic-recs-interface.js +1 -1
  19. package/dist/atomic/components/atomic-result-badge.js +1 -1
  20. package/dist/atomic/components/atomic-result-badge.js.map +1 -1
  21. package/dist/atomic/components/atomic-result-children.js +2 -2
  22. package/dist/atomic/components/atomic-result-children.js.map +1 -1
  23. package/dist/atomic/components/atomic-result-date.js +1 -1
  24. package/dist/atomic/components/atomic-result-date.js.map +1 -1
  25. package/dist/atomic/components/atomic-result-fields-list.js +2 -2
  26. package/dist/atomic/components/atomic-result-fields-list.js.map +1 -1
  27. package/dist/atomic/components/atomic-result-html.js +1 -1
  28. package/dist/atomic/components/atomic-result-html.js.map +1 -1
  29. package/dist/atomic/components/atomic-result-icon.js +1 -1
  30. package/dist/atomic/components/atomic-result-icon.js.map +1 -1
  31. package/dist/atomic/components/atomic-result-image.js +1 -1
  32. package/dist/atomic/components/atomic-result-image.js.map +1 -1
  33. package/dist/atomic/components/atomic-result-link.js +2 -2
  34. package/dist/atomic/components/atomic-result-link.js.map +1 -1
  35. package/dist/atomic/components/atomic-result-localized-text.js +1 -1
  36. package/dist/atomic/components/atomic-result-localized-text.js.map +1 -1
  37. package/dist/atomic/components/atomic-result-multi-value-text.js +1 -1
  38. package/dist/atomic/components/atomic-result-multi-value-text.js.map +1 -1
  39. package/dist/atomic/components/atomic-result-number.js +1 -1
  40. package/dist/atomic/components/atomic-result-number.js.map +1 -1
  41. package/dist/atomic/components/atomic-result-printable-uri.js +1 -1
  42. package/dist/atomic/components/atomic-result-printable-uri.js.map +1 -1
  43. package/dist/atomic/components/atomic-result-rating.js +1 -1
  44. package/dist/atomic/components/atomic-result-rating.js.map +1 -1
  45. package/dist/atomic/components/atomic-result-text2.js +1 -1
  46. package/dist/atomic/components/atomic-result-text2.js.map +1 -1
  47. package/dist/atomic/components/atomic-result-timespan.js +1 -1
  48. package/dist/atomic/components/atomic-result-timespan.js.map +1 -1
  49. package/dist/atomic/components/atomic-result2.js.map +1 -1
  50. package/dist/atomic/components/atomic-search-box.js +3 -7
  51. package/dist/atomic/components/atomic-search-box.js.map +1 -1
  52. package/dist/atomic/components/atomic-smart-snippet-source2.js +1 -1
  53. package/dist/atomic/components/atomic-smart-snippet-source2.js.map +1 -1
  54. package/dist/atomic/components/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.js +1 -3
  55. package/dist/atomic/components/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +0 -5
  56. package/dist/atomic/components/components/commerce/atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.js +0 -3
  57. package/dist/atomic/components/components/commerce/atomic-product-children/atomic-product-children.js +1 -1
  58. package/dist/atomic/components/components/commerce/atomic-product-description/atomic-product-description.js +1 -1
  59. package/dist/atomic/components/components/commerce/atomic-product-excerpt/atomic-product-excerpt.js +1 -1
  60. package/dist/atomic/components/components/commerce/atomic-product-field-condition/atomic-product-field-condition.js +1 -1
  61. package/dist/atomic/components/components/commerce/atomic-product-image/atomic-product-image.js +1 -1
  62. package/dist/atomic/components/components/commerce/atomic-product-link/atomic-product-link.js +2 -1
  63. package/dist/atomic/components/components/commerce/atomic-product-multi-value-text/atomic-product-multi-value-text.js +1 -1
  64. package/dist/atomic/components/components/commerce/atomic-product-numeric-field-value/atomic-product-numeric-field-value.js +1 -1
  65. package/dist/atomic/components/components/commerce/atomic-product-price/atomic-product-price.js +1 -1
  66. package/dist/atomic/components/components/commerce/atomic-product-rating/atomic-product-rating.js +1 -1
  67. package/dist/atomic/components/components/commerce/atomic-product-text/atomic-product-text.js +1 -1
  68. package/dist/atomic/components/components/commerce/product-template-component-utils/context/interactive-product-context-controller.js +25 -0
  69. package/dist/atomic/components/components/commerce/product-template-component-utils/context/product-context-controller.js +29 -0
  70. package/dist/atomic/components/components/common/breadbox/breadcrumb-button.js +1 -6
  71. package/dist/atomic/components/components/common/search-box/text-area-clear-button.js +1 -1
  72. package/dist/atomic/components/global/environment.js +1 -1
  73. package/dist/atomic/components/index.js.map +1 -1
  74. package/dist/atomic/components/{result-template-decorators.js → stencil-result-template-decorators.js} +6 -2
  75. package/dist/atomic/components/stencil-result-template-decorators.js.map +1 -0
  76. package/dist/atomic/components/stencil-suggestion-manager.js +1 -1
  77. package/dist/atomic/components/stencil-suggestion-manager.js.map +1 -1
  78. package/dist/atomic/index.esm.js +1 -1
  79. package/dist/atomic/index.esm.js.map +1 -1
  80. package/dist/atomic/lang/cs.json +1 -1
  81. package/dist/atomic/lang/da.json +1 -1
  82. package/dist/atomic/lang/de.json +1 -1
  83. package/dist/atomic/lang/dev.json +1 -1
  84. package/dist/atomic/lang/el.json +1 -1
  85. package/dist/atomic/lang/en.json +1 -1
  86. package/dist/atomic/lang/es.json +1 -1
  87. package/dist/atomic/lang/fi.json +1 -1
  88. package/dist/atomic/lang/fr.json +1 -1
  89. package/dist/atomic/lang/hu.json +1 -1
  90. package/dist/atomic/lang/id.json +1 -1
  91. package/dist/atomic/lang/it.json +1 -1
  92. package/dist/atomic/lang/ja.json +1 -1
  93. package/dist/atomic/lang/ko.json +1 -1
  94. package/dist/atomic/lang/nl.json +1 -1
  95. package/dist/atomic/lang/no.json +1 -1
  96. package/dist/atomic/lang/pl.json +1 -1
  97. package/dist/atomic/lang/pt-BR.json +1 -1
  98. package/dist/atomic/lang/pt.json +1 -1
  99. package/dist/atomic/lang/ru.json +1 -1
  100. package/dist/atomic/lang/sv.json +1 -1
  101. package/dist/atomic/lang/th.json +1 -1
  102. package/dist/atomic/lang/tr.json +1 -1
  103. package/dist/atomic/lang/zh-CN.json +1 -1
  104. package/dist/atomic/lang/zh-TW.json +1 -1
  105. package/dist/atomic/lang/zh.json +1 -1
  106. package/dist/atomic/{p-955092ed.entry.js → p-01096d1c.entry.js} +2 -2
  107. package/dist/atomic/p-01096d1c.entry.js.map +1 -0
  108. package/dist/atomic/{p-82cd6398.entry.js → p-154cbbfe.entry.js} +2 -2
  109. package/dist/atomic/{p-82cd6398.entry.js.map → p-154cbbfe.entry.js.map} +1 -1
  110. package/dist/atomic/p-16f4ce98.js +2 -0
  111. package/dist/atomic/p-16f4ce98.js.map +1 -0
  112. package/dist/atomic/{p-db3b11ca.entry.js → p-2033533c.entry.js} +2 -2
  113. package/dist/atomic/{p-db3b11ca.entry.js.map → p-2033533c.entry.js.map} +1 -1
  114. package/dist/atomic/{p-4069d801.entry.js → p-268ce7ca.entry.js} +2 -2
  115. package/dist/atomic/p-268ce7ca.entry.js.map +1 -0
  116. package/dist/atomic/{p-9e6462cf.entry.js → p-36ff2bc3.entry.js} +2 -2
  117. package/dist/atomic/p-36ff2bc3.entry.js.map +1 -0
  118. package/dist/atomic/{p-e9dc8e90.entry.js → p-3ec45f9c.entry.js} +2 -2
  119. package/dist/atomic/p-3ec45f9c.entry.js.map +1 -0
  120. package/dist/atomic/{p-18684d4c.js → p-4080f740.js} +1 -1
  121. package/dist/atomic/p-4080f740.js.map +1 -0
  122. package/dist/atomic/{p-8d5228da.entry.js → p-42fffab2.entry.js} +2 -2
  123. package/dist/atomic/p-42fffab2.entry.js.map +1 -0
  124. package/dist/atomic/{p-190ddaca.entry.js → p-4cf97b0a.entry.js} +2 -2
  125. package/dist/atomic/p-4cf97b0a.entry.js.map +1 -0
  126. package/dist/atomic/{p-78427c6a.entry.js → p-5a9460ab.entry.js} +2 -2
  127. package/dist/atomic/p-5a9460ab.entry.js.map +1 -0
  128. package/dist/atomic/{p-15547bd5.entry.js → p-61b3f5ce.entry.js} +2 -2
  129. package/dist/atomic/p-61b3f5ce.entry.js.map +1 -0
  130. package/dist/atomic/{p-1ff7a9da.entry.js → p-6a3b139f.entry.js} +2 -2
  131. package/dist/atomic/p-6a3b139f.entry.js.map +1 -0
  132. package/dist/atomic/{p-df8d38ca.entry.js → p-7015679e.entry.js} +2 -2
  133. package/dist/atomic/p-7015679e.entry.js.map +1 -0
  134. package/dist/atomic/{p-dea22a8d.entry.js → p-886b184f.entry.js} +2 -2
  135. package/dist/atomic/p-886b184f.entry.js.map +1 -0
  136. package/dist/atomic/{p-b3f6561d.entry.js → p-8e964890.entry.js} +2 -2
  137. package/dist/atomic/p-8e964890.entry.js.map +1 -0
  138. package/dist/atomic/{p-182f9112.entry.js → p-a413f820.entry.js} +2 -2
  139. package/dist/atomic/p-a413f820.entry.js.map +1 -0
  140. package/dist/atomic/{p-017aa785.entry.js → p-a7c39901.entry.js} +2 -2
  141. package/dist/atomic/{p-5cab535b.entry.js → p-c5bd7f8d.entry.js} +2 -2
  142. package/dist/atomic/p-c5bd7f8d.entry.js.map +1 -0
  143. package/dist/atomic/{p-567b2841.entry.js → p-ca1425cc.entry.js} +2 -2
  144. package/dist/atomic/{p-852cc16d.entry.js → p-cacb7fd8.entry.js} +2 -2
  145. package/dist/atomic/p-cacb7fd8.entry.js.map +1 -0
  146. package/dist/atomic/{p-c5164dbf.entry.js → p-cee86cff.entry.js} +2 -2
  147. package/dist/atomic/p-cee86cff.entry.js.map +1 -0
  148. package/dist/atomic/{p-4cb91ee7.entry.js → p-d5402772.entry.js} +2 -2
  149. package/dist/atomic/p-d5402772.entry.js.map +1 -0
  150. package/dist/atomic/{p-e6dc9de7.entry.js → p-da141605.entry.js} +2 -2
  151. package/dist/atomic/p-da141605.entry.js.map +1 -0
  152. package/dist/atomic/{p-a1798150.entry.js → p-dd258eaa.entry.js} +2 -2
  153. package/dist/atomic/p-dd258eaa.entry.js.map +1 -0
  154. package/dist/atomic/{p-945ddd53.entry.js → p-e1dbe31d.entry.js} +2 -2
  155. package/dist/atomic/p-e1dbe31d.entry.js.map +1 -0
  156. package/dist/atomic/{p-448091f7.entry.js → p-ecd3c0a9.entry.js} +2 -2
  157. package/dist/atomic/p-ecd3c0a9.entry.js.map +1 -0
  158. package/dist/atomic/{p-c2a5dac0.entry.js → p-f2c4209d.entry.js} +2 -2
  159. package/dist/atomic/{p-57049cd2.entry.js → p-f2c89d7c.entry.js} +2 -2
  160. package/dist/atomic/p-f2c89d7c.entry.js.map +1 -0
  161. package/dist/atomic/p-f800678c.entry.js.map +1 -1
  162. package/dist/cjs/_index.cjs.js +20 -20
  163. package/dist/cjs/atomic-field-condition.cjs.entry.js +2 -2
  164. package/dist/cjs/atomic-field-condition.cjs.entry.js.map +1 -1
  165. package/dist/cjs/atomic-insight-result-action.cjs.entry.js +3 -3
  166. package/dist/cjs/atomic-insight-result-action.cjs.entry.js.map +1 -1
  167. package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js +3 -3
  168. package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js.map +1 -1
  169. package/dist/cjs/atomic-insight-result-attach-to-case-indicator.cjs.entry.js +3 -3
  170. package/dist/cjs/atomic-insight-result-attach-to-case-indicator.cjs.entry.js.map +1 -1
  171. package/dist/cjs/atomic-insight-result-quickview-action.cjs.entry.js +3 -3
  172. package/dist/cjs/atomic-insight-result-quickview-action.cjs.entry.js.map +1 -1
  173. package/dist/cjs/atomic-insight-search-box.cjs.entry.js +1 -1
  174. package/dist/cjs/atomic-ipx-result-link.cjs.entry.js +4 -4
  175. package/dist/cjs/atomic-ipx-result-link.cjs.entry.js.map +1 -1
  176. package/dist/cjs/atomic-quickview-modal.cjs.entry.js +1 -1
  177. package/dist/cjs/atomic-quickview.cjs.entry.js +3 -3
  178. package/dist/cjs/atomic-quickview.cjs.entry.js.map +1 -1
  179. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  180. package/dist/cjs/atomic-result-badge.cjs.entry.js +2 -2
  181. package/dist/cjs/atomic-result-badge.cjs.entry.js.map +1 -1
  182. package/dist/cjs/atomic-result-children.cjs.entry.js +3 -3
  183. package/dist/cjs/atomic-result-children.cjs.entry.js.map +1 -1
  184. package/dist/cjs/atomic-result-date.cjs.entry.js +2 -2
  185. package/dist/cjs/atomic-result-date.cjs.entry.js.map +1 -1
  186. package/dist/cjs/atomic-result-fields-list.cjs.entry.js +3 -3
  187. package/dist/cjs/atomic-result-fields-list.cjs.entry.js.map +1 -1
  188. package/dist/cjs/atomic-result-html.cjs.entry.js +2 -2
  189. package/dist/cjs/atomic-result-html.cjs.entry.js.map +1 -1
  190. package/dist/cjs/atomic-result-icon.cjs.entry.js +2 -2
  191. package/dist/cjs/atomic-result-icon.cjs.entry.js.map +1 -1
  192. package/dist/cjs/atomic-result-image.cjs.entry.js +2 -2
  193. package/dist/cjs/atomic-result-image.cjs.entry.js.map +1 -1
  194. package/dist/cjs/atomic-result-link.cjs.entry.js +4 -4
  195. package/dist/cjs/atomic-result-link.cjs.entry.js.map +1 -1
  196. package/dist/cjs/atomic-result-localized-text.cjs.entry.js +3 -3
  197. package/dist/cjs/atomic-result-localized-text.cjs.entry.js.map +1 -1
  198. package/dist/cjs/atomic-result-multi-value-text.cjs.entry.js +2 -2
  199. package/dist/cjs/atomic-result-multi-value-text.cjs.entry.js.map +1 -1
  200. package/dist/cjs/atomic-result-number.cjs.entry.js +2 -2
  201. package/dist/cjs/atomic-result-number.cjs.entry.js.map +1 -1
  202. package/dist/cjs/atomic-result-printable-uri.cjs.entry.js +2 -2
  203. package/dist/cjs/atomic-result-printable-uri.cjs.entry.js.map +1 -1
  204. package/dist/cjs/atomic-result-rating.cjs.entry.js +2 -2
  205. package/dist/cjs/atomic-result-rating.cjs.entry.js.map +1 -1
  206. package/dist/cjs/atomic-result-text_2.cjs.entry.js +2 -2
  207. package/dist/cjs/atomic-result-text_2.cjs.entry.js.map +1 -1
  208. package/dist/cjs/atomic-result-timespan.cjs.entry.js +2 -2
  209. package/dist/cjs/atomic-result-timespan.cjs.entry.js.map +1 -1
  210. package/dist/cjs/atomic-result.cjs.entry.js.map +1 -1
  211. package/dist/cjs/atomic-search-box.cjs.entry.js +4 -8
  212. package/dist/cjs/atomic-search-box.cjs.entry.js.map +1 -1
  213. package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js +1 -1
  214. package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js.map +1 -1
  215. package/dist/cjs/index.cjs.js.map +1 -1
  216. package/dist/cjs/{result-template-decorators-432d11a9.js → stencil-result-template-decorators-28b05aaf.js} +6 -2
  217. package/dist/cjs/stencil-result-template-decorators-28b05aaf.js.map +1 -0
  218. package/dist/cjs/{stencil-suggestion-manager-88cb88f2.js → stencil-suggestion-manager-2cba6d69.js} +2 -2
  219. package/dist/cjs/stencil-suggestion-manager-2cba6d69.js.map +1 -0
  220. package/dist/cjs/version.cjs.js +1 -1
  221. package/dist/esm/_index.js +19 -19
  222. package/dist/esm/atomic-field-condition.entry.js +1 -1
  223. package/dist/esm/atomic-field-condition.entry.js.map +1 -1
  224. package/dist/esm/atomic-insight-result-action.entry.js +2 -2
  225. package/dist/esm/atomic-insight-result-action.entry.js.map +1 -1
  226. package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js +2 -2
  227. package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js.map +1 -1
  228. package/dist/esm/atomic-insight-result-attach-to-case-indicator.entry.js +2 -2
  229. package/dist/esm/atomic-insight-result-attach-to-case-indicator.entry.js.map +1 -1
  230. package/dist/esm/atomic-insight-result-quickview-action.entry.js +2 -2
  231. package/dist/esm/atomic-insight-result-quickview-action.entry.js.map +1 -1
  232. package/dist/esm/atomic-insight-search-box.entry.js +1 -1
  233. package/dist/esm/atomic-ipx-result-link.entry.js +2 -2
  234. package/dist/esm/atomic-ipx-result-link.entry.js.map +1 -1
  235. package/dist/esm/atomic-quickview-modal.entry.js +1 -1
  236. package/dist/esm/atomic-quickview.entry.js +2 -2
  237. package/dist/esm/atomic-quickview.entry.js.map +1 -1
  238. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  239. package/dist/esm/atomic-result-badge.entry.js +1 -1
  240. package/dist/esm/atomic-result-badge.entry.js.map +1 -1
  241. package/dist/esm/atomic-result-children.entry.js +2 -2
  242. package/dist/esm/atomic-result-children.entry.js.map +1 -1
  243. package/dist/esm/atomic-result-date.entry.js +1 -1
  244. package/dist/esm/atomic-result-date.entry.js.map +1 -1
  245. package/dist/esm/atomic-result-fields-list.entry.js +2 -2
  246. package/dist/esm/atomic-result-fields-list.entry.js.map +1 -1
  247. package/dist/esm/atomic-result-html.entry.js +1 -1
  248. package/dist/esm/atomic-result-html.entry.js.map +1 -1
  249. package/dist/esm/atomic-result-icon.entry.js +1 -1
  250. package/dist/esm/atomic-result-icon.entry.js.map +1 -1
  251. package/dist/esm/atomic-result-image.entry.js +1 -1
  252. package/dist/esm/atomic-result-image.entry.js.map +1 -1
  253. package/dist/esm/atomic-result-link.entry.js +2 -2
  254. package/dist/esm/atomic-result-link.entry.js.map +1 -1
  255. package/dist/esm/atomic-result-localized-text.entry.js +2 -2
  256. package/dist/esm/atomic-result-localized-text.entry.js.map +1 -1
  257. package/dist/esm/atomic-result-multi-value-text.entry.js +1 -1
  258. package/dist/esm/atomic-result-multi-value-text.entry.js.map +1 -1
  259. package/dist/esm/atomic-result-number.entry.js +1 -1
  260. package/dist/esm/atomic-result-number.entry.js.map +1 -1
  261. package/dist/esm/atomic-result-printable-uri.entry.js +1 -1
  262. package/dist/esm/atomic-result-printable-uri.entry.js.map +1 -1
  263. package/dist/esm/atomic-result-rating.entry.js +1 -1
  264. package/dist/esm/atomic-result-rating.entry.js.map +1 -1
  265. package/dist/esm/atomic-result-text_2.entry.js +1 -1
  266. package/dist/esm/atomic-result-text_2.entry.js.map +1 -1
  267. package/dist/esm/atomic-result-timespan.entry.js +1 -1
  268. package/dist/esm/atomic-result-timespan.entry.js.map +1 -1
  269. package/dist/esm/atomic-result.entry.js.map +1 -1
  270. package/dist/esm/atomic-search-box.entry.js +4 -8
  271. package/dist/esm/atomic-search-box.entry.js.map +1 -1
  272. package/dist/esm/atomic-smart-snippet-answer_2.entry.js +1 -1
  273. package/dist/esm/atomic-smart-snippet-answer_2.entry.js.map +1 -1
  274. package/dist/esm/index.js.map +1 -1
  275. package/dist/esm/{result-template-decorators-2ed76ea9.js → stencil-result-template-decorators-f989bc6b.js} +6 -2
  276. package/dist/esm/stencil-result-template-decorators-f989bc6b.js.map +1 -0
  277. package/dist/esm/{stencil-suggestion-manager-1f4ed8d0.js → stencil-suggestion-manager-376f83e8.js} +2 -2
  278. package/dist/esm/stencil-suggestion-manager-376f83e8.js.map +1 -0
  279. package/dist/esm/version.js +1 -1
  280. package/dist/types/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.d.ts +0 -2
  281. package/dist/types/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.d.ts +0 -1
  282. package/dist/types/components/commerce/atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.d.ts +0 -2
  283. package/dist/types/components/commerce/atomic-product/atomic-product.d.ts +1 -1
  284. package/dist/types/components/commerce/product-template-component-utils/context/fetch-product-context.d.ts +12 -0
  285. package/dist/types/components/commerce/product-template-component-utils/context/interactive-product-context-controller.d.ts +27 -0
  286. package/dist/types/components/commerce/product-template-component-utils/context/product-context-controller.d.ts +33 -0
  287. package/dist/types/components/commerce/product-template-component-utils/{stencil-product-template-decorators.d.ts → context/stencil-product-template-decorators.d.ts} +1 -1
  288. package/dist/types/components/common/breadbox/breadcrumb-button.d.ts +0 -2
  289. package/dist/types/components/common/smart-snippets/atomic-smart-snippet-source.d.ts +1 -1
  290. package/dist/types/components/search/atomic-result/atomic-result.d.ts +1 -1
  291. package/dist/types/components/search/atomic-search-box/atomic-search-box.d.ts +0 -1
  292. package/dist/types/components/search/result-template-component-utils/context/fetch-result-context.d.ts +8 -0
  293. package/dist/types/components/search/result-template-component-utils/context/interactive-result-context-controller.d.ts +12 -0
  294. package/dist/types/components/search/result-template-component-utils/context/result-context-controller.d.ts +18 -0
  295. package/dist/types/components/search/{result-template-components/result-template-decorators.d.ts → result-template-component-utils/context/stencil-result-template-decorators.d.ts} +6 -2
  296. package/dist/types/directives/hierarchical-path.d.ts +1 -1
  297. package/dist/types/index.d.ts +3 -3
  298. package/docs/atomic-docs.json +1 -1
  299. package/package.json +6 -3
  300. package/dist/atomic/components/components/common/item-list/fetch-item-context.js +0 -15
  301. package/dist/atomic/components/decorators/commerce/product-template-decorators.js +0 -68
  302. package/dist/atomic/components/result-template-decorators.js.map +0 -1
  303. package/dist/atomic/p-15547bd5.entry.js.map +0 -1
  304. package/dist/atomic/p-182f9112.entry.js.map +0 -1
  305. package/dist/atomic/p-18684d4c.js.map +0 -1
  306. package/dist/atomic/p-190ddaca.entry.js.map +0 -1
  307. package/dist/atomic/p-1ff7a9da.entry.js.map +0 -1
  308. package/dist/atomic/p-2559747d.js +0 -2
  309. package/dist/atomic/p-2559747d.js.map +0 -1
  310. package/dist/atomic/p-4069d801.entry.js.map +0 -1
  311. package/dist/atomic/p-448091f7.entry.js.map +0 -1
  312. package/dist/atomic/p-4cb91ee7.entry.js.map +0 -1
  313. package/dist/atomic/p-57049cd2.entry.js.map +0 -1
  314. package/dist/atomic/p-5cab535b.entry.js.map +0 -1
  315. package/dist/atomic/p-78427c6a.entry.js.map +0 -1
  316. package/dist/atomic/p-852cc16d.entry.js.map +0 -1
  317. package/dist/atomic/p-8d5228da.entry.js.map +0 -1
  318. package/dist/atomic/p-945ddd53.entry.js.map +0 -1
  319. package/dist/atomic/p-955092ed.entry.js.map +0 -1
  320. package/dist/atomic/p-9e6462cf.entry.js.map +0 -1
  321. package/dist/atomic/p-a1798150.entry.js.map +0 -1
  322. package/dist/atomic/p-b3f6561d.entry.js.map +0 -1
  323. package/dist/atomic/p-c5164dbf.entry.js.map +0 -1
  324. package/dist/atomic/p-dea22a8d.entry.js.map +0 -1
  325. package/dist/atomic/p-df8d38ca.entry.js.map +0 -1
  326. package/dist/atomic/p-e6dc9de7.entry.js.map +0 -1
  327. package/dist/atomic/p-e9dc8e90.entry.js.map +0 -1
  328. package/dist/cjs/result-template-decorators-432d11a9.js.map +0 -1
  329. package/dist/cjs/stencil-suggestion-manager-88cb88f2.js.map +0 -1
  330. package/dist/esm/result-template-decorators-2ed76ea9.js.map +0 -1
  331. package/dist/esm/stencil-suggestion-manager-1f4ed8d0.js.map +0 -1
  332. package/dist/types/decorators/commerce/product-template-decorators.d.ts +0 -68
  333. /package/dist/atomic/{p-017aa785.entry.js.map → p-a7c39901.entry.js.map} +0 -0
  334. /package/dist/atomic/{p-567b2841.entry.js.map → p-ca1425cc.entry.js.map} +0 -0
  335. /package/dist/atomic/{p-c2a5dac0.entry.js.map → p-f2c4209d.entry.js.map} +0 -0
@@ -9,6 +9,6 @@ import { Product } from '@coveo/headless/commerce';
9
9
  * @param element - The element that the event is dispatched to, which must be the child of a rendered "atomic-product".
10
10
  * @returns A promise that resolves on initialization of the parent "atomic-product" element, or rejects when there is no parent "atomic-product" element.
11
11
  *
12
- * @deprecated should only be used for Stencil components. For Lit components, use `fetchProductContext` from \@/src/decorators/commerce/product-template-decorators.ts
12
+ * @deprecated should only be used for Stencil components. For Lit components, use `fetchProductContext` from \@/src/components/commerce/product-template-component-utils/context/fetch-product-context.ts
13
13
  */
14
14
  export declare function productContext<T extends Product>(element: Element): Promise<T>;
@@ -1,5 +1,4 @@
1
1
  import type { i18n } from 'i18next';
2
- import type { AriaLiveRegionController } from "../../../utils/accessibility-utils";
3
2
  import type { FunctionalComponentWithChildren } from "../../../utils/functional-component-utils";
4
3
  import type { Breadcrumb } from './breadcrumb-types';
5
4
  export interface BreadcrumbButtonProps {
@@ -8,6 +7,5 @@ export interface BreadcrumbButtonProps {
8
7
  pathLimit: number;
9
8
  breadcrumb: Breadcrumb;
10
9
  i18n: i18n;
11
- ariaController: AriaLiveRegionController;
12
10
  }
13
11
  export declare const renderBreadcrumbButton: FunctionalComponentWithChildren<BreadcrumbButtonProps>;
@@ -1,8 +1,8 @@
1
1
  import { Result } from '@coveo/headless';
2
2
  import { EventEmitter } from '../../../stencil-public-runtime';
3
3
  import { InitializableComponent } from '../../../utils/initialization-utils';
4
- import { ResultContextEvent } from '../../search/result-template-components/result-template-decorators';
5
4
  import { AnyBindings } from '../interface/bindings';
5
+ import { ResultContextEvent } from "../../search/result-template-component-utils/context/stencil-result-template-decorators";
6
6
  /**
7
7
  * @part source-url
8
8
  * @part source-title
@@ -3,7 +3,7 @@ import { DisplayConfig } from '../../common/item-list/stencil-item-decorators';
3
3
  import { ItemRenderingFunction } from '../../common/item-list/stencil-item-list-common';
4
4
  import { ItemDisplayDensity, ItemDisplayImageSize, ItemDisplayLayout } from '../../common/layout/display-options';
5
5
  import { SearchStore } from '../atomic-search-interface/store';
6
- import { InteractiveResultContextEvent, ResultContextEvent } from '../result-template-components/result-template-decorators';
6
+ import { InteractiveResultContextEvent, ResultContextEvent } from "../result-template-component-utils/context/stencil-result-template-decorators";
7
7
  /**
8
8
  * The `atomic-result` component is used internally by the `atomic-result-list` component.
9
9
  */
@@ -160,7 +160,6 @@ export declare class AtomicSearchBox implements InitializableComponent<Bindings>
160
160
  private isSearchDisabledForEndUser;
161
161
  private getSearchInputLabel;
162
162
  private announceNewActiveSuggestionToScreenReader;
163
- private announceClearSearchBoxToScreenReader;
164
163
  private announceNewSuggestionsToScreenReader;
165
164
  private renderSlotContent;
166
165
  render(): any;
@@ -0,0 +1,8 @@
1
+ import type { FoldedResult, Result } from '@coveo/headless';
2
+ /**
3
+ * Retrieves `Result` on a rendered `atomic-result`.
4
+ *
5
+ * @param element - The element that the event is dispatched to
6
+ * @returns A promise that resolves on initialization of the parent `atomic-result` element, or rejects if missing
7
+ */
8
+ export declare function fetchResultContext<T extends Result | FoldedResult = Result>(element: Element): Promise<T>;
@@ -0,0 +1,12 @@
1
+ import type { InteractiveResult } from '@coveo/headless';
2
+ import type { LitElement } from 'lit';
3
+ import { InteractiveItemContextController } from "../../../common/item-list/context/interactive-item-context-controller";
4
+ /**
5
+ * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing interactive result context in result template components.
6
+ *
7
+ * @param host - The Lit component instance
8
+ * @returns InteractiveItemContextController instance
9
+ */
10
+ export declare function createInteractiveResultContextController(host: LitElement & {
11
+ error: Error;
12
+ }): InteractiveItemContextController<InteractiveResult>;
@@ -0,0 +1,18 @@
1
+ import type { FoldedResult, InteractiveResult, Result } from '@coveo/headless';
2
+ import type { LitElement } from 'lit';
3
+ import type { InteractiveItemContextEvent } from "../../../common/item-list/context/interactive-item-context-controller";
4
+ import { ItemContextController, type ItemContextEvent } from "../../../common/item-list/context/item-context-controller";
5
+ /**
6
+ * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing result context in result template components.
7
+ *
8
+ * @param host - The Lit component instance
9
+ * @param options - Configuration options
10
+ * @returns ItemContextController instance configured for atomic-result
11
+ */
12
+ export declare function createResultContextController(host: LitElement & {
13
+ error: Error | null;
14
+ }, options?: {
15
+ folded?: boolean;
16
+ }): ItemContextController<Result | FoldedResult>;
17
+ export type ResultContextEvent<T = Result | FoldedResult> = ItemContextEvent<T>;
18
+ export type InteractiveResultContextEvent<T extends InteractiveResult = InteractiveResult> = InteractiveItemContextEvent<T>;
@@ -1,5 +1,5 @@
1
1
  import { FoldedResult, Result } from '@coveo/headless';
2
- import { InteractiveItemContextEvent, ItemContextEvent } from '../../common/item-list/stencil-item-decorators';
2
+ import { InteractiveItemContextEvent, ItemContextEvent } from "../../../common/item-list/stencil-item-decorators";
3
3
  /**
4
4
  * A [StencilJS property decorator](https://stenciljs.com/) to be used for result template components.
5
5
  * This allows the Stencil component to fetch the current result from its rendered parent, the `atomic-result` component.
@@ -8,6 +8,8 @@ import { InteractiveItemContextEvent, ItemContextEvent } from '../../common/item
8
8
  * @ResultContext() private result!: Result;
9
9
  *
10
10
  * For more information and examples, view the "Utilities" section of the readme.
11
+ *
12
+ * @deprecated should only be used for Stencil components. For Lit components, use `createResultContextController` from \@/src/components/search/result-template-component-utils/context/result-context-controller.ts
11
13
  */
12
14
  export declare function ResultContext(opts?: {
13
15
  folded: boolean;
@@ -22,7 +24,9 @@ export type InteractiveResultContextEvent = InteractiveItemContextEvent;
22
24
  *
23
25
  * You should use the method in the [connectedCallback lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).
24
26
  *
25
- * @param element The element that the event is dispatched to, which must be the child of a rendered "atomic-result".
27
+ * @param element The element that the event is dispatched to, which must be the child of a rendered "atomic-result" element.
26
28
  * @returns A promise that resolves on initialization of the parent "atomic-result" element, or rejects when there is no parent "atomic-result" element.
29
+ *
30
+ * @deprecated should only be used for Stencil components. For Lit components, use `fetchResultContext` from \@/src/components/search/result-template-component-utils/context/fetch-result-context.ts
27
31
  */
28
32
  export declare function resultContext<T extends Result | FoldedResult = Result>(element: Element): Promise<T>;
@@ -12,7 +12,7 @@ export interface HierarchicalPathProps {
12
12
  }
13
13
  declare class HierarchicalPathDirective extends Directive {
14
14
  constructor(partInfo: PartInfo);
15
- render(props: HierarchicalPathProps): string | TemplateResult<1>[] | TemplateResult;
15
+ render(props: HierarchicalPathProps): string | TemplateResult | TemplateResult<1>[];
16
16
  private getEllipsedPath;
17
17
  }
18
18
  export declare const hierarchicalPath: (props: HierarchicalPathProps) => import("lit-html/directive.js").DirectiveResult<typeof HierarchicalPathDirective>;
@@ -2,7 +2,8 @@ export type { i18n } from 'i18next';
2
2
  export { Components, JSX } from './components';
3
3
  export { CommerceBindings } from './components/commerce/atomic-commerce-interface/atomic-commerce-interface';
4
4
  export { SelectChildProductEventArgs } from './components/commerce/atomic-product-children/select-child-product-event';
5
- export { productContext } from './components/commerce/product-template-component-utils/stencil-product-template-decorators';
5
+ export { fetchProductContext } from './components/commerce/product-template-component-utils/context/fetch-product-context';
6
+ export { productContext } from './components/commerce/product-template-component-utils/context/stencil-product-template-decorators';
6
7
  export { PopoverChildFacet } from './components/common/facets/popover/popover-type';
7
8
  export { RedirectionPayload } from './components/common/search-box/redirection-payload';
8
9
  export { dispatchSearchBoxSuggestionsEvent } from './components/common/suggestions/suggestions-events';
@@ -10,7 +11,6 @@ export type { SearchBoxSuggestionElement, SearchBoxSuggestions, SearchBoxSuggest
10
11
  export { elementHasNoQuery, elementHasQuery, } from './components/common/suggestions/suggestions-utils';
11
12
  export { RecsBindings } from './components/recommendations/atomic-recs-interface/atomic-recs-interface';
12
13
  export { Bindings } from './components/search/atomic-search-interface/atomic-search-interface';
13
- export { resultContext } from './components/search/result-template-components/result-template-decorators';
14
- export { fetchProductContext } from './decorators/commerce/product-template-decorators';
14
+ export { resultContext } from './components/search/result-template-component-utils/context/stencil-result-template-decorators';
15
15
  export { initializeBindings, MissingInterfaceParentError, } from './utils/initialization-utils';
16
16
  export { bindLogDocumentOpenOnResult } from './utils/result-utils';
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-10-08T14:16:52",
2
+ "timestamp": "2025-10-08T17:45:49",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.20.0",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coveo/atomic",
3
3
  "type": "module",
4
- "version": "3.35.0-pre.e38c46e295",
4
+ "version": "3.35.0-pre.e9982a2757",
5
5
  "description": "A web-component library for building modern UIs interfacing with the Coveo platform",
6
6
  "homepage": "https://docs.coveo.com/en/atomic/latest/",
7
7
  "repository": {
@@ -61,8 +61,9 @@
61
61
  "prod": "npx serve www -l 3333 --no-request-logging",
62
62
  "test": "npm run test:stencil && npm run test:lit",
63
63
  "test:stencil": "stencil test --spec -- src/utils/initialization-utils.spec.ts",
64
- "test:lit": "vitest run",
65
- "test:watch": "vitest",
64
+ "test:lit": "vitest run --project=atomic-default",
65
+ "test:watch": "vitest --project=atomic-default",
66
+ "test:storybook": "vitest run --project=storybook",
66
67
  "e2e": "cypress run --browser chrome",
67
68
  "e2e:firefox": "cypress run --browser firefox",
68
69
  "e2e:watch": "cypress open --browser chrome --e2e",
@@ -110,6 +111,7 @@
110
111
  "@stencil/react-output-target": "0.5.3",
111
112
  "@storybook/addon-a11y": "9.1.2",
112
113
  "@storybook/addon-docs": "9.1.2",
114
+ "@storybook/addon-vitest": "9.1.2",
113
115
  "@storybook/icons": "1.4.0",
114
116
  "@storybook/web-components-vite": "9.1.2",
115
117
  "@tailwindcss/postcss": "4.1.13",
@@ -118,6 +120,7 @@
118
120
  "@types/jest": "29.5.14",
119
121
  "@types/puppeteer": "7.0.4",
120
122
  "@vitest/browser": "3.2.4",
123
+ "@vitest/coverage-v8": "^3.2.4",
121
124
  "@wc-toolkit/storybook-helpers": "9.0.1",
122
125
  "axe-core": "4.10.3",
123
126
  "cypress": "13.7.3",
@@ -1,15 +0,0 @@
1
- import { closest } from '../../../utils/dom-utils.js';
2
- import { buildCustomEvent } from '../../../utils/event-utils.js';
3
- import { MissingParentError } from './context/item-context-controller.js';
4
- const itemContextEventName = 'atomic/resolveResult';
5
- export function fetchItemContext(element, parentName) {
6
- return new Promise((resolve, reject) => {
7
- const event = buildCustomEvent(itemContextEventName, (item) => {
8
- return resolve(item);
9
- });
10
- element.dispatchEvent(event);
11
- if (!closest(element, parentName)) {
12
- reject(new MissingParentError(element.nodeName.toLowerCase(), parentName));
13
- }
14
- });
15
- }
@@ -1,68 +0,0 @@
1
- import { InteractiveItemContextController, } from "../../components/common/item-list/context/interactive-item-context-controller";
2
- import { ItemContextController, } from "../../components/common/item-list/context/item-context-controller";
3
- import { fetchItemContext } from "../../components/common/item-list/fetch-item-context";
4
- /**
5
- * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing product context in product template components.
6
- *
7
- * @param host - The Lit component instance
8
- * @param options - Configuration options
9
- * @returns ItemContextController instance configured for atomic-product
10
- *
11
- * @example
12
- * ```typescript
13
- * @customElement('my-product-component')
14
- * export class MyProductComponent extends LitElement {
15
- * private productController = createProductContextController(this);
16
- *
17
- * @state() product!: Product;
18
- *
19
- * render() {
20
- * this.product = this.productController.item;
21
- * return html`<div>${this.product?.ec_name}</div>`;
22
- * }
23
- * }
24
- * ```
25
- */
26
- export function createProductContextController(host, options = {}) {
27
- return new ItemContextController(host, {
28
- parentName: 'atomic-product',
29
- folded: options.folded ?? false,
30
- });
31
- }
32
- /**
33
- * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing interactive product context in product template components.
34
- *
35
- * @param host - The Lit component instance
36
- * @returns InteractiveItemContextController instance
37
- *
38
- * @example
39
- * ```typescript
40
- * @customElement('my-interactive-product-component')
41
- * export class MyInteractiveProductComponent extends LitElement {
42
- * private interactiveProductController = createInteractiveProductContextController(this);
43
- *
44
- * @state() product!: Product;
45
- *
46
- * render() {
47
- * this.product = this.interactiveProductController.interactiveItem;
48
- * return html`<div>${this.product?.ec_name}</div>`;
49
- * }
50
- * }
51
- * ```
52
- */
53
- export function createInteractiveProductContextController(host) {
54
- return new InteractiveItemContextController(host);
55
- }
56
- /**
57
- * Retrieves `Product` on a rendered `atomic-product`.
58
- *
59
- * This utility function is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.
60
- *
61
- * You should use the utility function in the [`connectedCallback` lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).
62
- *
63
- * @param element - The element that the event is dispatched to, which must be the child of a rendered `atomic-product`.
64
- * @returns A promise that resolves on initialization of the parent `atomic-product` element, or rejects when there is no parent `atomic-product` element.
65
- */
66
- export function fetchProductContext(element) {
67
- return fetchItemContext(element, 'atomic-product');
68
- }
@@ -1 +0,0 @@
1
- {"file":"result-template-decorators.js","mappings":";;AASA;;;;;;;;;SASgB,aAAa,CAAC,OAA0B,EAAC,MAAM,EAAE,KAAK,EAAC;IACrE,OAAO,WAAW,CAAC,EAAC,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;AACzE,CAAC;SAEe,wBAAwB;IACtC,OAAO,sBAAsB,EAAE,CAAC;AAClC,CAAC;AAKD;;;;;;;;;;SAUgB,aAAa,CAC3B,OAAgB;IAEhB,OAAO,WAAW,CAAI,OAAO,EAAE,eAAe,CAAC,CAAC;AAClD;;;;","names":[],"sources":["src/components/search/result-template-components/result-template-decorators.tsx"],"sourcesContent":["import {FoldedResult, Result} from '@coveo/headless';\nimport {\n InteractiveItemContext,\n InteractiveItemContextEvent,\n ItemContext,\n ItemContextEvent,\n itemContext,\n} from '../../common/item-list/stencil-item-decorators';\n\n/**\n * A [StencilJS property decorator](https://stenciljs.com/) to be used for result template components.\n * This allows the Stencil component to fetch the current result from its rendered parent, the `atomic-result` component.\n *\n * Example:\n * @ResultContext() private result!: Result;\n *\n * For more information and examples, view the \"Utilities\" section of the readme.\n */\nexport function ResultContext(opts: {folded: boolean} = {folded: false}) {\n return ItemContext({parentName: 'atomic-result', folded: opts.folded});\n}\n\nexport function InteractiveResultContext() {\n return InteractiveItemContext();\n}\n\nexport type ResultContextEvent<T = Result> = ItemContextEvent<T>;\nexport type InteractiveResultContextEvent = InteractiveItemContextEvent;\n\n/**\n * Retrieves `Result` on a rendered `atomic-result`.\n *\n * This method is useful for building custom result template elements, see [Create a Result List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-result-template-component-example) for more information.\n *\n * You should use the method in the [connectedCallback lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element The element that the event is dispatched to, which must be the child of a rendered \"atomic-result\".\n * @returns A promise that resolves on initialization of the parent \"atomic-result\" element, or rejects when there is no parent \"atomic-result\" element.\n */\nexport function resultContext<T extends Result | FoldedResult = Result>(\n element: Element\n) {\n return itemContext<T>(element, 'atomic-result');\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"version":3,"names":["atomicResultLinkCss","AtomicResultLinkStyle0","AtomicResultLink","initialize","this","host","dispatchEvent","buildCustomEvent","stopPropagation","connectedCallback","slotName","hasDefaultSlot","getDefaultSlotFromHost","linkAttributes","getAttributesFromLinkSlot","render","href","isUndefined","hrefTemplate","result","clickUri","buildStringTemplateFromResult","bindings","h","LinkWithItemAnalytics","key","onSelect","interactiveResult","select","onBeginDelayedSelect","beginDelayedSelect","onCancelPendingSelect","cancelPendingSelect","attributes","field","default","__decorate","InitializeBindings","ResultContext","InteractiveResultContext"],"sources":["src/components/search/result-template-components/atomic-result-link/atomic-result-link.pcss?tag=atomic-result-link","src/components/search/result-template-components/atomic-result-link/atomic-result-link.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n@reference '../../../../utils/tailwind-utilities/link-style.css';\natomic-result-link {\n a {\n @apply link-style;\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {InteractiveResult} from '@coveo/headless';\nimport {Component, h, Prop, Element} from '@stencil/core';\nimport {buildCustomEvent} from '../../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {buildStringTemplateFromResult} from '../../../../utils/result-utils';\nimport {getDefaultSlotFromHost} from '../../../../utils/slot-utils';\nimport {AnyUnfoldedItem} from '../../../common/item-list/unfolded-item';\nimport {getAttributesFromLinkSlot} from '../../../common/item-link/attributes-slot';\nimport {LinkWithItemAnalytics} from '../../../common/item-link/stencil-item-link';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {\n InteractiveResultContext,\n ResultContext,\n} from '../result-template-decorators';\n\n/**\n * The `atomic-result-link` component automatically transforms a search result title into a clickable link that points to the original item.\n * @slot default - Lets you display alternative content inside the link\n * @slot attributes - Lets you pass [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) down to the link element, overriding other attributes, to be used exclusively with an \"a\" tag such as `<a slot=\"attributes\" target=\"_blank\" download></a>`.\n */\n@Component({\n tag: 'atomic-result-link',\n styleUrl: 'atomic-result-link.pcss',\n shadow: false,\n})\nexport class AtomicResultLink implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n public error!: Error;\n\n @ResultContext() private result!: AnyUnfoldedItem;\n @InteractiveResultContext() private interactiveResult!: InteractiveResult;\n\n @Element() private host!: HTMLElement;\n\n /**\n * Specifies a template literal from which to generate the `href` attribute value (see\n * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).\n *\n * The template literal can reference any number of result properties from the parent result. It can also reference the window object.\n *\n * For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the result's `clickUri` and `itemtitle` fields.\n * ```html\n * <atomic-result-link href-template='${clickUri}?id=${raw.itemtitle}'></atomic-result-link>\n * ```\n */\n @Prop({reflect: true}) hrefTemplate?: string;\n\n private hasDefaultSlot!: boolean;\n private linkAttributes?: Attr[];\n private stopPropagation?: boolean;\n\n public initialize() {\n this.host.dispatchEvent(\n buildCustomEvent(\n 'atomic/resolveStopPropagation',\n (stopPropagation: boolean) => {\n this.stopPropagation = stopPropagation;\n }\n )\n );\n }\n\n public connectedCallback() {\n const slotName = 'attributes';\n this.hasDefaultSlot = !!getDefaultSlotFromHost(this.host);\n this.linkAttributes = getAttributesFromLinkSlot(this.host, slotName);\n }\n\n public render() {\n const href = isUndefined(this.hrefTemplate)\n ? this.result.clickUri\n : buildStringTemplateFromResult(\n this.hrefTemplate,\n this.result,\n this.bindings\n );\n\n return (\n <LinkWithItemAnalytics\n href={href}\n onSelect={() => this.interactiveResult.select()}\n onBeginDelayedSelect={() => this.interactiveResult.beginDelayedSelect()}\n onCancelPendingSelect={() =>\n this.interactiveResult.cancelPendingSelect()\n }\n attributes={this.linkAttributes}\n stopPropagation={this.stopPropagation}\n >\n {this.hasDefaultSlot ? (\n <slot />\n ) : (\n <atomic-result-text\n field=\"title\"\n default=\"no-title\"\n ></atomic-result-text>\n )}\n </LinkWithItemAnalytics>\n );\n }\n}\n"],"mappings":"gfAAA,MAAMA,EAAsB,qwkEAC5B,MAAAC,EAAeD,E,iXC4BFE,EAAgB,M,qDA0BpB,UAAAC,GACLC,KAAKC,KAAKC,cACRC,EACE,iCACCC,IACCJ,KAAKI,gBAAkBA,CAAe,I,CAMvC,iBAAAC,GACL,MAAMC,EAAW,aACjBN,KAAKO,iBAAmBC,EAAuBR,KAAKC,MACpDD,KAAKS,eAAiBC,EAA0BV,KAAKC,KAAMK,E,CAGtD,MAAAK,GACL,MAAMC,EAAOC,EAAYb,KAAKc,cAC1Bd,KAAKe,OAAOC,SACZC,EACEjB,KAAKc,aACLd,KAAKe,OACLf,KAAKkB,UAGX,OACEC,EAACC,EAAqB,CAAAC,IAAA,2CACpBT,KAAMA,EACNU,SAAU,IAAMtB,KAAKuB,kBAAkBC,SACvCC,qBAAsB,IAAMzB,KAAKuB,kBAAkBG,qBACnDC,sBAAuB,IACrB3B,KAAKuB,kBAAkBK,sBAEzBC,WAAY7B,KAAKS,eACjBL,gBAAiBJ,KAAKI,iBAErBJ,KAAKO,eACJY,EAAA,aAEAA,EAAA,sBACEW,MAAM,QACNC,QAAQ,a,6BAnEWC,EAAA,CAA5BC,K,+BAGwBD,EAAA,CAAxBE,K,6BACmCF,EAAA,CAAnCG,K","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["atomicQuickviewCss","AtomicQuickviewStyle0","AtomicQuickview","this","sandbox","onNextQuickview","evt","stopImmediatePropagation","quickview","next","onPreviousQuickview","previous","focusTarget","buttonFocusTarget","FocusTargetController","initialize","buildQuickview","bindings","engine","options","result","Schema","StringValue","required","regex","validate","addQuickviewModalIfNeeded","quickviewModalRef","quickviewModal","interfaceElement","querySelector","document","createElement","setAttribute","appendChild","updateModalContent","state","content","total","quickviewState","totalResults","current","currentResult","modalCloseCallback","focus","quickviewAriaMessage","isLoading","i18n","t","first","last","title","onClick","event","stopPropagation","fetchResultContent","componentWillUpdate","render","resultHasPreview","h","Button","key","part","style","class","ref","setTarget","icon","QuickviewIcon","__decorate","InitializeBindings","ResultContext","BindStateToController","AriaLiveRegion"],"sources":["src/components/search/result-template-components/atomic-quickview/atomic-quickview.pcss?tag=atomic-quickview&encapsulation=shadow","src/components/search/result-template-components/atomic-quickview/atomic-quickview.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n","import {Schema, StringValue} from '@coveo/bueno';\nimport {\n Result,\n buildQuickview,\n Quickview,\n QuickviewState,\n} from '@coveo/headless';\nimport {Component, h, Listen, Prop, State} from '@stencil/core';\nimport QuickviewIcon from '../../../../images/quickview.svg';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {\n AriaLiveRegion,\n FocusTargetController,\n} from '../../../../utils/stencil-accessibility-utils';\nimport {Button} from '../../../common/stencil-button';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-quickview` component renders a button which the end user can click to open a modal box containing a preview\n * about a result.\n *\n * The `atomic-quickview` is not meant to replace the `atomic-result-link` to access an item in a result template; it has certain limitations (e.g., custom styles and embedded\n * images/links may not work as expected in an `atomic-quickview`).\n *\n * @part button - The button that opens the quickview modal on click.\n * @part icon - The icon for the quickview button.\n */\n@Component({\n tag: 'atomic-quickview',\n styleUrl: 'atomic-quickview.pcss',\n shadow: true,\n})\nexport class AtomicQuickview implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n private buttonFocusTarget?: FocusTargetController;\n\n @State() public error!: Error;\n\n public quickview!: Quickview;\n\n @BindStateToController('quickview')\n @State()\n public quickviewState!: QuickviewState;\n\n /**\n * The `sandbox` attribute to apply to the quickview iframe.\n *\n * The quickview is loaded inside an iframe with a [`sandbox`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox) attribute for security reasons.\n *\n * This attribute exists primarily to protect against potential XSS attacks that could originate from the document being displayed.\n *\n * By default, the sandbox attributes are: `allow-popups allow-top-navigation allow-same-origin`.\n *\n * `allow-same-origin` is not optional, and must always be included in the list of allowed capabilities for the component to function properly.\n */\n @Prop() public sandbox =\n 'allow-popups allow-top-navigation allow-same-origin';\n\n @AriaLiveRegion('quickview')\n protected quickviewAriaMessage!: string;\n\n @Listen('atomic/quickview/next', {target: 'body'})\n public onNextQuickview(evt: Event) {\n evt.stopImmediatePropagation();\n this.quickview.next();\n }\n\n @Listen('atomic/quickview/previous', {target: 'body'})\n public onPreviousQuickview(evt: Event) {\n evt.stopImmediatePropagation();\n this.quickview.previous();\n }\n\n private quickviewModalRef?: HTMLAtomicQuickviewModalElement;\n\n public get focusTarget() {\n if (!this.buttonFocusTarget) {\n this.buttonFocusTarget = new FocusTargetController(this);\n }\n return this.buttonFocusTarget;\n }\n\n public initialize() {\n this.quickview = buildQuickview(this.bindings.engine, {\n options: {result: this.result},\n });\n new Schema({\n sandbox: new StringValue({\n required: true,\n regex: /allow-same-origin/,\n }),\n }).validate({sandbox: this.sandbox});\n }\n\n private addQuickviewModalIfNeeded() {\n if (this.quickviewModalRef) {\n return;\n }\n\n const quickviewModal = this.bindings.interfaceElement.querySelector(\n 'atomic-quickview-modal'\n );\n if (quickviewModal) {\n this.quickviewModalRef = quickviewModal;\n return;\n }\n this.quickviewModalRef = document.createElement('atomic-quickview-modal');\n this.quickviewModalRef.setAttribute('sandbox', this.sandbox);\n this.bindings.interfaceElement.appendChild(this.quickviewModalRef);\n }\n\n private updateModalContent() {\n if (this.quickviewModalRef && this.quickview.state.content) {\n this.quickviewModalRef.content = this.quickview.state.content;\n this.quickviewModalRef.result = this.result;\n this.quickviewModalRef.total = this.quickviewState.totalResults;\n this.quickviewModalRef.current = this.quickviewState.currentResult;\n this.quickviewModalRef.modalCloseCallback = () =>\n this.focusTarget.focus();\n\n this.quickviewAriaMessage = this.quickviewState.isLoading\n ? this.bindings.i18n.t('quickview-loading')\n : this.bindings.i18n.t('quickview-loaded', {\n first: this.quickviewState.currentResult,\n last: this.quickviewState.totalResults,\n title: this.result.title,\n });\n }\n }\n\n private onClick(event?: MouseEvent) {\n event?.stopPropagation();\n this.quickview.fetchResultContent();\n }\n\n componentWillUpdate(): void {\n this.addQuickviewModalIfNeeded();\n this.updateModalContent();\n }\n\n public render() {\n if (this.quickviewState.resultHasPreview) {\n return (\n <Button\n part=\"button\"\n title={this.bindings.i18n.t('quickview')}\n style=\"outline-primary\"\n class=\"p-2\"\n onClick={(event) => this.onClick(event)}\n ref={this.focusTarget.setTarget}\n >\n <atomic-icon\n part=\"icon\"\n class=\"flex w-5 justify-center\"\n icon={QuickviewIcon}\n ></atomic-icon>\n </Button>\n );\n }\n }\n}\n"],"mappings":"6iBAAA,MAAMA,EAAqB,+8iEAC3B,MAAAC,EAAeD,E,iXCoCFE,EAAe,M,yBAwBXC,KAAAC,QACb,sD,gEAAA,qD,CAMK,eAAAC,CAAgBC,GACrBA,EAAIC,2BACJJ,KAAKK,UAAUC,M,CAIV,mBAAAC,CAAoBJ,GACzBA,EAAIC,2BACJJ,KAAKK,UAAUG,U,CAKjB,eAAWC,GACT,IAAKT,KAAKU,kBAAmB,CAC3BV,KAAKU,kBAAoB,IAAIC,EAAsBX,K,CAErD,OAAOA,KAAKU,iB,CAGP,UAA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BAAkB,CACxC,OACEC,EAACC,EAAM,CAAAC,IAAA,2CACLC,KAAK,SACLX,MAAOhD,KAAKc,SAAS8B,KAAKC,EAAE,aAC5Be,MAAM,kBACNC,MAAM,MACNZ,QAAUC,GAAUlD,KAAKiD,QAAQC,GACjCY,IAAK9D,KAAKS,YAAYsD,WAEtBP,EAAA,eAAAE,IAAA,2CACEC,KAAK,OACLE,MAAM,0BACNG,KAAMC,I,IA1HaC,EAAA,CAA5BC,K,+BACwBD,EAAA,CAAxBE,K,6BASMF,EAAA,CAFNG,EAAsB,c,qCAmBbH,EAAA,CADTI,EAAe,c","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["ResultContext","opts","folded","ItemContext","parentName","InteractiveResultContext","InteractiveItemContext","resultContext","element","itemContext"],"sources":["src/components/search/result-template-components/result-template-decorators.tsx"],"sourcesContent":["import {FoldedResult, Result} from '@coveo/headless';\nimport {\n InteractiveItemContext,\n InteractiveItemContextEvent,\n ItemContext,\n ItemContextEvent,\n itemContext,\n} from '../../common/item-list/stencil-item-decorators';\n\n/**\n * A [StencilJS property decorator](https://stenciljs.com/) to be used for result template components.\n * This allows the Stencil component to fetch the current result from its rendered parent, the `atomic-result` component.\n *\n * Example:\n * @ResultContext() private result!: Result;\n *\n * For more information and examples, view the \"Utilities\" section of the readme.\n */\nexport function ResultContext(opts: {folded: boolean} = {folded: false}) {\n return ItemContext({parentName: 'atomic-result', folded: opts.folded});\n}\n\nexport function InteractiveResultContext() {\n return InteractiveItemContext();\n}\n\nexport type ResultContextEvent<T = Result> = ItemContextEvent<T>;\nexport type InteractiveResultContextEvent = InteractiveItemContextEvent;\n\n/**\n * Retrieves `Result` on a rendered `atomic-result`.\n *\n * This method is useful for building custom result template elements, see [Create a Result List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-result-template-component-example) for more information.\n *\n * You should use the method in the [connectedCallback lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element The element that the event is dispatched to, which must be the child of a rendered \"atomic-result\".\n * @returns A promise that resolves on initialization of the parent \"atomic-result\" element, or rejects when there is no parent \"atomic-result\" element.\n */\nexport function resultContext<T extends Result | FoldedResult = Result>(\n element: Element\n) {\n return itemContext<T>(element, 'atomic-result');\n}\n"],"mappings":"2DAkBgBA,EAAcC,EAA0B,CAACC,OAAQ,QAC/D,OAAOC,EAAY,CAACC,WAAY,gBAAiBF,OAAQD,EAAKC,QAChE,C,SAEgBG,IACd,OAAOC,GACT,C,SAegBC,EACdC,GAEA,OAAOC,EAAeD,EAAS,gBACjC,Q","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["possiblyWarnOnBadFieldType","field","itemValueRaw","host","logger","isArray","error","nodeName","toLowerCase","ItemTextFallback","defaultValue","item","getProperty","children","raw","isUndefined","remove","h","Fragment","renderWithHighlights","value","highlights","highlightString","openingDelimiter","closingDelimiter","highlightedValue","content","replace","RegExp","ItemTextHighlighted","highlightKeywords","onError","textValue","Host","innerHTML","AtomicResultText","this","shouldHighlight","render","resultValueAsString","getStringValueFromResultOrNull","result","bindings","engine","default","ResultTemplatesHelpers","getResultProperty","getFieldValueCaption","i18n","HighlightUtils","__decorate","InitializeBindings","ResultContext","AtomicText","strings","t","count","connectedCallback","Error"],"sources":["src/components/common/item-text/field-warning.ts","src/components/common/item-text/stencil-item-text-fallback.tsx","src/components/common/item-text/render-highlights.ts","src/components/common/item-text/stencil-item-text-highlighted.tsx","src/components/search/result-template-components/atomic-result-text/atomic-result-text.tsx","src/components/search/atomic-text/atomic-text.tsx"],"sourcesContent":["import {isArray} from '@coveo/bueno';\n\nexport function possiblyWarnOnBadFieldType(\n field: string,\n itemValueRaw: unknown,\n host: HTMLElement,\n logger: Pick<Console, 'error'>\n) {\n if (isArray(itemValueRaw)) {\n logger.error(\n `${host.nodeName.toLowerCase()} cannot be used with multi value field \"${field}\" with values \"${itemValueRaw}\".`,\n host\n );\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {Fragment, FunctionalComponent, VNode, h} from '@stencil/core';\nimport {possiblyWarnOnBadFieldType} from './field-warning';\n\nexport interface ItemTextProps<T> {\n logger: Pick<Console, 'error'>;\n host: HTMLElement;\n defaultValue: string | undefined;\n field: string;\n item: T;\n getProperty: (result: T, property: string) => unknown;\n}\n\nexport const ItemTextFallback = <T,>(\n {field, host, logger, defaultValue, item, getProperty}: ItemTextProps<T>,\n children: VNode[]\n): FunctionalComponent<ItemTextProps<T>> | null => {\n const raw = getProperty(item, field);\n possiblyWarnOnBadFieldType(field, raw, host, logger);\n\n if (isUndefined(defaultValue)) {\n host.remove();\n return null;\n } else {\n return <Fragment>{children}</Fragment>;\n }\n};\n","export type HighlightKeywords = {\n offset: number;\n length: number;\n};\n\nexport type HighlightString = (params: {\n content: string;\n openingDelimiter: string;\n closingDelimiter: string;\n highlights: HighlightKeywords[];\n}) => string;\n\nexport function renderWithHighlights(\n value: string,\n highlights: HighlightKeywords[],\n highlightString: HighlightString\n) {\n const openingDelimiter = '_openingDelimiter_';\n const closingDelimiter = '_closingDelimiter_';\n const highlightedValue = highlightString({\n content: value,\n openingDelimiter,\n closingDelimiter,\n highlights,\n });\n return highlightedValue\n .replace(new RegExp(openingDelimiter, 'g'), '<b>')\n .replace(new RegExp(closingDelimiter, 'g'), '</b>');\n}\n","import {FunctionalComponent, h, Host} from '@stencil/core';\nimport {\n HighlightKeywords,\n HighlightString,\n renderWithHighlights,\n} from './render-highlights';\n\nexport interface ItemTextHighlightedProps {\n textValue: string;\n highlightKeywords: HighlightKeywords[];\n onError: (error: Error) => void;\n highlightString: HighlightString;\n}\n\nexport const ItemTextHighlighted: FunctionalComponent<\n ItemTextHighlightedProps\n> = ({highlightKeywords, highlightString, onError, textValue}) => {\n try {\n const highlightedValue = renderWithHighlights(\n textValue,\n highlightKeywords,\n highlightString\n );\n\n // deepcode ignore ReactSetInnerHtml: This is not React code\n return <Host innerHTML={highlightedValue}></Host>;\n } catch (error) {\n onError(error as Error);\n }\n};\n","import {HighlightUtils, Result, ResultTemplatesHelpers} from '@coveo/headless';\nimport {Component, Prop, h, Element, State} from '@stencil/core';\nimport {getFieldValueCaption} from '../../../../utils/field-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {getStringValueFromResultOrNull} from '../../../../utils/result-utils';\nimport {ItemTextFallback} from '../../../common/item-text/stencil-item-text-fallback';\nimport {ItemTextHighlighted} from '../../../common/item-text/stencil-item-text-highlighted';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-result-text` component renders the value of a string result field.\n */\n@Component({\n tag: 'atomic-result-text',\n shadow: false,\n})\nexport class AtomicResultText implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n\n @Element() private host!: HTMLElement;\n\n @State() public error!: Error;\n\n /**\n * The result field which the component should use.\n * This will look in the Result object first, and then in the Result.raw object for the fields.\n * It is important to include the necessary field in the `atomic-search-interface` component.\n */\n @Prop({reflect: true}) public field!: string;\n /**\n * When this is set to `true`, the component attempts to highlight text based on the highlighting properties provided by the search API response.\n */\n @Prop({reflect: true}) public shouldHighlight = true;\n\n /**\n * The locale key for the text to display when the configured field has no value.\n */\n @Prop({reflect: true}) public default?: string;\n\n public render() {\n const resultValueAsString = getStringValueFromResultOrNull(\n this.result,\n this.field\n );\n\n if (resultValueAsString === null) {\n return (\n <ItemTextFallback\n field={this.field}\n host={this.host}\n logger={this.bindings.engine.logger}\n defaultValue={this.default}\n item={this.result}\n getProperty={ResultTemplatesHelpers.getResultProperty}\n >\n <atomic-text\n value={getFieldValueCaption(\n this.field,\n this.default!,\n this.bindings.i18n\n )}\n ></atomic-text>\n </ItemTextFallback>\n );\n }\n\n const textValue = `${resultValueAsString}`;\n const highlightKeywords = ResultTemplatesHelpers.getResultProperty(\n this.result,\n `${this.field}Highlights`\n ) as HighlightUtils.HighlightKeyword[];\n\n return this.shouldHighlight && highlightKeywords ? (\n <ItemTextHighlighted\n textValue={textValue}\n highlightKeywords={highlightKeywords}\n highlightString={HighlightUtils.highlightString}\n onError={(error) => (this.error = error)}\n ></ItemTextHighlighted>\n ) : (\n getFieldValueCaption(this.field, textValue, this.bindings.i18n)\n );\n }\n}\n","import {Component, Prop, State} from '@stencil/core';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {Bindings} from '../atomic-search-interface/atomic-search-interface';\n\n/**\n * The `atomic-text` component leverages the I18n translation module through the atomic-search-interface.\n */\n@Component({\n tag: 'atomic-text',\n shadow: true,\n})\nexport class AtomicText implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n\n private strings = {\n value: () =>\n this.bindings.i18n.t(this.value, {\n count: this.count,\n }),\n };\n @State() public error!: Error;\n\n /**\n * The string key value.\n */\n @Prop({reflect: true}) public value!: string;\n /**\n * The count value used for plurals.\n */\n @Prop({reflect: true}) public count?: number;\n\n public connectedCallback() {\n if (!this.value) {\n this.error = new Error('The \"value\" attribute must be defined.');\n }\n }\n\n public render() {\n return this.strings.value();\n }\n}\n"],"mappings":"sdAEgBA,EACdC,EACAC,EACAC,EACAC,GAEA,GAAIC,EAAQH,GAAe,CACzBE,EAAOE,MACL,GAAGH,EAAKI,SAASC,wDAAwDP,mBAAuBC,MAChGC,E,CAGN,CCDO,MAAMM,EAAmB,EAC7BR,QAAOE,OAAMC,SAAQM,eAAcC,OAAMC,eAC1CC,KAEA,MAAMC,EAAMF,EAAYD,EAAMV,GAC9BD,EAA2BC,EAAOa,EAAKX,EAAMC,GAE7C,GAAIW,EAAYL,GAAe,CAC7BP,EAAKa,SACL,OAAO,I,KACF,CACL,OAAOC,EAACC,EAAQ,KAAEL,E,YCZNM,EACdC,EACAC,EACAC,GAEA,MAAMC,EAAmB,qBACzB,MAAMC,EAAmB,qBACzB,MAAMC,EAAmBH,EAAgB,CACvCI,QAASN,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B,MAAO,CACfgB,KAAK9B,MAAQ,IAAIoD,MAAM,yC,EAIpB,MAAApB,GACL,OAAOF,KAAKkB,QAAQlC,O,GA1BO8B,EAAA,CAA5BC,K","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["atomicResultImageCss","AtomicResultImageStyle0","AtomicResultImage","this","useFallback","url","value","ResultTemplatesHelpers","getResultProperty","result","field","Array","isArray","altText","imageAltField","bindings","i18n","t","itemName","title","logWarning","message","engine","logger","warn","host","handleImageError","fallback","handleMissingFallback","remove","validateUrl","render","h","alt","src","filterProtocol","onError","loading","__decorate","InitializeBindings","ResultContext"],"sources":["src/components/search/result-template-components/atomic-result-image/atomic-result-image.pcss?tag=atomic-result-image","src/components/search/result-template-components/atomic-result-image/atomic-result-image.tsx"],"sourcesContent":["atomic-result-image {\n display: grid;\n place-items: center;\n grid-template-rows: 100%;\n width: 100%;\n height: 100%;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n}\n","import {Result, ResultTemplatesHelpers} from '@coveo/headless';\nimport {Component, h, Prop, Element, State} from '@stencil/core';\nimport {\n InitializeBindings,\n InitializableComponent,\n} from '../../../../utils/initialization-utils';\nimport {filterProtocol} from '../../../../utils/xss-utils';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-result-image` component renders an image from a result field.\n */\n@Component({\n tag: 'atomic-result-image',\n styleUrl: 'atomic-result-image.pcss',\n shadow: false,\n})\nexport class AtomicResultImage implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n @Element() private host!: HTMLElement;\n @State() private useFallback = false;\n\n /**\n * The result field which the component should use. This will look for the field in the Result object first, then in the Result.raw object. It is important to include the necessary field in the `atomic-search-interface` component.\n */\n @Prop({reflect: true}) field!: string;\n\n /**\n * The result field that contains the alt text for the image. This will look for the field in the Result object first, then in the Result.raw object\n *\n * If the field is not specified, or does not contain a valid value, the alt text will be set to \"Image for {productName}\".\n */\n @Prop({reflect: true}) imageAltField?: string;\n\n /**\n * An optional fallback image URL that will be used in case the specified image field is not available or encounters an error.\n */\n @Prop({reflect: true}) fallback?: string;\n\n public error!: Error;\n\n public get url() {\n const value = ResultTemplatesHelpers.getResultProperty(\n this.result,\n this.field\n );\n return Array.isArray(value) ? value[0] : value;\n }\n\n private get altText(): string {\n if (this.imageAltField) {\n const value = ResultTemplatesHelpers.getResultProperty(\n this.result,\n this.imageAltField\n );\n\n if (Array.isArray(value) && typeof value[0] === 'string') {\n return value[0];\n }\n\n if (typeof value === 'string') {\n return value;\n }\n }\n\n return this.bindings.i18n.t('image-alt-fallback', {\n itemName: this.result.title,\n });\n }\n\n private logWarning(message: string) {\n this.bindings.engine.logger.warn(message, this.host);\n }\n\n private handleImageError() {\n const message = `The image url \"${this.url}\" is not valid or could not be loaded. You might want to add a \"fallback\" property.`;\n\n this.fallback ? (this.useFallback = true) : this.logWarning(message);\n }\n\n private handleMissingFallback(message: string) {\n if (!this.fallback) {\n this.logWarning(message);\n this.host.remove();\n return null;\n }\n return this.fallback;\n }\n\n private validateUrl(url: string) {\n if (!url) {\n const message = `\"${this.field}\" is missing. Please review your indexation. You might want to add a \"fallback\" property.`;\n return this.handleMissingFallback(message);\n }\n\n if (typeof url !== 'string') {\n const message = `Expected \"${this.field}\" to be a text field. Please review your indexation. You might want to add a \"fallback\" property.`;\n return this.handleMissingFallback(message);\n }\n\n return url;\n }\n\n public render() {\n let url = this.useFallback ? this.fallback : this.url;\n\n if (!this.useFallback) {\n url = this.validateUrl(url);\n if (!url) {\n return;\n }\n }\n\n return (\n <img\n alt={this.altText}\n src={filterProtocol(url)}\n onError={() => this.handleImageError()}\n loading=\"lazy\"\n />\n );\n }\n}\n"],"mappings":"+UAAA,MAAMA,EAAuB,wKAC7B,MAAAC,EAAeD,E,iXCiBFE,EAAiB,M,yBAIXC,KAAAC,YAAc,M,iBAAA,M,0EAqB/B,OAAWC,GACT,MAAMC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BArGeC,EAAA,CAA5BC,K,+BACwBD,EAAA,CAAxBE,K","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{h as t,f as s}from"./p-dc3df5ce.js";import{B as e}from"./p-b93ccff9.js";import{isNullOrUndefined as i}from"@coveo/bueno";import{D as n}from"./p-f284897c.js";import{d as r}from"./p-01c91b69.js";import{a as o,e as a}from"./p-0a051b8d.js";const h=`<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="7" cy="7" r="6.5" stroke="currentColor"/>\n<path d="M16 16L12 12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n`;const u=(s,e)=>{const i=()=>{const t="flex bg-background w-full border border-neutral rounded-md focus-within:ring-3 absolute top-0 left-0";const e=s.disabled?"focus-within:border-disabled focus-within:ring-neutral":"focus-within:border-primary focus-within:ring-ring-primary";return[t,e].join(" ")};return t("div",{part:"wrapper",class:i(),onFocusout:s.onFocusout},e)};const c=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M15 1.00012L1.00012 14.9999" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M0.999878 1L14.9999 15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n`;const l=({inputRef:s,bindings:i,onClick:n,...r})=>t("div",{part:"clear-button-wrapper",class:"ml-2 flex items-center justify-center py-2"},t(e,{style:"text-transparent",part:"clear-button",class:"text-neutral-dark flex h-8 w-8 shrink-0 items-center justify-center",onClick:()=>{n?.();s?.focus()},ariaLabel:i.i18n.t("clear-search"),...r},t("atomic-icon",{part:"clear-icon",icon:c,class:"h-4 w-4"})));function g(t){return{autocomplete:"off",autocapitalize:"off",autocorrect:"off",...t.activeDescendant&&{"aria-activedescendant":t.activeDescendant},"aria-autocomplete":"both","aria-haspopup":"true","aria-controls":t.id}}function f(t,s){const e=t?.parentNode;if(!e){return}if(t.value==="\n"){return}e.dataset.replicatedValue=s??t.value}function d(t){const s=t?.parentNode;if(s){delete s.dataset.replicatedValue}}function p(t){const s=t?.parentNode;if(s){s.classList.remove("expanded")}}function m(t){const s=t?.parentNode;if(s){s.classList.add("expanded")}}const w=({textAreaRef:s,loading:e,bindings:i,onInput:n,onFocus:r,onBlur:o,onChange:a,onKeyDown:h,onKeyUp:u,value:c,ariaLabel:w,onClear:b,popup:v,...y})=>t("div",{class:"flex grow overflow-hidden"},t("div",{part:"textarea-expander",class:"grid grow overflow-hidden"},t("textarea",{part:"textarea","aria-label":w,placeholder:i.i18n.t("search"),class:"placeholder-neutral-dark",rows:1,onInput:t=>{n?.(t);f(s)},onKeyDown:t=>{f(s);if(t.key==="Enter"){if(t.shiftKey){return}t.preventDefault()}h?.(t)},onKeyUp:t=>{u?.(t);if(t.key==="Enter"){t.preventDefault();return}f(s)},onBlur:t=>{o?.(t);p(s);f(s)},onChange:t=>{a?.(t);f(s)},onFocus:t=>{r?.(t);const e=t.target;f(s??e);m(s??e)},autocomplete:"off",...v&&g(v),...y,value:c})),e&&t("div",{class:"searchbox-button-wrapper ml-2 flex items-center justify-center"},t("span",{part:"loading",class:"loading mr-2 grid h-5 w-5 animate-spin place-items-center rounded-full bg-linear-to-r"})),!e&&c&&t(l,{inputRef:s,bindings:i,onClick:()=>{b();d(s)}}));function b(t,s){let e;const i=new Promise(((t,i)=>{e=setTimeout((()=>{i(new Error("Promise timed out."))}),s)}));return Promise.race([t,i]).then((()=>{clearTimeout(e)}))}class v{constructor(t){this.ownerSearchBoxProps=t;this.suggestions=[];this.leftSuggestionElements=[];this.rightSuggestionElements=[];this.leftPanel=undefined;this.rightPanel=undefined;this.activeDescendant="";this.suggestedQuery="";this.keyboardActiveDescendant="";this.queryDataAttribute="data-query";this.suggestionEvents=[];this.previousActiveDescendantElement=null;this.leftSuggestions=[];this.rightSuggestions=[];this.triggerSuggestions=r((()=>this.executeQuerySuggestion()),this.ownerSearchBoxProps.getSuggestionDelay())}get partialSuggestionBindings(){return{suggestedQuery:()=>this.suggestedQuery,clearSuggestions:()=>this.clearSuggestions(),triggerSuggestions:()=>this.triggerSuggestions(),getSuggestions:()=>this.suggestions,getSuggestionElements:()=>this.allSuggestionElements}}get activeDescendantElement(){if(!this.hasActiveDescendant){return null}return this.leftPanel?.querySelector(`#${this.activeDescendant}`)||this.rightPanel?.querySelector(`#${this.activeDescendant}`)||null}onSubmit(){this.clickOnActiveElement();this.clearSuggestions()}updateActiveDescendant(t=""){this.activeDescendant=t;s(this.ownerSearchBoxProps.getHost())}updateKeyboardActiveDescendant(t=""){this.keyboardActiveDescendant=t}clickOnActiveElement(){this.activeDescendantElement?.click();this.updateActiveDescendant()}isRightPanelInFocus(){if(i(this.panelInFocus)||i(this.rightPanel)){return false}return this.panelInFocus===this.rightPanel}initializeSuggestions(t){this.suggestions=this.suggestionEvents.map((s=>s(t)))}registerSuggestionsFromEvent(t,s){t.preventDefault();t.stopPropagation();this.suggestionEvents.push(t.detail);this.suggestions.push(t.detail(s))}registerSuggestions(t){this.suggestions.push(t)}get isDoubleList(){return Boolean(this.leftSuggestionElements.length&&this.rightSuggestionElements.length)}focusPanel(t){const s=t==="left"?this.leftPanel:this.rightPanel;if(this.panelInFocus===s){return}if(s?.firstElementChild){const t=this.previousActiveDescendantElement&&s.contains(this.previousActiveDescendantElement);const e=t?this.previousActiveDescendantElement:s.firstElementChild;this.updateDescendants(e.id)}}clearSuggestions(){this.clearSuggestionElements();this.updateActiveDescendant()}async focusNextValue(){if(!this.hasSuggestions||!this.nextOrFirstValue){return}await this.focusValue(this.nextOrFirstValue)}async focusValue(t){this.updateKeyboardActiveDescendant(t.id);this.updateActiveDescendant(t.id);this.scrollActiveDescendantIntoView();await this.updateQueryFromSuggestion()}async onSuggestionMouseOver(t,s,e){const i=s==="left"?this.leftPanel:this.rightPanel;this.updateKeyboardActiveDescendant();if(this.panelInFocus===i){this.updateActiveDescendant(e)}else{this.updateDescendants(e)}if(t.query){await this.updateSuggestedQuery(t.query)}}async onSuggestionClick(t,s){if(t.query){this.clearSuggestions();await this.updateOwnerSearchboxQuery(t.query)}t.onSelect?.(s)}get hasSuggestions(){return!!this.allSuggestionElements.length}get allSuggestionElements(){return[...this.leftSuggestionElements,...this.rightSuggestionElements]}async focusPreviousValue(){if(this.firstValue===this.activeDescendantElement){this.updateKeyboardActiveDescendant();this.updateActiveDescendant();return}if(!this.hasSuggestions||!this.previousOrLastValue){return}await this.focusValue(this.previousOrLastValue)}get hasActiveDescendant(){return this.activeDescendant!==""}async executeQuerySuggestion(){this.updateActiveDescendant();const t=await Promise.allSettled(this.suggestions.map((t=>b(t.onInput?t.onInput():Promise.resolve(),this.ownerSearchBoxProps.getSuggestionTimeout()))));const s=[];t.forEach(((t,e)=>{if(t.status==="fulfilled"){s.push(this.suggestions[e])}else{this.ownerSearchBoxProps.getLogger().warn("Some query suggestions are not being shown because the promise timed out.")}}));const e=(t,e=false)=>s.filter((s=>s.panel===t||!s.panel&&e)).sort(this.sortSuggestions);this.leftSuggestions=e("left",true);this.leftSuggestionElements=this.getAndFilterLeftSuggestionElements();this.rightSuggestions=e("right");this.rightSuggestionElements=this.getSuggestionElements(this.rightSuggestions);const i=this.allSuggestionElements.find(o)?.query||"";await this.updateSuggestedQuery(i)}get lastValue(){return this.panelInFocus?.lastElementChild}get previousOrLastValue(){if(!this.hasActiveDescendant){return this.lastValue?.firstChild}const t=this.activeDescendantElement?.parentElement;return t?.previousElementSibling?.firstChild||this.firstValue?.firstChild}sortSuggestions(t,s){return t.position-s.position}get nextOrFirstValue(){if(!this.hasActiveDescendant){return this.firstValue?.firstChild}const t=this.activeDescendantElement?.parentElement;return t?.nextElementSibling?.firstChild||this.firstValue?.firstChild}get firstValue(){return this.panelInFocus?.firstElementChild}get panelInFocus(){if(this.leftPanel?.contains(this.activeDescendantElement)){return this.leftPanel}if(this.rightPanel?.contains(this.activeDescendantElement)){return this.rightPanel}return this.leftPanel||this.rightPanel}scrollActiveDescendantIntoView(){this.activeDescendantElement?.scrollIntoView({block:"nearest"})}async updateQueryFromSuggestion(){const t=this.activeDescendantElement?.getAttribute(this.queryDataAttribute);await this.updateOwnerSearchboxQuery(t||"")}async updateOwnerSearchboxQuery(t){if(t&&this.ownerSearchBoxProps.getSearchBoxValue()!==t){this.ownerSearchBoxProps.updateQuery(t);await this.updateSuggestedQuery(t)}}async updateSuggestedQuery(t){await Promise.allSettled(this.suggestions.map((s=>b(s.onSuggestedQueryChange?s.onSuggestedQueryChange(t):Promise.resolve(),this.ownerSearchBoxProps.getSuggestionTimeout()))));this.suggestedQuery=t;this.updateSuggestionElements(t);s(this.ownerSearchBoxProps.getHost())}updateSuggestionElements(t){if(!this.isPanelInFocus(this.leftPanel,t)){this.leftSuggestionElements=this.getAndFilterLeftSuggestionElements()}if(!this.isPanelInFocus(this.rightPanel,t)){this.rightSuggestionElements=this.getSuggestionElements(this.rightSuggestions)}}forceUpdate(){this.updateSuggestionElements(this.suggestedQuery);s(this.ownerSearchBoxProps.getHost())}isPanelInFocus(t,s){if(!this.activeDescendantElement){return false}if(s){const e=n.sanitize(s);return!!t?.querySelector(`[${this.queryDataAttribute}="${CSS.escape(e)}"]`)}return this.activeDescendantElement?.closest("ul")===t}getAndFilterLeftSuggestionElements(){const t=this.getSuggestionElements(this.leftSuggestions);const s=new Set;const e=t.filter((t=>{if(i(t.query)){return true}if(s.has(t.query)){return false}else{s.add(t.query);return true}}));return e}getSuggestionElements(t){const s=t.flatMap((t=>t.renderItems()));const e=this.ownerSearchBoxProps.getNumberOfSuggestionsToDisplay()+s.filter(a).length;return s.slice(0,e)}updateDescendants(t=""){const s=this.activeDescendantElement;this.previousActiveDescendantElement=s;this.updateActiveDescendant(t)}clearSuggestionElements(){this.leftSuggestionElements=[];this.rightSuggestionElements=[]}}export{v as S,h as a,w as b,u as c};
2
- //# sourceMappingURL=p-2559747d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["SearchBoxWrapper","props","children","getClasses","baseClasses","focusClasses","disabled","join","h","part","class","onFocusout","TextAreaClearButton","inputRef","bindings","onClick","defaultButtonProps","Button","style","focus","ariaLabel","i18n","t","icon","ClearSlim","getPopupAttributes","autocomplete","autocapitalize","autocorrect","activeDescendant","id","syncTextWithReplica","elem","value","parent","parentNode","dataset","replicatedValue","resetReplicaText","collapseTextArea","classList","remove","expandTextArea","add","SearchTextArea","textAreaRef","loading","onInput","onFocus","onBlur","onChange","onKeyDown","onKeyUp","onClear","popup","defaultInputProps","placeholder","rows","e","key","shiftKey","preventDefault","target","promiseTimeout","prom","ms","timeout","Promise","_","reject","setTimeout","Error","race","then","clearTimeout","SuggestionManager","constructor","ownerSearchBoxProps","this","suggestions","leftSuggestionElements","rightSuggestionElements","leftPanel","undefined","rightPanel","suggestedQuery","keyboardActiveDescendant","queryDataAttribute","suggestionEvents","previousActiveDescendantElement","leftSuggestions","rightSuggestions","triggerSuggestions","debounce","executeQuerySuggestion","getSuggestionDelay","partialSuggestionBindings","clearSuggestions","getSuggestions","getSuggestionElements","allSuggestionElements","activeDescendantElement","hasActiveDescendant","querySelector","onSubmit","clickOnActiveElement","updateActiveDescendant","forceUpdate","getHost","updateKeyboardActiveDescendant","click","isRightPanelInFocus","isNullOrUndefined","panelInFocus","initializeSuggestions","map","event","registerSuggestionsFromEvent","stopPropagation","push","detail","registerSuggestions","isDoubleList","Boolean","length","focusPanel","side","panel","firstElementChild","panelHasActiveDescendant","contains","newValue","updateDescendants","clearSuggestionElements","focusNextValue","hasSuggestions","nextOrFirstValue","focusValue","scrollActiveDescendantIntoView","updateQueryFromSuggestion","onSuggestionMouseOver","item","thisPanel","query","updateSuggestedQuery","onSuggestionClick","updateOwnerSearchboxQuery","onSelect","focusPreviousValue","firstValue","previousOrLastValue","settled","allSettled","suggestion","resolve","getSuggestionTimeout","fulfilledSuggestions","forEach","j","status","getLogger","warn","splitSuggestions","isDefault","filter","sort","sortSuggestions","getAndFilterLeftSuggestionElements","defaultSuggestedQuery","find","elementHasQuery","lastValue","lastElementChild","firstChild","parentOfActiveDescendant","parentElement","previousElementSibling","a","b","position","nextElementSibling","scrollIntoView","block","getAttribute","getSearchBoxValue","updateQuery","onSuggestedQueryChange","updateSuggestionElements","isPanelInFocus","escaped","DOMPurify","sanitize","CSS","escape","closest","suggestionElements","filterOnDuplicate","Set","out","suggestionElement","has","elements","flatMap","renderItems","max","getNumberOfSuggestionsToDisplay","elementHasNoQuery","slice","newPrevDescendantElement"],"sources":["src/components/common/search-box/stencil-search-box-wrapper.tsx","src/components/common/search-box/stencil-text-area-clear-button.tsx","src/components/common/search-box/stencil-search-text-area.tsx","src/utils/promise-utils.ts","src/components/common/suggestions/stencil-suggestion-manager.ts"],"sourcesContent":["import {FunctionalComponent, h} from '@stencil/core';\n\ninterface Props {\n disabled: boolean;\n onFocusout?: (event: FocusEvent) => void;\n}\n\nexport const SearchBoxWrapper: FunctionalComponent<Props> = (\n props,\n children\n) => {\n const getClasses = () => {\n const baseClasses =\n 'flex bg-background w-full border border-neutral rounded-md focus-within:ring-3 absolute top-0 left-0';\n const focusClasses = props.disabled\n ? 'focus-within:border-disabled focus-within:ring-neutral'\n : 'focus-within:border-primary focus-within:ring-ring-primary';\n\n return [baseClasses, focusClasses].join(' ');\n };\n\n return (\n <div part=\"wrapper\" class={getClasses()} onFocusout={props.onFocusout}>\n {children}\n </div>\n );\n};\n","import {FunctionalComponent, h} from '@stencil/core';\nimport ClearSlim from '../../../images/clear-slim.svg';\nimport {AnyBindings} from '../interface/bindings';\nimport {Button, StencilButtonProps} from '../stencil-button';\n\ninterface Props extends Partial<StencilButtonProps> {\n bindings: AnyBindings;\n inputRef: HTMLInputElement | HTMLTextAreaElement | null;\n}\n\nexport const TextAreaClearButton: FunctionalComponent<Props> = ({\n inputRef,\n bindings,\n onClick,\n ...defaultButtonProps\n}) => (\n <div\n part=\"clear-button-wrapper\"\n class=\"ml-2 flex items-center justify-center py-2\"\n >\n <Button\n style=\"text-transparent\"\n part=\"clear-button\"\n class=\"text-neutral-dark flex h-8 w-8 shrink-0 items-center justify-center\"\n onClick={() => {\n onClick?.();\n inputRef?.focus();\n }}\n ariaLabel={bindings.i18n.t('clear-search')}\n {...defaultButtonProps}\n >\n <atomic-icon\n part=\"clear-icon\"\n icon={ClearSlim}\n class=\"h-4 w-4\"\n ></atomic-icon>\n </Button>\n </div>\n);\n","import {FunctionalComponent, h} from '@stencil/core';\nimport {JSXBase} from '@stencil/core/internal';\nimport {AnyBindings} from '../interface/bindings';\nimport {TextAreaClearButton} from './stencil-text-area-clear-button';\n\ninterface Props extends JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement> {\n textAreaRef: HTMLTextAreaElement;\n loading: boolean;\n bindings: AnyBindings;\n value: string;\n ariaLabel: string;\n onClear(): void;\n popup?: {\n id: string;\n activeDescendant: string;\n expanded: boolean;\n hasSuggestions: boolean;\n };\n}\n\nfunction getPopupAttributes(props: Required<Props>['popup']) {\n return {\n autocomplete: 'off',\n autocapitalize: 'off',\n autocorrect: 'off',\n ...(props.activeDescendant && {\n 'aria-activedescendant': props.activeDescendant,\n }),\n 'aria-autocomplete': 'both',\n 'aria-haspopup': 'true',\n 'aria-controls': props.id,\n };\n}\n\nfunction syncTextWithReplica(elem: HTMLTextAreaElement, value?: string) {\n const parent = elem?.parentNode as HTMLElement;\n if (!parent) {\n return;\n }\n if (elem.value === '\\n') {\n return;\n }\n parent.dataset.replicatedValue = value ?? elem.value;\n}\n\nfunction resetReplicaText(elem: HTMLTextAreaElement) {\n const parent = elem?.parentNode as HTMLElement;\n if (parent) {\n delete parent.dataset.replicatedValue;\n }\n}\n\nfunction collapseTextArea(elem: HTMLTextAreaElement) {\n const parent = elem?.parentNode as HTMLElement;\n if (parent) {\n parent.classList.remove('expanded');\n }\n}\n\nfunction expandTextArea(elem: HTMLTextAreaElement) {\n const parent = elem?.parentNode as HTMLElement;\n if (parent) {\n parent.classList.add('expanded');\n }\n}\n\nexport const SearchTextArea: FunctionalComponent<Props> = ({\n textAreaRef,\n loading,\n bindings,\n onInput,\n onFocus,\n onBlur,\n onChange,\n onKeyDown,\n onKeyUp,\n value,\n ariaLabel,\n onClear,\n popup,\n ...defaultInputProps\n}) => (\n <div class=\"flex grow overflow-hidden\">\n <div part=\"textarea-expander\" class=\"grid grow overflow-hidden\">\n <textarea\n part=\"textarea\"\n aria-label={ariaLabel}\n placeholder={bindings.i18n.t('search')}\n class=\"placeholder-neutral-dark\"\n rows={1}\n onInput={(e) => {\n onInput?.(e);\n syncTextWithReplica(textAreaRef);\n }}\n onKeyDown={(e) => {\n syncTextWithReplica(textAreaRef);\n if (e.key === 'Enter') {\n if (e.shiftKey) {\n return;\n }\n e.preventDefault();\n }\n onKeyDown?.(e);\n }}\n onKeyUp={(e) => {\n onKeyUp?.(e);\n if (e.key === 'Enter') {\n e.preventDefault();\n return;\n }\n syncTextWithReplica(textAreaRef);\n }}\n onBlur={(e) => {\n onBlur?.(e);\n collapseTextArea(textAreaRef);\n syncTextWithReplica(textAreaRef);\n }}\n onChange={(e) => {\n onChange?.(e);\n syncTextWithReplica(textAreaRef);\n }}\n onFocus={(e) => {\n onFocus?.(e);\n const target = e.target as HTMLTextAreaElement;\n syncTextWithReplica(textAreaRef ?? target);\n expandTextArea(textAreaRef ?? target);\n }}\n autocomplete=\"off\"\n {...(popup && getPopupAttributes(popup))}\n {...defaultInputProps}\n value={value}\n />\n </div>\n\n {loading && (\n <div class=\"searchbox-button-wrapper ml-2 flex items-center justify-center\">\n <span\n part=\"loading\"\n class=\"loading mr-2 grid h-5 w-5 animate-spin place-items-center rounded-full bg-linear-to-r\"\n ></span>\n </div>\n )}\n {!loading && value && (\n <TextAreaClearButton\n inputRef={textAreaRef}\n bindings={bindings}\n onClick={() => {\n onClear();\n resetReplicaText(textAreaRef);\n }}\n />\n )}\n </div>\n);\n","export function promiseTimeout<T>(prom: T | Promise<T>, ms: number) {\n let id: NodeJS.Timeout;\n const timeout = new Promise((_, reject) => {\n id = setTimeout(() => {\n reject(new Error('Promise timed out.'));\n }, ms);\n });\n return Promise.race([prom, timeout]).then(() => {\n clearTimeout(id);\n });\n}\n","import {isNullOrUndefined} from '@coveo/bueno';\nimport {forceUpdate} from '@stencil/core';\nimport DOMPurify from 'dompurify';\nimport {debounce} from '../../../utils/debounce-utils';\nimport {promiseTimeout} from '../../../utils/promise-utils';\nimport type {\n SearchBoxSuggestionElement,\n SearchBoxSuggestionsBindings,\n SearchBoxSuggestionsEvent,\n} from './suggestions-types';\nimport {elementHasNoQuery, elementHasQuery} from './suggestions-utils';\n\n/**\n * List of suggestions that will be displayed along other lists (e.g recent queries) when the search box's input is selected.\n */\nexport interface SearchBoxSuggestions {\n /**\n * The search box will sort the position of suggestions using this value, the lowest value being first.\n * By default, the DOM position will be used.\n */\n position: number;\n /**\n * Whether the suggestions should be listed in the right or left panel. By default, the suggestions are listed in the right panel.\n */\n panel?: 'left' | 'right';\n /**\n * Method that returns the list of elements which will be rendered in the list of suggestions.\n */\n renderItems(): SearchBoxSuggestionElement[];\n /**\n * Hook called when the user changes the search box's input value. This can lead to all the query suggestions being updated.\n */\n onInput?(): Promise<unknown>;\n /**\n * Hook called when the current suggested query changes as the user navigates the list of suggestions.\n * This is used for instant results, which are rendered based on the current suggested query.\n * @param q The new current suggested query.\n */\n onSuggestedQueryChange?(q: string): Promise<unknown>;\n}\n\ninterface SearchBoxProps {\n getSearchBoxValue: () => string;\n updateQuery: (suggestedQuery: string) => void;\n getSuggestionTimeout: () => number;\n getNumberOfSuggestionsToDisplay: () => number;\n getSuggestionDelay: () => number;\n getLogger: () => Pick<typeof console, 'warn'>;\n getHost: () => HTMLElement;\n}\n\nexport class SuggestionManager<SearchBoxController> {\n public suggestions: SearchBoxSuggestions[] = [];\n public leftSuggestionElements: SearchBoxSuggestionElement[] = [];\n public rightSuggestionElements: SearchBoxSuggestionElement[] = [];\n public leftPanel: HTMLElement | undefined = undefined;\n public rightPanel: HTMLElement | undefined = undefined;\n public triggerSuggestions: () => Promise<void>;\n public activeDescendant = '';\n public suggestedQuery = '';\n public keyboardActiveDescendant = '';\n\n private queryDataAttribute = 'data-query';\n private suggestionEvents: SearchBoxSuggestionsEvent<SearchBoxController>[] =\n [];\n\n private previousActiveDescendantElement: HTMLElement | null = null;\n private leftSuggestions: SearchBoxSuggestions[] = [];\n private rightSuggestions: SearchBoxSuggestions[] = [];\n\n constructor(private ownerSearchBoxProps: SearchBoxProps) {\n this.triggerSuggestions = debounce(\n () => this.executeQuerySuggestion(),\n this.ownerSearchBoxProps.getSuggestionDelay()\n );\n }\n\n public get partialSuggestionBindings(): Pick<\n SearchBoxSuggestionsBindings<SearchBoxController>,\n | 'suggestedQuery'\n | 'clearSuggestions'\n | 'triggerSuggestions'\n | 'getSuggestions'\n | 'getSuggestionElements'\n > {\n return {\n suggestedQuery: () => this.suggestedQuery,\n clearSuggestions: () => this.clearSuggestions(),\n triggerSuggestions: () => this.triggerSuggestions(),\n getSuggestions: () => this.suggestions,\n getSuggestionElements: () => this.allSuggestionElements,\n };\n }\n\n public get activeDescendantElement(): HTMLElement | null {\n if (!this.hasActiveDescendant) {\n return null;\n }\n\n return (\n this.leftPanel?.querySelector(`#${this.activeDescendant}`) ||\n this.rightPanel?.querySelector(`#${this.activeDescendant}`) ||\n null\n );\n }\n\n public onSubmit() {\n this.clickOnActiveElement();\n this.clearSuggestions();\n }\n\n public updateActiveDescendant(id = '') {\n this.activeDescendant = id;\n forceUpdate(this.ownerSearchBoxProps.getHost());\n }\n\n public updateKeyboardActiveDescendant(id = '') {\n this.keyboardActiveDescendant = id;\n }\n\n public clickOnActiveElement() {\n this.activeDescendantElement?.click();\n this.updateActiveDescendant();\n }\n\n public isRightPanelInFocus() {\n if (\n isNullOrUndefined(this.panelInFocus) ||\n isNullOrUndefined(this.rightPanel)\n ) {\n return false;\n }\n\n return this.panelInFocus === this.rightPanel;\n }\n\n public initializeSuggestions(\n bindings: SearchBoxSuggestionsBindings<SearchBoxController>\n ) {\n this.suggestions = this.suggestionEvents.map((event) => event(bindings));\n }\n\n public registerSuggestionsFromEvent(\n event: CustomEvent<SearchBoxSuggestionsEvent<SearchBoxController>>,\n bindings: SearchBoxSuggestionsBindings<SearchBoxController>\n ) {\n event.preventDefault();\n event.stopPropagation();\n this.suggestionEvents.push(event.detail);\n this.suggestions.push(event.detail(bindings));\n }\n\n public registerSuggestions(suggestions: SearchBoxSuggestions) {\n this.suggestions.push(suggestions);\n }\n\n public get isDoubleList() {\n return Boolean(\n this.leftSuggestionElements.length && this.rightSuggestionElements.length\n );\n }\n\n public focusPanel(side: 'left' | 'right') {\n const panel = side === 'left' ? this.leftPanel : this.rightPanel;\n\n if (this.panelInFocus === panel) {\n return;\n }\n if (panel?.firstElementChild) {\n const panelHasActiveDescendant =\n this.previousActiveDescendantElement &&\n panel.contains(this.previousActiveDescendantElement);\n const newValue = panelHasActiveDescendant\n ? this.previousActiveDescendantElement!\n : (panel.firstElementChild as HTMLElement);\n this.updateDescendants(newValue.id);\n }\n }\n\n public clearSuggestions() {\n this.clearSuggestionElements();\n this.updateActiveDescendant();\n }\n\n public async focusNextValue() {\n if (!this.hasSuggestions || !this.nextOrFirstValue) {\n return;\n }\n\n await this.focusValue(this.nextOrFirstValue as HTMLElement);\n }\n\n public async focusValue(value: HTMLElement) {\n this.updateKeyboardActiveDescendant(value.id);\n this.updateActiveDescendant(value.id);\n this.scrollActiveDescendantIntoView();\n await this.updateQueryFromSuggestion();\n }\n\n public async onSuggestionMouseOver(\n item: SearchBoxSuggestionElement,\n side: 'left' | 'right',\n id: string\n ) {\n const thisPanel = side === 'left' ? this.leftPanel : this.rightPanel;\n // When hovering, always reset the keyboard active descendant\n this.updateKeyboardActiveDescendant();\n if (this.panelInFocus === thisPanel) {\n this.updateActiveDescendant(id);\n } else {\n this.updateDescendants(id);\n }\n if (item.query) {\n await this.updateSuggestedQuery(item.query);\n }\n }\n\n public async onSuggestionClick(item: SearchBoxSuggestionElement, e: Event) {\n if (item.query) {\n this.clearSuggestions();\n await this.updateOwnerSearchboxQuery(item.query);\n }\n item.onSelect?.(e);\n }\n\n public get hasSuggestions() {\n return !!this.allSuggestionElements.length;\n }\n\n public get allSuggestionElements() {\n return [...this.leftSuggestionElements, ...this.rightSuggestionElements];\n }\n\n public async focusPreviousValue() {\n if (this.firstValue === this.activeDescendantElement) {\n this.updateKeyboardActiveDescendant();\n this.updateActiveDescendant();\n return;\n }\n\n if (!this.hasSuggestions || !this.previousOrLastValue) {\n return;\n }\n\n await this.focusValue(this.previousOrLastValue as HTMLElement);\n }\n\n public get hasActiveDescendant() {\n return this.activeDescendant !== '';\n }\n\n private async executeQuerySuggestion() {\n this.updateActiveDescendant();\n const settled = await Promise.allSettled(\n this.suggestions.map((suggestion) =>\n promiseTimeout(\n suggestion.onInput ? suggestion.onInput() : Promise.resolve(),\n this.ownerSearchBoxProps.getSuggestionTimeout()\n )\n )\n );\n\n const fulfilledSuggestions: SearchBoxSuggestions[] = [];\n\n settled.forEach((prom, j) => {\n if (prom.status === 'fulfilled') {\n fulfilledSuggestions.push(this.suggestions[j]);\n } else {\n this.ownerSearchBoxProps\n .getLogger()\n .warn(\n 'Some query suggestions are not being shown because the promise timed out.'\n );\n }\n });\n\n const splitSuggestions = (side: 'left' | 'right', isDefault = false) =>\n fulfilledSuggestions\n .filter(\n (suggestion) =>\n suggestion.panel === side || (!suggestion.panel && isDefault)\n )\n .sort(this.sortSuggestions);\n\n this.leftSuggestions = splitSuggestions('left', true);\n this.leftSuggestionElements = this.getAndFilterLeftSuggestionElements();\n\n this.rightSuggestions = splitSuggestions('right');\n this.rightSuggestionElements = this.getSuggestionElements(\n this.rightSuggestions\n );\n\n const defaultSuggestedQuery =\n this.allSuggestionElements.find(elementHasQuery)?.query || '';\n\n await this.updateSuggestedQuery(defaultSuggestedQuery);\n }\n\n private get lastValue() {\n return this.panelInFocus?.lastElementChild;\n }\n\n private get previousOrLastValue() {\n if (!this.hasActiveDescendant) {\n return this.lastValue?.firstChild;\n }\n\n const parentOfActiveDescendant =\n this.activeDescendantElement?.parentElement;\n return (\n parentOfActiveDescendant?.previousElementSibling?.firstChild ||\n this.firstValue?.firstChild\n );\n }\n\n private sortSuggestions(a: SearchBoxSuggestions, b: SearchBoxSuggestions) {\n return a.position - b.position;\n }\n\n private get nextOrFirstValue() {\n if (!this.hasActiveDescendant) {\n return this.firstValue?.firstChild;\n }\n\n const parentOfActiveDescendant =\n this.activeDescendantElement?.parentElement;\n return (\n parentOfActiveDescendant?.nextElementSibling?.firstChild ||\n this.firstValue?.firstChild\n );\n }\n\n private get firstValue() {\n return this.panelInFocus?.firstElementChild;\n }\n\n private get panelInFocus() {\n if (this.leftPanel?.contains(this.activeDescendantElement)) {\n return this.leftPanel;\n }\n if (this.rightPanel?.contains(this.activeDescendantElement)) {\n return this.rightPanel;\n }\n return this.leftPanel || this.rightPanel;\n }\n\n private scrollActiveDescendantIntoView() {\n this.activeDescendantElement?.scrollIntoView({\n block: 'nearest',\n });\n }\n\n private async updateQueryFromSuggestion() {\n const suggestedQuery = this.activeDescendantElement?.getAttribute(\n this.queryDataAttribute\n );\n await this.updateOwnerSearchboxQuery(suggestedQuery || '');\n }\n\n private async updateOwnerSearchboxQuery(query: string) {\n if (query && this.ownerSearchBoxProps.getSearchBoxValue() !== query) {\n this.ownerSearchBoxProps.updateQuery(query);\n await this.updateSuggestedQuery(query);\n }\n }\n\n private async updateSuggestedQuery(suggestedQuery: string) {\n await Promise.allSettled(\n this.suggestions.map((suggestion) =>\n promiseTimeout(\n suggestion.onSuggestedQueryChange\n ? suggestion.onSuggestedQueryChange(suggestedQuery)\n : Promise.resolve(),\n this.ownerSearchBoxProps.getSuggestionTimeout()\n )\n )\n );\n this.suggestedQuery = suggestedQuery;\n this.updateSuggestionElements(suggestedQuery);\n forceUpdate(this.ownerSearchBoxProps.getHost());\n }\n\n private updateSuggestionElements(query: string) {\n if (!this.isPanelInFocus(this.leftPanel, query)) {\n this.leftSuggestionElements = this.getAndFilterLeftSuggestionElements();\n }\n\n if (!this.isPanelInFocus(this.rightPanel, query)) {\n this.rightSuggestionElements = this.getSuggestionElements(\n this.rightSuggestions\n );\n }\n }\n\n public forceUpdate() {\n this.updateSuggestionElements(this.suggestedQuery);\n forceUpdate(this.ownerSearchBoxProps.getHost());\n }\n\n private isPanelInFocus(\n panel: HTMLElement | undefined,\n query: string\n ): boolean {\n if (!this.activeDescendantElement) {\n return false;\n }\n\n if (query) {\n const escaped = DOMPurify.sanitize(query);\n return !!panel?.querySelector(\n `[${this.queryDataAttribute}=\"${CSS.escape(escaped)}\"]`\n );\n }\n\n return this.activeDescendantElement?.closest('ul') === panel;\n }\n\n private getAndFilterLeftSuggestionElements() {\n const suggestionElements = this.getSuggestionElements(this.leftSuggestions);\n const filterOnDuplicate = new Set();\n\n const out = suggestionElements.filter((suggestionElement) => {\n if (isNullOrUndefined(suggestionElement.query)) {\n return true;\n }\n if (filterOnDuplicate.has(suggestionElement.query)) {\n return false;\n } else {\n filterOnDuplicate.add(suggestionElement.query);\n return true;\n }\n });\n\n return out;\n }\n\n private getSuggestionElements(suggestions: SearchBoxSuggestions[]) {\n const elements = suggestions.flatMap((suggestion) =>\n suggestion.renderItems()\n );\n\n const max =\n this.ownerSearchBoxProps.getNumberOfSuggestionsToDisplay() +\n elements.filter(elementHasNoQuery).length;\n\n return elements.slice(0, max);\n }\n\n private updateDescendants(activeDescendant = '') {\n const newPrevDescendantElement = this.activeDescendantElement;\n this.previousActiveDescendantElement = newPrevDescendantElement;\n this.updateActiveDescendant(activeDescendant);\n }\n\n private clearSuggestionElements() {\n this.leftSuggestionElements = [];\n this.rightSuggestionElements = [];\n }\n}\n"],"mappings":"mgBAOaA,EAA+C,CAC1DC,EACAC,KAEA,MAAMC,EAAa,KACjB,MAAMC,EACJ,uGACF,MAAMC,EAAeJ,EAAMK,SACvB,yDACA,6DAEJ,MAAO,CAACF,EAAaC,GAAcE,KAAK,IAAI,EAG9C,OACEC,EAAA,OAAKC,KAAK,UAAUC,MAAOP,IAAcQ,WAAYV,EAAMU,YACxDT,EACG,E,2UCdH,MAAMU,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,GAAQ,CAChDjE,KAAKG,wBAA0BH,KAAKqB,sBAClCrB,KAAKa,iB,EAKJ,WAAAgB,GACL7B,KAAK6G,yBAAyB7G,KAAKO,gBACnCsB,EAAY7B,KAAKD,oBAAoB+B,U,CAG/B,cAAAgF,CACN7D,EACAgB,GAEA,IAAKjE,KAAKuB,wBAAyB,CACjC,OAAO,K,CAGT,GAAI0C,EAAO,CACT,MAAM8C,EAAUC,EAAUC,SAAShD,GACnC,QAAShB,GAAOxB,cACd,IAAIzB,KAAKS,uBAAuByG,IAAIC,OAAOJ,O,CAI/C,OAAO/G,KAAKuB,yBAAyB6F,QAAQ,QAAUnE,C,CAGjD,kCAAAwC,GACN,MAAM4B,EAAqBrH,KAAKqB,sBAAsBrB,KAAKY,iBAC3D,MAAM0G,EAAoB,IAAIC,IAE9B,MAAMC,EAAMH,EAAmB/B,QAAQmC,IACrC,GAAIvF,EAAkBuF,EAAkBxD,OAAQ,CAC9C,OAAO,I,CAET,GAAIqD,EAAkBI,IAAID,EAAkBxD,OAAQ,CAClD,OAAO,K,KACF,CACLqD,EAAkBzJ,IAAI4J,EAAkBxD,OACxC,OAAO,I,KAIX,OAAOuD,C,CAGD,qBAAAnG,CAAsBpB,GAC5B,MAAM0H,EAAW1H,EAAY2H,SAASjD,GACpCA,EAAWkD,gBAGb,MAAMC,EACJ9H,KAAKD,oBAAoBgI,kCACzBJ,EAASrC,OAAO0C,GAAmBlF,OAErC,OAAO6E,EAASM,MAAM,EAAGH,E,CAGnB,iBAAAxE,CAAkBvG,EAAmB,IAC3C,MAAMmL,EAA2BlI,KAAKuB,wBACtCvB,KAAKW,gCAAkCuH,EACvClI,KAAK4B,uBAAuB7E,E,CAGtB,uBAAAwG,GACNvD,KAAKE,uBAAyB,GAC9BF,KAAKG,wBAA0B,E","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["atomicResultBadgeCss","AtomicResultBadgeStyle0","AtomicResultBadge","renderIcon","h","part","icon","this","class","getTextContent","field","undefined","label","value","renderText","renderBadge","componentWillRender","hasValue","ResultTemplatesHelpers","getResultProperty","result","host","remove","render","__decorate","ResultContext"],"sources":["src/components/search/result-template-components/atomic-result-badge/atomic-result-badge.pcss?tag=atomic-result-badge&encapsulation=shadow","src/components/search/result-template-components/atomic-result-badge/atomic-result-badge.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n\n:host {\n display: inline-flex;\n place-items: center;\n height: var(--row-height, auto);\n word-break: break-word;\n}\n","import {Result, ResultTemplatesHelpers} from '@coveo/headless';\nimport {Component, Element, Prop, h} from '@stencil/core';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-result-badge` element renders a badge to highlight special features of a result.\n *\n * A badge can either display:\n * * Text:\n * ```html\n * <atomic-result-badge label=\"trending\"></atomic-result-badge>\n * ```\n * * The contents of a single-value field:\n * ```html\n * <atomic-result-badge field=\"objecttype\"></atomic-result-badge>\n * ```\n * * An icon:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/star.svg\"></atomic-result-badge>\n * ```\n * * Slotted elements:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/stopwatch.svg\">\n * Deal ends in <my-dynamic-countdown></my-dynamic-countdown>\n * </atomic-result-badge>\n * ```\n *\n * The contents of a multi-value field can be displayed as in the following example:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/language.svg\">\n * <atomic-result-multi-value-text field=\"language\"></atomic-result-multi-value-text>\n * </atomic-result-badge>\n * ```\n *\n * @part result-badge-element - The decorative outer-most element with the background color and text color.\n * @part result-badge-icon - The icon displayed at the left-end of the badge, if present.\n * @part result-badge-label - The wrapper around the contents at the right-end of the badge. This may be text, a field or slotted elements depending on which was configured.\n * @slot default - The element(s) to display inside the badge, instead of a field or label.\n */\n@Component({\n tag: 'atomic-result-badge',\n styleUrl: 'atomic-result-badge.pcss',\n shadow: true,\n})\nexport class AtomicResultBadge {\n @ResultContext() private result!: Result;\n @Element() host!: HTMLElement;\n /**\n * The field to display in the badge.\n *\n * Not compatible with `label`, slotted elements nor multi-value fields.\n */\n @Prop({reflect: true}) public field?: string;\n\n /**\n * The text to display in the badge.\n *\n * Not compatible with `field` nor slotted elements.\n */\n @Prop({reflect: true}) public label?: string;\n\n /**\n * Specifies an icon to display at the left-end of the badge.\n * This can be used in conjunction with `field`, `label` or slotted elements.\n *\n * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n * - Use a value that starts with `assets://`, to display an icon from the Atomic package.\n * - Use a stringified SVG to display it directly\n */\n @Prop({reflect: true}) public icon?: string;\n\n private renderIcon() {\n return (\n <atomic-icon\n part=\"result-badge-icon\"\n icon={this.icon!}\n class=\"h-3 w-3 fill-current\"\n ></atomic-icon>\n );\n }\n\n private getTextContent() {\n if (this.field !== undefined) {\n return <atomic-result-text field={this.field}></atomic-result-text>;\n }\n if (this.label !== undefined) {\n return <atomic-text value={this.label}></atomic-text>;\n }\n return <slot></slot>;\n }\n\n private renderText() {\n return <span part=\"result-badge-label\">{this.getTextContent()}</span>;\n }\n\n private renderBadge() {\n return (\n <div\n part=\"result-badge-element\"\n class=\"bg-neutral-light text-neutral-dark inline-flex h-full place-items-center space-x-1.5 rounded-full px-3\"\n >\n {this.icon && this.renderIcon()}\n {this.renderText()}\n </div>\n );\n }\n\n componentWillRender() {\n if (this.field) {\n const hasValue =\n ResultTemplatesHelpers.getResultProperty(this.result, this.field) !==\n null;\n if (!hasValue) {\n this.host.remove();\n }\n }\n }\n\n render() {\n return this.renderBadge();\n }\n}\n"],"mappings":"uNAAA,MAAMA,EAAuB,2kjEAC7B,MAAAC,EAAeD,E,iXC2CFE,EAAiB,M,uFA2BpB,UAAAC,GACN,OACEC,EAAA,eACEC,KAAK,oBACLC,KAAMC,KAAKD,KACXE,MAAM,wB,CAKJ,cAAAC,GACN,GAAIF,KAAKG,QAAUC,UAAW,CAC5B,OAAOP,EAAA,sBAAoBM,MAAOH,KAAKG,O,CAEzC,GAAIH,KAAKK,QAAUD,UAAW,CAC5B,OAAOP,EAAA,eAAaS,MAAON,KAAKK,O,CAElC,OAAOR,EAAA,Y,CAGD,UAAAU,GACN,OAAOV,EAAA,QAAMC,KAAK,sBAAsBE,KAAKE,iB,CAGvC,WAAAM,GACN,OACEX,EAAA,OACEC,KAAK,uBACLG,MAAM,0GAELD,KAAKD,MAAQC,KAAKJ,aAClBI,KAAKO,a,CAKZ,mBAAAE,GACE,GAAIT,KAAKG,MAAO,CACd,MAAMO,EACJC,EAAuBC,kBAAkBZ,KAAKa,OAAQb,KAAKG,SAC3D,KACF,IAAKO,EAAU,CACbV,KAAKc,KAAKC,Q,GAKhB,MAAAC,GACE,OAAOhB,KAAKQ,a,6BA1EWS,EAAA,CAAxBC,K","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["atomicInsightResultAttachToCaseActionCss","AtomicInsightResultAttachToCaseActionStyle0","AtomicInsightResultAttachToCaseAction","initialize","caseId","this","bindings","engine","state","insightCaseContext","attachToCase","buildAttachToCase","options","result","onClick","isAttached","detach","emit","callback","attach","getIcon","DetachIcon","AttachIcon","getTooltip","i18n","t","render","h","IconButton","key","partPrefix","style","icon","title","__decorate","InitializeBindings","ResultContext","BindStateToController"],"sources":["src/components/insight/atomic-insight-result-attach-to-case-action/atomic-insight-result-attach-to-case-action.pcss?tag=atomic-insight-result-attach-to-case-action","src/components/insight/atomic-insight-result-attach-to-case-action/atomic-insight-result-attach-to-case-action.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n","import {AttachToCase, buildAttachToCase, Result} from '@coveo/headless/insight';\nimport {Component, Event, State, h, Element, EventEmitter} from '@stencil/core';\nimport AttachIcon from '../../../images/attach.svg';\nimport DetachIcon from '../../../images/detach.svg';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {IconButton} from '../../common/stencil-iconButton';\nimport {ResultContext} from '../../search/result-template-components/result-template-decorators';\nimport {InsightBindings} from '../atomic-insight-interface/atomic-insight-interface';\n\nexport interface InsightResultAttachToCaseEvent {\n callback: () => void;\n result: Result;\n}\n/**\n * @internal\n * The `atomic-insight-result-attach-to-case-action` component can be nested inside a `atomic-insight-result-actions` to render an interactive button that will emit an `atomic/insight/attachToCase/attach` or `atomic/insight/attachToCase/detach` JavaScript event, based on its current state, when clicked.\n *\n * @part result-action-container - The result action container\n * @part result-action-button - The result action button\n * @part result-action-icon - The result action icon\n */\n@Component({\n tag: 'atomic-insight-result-attach-to-case-action',\n styleUrl: 'atomic-insight-result-attach-to-case-action.pcss',\n})\nexport class AtomicInsightResultAttachToCaseAction\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n @ResultContext() private result!: Result;\n\n @Element() host!: HTMLElement;\n @State() public error!: Error;\n\n public attachToCase!: AttachToCase;\n\n @BindStateToController('attachToCase')\n @State()\n public attachToCaseState!: {};\n\n @Event({\n eventName: 'atomic/insight/attachToCase/attach',\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n private attach!: EventEmitter<InsightResultAttachToCaseEvent>;\n\n @Event({\n eventName: 'atomic/insight/attachToCase/detach',\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n private detach!: EventEmitter<InsightResultAttachToCaseEvent>;\n\n public initialize() {\n const caseId: string =\n this.bindings.engine.state.insightCaseContext?.caseId || '';\n this.attachToCase = buildAttachToCase(this.bindings.engine, {\n options: {\n result: this.result,\n caseId: caseId,\n },\n });\n }\n\n private onClick() {\n if (this.attachToCase.isAttached()) {\n this.detach.emit({\n callback: this.attachToCase.detach,\n result: this.result,\n });\n } else {\n this.attach.emit({\n callback: this.attachToCase.attach,\n result: this.result,\n });\n }\n }\n\n private getIcon() {\n return this.attachToCase.isAttached() ? DetachIcon : AttachIcon;\n }\n\n private getTooltip() {\n return this.attachToCase.isAttached()\n ? this.bindings.i18n.t('detach-from-case')\n : this.bindings.i18n.t('attach-to-case');\n }\n\n public render() {\n return (\n <IconButton\n partPrefix=\"result-action\"\n style=\"outline-neutral\"\n icon={this.getIcon()}\n title={this.getTooltip()}\n onClick={() => this.onClick()}\n />\n );\n }\n}\n"],"mappings":"62GAAA,MAAMA,EAA2C,+8iEACjD,MAAAC,EAAeD,E,iXC4BFE,EAAqC,M,qMA+BzC,UAAAC,GACL,MAAMC,EACJC,KAAKC,SAASC,OAAOC,MAAMC,oBAAoBL,QAAU,GAC3DC,KAAKK,aAAeC,EAAkBN,KAAKC,SAASC,OAAQ,CAC1DK,QAAS,CACPC,OAAQR,KAAKQ,OACbT,OAAQA,I,CAKN,OAAAU,GACN,GAAIT,KAAKK,aAAaK,aAAc,CAClCV,KAAKW,OAAOC,KAAK,CACfC,SAAUb,KAAKK,aAAaM,OAC5BH,OAAQR,KAAKQ,Q,KAEV,CACLR,KAAKc,OAAOF,KAAK,CACfC,SAAUb,KAAKK,aAAaS,OAC5BN,OAAQR,KAAKQ,Q,EAKX,OAAAO,GACN,OAAOf,KAAKK,aAAaK,aAAeM,EAAaC,C,CAG/C,UAAAC,GACN,OAAOlB,KAAKK,aAAaK,aACrBV,KAAKC,SAASkB,KAAKC,EAAE,oBACrBpB,KAAKC,SAASkB,KAAKC,EAAE,iB,CAGpB,MAAAC,GACL,OACEC,EAACC,EAAU,CAAAC,IAAA,2CACTC,WAAW,gBACXC,MAAM,kBACNC,KAAM3B,KAAKe,UACXa,MAAO5B,KAAKkB,aACZT,QAAS,IAAMT,KAAKS,W,6BAtEGoB,EAAA,CAA5BC,K,+BACwBD,EAAA,CAAxBE,K,6BASMF,EAAA,CAFNG,EAAsB,iB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["atomicResultMultiValueTextCss","AtomicResultMultiValueTextStyle0","AtomicResultMultiValueText","this","maxValuesToDisplay","delimiter","sortedValues","initialize","breadcrumbManager","buildBreadcrumbManager","bindings","engine","resultValues","value","ResultTemplatesHelpers","getResultProperty","result","field","Array","isArray","map","v","trim","error","Error","split","facetSelectedValues","state","facetBreadcrumbs","filter","facet","reduce","values","updateSortedValues","allValues","allValuesSet","Set","firstValues","has","from","set","add","getShouldDisplayLabel","length","getNumberOfValuesToDisplay","Math","min","renderValue","label","getFieldValueCaption","i18n","kebabValue","titleToKebab","h","key","part","name","renderSeparator","beforeValue","afterValue","class","renderMoreLabel","t","renderListItems","numberOfValuesToDisplay","nodes","i","push","componentWillRender","render","host","remove","__decorate","InitializeBindings","ResultContext"],"sources":["src/components/search/result-template-components/atomic-result-multi-value-text/atomic-result-multi-value-text.pcss?tag=atomic-result-multi-value-text&encapsulation=shadow","src/components/search/result-template-components/atomic-result-multi-value-text/atomic-result-multi-value-text.tsx"],"sourcesContent":[":host {\n > ul {\n display: flex;\n list-style: none;\n margin: 0;\n padding: 0;\n\n li {\n display: inline-block;\n }\n }\n}\n\n.separator {\n &::before {\n display: inline;\n content: ',\\00a0';\n }\n}\n","import {\n BreadcrumbManager,\n buildBreadcrumbManager,\n Result,\n ResultTemplatesHelpers,\n} from '@coveo/headless';\nimport {Component, Element, Prop, h, State, VNode} from '@stencil/core';\nimport {getFieldValueCaption} from '../../../../utils/field-utils';\nimport {InitializeBindings} from '../../../../utils/initialization-utils';\nimport {titleToKebab} from '../../../../utils/utils';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-result-multi-value-text` component renders the values of a multi-value string field.\n * @part result-multi-value-text-list - The list of field values.\n * @part result-multi-value-text-separator - The separator to display between each of the field values.\n * @part result-multi-value-text-value - A field value.\n * @part result-multi-value-text-value-more - A label indicating some values were omitted.\n * @slot result-multi-value-text-value-* - A custom caption value that's specified for a given part of a multi-text field value. For example, if you want to use `Off-Campus Resident` as a caption value for `Off-campus apartment` in `Off-campus apartment;On-campus apartment`, you'd use `<span slot=\"result-multi-value-text-value-off-campus-apartment\">Off-Campus Resident</span>`). The suffix of this slot corresponds with the field value, written in kebab case.\n */\n@Component({\n tag: 'atomic-result-multi-value-text',\n styleUrl: 'atomic-result-multi-value-text.pcss',\n shadow: true,\n})\nexport class AtomicResultMultiValueText {\n public breadcrumbManager!: BreadcrumbManager;\n\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n\n @Element() host!: HTMLElement;\n\n @State() public error!: Error;\n\n /**\n * The field that the component should use.\n * The component will try to find this field in the `Result.raw` object unless it finds it in the `Result` object first.\n * Make sure this field is present in the `fieldsToInclude` property of the `atomic-search-interface` component.\n */\n @Prop({reflect: true}) public field!: string;\n\n /**\n * The maximum number of field values to display.\n * If there are _n_ more values than the specified maximum, the last displayed value will be \"_n_ more...\".\n */\n @Prop({reflect: true}) public maxValuesToDisplay = 3;\n\n /**\n * The delimiter used to separate values when the field isn't indexed as a multi value field.\n */\n @Prop({reflect: true}) public delimiter: string | null = null;\n\n private sortedValues: string[] | null = null;\n\n public initialize() {\n this.breadcrumbManager = buildBreadcrumbManager(this.bindings.engine);\n }\n\n private get resultValues() {\n const value = ResultTemplatesHelpers.getResultProperty(\n this.result,\n this.field\n );\n\n if (value === null) {\n return null;\n }\n\n if (Array.isArray(value)) {\n return value.map((v) => `${v}`.trim());\n }\n\n if (typeof value !== 'string' || value.trim() === '') {\n this.error = new Error(\n `Could not parse \"${value}\" from field \"${this.field}\" as a string array.`\n );\n return null;\n }\n\n return this.delimiter\n ? value.split(this.delimiter).map((value) => value.trim())\n : [value];\n }\n\n private get facetSelectedValues() {\n return this.breadcrumbManager.state.facetBreadcrumbs\n .filter((facet) => facet.field === this.field)\n .reduce(\n (values, facet) => [\n ...values,\n ...facet.values.map(({value}) => value.value),\n ],\n [] as string[]\n );\n }\n\n private updateSortedValues() {\n const allValues = this.resultValues;\n if (allValues === null) {\n this.sortedValues = null;\n return;\n }\n const allValuesSet = new Set(allValues);\n const firstValues = this.facetSelectedValues.filter((value) =>\n allValuesSet.has(value)\n );\n this.sortedValues = Array.from(\n allValues.reduce((set, value) => set.add(value), new Set(firstValues))\n );\n }\n\n private getShouldDisplayLabel(values: string[]) {\n return (\n this.maxValuesToDisplay > 0 && values.length > this.maxValuesToDisplay\n );\n }\n\n private getNumberOfValuesToDisplay(values: string[]) {\n return Math.min(values.length, this.maxValuesToDisplay);\n }\n\n private renderValue(value: string) {\n const label = getFieldValueCaption(this.field, value, this.bindings.i18n);\n const kebabValue = titleToKebab(value);\n return (\n <li key={value} part=\"result-multi-value-text-value\">\n <slot name={`result-multi-value-text-value-${kebabValue}`}>\n {label}\n </slot>\n </li>\n );\n }\n\n private renderSeparator(beforeValue: string, afterValue: string) {\n return (\n <li\n aria-hidden=\"true\"\n part=\"result-multi-value-text-separator\"\n key={`${beforeValue}~${afterValue}`}\n class=\"separator\"\n ></li>\n );\n }\n\n private renderMoreLabel(value: number) {\n return (\n <li key=\"more-field-values\" part=\"result-multi-value-text-value-more\">\n {this.bindings.i18n.t('n-more', {value})}\n </li>\n );\n }\n\n private renderListItems(values: string[]) {\n const numberOfValuesToDisplay = this.getNumberOfValuesToDisplay(values);\n\n const nodes: VNode[] = [];\n for (let i = 0; i < numberOfValuesToDisplay; i++) {\n if (i > 0) {\n nodes.push(this.renderSeparator(values[i - 1], values[i]));\n }\n nodes.push(this.renderValue(values[i]));\n }\n if (this.getShouldDisplayLabel(values)) {\n nodes.push(\n this.renderSeparator(\n values[numberOfValuesToDisplay - 1],\n 'more-field-values'\n )\n );\n nodes.push(this.renderMoreLabel(values.length - numberOfValuesToDisplay));\n }\n return nodes;\n }\n\n public componentWillRender() {\n this.updateSortedValues();\n }\n\n public render() {\n if (this.sortedValues === null) {\n this.host.remove();\n return;\n }\n return (\n <ul part=\"result-multi-value-text-list\">\n {...this.renderListItems(this.sortedValues)}\n </ul>\n );\n }\n}\n"],"mappings":"+bAAA,MAAMA,EAAgC,iJACtC,MAAAC,EAAeD,E,iXCyBFE,EAA0B,M,yBAqBPC,KAAAC,mBAAqB,EAKrBD,KAAAE,UAA2B,KAEjDF,KAAAG,aAAgC,K,kEAPW,E,eAKM,I,CAIlD,UAAAC,GACLJ,KAAKK,kBAAoBC,EAAuBN,K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AAavC,GAChC,OACEwC,EAAA,MAAIC,IAAKzC,EAAO0C,KAAK,iCACnBF,EAAA,QAAMG,KAAM,iCAAiCL,KAC1CH,G,CAMD,eAAAS,CAAgBC,EAAqBC,GAC3C,OACEN,EAAA,oBACc,OACZE,KAAK,oCACLD,IAAK,GAAGI,KAAeC,IACvBC,MAAM,a,CAKJ,eAAAC,CAAgBhD,GACtB,OACEwC,EAAA,MAAIC,IAAI,oBAAoBC,KAAK,sCAC9BpD,KAAKO,SAASwC,KAAKY,EAAE,SAAU,CAACjD,U,CAK/B,eAAAkD,CAAgB/B,GACtB,MAAMgC,EAA0B7D,KAAKyC,2BAA2BZ,GAEhE,MAAMiC,EAAiB,GACvB,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAyBE,IAAK,CAChD,GAAIA,EAAI,EAAG,CACTD,EAAME,KAAKhE,KAAKsD,gBAAgBzB,EAAOkC,EAAI,GAAIlC,EAAOkC,I,CAExDD,EAAME,KAAKhE,KAAK4C,YAAYf,EAAOkC,I,CAErC,GAAI/D,KAAKuC,sBAAsBV,GAAS,CACtCiC,EAAME,KACJhE,KAAKsD,gBACHzB,EAAOgC,EAA0B,GACjC,sBAGJC,EAAME,KAAKhE,KAAK0D,gBAAgB7B,EAAOW,OAASqB,G,CAElD,OAAOC,C,CAGF,mBAAAG,GACLjE,KAAK8B,oB,CAGA,MAAAoC,GACL,GAAIlE,KAAKG,eAAiB,KAAM,CAC9BH,KAAKmE,KAAKC,SACV,M,CAEF,OACElB,EAAA,MAAIE,KAAK,mCACHpD,KAAK4D,gBAAgB5D,KAAKG,c,6BA9JPkE,EAAA,CAA5BC,K,+BACwBD,EAAA,CAAxBE,K","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["atomicIpxResultLinkCss","AtomicIpxResultLinkStyle0","AtomicIPXResultLink","initialize","this","host","dispatchEvent","buildCustomEvent","stopPropagation","actionsHistoryActions","loadIPXActionsHistoryActions","bindings","engine","connectedCallback","slotName","hasDefaultSlot","getDefaultSlotFromHost","linkAttributes","getAttributesFromLinkSlot","onSelect","resultPermanentId","result","raw","permanentid","action","addPageViewEntryInActionsHistory","dispatch","interactiveResult","select","render","href","isUndefined","hrefTemplate","clickUri","buildStringTemplateFromResult","h","LinkWithItemAnalytics","key","onBeginDelayedSelect","beginDelayedSelect","onCancelPendingSelect","cancelPendingSelect","attributes","field","default","__decorate","InitializeBindings","ResultContext","InteractiveResultContext"],"sources":["src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.pcss?tag=atomic-ipx-result-link","src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n@reference '../../../utils/tailwind-utilities/link-style.css';\n\natomic-ipx-result-link {\n a {\n @apply link-style;\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {\n IPXActionsHistoryActionCreators,\n InteractiveResult,\n loadIPXActionsHistoryActions,\n} from '@coveo/headless';\nimport {Component, h, Prop, Element} from '@stencil/core';\nimport {buildCustomEvent} from '../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {buildStringTemplateFromResult} from '../../../utils/result-utils';\nimport {getDefaultSlotFromHost} from '../../../utils/slot-utils';\nimport {AnyUnfoldedItem} from '../../common/item-list/unfolded-item';\nimport {getAttributesFromLinkSlot} from '../../common/item-link/attributes-slot';\nimport {LinkWithItemAnalytics} from '../../common/item-link/stencil-item-link';\nimport {RecsBindings} from '../../recommendations/atomic-recs-interface/atomic-recs-interface';\nimport {\n ResultContext,\n InteractiveResultContext,\n} from '../../search/result-template-components/result-template-decorators';\n\n/**\n * The `atomic-ipx-result-link` component automatically transforms a search result title into a clickable link that points to the original item. It is an experimental internal component not intended for general use.\n * @slot default - Lets you display alternative content inside the link\n * @slot attributes - Lets you pass [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) down to the link element, overriding other attributes, to be used exclusively with an \"a\" tag such as `<a slot=\"attributes\" target=\"_blank\" download></a>`.\n * @internal\n */\n@Component({\n tag: 'atomic-ipx-result-link',\n styleUrl: 'atomic-ipx-result-link.pcss',\n shadow: false,\n})\nexport class AtomicIPXResultLink\n implements InitializableComponent<RecsBindings>\n{\n @InitializeBindings() public bindings!: RecsBindings;\n public error!: Error;\n\n @ResultContext() private result!: AnyUnfoldedItem;\n @InteractiveResultContext() private interactiveResult!: InteractiveResult;\n\n @Element() private host!: HTMLElement;\n\n /**\n * Specifies a template literal from which to generate the `href` attribute value (see\n * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).\n *\n * The template literal can reference any number of result properties from the parent result. It can also reference the window object.\n *\n * For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the result's `clickUri` and `itemtitle` fields.\n * ```html\n * <atomic-ipx-result-link href-template='${clickUri}?id=${raw.itemtitle}'></atomic-ipx-result-link>\n * ```\n */\n @Prop({reflect: true}) hrefTemplate?: string;\n\n private hasDefaultSlot!: boolean;\n private linkAttributes?: Attr[];\n private stopPropagation?: boolean;\n private actionsHistoryActions?: IPXActionsHistoryActionCreators;\n\n public initialize() {\n this.host.dispatchEvent(\n buildCustomEvent(\n 'atomic/resolveStopPropagation',\n (stopPropagation: boolean) => {\n this.stopPropagation = stopPropagation;\n }\n )\n );\n this.actionsHistoryActions = loadIPXActionsHistoryActions(\n this.bindings.engine\n );\n }\n\n public connectedCallback() {\n const slotName = 'attributes';\n this.hasDefaultSlot = !!getDefaultSlotFromHost(this.host);\n this.linkAttributes = getAttributesFromLinkSlot(this.host, slotName);\n }\n\n public async onSelect() {\n const resultPermanentId = this.result.raw.permanentid;\n if (resultPermanentId && this.actionsHistoryActions) {\n const action =\n this.actionsHistoryActions.addPageViewEntryInActionsHistory(\n resultPermanentId\n );\n this.bindings.engine.dispatch(action);\n }\n this.interactiveResult.select();\n }\n\n public render() {\n const href = isUndefined(this.hrefTemplate)\n ? this.result.clickUri\n : buildStringTemplateFromResult(\n this.hrefTemplate,\n this.result,\n this.bindings\n );\n\n return (\n <LinkWithItemAnalytics\n href={href}\n onSelect={() => this.onSelect()}\n onBeginDelayedSelect={() => this.interactiveResult.beginDelayedSelect()}\n onCancelPendingSelect={() =>\n this.interactiveResult.cancelPendingSelect()\n }\n attributes={this.linkAttributes}\n stopPropagation={this.stopPropagation}\n >\n {this.hasDefaultSlot ? (\n <slot />\n ) : (\n <atomic-result-text\n field=\"title\"\n default=\"no-title\"\n ></atomic-result-text>\n )}\n </LinkWithItemAnalytics>\n );\n }\n}\n"],"mappings":"uhBAAA,MAAMA,EAAyB,yzkEAC/B,MAAAC,EAAeD,E,iXCiCFE,EAAmB,M,qDA6BvB,UAAAC,GACLC,KAAKC,KAAKC,cACRC,EACE,iCACCC,IACCJ,KAAKI,gBAAkBA,CAAe,KAI5CJ,KAAKK,sBAAwBC,EAC3BN,KAAKO,SAASC,O,CAIX,iBAAAC,GACL,MAAMC,EAAW,aACjBV,KAAKW,iBAAmBC,EAAuBZ,KAAKC,MACpDD,KAAKa,eAAiBC,EAA0Bd,KAAKC,KAAMS,E,CAGtD,cAAMK,GACX,MAAMC,EAAoBhB,KAAKiB,OAAOC,IAAIC,YAC1C,GAAIH,GAAqBhB,KAAKK,sBAAuB,CACnD,MAAMe,EACJpB,KAAKK,sBAAsBgB,iCACzBL,GAEJhB,KAAKO,SAASC,OAAOc,SAASF,E,CAEhCpB,KAAKuB,kBAAkBC,Q,CAGlB,MAAAC,GACL,MAAMC,EAAOC,EAAY3B,KAAK4B,cAC1B5B,KAAKiB,OAAOY,SACZC,EACE9B,KAAK4B,aACL5B,KAAKiB,OACLjB,KAAKO,UAGX,OACEwB,EAACC,EAAqB,CAAAC,IAAA,2CACpBP,KAAMA,EACNX,SAAU,IAAMf,KAAKe,WACrBmB,qBAAsB,IAAMlC,KAAKuB,kBAAkBY,qBACnDC,sBAAuB,IACrBpC,KAAKuB,kBAAkBc,sBAEzBC,WAAYtC,KAAKa,eACjBT,gBAAiBJ,KAAKI,iBAErBJ,KAAKW,eACJoB,EAAA,aAEAA,EAAA,sBACEQ,MAAM,QACNC,QAAQ,a,6BAnFWC,EAAA,CAA5BC,K,+BAGwBD,EAAA,CAAxBE,K,6BACmCF,EAAA,CAAnCG,K","ignoreList":[]}