@coveo/atomic 3.37.1 → 3.37.2

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 (285) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/atomic.esm.js.map +1 -1
  3. package/dist/atomic/components/_index.d.ts +0 -2
  4. package/dist/atomic/components/_index.js +0 -1
  5. package/dist/atomic/components/atomic-automatic-facet-generator2.js +1 -1
  6. package/dist/atomic/components/atomic-automatic-facet-generator2.js.map +1 -1
  7. package/dist/atomic/components/atomic-category-facet.js +2 -2
  8. package/dist/atomic/components/atomic-category-facet.js.map +1 -1
  9. package/dist/atomic/components/atomic-color-facet.js +1 -1
  10. package/dist/atomic/components/atomic-color-facet.js.map +1 -1
  11. package/dist/atomic/components/atomic-insight-facet.js +2 -2
  12. package/dist/atomic/components/atomic-insight-facet.js.map +1 -1
  13. package/dist/atomic/components/atomic-insight-numeric-facet.js +2 -2
  14. package/dist/atomic/components/atomic-insight-numeric-facet.js.map +1 -1
  15. package/dist/atomic/components/atomic-insight-timeframe-facet.js +1 -1
  16. package/dist/atomic/components/atomic-insight-timeframe-facet.js.map +1 -1
  17. package/dist/atomic/components/atomic-ipx-recs-list.js +1 -2
  18. package/dist/atomic/components/atomic-ipx-recs-list.js.map +1 -1
  19. package/dist/atomic/components/atomic-numeric-facet.js +2 -2
  20. package/dist/atomic/components/atomic-numeric-facet.js.map +1 -1
  21. package/dist/atomic/components/atomic-quickview-modal2.js +1 -1
  22. package/dist/atomic/components/atomic-quickview.js +1 -1
  23. package/dist/atomic/components/atomic-rating-facet.js +1 -1
  24. package/dist/atomic/components/atomic-rating-facet.js.map +1 -1
  25. package/dist/atomic/components/atomic-rating-range-facet.js +1 -1
  26. package/dist/atomic/components/atomic-rating-range-facet.js.map +1 -1
  27. package/dist/atomic/components/atomic-recs-interface.js +1 -1
  28. package/dist/atomic/components/atomic-recs-list.js +1 -2
  29. package/dist/atomic/components/atomic-recs-list.js.map +1 -1
  30. package/dist/atomic/components/atomic-result-fields-list.js +1 -1
  31. package/dist/atomic/components/atomic-result-link.js +1 -1
  32. package/dist/atomic/components/atomic-smart-snippet-feedback-modal2.js +2 -2
  33. package/dist/atomic/components/atomic-tab-manager.js +1 -1
  34. package/dist/atomic/components/atomic-timeframe-facet.js +1 -1
  35. package/dist/atomic/components/atomic-timeframe-facet.js.map +1 -1
  36. package/dist/atomic/components/components/commerce/atomic-commerce-facets/atomic-commerce-facets.js +12 -12
  37. package/dist/atomic/components/components/commerce/atomic-commerce-interface/atomic-commerce-interface.js +1 -1
  38. package/dist/atomic/components/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.js +1 -1
  39. package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.js +1 -1
  40. package/dist/atomic/components/components/common/tabs/tab-wrapper.js +9 -0
  41. package/dist/atomic/components/components/insight/atomic-insight-interface/atomic-insight-interface.js +1 -1
  42. package/dist/atomic/components/components/search/atomic-external/atomic-external.js +1 -1
  43. package/dist/atomic/components/components/search/atomic-result-list/atomic-result-list.js +434 -0
  44. package/dist/atomic/components/components/search/atomic-result-template/atomic-result-template.js +1 -0
  45. package/dist/atomic/components/components/search/atomic-search-interface/atomic-search-interface.js +1 -1
  46. package/dist/atomic/components/components/search/index.js +1 -0
  47. package/dist/atomic/components/components/search/lazy-index.js +1 -0
  48. package/dist/atomic/components/decorators/bindings.js +1 -1
  49. package/dist/atomic/components/global/environment.js +1 -1
  50. package/dist/atomic/components/index.js.map +1 -1
  51. package/dist/atomic/components/stencil-carousel.js +16 -1
  52. package/dist/atomic/components/stencil-carousel.js.map +1 -1
  53. package/dist/atomic/components/{facet-placeholder.js → stencil-facet-placeholder.js} +1 -1
  54. package/dist/atomic/components/stencil-facet-placeholder.js.map +1 -0
  55. package/dist/atomic/components/stencil-result-template-common.js +2 -1
  56. package/dist/atomic/components/stencil-result-template-common.js.map +1 -1
  57. package/dist/atomic/components/timeframe-facet-common.js +1 -1
  58. package/dist/atomic/components/timeframe-facet-common.js.map +1 -1
  59. package/dist/atomic/components/utils/tab-utils.js +17 -0
  60. package/dist/atomic/{p-f8bbecdd.entry.js → p-0d3407e9.entry.js} +2 -2
  61. package/dist/atomic/{p-b986c752.entry.js → p-1fdd2a5a.entry.js} +2 -2
  62. package/dist/atomic/p-1fdd2a5a.entry.js.map +1 -0
  63. package/dist/atomic/p-2a979ae5.entry.js +2 -0
  64. package/dist/atomic/{p-564e93ba.entry.js.map → p-2a979ae5.entry.js.map} +1 -1
  65. package/dist/atomic/p-2d624182.entry.js +2 -0
  66. package/dist/atomic/{p-6e47c9a8.entry.js.map → p-2d624182.entry.js.map} +1 -1
  67. package/dist/atomic/{p-561a531c.entry.js → p-3302a10f.entry.js} +2 -2
  68. package/dist/atomic/{p-04e08959.entry.js → p-3a426d47.entry.js} +2 -2
  69. package/dist/atomic/p-3a426d47.entry.js.map +1 -0
  70. package/dist/atomic/{p-7dfced62.entry.js → p-4362ec1f.entry.js} +2 -2
  71. package/dist/atomic/p-4362ec1f.entry.js.map +1 -0
  72. package/dist/atomic/{p-8deeef5f.entry.js → p-4b46b80f.entry.js} +2 -2
  73. package/dist/atomic/{p-408ffc88.entry.js → p-50353e9d.entry.js} +2 -2
  74. package/dist/atomic/p-50353e9d.entry.js.map +1 -0
  75. package/dist/atomic/{p-b528927d.entry.js → p-52721bf1.entry.js} +2 -2
  76. package/dist/atomic/p-52721bf1.entry.js.map +1 -0
  77. package/dist/atomic/{p-8deb6142.entry.js → p-594e3243.entry.js} +2 -2
  78. package/dist/atomic/p-5bdd4fca.entry.js +2 -0
  79. package/dist/atomic/{p-e351c8ed.entry.js.map → p-5bdd4fca.entry.js.map} +1 -1
  80. package/dist/atomic/{p-4239e0ec.entry.js → p-7632eb9d.entry.js} +2 -2
  81. package/dist/atomic/p-7632eb9d.entry.js.map +1 -0
  82. package/dist/atomic/{p-99203e57.entry.js → p-9a66fe53.entry.js} +2 -2
  83. package/dist/atomic/p-9a66fe53.entry.js.map +1 -0
  84. package/dist/atomic/{p-0d955dec.entry.js → p-9f3b431f.entry.js} +2 -2
  85. package/dist/atomic/{p-29bbd3d3.js → p-a598dc5b.js} +1 -1
  86. package/dist/atomic/p-a598dc5b.js.map +1 -0
  87. package/dist/atomic/p-acf4faf8.js +2 -0
  88. package/dist/atomic/p-acf4faf8.js.map +1 -0
  89. package/dist/atomic/p-c6763212.entry.js +2 -0
  90. package/dist/atomic/{p-1f4853b1.entry.js.map → p-c6763212.entry.js.map} +1 -1
  91. package/dist/atomic/p-c827c5e3.entry.js +2 -0
  92. package/dist/atomic/{p-7ccbf77d.entry.js.map → p-c827c5e3.entry.js.map} +1 -1
  93. package/dist/atomic/p-caf548dd.js +2 -0
  94. package/dist/atomic/p-caf548dd.js.map +1 -0
  95. package/dist/atomic/{p-3e077971.js → p-da20ee92.js} +2 -2
  96. package/dist/atomic/p-da20ee92.js.map +1 -0
  97. package/dist/atomic/{p-7b718df8.entry.js → p-e0e50820.entry.js} +2 -2
  98. package/dist/atomic/{p-27765040.entry.js → p-ecb92feb.entry.js} +2 -2
  99. package/dist/atomic/{p-27765040.entry.js.map → p-ecb92feb.entry.js.map} +1 -1
  100. package/dist/atomic/{p-3119dcb8.entry.js → p-f2893341.entry.js} +2 -2
  101. package/dist/atomic/{p-906fd94d.entry.js → p-f29cee57.entry.js} +2 -2
  102. package/dist/atomic/p-f29cee57.entry.js.map +1 -0
  103. package/dist/atomic/{p-2cd906b9.entry.js → p-f350c5c4.entry.js} +2 -2
  104. package/dist/atomic/p-f350c5c4.entry.js.map +1 -0
  105. package/dist/atomic/p-fef9f7d9.entry.js +2 -0
  106. package/dist/atomic/{p-7b11e602.entry.js.map → p-fef9f7d9.entry.js.map} +1 -1
  107. package/dist/cjs/_loader.cjs.js +1 -1
  108. package/dist/cjs/atomic-automatic-facet_2.cjs.entry.js +4 -4
  109. package/dist/cjs/atomic-automatic-facet_2.cjs.entry.js.map +1 -1
  110. package/dist/cjs/atomic-category-facet.cjs.entry.js +4 -4
  111. package/dist/cjs/atomic-category-facet.cjs.entry.js.map +1 -1
  112. package/dist/cjs/atomic-color-facet.cjs.entry.js +4 -4
  113. package/dist/cjs/atomic-color-facet.cjs.entry.js.map +1 -1
  114. package/dist/cjs/atomic-field-condition.cjs.entry.js +1 -2
  115. package/dist/cjs/atomic-field-condition.cjs.entry.js.map +1 -1
  116. package/dist/cjs/atomic-insight-facet.cjs.entry.js +3 -3
  117. package/dist/cjs/atomic-insight-facet.cjs.entry.js.map +1 -1
  118. package/dist/cjs/atomic-insight-numeric-facet.cjs.entry.js +3 -3
  119. package/dist/cjs/atomic-insight-numeric-facet.cjs.entry.js.map +1 -1
  120. package/dist/cjs/atomic-insight-result-children-template.cjs.entry.js +1 -2
  121. package/dist/cjs/atomic-insight-result-children-template.cjs.entry.js.map +1 -1
  122. package/dist/cjs/atomic-insight-result-template.cjs.entry.js +1 -2
  123. package/dist/cjs/atomic-insight-result-template.cjs.entry.js.map +1 -1
  124. package/dist/cjs/atomic-insight-timeframe-facet.cjs.entry.js +3 -3
  125. package/dist/cjs/atomic-insight-timeframe-facet.cjs.entry.js.map +1 -1
  126. package/dist/cjs/atomic-ipx-recs-list.cjs.entry.js +4 -5
  127. package/dist/cjs/atomic-ipx-recs-list.cjs.entry.js.map +1 -1
  128. package/dist/cjs/atomic-numeric-facet.cjs.entry.js +3 -3
  129. package/dist/cjs/atomic-numeric-facet.cjs.entry.js.map +1 -1
  130. package/dist/cjs/atomic-quickview-modal.cjs.entry.js +1 -1
  131. package/dist/cjs/atomic-quickview.cjs.entry.js +1 -1
  132. package/dist/cjs/atomic-rating-facet.cjs.entry.js +4 -4
  133. package/dist/cjs/atomic-rating-facet.cjs.entry.js.map +1 -1
  134. package/dist/cjs/atomic-rating-range-facet.cjs.entry.js +4 -4
  135. package/dist/cjs/atomic-rating-range-facet.cjs.entry.js.map +1 -1
  136. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  137. package/dist/cjs/atomic-recs-list.cjs.entry.js +4 -5
  138. package/dist/cjs/atomic-recs-list.cjs.entry.js.map +1 -1
  139. package/dist/cjs/atomic-recs-result-template.cjs.entry.js +1 -2
  140. package/dist/cjs/atomic-recs-result-template.cjs.entry.js.map +1 -1
  141. package/dist/cjs/atomic-result-fields-list.cjs.entry.js +1 -1
  142. package/dist/cjs/atomic-result-link.cjs.entry.js +1 -1
  143. package/dist/cjs/atomic-smart-snippet-feedback-modal.cjs.entry.js +2 -2
  144. package/dist/cjs/atomic-tab-manager.cjs.entry.js +1 -1
  145. package/dist/cjs/atomic-timeframe-facet.cjs.entry.js +3 -3
  146. package/dist/cjs/atomic-timeframe-facet.cjs.entry.js.map +1 -1
  147. package/dist/cjs/atomic.cjs.js +1 -1
  148. package/dist/cjs/index-1df73594.js +0 -4
  149. package/dist/cjs/{stencil-carousel-2beaa7d2.js → stencil-carousel-72557b3b.js} +17 -1
  150. package/dist/cjs/stencil-carousel-72557b3b.js.map +1 -0
  151. package/dist/cjs/{facet-placeholder-e86f105c.js → stencil-facet-placeholder-d3c0a675.js} +1 -1
  152. package/dist/cjs/stencil-facet-placeholder-d3c0a675.js.map +1 -0
  153. package/dist/cjs/{stencil-result-template-common-268ba233.js → stencil-result-template-common-46913299.js} +4 -3
  154. package/dist/cjs/stencil-result-template-common-46913299.js.map +1 -0
  155. package/dist/cjs/{timeframe-facet-common-16ba58fd.js → timeframe-facet-common-4fa4cc95.js} +5 -5
  156. package/dist/cjs/timeframe-facet-common-4fa4cc95.js.map +1 -0
  157. package/dist/cjs/version.cjs.js +2 -2
  158. package/dist/esm/_loader.js +1 -1
  159. package/dist/esm/atomic-automatic-facet_2.entry.js +1 -1
  160. package/dist/esm/atomic-automatic-facet_2.entry.js.map +1 -1
  161. package/dist/esm/atomic-category-facet.entry.js +2 -2
  162. package/dist/esm/atomic-category-facet.entry.js.map +1 -1
  163. package/dist/esm/atomic-color-facet.entry.js +1 -1
  164. package/dist/esm/atomic-color-facet.entry.js.map +1 -1
  165. package/dist/esm/atomic-field-condition.entry.js +1 -2
  166. package/dist/esm/atomic-field-condition.entry.js.map +1 -1
  167. package/dist/esm/atomic-insight-facet.entry.js +2 -2
  168. package/dist/esm/atomic-insight-facet.entry.js.map +1 -1
  169. package/dist/esm/atomic-insight-numeric-facet.entry.js +2 -2
  170. package/dist/esm/atomic-insight-numeric-facet.entry.js.map +1 -1
  171. package/dist/esm/atomic-insight-result-children-template.entry.js +1 -2
  172. package/dist/esm/atomic-insight-result-children-template.entry.js.map +1 -1
  173. package/dist/esm/atomic-insight-result-template.entry.js +1 -2
  174. package/dist/esm/atomic-insight-result-template.entry.js.map +1 -1
  175. package/dist/esm/atomic-insight-timeframe-facet.entry.js +2 -2
  176. package/dist/esm/atomic-insight-timeframe-facet.entry.js.map +1 -1
  177. package/dist/esm/atomic-ipx-recs-list.entry.js +3 -4
  178. package/dist/esm/atomic-ipx-recs-list.entry.js.map +1 -1
  179. package/dist/esm/atomic-numeric-facet.entry.js +2 -2
  180. package/dist/esm/atomic-numeric-facet.entry.js.map +1 -1
  181. package/dist/esm/atomic-quickview-modal.entry.js +1 -1
  182. package/dist/esm/atomic-quickview.entry.js +1 -1
  183. package/dist/esm/atomic-rating-facet.entry.js +1 -1
  184. package/dist/esm/atomic-rating-facet.entry.js.map +1 -1
  185. package/dist/esm/atomic-rating-range-facet.entry.js +1 -1
  186. package/dist/esm/atomic-rating-range-facet.entry.js.map +1 -1
  187. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  188. package/dist/esm/atomic-recs-list.entry.js +3 -4
  189. package/dist/esm/atomic-recs-list.entry.js.map +1 -1
  190. package/dist/esm/atomic-recs-result-template.entry.js +1 -2
  191. package/dist/esm/atomic-recs-result-template.entry.js.map +1 -1
  192. package/dist/esm/atomic-result-fields-list.entry.js +1 -1
  193. package/dist/esm/atomic-result-link.entry.js +1 -1
  194. package/dist/esm/atomic-smart-snippet-feedback-modal.entry.js +2 -2
  195. package/dist/esm/atomic-tab-manager.entry.js +1 -1
  196. package/dist/esm/atomic-timeframe-facet.entry.js +2 -2
  197. package/dist/esm/atomic-timeframe-facet.entry.js.map +1 -1
  198. package/dist/esm/atomic.js +1 -1
  199. package/dist/esm/index-a59c51bd.js +0 -4
  200. package/dist/esm/{stencil-carousel-be6f0bc1.js → stencil-carousel-a9540851.js} +17 -2
  201. package/dist/esm/stencil-carousel-a9540851.js.map +1 -0
  202. package/dist/esm/{facet-placeholder-7e0836c1.js → stencil-facet-placeholder-8201b5c9.js} +1 -1
  203. package/dist/esm/stencil-facet-placeholder-8201b5c9.js.map +1 -0
  204. package/dist/esm/{stencil-result-template-common-cddca36d.js → stencil-result-template-common-8be1ff35.js} +3 -2
  205. package/dist/esm/stencil-result-template-common-8be1ff35.js.map +1 -0
  206. package/dist/esm/{timeframe-facet-common-906a271d.js → timeframe-facet-common-4c8d95f2.js} +2 -2
  207. package/dist/esm/timeframe-facet-common-4c8d95f2.js.map +1 -0
  208. package/dist/esm/version.js +2 -2
  209. package/dist/types/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.d.ts +1 -1
  210. package/dist/types/components/{context → common/context}/bindings-context.d.ts +1 -1
  211. package/dist/types/components/common/facets/facet-placeholder/facet-placeholder.d.ts +2 -5
  212. package/dist/types/components/common/facets/facet-placeholder/stencil-facet-placeholder.d.ts +10 -0
  213. package/dist/types/components/common/template-controller/base-template-controller.d.ts +2 -1
  214. package/dist/types/components/search/atomic-result/atomic-result.d.ts +1 -1
  215. package/dist/types/components/search/{result-lists/atomic-result-list → atomic-result-list}/atomic-result-list.d.ts +45 -33
  216. package/dist/types/components/search/atomic-result-section-visual/atomic-result-section-visual.d.ts +1 -1
  217. package/dist/types/components/search/atomic-result-template/atomic-result-template.d.ts +1 -0
  218. package/dist/types/components/search/index.d.ts +1 -0
  219. package/dist/types/components.d.ts +0 -70
  220. package/docs/atomic-docs.json +1 -359
  221. package/package.json +5 -5
  222. package/dist/atomic/components/atomic-result-list.d.ts +0 -11
  223. package/dist/atomic/components/atomic-result-list.js +0 -343
  224. package/dist/atomic/components/atomic-result-list.js.map +0 -1
  225. package/dist/atomic/components/facet-placeholder.js.map +0 -1
  226. package/dist/atomic/components/stencil-display-grid.js +0 -20
  227. package/dist/atomic/components/stencil-display-grid.js.map +0 -1
  228. package/dist/atomic/components/table-element-utils.js +0 -5
  229. package/dist/atomic/components/table-element-utils.js.map +0 -1
  230. package/dist/atomic/p-023c1f4f.js +0 -2
  231. package/dist/atomic/p-023c1f4f.js.map +0 -1
  232. package/dist/atomic/p-04e08959.entry.js.map +0 -1
  233. package/dist/atomic/p-0a9d79a3.entry.js +0 -2
  234. package/dist/atomic/p-0a9d79a3.entry.js.map +0 -1
  235. package/dist/atomic/p-1f4853b1.entry.js +0 -2
  236. package/dist/atomic/p-2324ab77.js +0 -2
  237. package/dist/atomic/p-2324ab77.js.map +0 -1
  238. package/dist/atomic/p-29bbd3d3.js.map +0 -1
  239. package/dist/atomic/p-2cd906b9.entry.js.map +0 -1
  240. package/dist/atomic/p-3e077971.js.map +0 -1
  241. package/dist/atomic/p-408ffc88.entry.js.map +0 -1
  242. package/dist/atomic/p-4239e0ec.entry.js.map +0 -1
  243. package/dist/atomic/p-564e93ba.entry.js +0 -2
  244. package/dist/atomic/p-6e47c9a8.entry.js +0 -2
  245. package/dist/atomic/p-7b11e602.entry.js +0 -2
  246. package/dist/atomic/p-7ccbf77d.entry.js +0 -2
  247. package/dist/atomic/p-7dfced62.entry.js.map +0 -1
  248. package/dist/atomic/p-8b38c143.js +0 -2
  249. package/dist/atomic/p-8b38c143.js.map +0 -1
  250. package/dist/atomic/p-906fd94d.entry.js.map +0 -1
  251. package/dist/atomic/p-99203e57.entry.js.map +0 -1
  252. package/dist/atomic/p-b528927d.entry.js.map +0 -1
  253. package/dist/atomic/p-b986c752.entry.js.map +0 -1
  254. package/dist/atomic/p-be0518ae.js +0 -2
  255. package/dist/atomic/p-be0518ae.js.map +0 -1
  256. package/dist/atomic/p-e351c8ed.entry.js +0 -2
  257. package/dist/cjs/atomic-result-list.cjs.entry.js +0 -303
  258. package/dist/cjs/atomic-result-list.cjs.entry.js.map +0 -1
  259. package/dist/cjs/facet-placeholder-e86f105c.js.map +0 -1
  260. package/dist/cjs/stencil-carousel-2beaa7d2.js.map +0 -1
  261. package/dist/cjs/stencil-display-grid-04536fdc.js +0 -22
  262. package/dist/cjs/stencil-display-grid-04536fdc.js.map +0 -1
  263. package/dist/cjs/stencil-result-template-common-268ba233.js.map +0 -1
  264. package/dist/cjs/table-element-utils-2cc6dc82.js +0 -7
  265. package/dist/cjs/table-element-utils-2cc6dc82.js.map +0 -1
  266. package/dist/cjs/timeframe-facet-common-16ba58fd.js.map +0 -1
  267. package/dist/esm/atomic-result-list.entry.js +0 -299
  268. package/dist/esm/atomic-result-list.entry.js.map +0 -1
  269. package/dist/esm/facet-placeholder-7e0836c1.js.map +0 -1
  270. package/dist/esm/stencil-carousel-be6f0bc1.js.map +0 -1
  271. package/dist/esm/stencil-display-grid-02c4f5d0.js +0 -20
  272. package/dist/esm/stencil-display-grid-02c4f5d0.js.map +0 -1
  273. package/dist/esm/stencil-result-template-common-cddca36d.js.map +0 -1
  274. package/dist/esm/table-element-utils-1dbc5ef6.js +0 -5
  275. package/dist/esm/table-element-utils-1dbc5ef6.js.map +0 -1
  276. package/dist/esm/timeframe-facet-common-906a271d.js.map +0 -1
  277. package/dist/types/components/common/tabs/stencil-tab-guard.d.ts +0 -11
  278. /package/dist/atomic/components/components/{context → common/context}/bindings-context.js +0 -0
  279. /package/dist/atomic/{p-f8bbecdd.entry.js.map → p-0d3407e9.entry.js.map} +0 -0
  280. /package/dist/atomic/{p-561a531c.entry.js.map → p-3302a10f.entry.js.map} +0 -0
  281. /package/dist/atomic/{p-8deeef5f.entry.js.map → p-4b46b80f.entry.js.map} +0 -0
  282. /package/dist/atomic/{p-8deb6142.entry.js.map → p-594e3243.entry.js.map} +0 -0
  283. /package/dist/atomic/{p-0d955dec.entry.js.map → p-9f3b431f.entry.js.map} +0 -0
  284. /package/dist/atomic/{p-7b718df8.entry.js.map → p-e0e50820.entry.js.map} +0 -0
  285. /package/dist/atomic/{p-3119dcb8.entry.js.map → p-f2893341.entry.js.map} +0 -0
