@coveo/atomic 3.34.0-pre.cf62afc8af → 3.34.0-pre.d29cb64477

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 (288) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/components/_index.js +19 -19
  3. package/dist/atomic/components/analytics-config.js +1 -1
  4. package/dist/atomic/components/atomic-field-condition.js +1 -1
  5. package/dist/atomic/components/atomic-field-condition.js.map +1 -1
  6. package/dist/atomic/components/atomic-insight-result-action.js +2 -2
  7. package/dist/atomic/components/atomic-insight-result-action.js.map +1 -1
  8. package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js +2 -2
  9. package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js.map +1 -1
  10. package/dist/atomic/components/atomic-insight-result-attach-to-case-indicator.js +2 -2
  11. package/dist/atomic/components/atomic-insight-result-attach-to-case-indicator.js.map +1 -1
  12. package/dist/atomic/components/atomic-insight-result-quickview-action.js +2 -2
  13. package/dist/atomic/components/atomic-insight-result-quickview-action.js.map +1 -1
  14. package/dist/atomic/components/atomic-ipx-result-link.js +2 -2
  15. package/dist/atomic/components/atomic-ipx-result-link.js.map +1 -1
  16. package/dist/atomic/components/atomic-quickview-modal2.js +1 -1
  17. package/dist/atomic/components/atomic-quickview.js +2 -2
  18. package/dist/atomic/components/atomic-quickview.js.map +1 -1
  19. package/dist/atomic/components/atomic-result-badge.js +1 -1
  20. package/dist/atomic/components/atomic-result-badge.js.map +1 -1
  21. package/dist/atomic/components/atomic-result-children.js +2 -2
  22. package/dist/atomic/components/atomic-result-children.js.map +1 -1
  23. package/dist/atomic/components/atomic-result-date.js +1 -1
  24. package/dist/atomic/components/atomic-result-date.js.map +1 -1
  25. package/dist/atomic/components/atomic-result-fields-list.js +2 -2
  26. package/dist/atomic/components/atomic-result-fields-list.js.map +1 -1
  27. package/dist/atomic/components/atomic-result-html.js +1 -1
  28. package/dist/atomic/components/atomic-result-html.js.map +1 -1
  29. package/dist/atomic/components/atomic-result-icon.js +1 -1
  30. package/dist/atomic/components/atomic-result-icon.js.map +1 -1
  31. package/dist/atomic/components/atomic-result-image.js +1 -1
  32. package/dist/atomic/components/atomic-result-image.js.map +1 -1
  33. package/dist/atomic/components/atomic-result-link.js +2 -2
  34. package/dist/atomic/components/atomic-result-link.js.map +1 -1
  35. package/dist/atomic/components/atomic-result-localized-text.js +1 -1
  36. package/dist/atomic/components/atomic-result-localized-text.js.map +1 -1
  37. package/dist/atomic/components/atomic-result-multi-value-text.js +1 -1
  38. package/dist/atomic/components/atomic-result-multi-value-text.js.map +1 -1
  39. package/dist/atomic/components/atomic-result-number.js +1 -1
  40. package/dist/atomic/components/atomic-result-number.js.map +1 -1
  41. package/dist/atomic/components/atomic-result-printable-uri.js +1 -1
  42. package/dist/atomic/components/atomic-result-printable-uri.js.map +1 -1
  43. package/dist/atomic/components/atomic-result-rating.js +1 -1
  44. package/dist/atomic/components/atomic-result-rating.js.map +1 -1
  45. package/dist/atomic/components/atomic-result-text2.js +1 -1
  46. package/dist/atomic/components/atomic-result-text2.js.map +1 -1
  47. package/dist/atomic/components/atomic-result-timespan.js +1 -1
  48. package/dist/atomic/components/atomic-result-timespan.js.map +1 -1
  49. package/dist/atomic/components/atomic-result2.js.map +1 -1
  50. package/dist/atomic/components/atomic-smart-snippet-source2.js +1 -1
  51. package/dist/atomic/components/atomic-smart-snippet-source2.js.map +1 -1
  52. package/dist/atomic/components/components/commerce/atomic-product/atomic-product.js +26 -58
  53. package/dist/atomic/components/components/commerce/atomic-product-children/atomic-product-children.js +1 -1
  54. package/dist/atomic/components/components/commerce/atomic-product-description/atomic-product-description.js +1 -1
  55. package/dist/atomic/components/components/commerce/atomic-product-excerpt/atomic-product-excerpt.js +1 -1
  56. package/dist/atomic/components/components/commerce/atomic-product-field-condition/atomic-product-field-condition.js +1 -1
  57. package/dist/atomic/components/components/commerce/atomic-product-image/atomic-product-image.js +1 -1
  58. package/dist/atomic/components/components/commerce/atomic-product-link/atomic-product-link.js +2 -1
  59. package/dist/atomic/components/components/commerce/atomic-product-multi-value-text/atomic-product-multi-value-text.js +1 -1
  60. package/dist/atomic/components/components/commerce/atomic-product-numeric-field-value/atomic-product-numeric-field-value.js +1 -1
  61. package/dist/atomic/components/components/commerce/atomic-product-price/atomic-product-price.js +1 -1
  62. package/dist/atomic/components/components/commerce/atomic-product-rating/atomic-product-rating.js +1 -1
  63. package/dist/atomic/components/components/commerce/atomic-product-text/atomic-product-text.js +1 -1
  64. package/dist/atomic/components/components/commerce/product-template-component-utils/context/interactive-product-context-controller.js +25 -0
  65. package/dist/atomic/components/components/commerce/product-template-component-utils/context/product-context-controller.js +29 -0
  66. package/dist/atomic/components/components/common/layout/custom-render-controller.js +37 -0
  67. package/dist/atomic/components/components/common/layout/item-layout-controller.js +103 -0
  68. package/dist/atomic/components/global/environment.js +1 -1
  69. package/dist/atomic/components/index.js.map +1 -1
  70. package/dist/atomic/components/{result-template-decorators.js → stencil-result-template-decorators.js} +6 -2
  71. package/dist/atomic/components/stencil-result-template-decorators.js.map +1 -0
  72. package/dist/atomic/index.esm.js +1 -1
  73. package/dist/atomic/index.esm.js.map +1 -1
  74. package/dist/atomic/{p-0c8e7d5f.entry.js → p-0112f957.entry.js} +2 -2
  75. package/dist/atomic/p-0112f957.entry.js.map +1 -0
  76. package/dist/atomic/{p-c8eba3e5.js → p-02f6542d.js} +2 -2
  77. package/dist/atomic/{p-b313058c.entry.js → p-049228f2.entry.js} +2 -2
  78. package/dist/atomic/p-049228f2.entry.js.map +1 -0
  79. package/dist/atomic/{p-4f4c9a03.entry.js → p-1ff761e0.entry.js} +2 -2
  80. package/dist/atomic/{p-4069d801.entry.js → p-268ce7ca.entry.js} +2 -2
  81. package/dist/atomic/p-268ce7ca.entry.js.map +1 -0
  82. package/dist/atomic/{p-e9dc8e90.entry.js → p-3ec45f9c.entry.js} +2 -2
  83. package/dist/atomic/p-3ec45f9c.entry.js.map +1 -0
  84. package/dist/atomic/{p-18684d4c.js → p-4080f740.js} +1 -1
  85. package/dist/atomic/p-4080f740.js.map +1 -0
  86. package/dist/atomic/{p-01511388.entry.js → p-464370f7.entry.js} +2 -2
  87. package/dist/atomic/p-464370f7.entry.js.map +1 -0
  88. package/dist/atomic/{p-190ddaca.entry.js → p-4cf97b0a.entry.js} +2 -2
  89. package/dist/atomic/p-4cf97b0a.entry.js.map +1 -0
  90. package/dist/atomic/{p-2e4628bb.entry.js → p-5894d6f6.entry.js} +2 -2
  91. package/dist/atomic/p-5894d6f6.entry.js.map +1 -0
  92. package/dist/atomic/{p-78427c6a.entry.js → p-5a9460ab.entry.js} +2 -2
  93. package/dist/atomic/p-5a9460ab.entry.js.map +1 -0
  94. package/dist/atomic/{p-fafd5042.entry.js → p-5f2abcb4.entry.js} +2 -2
  95. package/dist/atomic/p-5f2abcb4.entry.js.map +1 -0
  96. package/dist/atomic/{p-1ff7a9da.entry.js → p-6a3b139f.entry.js} +2 -2
  97. package/dist/atomic/p-6a3b139f.entry.js.map +1 -0
  98. package/dist/atomic/p-6f34dd3a.entry.js.map +1 -1
  99. package/dist/atomic/{p-ee957926.entry.js → p-8ce6badd.entry.js} +2 -2
  100. package/dist/atomic/p-8ce6badd.entry.js.map +1 -0
  101. package/dist/atomic/{p-b3f6561d.entry.js → p-8e964890.entry.js} +2 -2
  102. package/dist/atomic/p-8e964890.entry.js.map +1 -0
  103. package/dist/atomic/{p-dbf0c5a3.entry.js → p-9564d67d.entry.js} +2 -2
  104. package/dist/atomic/{p-dbf0c5a3.entry.js.map → p-9564d67d.entry.js.map} +1 -1
  105. package/dist/atomic/{p-bbfe727a.entry.js → p-99d3a8ce.entry.js} +2 -2
  106. package/dist/atomic/p-99d3a8ce.entry.js.map +1 -0
  107. package/dist/atomic/{p-c9f1790d.entry.js → p-acb1704c.entry.js} +2 -2
  108. package/dist/atomic/p-acb1704c.entry.js.map +1 -0
  109. package/dist/atomic/{p-013f4aeb.entry.js → p-baf5bcb7.entry.js} +2 -2
  110. package/dist/atomic/{p-0f39889d.entry.js → p-c34f8190.entry.js} +2 -2
  111. package/dist/atomic/p-c34f8190.entry.js.map +1 -0
  112. package/dist/atomic/{p-c25f1437.entry.js → p-c41ab197.entry.js} +2 -2
  113. package/dist/atomic/p-c41ab197.entry.js.map +1 -0
  114. package/dist/atomic/{p-93f1d551.entry.js → p-c6e2939f.entry.js} +2 -2
  115. package/dist/atomic/p-c6e2939f.entry.js.map +1 -0
  116. package/dist/atomic/{p-723f76a1.entry.js → p-ca8c87ce.entry.js} +2 -2
  117. package/dist/atomic/{p-723f76a1.entry.js.map → p-ca8c87ce.entry.js.map} +1 -1
  118. package/dist/atomic/{p-852cc16d.entry.js → p-cacb7fd8.entry.js} +2 -2
  119. package/dist/atomic/p-cacb7fd8.entry.js.map +1 -0
  120. package/dist/atomic/{p-a3c83dc7.entry.js → p-d5b0a69d.entry.js} +2 -2
  121. package/dist/atomic/{p-945ddd53.entry.js → p-e1dbe31d.entry.js} +2 -2
  122. package/dist/atomic/p-e1dbe31d.entry.js.map +1 -0
  123. package/dist/atomic/{p-7fd5b6ac.entry.js → p-e983d6cc.entry.js} +2 -2
  124. package/dist/atomic/p-e983d6cc.entry.js.map +1 -0
  125. package/dist/atomic/{p-87f69e53.entry.js → p-ed603210.entry.js} +2 -2
  126. package/dist/atomic/p-ed603210.entry.js.map +1 -0
  127. package/dist/cjs/_index.cjs.js +20 -20
  128. package/dist/cjs/{analytics-config-63c156a6.js → analytics-config-e9505710.js} +2 -2
  129. package/dist/cjs/{analytics-config-63c156a6.js.map → analytics-config-e9505710.js.map} +1 -1
  130. package/dist/cjs/atomic-field-condition.cjs.entry.js +2 -2
  131. package/dist/cjs/atomic-field-condition.cjs.entry.js.map +1 -1
  132. package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
  133. package/dist/cjs/atomic-insight-result-action.cjs.entry.js +3 -3
  134. package/dist/cjs/atomic-insight-result-action.cjs.entry.js.map +1 -1
  135. package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js +3 -3
  136. package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js.map +1 -1
  137. package/dist/cjs/atomic-insight-result-attach-to-case-indicator.cjs.entry.js +3 -3
  138. package/dist/cjs/atomic-insight-result-attach-to-case-indicator.cjs.entry.js.map +1 -1
  139. package/dist/cjs/atomic-insight-result-quickview-action.cjs.entry.js +3 -3
  140. package/dist/cjs/atomic-insight-result-quickview-action.cjs.entry.js.map +1 -1
  141. package/dist/cjs/atomic-ipx-result-link.cjs.entry.js +4 -4
  142. package/dist/cjs/atomic-ipx-result-link.cjs.entry.js.map +1 -1
  143. package/dist/cjs/atomic-quickview-modal.cjs.entry.js +1 -1
  144. package/dist/cjs/atomic-quickview.cjs.entry.js +3 -3
  145. package/dist/cjs/atomic-quickview.cjs.entry.js.map +1 -1
  146. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  147. package/dist/cjs/atomic-result-badge.cjs.entry.js +2 -2
  148. package/dist/cjs/atomic-result-badge.cjs.entry.js.map +1 -1
  149. package/dist/cjs/atomic-result-children.cjs.entry.js +3 -3
  150. package/dist/cjs/atomic-result-children.cjs.entry.js.map +1 -1
  151. package/dist/cjs/atomic-result-date.cjs.entry.js +2 -2
  152. package/dist/cjs/atomic-result-date.cjs.entry.js.map +1 -1
  153. package/dist/cjs/atomic-result-fields-list.cjs.entry.js +3 -3
  154. package/dist/cjs/atomic-result-fields-list.cjs.entry.js.map +1 -1
  155. package/dist/cjs/atomic-result-html.cjs.entry.js +2 -2
  156. package/dist/cjs/atomic-result-html.cjs.entry.js.map +1 -1
  157. package/dist/cjs/atomic-result-icon.cjs.entry.js +2 -2
  158. package/dist/cjs/atomic-result-icon.cjs.entry.js.map +1 -1
  159. package/dist/cjs/atomic-result-image.cjs.entry.js +2 -2
  160. package/dist/cjs/atomic-result-image.cjs.entry.js.map +1 -1
  161. package/dist/cjs/atomic-result-link.cjs.entry.js +4 -4
  162. package/dist/cjs/atomic-result-link.cjs.entry.js.map +1 -1
  163. package/dist/cjs/atomic-result-localized-text.cjs.entry.js +3 -3
  164. package/dist/cjs/atomic-result-localized-text.cjs.entry.js.map +1 -1
  165. package/dist/cjs/atomic-result-multi-value-text.cjs.entry.js +2 -2
  166. package/dist/cjs/atomic-result-multi-value-text.cjs.entry.js.map +1 -1
  167. package/dist/cjs/atomic-result-number.cjs.entry.js +2 -2
  168. package/dist/cjs/atomic-result-number.cjs.entry.js.map +1 -1
  169. package/dist/cjs/atomic-result-printable-uri.cjs.entry.js +2 -2
  170. package/dist/cjs/atomic-result-printable-uri.cjs.entry.js.map +1 -1
  171. package/dist/cjs/atomic-result-rating.cjs.entry.js +2 -2
  172. package/dist/cjs/atomic-result-rating.cjs.entry.js.map +1 -1
  173. package/dist/cjs/atomic-result-text_2.cjs.entry.js +2 -2
  174. package/dist/cjs/atomic-result-text_2.cjs.entry.js.map +1 -1
  175. package/dist/cjs/atomic-result-timespan.cjs.entry.js +2 -2
  176. package/dist/cjs/atomic-result-timespan.cjs.entry.js.map +1 -1
  177. package/dist/cjs/atomic-result.cjs.entry.js.map +1 -1
  178. package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js +1 -1
  179. package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js.map +1 -1
  180. package/dist/cjs/index.cjs.js.map +1 -1
  181. package/dist/cjs/{result-template-decorators-432d11a9.js → stencil-result-template-decorators-28b05aaf.js} +6 -2
  182. package/dist/cjs/stencil-result-template-decorators-28b05aaf.js.map +1 -0
  183. package/dist/cjs/version.cjs.js +2 -2
  184. package/dist/esm/_index.js +19 -19
  185. package/dist/esm/{analytics-config-820d73d7.js → analytics-config-35bbc9f5.js} +2 -2
  186. package/dist/esm/{analytics-config-820d73d7.js.map → analytics-config-35bbc9f5.js.map} +1 -1
  187. package/dist/esm/atomic-field-condition.entry.js +1 -1
  188. package/dist/esm/atomic-field-condition.entry.js.map +1 -1
  189. package/dist/esm/atomic-insight-interface.entry.js +1 -1
  190. package/dist/esm/atomic-insight-result-action.entry.js +2 -2
  191. package/dist/esm/atomic-insight-result-action.entry.js.map +1 -1
  192. package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js +2 -2
  193. package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js.map +1 -1
  194. package/dist/esm/atomic-insight-result-attach-to-case-indicator.entry.js +2 -2
  195. package/dist/esm/atomic-insight-result-attach-to-case-indicator.entry.js.map +1 -1
  196. package/dist/esm/atomic-insight-result-quickview-action.entry.js +2 -2
  197. package/dist/esm/atomic-insight-result-quickview-action.entry.js.map +1 -1
  198. package/dist/esm/atomic-ipx-result-link.entry.js +2 -2
  199. package/dist/esm/atomic-ipx-result-link.entry.js.map +1 -1
  200. package/dist/esm/atomic-quickview-modal.entry.js +1 -1
  201. package/dist/esm/atomic-quickview.entry.js +2 -2
  202. package/dist/esm/atomic-quickview.entry.js.map +1 -1
  203. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  204. package/dist/esm/atomic-result-badge.entry.js +1 -1
  205. package/dist/esm/atomic-result-badge.entry.js.map +1 -1
  206. package/dist/esm/atomic-result-children.entry.js +2 -2
  207. package/dist/esm/atomic-result-children.entry.js.map +1 -1
  208. package/dist/esm/atomic-result-date.entry.js +1 -1
  209. package/dist/esm/atomic-result-date.entry.js.map +1 -1
  210. package/dist/esm/atomic-result-fields-list.entry.js +2 -2
  211. package/dist/esm/atomic-result-fields-list.entry.js.map +1 -1
  212. package/dist/esm/atomic-result-html.entry.js +1 -1
  213. package/dist/esm/atomic-result-html.entry.js.map +1 -1
  214. package/dist/esm/atomic-result-icon.entry.js +1 -1
  215. package/dist/esm/atomic-result-icon.entry.js.map +1 -1
  216. package/dist/esm/atomic-result-image.entry.js +1 -1
  217. package/dist/esm/atomic-result-image.entry.js.map +1 -1
  218. package/dist/esm/atomic-result-link.entry.js +2 -2
  219. package/dist/esm/atomic-result-link.entry.js.map +1 -1
  220. package/dist/esm/atomic-result-localized-text.entry.js +2 -2
  221. package/dist/esm/atomic-result-localized-text.entry.js.map +1 -1
  222. package/dist/esm/atomic-result-multi-value-text.entry.js +1 -1
  223. package/dist/esm/atomic-result-multi-value-text.entry.js.map +1 -1
  224. package/dist/esm/atomic-result-number.entry.js +1 -1
  225. package/dist/esm/atomic-result-number.entry.js.map +1 -1
  226. package/dist/esm/atomic-result-printable-uri.entry.js +1 -1
  227. package/dist/esm/atomic-result-printable-uri.entry.js.map +1 -1
  228. package/dist/esm/atomic-result-rating.entry.js +1 -1
  229. package/dist/esm/atomic-result-rating.entry.js.map +1 -1
  230. package/dist/esm/atomic-result-text_2.entry.js +1 -1
  231. package/dist/esm/atomic-result-text_2.entry.js.map +1 -1
  232. package/dist/esm/atomic-result-timespan.entry.js +1 -1
  233. package/dist/esm/atomic-result-timespan.entry.js.map +1 -1
  234. package/dist/esm/atomic-result.entry.js.map +1 -1
  235. package/dist/esm/atomic-smart-snippet-answer_2.entry.js +1 -1
  236. package/dist/esm/atomic-smart-snippet-answer_2.entry.js.map +1 -1
  237. package/dist/esm/index.js.map +1 -1
  238. package/dist/esm/{result-template-decorators-2ed76ea9.js → stencil-result-template-decorators-f989bc6b.js} +6 -2
  239. package/dist/esm/stencil-result-template-decorators-f989bc6b.js.map +1 -0
  240. package/dist/esm/version.js +2 -2
  241. package/dist/types/components/commerce/atomic-product/atomic-product.d.ts +5 -17
  242. package/dist/types/components/commerce/product-template-component-utils/context/fetch-product-context.d.ts +12 -0
  243. package/dist/types/components/commerce/product-template-component-utils/context/interactive-product-context-controller.d.ts +27 -0
  244. package/dist/types/components/commerce/product-template-component-utils/context/product-context-controller.d.ts +33 -0
  245. package/dist/types/components/commerce/product-template-component-utils/{stencil-product-template-decorators.d.ts → context/stencil-product-template-decorators.d.ts} +1 -1
  246. package/dist/types/components/common/layout/custom-render-controller.d.ts +25 -0
  247. package/dist/types/components/common/layout/item-layout-controller.d.ts +47 -0
  248. package/dist/types/components/common/smart-snippets/atomic-smart-snippet-source.d.ts +1 -1
  249. package/dist/types/components/search/atomic-result/atomic-result.d.ts +1 -1
  250. package/dist/types/components/search/result-template-component-utils/context/fetch-result-context.d.ts +8 -0
  251. package/dist/types/components/search/result-template-component-utils/context/interactive-result-context-controller.d.ts +12 -0
  252. package/dist/types/components/search/result-template-component-utils/context/result-context-controller.d.ts +18 -0
  253. package/dist/types/components/search/{result-template-components/result-template-decorators.d.ts → result-template-component-utils/context/stencil-result-template-decorators.d.ts} +6 -2
  254. package/dist/types/index.d.ts +3 -3
  255. package/docs/atomic-docs.json +1 -1
  256. package/package.json +7 -7
  257. package/dist/atomic/components/components/common/item-list/fetch-item-context.js +0 -15
  258. package/dist/atomic/components/decorators/commerce/product-template-decorators.js +0 -68
  259. package/dist/atomic/components/result-template-decorators.js.map +0 -1
  260. package/dist/atomic/p-01511388.entry.js.map +0 -1
  261. package/dist/atomic/p-0c8e7d5f.entry.js.map +0 -1
  262. package/dist/atomic/p-0f39889d.entry.js.map +0 -1
  263. package/dist/atomic/p-18684d4c.js.map +0 -1
  264. package/dist/atomic/p-190ddaca.entry.js.map +0 -1
  265. package/dist/atomic/p-1ff7a9da.entry.js.map +0 -1
  266. package/dist/atomic/p-2e4628bb.entry.js.map +0 -1
  267. package/dist/atomic/p-4069d801.entry.js.map +0 -1
  268. package/dist/atomic/p-78427c6a.entry.js.map +0 -1
  269. package/dist/atomic/p-7fd5b6ac.entry.js.map +0 -1
  270. package/dist/atomic/p-852cc16d.entry.js.map +0 -1
  271. package/dist/atomic/p-87f69e53.entry.js.map +0 -1
  272. package/dist/atomic/p-93f1d551.entry.js.map +0 -1
  273. package/dist/atomic/p-945ddd53.entry.js.map +0 -1
  274. package/dist/atomic/p-b313058c.entry.js.map +0 -1
  275. package/dist/atomic/p-b3f6561d.entry.js.map +0 -1
  276. package/dist/atomic/p-bbfe727a.entry.js.map +0 -1
  277. package/dist/atomic/p-c25f1437.entry.js.map +0 -1
  278. package/dist/atomic/p-c9f1790d.entry.js.map +0 -1
  279. package/dist/atomic/p-e9dc8e90.entry.js.map +0 -1
  280. package/dist/atomic/p-ee957926.entry.js.map +0 -1
  281. package/dist/atomic/p-fafd5042.entry.js.map +0 -1
  282. package/dist/cjs/result-template-decorators-432d11a9.js.map +0 -1
  283. package/dist/esm/result-template-decorators-2ed76ea9.js.map +0 -1
  284. package/dist/types/decorators/commerce/product-template-decorators.d.ts +0 -68
  285. /package/dist/atomic/{p-c8eba3e5.js.map → p-02f6542d.js.map} +0 -0
  286. /package/dist/atomic/{p-4f4c9a03.entry.js.map → p-1ff761e0.entry.js.map} +0 -0
  287. /package/dist/atomic/{p-013f4aeb.entry.js.map → p-baf5bcb7.entry.js.map} +0 -0
  288. /package/dist/atomic/{p-a3c83dc7.entry.js.map → p-d5b0a69d.entry.js.map} +0 -0
