@coveo/atomic 3.33.8-pre.f26e1593fa → 3.33.8-pre.f660526fae

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 (355) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/atomic.esm.js.map +1 -1
  3. package/dist/atomic/components/_index.d.ts +2 -0
  4. package/dist/atomic/components/_index.js +20 -19
  5. package/dist/atomic/components/analytics-config.js +1 -1
  6. package/dist/atomic/components/atomic-field-condition.js +1 -1
  7. package/dist/atomic/components/atomic-field-condition.js.map +1 -1
  8. package/dist/atomic/components/atomic-insight-history-toggle.js +2 -2
  9. package/dist/atomic/components/atomic-insight-history-toggle.js.map +1 -1
  10. package/dist/atomic/components/atomic-insight-result-action.js +2 -2
  11. package/dist/atomic/components/atomic-insight-result-action.js.map +1 -1
  12. package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js +2 -2
  13. package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js.map +1 -1
  14. package/dist/atomic/components/atomic-insight-result-attach-to-case-indicator.js +2 -2
  15. package/dist/atomic/components/atomic-insight-result-attach-to-case-indicator.js.map +1 -1
  16. package/dist/atomic/components/atomic-insight-result-quickview-action.js +2 -2
  17. package/dist/atomic/components/atomic-insight-result-quickview-action.js.map +1 -1
  18. package/dist/atomic/components/atomic-insight-user-actions-toggle.js +2 -2
  19. package/dist/atomic/components/atomic-insight-user-actions-toggle.js.map +1 -1
  20. package/dist/atomic/components/atomic-ipx-result-link.js +2 -2
  21. package/dist/atomic/components/atomic-ipx-result-link.js.map +1 -1
  22. package/dist/atomic/components/atomic-quickview-modal2.js +1 -1
  23. package/dist/atomic/components/atomic-quickview.js +2 -2
  24. package/dist/atomic/components/atomic-quickview.js.map +1 -1
  25. package/dist/atomic/components/atomic-result-badge.js +1 -1
  26. package/dist/atomic/components/atomic-result-badge.js.map +1 -1
  27. package/dist/atomic/components/atomic-result-children.js +2 -2
  28. package/dist/atomic/components/atomic-result-children.js.map +1 -1
  29. package/dist/atomic/components/atomic-result-date.js +1 -1
  30. package/dist/atomic/components/atomic-result-date.js.map +1 -1
  31. package/dist/atomic/components/atomic-result-fields-list.js +2 -2
  32. package/dist/atomic/components/atomic-result-fields-list.js.map +1 -1
  33. package/dist/atomic/components/atomic-result-html.js +1 -1
  34. package/dist/atomic/components/atomic-result-html.js.map +1 -1
  35. package/dist/atomic/components/atomic-result-icon.js +1 -1
  36. package/dist/atomic/components/atomic-result-icon.js.map +1 -1
  37. package/dist/atomic/components/atomic-result-image.js +1 -1
  38. package/dist/atomic/components/atomic-result-image.js.map +1 -1
  39. package/dist/atomic/components/atomic-result-link.js +2 -2
  40. package/dist/atomic/components/atomic-result-link.js.map +1 -1
  41. package/dist/atomic/components/atomic-result-localized-text.js +1 -1
  42. package/dist/atomic/components/atomic-result-localized-text.js.map +1 -1
  43. package/dist/atomic/components/atomic-result-multi-value-text.js +1 -1
  44. package/dist/atomic/components/atomic-result-multi-value-text.js.map +1 -1
  45. package/dist/atomic/components/atomic-result-number.js +1 -1
  46. package/dist/atomic/components/atomic-result-number.js.map +1 -1
  47. package/dist/atomic/components/atomic-result-printable-uri.js +1 -1
  48. package/dist/atomic/components/atomic-result-printable-uri.js.map +1 -1
  49. package/dist/atomic/components/atomic-result-rating.js +1 -1
  50. package/dist/atomic/components/atomic-result-rating.js.map +1 -1
  51. package/dist/atomic/components/atomic-result-text2.js +1 -1
  52. package/dist/atomic/components/atomic-result-text2.js.map +1 -1
  53. package/dist/atomic/components/atomic-result-timespan.js +1 -1
  54. package/dist/atomic/components/atomic-result-timespan.js.map +1 -1
  55. package/dist/atomic/components/atomic-result2.js.map +1 -1
  56. package/dist/atomic/components/atomic-search-box-recent-queries.d.ts +11 -0
  57. package/dist/atomic/components/atomic-search-box-recent-queries.js +8 -0
  58. package/dist/atomic/components/atomic-search-box-recent-queries.js.map +1 -0
  59. package/dist/atomic/components/atomic-search-box-recent-queries2.js +183 -0
  60. package/dist/atomic/components/atomic-search-box-recent-queries2.js.map +1 -0
  61. package/dist/atomic/components/atomic-search-box.js +8 -2
  62. package/dist/atomic/components/atomic-search-box.js.map +1 -1
  63. package/dist/atomic/components/atomic-smart-snippet-feedback-modal2.js +2 -2
  64. package/dist/atomic/components/atomic-smart-snippet-source2.js +1 -1
  65. package/dist/atomic/components/atomic-smart-snippet-source2.js.map +1 -1
  66. package/dist/atomic/components/atomic-tab-manager.js +1 -1
  67. package/dist/atomic/components/clock.js +2 -2
  68. package/dist/atomic/components/components/commerce/atomic-commerce-interface/atomic-commerce-interface.js +49 -7
  69. package/dist/atomic/components/components/commerce/atomic-commerce-query-summary/atomic-commerce-query-summary.js +2 -2
  70. package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.js +25 -10
  71. package/dist/atomic/components/components/commerce/atomic-product-children/atomic-product-children.js +1 -1
  72. package/dist/atomic/components/components/commerce/atomic-product-description/atomic-product-description.js +1 -1
  73. package/dist/atomic/components/components/commerce/atomic-product-excerpt/atomic-product-excerpt.js +1 -1
  74. package/dist/atomic/components/components/commerce/atomic-product-field-condition/atomic-product-field-condition.js +1 -1
  75. package/dist/atomic/components/components/commerce/atomic-product-image/atomic-product-image.js +1 -1
  76. package/dist/atomic/components/components/commerce/atomic-product-link/atomic-product-link.js +1 -1
  77. package/dist/atomic/components/components/commerce/atomic-product-multi-value-text/atomic-product-multi-value-text.js +1 -1
  78. package/dist/atomic/components/components/commerce/atomic-product-numeric-field-value/atomic-product-numeric-field-value.js +1 -1
  79. package/dist/atomic/components/components/commerce/atomic-product-price/atomic-product-price.js +1 -1
  80. package/dist/atomic/components/components/commerce/atomic-product-rating/atomic-product-rating.js +1 -1
  81. package/dist/atomic/components/components/commerce/atomic-product-text/atomic-product-text.js +1 -1
  82. package/dist/atomic/components/{decorators/commerce/product-template-decorators.js → components/commerce/product-template-component-utils/product-template-controllers.js} +3 -3
  83. package/dist/atomic/components/components/common/atomic-modal/atomic-modal.js +2 -0
  84. package/dist/atomic/components/components/search/index.js +0 -1
  85. package/dist/atomic/components/components/search/lazy-index.js +0 -1
  86. package/dist/atomic/components/global/environment.js +1 -1
  87. package/dist/atomic/components/index.js.map +1 -1
  88. package/dist/atomic/components/{result-template-decorators.js → stencil-result-template-decorators.js} +6 -2
  89. package/dist/atomic/components/stencil-result-template-decorators.js.map +1 -0
  90. package/dist/atomic/index.esm.js +1 -1
  91. package/dist/atomic/index.esm.js.map +1 -1
  92. package/dist/atomic/{p-a3f27d57.entry.js → p-1b498edf.entry.js} +2 -2
  93. package/dist/atomic/p-1b498edf.entry.js.map +1 -0
  94. package/dist/atomic/{p-a760d9f9.entry.js → p-1eca284d.entry.js} +2 -2
  95. package/dist/atomic/p-1eca284d.entry.js.map +1 -0
  96. package/dist/atomic/p-31f1e44e.entry.js +2 -0
  97. package/dist/atomic/p-31f1e44e.entry.js.map +1 -0
  98. package/dist/atomic/{p-e9dc8e90.entry.js → p-327e060b.entry.js} +2 -2
  99. package/dist/atomic/p-327e060b.entry.js.map +1 -0
  100. package/dist/atomic/{p-b3f6561d.entry.js → p-354c8c6d.entry.js} +2 -2
  101. package/dist/atomic/p-354c8c6d.entry.js.map +1 -0
  102. package/dist/atomic/{p-18684d4c.js → p-38f38674.js} +1 -1
  103. package/dist/atomic/p-38f38674.js.map +1 -0
  104. package/dist/atomic/{p-bc0d6d3d.entry.js → p-4ad216aa.entry.js} +2 -2
  105. package/dist/atomic/p-4ad216aa.entry.js.map +1 -0
  106. package/dist/atomic/{p-31aa052e.entry.js → p-4fc59a3d.entry.js} +2 -2
  107. package/dist/atomic/p-4fc59a3d.entry.js.map +1 -0
  108. package/dist/atomic/p-508b63e7.entry.js.map +1 -1
  109. package/dist/atomic/{p-1ff7a9da.entry.js → p-544ed45f.entry.js} +2 -2
  110. package/dist/atomic/p-544ed45f.entry.js.map +1 -0
  111. package/dist/atomic/{p-4b3d253b.entry.js → p-5aea1924.entry.js} +2 -2
  112. package/dist/atomic/p-5aea1924.entry.js.map +1 -0
  113. package/dist/atomic/{p-a4d277c7.entry.js → p-5dc90111.entry.js} +2 -2
  114. package/dist/atomic/p-5dc90111.entry.js.map +1 -0
  115. package/dist/atomic/{p-0c8e7d5f.entry.js → p-5ed9530e.entry.js} +2 -2
  116. package/dist/atomic/p-5ed9530e.entry.js.map +1 -0
  117. package/dist/atomic/{p-ba4bf29f.entry.js → p-6329ff94.entry.js} +2 -2
  118. package/dist/atomic/{p-7383fd32.entry.js → p-6e6d686e.entry.js} +2 -2
  119. package/dist/atomic/{p-c7800a24.entry.js → p-755b5686.entry.js} +2 -2
  120. package/dist/atomic/p-755b5686.entry.js.map +1 -0
  121. package/dist/atomic/{p-ae98c582.entry.js → p-7a625c7e.entry.js} +2 -2
  122. package/dist/atomic/{p-52ba404c.entry.js → p-7e9eaccb.entry.js} +2 -2
  123. package/dist/atomic/p-7e9eaccb.entry.js.map +1 -0
  124. package/dist/atomic/{p-02a26509.entry.js → p-8099221a.entry.js} +2 -2
  125. package/dist/atomic/{p-b28011e6.entry.js → p-887b1c08.entry.js} +2 -2
  126. package/dist/atomic/{p-78427c6a.entry.js → p-91b40354.entry.js} +2 -2
  127. package/dist/atomic/p-91b40354.entry.js.map +1 -0
  128. package/dist/atomic/{p-190ddaca.entry.js → p-98276779.entry.js} +2 -2
  129. package/dist/atomic/p-98276779.entry.js.map +1 -0
  130. package/dist/atomic/{p-e162805d.entry.js → p-a4d6fd2c.entry.js} +2 -2
  131. package/dist/atomic/{p-e162805d.entry.js.map → p-a4d6fd2c.entry.js.map} +1 -1
  132. package/dist/atomic/{p-39e63678.entry.js → p-aa2a81fd.entry.js} +2 -2
  133. package/dist/atomic/{p-c9f1790d.entry.js → p-adcfce31.entry.js} +2 -2
  134. package/dist/atomic/p-adcfce31.entry.js.map +1 -0
  135. package/dist/atomic/{p-d6faddc7.js → p-b4b27aa2.js} +2 -2
  136. package/dist/atomic/{p-1ef658d8.entry.js → p-b7bff15f.entry.js} +2 -2
  137. package/dist/atomic/p-b7bff15f.entry.js.map +1 -0
  138. package/dist/atomic/{p-e1cc5150.js → p-c280cd05.js} +1 -1
  139. package/dist/atomic/{p-8c5cd9e9.entry.js → p-c309eb0f.entry.js} +2 -2
  140. package/dist/atomic/{p-604c4085.entry.js → p-c567fcdb.entry.js} +2 -2
  141. package/dist/atomic/p-c567fcdb.entry.js.map +1 -0
  142. package/dist/atomic/{p-75e00690.entry.js → p-d1d4fc60.entry.js} +2 -2
  143. package/dist/atomic/p-d1d4fc60.entry.js.map +1 -0
  144. package/dist/atomic/{p-945ddd53.entry.js → p-d49328d9.entry.js} +2 -2
  145. package/dist/atomic/p-d49328d9.entry.js.map +1 -0
  146. package/dist/atomic/{p-3a2c900c.entry.js → p-f3bea093.entry.js} +2 -2
  147. package/dist/atomic/p-f3bea093.entry.js.map +1 -0
  148. package/dist/atomic/{p-49438035.entry.js → p-f6c5957e.entry.js} +2 -2
  149. package/dist/atomic/{p-dbf0c5a3.entry.js → p-f70d8cdf.entry.js} +2 -2
  150. package/dist/atomic/{p-dbf0c5a3.entry.js.map → p-f70d8cdf.entry.js.map} +1 -1
  151. package/dist/atomic/{p-8a00adbe.entry.js → p-fd99979c.entry.js} +2 -2
  152. package/dist/atomic/p-fd99979c.entry.js.map +1 -0
  153. package/dist/cjs/_index.cjs.js +20 -20
  154. package/dist/cjs/_loader.cjs.js +1 -1
  155. package/dist/cjs/{analytics-config-8de7a0b5.js → analytics-config-57e2d9c2.js} +2 -2
  156. package/dist/cjs/{analytics-config-8de7a0b5.js.map → analytics-config-57e2d9c2.js.map} +1 -1
  157. package/dist/cjs/atomic-field-condition.cjs.entry.js +2 -2
  158. package/dist/cjs/atomic-field-condition.cjs.entry.js.map +1 -1
  159. package/dist/cjs/atomic-insight-history-toggle.cjs.entry.js +2 -2
  160. package/dist/cjs/atomic-insight-history-toggle.cjs.entry.js.map +1 -1
  161. package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
  162. package/dist/cjs/atomic-insight-result-action.cjs.entry.js +3 -3
  163. package/dist/cjs/atomic-insight-result-action.cjs.entry.js.map +1 -1
  164. package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js +3 -3
  165. package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js.map +1 -1
  166. package/dist/cjs/atomic-insight-result-attach-to-case-indicator.cjs.entry.js +3 -3
  167. package/dist/cjs/atomic-insight-result-attach-to-case-indicator.cjs.entry.js.map +1 -1
  168. package/dist/cjs/atomic-insight-result-quickview-action.cjs.entry.js +3 -3
  169. package/dist/cjs/atomic-insight-result-quickview-action.cjs.entry.js.map +1 -1
  170. package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js +2 -2
  171. package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js.map +1 -1
  172. package/dist/cjs/atomic-ipx-result-link.cjs.entry.js +4 -4
  173. package/dist/cjs/atomic-ipx-result-link.cjs.entry.js.map +1 -1
  174. package/dist/cjs/atomic-quickview-modal.cjs.entry.js +1 -1
  175. package/dist/cjs/atomic-quickview.cjs.entry.js +3 -3
  176. package/dist/cjs/atomic-quickview.cjs.entry.js.map +1 -1
  177. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  178. package/dist/cjs/atomic-result-badge.cjs.entry.js +2 -2
  179. package/dist/cjs/atomic-result-badge.cjs.entry.js.map +1 -1
  180. package/dist/cjs/atomic-result-children.cjs.entry.js +3 -3
  181. package/dist/cjs/atomic-result-children.cjs.entry.js.map +1 -1
  182. package/dist/cjs/atomic-result-date.cjs.entry.js +2 -2
  183. package/dist/cjs/atomic-result-date.cjs.entry.js.map +1 -1
  184. package/dist/cjs/atomic-result-fields-list.cjs.entry.js +3 -3
  185. package/dist/cjs/atomic-result-fields-list.cjs.entry.js.map +1 -1
  186. package/dist/cjs/atomic-result-html.cjs.entry.js +2 -2
  187. package/dist/cjs/atomic-result-html.cjs.entry.js.map +1 -1
  188. package/dist/cjs/atomic-result-icon.cjs.entry.js +2 -2
  189. package/dist/cjs/atomic-result-icon.cjs.entry.js.map +1 -1
  190. package/dist/cjs/atomic-result-image.cjs.entry.js +2 -2
  191. package/dist/cjs/atomic-result-image.cjs.entry.js.map +1 -1
  192. package/dist/cjs/atomic-result-link.cjs.entry.js +4 -4
  193. package/dist/cjs/atomic-result-link.cjs.entry.js.map +1 -1
  194. package/dist/cjs/atomic-result-localized-text.cjs.entry.js +3 -3
  195. package/dist/cjs/atomic-result-localized-text.cjs.entry.js.map +1 -1
  196. package/dist/cjs/atomic-result-multi-value-text.cjs.entry.js +2 -2
  197. package/dist/cjs/atomic-result-multi-value-text.cjs.entry.js.map +1 -1
  198. package/dist/cjs/atomic-result-number.cjs.entry.js +2 -2
  199. package/dist/cjs/atomic-result-number.cjs.entry.js.map +1 -1
  200. package/dist/cjs/atomic-result-printable-uri.cjs.entry.js +2 -2
  201. package/dist/cjs/atomic-result-printable-uri.cjs.entry.js.map +1 -1
  202. package/dist/cjs/atomic-result-rating.cjs.entry.js +2 -2
  203. package/dist/cjs/atomic-result-rating.cjs.entry.js.map +1 -1
  204. package/dist/cjs/atomic-result-text_2.cjs.entry.js +2 -2
  205. package/dist/cjs/atomic-result-text_2.cjs.entry.js.map +1 -1
  206. package/dist/cjs/atomic-result-timespan.cjs.entry.js +2 -2
  207. package/dist/cjs/atomic-result-timespan.cjs.entry.js.map +1 -1
  208. package/dist/cjs/atomic-result.cjs.entry.js.map +1 -1
  209. package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js +234 -0
  210. package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js.map +1 -0
  211. package/dist/cjs/atomic-search-interface.cjs.entry.js +1 -1
  212. package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js +1 -1
  213. package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js.map +1 -1
  214. package/dist/cjs/atomic-smart-snippet-feedback-modal.cjs.entry.js +2 -2
  215. package/dist/cjs/atomic-tab-manager.cjs.entry.js +1 -1
  216. package/dist/cjs/atomic.cjs.js +1 -1
  217. package/dist/cjs/clock-f03ff827.js +7 -0
  218. package/dist/cjs/clock-f03ff827.js.map +1 -0
  219. package/dist/cjs/index-757bc886.js +2 -2
  220. package/dist/cjs/index.cjs.js.map +1 -1
  221. package/dist/cjs/{result-template-decorators-432d11a9.js → stencil-result-template-decorators-5cb5b6e3.js} +6 -2
  222. package/dist/cjs/stencil-result-template-decorators-5cb5b6e3.js.map +1 -0
  223. package/dist/cjs/version.cjs.js +2 -2
  224. package/dist/esm/_index.js +19 -19
  225. package/dist/esm/_loader.js +1 -1
  226. package/dist/esm/{analytics-config-1973be4e.js → analytics-config-3127413c.js} +2 -2
  227. package/dist/esm/{analytics-config-1973be4e.js.map → analytics-config-3127413c.js.map} +1 -1
  228. package/dist/esm/atomic-field-condition.entry.js +1 -1
  229. package/dist/esm/atomic-field-condition.entry.js.map +1 -1
  230. package/dist/esm/atomic-insight-history-toggle.entry.js +2 -2
  231. package/dist/esm/atomic-insight-history-toggle.entry.js.map +1 -1
  232. package/dist/esm/atomic-insight-interface.entry.js +1 -1
  233. package/dist/esm/atomic-insight-result-action.entry.js +2 -2
  234. package/dist/esm/atomic-insight-result-action.entry.js.map +1 -1
  235. package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js +2 -2
  236. package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js.map +1 -1
  237. package/dist/esm/atomic-insight-result-attach-to-case-indicator.entry.js +2 -2
  238. package/dist/esm/atomic-insight-result-attach-to-case-indicator.entry.js.map +1 -1
  239. package/dist/esm/atomic-insight-result-quickview-action.entry.js +2 -2
  240. package/dist/esm/atomic-insight-result-quickview-action.entry.js.map +1 -1
  241. package/dist/esm/atomic-insight-user-actions-toggle.entry.js +2 -2
  242. package/dist/esm/atomic-insight-user-actions-toggle.entry.js.map +1 -1
  243. package/dist/esm/atomic-ipx-result-link.entry.js +2 -2
  244. package/dist/esm/atomic-ipx-result-link.entry.js.map +1 -1
  245. package/dist/esm/atomic-quickview-modal.entry.js +1 -1
  246. package/dist/esm/atomic-quickview.entry.js +2 -2
  247. package/dist/esm/atomic-quickview.entry.js.map +1 -1
  248. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  249. package/dist/esm/atomic-result-badge.entry.js +1 -1
  250. package/dist/esm/atomic-result-badge.entry.js.map +1 -1
  251. package/dist/esm/atomic-result-children.entry.js +2 -2
  252. package/dist/esm/atomic-result-children.entry.js.map +1 -1
  253. package/dist/esm/atomic-result-date.entry.js +1 -1
  254. package/dist/esm/atomic-result-date.entry.js.map +1 -1
  255. package/dist/esm/atomic-result-fields-list.entry.js +2 -2
  256. package/dist/esm/atomic-result-fields-list.entry.js.map +1 -1
  257. package/dist/esm/atomic-result-html.entry.js +1 -1
  258. package/dist/esm/atomic-result-html.entry.js.map +1 -1
  259. package/dist/esm/atomic-result-icon.entry.js +1 -1
  260. package/dist/esm/atomic-result-icon.entry.js.map +1 -1
  261. package/dist/esm/atomic-result-image.entry.js +1 -1
  262. package/dist/esm/atomic-result-image.entry.js.map +1 -1
  263. package/dist/esm/atomic-result-link.entry.js +2 -2
  264. package/dist/esm/atomic-result-link.entry.js.map +1 -1
  265. package/dist/esm/atomic-result-localized-text.entry.js +2 -2
  266. package/dist/esm/atomic-result-localized-text.entry.js.map +1 -1
  267. package/dist/esm/atomic-result-multi-value-text.entry.js +1 -1
  268. package/dist/esm/atomic-result-multi-value-text.entry.js.map +1 -1
  269. package/dist/esm/atomic-result-number.entry.js +1 -1
  270. package/dist/esm/atomic-result-number.entry.js.map +1 -1
  271. package/dist/esm/atomic-result-printable-uri.entry.js +1 -1
  272. package/dist/esm/atomic-result-printable-uri.entry.js.map +1 -1
  273. package/dist/esm/atomic-result-rating.entry.js +1 -1
  274. package/dist/esm/atomic-result-rating.entry.js.map +1 -1
  275. package/dist/esm/atomic-result-text_2.entry.js +1 -1
  276. package/dist/esm/atomic-result-text_2.entry.js.map +1 -1
  277. package/dist/esm/atomic-result-timespan.entry.js +1 -1
  278. package/dist/esm/atomic-result-timespan.entry.js.map +1 -1
  279. package/dist/esm/atomic-result.entry.js.map +1 -1
  280. package/dist/esm/atomic-search-box-query-suggestions_2.entry.js +229 -0
  281. package/dist/esm/atomic-search-box-query-suggestions_2.entry.js.map +1 -0
  282. package/dist/esm/atomic-search-interface.entry.js +1 -1
  283. package/dist/esm/atomic-smart-snippet-answer_2.entry.js +1 -1
  284. package/dist/esm/atomic-smart-snippet-answer_2.entry.js.map +1 -1
  285. package/dist/esm/atomic-smart-snippet-feedback-modal.entry.js +2 -2
  286. package/dist/esm/atomic-tab-manager.entry.js +1 -1
  287. package/dist/esm/atomic.js +1 -1
  288. package/dist/esm/clock-add3e9a5.js +5 -0
  289. package/dist/esm/clock-add3e9a5.js.map +1 -0
  290. package/dist/esm/index-3f35faca.js +2 -2
  291. package/dist/esm/index.js.map +1 -1
  292. package/dist/esm/{result-template-decorators-2ed76ea9.js → stencil-result-template-decorators-b48247e4.js} +6 -2
  293. package/dist/esm/stencil-result-template-decorators-b48247e4.js.map +1 -0
  294. package/dist/esm/version.js +2 -2
  295. package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts +29 -1
  296. package/dist/types/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.d.ts +1 -0
  297. package/dist/types/components/commerce/atomic-product/atomic-product.d.ts +1 -1
  298. package/dist/types/{decorators/commerce/product-template-decorators.d.ts → components/commerce/product-template-component-utils/product-template-controllers.d.ts} +2 -2
  299. package/dist/types/components/commerce/product-template-component-utils/stencil-product-template-decorators.d.ts +1 -1
  300. package/dist/types/components/common/smart-snippets/atomic-smart-snippet-source.d.ts +1 -1
  301. package/dist/types/components/search/atomic-result/atomic-result.d.ts +1 -1
  302. package/dist/types/components/search/index.d.ts +0 -1
  303. package/dist/types/components/search/result-template-component-utils/result-template-controllers.d.ts +34 -0
  304. package/dist/types/components/search/{result-template-components/result-template-decorators.d.ts → result-template-component-utils/stencil-result-template-decorators.d.ts} +5 -1
  305. package/dist/types/components/search/{atomic-search-box-recent-queries → search-box-suggestions/atomic-search-box-recent-queries}/atomic-search-box-recent-queries.d.ts +7 -15
  306. package/dist/types/components.d.ts +49 -0
  307. package/dist/types/index.d.ts +2 -2
  308. package/docs/atomic-docs.json +98 -1
  309. package/package.json +3 -3
  310. package/dist/atomic/components/components/search/atomic-search-box-recent-queries/atomic-search-box-recent-queries.js +0 -137
  311. package/dist/atomic/components/result-template-decorators.js.map +0 -1
  312. package/dist/atomic/p-0c8e7d5f.entry.js.map +0 -1
  313. package/dist/atomic/p-18684d4c.js.map +0 -1
  314. package/dist/atomic/p-190ddaca.entry.js.map +0 -1
  315. package/dist/atomic/p-1ef658d8.entry.js.map +0 -1
  316. package/dist/atomic/p-1ff7a9da.entry.js.map +0 -1
  317. package/dist/atomic/p-2e9db4ca.entry.js +0 -2
  318. package/dist/atomic/p-2e9db4ca.entry.js.map +0 -1
  319. package/dist/atomic/p-31aa052e.entry.js.map +0 -1
  320. package/dist/atomic/p-3a2c900c.entry.js.map +0 -1
  321. package/dist/atomic/p-4b3d253b.entry.js.map +0 -1
  322. package/dist/atomic/p-52ba404c.entry.js.map +0 -1
  323. package/dist/atomic/p-604c4085.entry.js.map +0 -1
  324. package/dist/atomic/p-75e00690.entry.js.map +0 -1
  325. package/dist/atomic/p-78427c6a.entry.js.map +0 -1
  326. package/dist/atomic/p-8a00adbe.entry.js.map +0 -1
  327. package/dist/atomic/p-945ddd53.entry.js.map +0 -1
  328. package/dist/atomic/p-a3f27d57.entry.js.map +0 -1
  329. package/dist/atomic/p-a4d277c7.entry.js.map +0 -1
  330. package/dist/atomic/p-a760d9f9.entry.js.map +0 -1
  331. package/dist/atomic/p-b3f6561d.entry.js.map +0 -1
  332. package/dist/atomic/p-bc0d6d3d.entry.js.map +0 -1
  333. package/dist/atomic/p-c7800a24.entry.js.map +0 -1
  334. package/dist/atomic/p-c9f1790d.entry.js.map +0 -1
  335. package/dist/atomic/p-e9dc8e90.entry.js.map +0 -1
  336. package/dist/cjs/atomic-search-box-query-suggestions.cjs.entry.js +0 -76
  337. package/dist/cjs/atomic-search-box-query-suggestions.cjs.entry.js.map +0 -1
  338. package/dist/cjs/clock-7aeb19d0.js +0 -7
  339. package/dist/cjs/clock-7aeb19d0.js.map +0 -1
  340. package/dist/cjs/result-template-decorators-432d11a9.js.map +0 -1
  341. package/dist/esm/atomic-search-box-query-suggestions.entry.js +0 -72
  342. package/dist/esm/atomic-search-box-query-suggestions.entry.js.map +0 -1
  343. package/dist/esm/clock-b1f5d7f7.js +0 -5
  344. package/dist/esm/clock-b1f5d7f7.js.map +0 -1
  345. package/dist/esm/result-template-decorators-2ed76ea9.js.map +0 -1
  346. /package/dist/atomic/{p-ba4bf29f.entry.js.map → p-6329ff94.entry.js.map} +0 -0
  347. /package/dist/atomic/{p-7383fd32.entry.js.map → p-6e6d686e.entry.js.map} +0 -0
  348. /package/dist/atomic/{p-ae98c582.entry.js.map → p-7a625c7e.entry.js.map} +0 -0
  349. /package/dist/atomic/{p-02a26509.entry.js.map → p-8099221a.entry.js.map} +0 -0
  350. /package/dist/atomic/{p-b28011e6.entry.js.map → p-887b1c08.entry.js.map} +0 -0
  351. /package/dist/atomic/{p-39e63678.entry.js.map → p-aa2a81fd.entry.js.map} +0 -0
  352. /package/dist/atomic/{p-d6faddc7.js.map → p-b4b27aa2.js.map} +0 -0
  353. /package/dist/atomic/{p-e1cc5150.js.map → p-c280cd05.js.map} +0 -0
  354. /package/dist/atomic/{p-8c5cd9e9.entry.js.map → p-c309eb0f.entry.js.map} +0 -0
  355. /package/dist/atomic/{p-49438035.entry.js.map → p-f6c5957e.entry.js.map} +0 -0