@@ -0,0 +1,434 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { ArrayValue, Schema, StringValue } from '@coveo/bueno';
8
+ import { buildInteractiveResult, buildResultList, buildResultsPerPage, buildTabManager, } from '@coveo/headless';
9
+ import { html, LitElement, nothing } from 'lit';
10
+ import { customElement, property, state } from 'lit/decorators.js';
11
+ import { keyed } from 'lit/directives/keyed.js';
12
+ import { map } from 'lit/directives/map.js';
13
+ import { ref } from 'lit/directives/ref.js';
14
+ import { when } from 'lit/directives/when.js';
15
+ import { renderItemPlaceholders } from "../../common/atomic-result-placeholder/item-placeholders";
16
+ import { createAppLoadedListener } from "../../common/interface/store";
17
+ import { renderDisplayWrapper } from "../../common/item-list/display-wrapper";
18
+ import { renderGridLayout } from "../../common/item-list/grid-layout";
19
+ import { renderItemList } from "../../common/item-list/item-list";
20
+ import { ItemListCommon, } from "../../common/item-list/item-list-common";
21
+ import { ResultTemplateProvider } from "../../common/item-list/result-template-provider";
22
+ import gridDisplayStyles from "../../common/item-list/styles/grid-display.tw.css";
23
+ import listDisplayStyles from "../../common/item-list/styles/list-display.tw.css";
24
+ import placeholderStyles from "../../common/item-list/styles/placeholders.tw.css";
25
+ import tableDisplayStyles from "../../common/item-list/styles/table-display.tw.css";
26
+ import { renderTableData, renderTableLayout, renderTableRow, } from "../../common/item-list/table-layout";
27
+ import { renderTabWrapper } from "../../common/tabs/tab-wrapper";
28
+ import { arrayConverter } from "../../../converters/array-converter";
29
+ import { bindStateToController } from "../../../decorators/bind-state";
30
+ import { bindingGuard } from "../../../decorators/binding-guard";
31
+ import { bindings } from "../../../decorators/bindings";
32
+ import { errorGuard } from "../../../decorators/error-guard";
33
+ import { withTailwindStyles } from "../../../decorators/with-tailwind-styles";
34
+ import { ChildrenUpdateCompleteMixin } from "../../../mixins/children-update-complete-mixin";
35
+ import { FocusTargetController } from "../../../utils/accessibility-utils";
36
+ import { randomID } from "../../../utils/utils";
37
+ import '../atomic-result/atomic-result';
38
+ import { getItemListDisplayClasses, } from "../../common/layout/item-layout-utils";
39
+ import { ValidatePropsController } from "../../common/validate-props-controller/validate-props-controller";
40
+ /**
41
+ * The `atomic-result-list` component is responsible for displaying query results by applying one or more result templates.
42
+ *
43
+ * @slot default - The default slot where the result templates are inserted.
44
+ * @part result-list - The element containing every result of a result list
45
+ * @part outline - The element displaying an outline or a divider around a result
46
+ * @part result-list-grid-clickable-container - The parent of the result & the clickable link encompassing it, when results are displayed as a grid
47
+ * @part result-list-grid-clickable - The clickable link encompassing the result when results are displayed as a grid
48
+ * @part result-table - The element of the result table containing a heading and a body
49
+ * @part result-table-heading - The element containing the row of cells in the result table's heading
50
+ * @part result-table-heading-row - The element containing cells of the result table's heading
51
+ * @part result-table-heading-cell - The element representing a cell of the result table's heading
52
+ * @part result-table-body - The element containing the rows of the result table's body
53
+ * @part result-table-row - The element containing the cells of a row in the result table's body
54
+ * @part result-table-row-odd - The element containing the cells of an odd row in the result table's body
55
+ * @part result-table-row-even - The element containing the cells of an even row in the result table's body
56
+ * @part result-table-cell - The element representing a cell of the result table's body
57
+ */
58
+ let AtomicResultList = class AtomicResultList extends ChildrenUpdateCompleteMixin(LitElement) {
59
+ constructor() {
60
+ super();
61
+ this.loadingFlag = randomID('firstResultLoaded-');
62
+ this.isAppLoaded = false;
63
+ this.isEveryResultReady = false;
64
+ this.resultTemplateRegistered = false;
65
+ this.templateHasError = false;
66
+ /**
67
+ * The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result.
68
+ */
69
+ this.density = 'normal';
70
+ /**
71
+ * The desired layout to use when displaying results. Layouts affect how many results to display per row and how visually distinct they are from each other.
72
+ */
73
+ this.display = 'list';
74
+ /**
75
+ * The expected size of the image displayed in the results.
76
+ */
77
+ this.imageSize = 'icon';
78
+ /**
79
+ * The tabs on which the result list can be displayed. This property should not be used at the same time as `tabs-excluded`.
80
+ *
81
+ * Set this property as a stringified JSON array, e.g.,
82
+ * ```html
83
+ * <atomic-result-list tabs-included='["tabIDA", "tabIDB"]'></atomic-result-list snippet>
84
+ * ```
85
+ * If you don't set this property, the result list can be displayed on any tab. Otherwise, the result list can only be displayed on the specified tabs.
86
+ */
87
+ this.tabsIncluded = [];
88
+ /**
89
+ * The tabs on which this result list must not be displayed. This property should not be used at the same time as `tabs-included`.
90
+ *
91
+ * Set this property as a stringified JSON array, e.g.,
92
+ * ```html
93
+ * <atomic-result-list tabs-excluded='["tabIDA", "tabIDB"]'></atomic-result-list>
94
+ * ```
95
+ * If you don't set this property, the result list can be displayed on any tab. Otherwise, the result list won't be displayed on any of the specified tabs.
96
+ */
97
+ this.tabsExcluded = [];
98
+ new ValidatePropsController(this, () => ({
99
+ density: this.density,
100
+ display: this.display,
101
+ imageSize: this.imageSize,
102
+ tabsIncluded: this.tabsIncluded,
103
+ tabsExcluded: this.tabsExcluded,
104
+ }), new Schema({
105
+ density: new StringValue({
106
+ constrainTo: ['normal', 'comfortable', 'compact'],
107
+ }),
108
+ display: new StringValue({ constrainTo: ['grid', 'list', 'table'] }),
109
+ imageSize: new StringValue({
110
+ constrainTo: ['small', 'large', 'icon', 'none'],
111
+ }),
112
+ tabsIncluded: new ArrayValue({
113
+ each: new StringValue({}),
114
+ required: false,
115
+ }),
116
+ tabsExcluded: new ArrayValue({
117
+ each: new StringValue({}),
118
+ required: false,
119
+ }),
120
+ }));
121
+ }
122
+ /**
123
+ * Sets a rendering function to bypass the standard HTML template mechanism for rendering results.
124
+ * You can use this function while working with web frameworks that don't use plain HTML syntax, e.g., React, Angular or Vue.
125
+ *
126
+ * Do not use this method if you integrate Atomic in a plain HTML deployment.
127
+ *
128
+ * @param resultRenderingFunction
129
+ */
130
+ async setRenderFunction(resultRenderingFunction) {
131
+ this.itemRenderingFunction = resultRenderingFunction;
132
+ }
133
+ initialize() {
134
+ if (this.innerHTML.includes('<atomic-result-children')) {
135
+ console.warn('Folded results will not render any children for the "atomic-result-list". Please use "atomic-folded-result-list" instead.');
136
+ }
137
+ this.resultList = buildResultList(this.bindings.engine);
138
+ this.resultsPerPage = buildResultsPerPage(this.bindings.engine);
139
+ this.tabManager = buildTabManager(this.bindings.engine);
140
+ this.initResultTemplateProvider();
141
+ this.initResultListCommon();
142
+ createAppLoadedListener(this.bindings.store, (isAppLoaded) => {
143
+ this.isAppLoaded = isAppLoaded;
144
+ });
145
+ }
146
+ async willUpdate(changedProperties) {
147
+ super.willUpdate(changedProperties);
148
+ if (changedProperties.has('tabManagerState')) {
149
+ const oldValue = changedProperties.get('tabManagerState');
150
+ if (this.tabManagerState?.activeTab !== oldValue?.activeTab &&
151
+ oldValue !== undefined) {
152
+ this.bindings.store.unsetLoadingFlag(this.loadingFlag);
153
+ }
154
+ }
155
+ if (changedProperties.has('resultListState')) {
156
+ const oldState = changedProperties.get('resultListState');
157
+ if (this.resultListState.firstSearchExecuted) {
158
+ this.bindings.store.unsetLoadingFlag(this.loadingFlag);
159
+ }
160
+ if (!oldState?.isLoading && this.resultListState.isLoading) {
161
+ this.isEveryResultReady = false;
162
+ }
163
+ }
164
+ await this.updateResultReadyState();
165
+ }
166
+ async updateResultReadyState() {
167
+ if (this.isAppLoaded &&
168
+ !this.isEveryResultReady &&
169
+ this.resultListState?.firstSearchExecuted &&
170
+ this.resultListState?.results?.length > 0) {
171
+ await this.getUpdateComplete();
172
+ this.isEveryResultReady = true;
173
+ }
174
+ }
175
+ render() {
176
+ return html `${renderTabWrapper({
177
+ props: {
178
+ tabsIncluded: this.tabsIncluded,
179
+ tabsExcluded: this.tabsExcluded,
180
+ activeTab: this.tabManagerState?.activeTab,
181
+ },
182
+ })(renderItemList({
183
+ props: {
184
+ hasError: this.resultListState.hasError,
185
+ hasItems: this.resultListState.hasResults,
186
+ hasTemplate: this.resultTemplateRegistered,
187
+ firstRequestExecuted: this.resultListState.firstSearchExecuted,
188
+ templateHasError: this.templateHasError,
189
+ },
190
+ })(html `${when(this.templateHasError, () => html `<slot></slot>`, () => {
191
+ const listClasses = this.computeListDisplayClasses();
192
+ const resultClasses = `${listClasses} ${!this.isEveryResultReady && 'hidden'}`;
193
+ // Results must be rendered immediately (though hidden) to start their initialization and loading processes.
194
+ // If we wait to render results until placeholders are removed, the components won't begin loading until then,
195
+ // causing a longer delay. The `isEveryResultReady` flag hides results while preserving placeholders,
196
+ // then removes placeholders once results are fully loaded to prevent content flash.
197
+ return html `
198
+ ${when(this.isAppLoaded, () => renderDisplayWrapper({
199
+ props: {
200
+ listClasses: resultClasses,
201
+ display: this.display,
202
+ },
203
+ })(html `${when(this.display === 'grid', () => this.renderGrid(), () => html `${when(this.display === 'list', () => this.renderList(), () => this.renderTable())}`)}`))}
204
+ ${when(!this.isEveryResultReady, () => renderDisplayWrapper({
205
+ props: { listClasses, display: this.display },
206
+ })(renderItemPlaceholders({
207
+ props: {
208
+ density: this.density,
209
+ display: this.display,
210
+ imageSize: this.imageSize,
211
+ numberOfPlaceholders: this.resultsPerPageState.numberOfResults || 10,
212
+ },
213
+ })))}
214
+ `;
215
+ })}`))}`;
216
+ }
217
+ initResultTemplateProvider() {
218
+ this.resultTemplateProvider = new ResultTemplateProvider({
219
+ includeDefaultTemplate: true,
220
+ templateElements: Array.from(this.querySelectorAll('atomic-result-template')),
221
+ getResultTemplateRegistered: () => this.resultTemplateRegistered,
222
+ getTemplateHasError: () => this.templateHasError,
223
+ setResultTemplateRegistered: (value) => {
224
+ this.resultTemplateRegistered = value;
225
+ },
226
+ setTemplateHasError: (value) => {
227
+ this.templateHasError = value;
228
+ },
229
+ bindings: this.bindings,
230
+ });
231
+ }
232
+ initResultListCommon() {
233
+ this.resultListCommon = new ItemListCommon({
234
+ engineSubscribe: this.bindings.engine.subscribe,
235
+ getCurrentNumberOfItems: () => this.resultListState.results.length,
236
+ getIsLoading: () => this.resultListState.isLoading,
237
+ host: this,
238
+ loadingFlag: this.loadingFlag,
239
+ nextNewItemTarget: this.focusTarget,
240
+ store: this.bindings.store,
241
+ });
242
+ }
243
+ computeListDisplayClasses() {
244
+ const displayPlaceholders = !(this.isAppLoaded && this.isEveryResultReady);
245
+ return getItemListDisplayClasses(this.display, this.density, this.imageSize, this.resultListState?.isLoading, displayPlaceholders);
246
+ }
247
+ renderGrid() {
248
+ return html `${map(this.resultListState.results, (result, index) => {
249
+ return renderGridLayout({
250
+ props: {
251
+ item: {
252
+ ...result,
253
+ title: result.title ?? '',
254
+ },
255
+ selectorForItem: 'atomic-result',
256
+ setRef: (element) => {
257
+ element instanceof HTMLElement &&
258
+ this.resultListCommon.setNewResultRef(element, index);
259
+ },
260
+ },
261
+ })(html `${keyed(this.getResultId(result), html `<atomic-result
262
+ .content=${this.getContent(result)}
263
+ .density=${this.density}
264
+ .display=${this.display}
265
+ .imageSize=${this.imageSize}
266
+ .interactiveResult=${this.getInteractiveResult(result)}
267
+ .linkContent=${this.getLinkContent(result)}
268
+ .loadingFlag=${this.loadingFlag}
269
+ .result=${result}
270
+ .renderingFunction=${this.itemRenderingFunction}
271
+ .store=${this.bindings.store}
272
+ ></atomic-result>`)}`);
273
+ })}`;
274
+ }
275
+ renderList() {
276
+ return html `${map(this.resultListState.results, (result, index) => {
277
+ return html `${keyed(this.getResultId(result), html `<atomic-result
278
+ part="outline"
279
+ ${ref((element) => element instanceof HTMLElement &&
280
+ this.resultListCommon.setNewResultRef(element, index))}
281
+ .content=${this.getContent(result)}
282
+ .density=${this.density}
283
+ .display=${this.display}
284
+ .imageSize=${this.imageSize}
285
+ .interactiveResult=${this.getInteractiveResult(result)}
286
+ .linkContent=${this.getLinkContent(result)}
287
+ .loadingFlag=${this.loadingFlag}
288
+ .result=${result}
289
+ .renderingFunction=${this.itemRenderingFunction}
290
+ .store=${this.bindings.store}
291
+ ></atomic-result>`)}`;
292
+ })}`;
293
+ }
294
+ renderTable() {
295
+ return html `${when(this.resultListState.hasResults, () => {
296
+ const firstItem = this.resultListState.results[0];
297
+ const listClasses = this.computeListDisplayClasses();
298
+ const templateContentForFirstItem = this.resultTemplateProvider.getTemplateContent(firstItem);
299
+ return renderTableLayout({
300
+ props: {
301
+ firstItem,
302
+ host: this,
303
+ itemRenderingFunction: this.itemRenderingFunction,
304
+ listClasses,
305
+ logger: this.bindings.engine.logger,
306
+ templateContentForFirstItem,
307
+ },
308
+ })(html `${map(this.resultListState.results, (result, index) => {
309
+ return renderTableRow({
310
+ props: {
311
+ key: this.getResultId(result),
312
+ rowIndex: index,
313
+ setRef: (element) => {
314
+ element instanceof HTMLElement &&
315
+ this.resultListCommon.setNewResultRef(element, index);
316
+ },
317
+ },
318
+ })(renderTableData({
319
+ props: {
320
+ firstItem,
321
+ templateContentForFirstItem,
322
+ itemRenderingFunction: this.itemRenderingFunction,
323
+ key: this.getResultId(result),
324
+ renderItem: (content) => {
325
+ return html `<atomic-result
326
+ .content=${content}
327
+ .density=${this.density}
328
+ .display=${this.display}
329
+ .imageSize=${this.imageSize}
330
+ .interactiveResult=${this.getInteractiveResult(result)}
331
+ .linkContent=${this.getLinkContent(result)}
332
+ .loadingFlag=${this.loadingFlag}
333
+ .result=${result}
334
+ .renderingFunction=${this.itemRenderingFunction}
335
+ .store=${this.bindings.store}
336
+ ></atomic-result>`;
337
+ },
338
+ },
339
+ }));
340
+ })}`);
341
+ }, () => nothing)}`;
342
+ }
343
+ get focusTarget() {
344
+ if (!this.nextNewResultTarget) {
345
+ this.nextNewResultTarget = new FocusTargetController(this, this.bindings);
346
+ }
347
+ return this.nextNewResultTarget;
348
+ }
349
+ getLinkContent(result) {
350
+ return this.display === 'grid'
351
+ ? this.resultTemplateProvider.getLinkTemplateContent(result)
352
+ : this.resultTemplateProvider.getEmptyLinkTemplateContent();
353
+ }
354
+ getContent(result) {
355
+ return this.resultTemplateProvider.getTemplateContent(result);
356
+ }
357
+ getInteractiveResult(result) {
358
+ return buildInteractiveResult(this.bindings.engine, {
359
+ options: { result },
360
+ });
361
+ }
362
+ getResultId(result) {
363
+ return this.resultListCommon.getResultId(result.uniqueId, this.resultListState.searchResponseId, this.density, this.imageSize);
364
+ }
365
+ };
366
+ AtomicResultList.styles = [
367
+ placeholderStyles,
368
+ tableDisplayStyles,
369
+ listDisplayStyles,
370
+ gridDisplayStyles,
371
+ ];
372
+ __decorate([
373
+ state()
374
+ ], AtomicResultList.prototype, "bindings", void 0);
375
+ __decorate([
376
+ state()
377
+ ], AtomicResultList.prototype, "error", void 0);
378
+ __decorate([
379
+ state()
380
+ ], AtomicResultList.prototype, "isAppLoaded", void 0);
381
+ __decorate([
382
+ state()
383
+ ], AtomicResultList.prototype, "isEveryResultReady", void 0);
384
+ __decorate([
385
+ state()
386
+ ], AtomicResultList.prototype, "resultTemplateRegistered", void 0);
387
+ __decorate([
388
+ state()
389
+ ], AtomicResultList.prototype, "templateHasError", void 0);
390
+ __decorate([
391
+ bindStateToController('resultList'),
392
+ state()
393
+ ], AtomicResultList.prototype, "resultListState", void 0);
394
+ __decorate([
395
+ bindStateToController('resultsPerPage'),
396
+ state()
397
+ ], AtomicResultList.prototype, "resultsPerPageState", void 0);
398
+ __decorate([
399
+ bindStateToController('tabManager'),
400
+ state()
401
+ ], AtomicResultList.prototype, "tabManagerState", void 0);
402
+ __decorate([
403
+ property({ reflect: true, type: String })
404
+ ], AtomicResultList.prototype, "density", void 0);
405
+ __decorate([
406
+ property({ reflect: true, type: String })
407
+ ], AtomicResultList.prototype, "display", void 0);
408
+ __decorate([
409
+ property({ reflect: true, attribute: 'image-size', type: String })
410
+ ], AtomicResultList.prototype, "imageSize", void 0);
411
+ __decorate([
412
+ property({
413
+ attribute: 'tabs-included',
414
+ converter: arrayConverter,
415
+ type: Array,
416
+ })
417
+ ], AtomicResultList.prototype, "tabsIncluded", void 0);
418
+ __decorate([
419
+ property({
420
+ attribute: 'tabs-excluded',
421
+ converter: arrayConverter,
422
+ type: Array,
423
+ })
424
+ ], AtomicResultList.prototype, "tabsExcluded", void 0);
425
+ __decorate([
426
+ bindingGuard(),
427
+ errorGuard()
428
+ ], AtomicResultList.prototype, "render", null);
429
+ AtomicResultList = __decorate([
430
+ customElement('atomic-result-list'),
431
+ bindings(),
432
+ withTailwindStyles
433
+ ], AtomicResultList);
434
+ export { AtomicResultList };
@@ -14,6 +14,7 @@ import { mapProperty } from "../../../utils/props-utils";
14
14
  import "../../common/atomic-component-error/atomic-component-error";