@@ -6,7 +6,7 @@ const index = require('./index-757bc886.js');
6
6
  const headless = require('@coveo/headless');
7
7
  const propsUtils = require('./props-utils-1e4ba1b0.js');
8
8
  const resultTemplateCommon = require('./result-template-common-84bd4057.js');
9
- const resultTemplateDecorators = require('./result-template-decorators-432d11a9.js');
9
+ const stencilResultTemplateDecorators = require('./stencil-result-template-decorators-28b05aaf.js');
10
10
  require('@coveo/bueno');
11
11
  require('./utils-7153ae6b.js');
12
12
  require('./purify-85b542e2.js');
@@ -80,7 +80,7 @@ __decorate([
80
80
  propsUtils.MapProp({ splitValues: true })
81
81
  ], AtomicFieldCondition.prototype, "mustNotMatch", void 0);
82
82
  __decorate([
83
- resultTemplateDecorators.ResultContext()
83
+ stencilResultTemplateDecorators.ResultContext()
84
84
  ], AtomicFieldCondition.prototype, "result", void 0);
85
85
  AtomicFieldCondition.style = AtomicFieldConditionStyle0;
86
86
 
@@ -1 +1 @@
1
- {"file":"atomic-field-condition.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAM,uBAAuB,GAAG,wCAAwC,CAAC;AACzE,mCAAe,uBAAuB;;;;;;;;;;;;MCuBzB,oBAAoB;;;;;;;QAgBO,cAAS,GAC7C,EA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;;;;","names":["ResultTemplatesHelpers","makeMatchConditions","h","MapProp","ResultContext"],"sources":["src/components/search/result-template-components/atomic-field-condition/atomic-field-condition.pcss?tag=atomic-field-condition","src/components/search/result-template-components/atomic-field-condition/atomic-field-condition.tsx"],"sourcesContent":["atomic-field-condition {\n max-width: 100%;\n}\n","import {\n Result,\n ResultTemplateCondition,\n ResultTemplatesHelpers,\n} from '@coveo/headless';\nimport {Component, Prop, h, Element} from '@stencil/core';\nimport {MapProp} from '../../../../utils/props-utils';\nimport {makeMatchConditions} from '../../../common/result-templates/result-template-common';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-field-condition` component takes a list of conditions that, if fulfilled, apply the template in which it's defined.\n * The condition properties can be based on any top-level result property of the `result` object, not restricted to fields (e.g., `isRecommendation`).\n *\n * @slot default - The content to display if the conditions are met.\n *\n * @MapProp name: mustMatch;attr: must-match;docs: The field and values that define which result items the condition must be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`;type: Record<string, string[]> ;default: {}\n * @MapProp name: mustNotMatch;attr: must-not-match;docs: The field and values that define which result items the condition must not be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\";type: Record<string, string[]> ;default: {}\n */\n@Component({\n tag: 'atomic-field-condition',\n styleUrl: 'atomic-field-condition.pcss',\n shadow: false,\n})\nexport class AtomicFieldCondition {\n @Element() host!: HTMLElement;\n\n /**\n * Verifies whether the specified fields are defined.\n */\n @Prop({reflect: true}) ifDefined?: string;\n /**\n * Verifies whether the specified fields are not defined.\n */\n @Prop({reflect: true}) ifNotDefined?: string;\n\n /**\n * Verifies whether the specified fields match the specified values.\n * @type {Record<string, string[]>}\n */\n @Prop() @MapProp({splitValues: true}) mustMatch: Record<string, string[]> =\n {};\n\n /**\n * Verifies whether the specified fields do not match the specified values.\n * @type {Record<string, string[]>}\n */\n @Prop() @MapProp({splitValues: true}) mustNotMatch: Record<string, string[]> =\n {};\n\n private conditions: ResultTemplateCondition[] = [];\n private shouldBeRemoved = false;\n\n @ResultContext() private result!: Result;\n\n public componentWillLoad() {\n if (this.ifDefined) {\n const fieldNames = this.ifDefined.split(',');\n this.conditions.push(\n ResultTemplatesHelpers.fieldsMustBeDefined(fieldNames)\n );\n }\n\n if (this.ifNotDefined) {\n const fieldNames = this.ifNotDefined.split(',');\n this.conditions.push(\n ResultTemplatesHelpers.fieldsMustNotBeDefined(fieldNames)\n );\n }\n\n this.conditions.push(\n ...makeMatchConditions(this.mustMatch, this.mustNotMatch)\n );\n }\n\n public render() {\n if (!this.conditions.every((condition) => condition(this.result))) {\n this.shouldBeRemoved = true;\n return '';\n }\n\n return <slot />;\n }\n\n public componentDidLoad() {\n this.shouldBeRemoved && this.host.remove();\n }\n}\n"],"version":3}
1
+ {"file":"atomic-field-condition.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAM,uBAAuB,GAAG,wCAAwC,CAAC;AACzE,mCAAe,uBAAuB;;;;;;;;;;;;MCuBzB,oBAAoB;;;;;;;QAgBO,cAAS,GAC7C,EAAE,CAAC;;;;;QAMiC,iBAAY,GAChD,EAAE,CAAC;QAEG,eAAU,GAA8B,EAAE,CAAC;QAC3C,oBAAe,GAAG,KAAK,CAAC;;;yBAV9B,EAAE;4BAOF,EAAE;;IAOG,iBAAiB;QACtB,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC7C,IAAI,CAAC,UAAU,CAAC,IAAI,CAClBA,+BAAsB,CAAC,mBAAmB,CAAC,UAAU,CAAC,CACvD,CAAC;SACH;QAED,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAChD,IAAI,CAAC,UAAU,CAAC,IAAI,CAClBA,+BAAsB,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAC1D,CAAC;SACH;QAED,IAAI,CAAC,UAAU,CAAC,IAAI,CAClB,GAAGC,wCAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAC1D,CAAC;KACH;IAEM,MAAM;QACX,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE;YACjE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;YAC5B,OAAO,EAAE,CAAC;SACX;QAED,OAAOC,qBAAQ,CAAC;KACjB;IAEM,gBAAgB;QACrB,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;KAC5C;;;AA9CqC;IAA7BC,kBAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;uDAChC;AAMiC;IAA7BA,kBAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;0DAChC;AAKoB;IAAxBC,6CAAa,EAAE;oDAAyB;;;;;","names":["ResultTemplatesHelpers","makeMatchConditions","h","MapProp","ResultContext"],"sources":["src/components/search/result-template-components/atomic-field-condition/atomic-field-condition.pcss?tag=atomic-field-condition","src/components/search/result-template-components/atomic-field-condition/atomic-field-condition.tsx"],"sourcesContent":["atomic-field-condition {\n max-width: 100%;\n}\n","import {\n Result,\n ResultTemplateCondition,\n ResultTemplatesHelpers,\n} from '@coveo/headless';\nimport {Component, Prop, h, Element} from '@stencil/core';\nimport {MapProp} from '../../../../utils/props-utils';\nimport {makeMatchConditions} from '../../../common/result-templates/result-template-common';\nimport {ResultContext} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\n\n/**\n * The `atomic-field-condition` component takes a list of conditions that, if fulfilled, apply the template in which it's defined.\n * The condition properties can be based on any top-level result property of the `result` object, not restricted to fields (e.g., `isRecommendation`).\n *\n * @slot default - The content to display if the conditions are met.\n *\n * @MapProp name: mustMatch;attr: must-match;docs: The field and values that define which result items the condition must be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`;type: Record<string, string[]> ;default: {}\n * @MapProp name: mustNotMatch;attr: must-not-match;docs: The field and values that define which result items the condition must not be applied to. For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\";type: Record<string, string[]> ;default: {}\n */\n@Component({\n tag: 'atomic-field-condition',\n styleUrl: 'atomic-field-condition.pcss',\n shadow: false,\n})\nexport class AtomicFieldCondition {\n @Element() host!: HTMLElement;\n\n /**\n * Verifies whether the specified fields are defined.\n */\n @Prop({reflect: true}) ifDefined?: string;\n /**\n * Verifies whether the specified fields are not defined.\n */\n @Prop({reflect: true}) ifNotDefined?: string;\n\n /**\n * Verifies whether the specified fields match the specified values.\n * @type {Record<string, string[]>}\n */\n @Prop() @MapProp({splitValues: true}) mustMatch: Record<string, string[]> =\n {};\n\n /**\n * Verifies whether the specified fields do not match the specified values.\n * @type {Record<string, string[]>}\n */\n @Prop() @MapProp({splitValues: true}) mustNotMatch: Record<string, string[]> =\n {};\n\n private conditions: ResultTemplateCondition[] = [];\n private shouldBeRemoved = false;\n\n @ResultContext() private result!: Result;\n\n public componentWillLoad() {\n if (this.ifDefined) {\n const fieldNames = this.ifDefined.split(',');\n this.conditions.push(\n ResultTemplatesHelpers.fieldsMustBeDefined(fieldNames)\n );\n }\n\n if (this.ifNotDefined) {\n const fieldNames = this.ifNotDefined.split(',');\n this.conditions.push(\n ResultTemplatesHelpers.fieldsMustNotBeDefined(fieldNames)\n );\n }\n\n this.conditions.push(\n ...makeMatchConditions(this.mustMatch, this.mustNotMatch)\n );\n }\n\n public render() {\n if (!this.conditions.every((condition) => condition(this.result))) {\n this.shouldBeRemoved = true;\n return '';\n }\n\n return <slot />;\n }\n\n public componentDidLoad() {\n this.shouldBeRemoved && this.host.remove();\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-757bc886.js');
6
6
  const initQueue = require('./init-queue-a18aa323.js');
7
7
  const insight = require('@coveo/headless/insight');
8
- const analyticsConfig = require('./analytics-config-63c156a6.js');
8
+ const analyticsConfig = require('./analytics-config-e9505710.js');
9
9
  const propsUtils = require('./props-utils-1e4ba1b0.js');
10
10
  const replaceBreakpointUtils = require('./replace-breakpoint-utils-7a084f54.js');
11
11
  const store = require('./store-82abd941.js');
@@ -8,7 +8,7 @@ const attach = require('./attach-19283bec.js');
8
8
  const preview = require('./preview-8eebe5d5.js');
9
9
  const initializationUtils = require('./initialization-utils-92f1b080.js');
10
10
  const stencilIconButton = require('./stencil-iconButton-738b1548.js');
11
- const resultTemplateDecorators = require('./result-template-decorators-432d11a9.js');
11
+ const stencilResultTemplateDecorators = require('./stencil-result-template-decorators-28b05aaf.js');
12
12
  require('./dom-utils-d4790328.js');
13
13
  require('./event-utils-9bfcf3c5.js');
14
14
  require('./init-queue-a18aa323.js');
@@ -124,14 +124,14 @@ const AtomicInsightResultAction = class {
124
124
  }
125
125
  }
126
126
  render() {
127
- return (index.h(stencilIconButton.IconButton, { key: '5bfc0b93f8fe44cfebbf937610cfe9c23d12f8bb', partPrefix: "result-action", style: "outline-neutral", icon: this.getIcon(), title: this.tooltip, onClick: () => this.onClick() }));
127
+ return (index.h(stencilIconButton.IconButton, { key: '86bb1f36b13255ab062fcf85174866aead8265f1', partPrefix: "result-action", style: "outline-neutral", icon: this.getIcon(), title: this.tooltip, onClick: () => this.onClick() }));
128
128
  }
129
129
  };