@@ -1,15 +1,11 @@
1
- import { type SearchBox } from '@coveo/headless';
2
- import { LitElement } from 'lit';
3
- import type { SearchBoxSuggestionsComponent } from "../../../decorators/types";
4
- import type { SearchBoxSuggestions, SearchBoxSuggestionsBindings } from '../../common/suggestions/suggestions-types';
5
- import type { Bindings } from '../atomic-search-interface/interfaces';
6
1
  /**
7
2
  * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
8
3
  */
9
- export declare class AtomicSearchBoxRecentQueries extends LitElement implements SearchBoxSuggestionsComponent<Bindings> {
10
- bindings: SearchBoxSuggestionsBindings<SearchBox, Bindings>;
4
+ export declare class AtomicSearchBoxRecentQueries {
5
+ private bindings;
11
6
  private recentQueriesList;
12
7
  private storage;
8
+ private host;
13
9
  error: Error;
14
10
  /**
15
11
  * The SVG icon to display.
@@ -27,8 +23,9 @@ export declare class AtomicSearchBoxRecentQueries extends LitElement implements
27
23
  * The maximum number of suggestions that will be displayed initially when the input field is empty.
28
24
  */
29
25
  maxWithoutQuery?: number;
30
- connectedCallback(): void;
31
- initialize(): SearchBoxSuggestions;
26
+ componentWillLoad(): void;
27
+ private renderIcon;
28
+ private initialize;
32
29
  private retrieveLocalStorage;
33
30
  private updateLocalStorage;
34
31
  private warnUser;
@@ -36,10 +33,5 @@ export declare class AtomicSearchBoxRecentQueries extends LitElement implements
36
33
  private renderItems;
37
34
  private renderClear;
38
35
  private renderItem;
39
- render(): import("lit-html").TemplateResult<1>;
40
- }
41
- declare global {
42
- interface HTMLElementTagNameMap {
43
- 'atomic-search-box-recent-queries': AtomicSearchBoxRecentQueries;
44
- }
36
+ render(): any;
45
37
  }
@@ -2432,6 +2432,23 @@ export namespace Components {
2432
2432
  */
2433
2433
  "maxWithoutQuery"?: number;
2434
2434
  }
2435
+ /**
2436
+ * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
2437
+ */
2438
+ interface AtomicSearchBoxRecentQueries {
2439
+ /**
2440
+ * The SVG icon to display. - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location. - Use a value that starts with `assets://`, to display an icon from the Atomic package. - Use a stringified SVG to display it directly.
2441
+ */
2442
+ "icon"?: string;
2443
+ /**
2444
+ * The maximum number of suggestions that will be displayed if the user has typed something into the input field.
2445
+ */
2446
+ "maxWithQuery": number;
2447
+ /**
2448
+ * The maximum number of suggestions that will be displayed initially when the input field is empty.
2449
+ */
2450
+ "maxWithoutQuery"?: number;
2451
+ }
2435
2452
  /**
2436
2453
  * The `atomic-search-interface` component is the parent to all other atomic components in a search page. It handles the headless search engine and localization configurations.
2437
2454
  */
@@ -4186,6 +4203,15 @@ declare global {
4186
4203
  prototype: HTMLAtomicSearchBoxQuerySuggestionsElement;
4187
4204
  new (): HTMLAtomicSearchBoxQuerySuggestionsElement;
4188
4205
  };
4206
+ /**
4207
+ * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
4208
+ */
4209
+ interface HTMLAtomicSearchBoxRecentQueriesElement extends Components.AtomicSearchBoxRecentQueries, HTMLStencilElement {
4210
+ }
4211
+ var HTMLAtomicSearchBoxRecentQueriesElement: {
4212
+ prototype: HTMLAtomicSearchBoxRecentQueriesElement;
4213
+ new (): HTMLAtomicSearchBoxRecentQueriesElement;
4214
+ };
4189
4215
  /**
4190
4216
  * The `atomic-search-interface` component is the parent to all other atomic components in a search page. It handles the headless search engine and localization configurations.
4191
4217
  */
@@ -4590,6 +4616,7 @@ declare global {
4590
4616
  "atomic-search-box": HTMLAtomicSearchBoxElement;
4591
4617
  "atomic-search-box-instant-results": HTMLAtomicSearchBoxInstantResultsElement;
4592
4618
  "atomic-search-box-query-suggestions": HTMLAtomicSearchBoxQuerySuggestionsElement;
4619
+ "atomic-search-box-recent-queries": HTMLAtomicSearchBoxRecentQueriesElement;
4593
4620
  "atomic-search-interface": HTMLAtomicSearchInterfaceElement;
4594
4621
  "atomic-segmented-facet": HTMLAtomicSegmentedFacetElement;
4595
4622
  "atomic-segmented-facet-scrollable": HTMLAtomicSegmentedFacetScrollableElement;
@@ -6872,6 +6899,23 @@ declare namespace LocalJSX {
6872
6899
  */
6873
6900
  "maxWithoutQuery"?: number;
6874
6901
  }
6902
+ /**
6903
+ * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
6904
+ */
6905
+ interface AtomicSearchBoxRecentQueries {
6906
+ /**
6907
+ * The SVG icon to display. - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location. - Use a value that starts with `assets://`, to display an icon from the Atomic package. - Use a stringified SVG to display it directly.
6908
+ */
6909
+ "icon"?: string;
6910
+ /**
6911
+ * The maximum number of suggestions that will be displayed if the user has typed something into the input field.
6912
+ */
6913
+ "maxWithQuery"?: number;
6914
+ /**
6915
+ * The maximum number of suggestions that will be displayed initially when the input field is empty.
6916
+ */
6917
+ "maxWithoutQuery"?: number;
6918
+ }
6875
6919
  /**
6876
6920
  * The `atomic-search-interface` component is the parent to all other atomic components in a search page. It handles the headless search engine and localization configurations.
6877
6921
  */
@@ -7444,6 +7488,7 @@ declare namespace LocalJSX {
7444
7488
  "atomic-search-box": AtomicSearchBox;
7445
7489
  "atomic-search-box-instant-results": AtomicSearchBoxInstantResults;
7446
7490
  "atomic-search-box-query-suggestions": AtomicSearchBoxQuerySuggestions;
7491
+ "atomic-search-box-recent-queries": AtomicSearchBoxRecentQueries;
7447
7492
  "atomic-search-interface": AtomicSearchInterface;
7448
7493
  "atomic-segmented-facet": AtomicSegmentedFacet;
7449
7494
  "atomic-segmented-facet-scrollable": AtomicSegmentedFacetScrollable;
@@ -7960,6 +8005,10 @@ declare module "@stencil/core" {
7960
8005
  * The `atomic-search-box-query-suggestions` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of query suggestion behavior.
7961
8006
  */
7962
8007
  "atomic-search-box-query-suggestions": LocalJSX.AtomicSearchBoxQuerySuggestions & JSXBase.HTMLAttributes<HTMLAtomicSearchBoxQuerySuggestionsElement>;
8008
+ /**
8009
+ * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
8010
+ */
8011
+ "atomic-search-box-recent-queries": LocalJSX.AtomicSearchBoxRecentQueries & JSXBase.HTMLAttributes<HTMLAtomicSearchBoxRecentQueriesElement>;
7963
8012
  /**
7964
8013
  * The `atomic-search-interface` component is the parent to all other atomic components in a search page. It handles the headless search engine and localization configurations.
7965
8014
  */
@@ -2,6 +2,7 @@ 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 { fetchProductContext } from './components/commerce/product-template-component-utils/product-template-controllers';
5
6
  export { productContext } from './components/commerce/product-template-component-utils/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';
@@ -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/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-09-26T15:18:14",
2
+ "timestamp": "2025-09-30T16:13:41",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.20.0",
@@ -12480,11 +12480,13 @@
12480
12480
  "dependents": [],
12481
12481
  "dependencies": [
12482
12482
  "atomic-suggestion-renderer",
12483
+ "atomic-search-box-recent-queries",
12483
12484
  "atomic-search-box-query-suggestions"
12484
12485
  ],
12485
12486
  "dependencyGraph": {
12486
12487
  "atomic-search-box": [
12487
12488
  "atomic-suggestion-renderer",
12489
+ "atomic-search-box-recent-queries",
12488
12490
  "atomic-search-box-query-suggestions"
12489
12491
  ]
12490
12492
  }
@@ -12803,6 +12805,101 @@
12803
12805
  ]
12804
12806
  }
12805
12807
  },
12808
+ {
12809
+ "filePath": "src/components/search/search-box-suggestions/atomic-search-box-recent-queries/atomic-search-box-recent-queries.tsx",
12810
+ "encapsulation": "shadow",
12811
+ "tag": "atomic-search-box-recent-queries",
12812
+ "docs": "The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.",
12813
+ "docsTags": [],
12814
+ "usage": {},
12815
+ "props": [
12816
+ {
12817
+ "name": "icon",
12818
+ "type": "string | undefined",
12819
+ "complexType": {
12820
+ "original": "string",
12821
+ "resolved": "string | undefined",
12822
+ "references": {}
12823
+ },
12824
+ "mutable": false,
12825
+ "attr": "icon",
12826
+ "reflectToAttr": false,
12827
+ "docs": "The SVG icon to display.\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.",
12828
+ "docsTags": [],
12829
+ "values": [
12830
+ {
12831
+ "type": "string"
12832
+ },
12833
+ {
12834
+ "type": "undefined"
12835
+ }
12836
+ ],
12837
+ "optional": true,
12838
+ "required": false
12839
+ },
12840
+ {
12841
+ "name": "maxWithQuery",
12842
+ "type": "number",
12843
+ "complexType": {
12844
+ "original": "number",
12845
+ "resolved": "number",
12846
+ "references": {}
12847
+ },
12848
+ "mutable": false,
12849
+ "attr": "max-with-query",
12850
+ "reflectToAttr": true,
12851
+ "docs": "The maximum number of suggestions that will be displayed if the user has typed something into the input field.",
12852
+ "docsTags": [],
12853
+ "default": "3",
12854
+ "values": [
12855
+ {
12856
+ "type": "number"
12857
+ }
12858
+ ],
12859
+ "optional": false,
12860
+ "required": false
12861
+ },
12862
+ {
12863
+ "name": "maxWithoutQuery",
12864
+ "type": "number | undefined",
12865
+ "complexType": {
12866
+ "original": "number",
12867
+ "resolved": "number | undefined",
12868
+ "references": {}
12869
+ },
12870
+ "mutable": false,
12871
+ "attr": "max-without-query",
12872
+ "reflectToAttr": true,
12873
+ "docs": "The maximum number of suggestions that will be displayed initially when the input field is empty.",
12874
+ "docsTags": [],
12875
+ "values": [
12876
+ {
12877
+ "type": "number"
12878
+ },
12879
+ {
12880
+ "type": "undefined"
12881
+ }
12882
+ ],
12883
+ "optional": true,
12884
+ "required": false
12885
+ }
12886
+ ],
12887
+ "methods": [],
12888
+ "events": [],
12889
+ "listeners": [],
12890
+ "styles": [],
12891
+ "slots": [],
12892
+ "parts": [],
12893
+ "dependents": [
12894
+ "atomic-search-box"
12895
+ ],
12896
+ "dependencies": [],
12897
+ "dependencyGraph": {
12898
+ "atomic-search-box": [
12899
+ "atomic-search-box-recent-queries"
12900
+ ]
12901
+ }
12902
+ },
12806
12903
  {
12807
12904
  "filePath": "src/components/search/atomic-search-interface/atomic-search-interface.tsx",
12808
12905
  "encapsulation": "shadow",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coveo/atomic",
3
3
  "type": "module",
4
- "version": "3.33.8-pre.f26e1593fa",
4
+ "version": "3.33.8-pre.f660526fae",
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": {
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "dependencies": {
83
83
  "@coveo/bueno": "1.1.2",
84
- "@coveo/headless": "3.31.1-pre.f26e1593fa",
84
+ "@coveo/headless": "3.31.1-pre.f660526fae",
85
85
  "@lit/context": "1.1.6",
86
86
  "@open-wc/lit-helpers": "0.7.0",
87
87
  "@popperjs/core": "2.11.8",
@@ -153,7 +153,7 @@
153
153
  },
154
154
  "peerDependencies": {
155
155
  "@coveo/bueno": "1.1.2",
156
- "@coveo/headless": "3.31.1-pre.f26e1593fa",
156
+ "@coveo/headless": "3.31.1-pre.f660526fae",
157
157
  "typescript": ">=5.0.0"
158
158
  },
159
159
  "peerDependenciesMeta": {
@@ -1,137 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { buildRecentQueriesList, } from '@coveo/headless';
8
- import { html, LitElement, nothing } from 'lit';
9
- import { customElement, property, state } from 'lit/decorators.js';
10
- import { errorGuard } from "../../../decorators/error-guard";
11
- import { SafeStorage, StorageItems } from "../../../utils/local-storage-utils";
12
- import { once } from "../../../utils/utils";
13
- const Clock = "<svg fill=\"none\" stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-linecap=\"round\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"8\" cy=\"8\" r=\"7.5\"/><path d=\"m8.5 4.5v4\"/><path d=\"m10.3066 10.1387-1.80932-1.5768\"/></svg>";
14
- import { getPartialRecentQueryClearElement, getPartialRecentQueryElement, renderRecentQuery, renderRecentQueryClear, } from '../../common/suggestions/recent-queries';
15
- import { dispatchSearchBoxSuggestionsEvent } from '../../common/suggestions/suggestions-events';
16
- /**
17
- * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
18
- */
19
- let AtomicSearchBoxRecentQueries = class AtomicSearchBoxRecentQueries extends LitElement {
20
- constructor() {
21
- super(...arguments);
22
- /**
23
- * The maximum number of suggestions that will be displayed if the user has typed something into the input field.
24
- */
25
- this.maxWithQuery = 3;
26
- this.warnUser = once(() => this.bindings.engine.logger.warn('Because analytics are disabled, the recent queries feature is deactivated.'));
27
- }
28
- connectedCallback() {
29
- super.connectedCallback();
30
- try {
31
- dispatchSearchBoxSuggestionsEvent((bindings) => {
32
- this.bindings = bindings;
33
- return this.initialize();
34
- }, this, ['atomic-search-box']);
35
- }
36
- catch (error) {
37
- this.error = error;
38
- }
39
- }
40
- initialize() {
41
- this.storage = new SafeStorage();
42
- this.recentQueriesList = buildRecentQueriesList(this.bindings.engine, {
43
- initialState: { queries: this.retrieveLocalStorage() },
44
- options: {
45
- maxLength: 1000,
46
- clearFilters: this.bindings.clearFilters,
47
- },
48
- });
49
- this.recentQueriesList.subscribe(() => this.updateLocalStorage());
50
- return {
51
- position: Array.from(this.parentNode.children).indexOf(this),
52
- renderItems: () => this.renderItems(),
53
- };
54
- }
55
- retrieveLocalStorage() {
56
- return this.storage.getParsedJSON(StorageItems.RECENT_QUERIES, []);
57
- }
58
- updateLocalStorage() {
59
- if (!this.recentQueriesList.state.analyticsEnabled) {
60
- return this.disableFeature();
61
- }
62
- return this.storage.setJSON(StorageItems.RECENT_QUERIES, this.recentQueriesList.state.queries);
63
- }
64
- disableFeature() {
65
- this.warnUser();
66
- this.storage.removeItem(StorageItems.RECENT_QUERIES);
67
- }
68
- renderItems() {
69
- if (!this.recentQueriesList.state.analyticsEnabled) {
70
- return [];
71
- }
72
- const query = this.bindings.searchBoxController.state.value;
73
- const hasQuery = query !== '';
74
- const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;
75
- const filteredQueries = this.recentQueriesList.state.queries
76
- .filter((recentQuery) => recentQuery.toLowerCase().startsWith(query.toLowerCase()))
77
- .slice(0, max);
78
- const suggestionElements = filteredQueries.map((value) => this.renderItem(value));
79
- if (suggestionElements.length) {
80
- suggestionElements.unshift(this.renderClear());
81
- }
82
- return suggestionElements;
83
- }
84
- renderClear() {
85
- const partialItem = getPartialRecentQueryClearElement(this.bindings.i18n);
86
- return {
87
- ...partialItem,
88
- content: renderRecentQueryClear({ i18n: this.bindings.i18n }),
89
- onSelect: () => {
90
- this.recentQueriesList.clear();
91
- this.bindings.triggerSuggestions();
92
- },
93
- };
94
- }
95
- renderItem(value) {
96
- const query = this.bindings.searchBoxController.state.value;
97
- const partialItem = getPartialRecentQueryElement(value, this.bindings.i18n);
98
- return {
99
- ...partialItem,
100
- content: renderRecentQuery({
101
- icon: this.icon || Clock,
102
- query,
103
- value,
104
- }),
105
- onSelect: () => {
106
- if (this.bindings.isStandalone) {
107
- this.bindings.searchBoxController.updateText(value);
108
- this.bindings.searchBoxController.submit();
109
- return;
110
- }
111
- this.recentQueriesList.executeRecentQuery(this.recentQueriesList.state.queries.indexOf(value));
112
- },
113
- };
114
- }
115
- render() {
116
- return html `${nothing}`;
117
- }
118
- };
119
- __decorate([
120
- state()
121
- ], AtomicSearchBoxRecentQueries.prototype, "error", void 0);
122
- __decorate([
123
- property()
124
- ], AtomicSearchBoxRecentQueries.prototype, "icon", void 0);
125
- __decorate([
126
- property({ type: Number, attribute: 'max-with-query' })
127
- ], AtomicSearchBoxRecentQueries.prototype, "maxWithQuery", void 0);
128
- __decorate([
129
- property({ type: Number, attribute: 'max-without-query' })
130
- ], AtomicSearchBoxRecentQueries.prototype, "maxWithoutQuery", void 0);
131
- __decorate([
132
- errorGuard()
133
- ], AtomicSearchBoxRecentQueries.prototype, "render", null);
134
- AtomicSearchBoxRecentQueries = __decorate([
135
- customElement('atomic-search-box-recent-queries')
136
- ], AtomicSearchBoxRecentQueries);
137
- export { AtomicSearchBoxRecentQueries };
@@ -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":["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,KAAKO,SAASC,O,CAGhE,gBAAYC,GACV,MAAMC,EAAQC,EAAuBC,kBACnCZ,KAAKa,OACLb,KAAKc,OAGP,GAAIJ,IAAU,KAAM,CAClB,OAAO,I,CAGT,GAAIK,MAAMC,QAAQN,GAAQ,CACxB,OAAOA,EAAMO,KAAKC,GAAM,GAAGA,IAAIC,Q,CAGjC,UAAWT,IAAU,UAAYA,EAAMS,SAAW,GAAI,CACpDnB,KAAKoB,MAAQ,IAAIC,MACf,oBAAoBX,kBAAsBV,KAAKc,6BAEjD,OAAO,I,CAGT,OAAOd,KAAKE,UACRQ,EAAMY,MAAMtB,KAAKE,WAAWe,KAAKP,GAAUA,EAAMS,SACjD,CAACT,E,CAGP,uBAAYa,GACV,OAAOvB,KAAKK,kBAAkBmB,MAAMC,iBACjCC,QAAQC,GAAUA,EAAMb,QAAUd,KAAKc,QACvCc,QACC,CAACC,EAAQF,IAAU,IACdE,KACAF,EAAME,OAAOZ,KAAI,EAAEP,WAAWA,EAAMA,UAEzC,G,CAIE,kBAAAoB,GACN,MAAMC,EAAY/B,KAAKS,aACvB,GAAIsB,IAAc,KAAM,CACtB/B,KAAKG,aAAe,KACpB,M,CAEF,MAAM6B,EAAe,IAAIC,IAAIF,GAC7B,MAAMG,EAAclC,KAAKuB,oBAAoBG,QAAQhB,GACnDsB,EAAaG,IAAIzB,KAEnBV,KAAKG,aAAeY,MAAMqB,KACxBL,EAAUH,QAAO,CAACS,EAAK3B,IAAU2B,EAAIC,IAAI5B,IAAQ,IAAIuB,IAAIC,I,CAIrD,qBAAAK,CAAsBV,GAC5B,OACE7B,KAAKC,mBAAqB,GAAK4B,EAAOW,OAASxC,KAAKC,kB,CAIhD,0BAAAwC,CAA2BZ,GACjC,OAAOa,KAAKC,IAAId,EAAOW,OAAQxC,KAAKC,mB,CAG9B,WAAA2C,CAAYlC,GAClB,MAAMmC,EAAQC,EAAqB9C,KAAKc,MAAOJ,EAAOV,KAAKO,SAASwC,MACpE,MAAMC,EAAaC,EAAavC,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":["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,EACTG,mBACAC,mBACAH,eAEF,OAAOI,EACJE,QAAQ,IAAIC,OAAOL,EAAkB,KAAM,OAC3CI,QAAQ,IAAIC,OAAOJ,EAAkB,KAAM,OAChD,CCdO,MAAMK,EAET,EAAEC,oBAAmBR,kBAAiBS,UAASC,gBACjD,IACE,MAAMP,EAAmBN,EACvBa,EACAF,EACAR,GAIF,OAAOL,EAACgB,EAAI,CAACC,UAAWT,G,CACxB,MAAOnB,GACPyB,EAAQzB,E,oXCPC6B,EAAgB,M,yBAiBGC,KAAAC,gBAAkB,K,+DAAA,K,uBAOzC,MAAAC,GACL,MAAMC,EAAsBC,EAC1BJ,KAAKK,OACLL,KAAKnC,OAGP,GAAIsC,IAAwB,KAAM,CAChC,OACEtB,EAACR,EAAgB,CACfR,MAAOmC,KAAKnC,MACZE,KAAMiC,KAAKjC,KACXC,OAAQgC,KAAKM,SAASC,OAAOvC,OAC7BM,aAAc0B,KAAKQ,QACnBjC,KAAMyB,KAAKK,OACX7B,YAAaiC,EAAuBC,mBAEpC7B,EAAA,eACEG,MAAO2B,EACLX,KAAKnC,MACLmC,KAAKQ,QACLR,KAAKM,SAASM,Q,CAOxB,MAAMhB,EAAY,GAAGO,IACrB,MAAMT,EAAoBe,EAAuBC,kBAC/CV,KAAKK,OACL,GAAGL,KAAKnC,mBAGV,OAAOmC,KAAKC,iBAAmBP,EAC7Bb,EAACY,EAAmB,CAClBG,UAAWA,EACXF,kBAAmBA,EACnBR,gBAAiB2B,EAAe3B,gBAChCS,QAAUzB,GAAW8B,KAAK9B,MAAQA,IAGpCyC,EAAqBX,KAAKnC,MAAO+B,EAAWI,KAAKM,SAASM,K,6BAhEjCE,GAA5BC,K,+BACwBD,GAAxBE,K,8YCRUC,EAAU,M,yBAGbjB,KAAAkB,QAAU,CAChBlC,MAAO,IACLgB,KAAKM,SAASM,KAAKO,EAAEnB,KAAKhB,MAAO,CAC/BoC,MAAOpB,KAAKoB,S,+DAcX,iBAAAC,GACL,IAAKrB,KAAKhB,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":["atomicInsightResultQuickviewActionCss","AtomicInsightResultQuickviewActionStyle0","AtomicInsightResultQuickviewAction","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","shouldRenderQuickview","resultHasPreview","render","h","IconButton","key","partPrefix","style","ref","setTarget","icon","QuickviewIcon","__decorate","InitializeBindings","ResultContext","BindStateToController","AriaLiveRegion"],"sources":["src/components/insight/atomic-insight-result-quickview-action/atomic-insight-result-quickview-action.pcss?tag=atomic-insight-result-quickview-action","src/components/insight/atomic-insight-result-quickview-action/atomic-insight-result-quickview-action.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n","import {Schema, StringValue} from '@coveo/bueno';\nimport {\n buildQuickview,\n QuickviewState,\n Quickview,\n Result,\n} from '@coveo/headless';\nimport {Component, Listen, Prop, State, h, Element} from '@stencil/core';\nimport QuickviewIcon from '../../../images/preview.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 {IconButton} from '../../common/stencil-iconButton';\nimport {Bindings} from '../../search/atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '../../search/result-template-components/result-template-decorators';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-result-quickview-action',\n styleUrl: 'atomic-insight-result-quickview-action.pcss',\n})\nexport class AtomicInsightResultQuickviewAction\n implements InitializableComponent\n{\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n\n private buttonFocusTarget?: FocusTargetController;\n\n @Element() host!: HTMLElement;\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()\n public sandbox = '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 private get shouldRenderQuickview() {\n return this.quickviewState.resultHasPreview;\n }\n\n public render() {\n this.addQuickviewModalIfNeeded();\n this.updateModalContent();\n if (this.shouldRenderQuickview) {\n return (\n <IconButton\n partPrefix=\"result-action\"\n style=\"outline-neutral\"\n ref={this.focusTarget.setTarget}\n icon={QuickviewIcon}\n title={this.bindings.i18n.t('quickview')}\n onClick={() => this.onClick()}\n />\n );\n }\n }\n}\n"],"mappings":"4kBAAA,MAAMA,EAAwC,8hjEAC9C,MAAAC,EAAeD,E,iXC4BFE,EAAkC,M,yBA6BtCC,KAAAC,QAAU,sD,gEAAA,qD,CAMV,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,UAAAE,GACLZ,KAAKK,UAAYQ,EAAeb,KAAKc,SAASC,OAAQ,CACpDC,QAAS,CAACC,OAAQjB,KAAKiB,UAEzB,IAAIC,EAAO,CACTjB,QAAS,IAAIkB,EAAY,CACvBC,SAAU,KACVC,MAAO,wBAERC,SAAS,CAACrB,QAASD,KAAKC,S,CAGrB,yBAAAsB,GACN,GAAIvB,KAAKwB,kBAAmB,CAC1B,M,CAGF,MAAMC,EAAiBzB,KAAKc,SAASY,iBAAiBC,cACpD,0BAEF,GAAIF,EAAgB,CAClBzB,KAAKwB,kBAAoBC,EACzB,M,CAEFzB,KAAKwB,kBAAoBI,SAASC,cAAc,0BAChD7B,KAAKwB,kBAAkBM,aAAa,UAAW9B,KAAKC,SACpDD,KAAKc,SAASY,iBAAiBK,YAAY/B,KAAKwB,kB,CAG1C,kBAAAQ,GACN,GAAIhC,KAAKwB,mBAAqBxB,KAAKK,UAAU4B,MAAMC,QAAS,CAC1DlC,KAAKwB,kBAAkBU,QAAUlC,KAAKK,UAAU4B,MAAMC,QACtDlC,KAAKwB,kBAAkBP,OAASjB,KAAKiB,OACrCjB,KAAKwB,kBAAkBW,MAAQnC,KAAKoC,eAAeC,aACnDrC,KAAKwB,kBAAkBc,QAAUtC,KAAKoC,eAAeG,cACrDvC,KAAKwB,kBAAkBgB,mBAAqB,IAC1CxC,KAAKS,YAAYgC,QAEnBzC,KAAK0C,qBAAuB1C,KAAKoC,eAAeO,UAC5C3C,KAAKc,SAAS8B,KAAKC,EAAE,qBACrB7C,KAAKc,SAAS8B,KAAKC,EAAE,mBAAoB,CACvCC,MAAO9C,KAAKoC,eAAeG,cAC3BQ,KAAM/C,KAAKoC,eAAeC,aAC1BW,MAAOhD,KAAKiB,OAAO+B,O,EAKrB,OAAAC,CAAQC,GACdA,GAAOC,kBACPnD,KAAKK,UAAU+C,oB,CAGjB,yBAAYC,GACV,OAAOrD,KAAKoC,eAAekB,gB,CAGtB,MAAAC,GACLvD,KAAKuB,4BACLvB,KAAKgC,qBACL,GAAIhC,KAAKqD,sBAAuB,CAC9B,OACEG,EAACC,EAAU,CAAAC,IAAA,2CACTC,WAAW,gBACXC,MAAM,kBACNC,IAAK7D,KAAKS,YAAYqD,UACtBC,KAAMC,EACNhB,MAAOhD,KAAKc,SAAS8B,KAAKC,EAAE,aAC5BI,QAAS,IAAMjD,KAAKiD,W,8BAxHCgB,EAAA,CAA5BC,K,+BACwBD,EAAA,CAAxBE,K,6BAWMF,EAAA,CAFNG,EAAsB,c,qCAmBbH,EAAA,CADTI,EAAe,c","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,EAAQC,EAAuBC,kBACnCL,KAAKM,OACLN,KAAKO,OAEP,OAAOC,MAAMC,QAAQN,GAASA,EAAM,GAAKA,C,CAG3C,WAAYO,GACV,GAAIV,KAAKW,cAAe,CACtB,MAAMR,EAAQC,EAAuBC,kBACnCL,KAAKM,OACLN,KAAKW,eAGP,GAAIH,MAAMC,QAAQN,WAAiBA,EAAM,KAAO,SAAU,CACxD,OAAOA,EAAM,E,CAGf,UAAWA,IAAU,SAAU,CAC7B,OAAOA,C,EAIX,OAAOH,KAAKY,SAASC,KAAKC,EAAE,qBAAsB,CAChDC,SAAUf,KAAKM,OAAOU,O,CAIlB,UAAAC,CAAWC,GACjBlB,KAAKY,SAASO,OAAOC,OAAOC,KAAKH,EAASlB,KAAKsB,K,CAGzC,gBAAAC,GACN,MAAML,EAAU,kBAAkBlB,KAAKE,yFAEvCF,KAAKwB,SAAYxB,KAAKC,YAAc,KAAQD,KAAKiB,WAAWC,E,CAGtD,qBAAAO,CAAsBP,GAC5B,IAAKlB,KAAKwB,SAAU,CAClBxB,KAAKiB,WAAWC,GAChBlB,KAAKsB,KAAKI,SACV,OAAO,I,CAET,OAAO1B,KAAKwB,Q,CAGN,WAAAG,CAAYzB,GAClB,IAAKA,EAAK,CACR,MAAMgB,EAAU,IAAIlB,KAAKO,iGACzB,OAAOP,KAAKyB,sBAAsBP,E,CAGpC,UAAWhB,IAAQ,SAAU,CAC3B,MAAMgB,EAAU,aAAalB,KAAKO,yGAClC,OAAOP,KAAKyB,sBAAsBP,E,CAGpC,OAAOhB,C,CAGF,MAAA0B,GACL,IAAI1B,EAAMF,KAAKC,YAAcD,KAAKwB,SAAWxB,KAAKE,IAElD,IAAKF,KAAKC,YAAa,CACrBC,EAAMF,KAAK2B,YAAYzB,GACvB,IAAKA,EAAK,CACR,M,EAIJ,OACE2B,EAAA,OACEC,IAAK9B,KAAKU,QACVqB,IAAKC,EAAe9B,GACpB+B,QAAS,IAAMjC,KAAKuB,mBACpBW,QAAQ,Q,6BArGeC,EAAA,CAA5BC,K,+BACwBD,EAAA,CAAxBE,K","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as t,h as s,g as e}from"./p-dc3df5ce.js";import{loadQuerySuggestActions as i}from"@coveo/headless";import{S as r}from"./p-cfb3c589.js";import{g as o,Q as n,a as h,b as c}from"./p-af93b44c.js";import{d as a}from"./p-4b7a19db.js";import"./p-8f5830b4.js";import"./p-c9074946.js";import"./p-1580513b.js";const d=class{constructor(s){t(this,s);this.error=undefined;this.icon=undefined;this.maxWithQuery=undefined;this.maxWithoutQuery=undefined}componentWillLoad(){try{a((t=>{this.bindings=t;return this.initialize()}),this.host,["atomic-search-box"])}catch(t){this.error=t}}initialize(){const t=this.bindings.engine;const{registerQuerySuggest:s,fetchQuerySuggestions:e}=i(t);t.dispatch(s({id:this.bindings.id,count:this.bindings.numberOfQueries}));return{position:Array.from(this.host.parentNode.children).indexOf(this.host),onInput:()=>t.dispatch(e({id:this.bindings.id})),renderItems:()=>this.renderItems()}}renderItems(){const t=this.bindings.searchBoxController.state.value!=="";const s=t?this.maxWithQuery:this.maxWithoutQuery;return this.bindings.searchBoxController.state.suggestions.slice(0,s).map((t=>this.renderItem(t)))}renderItem(t){const e=this.bindings.searchBoxController.state.value!=="";const i=o(t,this.bindings.i18n);return{...i,content:s(c,null,s(h,{icon:this.icon||r,hasSuggestion:this.bindings.getSuggestions().length>1}),s(n,{suggestion:t,hasQuery:e})),onSelect:()=>{this.bindings.searchBoxController.selectSuggestion(t.rawValue)}}}render(){if(this.error){return s("atomic-component-error",{key:"818ed7b1734a6f2cbf721b1eb3fd03d020791e9e",element:this.host,error:this.error})}}get host(){return e(this)}};export{d as atomic_search_box_query_suggestions};
2
- //# sourceMappingURL=p-2e9db4ca.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["AtomicSearchBoxQuerySuggestions","componentWillLoad","dispatchSearchBoxSuggestionsEvent","bindings","this","initialize","host","error","engine","registerQuerySuggest","fetchQuerySuggestions","loadQuerySuggestActions","dispatch","id","count","numberOfQueries","position","Array","from","parentNode","children","indexOf","onInput","renderItems","hasQuery","searchBoxController","state","value","max","maxWithQuery","maxWithoutQuery","suggestions","slice","map","suggestion","renderItem","partialItem","getPartialSearchBoxSuggestionElement","i18n","content","h","QuerySuggestionContainer","QuerySuggestionIcon","icon","SearchIcon","hasSuggestion","getSuggestions","length","QuerySuggestionText","onSelect","selectSuggestion","rawValue","render","key","element"],"sources":["src/components/search/search-box-suggestions/atomic-search-box-query-suggestions/atomic-search-box-query-suggestions.tsx"],"sourcesContent":["import {\n loadQuerySuggestActions,\n SearchBox,\n SearchEngine,\n Suggestion,\n} from '@coveo/headless';\nimport {Component, Element, Prop, State, h} from '@stencil/core';\nimport SearchIcon from '../../../../images/search.svg';\nimport {\n getPartialSearchBoxSuggestionElement,\n QuerySuggestionContainer,\n QuerySuggestionIcon,\n QuerySuggestionText,\n} from '../../../common/suggestions/stencil-query-suggestions';\nimport {\n dispatchSearchBoxSuggestionsEvent,\n} from '../../../common/suggestions/suggestions-events';\nimport type {\n SearchBoxSuggestionElement,\n SearchBoxSuggestions,\n SearchBoxSuggestionsBindings,\n} from '../../../common/suggestions/suggestions-types';\n\n/**\n * The `atomic-search-box-query-suggestions` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of query suggestion behavior.\n */\n@Component({\n tag: 'atomic-search-box-query-suggestions',\n shadow: true,\n})\nexport class AtomicSearchBoxQuerySuggestions {\n private bindings!: SearchBoxSuggestionsBindings<SearchBox>;\n @Element() private host!: HTMLElement;\n\n @State() public error!: Error;\n\n /**\n * The SVG icon to display.\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() public icon?: string;\n\n /**\n * The maximum number of suggestions that will be displayed if the user has typed something into the input field.\n */\n @Prop({reflect: true}) public maxWithQuery?: number;\n /**\n * The maximum number of suggestions that will be displayed initially when the input field is empty.\n */\n @Prop({reflect: true}) public maxWithoutQuery?: number;\n\n componentWillLoad() {\n try {\n dispatchSearchBoxSuggestionsEvent<SearchBox>(\n (bindings) => {\n this.bindings = bindings;\n return this.initialize();\n },\n this.host,\n ['atomic-search-box']\n );\n } catch (error) {\n this.error = error as Error;\n }\n }\n\n private initialize(): SearchBoxSuggestions {\n const engine = this.bindings.engine as SearchEngine<{\n querySet: string;\n querySuggest: string;\n }>;\n const {registerQuerySuggest, fetchQuerySuggestions} =\n loadQuerySuggestActions(engine);\n\n engine.dispatch(\n registerQuerySuggest({\n id: this.bindings.id,\n count: this.bindings.numberOfQueries,\n })\n );\n\n return {\n position: Array.from(this.host.parentNode!.children).indexOf(this.host),\n onInput: () =>\n engine.dispatch(\n fetchQuerySuggestions({\n id: this.bindings.id,\n })\n ),\n renderItems: () => this.renderItems(),\n };\n }\n\n private renderItems(): SearchBoxSuggestionElement[] {\n const hasQuery = this.bindings.searchBoxController.state.value !== '';\n const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;\n return this.bindings.searchBoxController.state.suggestions\n .slice(0, max)\n .map((suggestion) => this.renderItem(suggestion));\n }\n\n private renderItem(suggestion: Suggestion) {\n const hasQuery = this.bindings.searchBoxController.state.value !== '';\n const partialItem = getPartialSearchBoxSuggestionElement(\n suggestion,\n this.bindings.i18n\n );\n\n return {\n ...partialItem,\n content: (\n <QuerySuggestionContainer>\n <QuerySuggestionIcon\n icon={this.icon || SearchIcon}\n hasSuggestion={this.bindings.getSuggestions().length > 1}\n />\n\n <QuerySuggestionText suggestion={suggestion} hasQuery={hasQuery} />\n </QuerySuggestionContainer>\n ),\n onSelect: () => {\n this.bindings.searchBoxController.selectSuggestion(suggestion.rawValue);\n },\n };\n }\n\n public render() {\n if (this.error) {\n return (\n <atomic-component-error\n element={this.host}\n error={this.error}\n ></atomic-component-error>\n );\n }\n }\n}\n"],"mappings":"2TA8BaA,EAA+B,M,6HAwB1C,iBAAAC,GACE,IACEC,GACGC,IACCC,KAAKD,SAAWA,EAChB,OAAOC,KAAKC,YAAY,GAE1BD,KAAKE,KACL,CAAC,qB,CAEH,MAAOC,GACPH,KAAKG,MAAQA,C,EAIT,UAAAF,GACN,MAAMG,EAASJ,KAAKD,SAASK,OAI7B,MAAMC,qBAACA,EAAoBC,sBAAEA,GAC3BC,EAAwBH,GAE1BA,EAAOI,SACLH,EAAqB,CACnBI,GAAIT,KAAKD,SAASU,GAClBC,MAAOV,KAAKD,SAASY,mBAIzB,MAAO,CACLC,SAAUC,MAAMC,KAAKd,KAAKE,KAAKa,WAAYC,UAAUC,QAAQjB,KAAKE,MAClEgB,QAAS,IACPd,EAAOI,SACLF,EAAsB,CACpBG,GAAIT,KAAKD,SAASU,MAGxBU,YAAa,IAAMnB,KAAKmB,c,CAIpB,WAAAA,GACN,MAAMC,EAAWpB,KAAKD,SAASsB,oBAAoBC,MAAMC,QAAU,GACnE,MAAMC,EAAMJ,EAAWpB,KAAKyB,aAAezB,KAAK0B,gBAChD,OAAO1B,KAAKD,SAASsB,oBAAoBC,MAAMK,YAC5CC,MAAM,EAAGJ,GACTK,KAAKC,GAAe9B,KAAK+B,WAAWD,I,CAGjC,UAAAC,CAAWD,GACjB,MAAMV,EAAWpB,KAAKD,SAASsB,oBAAoBC,MAAMC,QAAU,GACnE,MAAMS,EAAcC,EAClBH,EACA9B,KAAKD,SAASmC,MAGhB,MAAO,IACFF,EACHG,QACEC,EAACC,EAAwB,KACvBD,EAACE,EAAmB,CAClBC,KAAMvC,KAAKuC,MAAQC,EACnBC,cAAezC,KAAKD,SAAS2C,iBAAiBC,OAAS,IAGzDP,EAACQ,EAAmB,CAACd,WAAYA,EAAYV,SAAUA,KAG3DyB,SAAU,KACR7C,KAAKD,SAASsB,oBAAoByB,iBAAiBhB,EAAWiB,SAAS,E,CAKtE,MAAAC,GACL,GAAIhD,KAAKG,MAAO,CACd,OACEiC,EAAA,0BAAAa,IAAA,2CACEC,QAASlD,KAAKE,KACdC,MAAOH,KAAKG,O","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["atomicInsightResultActionCss","AtomicInsightResultActionStyle0","Actions","AtomicInsightResultAction","this","icon","tooltip","tooltipOnClick","action","initialize","actions","loadInsightAnalyticsActions","bindings","engine","onClick","originalTooltip","setTimeout","CopyToClipboard","dispatch","logCopyToClipboard","result","navigator","clipboard","writeText","clickUri","PostToFeed","logFeedItemTextPost","SendAsEmail","logCaseSendEmail","actionClicked","emit","getIcon","CopyIcon","AttachToCase","AttachIcon","Quickview","QuickviewIcon","FeedIcon","EmailIcon","render","h","IconButton","key","partPrefix","style","title","__decorate","InitializeBindings","ResultContext"],"sources":["src/components/insight/atomic-insight-result-action/atomic-insight-result-action.pcss?tag=atomic-insight-result-action","src/components/insight/atomic-insight-result-action/atomic-insight-result-action.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n\n:host {\n &::part(result-action-button) {\n @apply flex items-center justify-center;\n @apply h-8 w-8;\n }\n}\n","import {Result} from '@coveo/headless';\nimport {\n InsightAnalyticsActionCreators,\n loadInsightAnalyticsActions,\n} from '@coveo/headless/insight';\nimport {Component, Event, EventEmitter, Prop, State, h} from '@stencil/core';\nimport AttachIcon from '../../../images/attach.svg';\nimport CopyIcon from '../../../images/copy-dark.svg';\nimport EmailIcon from '../../../images/email.svg';\nimport QuickviewIcon from '../../../images/preview.svg';\nimport FeedIcon from '../../../images/share-post.svg';\nimport {\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 InsightResultActionClickedEvent {\n action: string;\n result: Result;\n}\n\nexport enum Actions {\n CopyToClipboard = 'copyToClipboard',\n AttachToCase = 'attachToCase',\n Quickview = 'quickview',\n PostToFeed = 'postToFeed',\n SendAsEmail = 'sendAsEmail',\n}\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-result-action',\n styleUrl: 'atomic-insight-result-action.pcss',\n})\nexport class AtomicInsightResultAction\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n @ResultContext() private result!: Result;\n @State() public error!: Error;\n\n @Event({\n eventName: 'atomicInsightResultActionClicked',\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n private actionClicked!: EventEmitter<InsightResultActionClickedEvent>;\n\n /**\n * Specify the result action icon to display.\n */\n @Prop({mutable: true}) public icon = '';\n\n /**\n * The text tooltip to show on the result action icon.\n */\n @Prop({mutable: true}) public tooltip = '';\n\n /**\n * The text tooltip to show on the result action icon for some time after clicking the button.\n */\n @Prop({mutable: true}) public tooltipOnClick = '';\n\n /**\n * The type of action to perform when the result action is clicked. This will be sent along the event fired when the button is clicked.\n */\n @Prop({mutable: true}) public action: Actions | string = '';\n\n private actions!: InsightAnalyticsActionCreators;\n\n public initialize() {\n this.actions = loadInsightAnalyticsActions(this.bindings.engine);\n }\n\n private onClick() {\n if (this.tooltipOnClick) {\n const originalTooltip = this.tooltip;\n this.tooltip = this.tooltipOnClick;\n setTimeout(() => {\n this.tooltip = originalTooltip;\n }, 1000);\n }\n\n switch (this.action) {\n case Actions.CopyToClipboard:\n this.bindings.engine.dispatch(\n this.actions.logCopyToClipboard(this.result)\n );\n navigator.clipboard.writeText(this.result?.clickUri);\n break;\n case Actions.PostToFeed:\n this.bindings.engine.dispatch(\n this.actions.logFeedItemTextPost(this.result)\n );\n break;\n case Actions.SendAsEmail:\n this.bindings.engine.dispatch(\n this.actions.logCaseSendEmail(this.result)\n );\n break;\n }\n\n this.actionClicked.emit({action: this.action, result: this.result});\n }\n\n private getIcon() {\n if (this.icon) {\n return this.icon;\n }\n\n switch (this.action) {\n case Actions.CopyToClipboard:\n return CopyIcon;\n case Actions.AttachToCase:\n return AttachIcon;\n case Actions.Quickview:\n return QuickviewIcon;\n case Actions.PostToFeed:\n return FeedIcon;\n case Actions.SendAsEmail:\n return EmailIcon;\n default:\n return QuickviewIcon;\n }\n }\n\n public render() {\n return (\n <IconButton\n partPrefix=\"result-action\"\n style=\"outline-neutral\"\n icon={this.getIcon()}\n title={this.tooltip}\n onClick={() => this.onClick()}\n />\n );\n }\n}\n"],"mappings":"+qEAAA,MAAMA,EAA+B,usjEACrC,MAAAC,EAAeD,E,2WCuBf,IAAYE,GAAZ,SAAYA,GACVA,EAAA,qCACAA,EAAA,+BACAA,EAAA,yBACAA,EAAA,2BACAA,EAAA,4BACD,EAND,CAAYA,MAAO,K,MAeNC,EAAyB,M,yFAkBNC,KAAAC,KAAO,GAKPD,KAAAE,QAAU,GAKVF,KAAAG,eAAiB,GAKjBH,KAAAI,OAA2B,G,+BAfpB,G,aAKG,G,oBAKO,G,YAKU,E,CAIlD,UAAAC,GACLL,KAAKM,QAAUC,EAA4BP,KAAKQ,SAASC,O,CAGnD,OAAAC,GACN,GAAIV,KAAKG,eAAgB,CACvB,MAAMQ,EAAkBX,KAAKE,QAC7BF,KAAKE,QAAUF,KAAKG,eACpBS,YAAW,KACTZ,KAAKE,QAAUS,CAAe,GAC7B,I,CAGL,OAAQX,KAAKI,QACX,KAAKN,EAAQe,gBACXb,KAAKQ,SAASC,OAAOK,SACnBd,KAAKM,QAAQS,mBAAmBf,KAAKgB,SAEvCC,UAAUC,UAAUC,UAAUnB,KAAKgB,QAAQI,UAC3C,MACF,KAAKtB,EAAQuB,WACXrB,KAAKQ,SAASC,OAAOK,SACnBd,KAAKM,QAAQgB,oBAAoBtB,KAAKgB,SAExC,MACF,KAAKlB,EAAQyB,YACXvB,KAAKQ,SAASC,OAAOK,SACnBd,KAAKM,QAAQkB,iBAAiBxB,KAAKgB,SAErC,MAGJhB,KAAKyB,cAAcC,KAAK,CAACtB,OAAQJ,KAAKI,OAAQY,OAAQhB,KAAKgB,Q,CAGrD,OAAAW,GACN,GAAI3B,KAAKC,KAAM,CACb,OAAOD,KAAKC,I,CAGd,OAAQD,KAAKI,QACX,KAAKN,EAAQe,gBACX,OAAOe,EACT,KAAK9B,EAAQ+B,aACX,OAAOC,EACT,KAAKhC,EAAQiC,UACX,OAAOC,EACT,KAAKlC,EAAQuB,WACX,OAAOY,EACT,KAAKnC,EAAQyB,YACX,OAAOW,EACT,QACE,OAAOF,E,CAIN,MAAAG,GACL,OACEC,EAACC,EAAU,CAAAC,IAAA,2CACTC,WAAW,gBACXC,MAAM,kBACNvC,KAAMD,KAAK2B,UACXc,MAAOzC,KAAKE,QACZQ,QAAS,IAAMV,KAAKU,W,GAjGGgC,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,ohlEAC/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":[]}