15
15
  import { arrayConverter } from "../../../converters/array-converter";
16
16
  import { errorGuard } from "../../../decorators/error-guard";
17
+ import '../atomic-result/atomic-result';
17
18
  /**
18
19
  * A result template determines the format of the query results, depending on the conditions that are defined for each template.
19
20
  *
@@ -10,9 +10,9 @@ import i18next from 'i18next';
10
10
  import { css, html, LitElement } from 'lit';
11
11
  import { customElement, property, query, state } from 'lit/decorators.js';
12
12
  import { when } from 'lit/directives/when.js';
13
+ import { bindingsContext } from "../../common/context/bindings-context";
13
14
  import { InterfaceController, } from "../../common/interface/interface-controller";
14
15
  import { MobileBreakpointController } from "../../common/layout/mobile-breakpoint-controller";
15
- import { bindingsContext } from "../../context/bindings-context";
16
16
  import { errorSelector, firstSearchExecutedSelector, noResultsSelector, } from "../atomic-search-layout/search-layout";
17
17
  import { booleanConverter } from "../../../converters/boolean-converter";
18
18
  import { errorGuard } from "../../../decorators/error-guard";
@@ -7,6 +7,7 @@ export { AtomicQuerySummary } from './atomic-query-summary/atomic-query-summary.
7
7
  export { AtomicRelevanceInspector } from './atomic-relevance-inspector/atomic-relevance-inspector.js';
8
8
  export { AtomicResult } from './atomic-result/atomic-result.js';
9
9
  export { AtomicResultChildrenTemplate } from './atomic-result-children-template/atomic-result-children-template.js';
10
+ export { AtomicResultList } from './atomic-result-list/atomic-result-list.js';
10
11
  export { AtomicResultSectionActions } from './atomic-result-section-actions/atomic-result-section-actions.js';
11
12
  export { AtomicResultSectionBadges } from './atomic-result-section-badges/atomic-result-section-badges.js';
12
13
  export { AtomicResultSectionBottomMetadata } from './atomic-result-section-bottom-metadata/atomic-result-section-bottom-metadata.js';
@@ -8,6 +8,7 @@ export default {
8
8
  'atomic-relevance-inspector': async () => await import('./atomic-relevance-inspector/atomic-relevance-inspector.js'),
9
9
  'atomic-result': async () => await import('./atomic-result/atomic-result.js'),
10
10
  'atomic-result-children-template': async () => await import('./atomic-result-children-template/atomic-result-children-template.js'),
11
+ 'atomic-result-list': async () => await import('./atomic-result-list/atomic-result-list.js'),
11
12
  'atomic-result-section-actions': async () => await import('./atomic-result-section-actions/atomic-result-section-actions.js'),
12
13
  'atomic-result-section-badges': async () => await import('./atomic-result-section-badges/atomic-result-section-badges.js'),
13
14
  'atomic-result-section-bottom-metadata': async () => await import('./atomic-result-section-bottom-metadata/atomic-result-section-bottom-metadata.js'),
@@ -1,5 +1,5 @@
1
1
  import { ContextConsumer } from '@lit/context';
2
- import { bindingsContext } from '../components/context/bindings-context';
2
+ import { bindingsContext } from '../components/common/context/bindings-context';
3
3
  /**
4
4
  * A decorator that will initialize the component with the bindings provided by the bindings context.
5
5
  * It ensures that the component is initialized only once and that the language is updated when the language changes.
@@ -3,7 +3,7 @@ function getWindow() {
3
3
  }
4
4
  export function getAtomicEnvironment(headlessVersion) {
5
5
  return {
6
- version: "3.37.1",
6
+ version: "3.37.2",
7
7
  headlessVersion,
8
8
  };
9
9
  }
@@ -1 +1 @@
1
- {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAca,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,WAAmB,EAAE,UAAkB;QACjD,KAAK,CACH,QAAQ,WAAW,sCAAsC,UAAU,YAAY,CAChF,CAAC;KACH;;;ACfH,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;SAIpC,gBAAgB,CAAI,OAAgB,EAAE,UAAkB;IACtE,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM;QACpC,MAAM,KAAK,GAAG,gBAAgB,CAC5B,oBAAoB,EACpB,CAAC,IAAO;YACN,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;SACtB,CACF,CAAC;QACF,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;YACjC,MAAM,CACJ,IAAI,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,UAAU,CAAC,CACnE,CAAC;SACH;KACF,CAAC,CAAC;AACL;;ACrBA;;;;;;;;;;SAUgB,mBAAmB,CAAoB,OAAgB;IACrE,OAAO,gBAAgB,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACxD;;ACZA;;;;;;;;;;;;SAYgB,cAAc,CAAoB,OAAgB;IAChE,OAAO,WAAW,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACnD;;ACVA;;;;;;;;;MASa,iCAAiC,GAAG,CAI/C,KAA+D,EAC/D,OAAoB,EACpB,2BAA0E,iBAAiB;IAE3F,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,IAAI,CAAC,gBAAgB,EAAE;QACrB,MAAM,IAAI,KAAK,CACb,QAAQ,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,gFAAgF,wBAAwB,CAAC,IAAI,CACjJ,IAAI,CACL,EAAE,CACJ,CAAC;KACH;IACD,KAAK,2CAA2C,CAC9C,gBAAgB,EAChB,OAAO,EACP,KAAK,CACN,CAAC;AACJ,EAAE;AAEF,MAAM,iBAAiB,GAAG;IACxB,mBAAmB;IACnB,2BAA2B;IAC3B,4BAA4B;CACpB,CAAC;AAEX,MAAM,mBAAmB,GAAG,CAAC,SAAkB,KAC7C,gBAAgB,IAAK,SAAwB;IAC5C,SAAwB,CAAC,cAAc,YAAY,OAAO,CAAC;AAE9D,MAAM,2CAA2C,GAAG,OAIlD,gBAAyB,EACzB,OAAoB,EACpB,KAA+D;IAE/D,MAAM,cAAc,CAAC,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1E,IAAI,mBAAmB,CAAC,gBAAgB,CAAC,EAAE;QACzC,MAAM,gBAAgB,CAAC,cAAc,CAAC;KACvC;SAAM,IAAI,kBAAkB,IAAI,gBAAgB,EAAE;QACjD,MAAO,gBAAuC,CAAC,gBAAgB,EAAE,CAAC;KACnE;IACD,OAAO,CAAC,aAAa,CACnB,gBAAgB,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAC/D,CAAC;AACJ,CAAC;;;;","names":[],"sources":["src/components/common/item-list/context/item-context-controller.ts","src/components/common/item-list/fetch-item-context.ts","src/components/commerce/product-template-component-utils/context/fetch-product-context.ts","src/components/commerce/product-template-component-utils/context/stencil-product-template-decorators.tsx","src/components/common/suggestions/suggestions-events.ts"],"sourcesContent":["import type {LitElement, ReactiveController, ReactiveControllerHost} from 'lit';\nimport type {InitializableComponent} from '@/src/decorators/types.js';\nimport {buildCustomEvent} from '@/src/utils/event-utils';\n\ntype LitElementWithError = Omit<\n Pick<InitializableComponent, 'error'>,\n 'error'\n> &\n LitElement & {\n error: Error | null;\n };\n\nconst itemContextEventName = 'atomic/resolveResult';\n\nexport class MissingParentError extends Error {\n constructor(elementName: string, parentName: string) {\n super(\n `The \"${elementName}\" element must be the child of an \"${parentName}\" element.`\n );\n }\n}\n\nfunction extractFolded<T = Record<string, unknown>>(\n item: Record<string, unknown>,\n returnFolded: boolean\n): T {\n if (returnFolded) {\n if ('children' in item) {\n return item as T;\n } else {\n return {children: [], result: item} as T;\n }\n }\n\n if ('children' in item && 'result' in item) {\n return item.result as T;\n }\n return item as T;\n}\n\n/**\n * A reactive controller that manages item context data from parent components.\n * Handles fetching item data via custom events and manages error states.\n */\nexport class ItemContextController<T = Record<string, unknown>>\n implements ReactiveController\n{\n private host: ReactiveControllerHost & LitElementWithError;\n private parentName: string;\n private folded: boolean;\n private _item: T | null = null;\n private _error: MissingParentError | null = null;\n\n constructor(\n host: ReactiveControllerHost & LitElementWithError,\n options: {parentName?: string; folded?: boolean} = {}\n ) {\n this.host = host;\n this.parentName = options.parentName ?? 'atomic-result';\n this.folded = options.folded ?? false;\n host.addController(this);\n }\n\n get item(): T | null {\n return this._error ? null : this._item;\n }\n\n get error(): MissingParentError | null {\n return this._error;\n }\n\n get hasError(): boolean {\n return this._error !== null;\n }\n\n hostConnected(): void {\n this._resolveItemContext();\n }\n\n private _resolveItemContext(): void {\n const event = buildCustomEvent(\n itemContextEventName,\n (item: Record<string, unknown>) => {\n this._item = extractFolded<T>(item, this.folded);\n this._error = null;\n this.host.error = null;\n this.host.requestUpdate();\n }\n );\n\n const canceled = this.host.dispatchEvent(event);\n if (canceled) {\n const elementName = (this.host as Element).nodeName.toLowerCase();\n this._error = new MissingParentError(elementName, this.parentName);\n this._item = null;\n this.host.error = this._error;\n this.host.requestUpdate();\n }\n }\n}\n\ntype ItemContextEventHandler<T> = (item: T) => void;\nexport type ItemContextEvent<T> = CustomEvent<ItemContextEventHandler<T>>;\n","import {closest} from '../../../utils/dom-utils.js';\nimport {buildCustomEvent} from '../../../utils/event-utils.js';\nimport {MissingParentError} from './context/item-context-controller.js';\n\nconst itemContextEventName = 'atomic/resolveResult';\n\ntype ItemContextEventHandler<T> = (item: T) => void;\n\nexport function fetchItemContext<T>(element: Element, parentName: string) {\n return new Promise<T>((resolve, reject) => {\n const event = buildCustomEvent<ItemContextEventHandler<T>>(\n itemContextEventName,\n (item: T) => {\n return resolve(item);\n }\n );\n element.dispatchEvent(event);\n\n if (!closest(element, parentName)) {\n reject(\n new MissingParentError(element.nodeName.toLowerCase(), parentName)\n );\n }\n });\n}\n","import type {Product} from '@coveo/headless/commerce';\nimport {fetchItemContext} from '@/src/components/common/item-list/fetch-item-context';\n\n/**\n * Retrieves `Product` on a rendered `atomic-product`.\n *\n * This utility function is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.\n *\n * You should use the utility function in the [`connectedCallback` lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element - The element that the event is dispatched to, which must be the child of a rendered `atomic-product`.\n * @returns A promise that resolves on initialization of the parent `atomic-product` element, or rejects when there is no parent `atomic-product` element.\n */\nexport function fetchProductContext<T extends Product>(element: Element) {\n return fetchItemContext<T>(element, 'atomic-product');\n}\n","import {Product} from '@coveo/headless/commerce';\nimport {itemContext} from '@/src/components/common/item-list/stencil-item-decorators';\n\n/**\n * Retrieves `Product` on a rendered `atomic-product`.\n *\n * This method is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.\n *\n * You should use the method in the [connectedCallback lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element - The element that the event is dispatched to, which must be the child of a rendered \"atomic-product\".\n * @returns A promise that resolves on initialization of the parent \"atomic-product\" element, or rejects when there is no parent \"atomic-product\" element.\n *\n * @deprecated should only be used for Stencil components. For Lit components, use `fetchProductContext` from \\@/src/components/commerce/product-template-component-utils/context/fetch-product-context.ts\n */\nexport function productContext<T extends Product>(element: Element) {\n return itemContext<T>(element, 'atomic-product');\n}\n","import type {HTMLStencilElement} from '@stencil/core/internal';\nimport type {LitElement} from 'lit';\nimport {closest} from '../../../utils/dom-utils';\nimport {buildCustomEvent} from '../../../utils/event-utils';\nimport type {AnyBindings} from '../interface/bindings';\nimport type {SearchBoxSuggestionsEvent} from './suggestions-types';\n\n/**\n * Dispatches an event which retrieves the `SearchBoxSuggestionsBindings` on a configured parent search box.\n *\n * @param event Event sent from the registered query suggestions to the parent search box\n * @param element Element on which to dispatch the event, which must be the child of a configured search box\n * @param allowedSearchBoxElements Optional array of allowed search box element selectors\n *\n * @throws Error if the element is not a child of an allowed search box element\n */\nexport const dispatchSearchBoxSuggestionsEvent = <\n SearchBoxController,\n Bindings = AnyBindings,\n>(\n event: SearchBoxSuggestionsEvent<SearchBoxController, Bindings>,\n element: HTMLElement,\n allowedSearchBoxElements: readonly (typeof searchBoxElements)[number][] = searchBoxElements\n) => {\n const interfaceElement = closest(element, searchBoxElements.join(', '));\n if (!interfaceElement) {\n throw new Error(\n `The \"${element.nodeName.toLowerCase()}\" component was not handled, as it is not a child of the following elements: ${allowedSearchBoxElements.join(\n ', '\n )}`\n );\n }\n void dispatchSearchBoxSuggestionsEventEventually(\n interfaceElement,\n element,\n event\n );\n};\n\nconst searchBoxElements = [\n 'atomic-search-box',\n 'atomic-insight-search-box',\n 'atomic-commerce-search-box',\n] as const;\n\nconst isLitElementLoosely = (candidate: unknown): candidate is LitElement =>\n 'updateComplete' in (candidate as LitElement) &&\n (candidate as LitElement).updateComplete instanceof Promise;\n\nconst dispatchSearchBoxSuggestionsEventEventually = async <\n SearchBoxController,\n Bindings = AnyBindings,\n>(\n interfaceElement: Element,\n element: HTMLElement,\n event: SearchBoxSuggestionsEvent<SearchBoxController, Bindings>\n) => {\n await customElements.whenDefined(interfaceElement.nodeName.toLowerCase());\n if (isLitElementLoosely(interfaceElement)) {\n await interfaceElement.updateComplete;\n } else if ('componentOnReady' in interfaceElement) {\n await (interfaceElement as HTMLStencilElement).componentOnReady();\n }\n element.dispatchEvent(\n buildCustomEvent('atomic/searchBoxSuggestion/register', event)\n );\n};\n"],"version":3}
1
+ {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAca,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,WAAmB,EAAE,UAAkB;QACjD,KAAK,CACH,QAAQ,WAAW,sCAAsC,UAAU,YAAY,CAChF,CAAC;KACH;;;ACfH,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;SAIpC,gBAAgB,CAAI,OAAgB,EAAE,UAAkB;IACtE,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM;QACpC,MAAM,KAAK,GAAG,gBAAgB,CAC5B,oBAAoB,EACpB,CAAC,IAAO;YACN,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;SACtB,CACF,CAAC;QACF,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;YACjC,MAAM,CACJ,IAAI,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,UAAU,CAAC,CACnE,CAAC;SACH;KACF,CAAC,CAAC;AACL;;ACrBA;;;;;;;;;;SAUgB,mBAAmB,CAAoB,OAAgB;IACrE,OAAO,gBAAgB,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACxD;;ACZA;;;;;;;;;;;;SAYgB,cAAc,CAAoB,OAAgB;IAChE,OAAO,WAAW,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACnD;;ACVA;;;;;;;;;MASa,iCAAiC,GAAG,CAI/C,KAA+D,EAC/D,OAAoB,EACpB,2BAA0E,iBAAiB;IAE3F,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,IAAI,CAAC,gBAAgB,EAAE;QACrB,MAAM,IAAI,KAAK,CACb,QAAQ,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,gFAAgF,wBAAwB,CAAC,IAAI,CACjJ,IAAI,CACL,EAAE,CACJ,CAAC;KACH;IACD,KAAK,2CAA2C,CAC9C,gBAAgB,EAChB,OAAO,EACP,KAAK,CACN,CAAC;AACJ,EAAE;AAEF,MAAM,iBAAiB,GAAG;IACxB,mBAAmB;IACnB,2BAA2B;IAC3B,4BAA4B;CACpB,CAAC;AAEX,MAAM,mBAAmB,GAAG,CAAC,SAAkB,KAC7C,gBAAgB,IAAK,SAAwB;IAC5C,SAAwB,CAAC,cAAc,YAAY,OAAO,CAAC;AAE9D,MAAM,2CAA2C,GAAG,OAIlD,gBAAyB,EACzB,OAAoB,EACpB,KAA+D;IAE/D,MAAM,cAAc,CAAC,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1E,IAAI,mBAAmB,CAAC,gBAAgB,CAAC,EAAE;QACzC,MAAM,gBAAgB,CAAC,cAAc,CAAC;KACvC;SAAM,IAAI,kBAAkB,IAAI,gBAAgB,EAAE;QACjD,MAAO,gBAAuC,CAAC,gBAAgB,EAAE,CAAC;KACnE;IACD,OAAO,CAAC,aAAa,CACnB,gBAAgB,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAC/D,CAAC;AACJ,CAAC;;;;","names":[],"sources":["src/components/common/item-list/context/item-context-controller.ts","src/components/common/item-list/fetch-item-context.ts","src/components/commerce/product-template-component-utils/context/fetch-product-context.ts","src/components/commerce/product-template-component-utils/context/stencil-product-template-decorators.tsx","src/components/common/suggestions/suggestions-events.ts"],"sourcesContent":["import type {LitElement, ReactiveController, ReactiveControllerHost} from 'lit';\nimport type {InitializableComponent} from '@/src/decorators/types.js';\nimport {buildCustomEvent} from '@/src/utils/event-utils';\n\ntype LitElementWithError = Omit<\n Pick<InitializableComponent, 'error'>,\n 'error'\n> &\n LitElement & {\n error: Error | null;\n };\n\nconst itemContextEventName = 'atomic/resolveResult';\n\nexport class MissingParentError extends Error {\n constructor(elementName: string, parentName: string) {\n super(\n `The \"${elementName}\" element must be the child of an \"${parentName}\" element.`\n );\n }\n}\n\nfunction extractFolded<T = Record<string, unknown>>(\n item: Record<string, unknown>,\n returnFolded: boolean\n): T {\n if (returnFolded) {\n if ('children' in item) {\n return item as T;\n } else {\n return {children: [], result: item} as T;\n }\n }\n\n if ('children' in item && 'result' in item) {\n return item.result as T;\n }\n return item as T;\n}\n\n/**\n * A reactive controller that manages item context data from parent components.\n * Handles fetching item data via custom events and manages error states.\n */\nexport class ItemContextController<T = Record<string, unknown>>\n implements ReactiveController\n{\n private host: ReactiveControllerHost & LitElementWithError;\n private parentName: string;\n private folded: boolean;\n private _item: T | null = null;\n private _error: MissingParentError | null = null;\n\n constructor(\n host: ReactiveControllerHost & LitElementWithError,\n options: {parentName?: string; folded?: boolean} = {}\n ) {\n this.host = host;\n this.parentName = options.parentName ?? 'atomic-result';\n this.folded = options.folded ?? false;\n host.addController(this);\n }\n\n get item(): T | null {\n return this._error ? null : this._item;\n }\n\n get error(): MissingParentError | null {\n return this._error;\n }\n\n get hasError(): boolean {\n return this._error !== null;\n }\n\n hostConnected(): void {\n this._resolveItemContext();\n }\n\n private _resolveItemContext(): void {\n const event = buildCustomEvent(\n itemContextEventName,\n (item: Record<string, unknown>) => {\n this._item = extractFolded<T>(item, this.folded);\n this._error = null;\n this.host.error = null;\n this.host.requestUpdate();\n }\n );\n\n const canceled = this.host.dispatchEvent(event);\n if (canceled) {\n const elementName = (this.host as Element).nodeName.toLowerCase();\n this._error = new MissingParentError(elementName, this.parentName);\n this._item = null;\n this.host.error = this._error;\n this.host.requestUpdate();\n }\n }\n}\n\ntype ItemContextEventHandler<T> = (item: T) => void;\nexport type ItemContextEvent<T> = CustomEvent<ItemContextEventHandler<T>>;\n","import {closest} from '../../../utils/dom-utils.js';\nimport {buildCustomEvent} from '../../../utils/event-utils.js';\nimport {MissingParentError} from './context/item-context-controller.js';\n\nconst itemContextEventName = 'atomic/resolveResult';\n\ntype ItemContextEventHandler<T> = (item: T) => void;\n\nexport function fetchItemContext<T>(element: Element, parentName: string) {\n return new Promise<T>((resolve, reject) => {\n const event = buildCustomEvent<ItemContextEventHandler<T>>(\n itemContextEventName,\n (item: T) => {\n return resolve(item);\n }\n );\n element.dispatchEvent(event);\n\n if (!closest(element, parentName)) {\n reject(\n new MissingParentError(element.nodeName.toLowerCase(), parentName)\n );\n }\n });\n}\n","import type {Product} from '@coveo/headless/commerce';\nimport {fetchItemContext} from '@/src/components/common/item-list/fetch-item-context';\n\n/**\n * Retrieves `Product` on a rendered `atomic-product`.\n *\n * This utility function is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.\n *\n * You should use the utility function in the [`connectedCallback` lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element - The element that the event is dispatched to, which must be the child of a rendered `atomic-product`.\n * @returns A promise that resolves on initialization of the parent `atomic-product` element, or rejects when there is no parent `atomic-product` element.\n */\nexport function fetchProductContext<T extends Product>(element: Element) {\n return fetchItemContext<T>(element, 'atomic-product');\n}\n","import {Product} from '@coveo/headless/commerce';\nimport {itemContext} from '@/src/components/common/item-list/stencil-item-decorators';\n\n/**\n * Retrieves `Product` on a rendered `atomic-product`.\n *\n * This method is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.\n *\n * You should use the method in the [connectedCallback lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element - The element that the event is dispatched to, which must be the child of a rendered \"atomic-product\".\n * @returns A promise that resolves on initialization of the parent \"atomic-product\" element, or rejects when there is no parent \"atomic-product\" element.\n *\n * @deprecated should only be used for Stencil components. For Lit components, use `fetchProductContext` from \\@/src/components/commerce/product-template-component-utils/context/fetch-product-context.ts\n */\nexport function productContext<T extends Product>(element: Element) {\n return itemContext<T>(element, 'atomic-product');\n}\n","import type {HTMLStencilElement} from '@stencil/core/internal';\nimport type {LitElement} from 'lit';\nimport {closest} from '../../../utils/dom-utils';\nimport {buildCustomEvent} from '../../../utils/event-utils';\nimport type {AnyBindings} from '../interface/bindings';\nimport type {SearchBoxSuggestionsEvent} from './suggestions-types';\n\n/**\n * Dispatches an event which retrieves the `SearchBoxSuggestionsBindings` on a configured parent search box.\n *\n * @param event Event sent from the registered query suggestions to the parent search box\n * @param element Element on which to dispatch the event, which must be the child of a configured search box\n * @param allowedSearchBoxElements Optional array of allowed search box element selectors\n *\n * @throws Error if the element is not a child of an allowed search box element\n */\nexport const dispatchSearchBoxSuggestionsEvent = <\n SearchBoxController,\n Bindings = AnyBindings,\n>(\n event: SearchBoxSuggestionsEvent<SearchBoxController, Bindings>,\n element: HTMLElement,\n allowedSearchBoxElements: readonly (typeof searchBoxElements)[number][] = searchBoxElements\n) => {\n const interfaceElement = closest(element, searchBoxElements.join(', '));\n if (!interfaceElement) {\n throw new Error(\n `The \"${element.nodeName.toLowerCase()}\" component was not handled, as it is not a child of the following elements: ${allowedSearchBoxElements.join(\n ', '\n )}`\n );\n }\n void dispatchSearchBoxSuggestionsEventEventually(\n interfaceElement,\n element,\n event\n );\n};\n\nconst searchBoxElements = [\n 'atomic-search-box',\n 'atomic-insight-search-box',\n 'atomic-commerce-search-box',\n] as const;\n\nconst isLitElementLoosely = (candidate: unknown): candidate is LitElement =>\n 'updateComplete' in (candidate as LitElement) &&\n (candidate as LitElement).updateComplete instanceof Promise;\n\nconst dispatchSearchBoxSuggestionsEventEventually = async <\n SearchBoxController,\n Bindings = AnyBindings,\n>(\n interfaceElement: Element,\n element: HTMLElement,\n event: SearchBoxSuggestionsEvent<SearchBoxController, Bindings>\n) => {\n await customElements.whenDefined(interfaceElement.nodeName.toLowerCase());\n if (isLitElementLoosely(interfaceElement)) {\n await interfaceElement.updateComplete;\n } else if ('componentOnReady' in interfaceElement) {\n await (interfaceElement as HTMLStencilElement).componentOnReady();\n }\n element.dispatchEvent(\n buildCustomEvent('atomic/searchBoxSuggestion/register', event)\n );\n};\n"],"version":3}
@@ -2,6 +2,21 @@ import { h, Fragment } from '@stencil/core/internal/client';
2
2
  import { A as ArrowRight } from './arrow-right.js';
3
3
  import { B as Button } from './stencil-button.js';
4
4
 
5
+ // The Lit equivalent of this file is grid-layout.ts
6
+ /**
7
+ * @deprecated should only be used for Stencil components.
8
+ */
9
+ const DisplayGrid = ({ setRef, selectorForItem }, children) => {
10
+ let ref;
11
+ return (h("div", { part: "result-list-grid-clickable-container outline", ref: (element) => {
12
+ ref = element;
13
+ setRef(element);
14
+ }, onClick: (event) => {
15
+ event.preventDefault();
16
+ ref?.querySelector(selectorForItem)?.click();
17
+ } }, ...children));
18
+ };
19
+
5
20
  /**
6
21
  * @deprecated should only be used for Stencil components.
7
22
  */
@@ -30,6 +45,6 @@ const Carousel = (props, children) => {
30
45
  renderIndicators()));