130
130
  __decorate([
131
131
  initializationUtils.InitializeBindings()
132
132
  ], AtomicInsightResultAction.prototype, "bindings", void 0);
133
133
  __decorate([
134
- resultTemplateDecorators.ResultContext()
134
+ stencilResultTemplateDecorators.ResultContext()
135
135
  ], AtomicInsightResultAction.prototype, "result", void 0);
136
136
  AtomicInsightResultAction.style = AtomicInsightResultActionStyle0;
137
137
 
@@ -1 +1 @@
1
- {"file":"atomic-insight-result-action.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,4BAA4B,GAAG,mwjEAAmwjE,CAAC;AACzyjE,wCAAe,4BAA4B;;;;;;;;;;;;ACuB3C,IAAY,OAMX;AAND,WAAY,OAAO;IACjB,8CAAmC,CAAA;IACnC,wCAA6B,CAAA;IAC7B,kCAAuB,CAAA;IACvB,oCAAyB,CAAA;IACzB,sCAA2B,CAAA;AAC7B,CAAC,EANW,OAAO,KAAP,OAAO,QAMlB;MASY,yBAAyB;;;;;;;QAkBN,SAAI,GAAG,EAAE,CAAC;;;;QAKV,YAAO,GAAG,EAAE,CAAC;;;;QAKb,mBAAc,GAAG,EAAE,CAAC;;;;QAKpB,WAAM,GAAqB,EAAE,CAAC;;oBAfvB,EAAE;uBAKC,EAAE;8BAKK,EAAE;sBAKQ,EAAE;;IAIpD,UAAU;QACf,IAAI,CAAC,OAAO,GAAGA,mCAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;KAClE;IAEO,OAAO;QACb,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC;YACrC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC;YACnC,UAAU,CAAC;gBACT,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC;aAChC,EAAE,IAAI,CAAC,CAAC;SACV;QAED,QAAQ,IAAI,CAAC,MAAM;YACjB,KAAK,OAAO,CAAC,eAAe;gBAC1B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAC3B,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAC7C,CAAC;gBACF,SAAS,CAAC,SAAS,CAAC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ACF;KACH;;AApG4B;IAA5BC,sCAAkB,EAAE;2DAAmC;AAC/B;IAAxBC,sCAAa,EAAE;yDAAyB;;;;;","names":["loadInsightAnalyticsActions","AttachIcon","QuickviewIcon","h","IconButton","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"],"version":3}
1
+ {"file":"atomic-insight-result-action.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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O,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAC9C,CAAC;gBACF,MAAM;YACR,KAAK,OAAO,CAAC,WAAW;gBACtB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAC3B,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAC3C,CAAC;gBACF,MAAM;SACT;QAED,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;KACrE;IAEO,OAAO;QACb,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,OAAO,IAAI,CAAC,IAAI,CAAC;SAClB;QAED,QAAQ,IAAI,CAAC,MAAM;YACjB,KAAK,OAAO,CAAC,eAAe;gBAC1B,OAAO,QAAQ,CAAC;YAClB,KAAK,OAAO,CAAC,YAAY;gBACvB,OAAOC,iBAAU,CAAC;YACpB,KAAK,OAAO,CAAC,SAAS;gBACpB,OAAOC,qBAAa,CAAC;YACvB,KAAK,OAAO,CAAC,UAAU;gBACrB,OAAO,QAAQ,CAAC;YAClB,KAAK,OAAO,CAAC,WAAW;gBACtB,OAAO,SAAS,CAAC;YACnB;gBACE,OAAOA,qBAAa,CAAC;SACxB;KACF;IAEM,MAAM;QACX,QACEC,QAACC,4BAAU,qDACT,UAAU,EAAC,eAAe,EAC1B,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,EACpB,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,GAC7B,EACF;KACH;;AApG4B;IAA5BC,sCAAkB,EAAE;2DAAmC;AAC/B;IAAxBC,6CAAa,EAAE;yDAAyB;;;;;","names":["loadInsightAnalyticsActions","AttachIcon","QuickviewIcon","h","IconButton","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 '@/src/components/search/result-template-component-utils/context/stencil-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"],"version":3}
@@ -7,7 +7,7 @@ const insight = require('@coveo/headless/insight');
7
7
  const attach = require('./attach-19283bec.js');
8
8
  const initializationUtils = require('./initialization-utils-92f1b080.js');
9
9
  const stencilIconButton = require('./stencil-iconButton-738b1548.js');
10
- const resultTemplateDecorators = require('./result-template-decorators-432d11a9.js');
10
+ const stencilResultTemplateDecorators = require('./stencil-result-template-decorators-28b05aaf.js');
11
11
  require('./dom-utils-d4790328.js');
12
12
  require('./event-utils-9bfcf3c5.js');
13
13
  require('./init-queue-a18aa323.js');
@@ -74,7 +74,7 @@ const AtomicInsightResultAttachToCaseAction = class {
74
74
  : this.bindings.i18n.t('attach-to-case');
75
75
  }
76
76
  render() {
77
- return (index.h(stencilIconButton.IconButton, { key: 'ebf5f45e034e5f915ea989983c0524a64cde7828', partPrefix: "result-action", style: "outline-neutral", icon: this.getIcon(), title: this.getTooltip(), onClick: () => this.onClick() }));
77
+ return (index.h(stencilIconButton.IconButton, { key: '237f5d92afc324554f4a94f2814882dcee033c8c', partPrefix: "result-action", style: "outline-neutral", icon: this.getIcon(), title: this.getTooltip(), onClick: () => this.onClick() }));
78
78
  }
79
79
  get host() { return index.getElement(this); }
80
80
  };
@@ -82,7 +82,7 @@ __decorate([
82
82
  initializationUtils.InitializeBindings()
83
83
  ], AtomicInsightResultAttachToCaseAction.prototype, "bindings", void 0);
84
84
  __decorate([
85
- resultTemplateDecorators.ResultContext()
85
+ stencilResultTemplateDecorators.ResultContext()
86
86
  ], AtomicInsightResultAttachToCaseAction.prototype, "result", void 0);