31
46
  };
32
47
 
33
- export { Carousel as C };
48
+ export { Carousel as C, DisplayGrid as D };
34
49
 
35
50
  //# sourceMappingURL=stencil-carousel.js.map
@@ -1 +1 @@
1
- {"file":"stencil-carousel.js","mappings":";;;;AAcA;;;MAGa,QAAQ,GAEjB,CAAC,KAAK,EAAE,QAAQ;IAClB,MAAM,uBAAuB,GAC3B,kGAAkG,CAAC;IACrG,MAAM,kBAAkB,GACtB,+FAA+F,CAAC;IAElG,SAAS,oBAAoB;QAC3B,QACE,EAAC,MAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,EAC5C,OAAO,EAAE,MAAM,KAAK,CAAC,YAAY,EAAE,EACnC,IAAI,EAAC,iBAAiB,EACtB,KAAK,EAAE,GAAG,uBAAuB,mBAAmB;YAEpD,mBACE,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,GAAG,kBAAkB,aAAa,GAC5B,CACR,EACT;KACH;IAED,SAAS,gBAAgB;QACvB,QACE,EAAC,MAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EACxC,OAAO,EAAE,MAAM,KAAK,CAAC,QAAQ,EAAE,EAC/B,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,GAAG,uBAAuB,0BAA0B;YAE3D,mBAAa,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,kBAAkB,GAAgB,CACjE,EACT;KACH;IAED,SAAS,gBAAgB;QACvB,QACE,UAAI,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,gCAAgC,IACzD,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,KAAK,CAAC,aAAa,EAAC,EAAE,CAAC,CAAC,EAAE,KAAK;YAClD,MAAM,QAAQ,GAAG,KAAK,KAAK,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC;YACnE,QACE,UACE,IAAI,EAAE,aAAa,QAAQ,GAAG,kBAAkB,GAAG,EAAE,EAAE,EACvD,KAAK,EAAE,uBACL,QAAQ,GAAG,YAAY,GAAG,YAC5B,GAAG,GACC,EACN;SACH,CAAC,CACC,EACL;KACH;IAED,QACE,EAAC,QAAQ;QACP,WAAK,KAAK,EAAC,UAAU;YAClB,oBAAoB,EAAE;YACtB,QAAQ;YACR,gBAAgB,EAAE,CACf;QACL,gBAAgB,EAAE,CACV,EACX;AACJ;;;;","names":[],"sources":["src/components/common/stencil-carousel.tsx"],"sourcesContent":["import {h, FunctionalComponent, Fragment} from '@stencil/core';\nimport {JSXBase} from '@stencil/core/internal';\nimport ArrowRight from '../../images/arrow-right.svg';\nimport {AnyBindings} from './interface/bindings.js';\nimport {Button} from './stencil-button.js';\n\ninterface CarouselProps {\n bindings: AnyBindings;\n previousPage(): void;\n nextPage(): void;\n numberOfPages: number;\n currentPage: number;\n}\n\n/**\n * @deprecated should only be used for Stencil components.\n */\nexport const Carousel: FunctionalComponent<\n CarouselProps & JSXBase.HTMLAttributes<HTMLHeadingElement>\n> = (props, children) => {\n const commonPaginationClasses =\n 'w-10 h-10 grid justify-center items-center absolute top-1/2 -translate-y-1/2 z-1 shadow-lg group';\n const commonArrowClasses =\n 'w-3.5 align-middle text-on-background group-hover:text-primary group-focus:text-primary-light';\n\n function renderPreviousButton() {\n return (\n <Button\n style=\"outline-primary\"\n ariaLabel={props.bindings.i18n.t('previous')}\n onClick={() => props.previousPage()}\n part=\"previous-button\"\n class={`${commonPaginationClasses} -translate-x-1/2`}\n >\n <atomic-icon\n icon={ArrowRight}\n class={`${commonArrowClasses} rotate-180`}\n ></atomic-icon>\n </Button>\n );\n }\n\n function renderNextButton() {\n return (\n <Button\n style=\"outline-primary\"\n ariaLabel={props.bindings.i18n.t('next')}\n onClick={() => props.nextPage()}\n part=\"next-button\"\n class={`${commonPaginationClasses} right-0 translate-x-1/2`}\n >\n <atomic-icon icon={ArrowRight} class={commonArrowClasses}></atomic-icon>\n </Button>\n );\n }\n\n function renderIndicators() {\n return (\n <ul part=\"indicators\" class=\"mt-6 flex justify-center gap-2\">\n {Array.from({length: props.numberOfPages}, (_, index) => {\n const isActive = index === props.currentPage % props.numberOfPages;\n return (\n <li\n part={`indicator ${isActive ? 'active-indicator' : ''}`}\n class={`h-1 w-12 rounded-md ${\n isActive ? 'bg-primary' : 'bg-neutral'\n } `}\n ></li>\n );\n })}\n </ul>\n );\n }\n\n return (\n <Fragment>\n <div class=\"relative\">\n {renderPreviousButton()}\n {children}\n {renderNextButton()}\n </div>\n {renderIndicators()}\n </Fragment>\n );\n};\n"],"version":3}
1
+ {"file":"stencil-carousel.js","mappings":";;;;AAAA;AAYA;;;MAGa,WAAW,GAA0C,CAChE,EAAC,MAAM,EAAE,eAAe,EAAC,EACzB,QAAQ;IAER,IAAI,GAA4B,CAAC;IACjC,QACE,WACE,IAAI,EAAC,8CAA8C,EACnD,GAAG,EAAE,CAAC,OAAO;YACX,GAAG,GAAG,OAAO,CAAC;YACd,MAAM,CAAC,OAAO,CAAC,CAAC;SACjB,EACD,OAAO,EAAE,CAAC,KAAK;YACb,KAAK,CAAC,cAAc,EAAE,CAAC;YACtB,GAAG,EAAE,aAAa,CAAC,eAAe,CAAiB,EAAE,KAAK,EAAE,CAAC;SAC/D,OAEG,QAAQ,CACR,EACN;AACJ;;ACrBA;;;MAGa,QAAQ,GAEjB,CAAC,KAAK,EAAE,QAAQ;IAClB,MAAM,uBAAuB,GAC3B,kGAAkG,CAAC;IACrG,MAAM,kBAAkB,GACtB,+FAA+F,CAAC;IAElG,SAAS,oBAAoB;QAC3B,QACE,EAAC,MAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,EAC5C,OAAO,EAAE,MAAM,KAAK,CAAC,YAAY,EAAE,EACnC,IAAI,EAAC,iBAAiB,EACtB,KAAK,EAAE,GAAG,uBAAuB,mBAAmB;YAEpD,mBACE,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,GAAG,kBAAkB,aAAa,GAC5B,CACR,EACT;KACH;IAED,SAAS,gBAAgB;QACvB,QACE,EAAC,MAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EACxC,OAAO,EAAE,MAAM,KAAK,CAAC,QAAQ,EAAE,EAC/B,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,GAAG,uBAAuB,0BAA0B;YAE3D,mBAAa,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,kBAAkB,GAAgB,CACjE,EACT;KACH;IAED,SAAS,gBAAgB;QACvB,QACE,UAAI,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,gCAAgC,IACzD,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,KAAK,CAAC,aAAa,EAAC,EAAE,CAAC,CAAC,EAAE,KAAK;YAClD,MAAM,QAAQ,GAAG,KAAK,KAAK,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC;YACnE,QACE,UACE,IAAI,EAAE,aAAa,QAAQ,GAAG,kBAAkB,GAAG,EAAE,EAAE,EACvD,KAAK,EAAE,uBACL,QAAQ,GAAG,YAAY,GAAG,YAC5B,GAAG,GACC,EACN;SACH,CAAC,CACC,EACL;KACH;IAED,QACE,EAAC,QAAQ;QACP,WAAK,KAAK,EAAC,UAAU;YAClB,oBAAoB,EAAE;YACtB,QAAQ;YACR,gBAAgB,EAAE,CACf;QACL,gBAAgB,EAAE,CACV,EACX;AACJ;;;;","names":[],"sources":["src/components/common/item-list/stencil-display-grid.tsx","src/components/common/stencil-carousel.tsx"],"sourcesContent":["// The Lit equivalent of this file is grid-layout.ts\nimport {FunctionalComponent, h} from '@stencil/core';\n\ninterface DisplayGridProps {\n selectorForItem: string;\n item: {clickUri: string; title: string};\n setRef: (element?: HTMLElement) => void;\n select: () => void;\n beginDelayedSelect: () => void;\n cancelPendingSelect: () => void;\n}\n\n/**\n * @deprecated should only be used for Stencil components.\n */\nexport const DisplayGrid: FunctionalComponent<DisplayGridProps> = (\n {setRef, selectorForItem},\n children\n) => {\n let ref: HTMLElement | undefined;\n return (\n <div\n part=\"result-list-grid-clickable-container outline\"\n ref={(element) => {\n ref = element;\n setRef(element);\n }}\n onClick={(event) => {\n event.preventDefault();\n (ref?.querySelector(selectorForItem) as HTMLElement)?.click();\n }}\n >\n {...children}\n </div>\n );\n};\n","import {h, FunctionalComponent, Fragment} from '@stencil/core';\nimport {JSXBase} from '@stencil/core/internal';\nimport ArrowRight from '../../images/arrow-right.svg';\nimport {AnyBindings} from './interface/bindings.js';\nimport {Button} from './stencil-button.js';\n\ninterface CarouselProps {\n bindings: AnyBindings;\n previousPage(): void;\n nextPage(): void;\n numberOfPages: number;\n currentPage: number;\n}\n\n/**\n * @deprecated should only be used for Stencil components.\n */\nexport const Carousel: FunctionalComponent<\n CarouselProps & JSXBase.HTMLAttributes<HTMLHeadingElement>\n> = (props, children) => {\n const commonPaginationClasses =\n 'w-10 h-10 grid justify-center items-center absolute top-1/2 -translate-y-1/2 z-1 shadow-lg group';\n const commonArrowClasses =\n 'w-3.5 align-middle text-on-background group-hover:text-primary group-focus:text-primary-light';\n\n function renderPreviousButton() {\n return (\n <Button\n style=\"outline-primary\"\n ariaLabel={props.bindings.i18n.t('previous')}\n onClick={() => props.previousPage()}\n part=\"previous-button\"\n class={`${commonPaginationClasses} -translate-x-1/2`}\n >\n <atomic-icon\n icon={ArrowRight}\n class={`${commonArrowClasses} rotate-180`}\n ></atomic-icon>\n </Button>\n );\n }\n\n function renderNextButton() {\n return (\n <Button\n style=\"outline-primary\"\n ariaLabel={props.bindings.i18n.t('next')}\n onClick={() => props.nextPage()}\n part=\"next-button\"\n class={`${commonPaginationClasses} right-0 translate-x-1/2`}\n >\n <atomic-icon icon={ArrowRight} class={commonArrowClasses}></atomic-icon>\n </Button>\n );\n }\n\n function renderIndicators() {\n return (\n <ul part=\"indicators\" class=\"mt-6 flex justify-center gap-2\">\n {Array.from({length: props.numberOfPages}, (_, index) => {\n const isActive = index === props.currentPage % props.numberOfPages;\n return (\n <li\n part={`indicator ${isActive ? 'active-indicator' : ''}`}\n class={`h-1 w-12 rounded-md ${\n isActive ? 'bg-primary' : 'bg-neutral'\n } `}\n ></li>\n );\n })}\n </ul>\n );\n }\n\n return (\n <Fragment>\n <div class=\"relative\">\n {renderPreviousButton()}\n {children}\n {renderNextButton()}\n </div>\n {renderIndicators()}\n </Fragment>\n );\n};\n"],"version":3}
@@ -15,4 +15,4 @@ const FacetPlaceholder = ({ numberOfValues, isCollapsed, }) => {
15
15
 
16
16
  export { FacetPlaceholder as F };
17
17
 
18
- //# sourceMappingURL=facet-placeholder.js.map
18
+ //# sourceMappingURL=stencil-facet-placeholder.js.map
@@ -0,0 +1 @@
1
+ {"file":"stencil-facet-placeholder.js","mappings":";;AAOA;;;MAGa,gBAAgB,GAA+C,CAAC,EAC3E,cAAc,EACd,WAAW,GACZ;IACC,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;QACvC,WAAW,CAAC,IAAI,CACd,WACE,KAAK,EAAC,0BAA0B,EAChC,KAAK,EAAE,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAC,GACjC,CACR,CAAC;KACH;IAED,QACE,WACE,IAAI,EAAC,aAAa,EAClB,KAAK,EAAC,uEAAuE,iBACjE,MAAM;QAElB,WAAK,KAAK,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAC,KAAK,EAAE,KAAK,EAAC,GAAQ;QAChE,CAAC,WAAW,IAAI,WAAK,KAAK,EAAC,MAAM,IAAE,WAAW,CAAO,CAClD,EACN;AACJ;;;;","names":[],"sources":["src/components/common/facets/facet-placeholder/stencil-facet-placeholder.tsx"],"sourcesContent":["import {FunctionalComponent, h} from '@stencil/core';\n\ninterface FacetPlaceholderProps {\n numberOfValues: number;\n isCollapsed: boolean;\n}\n\n/**\n * @deprecated should only be used for Stencil components.\n */\nexport const FacetPlaceholder: FunctionalComponent<FacetPlaceholderProps> = ({\n numberOfValues,\n isCollapsed,\n}) => {\n const facetValues = [];\n for (let i = 0; i < numberOfValues; i++) {\n facetValues.push(\n <div\n class=\"bg-neutral mt-4 flex h-5\"\n style={{width: '100%', opacity: '0.5'}}\n ></div>\n );\n }\n\n return (\n <div\n part=\"placeholder\"\n class=\"bg-background border-neutral mb-4 animate-pulse rounded-lg border p-7\"\n aria-hidden=\"true\"\n >\n <div class=\"bg-neutral h-8 rounded\" style={{width: '75%'}}></div>\n {!isCollapsed && <div class=\"mt-7\">{facetValues}</div>}\n </div>\n );\n};\n"],"version":3}
@@ -1,9 +1,10 @@
1
1
  import { ResultTemplatesHelpers } from '@coveo/headless';
2
2
  import { h } from '@stencil/core/internal/client';
3
3
  import { m as aggregate, n as isVisualNode, q as isElementNode } from './utils.js';
4
- import { t as tableElementTagName } from './table-element-utils.js';
5
4
  import { i as isResultSectionNode } from './item-layout-sections.js';
6
5
 
6
+ const tableElementTagName = 'atomic-table-element';
7
+
7
8
  function getTemplateNodeType(node) {
8
9
  if (isResultSectionNode(node)) {
9
10
  return 'section';