87
87
  __decorate([
88
88
  initializationUtils.BindStateToController('attachToCase')
@@ -1 +1 @@
1
- {"file":"atomic-insight-result-attach-to-case-action.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,wCAAwC,GAAG,0ljEAA0ljE,CAAC;AAC5ojE,oDAAe,wCAAwC;;;;;;;;;;;;MC4B1C,qCAAqC;;;;;;;;IA+BzC,UAAU;QACf,MAAM,MAAM,GACV,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,MAAM,IAAI,EAAE,CAAC;QAC9D,IAAI,CAAC,YAAY,GAAGA,yBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YAC1D,OAAO,EAAE;gBACP,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,MAAM;aACf;SACF,CAAC,CAAC;KACJ;IAEO,OAAO;QACb,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE;YAClC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;gBACf,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM;gBAClC,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;gBACf,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM;gBAClC,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;SACJ;KACF;IAEO,OAAO;QACb,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,UAAU,GAAGC,iBAAU,CAAC;KACjE;IAEO,UAAU;QAChB,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE;cACjC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC;cACxC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;KAC5C;IAEM,MAAM;QACX,QACEC,QAACC,4BAAU,qDACT,UAAU,EAAC,eAAe,EAC1B,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,EACpB,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,GAC7B,EACF;KACH;;;AAzE4B;IAA5BC,sCAAkB,EAAE;uEAAmC;AAC/B;IAAxBC,sCAAa,EAAE;qEAAyB;AASlC;IAFNC,yCAAqB,CAAC,cAAc,CAAC;gFAER;;;;;","names":["buildAttachToCase","AttachIcon","h","IconButton","InitializeBindings","ResultContext","BindStateToController"],"sources":["src/components/insight/atomic-insight-result-attach-to-case-action/atomic-insight-result-attach-to-case-action.pcss?tag=atomic-insight-result-attach-to-case-action","src/components/insight/atomic-insight-result-attach-to-case-action/atomic-insight-result-attach-to-case-action.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n","import {AttachToCase, buildAttachToCase, Result} from '@coveo/headless/insight';\nimport {Component, Event, State, h, Element, EventEmitter} from '@stencil/core';\nimport AttachIcon from '../../../images/attach.svg';\nimport DetachIcon from '../../../images/detach.svg';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {IconButton} from '../../common/stencil-iconButton';\nimport {ResultContext} from '../../search/result-template-components/result-template-decorators';\nimport {InsightBindings} from '../atomic-insight-interface/atomic-insight-interface';\n\nexport interface InsightResultAttachToCaseEvent {\n callback: () => void;\n result: Result;\n}\n/**\n * @internal\n * The `atomic-insight-result-attach-to-case-action` component can be nested inside a `atomic-insight-result-actions` to render an interactive button that will emit an `atomic/insight/attachToCase/attach` or `atomic/insight/attachToCase/detach` JavaScript event, based on its current state, when clicked.\n *\n * @part result-action-container - The result action container\n * @part result-action-button - The result action button\n * @part result-action-icon - The result action icon\n */\n@Component({\n tag: 'atomic-insight-result-attach-to-case-action',\n styleUrl: 'atomic-insight-result-attach-to-case-action.pcss',\n})\nexport class AtomicInsightResultAttachToCaseAction\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n @ResultContext() private result!: Result;\n\n @Element() host!: HTMLElement;\n @State() public error!: Error;\n\n public attachToCase!: AttachToCase;\n\n @BindStateToController('attachToCase')\n @State()\n public attachToCaseState!: {};\n\n @Event({\n eventName: 'atomic/insight/attachToCase/attach',\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n private attach!: EventEmitter<InsightResultAttachToCaseEvent>;\n\n @Event({\n eventName: 'atomic/insight/attachToCase/detach',\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n private detach!: EventEmitter<InsightResultAttachToCaseEvent>;\n\n public initialize() {\n const caseId: string =\n this.bindings.engine.state.insightCaseContext?.caseId || '';\n this.attachToCase = buildAttachToCase(this.bindings.engine, {\n options: {\n result: this.result,\n caseId: caseId,\n },\n });\n }\n\n private onClick() {\n if (this.attachToCase.isAttached()) {\n this.detach.emit({\n callback: this.attachToCase.detach,\n result: this.result,\n });\n } else {\n this.attach.emit({\n callback: this.attachToCase.attach,\n result: this.result,\n });\n }\n }\n\n private getIcon() {\n return this.attachToCase.isAttached() ? DetachIcon : AttachIcon;\n }\n\n private getTooltip() {\n return this.attachToCase.isAttached()\n ? this.bindings.i18n.t('detach-from-case')\n : this.bindings.i18n.t('attach-to-case');\n }\n\n public render() {\n return (\n <IconButton\n partPrefix=\"result-action\"\n style=\"outline-neutral\"\n icon={this.getIcon()}\n title={this.getTooltip()}\n onClick={() => this.onClick()}\n />\n );\n }\n}\n"],"version":3}
1
+ {"file":"atomic-insight-result-attach-to-case-action.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,wCAAwC,GAAG,0ljEAA0ljE,CAAC;AAC5ojE,oDAAe,wCAAwC;;;;;;;;;;;;MC4B1C,qCAAqC;;;;;;;;IA+BzC,UAAU;QACf,MAAM,MAAM,GACV,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,MAAM,IAAI,EAAE,CAAC;QAC9D,IAAI,CAAC,YAAY,GAAGA,yBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YAC1D,OAAO,EAAE;gBACP,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,MAAM;aACf;SACF,CAAC,CAAC;KACJ;IAEO,OAAO;QACb,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE;YAClC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;gBACf,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM;gBAClC,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;gBACf,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM;gBAClC,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;SACJ;KACF;IAEO,OAAO;QACb,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,UAAU,GAAGC,iBAAU,CAAC;KACjE;IAEO,UAAU;QAChB,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE;cACjC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC;cACxC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;KAC5C;IAEM,MAAM;QACX,QACEC,QAACC,4BAAU,qDACT,UAAU,EAAC,eAAe,EAC1B,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,EACpB,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,GAC7B,EACF;KACH;;;AAzE4B;IAA5BC,sCAAkB,EAAE;uEAAmC;AAC/B;IAAxBC,6CAAa,EAAE;qEAAyB;AASlC;IAFNC,yCAAqB,CAAC,cAAc,CAAC;gFAER;;;;;","names":["buildAttachToCase","AttachIcon","h","IconButton","InitializeBindings","ResultContext","BindStateToController"],"sources":["src/components/insight/atomic-insight-result-attach-to-case-action/atomic-insight-result-attach-to-case-action.pcss?tag=atomic-insight-result-attach-to-case-action","src/components/insight/atomic-insight-result-attach-to-case-action/atomic-insight-result-attach-to-case-action.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n","import {AttachToCase, buildAttachToCase, Result} from '@coveo/headless/insight';\nimport {Component, Event, State, h, Element, EventEmitter} from '@stencil/core';\nimport AttachIcon from '../../../images/attach.svg';\nimport DetachIcon from '../../../images/detach.svg';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {IconButton} from '../../common/stencil-iconButton';\nimport {ResultContext} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\nimport {InsightBindings} from '../atomic-insight-interface/atomic-insight-interface';\n\nexport interface InsightResultAttachToCaseEvent {\n callback: () => void;\n result: Result;\n}\n/**\n * @internal\n * The `atomic-insight-result-attach-to-case-action` component can be nested inside a `atomic-insight-result-actions` to render an interactive button that will emit an `atomic/insight/attachToCase/attach` or `atomic/insight/attachToCase/detach` JavaScript event, based on its current state, when clicked.\n *\n * @part result-action-container - The result action container\n * @part result-action-button - The result action button\n * @part result-action-icon - The result action icon\n */\n@Component({\n tag: 'atomic-insight-result-attach-to-case-action',\n styleUrl: 'atomic-insight-result-attach-to-case-action.pcss',\n})\nexport class AtomicInsightResultAttachToCaseAction\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n @ResultContext() private result!: Result;\n\n @Element() host!: HTMLElement;\n @State() public error!: Error;\n\n public attachToCase!: AttachToCase;\n\n @BindStateToController('attachToCase')\n @State()\n public attachToCaseState!: {};\n\n @Event({\n eventName: 'atomic/insight/attachToCase/attach',\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n private attach!: EventEmitter<InsightResultAttachToCaseEvent>;\n\n @Event({\n eventName: 'atomic/insight/attachToCase/detach',\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n private detach!: EventEmitter<InsightResultAttachToCaseEvent>;\n\n public initialize() {\n const caseId: string =\n this.bindings.engine.state.insightCaseContext?.caseId || '';\n this.attachToCase = buildAttachToCase(this.bindings.engine, {\n options: {\n result: this.result,\n caseId: caseId,\n },\n });\n }\n\n private onClick() {\n if (this.attachToCase.isAttached()) {\n this.detach.emit({\n callback: this.attachToCase.detach,\n result: this.result,\n });\n } else {\n this.attach.emit({\n callback: this.attachToCase.attach,\n result: this.result,\n });\n }\n }\n\n private getIcon() {\n return this.attachToCase.isAttached() ? DetachIcon : AttachIcon;\n }\n\n private getTooltip() {\n return this.attachToCase.isAttached()\n ? this.bindings.i18n.t('detach-from-case')\n : this.bindings.i18n.t('attach-to-case');\n }\n\n public render() {\n return (\n <IconButton\n partPrefix=\"result-action\"\n style=\"outline-neutral\"\n icon={this.getIcon()}\n title={this.getTooltip()}\n onClick={() => this.onClick()}\n />\n );\n }\n}\n"],"version":3}
@@ -6,7 +6,7 @@ const index = require('./index-757bc886.js');
6
6
  const insight = require('@coveo/headless/insight');
7
7
  const attach = require('./attach-19283bec.js');
8
8
  const initializationUtils = require('./initialization-utils-92f1b080.js');
9
- const resultTemplateDecorators = require('./result-template-decorators-432d11a9.js');
9
+ const stencilResultTemplateDecorators = require('./stencil-result-template-decorators-28b05aaf.js');
10
10
  require('./dom-utils-d4790328.js');
11
11
  require('./event-utils-9bfcf3c5.js');
12
12
  require('./init-queue-a18aa323.js');
@@ -43,7 +43,7 @@ const AtomicInsightResultAttachToCaseIndicator = class {
43
43
  }
44
44
  render() {
45
45
  if (this.attachToCase.isAttached()) {
46
- return (index.h("atomic-icon", { key: 'f5a9c8ef641335fd25e885cb7c2bc78abf40e084', part: "icon", class: "flex w-5 justify-center", icon: attach.AttachIcon, title: this.bindings.i18n.t('result-is-attached') }));
46
+ return (index.h("atomic-icon", { key: '20b42d05f34504a35995de347c51a0539542c003', part: "icon", class: "flex w-5 justify-center", icon: attach.AttachIcon, title: this.bindings.i18n.t('result-is-attached') }));
47
47
  }
48
48
  }
49
49
  get host() { return index.getElement(this); }
@@ -52,7 +52,7 @@ __decorate([
52
52
  initializationUtils.InitializeBindings()
53
53
  ], AtomicInsightResultAttachToCaseIndicator.prototype, "bindings", void 0);
54
54
  __decorate([
55
- resultTemplateDecorators.ResultContext()
55
+ stencilResultTemplateDecorators.ResultContext()
56
56
  ], AtomicInsightResultAttachToCaseIndicator.prototype, "result", void 0);
57
57
  __decorate([
58
58
  initializationUtils.BindStateToController('attachToCase')
@@ -1 +1 @@
1
- {"file":"atomic-insight-result-attach-to-case-indicator.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,2CAA2C,GAAG,0ljEAA0ljE,CAAC;AAC/ojE,uDAAe,2CAA2C;;;;;;;;;;;;MCoB7C,wCAAwC;;;;;;IAe5C,UAAU;QACf,MAAM,MAAM,GACV,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,MAAM,IAAI,EAAE,CAAC;QAC9D,IAAI,CAAC,YAAY,GAAGA,yBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YAC1D,OAAO,EAAE;gBACP,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,MAAM;aACf;SACF,CAAC,CAAC;KACJ;IAEM,MAAM;QACX,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE;YAClC,QACEC,0EACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,yBAAyB,EAC/B,IAAI,EAAEC,iBAAU,EAChB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAoB,CAAC,GACpC,EACf;SACH;KACF;;;AAlC4B;IAA5BC,sCAAkB,EAAE;0EAAmC;AAC/B;IAAxBC,sCAAa,EAAE;wEAAyB;AASlC;IAFNC,yCAAqB,CAAC,cAAc,CAAC;mFAER;;;;;","names":["buildAttachToCase","h","AttachIcon","InitializeBindings","ResultContext","BindStateToController"],"sources":["src/components/insight/atomic-insight-result-attach-to-case-indicator/atomic-insight-result-attach-to-case-indicator.pcss?tag=atomic-insight-result-attach-to-case-indicator","src/components/insight/atomic-insight-result-attach-to-case-indicator/atomic-insight-result-attach-to-case-indicator.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n","import {AttachToCase, buildAttachToCase, Result} from '@coveo/headless/insight';\nimport {Component, State, h, Element} from '@stencil/core';\nimport AttachIcon from '../../../images/attach.svg';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {ResultContext} from '../../search/result-template-components/result-template-decorators';\nimport {InsightBindings} from '../atomic-insight-interface/atomic-insight-interface';\n\n/**\n * @internal\n * The `atomic-insight-result-attach-to-case-indicator` component can be included inside a result template to indicate whether a result is attached to the current case.\n *\n * @part icon The icon that indicates whether the result is attached to the case.\n */\n@Component({\n tag: 'atomic-insight-result-attach-to-case-indicator',\n styleUrl: 'atomic-insight-result-attach-to-case-indicator.pcss',\n})\nexport class AtomicInsightResultAttachToCaseIndicator\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n @ResultContext() private result!: Result;\n\n @Element() host!: HTMLElement;\n @State() public error!: Error;\n\n public attachToCase!: AttachToCase;\n\n @BindStateToController('attachToCase')\n @State()\n public attachToCaseState!: {};\n\n public initialize() {\n const caseId: string =\n this.bindings.engine.state.insightCaseContext?.caseId || '';\n this.attachToCase = buildAttachToCase(this.bindings.engine, {\n options: {\n result: this.result,\n caseId: caseId,\n },\n });\n }\n\n public render() {\n if (this.attachToCase.isAttached()) {\n return (\n <atomic-icon\n part=\"icon\"\n class=\"flex w-5 justify-center\"\n icon={AttachIcon}\n title={this.bindings.i18n.t('result-is-attached')}\n ></atomic-icon>\n );\n }\n }\n}\n"],"version":3}
1
+ {"file":"atomic-insight-result-attach-to-case-indicator.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,2CAA2C,GAAG,0ljEAA0ljE,CAAC;AAC/ojE,uDAAe,2CAA2C;;;;;;;;;;;;MCoB7C,wCAAwC;;;;;;IAe5C,UAAU;QACf,MAAM,MAAM,GACV,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,MAAM,IAAI,EAAE,CAAC;QAC9D,IAAI,CAAC,YAAY,GAAGA,yBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YAC1D,OAAO,EAAE;gBACP,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,MAAM;aACf;SACF,CAAC,CAAC;KACJ;IAEM,MAAM;QACX,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE;YAClC,QACEC,0EACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,yBAAyB,EAC/B,IAAI,EAAEC,iBAAU,EAChB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAoB,CAAC,GACpC,EACf;SACH;KACF;;;AAlC4B;IAA5BC,sCAAkB,EAAE;0EAAmC;AAC/B;IAAxBC,6CAAa,EAAE;wEAAyB;AASlC;IAFNC,yCAAqB,CAAC,cAAc,CAAC;mFAER;;;;;","names":["buildAttachToCase","h","AttachIcon","InitializeBindings","ResultContext","BindStateToController"],"sources":["src/components/insight/atomic-insight-result-attach-to-case-indicator/atomic-insight-result-attach-to-case-indicator.pcss?tag=atomic-insight-result-attach-to-case-indicator","src/components/insight/atomic-insight-result-attach-to-case-indicator/atomic-insight-result-attach-to-case-indicator.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n","import {AttachToCase, buildAttachToCase, Result} from '@coveo/headless/insight';\nimport {Component, State, h, Element} from '@stencil/core';\nimport AttachIcon from '../../../images/attach.svg';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {ResultContext} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\nimport {InsightBindings} from '../atomic-insight-interface/atomic-insight-interface';\n\n/**\n * @internal\n * The `atomic-insight-result-attach-to-case-indicator` component can be included inside a result template to indicate whether a result is attached to the current case.\n *\n * @part icon The icon that indicates whether the result is attached to the case.\n */\n@Component({\n tag: 'atomic-insight-result-attach-to-case-indicator',\n styleUrl: 'atomic-insight-result-attach-to-case-indicator.pcss',\n})\nexport class AtomicInsightResultAttachToCaseIndicator\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n @ResultContext() private result!: Result;\n\n @Element() host!: HTMLElement;\n @State() public error!: Error;\n\n public attachToCase!: AttachToCase;\n\n @BindStateToController('attachToCase')\n @State()\n public attachToCaseState!: {};\n\n public initialize() {\n const caseId: string =\n this.bindings.engine.state.insightCaseContext?.caseId || '';\n this.attachToCase = buildAttachToCase(this.bindings.engine, {\n options: {\n result: this.result,\n caseId: caseId,\n },\n });\n }\n\n public render() {\n if (this.attachToCase.isAttached()) {\n return (\n <atomic-icon\n part=\"icon\"\n class=\"flex w-5 justify-center\"\n icon={AttachIcon}\n title={this.bindings.i18n.t('result-is-attached')}\n ></atomic-icon>\n );\n }\n }\n}\n"],"version":3}
@@ -9,7 +9,7 @@ const preview = require('./preview-8eebe5d5.js');
9
9
  const initializationUtils = require('./initialization-utils-92f1b080.js');
10
10
  const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
11
11
  const stencilIconButton = require('./stencil-iconButton-738b1548.js');
12
- const resultTemplateDecorators = require('./result-template-decorators-432d11a9.js');
12
+ const stencilResultTemplateDecorators = require('./stencil-result-template-decorators-28b05aaf.js');
13
13
  require('./dom-utils-d4790328.js');
14
14
  require('./event-utils-9bfcf3c5.js');
15
15
  require('./init-queue-a18aa323.js');
@@ -118,7 +118,7 @@ const AtomicInsightResultQuickviewAction = class {
118
118
  this.addQuickviewModalIfNeeded();
119
119
  this.updateModalContent();
120
120
  if (this.shouldRenderQuickview) {
121
- return (index.h(stencilIconButton.IconButton, { key: 'a731ecd4015b07e448f043a56246318fa06d4aa4', partPrefix: "result-action", style: "outline-neutral", ref: this.focusTarget.setTarget, icon: preview.QuickviewIcon, title: this.bindings.i18n.t('quickview'), onClick: () => this.onClick() }));
121
+ return (index.h(stencilIconButton.IconButton, { key: '7aec8a0b80655c19d723e1f0998777d2e583a0b1', partPrefix: "result-action", style: "outline-neutral", ref: this.focusTarget.setTarget, icon: preview.QuickviewIcon, title: this.bindings.i18n.t('quickview'), onClick: () => this.onClick() }));
122
122
  }
123
123
  }
124
124
  get host() { return index.getElement(this); }
@@ -127,7 +127,7 @@ __decorate([
127
127
  initializationUtils.InitializeBindings()
128
128
  ], AtomicInsightResultQuickviewAction.prototype, "bindings", void 0);
129
129
  __decorate([
130
- resultTemplateDecorators.ResultContext()
130
+ stencilResultTemplateDecorators.ResultContext()
131
131
  ], AtomicInsightResultQuickviewAction.prototype, "result", void 0);
132
132
  __decorate([
133
133
  initializationUtils.BindStateToController('quickview')
@@ -1 +1 @@
1
- {"file":"atomic-insight-result-quickview-action.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,qCAAqC,GAAG,0ljEAA0ljE,CAAC;AACzojE,iDAAe,qCAAqC;;;;;;;;;;;;MC4BvC,kCAAkC;;;;;;;;;;;;;;QA6BtC,YAAO,GAAG,qDAAqD,CAAC;;;uBAAtD,qDAAqD;;IAM/D,eAAe,CAAC,GAAU;QAC/B,GAAG,CAAC,wBAAwB,EAAE,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACvB;IAGM,mBAAmB,CAAC,GAAU;QACnC,GAAG,CAAC,wBAAwB,EAAE,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KAC3B;IAID,IAAW,WAAW;QACpB,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;YAC3B,IAAI,CAAC,iBAAiB,GAAG,IAAIA,+CAAqB,CAAC,IAAI,CAAC,CAAC;SAC1D;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAC;KAC/B;IAEM,UAAU;QACf,IAAI,CAAC,SAAS,GAAGC,uBAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YACpD,OAAO,EAAE,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC;SAC/B,CAAC,CAAC;QACH,IAAIC,YAAM,CAAC;YACT,OAAO,EAAE,IAAIC,iBAAW,CAAC;gBACvB,QAAQ,EAAE,IAAI;gBACd,KAAK,EAAE,mBAA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,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC;kBACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,EAAE;oBACvC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,aAAa;oBACxC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,YAAY;oBACtC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;iBACzB,CAAC,CAAC;SACR;KACF;IAEO,OAAO,CAAC,KAAkB;QAChC,KAAK,EAAE,eAAe,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAC;KACrC;IAED,IAAY,qBAAqB;QAC/B,OAAO,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC;KAC7C;IAEM,MAAM;QACX,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjC,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC9B,QACEC,QAACC,4BAAU,qDACT,UAAU,EAAC,eAAe,EAC1B,KAAK,EAAC,iBAAiB,EACvB,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,EAC/B,IAAI,EAAEC,qBAAa,EACnB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,EACxC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,GAC7B,EACF;SACH;KACF;;;AA5H4B;IAA5BC,sCAAkB,EAAE;oEAA4B;AACxB;IAAxBC,sCAAa,EAAE;kEAAyB;AAWlC;IAFNC,yCAAqB,CAAC,WAAW,CAAC;0EAEI;AAiB7B;IADTC,wCAAc,CAAC,WAAW,CAAC;gFACY;;;;;","names":["FocusTargetController","buildQuickview","Schema","StringValue","h","IconButton","QuickviewIcon","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"],"version":3}
1
+ {"file":"atomic-insight-result-quickview-action.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,qCAAqC,GAAG,0ljEAA0ljE,CAAC;AACzojE,iDAAe,qCAAqC;;;;;;;;;;;;MC4BvC,kCAAkC;;;;;;;;;;;;;;QA6BtC,YAAO,GAAG,qDAAqD,CAAC;;;uBAAtD,qDAAqD;;IAM/D,eAAe,CAAC,GAAU;QAC/B,GAAG,CAAC,wBAAwB,EAAE,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACvB;IAGM,mBAAmB,CAAC,GAAU;QACnC,GAAG,CAAC,wBAAwB,EAAE,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KAC3B;IAID,IAAW,WAAW;QACpB,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;YAC3B,IAAI,CAAC,iBAAiB,GAAG,IAAIA,+CAAqB,CAAC,IAAI,CAAC,CAAC;SAC1D;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAC;KAC/B;IAEM,UAAU;QACf,IAAI,CAAC,SAAS,GAAGC,uBAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YACpD,OAAO,EAAE,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC;SAC/B,CAAC,CAAC;QACH,IAAIC,YAAM,CAAC;YACT,OAAO,EAAE,IAAIC,iBAAW,CAAC;gBACvB,QAAQ,EAAE,IAAI;gBACd,KAAK,EAAE,mBAAmB;aAC3B,CAAC;SACH,CAAC,CAAC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAC,CAAC,CAAC;KACtC;IAEO,yBAAyB;QAC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KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,aAAa;oBACxC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,YAAY;oBACtC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;iBACzB,CAAC,CAAC;SACR;KACF;IAEO,OAAO,CAAC,KAAkB;QAChC,KAAK,EAAE,eAAe,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAC;KACrC;IAED,IAAY,qBAAqB;QAC/B,OAAO,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC;KAC7C;IAEM,MAAM;QACX,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjC,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC9B,QACEC,QAACC,4BAAU,qDACT,UAAU,EAAC,eAAe,EAC1B,KAAK,EAAC,iBAAiB,EACvB,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,EAC/B,IAAI,EAAEC,qBAAa,EACnB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,EACxC,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,GAC7B,EACF;SACH;KACF;;;AA5H4B;IAA5BC,sCAAkB,EAAE;oEAA4B;AACxB;IAAxBC,6CAAa,EAAE;kEAAyB;AAWlC;IAFNC,yCAAqB,CAAC,WAAW,CAAC;0EAEI;AAiB7B;IADTC,wCAAc,CAAC,WAAW,CAAC;gFACY;;;;;","names":["FocusTargetController","buildQuickview","Schema","StringValue","h","IconButton","QuickviewIcon","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 '@/src/components/search/result-template-component-utils/context/stencil-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"],"version":3}
@@ -11,7 +11,7 @@ const resultUtils = require('./result-utils-3313d650.js');
11
11
  const slotUtils = require('./slot-utils-a30cb814.js');
12
12
  const attributesSlot = require('./attributes-slot-4e7d7a75.js');
13
13
  const stencilItemLink = require('./stencil-item-link-9feaef61.js');
14
- const resultTemplateDecorators = require('./result-template-decorators-432d11a9.js');
14
+ const stencilResultTemplateDecorators = require('./stencil-result-template-decorators-28b05aaf.js');
15
15
  require('./dom-utils-d4790328.js');
16
16
  require('./init-queue-a18aa323.js');
17
17
  require('./initialization-lit-stencil-common-utils-730030b0.js');
@@ -59,7 +59,7 @@ const AtomicIPXResultLink = class {
59
59
  const href = bueno.isUndefined(this.hrefTemplate)
60
60
  ? this.result.clickUri
61
61
  : resultUtils.buildStringTemplateFromResult(this.hrefTemplate, this.result, this.bindings);
62
- return (index.h(stencilItemLink.LinkWithItemAnalytics, { key: 'b1fe73ffc76cf7543f40a400d5e7ae17b01141a8', href: href, onSelect: () => this.onSelect(), onBeginDelayedSelect: () => this.interactiveResult.beginDelayedSelect(), onCancelPendingSelect: () => this.interactiveResult.cancelPendingSelect(), attributes: this.linkAttributes, stopPropagation: this.stopPropagation }, this.hasDefaultSlot ? (index.h("slot", null)) : (index.h("atomic-result-text", { field: "title", default: "no-title" }))));
62
+ return (index.h(stencilItemLink.LinkWithItemAnalytics, { key: 'e9e869565ce0740006d1e1d3d888b811d006eea0', href: href, onSelect: () => this.onSelect(), onBeginDelayedSelect: () => this.interactiveResult.beginDelayedSelect(), onCancelPendingSelect: () => this.interactiveResult.cancelPendingSelect(), attributes: this.linkAttributes, stopPropagation: this.stopPropagation }, this.hasDefaultSlot ? (index.h("slot", null)) : (index.h("atomic-result-text", { field: "title", default: "no-title" }))));
63
63
  }
64
64
  get host() { return index.getElement(this); }
65
65
  };
@@ -67,10 +67,10 @@ __decorate([
67
67
  initializationUtils.InitializeBindings()
68
68
  ], AtomicIPXResultLink.prototype, "bindings", void 0);
69
69
  __decorate([
70
- resultTemplateDecorators.ResultContext()
70
+ stencilResultTemplateDecorators.ResultContext()
71
71
  ], AtomicIPXResultLink.prototype, "result", void 0);
72
72
  __decorate([
73
- resultTemplateDecorators.InteractiveResultContext()
73
+ stencilResultTemplateDecorators.InteractiveResultContext()
74
74
  ], AtomicIPXResultLink.prototype, "interactiveResult", void 0);
75
75
  AtomicIPXResultLink.style = AtomicIpxResultLinkStyle0;
76
76
 
@@ -1 +1 @@
1
- {"file":"atomic-ipx-result-link.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,o8kEAAo8kE,CAAC;AACp+kE,kCAAe,sBAAsB;;;;;;;;;;;;MCiCxB,mBAAmB;;;;;IA6BvB,UAAU;QACf,IAAI,CAAC,IAAI,CAAC,aAAa,CACrBA,2BAAgB,CACd,+BAA+B,EAC/B,CAAC,eAAwB;YACvB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;SACxC,CACF,CACF,CAAC;QACF,IAAI,CAAC,qBAAqB,GAAGC,qCAA4B,CACvD,IAAI,CAAC,QAAQ,CAAC,MAAM,CACrB,CAAC;KACH;IAEM,iBAAiB;QACtB,MAAM,QAAQ,GAAG,YAAY,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,CAAC,CAACC,gCAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAGC,wCAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KACtE;IAEM,MAAM,QAAQ;QACnB,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;QACtD,IAAI,iBAAiB,IAAI,IAAI,CAAC,qBAAqB,EAAE;YACnD,MAAM,MAAM,GACV,IAAI,CAAC,qBAAqB,CAAC,gCAAgC,CACzD,iBAAiB,CAClB,CAAC;YACJ,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACvC;QACD,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;KACjC;IAEM,MAAM;QACX,MAAM,IAAI,GAAGC,iBAAW,CAAC,IAAI,CAAC,YAAY,CAAC;cACvC,IAAI,CAAC,MAAM,CAAC,QAAQ;cACpBC,yCAA6B,CAC3B,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,QAAQ,CACd,CAAC;QAEN,QACEC,QAACC,qCAAqB,qDACpB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,EACvE,qBAAqB,EAAE,MACrB,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,EAE9C,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,eAAe,EAAE,IAAI,CAAC,eAAe,IAEpC,IAAI,CAAC,cAAc,IAClBD,qBAAQ,KAERA,gCACE,KAAK,EAAC,OAAO,EACb,OAAO,EAAC,UAAU,GACE,CACvB,CACqB,EACxB;KACH;;;AAxF4B;IAA5BE,sCAAkB,EAAE;qDAAgC;AAG5B;IAAxBC,sCAAa,EAAE;mDAAkC;AACd;IAAnCC,iDAAwB,EAAE;8DAA+C;;;;;","names":["buildCustomEvent","loadIPXActionsHistoryActions","getDefaultSlotFromHost","getAttributesFromLinkSlot","isUndefined","buildStringTemplateFromResult","h","LinkWithItemAnalytics","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"],"version":3}
1
+ {"file":"atomic-ipx-result-link.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,o8kEAAo8kE,CAAC;AACp+kE,kCAAe,sBAAsB;;;;;;;;;;;;MCiCxB,mBA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AC,kBAAkB,EAAE,EACvE,qBAAqB,EAAE,MACrB,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,EAE9C,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,eAAe,EAAE,IAAI,CAAC,eAAe,IAEpC,IAAI,CAAC,cAAc,IAClBD,qBAAQ,KAERA,gCACE,KAAK,EAAC,OAAO,EACb,OAAO,EAAC,UAAU,GACE,CACvB,CACqB,EACxB;KACH;;;AAxF4B;IAA5BE,sCAAkB,EAAE;qDAAgC;AAG5B;IAAxBC,6CAAa,EAAE;mDAAkC;AACd;IAAnCC,wDAAwB,EAAE;8DAA+C;;;;;","names":["buildCustomEvent","loadIPXActionsHistoryActions","getDefaultSlotFromHost","getAttributesFromLinkSlot","isUndefined","buildStringTemplateFromResult","h","LinkWithItemAnalytics","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 '@/src/components/search/result-template-component-utils/context/stencil-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"],"version":3}
@@ -590,7 +590,7 @@ const AtomicQuickviewModal = class {
590
590
  });
591
591
  }
592
592
  render() {
593
- return (index.h("atomic-modal", { key: '8ff1438b0d7ff43933a1fc0800891a7cb7065043', fullscreen: this.bindings.store.isMobile(), class: 'atomic-quickview-modal', isOpen: this.isOpen, close: () => this.onClose(), exportparts: exportParts.ATOMIC_MODAL_EXPORT_PARTS }, this.renderHeader(), this.renderBody(), this.renderFooter()));
593
+ return (index.h("atomic-modal", { key: 'f586e9d2a689d56e282626e2947242c766605734', fullscreen: this.bindings.store.isMobile(), class: 'atomic-quickview-modal', isOpen: this.isOpen, close: () => this.onClose(), exportparts: exportParts.ATOMIC_MODAL_EXPORT_PARTS }, this.renderHeader(), this.renderBody(), this.renderFooter()));
594
594
  }
595
595
  static get watchers() { return {
596
596
  "highlightKeywords": ["watchHighlightKeywords"]
@@ -9,7 +9,7 @@ const quickview = require('./quickview-b74d3d85.js');
9
9
  const initializationUtils = require('./initialization-utils-92f1b080.js');
10
10
  const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
11
11
  const stencilButton = require('./stencil-button-94b89acc.js');
12
- const resultTemplateDecorators = require('./result-template-decorators-432d11a9.js');
12
+ const stencilResultTemplateDecorators = require('./stencil-result-template-decorators-28b05aaf.js');
13
13
  require('./dom-utils-d4790328.js');
14
14
  require('./event-utils-9bfcf3c5.js');
15
15
  require('./init-queue-a18aa323.js');
@@ -116,7 +116,7 @@ const AtomicQuickview = class {
116
116
  }
117
117
  render() {
118
118
  if (this.quickviewState.resultHasPreview) {
119
- return (index.h(stencilButton.Button, { key: 'ec6c644d9d557133df40428ccacddcb3d035c9fd', part: "button", title: this.bindings.i18n.t('quickview'), style: "outline-primary", class: "p-2", onClick: (event) => this.onClick(event), ref: this.focusTarget.setTarget }, index.h("atomic-icon", { key: 'fa4444026db63add82d7906e9fc0636c3a94e0d8', part: "icon", class: "flex w-5 justify-center", icon: quickview.QuickviewIcon })));
119
+ return (index.h(stencilButton.Button, { key: 'c2fde022ee361e15da41033f8bb4f729138629fd', part: "button", title: this.bindings.i18n.t('quickview'), style: "outline-primary", class: "p-2", onClick: (event) => this.onClick(event), ref: this.focusTarget.setTarget }, index.h("atomic-icon", { key: '37acbddf2e8e1245395875dbbaa6a6d71921d46e', part: "icon", class: "flex w-5 justify-center", icon: quickview.QuickviewIcon })));
120
120
  }
121
121
  }
122
122
  };
@@ -124,7 +124,7 @@ __decorate([
124
124
  initializationUtils.InitializeBindings()
125
125
  ], AtomicQuickview.prototype, "bindings", void 0);
126
126
  __decorate([
127
- resultTemplateDecorators.ResultContext()
127
+ stencilResultTemplateDecorators.ResultContext()
128
128
  ], AtomicQuickview.prototype, "result", void 0);
129
129
  __decorate([
130
130
  initializationUtils.BindStateToController('quickview')
@@ -1 +1 @@
1
- {"file":"atomic-quickview.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,0ljEAA0ljE,CAAC;AACtn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AC;KACrC;IAED,mBAAmB;QACjB,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjC,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;IAEM,MAAM;QACX,IAAI,IAAI,CAAC,cAAc,CAAC,gBAAgB,EAAE;YACxC,QACEC,QAACC,oBAAM,qDACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,EACxC,KAAK,EAAC,iBAAiB,EACvB,KAAK,EAAC,KAAK,EACX,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EACvC,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,IAE/BD,0EACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,yBAAyB,EAC/B,IAAI,EAAEE,uBAAa,GACN,CACR,EACT;SACH;KACF;;AA/H4B;IAA5BC,sCAAkB,EAAE;iDAA4B;AACxB;IAAxBC,sCAAa,EAAE;+CAAyB;AASlC;IAFNC,yCAAqB,CAAC,WAAW,CAAC;uDAEI;AAiB7B;IADTC,wCAAc,CAAC,WAAW,CAAC;6DACY;;;;;","names":["FocusTargetController","buildQuickview","Schema","StringValue","h","Button","QuickviewIcon","InitializeBindings","ResultContext","BindStateToController","AriaLiveRegion"],"sources":["src/components/search/result-template-components/atomic-quickview/atomic-quickview.pcss?tag=atomic-quickview&encapsulation=shadow","src/components/search/result-template-components/atomic-quickview/atomic-quickview.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n","import {Schema, StringValue} from '@coveo/bueno';\nimport {\n Result,\n buildQuickview,\n Quickview,\n QuickviewState,\n} from '@coveo/headless';\nimport {Component, h, Listen, Prop, State} from '@stencil/core';\nimport QuickviewIcon from '../../../../images/quickview.svg';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {\n AriaLiveRegion,\n FocusTargetController,\n} from '../../../../utils/stencil-accessibility-utils';\nimport {Button} from '../../../common/stencil-button';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-quickview` component renders a button which the end user can click to open a modal box containing a preview\n * about a result.\n *\n * The `atomic-quickview` is not meant to replace the `atomic-result-link` to access an item in a result template; it has certain limitations (e.g., custom styles and embedded\n * images/links may not work as expected in an `atomic-quickview`).\n *\n * @part button - The button that opens the quickview modal on click.\n * @part icon - The icon for the quickview button.\n */\n@Component({\n tag: 'atomic-quickview',\n styleUrl: 'atomic-quickview.pcss',\n shadow: true,\n})\nexport class AtomicQuickview implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n private buttonFocusTarget?: FocusTargetController;\n\n @State() public error!: Error;\n\n public quickview!: Quickview;\n\n @BindStateToController('quickview')\n @State()\n public quickviewState!: QuickviewState;\n\n /**\n * The `sandbox` attribute to apply to the quickview iframe.\n *\n * The quickview is loaded inside an iframe with a [`sandbox`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox) attribute for security reasons.\n *\n * This attribute exists primarily to protect against potential XSS attacks that could originate from the document being displayed.\n *\n * By default, the sandbox attributes are: `allow-popups allow-top-navigation allow-same-origin`.\n *\n * `allow-same-origin` is not optional, and must always be included in the list of allowed capabilities for the component to function properly.\n */\n @Prop() public sandbox =\n 'allow-popups allow-top-navigation allow-same-origin';\n\n @AriaLiveRegion('quickview')\n protected quickviewAriaMessage!: string;\n\n @Listen('atomic/quickview/next', {target: 'body'})\n public onNextQuickview(evt: Event) {\n evt.stopImmediatePropagation();\n this.quickview.next();\n }\n\n @Listen('atomic/quickview/previous', {target: 'body'})\n public onPreviousQuickview(evt: Event) {\n evt.stopImmediatePropagation();\n this.quickview.previous();\n }\n\n private quickviewModalRef?: HTMLAtomicQuickviewModalElement;\n\n public get focusTarget() {\n if (!this.buttonFocusTarget) {\n this.buttonFocusTarget = new FocusTargetController(this);\n }\n return this.buttonFocusTarget;\n }\n\n public initialize() {\n this.quickview = buildQuickview(this.bindings.engine, {\n options: {result: this.result},\n });\n new Schema({\n sandbox: new StringValue({\n required: true,\n regex: /allow-same-origin/,\n }),\n }).validate({sandbox: this.sandbox});\n }\n\n private addQuickviewModalIfNeeded() {\n if (this.quickviewModalRef) {\n return;\n }\n\n const quickviewModal = this.bindings.interfaceElement.querySelector(\n 'atomic-quickview-modal'\n );\n if (quickviewModal) {\n this.quickviewModalRef = quickviewModal;\n return;\n }\n this.quickviewModalRef = document.createElement('atomic-quickview-modal');\n this.quickviewModalRef.setAttribute('sandbox', this.sandbox);\n this.bindings.interfaceElement.appendChild(this.quickviewModalRef);\n }\n\n private updateModalContent() {\n if (this.quickviewModalRef && this.quickview.state.content) {\n this.quickviewModalRef.content = this.quickview.state.content;\n this.quickviewModalRef.result = this.result;\n this.quickviewModalRef.total = this.quickviewState.totalResults;\n this.quickviewModalRef.current = this.quickviewState.currentResult;\n this.quickviewModalRef.modalCloseCallback = () =>\n this.focusTarget.focus();\n\n this.quickviewAriaMessage = this.quickviewState.isLoading\n ? this.bindings.i18n.t('quickview-loading')\n : this.bindings.i18n.t('quickview-loaded', {\n first: this.quickviewState.currentResult,\n last: this.quickviewState.totalResults,\n title: this.result.title,\n });\n }\n }\n\n private onClick(event?: MouseEvent) {\n event?.stopPropagation();\n this.quickview.fetchResultContent();\n }\n\n componentWillUpdate(): void {\n this.addQuickviewModalIfNeeded();\n this.updateModalContent();\n }\n\n public render() {\n if (this.quickviewState.resultHasPreview) {\n return (\n <Button\n part=\"button\"\n title={this.bindings.i18n.t('quickview')}\n style=\"outline-primary\"\n class=\"p-2\"\n onClick={(event) => this.onClick(event)}\n ref={this.focusTarget.setTarget}\n >\n <atomic-icon\n part=\"icon\"\n class=\"flex w-5 justify-center\"\n icon={QuickviewIcon}\n ></atomic-icon>\n </Button>\n );\n }\n }\n}\n"],"version":3}
1
+ {"file":"atomic-quickview.entry.cj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kB;QAChC,KAAK,EAAE,eAAe,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAC;KACrC;IAED,mBAAmB;QACjB,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjC,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;IAEM,MAAM;QACX,IAAI,IAAI,CAAC,cAAc,CAAC,gBAAgB,EAAE;YACxC,QACEC,QAACC,oBAAM,qDACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,EACxC,KAAK,EAAC,iBAAiB,EACvB,KAAK,EAAC,KAAK,EACX,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EACvC,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,IAE/BD,0EACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,yBAAyB,EAC/B,IAAI,EAAEE,uBAAa,GACN,CACR,EACT;SACH;KACF;;AA/H4B;IAA5BC,sCAAkB,EAAE;iDAA4B;AACxB;IAAxBC,6CAAa,EAAE;+CAAyB;AASlC;IAFNC,yCAAqB,CAAC,WAAW,CAAC;uDAEI;AAiB7B;IADTC,wCAAc,CAAC,WAAW,CAAC;6DACY;;;;;","names":["FocusTargetController","buildQuickview","Schema","StringValue","h","Button","QuickviewIcon","InitializeBindings","ResultContext","BindStateToController","AriaLiveRegion"],"sources":["src/components/search/result-template-components/atomic-quickview/atomic-quickview.pcss?tag=atomic-quickview&encapsulation=shadow","src/components/search/result-template-components/atomic-quickview/atomic-quickview.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n","import {Schema, StringValue} from '@coveo/bueno';\nimport {\n Result,\n buildQuickview,\n Quickview,\n QuickviewState,\n} from '@coveo/headless';\nimport {Component, h, Listen, Prop, State} from '@stencil/core';\nimport QuickviewIcon from '../../../../images/quickview.svg';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {\n AriaLiveRegion,\n FocusTargetController,\n} from '../../../../utils/stencil-accessibility-utils';\nimport {Button} from '../../../common/stencil-button';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\n\n/**\n * The `atomic-quickview` component renders a button which the end user can click to open a modal box containing a preview\n * about a result.\n *\n * The `atomic-quickview` is not meant to replace the `atomic-result-link` to access an item in a result template; it has certain limitations (e.g., custom styles and embedded\n * images/links may not work as expected in an `atomic-quickview`).\n *\n * @part button - The button that opens the quickview modal on click.\n * @part icon - The icon for the quickview button.\n */\n@Component({\n tag: 'atomic-quickview',\n styleUrl: 'atomic-quickview.pcss',\n shadow: true,\n})\nexport class AtomicQuickview implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n private buttonFocusTarget?: FocusTargetController;\n\n @State() public error!: Error;\n\n public quickview!: Quickview;\n\n @BindStateToController('quickview')\n @State()\n public quickviewState!: QuickviewState;\n\n /**\n * The `sandbox` attribute to apply to the quickview iframe.\n *\n * The quickview is loaded inside an iframe with a [`sandbox`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox) attribute for security reasons.\n *\n * This attribute exists primarily to protect against potential XSS attacks that could originate from the document being displayed.\n *\n * By default, the sandbox attributes are: `allow-popups allow-top-navigation allow-same-origin`.\n *\n * `allow-same-origin` is not optional, and must always be included in the list of allowed capabilities for the component to function properly.\n */\n @Prop() public sandbox =\n 'allow-popups allow-top-navigation allow-same-origin';\n\n @AriaLiveRegion('quickview')\n protected quickviewAriaMessage!: string;\n\n @Listen('atomic/quickview/next', {target: 'body'})\n public onNextQuickview(evt: Event) {\n evt.stopImmediatePropagation();\n this.quickview.next();\n }\n\n @Listen('atomic/quickview/previous', {target: 'body'})\n public onPreviousQuickview(evt: Event) {\n evt.stopImmediatePropagation();\n this.quickview.previous();\n }\n\n private quickviewModalRef?: HTMLAtomicQuickviewModalElement;\n\n public get focusTarget() {\n if (!this.buttonFocusTarget) {\n this.buttonFocusTarget = new FocusTargetController(this);\n }\n return this.buttonFocusTarget;\n }\n\n public initialize() {\n this.quickview = buildQuickview(this.bindings.engine, {\n options: {result: this.result},\n });\n new Schema({\n sandbox: new StringValue({\n required: true,\n regex: /allow-same-origin/,\n }),\n }).validate({sandbox: this.sandbox});\n }\n\n private addQuickviewModalIfNeeded() {\n if (this.quickviewModalRef) {\n return;\n }\n\n const quickviewModal = this.bindings.interfaceElement.querySelector(\n 'atomic-quickview-modal'\n );\n if (quickviewModal) {\n this.quickviewModalRef = quickviewModal;\n return;\n }\n this.quickviewModalRef = document.createElement('atomic-quickview-modal');\n this.quickviewModalRef.setAttribute('sandbox', this.sandbox);\n this.bindings.interfaceElement.appendChild(this.quickviewModalRef);\n }\n\n private updateModalContent() {\n if (this.quickviewModalRef && this.quickview.state.content) {\n this.quickviewModalRef.content = this.quickview.state.content;\n this.quickviewModalRef.result = this.result;\n this.quickviewModalRef.total = this.quickviewState.totalResults;\n this.quickviewModalRef.current = this.quickviewState.currentResult;\n this.quickviewModalRef.modalCloseCallback = () =>\n this.focusTarget.focus();\n\n this.quickviewAriaMessage = this.quickviewState.isLoading\n ? this.bindings.i18n.t('quickview-loading')\n : this.bindings.i18n.t('quickview-loaded', {\n first: this.quickviewState.currentResult,\n last: this.quickviewState.totalResults,\n title: this.result.title,\n });\n }\n }\n\n private onClick(event?: MouseEvent) {\n event?.stopPropagation();\n this.quickview.fetchResultContent();\n }\n\n componentWillUpdate(): void {\n this.addQuickviewModalIfNeeded();\n this.updateModalContent();\n }\n\n public render() {\n if (this.quickviewState.resultHasPreview) {\n return (\n <Button\n part=\"button\"\n title={this.bindings.i18n.t('quickview')}\n style=\"outline-primary\"\n class=\"p-2\"\n onClick={(event) => this.onClick(event)}\n ref={this.focusTarget.setTarget}\n >\n <atomic-icon\n part=\"icon\"\n class=\"flex w-5 justify-center\"\n icon={QuickviewIcon}\n ></atomic-icon>\n </Button>\n );\n }\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-757bc886.js');
6
6
  const initQueue = require('./init-queue-a18aa323.js');
7
7
  const recommendation = require('@coveo/headless/recommendation');
8
- const analyticsConfig = require('./analytics-config-63c156a6.js');
8
+ const analyticsConfig = require('./analytics-config-e9505710.js');
9
9
  const propsUtils = require('./props-utils-1e4ba1b0.js');
10
10
  const store = require('./store-82abd941.js');
11
11
  require('./dayjs.min-8b80e6d1.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-757bc886.js');
6
6
  const headless = require('@coveo/headless');
7
- const resultTemplateDecorators = require('./result-template-decorators-432d11a9.js');
7
+ const stencilResultTemplateDecorators = require('./stencil-result-template-decorators-28b05aaf.js');
8
8
  require('./stencil-item-decorators-43a96f33.js');
9
9
  require('./dom-utils-d4790328.js');
10
10
  require('./event-utils-9bfcf3c5.js');
@@ -62,7 +62,7 @@ const AtomicResultBadge = class {
62
62
  get host() { return index.getElement(this); }
63
63
  };
64
64
  __decorate([
65
- resultTemplateDecorators.ResultContext()
65
+ stencilResultTemplateDecorators.ResultContext()
66
66
  ], AtomicResultBadge.prototype, "result", void 0);
67
67
  AtomicResultBadge.style = AtomicResultBadgeStyle0;
68
68
 
@@ -1 +1 @@
1
- {"file":"atomic-result-badge.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,stjEAAstjE,CAAC;AACpvjE,gCAAe,oBAAoB;;;;;;;;;;;;MC2CtB,iBAAiB;;;;;;;IA2BpB,UAAU;QAChB,QACEA,yBACE,IAAI,EAAC,mBAAmB,EACxB,IAAI,EAAE,IAAI,CAAC,IAAK,EAChB,KAAK,EAAC,sBAAsB,GACf,EACf;KACH;IAEO,cAAc;QACpB,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,OAAOA,gCAAoB,KAAK,EAAE,IAAI,CAAC,KAAK,GAAuB,CAAC;SACrE;QACD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,OAAOA,yBAAa,KAAK,EAAE,IAAI,CAAC,KAAK,GAAgB,CAAC;SACvD;QACD,OAAOA,qBAAa,CAAC;KACtB;IAEO,UAAU;QAChB,OAAOA,kBAAM,IAAI,EAAC,oBAAoB,IAAE,IAAI,CAAC,cAAc,EAAE,CAAQ,CAAC;KACvE;IAEO,WAAW;QACjB,QACEA,iBACE,IAAI,EAAC,sBAAsB,EAC3B,KAAK,EAAC,wGAAwG,IAE7G,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,EAC9B,IAAI,CAAC,UAAU,EAAE,CACd,EACN;KACH;IAED,mBAAmB;QACjB,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,QAAQ,GACZC,+BAAsB,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;gBACjE,IAAI,CAAC;YACP,IAAI,CAAC,QAAQ,EAAE;gBACb,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;aACpB;SACF;KACF;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;KAC3B;;;AA3EwB;IAAxBC,sCAAa,EAAE;iDAAyB;;;;;","names":["h","ResultTemplatesHelpers","ResultContext"],"sources":["src/components/search/result-template-components/atomic-result-badge/atomic-result-badge.pcss?tag=atomic-result-badge&encapsulation=shadow","src/components/search/result-template-components/atomic-result-badge/atomic-result-badge.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n\n:host {\n display: inline-flex;\n place-items: center;\n height: var(--row-height, auto);\n word-break: break-word;\n}\n","import {Result, ResultTemplatesHelpers} from '@coveo/headless';\nimport {Component, Element, Prop, h} from '@stencil/core';\nimport {ResultContext} from '../result-template-decorators';\n\n/**\n * The `atomic-result-badge` element renders a badge to highlight special features of a result.\n *\n * A badge can either display:\n * * Text:\n * ```html\n * <atomic-result-badge label=\"trending\"></atomic-result-badge>\n * ```\n * * The contents of a single-value field:\n * ```html\n * <atomic-result-badge field=\"objecttype\"></atomic-result-badge>\n * ```\n * * An icon:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/star.svg\"></atomic-result-badge>\n * ```\n * * Slotted elements:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/stopwatch.svg\">\n * Deal ends in <my-dynamic-countdown></my-dynamic-countdown>\n * </atomic-result-badge>\n * ```\n *\n * The contents of a multi-value field can be displayed as in the following example:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/language.svg\">\n * <atomic-result-multi-value-text field=\"language\"></atomic-result-multi-value-text>\n * </atomic-result-badge>\n * ```\n *\n * @part result-badge-element - The decorative outer-most element with the background color and text color.\n * @part result-badge-icon - The icon displayed at the left-end of the badge, if present.\n * @part result-badge-label - The wrapper around the contents at the right-end of the badge. This may be text, a field or slotted elements depending on which was configured.\n * @slot default - The element(s) to display inside the badge, instead of a field or label.\n */\n@Component({\n tag: 'atomic-result-badge',\n styleUrl: 'atomic-result-badge.pcss',\n shadow: true,\n})\nexport class AtomicResultBadge {\n @ResultContext() private result!: Result;\n @Element() host!: HTMLElement;\n /**\n * The field to display in the badge.\n *\n * Not compatible with `label`, slotted elements nor multi-value fields.\n */\n @Prop({reflect: true}) public field?: string;\n\n /**\n * The text to display in the badge.\n *\n * Not compatible with `field` nor slotted elements.\n */\n @Prop({reflect: true}) public label?: string;\n\n /**\n * Specifies an icon to display at the left-end of the badge.\n * This can be used in conjunction with `field`, `label` or slotted elements.\n *\n * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n * - Use a value that starts with `assets://`, to display an icon from the Atomic package.\n * - Use a stringified SVG to display it directly\n */\n @Prop({reflect: true}) public icon?: string;\n\n private renderIcon() {\n return (\n <atomic-icon\n part=\"result-badge-icon\"\n icon={this.icon!}\n class=\"h-3 w-3 fill-current\"\n ></atomic-icon>\n );\n }\n\n private getTextContent() {\n if (this.field !== undefined) {\n return <atomic-result-text field={this.field}></atomic-result-text>;\n }\n if (this.label !== undefined) {\n return <atomic-text value={this.label}></atomic-text>;\n }\n return <slot></slot>;\n }\n\n private renderText() {\n return <span part=\"result-badge-label\">{this.getTextContent()}</span>;\n }\n\n private renderBadge() {\n return (\n <div\n part=\"result-badge-element\"\n class=\"bg-neutral-light text-neutral-dark inline-flex h-full place-items-center space-x-1.5 rounded-full px-3\"\n >\n {this.icon && this.renderIcon()}\n {this.renderText()}\n </div>\n );\n }\n\n componentWillRender() {\n if (this.field) {\n const hasValue =\n ResultTemplatesHelpers.getResultProperty(this.result, this.field) !==\n null;\n if (!hasValue) {\n this.host.remove();\n }\n }\n }\n\n render() {\n return this.renderBadge();\n }\n}\n"],"version":3}
1
+ {"file":"atomic-result-badge.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,stjEAAstjE,CAAC;AACpvjE,gCAAe,oBAAoB;;;;;;;;;;;;MC2CtB,iBAAiB;;;;;;;IA2BpB,UAAU;QAChB,QACEA,yBACE,IAAI,EAAC,mBAAmB,EACxB,IAAI,EAAE,IAAI,CAAC,IAAK,EAChB,KAAK,EAAC,sBAAsB,GACf,EACf;KACH;IAEO,cAAc;QACpB,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,OAAOA,gCAAoB,KAAK,EAAE,IAAI,CAAC,KAAK,GAAuB,CAAC;SACrE;QACD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,OAAOA,yBAAa,KAAK,EAAE,IAAI,CAAC,KAAK,GAAgB,CAAC;SACvD;QACD,OAAOA,qBAAa,CAAC;KACtB;IAEO,UAAU;QAChB,OAAOA,kBAAM,IAAI,EAAC,oBAAoB,IAAE,IAAI,CAAC,cAAc,EAAE,CAAQ,CAAC;KACvE;IAEO,WAAW;QACjB,QACEA,iBACE,IAAI,EAAC,sBAAsB,EAC3B,KAAK,EAAC,wGAAwG,IAE7G,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE,EAC9B,IAAI,CAAC,UAAU,EAAE,CACd,EACN;KACH;IAED,mBAAmB;QACjB,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,QAAQ,GACZC,+BAAsB,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;gBACjE,IAAI,CAAC;YACP,IAAI,CAAC,QAAQ,EAAE;gBACb,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;aACpB;SACF;KACF;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;KAC3B;;;AA3EwB;IAAxBC,6CAAa,EAAE;iDAAyB;;;;;","names":["h","ResultTemplatesHelpers","ResultContext"],"sources":["src/components/search/result-template-components/atomic-result-badge/atomic-result-badge.pcss?tag=atomic-result-badge&encapsulation=shadow","src/components/search/result-template-components/atomic-result-badge/atomic-result-badge.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n\n:host {\n display: inline-flex;\n place-items: center;\n height: var(--row-height, auto);\n word-break: break-word;\n}\n","import {Result, ResultTemplatesHelpers} from '@coveo/headless';\nimport {Component, Element, Prop, h} from '@stencil/core';\nimport {ResultContext} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\n\n/**\n * The `atomic-result-badge` element renders a badge to highlight special features of a result.\n *\n * A badge can either display:\n * * Text:\n * ```html\n * <atomic-result-badge label=\"trending\"></atomic-result-badge>\n * ```\n * * The contents of a single-value field:\n * ```html\n * <atomic-result-badge field=\"objecttype\"></atomic-result-badge>\n * ```\n * * An icon:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/star.svg\"></atomic-result-badge>\n * ```\n * * Slotted elements:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/stopwatch.svg\">\n * Deal ends in <my-dynamic-countdown></my-dynamic-countdown>\n * </atomic-result-badge>\n * ```\n *\n * The contents of a multi-value field can be displayed as in the following example:\n * ```html\n * <atomic-result-badge icon=\"https://my-website.fake/language.svg\">\n * <atomic-result-multi-value-text field=\"language\"></atomic-result-multi-value-text>\n * </atomic-result-badge>\n * ```\n *\n * @part result-badge-element - The decorative outer-most element with the background color and text color.\n * @part result-badge-icon - The icon displayed at the left-end of the badge, if present.\n * @part result-badge-label - The wrapper around the contents at the right-end of the badge. This may be text, a field or slotted elements depending on which was configured.\n * @slot default - The element(s) to display inside the badge, instead of a field or label.\n */\n@Component({\n tag: 'atomic-result-badge',\n styleUrl: 'atomic-result-badge.pcss',\n shadow: true,\n})\nexport class AtomicResultBadge {\n @ResultContext() private result!: Result;\n @Element() host!: HTMLElement;\n /**\n * The field to display in the badge.\n *\n * Not compatible with `label`, slotted elements nor multi-value fields.\n */\n @Prop({reflect: true}) public field?: string;\n\n /**\n * The text to display in the badge.\n *\n * Not compatible with `field` nor slotted elements.\n */\n @Prop({reflect: true}) public label?: string;\n\n /**\n * Specifies an icon to display at the left-end of the badge.\n * This can be used in conjunction with `field`, `label` or slotted elements.\n *\n * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n * - Use a value that starts with `assets://`, to display an icon from the Atomic package.\n * - Use a stringified SVG to display it directly\n */\n @Prop({reflect: true}) public icon?: string;\n\n private renderIcon() {\n return (\n <atomic-icon\n part=\"result-badge-icon\"\n icon={this.icon!}\n class=\"h-3 w-3 fill-current\"\n ></atomic-icon>\n );\n }\n\n private getTextContent() {\n if (this.field !== undefined) {\n return <atomic-result-text field={this.field}></atomic-result-text>;\n }\n if (this.label !== undefined) {\n return <atomic-text value={this.label}></atomic-text>;\n }\n return <slot></slot>;\n }\n\n private renderText() {\n return <span part=\"result-badge-label\">{this.getTextContent()}</span>;\n }\n\n private renderBadge() {\n return (\n <div\n part=\"result-badge-element\"\n class=\"bg-neutral-light text-neutral-dark inline-flex h-full place-items-center space-x-1.5 rounded-full px-3\"\n >\n {this.icon && this.renderIcon()}\n {this.renderText()}\n </div>\n );\n }\n\n componentWillRender() {\n if (this.field) {\n const hasValue =\n ResultTemplatesHelpers.getResultProperty(this.result, this.field) !==\n null;\n if (!hasValue) {\n this.host.remove();\n }\n }\n }\n\n render() {\n return this.renderBadge();\n }\n}\n"],"version":3}
@@ -11,7 +11,7 @@ const unfoldedItem = require('./unfolded-item-148d21d6.js');
11
11
  const showHideButton = require('./show-hide-button-c4717f52.js');
12
12
  const itemTemplateProvider = require('./item-template-provider-470c1774.js');
13
13
  const stencilItemDecorators = require('./stencil-item-decorators-43a96f33.js');
14
- const resultTemplateDecorators = require('./result-template-decorators-432d11a9.js');
14
+ const stencilResultTemplateDecorators = require('./stencil-result-template-decorators-28b05aaf.js');
15
15
  require('./dom-utils-d4790328.js');
16
16
  require('./init-queue-a18aa323.js');
17
17
  require('./initialization-lit-stencil-common-utils-730030b0.js');
@@ -139,7 +139,7 @@ const AtomicResultChildren = class {
139
139
  return (index.h(showHideButton.ChildrenWrapper, { hasChildren: children.length > 0 }, children.map((child, i) => this.renderChild(child, i === children.length - 1))));
140
140
  }
141
141
  render() {
142
- return (index.h(showHideButton.ResultChildrenGuard, { key: 'eb224dfff016980d3d7aa281e6a87c3172286c78', inheritTemplates: this.inheritTemplates, resultTemplateRegistered: this.resultTemplateRegistered, templateHasError: this.templateHasError }, this.collection ? this.renderCollection() : this.renderFoldedResult()));
142
+ return (index.h(showHideButton.ResultChildrenGuard, { key: '973212ec10adf3c7968db7c94cb25e7eb061b05b', inheritTemplates: this.inheritTemplates, resultTemplateRegistered: this.resultTemplateRegistered, templateHasError: this.templateHasError }, this.collection ? this.renderCollection() : this.renderFoldedResult()));
143
143
  }
144
144
  get host() { return index.getElement(this); }
145
145
  };
@@ -153,7 +153,7 @@ __decorate([
153
153
  showHideButton.FoldedItemListContext()
154
154
  ], AtomicResultChildren.prototype, "foldedResultList", void 0);
155
155
  __decorate([
156
- resultTemplateDecorators.ResultContext({ folded: true })
156
+ stencilResultTemplateDecorators.ResultContext({ folded: true })
157
157
  ], AtomicResultChildren.prototype, "result", void 0);
158
158
  __decorate([
159
159
  stencilItemDecorators.ItemDisplayConfigContext()