@coveo/atomic 3.34.0-pre.4c6dc408dd → 3.34.0-pre.4f2ee671ee

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 (371) 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 -20
  4. package/dist/atomic/components/_index.js +0 -10
  5. package/dist/atomic/components/analytics-config.js +1 -1
  6. package/dist/atomic/components/atomic-focus-trap2.js +1 -1
  7. package/dist/atomic/components/atomic-folded-result-list.js +4 -40
  8. package/dist/atomic/components/atomic-folded-result-list.js.map +1 -1
  9. package/dist/atomic/components/atomic-insight-folded-result-list.js +4 -40
  10. package/dist/atomic/components/atomic-insight-folded-result-list.js.map +1 -1
  11. package/dist/atomic/components/atomic-insight-history-toggle.js +2 -2
  12. package/dist/atomic/components/atomic-insight-history-toggle.js.map +1 -1
  13. package/dist/atomic/components/atomic-insight-result-action-bar.js +5 -1
  14. package/dist/atomic/components/atomic-insight-result-action-bar.js.map +1 -1
  15. package/dist/atomic/components/atomic-insight-result-children.js +4 -40
  16. package/dist/atomic/components/atomic-insight-result-children.js.map +1 -1
  17. package/dist/atomic/components/atomic-insight-result-list.js +4 -40
  18. package/dist/atomic/components/atomic-insight-result-list.js.map +1 -1
  19. package/dist/atomic/components/atomic-insight-user-actions-toggle.js +2 -2
  20. package/dist/atomic/components/atomic-insight-user-actions-toggle.js.map +1 -1
  21. package/dist/atomic/components/atomic-ipx-recs-list.js +4 -40
  22. package/dist/atomic/components/atomic-ipx-recs-list.js.map +1 -1
  23. package/dist/{esm/sections-ae00b53a.js → atomic/components/atomic-layout-section-utils.js} +1 -1
  24. package/dist/atomic/components/atomic-layout-section-utils.js.map +1 -0
  25. package/dist/atomic/components/atomic-recs-list.js +4 -40
  26. package/dist/atomic/components/atomic-recs-list.js.map +1 -1
  27. package/dist/atomic/components/atomic-refine-modal2.js +3 -3
  28. package/dist/atomic/components/atomic-refine-modal2.js.map +1 -1
  29. package/dist/atomic/components/atomic-result-children.js +4 -40
  30. package/dist/atomic/components/atomic-result-children.js.map +1 -1
  31. package/dist/atomic/components/atomic-result-list.js +4 -40
  32. package/dist/atomic/components/atomic-result-list.js.map +1 -1
  33. package/dist/atomic/components/atomic-result-placeholder2.js +1 -37
  34. package/dist/atomic/components/atomic-result-placeholder2.js.map +1 -1
  35. package/dist/atomic/components/atomic-search-box.js +2 -8
  36. package/dist/atomic/components/atomic-search-box.js.map +1 -1
  37. package/dist/atomic/components/atomic-smart-snippet-answer2.js +1 -1
  38. package/dist/atomic/components/atomic-smart-snippet-feedback-modal2.js +2 -2
  39. package/dist/atomic/components/atomic-tab-manager.js +1 -1
  40. package/dist/atomic/components/clock.js +2 -2
  41. package/dist/atomic/components/components/commerce/atomic-product/atomic-product.js +26 -58
  42. package/dist/atomic/components/components/common/atomic-layout-section/layout.js +1 -1
  43. package/dist/atomic/components/components/common/layout/custom-render-controller.js +37 -0
  44. package/dist/atomic/components/components/common/layout/display-options.js +1 -1
  45. package/dist/atomic/components/components/common/layout/item-layout-controller.js +103 -0
  46. package/dist/atomic/components/components/common/layout/{sections.js → item-layout-sections.js} +1 -1
  47. package/dist/atomic/components/components/common/product-template/product-template-common.js +1 -1
  48. package/dist/atomic/components/components/insight/atomic-insight-layout/insight-layout.js +1 -1
  49. package/dist/atomic/components/components/search/atomic-result-section-actions/atomic-result-section-actions.js +25 -0
  50. package/dist/atomic/components/components/search/atomic-result-section-badges/atomic-result-section-badges.js +24 -0
  51. package/dist/atomic/components/components/search/atomic-result-section-bottom-metadata/atomic-result-section-bottom-metadata.js +25 -0
  52. package/dist/atomic/components/components/search/atomic-result-section-children/atomic-result-section-children.js +21 -0
  53. package/dist/atomic/components/components/search/atomic-result-section-emphasized/atomic-result-section-emphasized.js +23 -0
  54. package/dist/atomic/components/components/search/atomic-result-section-excerpt/atomic-result-section-excerpt.js +24 -0
  55. package/dist/atomic/components/components/search/atomic-result-section-title/atomic-result-section-title.js +24 -0
  56. package/dist/atomic/components/components/search/atomic-result-section-title-metadata/atomic-result-section-title-metadata.js +24 -0
  57. package/dist/atomic/components/components/search/atomic-result-section-visual/atomic-result-section-visual.js +29 -0
  58. package/dist/atomic/components/components/search/atomic-search-box-recent-queries/atomic-search-box-recent-queries.js +137 -0
  59. package/dist/atomic/components/components/search/atomic-search-interface/atomic-search-interface.js +1 -5
  60. package/dist/atomic/components/components/search/index.js +10 -0
  61. package/dist/atomic/components/components/search/lazy-index.js +10 -0
  62. package/dist/atomic/components/display-options.js +1 -1
  63. package/dist/atomic/components/display-options.js.map +1 -1
  64. package/dist/atomic/components/global/environment.js +1 -1
  65. package/dist/atomic/components/index.js.map +1 -1
  66. package/dist/atomic/components/insight-layout.js +1 -1
  67. package/dist/atomic/components/insight-layout.js.map +1 -1
  68. package/dist/atomic/components/{sections2.js → item-layout-sections.js} +2 -2
  69. package/dist/atomic/components/item-layout-sections.js.map +1 -0
  70. package/dist/atomic/components/props-utils.js +1 -1
  71. package/dist/atomic/components/result-template-common.js +2 -2
  72. package/dist/atomic/components/result-template-common.js.map +1 -1
  73. package/dist/atomic/components/store.js +1 -1
  74. package/dist/atomic/components/utils.js +1 -1
  75. package/dist/atomic/{p-2caa1859.js → p-0e62bdd6.js} +2 -2
  76. package/dist/atomic/p-0e62bdd6.js.map +1 -0
  77. package/dist/atomic/{p-5f706e3d.entry.js → p-170c7da6.entry.js} +2 -2
  78. package/dist/atomic/{p-3857d6a3.entry.js → p-1bbaf206.entry.js} +2 -2
  79. package/dist/atomic/{p-24854323.js → p-1e7294cc.js} +2 -2
  80. package/dist/atomic/{p-4723ffa5.entry.js → p-20b33c18.entry.js} +2 -2
  81. package/dist/atomic/{p-7709fba4.js → p-2250f505.js} +2 -2
  82. package/dist/atomic/p-2250f505.js.map +1 -0
  83. package/dist/atomic/{p-bd3542d2.entry.js → p-36112c34.entry.js} +2 -2
  84. package/dist/atomic/p-36112c34.entry.js.map +1 -0
  85. package/dist/atomic/{p-d6e04719.entry.js → p-373448df.entry.js} +2 -2
  86. package/dist/atomic/{p-8bf425b0.entry.js → p-40c1dfcb.entry.js} +2 -2
  87. package/dist/atomic/{p-d82b85ab.entry.js → p-52d5461a.entry.js} +2 -2
  88. package/dist/atomic/{p-406a288c.entry.js → p-6078667f.entry.js} +2 -2
  89. package/dist/atomic/p-62e85c20.entry.js +2 -0
  90. package/dist/atomic/p-6f1bffa2.entry.js +2 -0
  91. package/dist/atomic/p-6f1bffa2.entry.js.map +1 -0
  92. package/dist/atomic/{p-93da1f4e.entry.js → p-6f34dd3a.entry.js} +2 -2
  93. package/dist/atomic/{p-0c0b8d41.entry.js → p-768b172e.entry.js} +2 -2
  94. package/dist/atomic/{p-a4d277c7.entry.js → p-7fd5b6ac.entry.js} +2 -2
  95. package/dist/atomic/p-8de99e50.entry.js +2 -0
  96. package/dist/atomic/p-8de99e50.entry.js.map +1 -0
  97. package/dist/atomic/{p-6289adc7.entry.js → p-9239be63.entry.js} +2 -2
  98. package/dist/atomic/{p-f71b14b2.entry.js → p-9260dd7d.entry.js} +2 -2
  99. package/dist/atomic/{p-ed8e5c4d.entry.js → p-98dd6df1.entry.js} +2 -2
  100. package/dist/atomic/{p-0b5efb51.entry.js → p-a1e5f767.entry.js} +2 -2
  101. package/dist/atomic/{p-1db20a4a.entry.js → p-a5f66ecd.entry.js} +2 -2
  102. package/dist/atomic/{p-65dd9017.entry.js → p-af1b4924.entry.js} +2 -2
  103. package/dist/atomic/{p-577d34ba.entry.js → p-c4fb6426.entry.js} +2 -2
  104. package/dist/atomic/{p-9c7dbbdf.js → p-cc2b2231.js} +1 -1
  105. package/dist/atomic/p-cc2b2231.js.map +1 -0
  106. package/dist/atomic/{p-9faad55b.entry.js → p-dc128135.entry.js} +2 -2
  107. package/dist/atomic/{p-97748161.js → p-dc28ee14.js} +1 -1
  108. package/dist/{esm/sections-d787040b.js.map → atomic/p-dc28ee14.js.map} +1 -1
  109. package/dist/atomic/{p-c280cd05.js → p-e1cc5150.js} +1 -1
  110. package/dist/atomic/{p-27b8404c.js → p-e62fc40e.js} +2 -2
  111. package/dist/atomic/p-e62fc40e.js.map +1 -0
  112. package/dist/atomic/{p-d1795580.entry.js → p-e7a25b00.entry.js} +2 -2
  113. package/dist/atomic/{p-9d56d3e8.entry.js → p-ea369f8a.entry.js} +2 -2
  114. package/dist/atomic/{p-63844a6c.entry.js → p-fc9cab39.entry.js} +2 -2
  115. package/dist/atomic/p-ff91ba6a.entry.js +2 -0
  116. package/dist/atomic/p-ff91ba6a.entry.js.map +1 -0
  117. package/dist/cjs/_loader.cjs.js +1 -1
  118. package/dist/cjs/{analytics-config-01eec898.js → analytics-config-c2ffb32d.js} +2 -2
  119. package/dist/cjs/{analytics-config-01eec898.js.map → analytics-config-c2ffb32d.js.map} +1 -1
  120. package/dist/cjs/atomic-field-condition.cjs.entry.js +2 -2
  121. package/dist/cjs/atomic-folded-result-list.cjs.entry.js +2 -2
  122. package/dist/cjs/atomic-insight-folded-result-list.cjs.entry.js +2 -2
  123. package/dist/cjs/atomic-insight-history-toggle.cjs.entry.js +2 -2
  124. package/dist/cjs/atomic-insight-history-toggle.cjs.entry.js.map +1 -1
  125. package/dist/cjs/atomic-insight-interface.cjs.entry.js +3 -3
  126. package/dist/cjs/atomic-insight-layout.cjs.entry.js +2 -2
  127. package/dist/cjs/atomic-insight-result-action-bar.cjs.entry.js +6 -3
  128. package/dist/cjs/atomic-insight-result-action-bar.cjs.entry.js.map +1 -1
  129. package/dist/cjs/atomic-insight-result-children-template.cjs.entry.js +2 -2
  130. package/dist/cjs/atomic-insight-result-list.cjs.entry.js +2 -2
  131. package/dist/cjs/atomic-insight-result-template.cjs.entry.js +2 -2
  132. package/dist/cjs/atomic-insight-result.cjs.entry.js +2 -2
  133. package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js +2 -2
  134. package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js.map +1 -1
  135. package/dist/cjs/atomic-ipx-recs-list.cjs.entry.js +2 -2
  136. package/dist/cjs/{sections-4b4af2f8.js → atomic-layout-section-utils-08b4fbcd.js} +1 -1
  137. package/dist/cjs/atomic-layout-section-utils-08b4fbcd.js.map +1 -0
  138. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  139. package/dist/cjs/atomic-recs-list.cjs.entry.js +2 -2
  140. package/dist/cjs/atomic-recs-result-template.cjs.entry.js +2 -2
  141. package/dist/cjs/atomic-recs-result.cjs.entry.js +2 -2
  142. package/dist/cjs/atomic-refine-modal.cjs.entry.js +4 -4
  143. package/dist/cjs/atomic-refine-modal.cjs.entry.js.map +1 -1
  144. package/dist/cjs/atomic-result-children-template.cjs.entry.js +2 -2
  145. package/dist/cjs/atomic-result-list.cjs.entry.js +2 -2
  146. package/dist/cjs/{atomic-result-placeholder_8.cjs.entry.js → atomic-result-placeholder_2.cjs.entry.js} +3 -71
  147. package/dist/cjs/atomic-result-placeholder_2.cjs.entry.js.map +1 -0
  148. package/dist/cjs/atomic-result-template.cjs.entry.js +2 -2
  149. package/dist/cjs/atomic-result.cjs.entry.js +2 -2
  150. package/dist/cjs/atomic-search-box-query-suggestions.cjs.entry.js +76 -0
  151. package/dist/cjs/atomic-search-box-query-suggestions.cjs.entry.js.map +1 -0
  152. package/dist/cjs/atomic-smart-snippet-feedback-modal.cjs.entry.js +2 -2
  153. package/dist/cjs/atomic-tab-manager.cjs.entry.js +1 -1
  154. package/dist/cjs/atomic.cjs.js +1 -1
  155. package/dist/cjs/clock-7aeb19d0.js +7 -0
  156. package/dist/cjs/clock-7aeb19d0.js.map +1 -0
  157. package/dist/cjs/{display-options-14f05862.js → display-options-69531e8d.js} +4 -4
  158. package/dist/cjs/display-options-69531e8d.js.map +1 -0
  159. package/dist/cjs/index-757bc886.js +4 -16
  160. package/dist/cjs/{insight-layout-355a94dd.js → insight-layout-b6ff92fd.js} +11 -11
  161. package/dist/cjs/insight-layout-b6ff92fd.js.map +1 -0
  162. package/dist/cjs/{sections-fbb93b53.js → item-layout-sections-b09ba4b3.js} +1 -1
  163. package/dist/cjs/item-layout-sections-b09ba4b3.js.map +1 -0
  164. package/dist/cjs/{result-template-common-88359dad.js → result-template-common-84bd4057.js} +3 -3
  165. package/dist/cjs/result-template-common-84bd4057.js.map +1 -0
  166. package/dist/cjs/version.cjs.js +2 -2
  167. package/dist/esm/_loader.js +1 -1
  168. package/dist/esm/{analytics-config-4b15a97e.js → analytics-config-d0bd343f.js} +2 -2
  169. package/dist/esm/{analytics-config-4b15a97e.js.map → analytics-config-d0bd343f.js.map} +1 -1
  170. package/dist/esm/atomic-field-condition.entry.js +2 -2
  171. package/dist/esm/atomic-folded-result-list.entry.js +2 -2
  172. package/dist/esm/atomic-insight-folded-result-list.entry.js +2 -2
  173. package/dist/esm/atomic-insight-history-toggle.entry.js +2 -2
  174. package/dist/esm/atomic-insight-history-toggle.entry.js.map +1 -1
  175. package/dist/esm/atomic-insight-interface.entry.js +3 -3
  176. package/dist/esm/atomic-insight-layout.entry.js +2 -2
  177. package/dist/esm/atomic-insight-result-action-bar.entry.js +5 -2
  178. package/dist/esm/atomic-insight-result-action-bar.entry.js.map +1 -1
  179. package/dist/esm/atomic-insight-result-children-template.entry.js +2 -2
  180. package/dist/esm/atomic-insight-result-list.entry.js +2 -2
  181. package/dist/esm/atomic-insight-result-template.entry.js +2 -2
  182. package/dist/esm/atomic-insight-result.entry.js +2 -2
  183. package/dist/esm/atomic-insight-user-actions-toggle.entry.js +2 -2
  184. package/dist/esm/atomic-insight-user-actions-toggle.entry.js.map +1 -1
  185. package/dist/esm/atomic-ipx-recs-list.entry.js +2 -2
  186. package/dist/{atomic/components/sections.js → esm/atomic-layout-section-utils-c8ca7445.js} +1 -1
  187. package/dist/esm/atomic-layout-section-utils-c8ca7445.js.map +1 -0
  188. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  189. package/dist/esm/atomic-recs-list.entry.js +2 -2
  190. package/dist/esm/atomic-recs-result-template.entry.js +2 -2
  191. package/dist/esm/atomic-recs-result.entry.js +2 -2
  192. package/dist/esm/atomic-refine-modal.entry.js +2 -2
  193. package/dist/esm/atomic-refine-modal.entry.js.map +1 -1
  194. package/dist/esm/atomic-result-children-template.entry.js +2 -2
  195. package/dist/esm/atomic-result-list.entry.js +2 -2
  196. package/dist/esm/{atomic-result-placeholder_8.entry.js → atomic-result-placeholder_2.entry.js} +5 -67
  197. package/dist/esm/atomic-result-placeholder_2.entry.js.map +1 -0
  198. package/dist/esm/atomic-result-template.entry.js +2 -2
  199. package/dist/esm/atomic-result.entry.js +2 -2
  200. package/dist/esm/atomic-search-box-query-suggestions.entry.js +72 -0
  201. package/dist/esm/atomic-search-box-query-suggestions.entry.js.map +1 -0
  202. package/dist/esm/atomic-smart-snippet-feedback-modal.entry.js +2 -2
  203. package/dist/esm/atomic-tab-manager.entry.js +1 -1
  204. package/dist/esm/atomic.js +1 -1
  205. package/dist/esm/clock-b1f5d7f7.js +5 -0
  206. package/dist/esm/clock-b1f5d7f7.js.map +1 -0
  207. package/dist/esm/{display-options-c16840c6.js → display-options-1199eed5.js} +2 -2
  208. package/dist/esm/display-options-1199eed5.js.map +1 -0
  209. package/dist/esm/index-3f35faca.js +4 -16
  210. package/dist/esm/{insight-layout-776b87f2.js → insight-layout-a1e4b795.js} +2 -2
  211. package/dist/esm/insight-layout-a1e4b795.js.map +1 -0
  212. package/dist/esm/{sections-d787040b.js → item-layout-sections-8afb5049.js} +1 -1
  213. package/dist/esm/item-layout-sections-8afb5049.js.map +1 -0
  214. package/dist/esm/{result-template-common-ac9fecab.js → result-template-common-995b94f8.js} +2 -2
  215. package/dist/esm/result-template-common-995b94f8.js.map +1 -0
  216. package/dist/esm/version.js +2 -2
  217. package/dist/types/components/commerce/atomic-product/atomic-product.d.ts +4 -16
  218. package/dist/types/components/common/atomic-layout-section/atomic-layout-section.d.ts +1 -1
  219. package/dist/types/components/common/layout/custom-render-controller.d.ts +25 -0
  220. package/dist/types/components/common/layout/item-layout-controller.d.ts +47 -0
  221. package/dist/types/components/common/layout/item-layout-sections.d.ts +6 -0
  222. package/dist/types/components/search/{result-template-components/atomic-result-sections → atomic-result-section-actions}/atomic-result-section-actions.d.ts +9 -3
  223. package/dist/types/components/search/{result-template-components/atomic-result-sections → atomic-result-section-badges}/atomic-result-section-badges.d.ts +9 -3
  224. package/dist/types/components/search/{result-template-components/atomic-result-sections → atomic-result-section-bottom-metadata}/atomic-result-section-bottom-metadata.d.ts +9 -3
  225. package/dist/types/components/search/atomic-result-section-children/atomic-result-section-children.d.ts +16 -0
  226. package/dist/types/components/search/atomic-result-section-emphasized/atomic-result-section-emphasized.d.ts +18 -0
  227. package/dist/types/components/search/{result-template-components/atomic-result-sections → atomic-result-section-excerpt}/atomic-result-section-excerpt.d.ts +9 -3
  228. package/dist/types/components/search/{result-template-components/atomic-result-sections → atomic-result-section-title}/atomic-result-section-title.d.ts +9 -3
  229. package/dist/types/components/search/atomic-result-section-title-metadata/atomic-result-section-title-metadata.d.ts +19 -0
  230. package/dist/types/components/search/atomic-result-section-visual/atomic-result-section-visual.d.ts +26 -0
  231. package/dist/types/components/search/atomic-search-box-recent-queries/atomic-search-box-recent-queries.d.ts +45 -0
  232. package/dist/types/components/search/index.d.ts +10 -0
  233. package/dist/types/components.d.ts +0 -462
  234. package/docs/atomic-docs.json +1 -372
  235. package/package.json +7 -7
  236. package/dist/atomic/components/atomic-result-section-actions.d.ts +0 -11
  237. package/dist/atomic/components/atomic-result-section-actions.js +0 -8
  238. package/dist/atomic/components/atomic-result-section-actions.js.map +0 -1
  239. package/dist/atomic/components/atomic-result-section-actions2.js +0 -30
  240. package/dist/atomic/components/atomic-result-section-actions2.js.map +0 -1
  241. package/dist/atomic/components/atomic-result-section-badges.d.ts +0 -11
  242. package/dist/atomic/components/atomic-result-section-badges.js +0 -8
  243. package/dist/atomic/components/atomic-result-section-badges.js.map +0 -1
  244. package/dist/atomic/components/atomic-result-section-badges2.js +0 -30
  245. package/dist/atomic/components/atomic-result-section-badges2.js.map +0 -1
  246. package/dist/atomic/components/atomic-result-section-bottom-metadata.d.ts +0 -11
  247. package/dist/atomic/components/atomic-result-section-bottom-metadata.js +0 -8
  248. package/dist/atomic/components/atomic-result-section-bottom-metadata.js.map +0 -1
  249. package/dist/atomic/components/atomic-result-section-bottom-metadata2.js +0 -30
  250. package/dist/atomic/components/atomic-result-section-bottom-metadata2.js.map +0 -1
  251. package/dist/atomic/components/atomic-result-section-children.d.ts +0 -11
  252. package/dist/atomic/components/atomic-result-section-children.js +0 -33
  253. package/dist/atomic/components/atomic-result-section-children.js.map +0 -1
  254. package/dist/atomic/components/atomic-result-section-emphasized.d.ts +0 -11
  255. package/dist/atomic/components/atomic-result-section-emphasized.js +0 -33
  256. package/dist/atomic/components/atomic-result-section-emphasized.js.map +0 -1
  257. package/dist/atomic/components/atomic-result-section-excerpt.d.ts +0 -11
  258. package/dist/atomic/components/atomic-result-section-excerpt.js +0 -8
  259. package/dist/atomic/components/atomic-result-section-excerpt.js.map +0 -1
  260. package/dist/atomic/components/atomic-result-section-excerpt2.js +0 -30
  261. package/dist/atomic/components/atomic-result-section-excerpt2.js.map +0 -1
  262. package/dist/atomic/components/atomic-result-section-title-metadata.d.ts +0 -11
  263. package/dist/atomic/components/atomic-result-section-title-metadata.js +0 -33
  264. package/dist/atomic/components/atomic-result-section-title-metadata.js.map +0 -1
  265. package/dist/atomic/components/atomic-result-section-title.d.ts +0 -11
  266. package/dist/atomic/components/atomic-result-section-title.js +0 -8
  267. package/dist/atomic/components/atomic-result-section-title.js.map +0 -1
  268. package/dist/atomic/components/atomic-result-section-title2.js +0 -30
  269. package/dist/atomic/components/atomic-result-section-title2.js.map +0 -1
  270. package/dist/atomic/components/atomic-result-section-visual.d.ts +0 -11
  271. package/dist/atomic/components/atomic-result-section-visual.js +0 -8
  272. package/dist/atomic/components/atomic-result-section-visual.js.map +0 -1
  273. package/dist/atomic/components/atomic-result-section-visual2.js +0 -33
  274. package/dist/atomic/components/atomic-result-section-visual2.js.map +0 -1
  275. package/dist/atomic/components/atomic-search-box-recent-queries.d.ts +0 -11
  276. package/dist/atomic/components/atomic-search-box-recent-queries.js +0 -8
  277. package/dist/atomic/components/atomic-search-box-recent-queries.js.map +0 -1
  278. package/dist/atomic/components/atomic-search-box-recent-queries2.js +0 -183
  279. package/dist/atomic/components/atomic-search-box-recent-queries2.js.map +0 -1
  280. package/dist/atomic/components/item-section-utils.js +0 -9
  281. package/dist/atomic/components/item-section-utils.js.map +0 -1
  282. package/dist/atomic/components/sections.js.map +0 -1
  283. package/dist/atomic/components/sections2.js.map +0 -1
  284. package/dist/atomic/p-250f34d4.entry.js +0 -2
  285. package/dist/atomic/p-27b8404c.js.map +0 -1
  286. package/dist/atomic/p-2caa1859.js.map +0 -1
  287. package/dist/atomic/p-3d55fce6.entry.js +0 -2
  288. package/dist/atomic/p-3d55fce6.entry.js.map +0 -1
  289. package/dist/atomic/p-519d9abd.entry.js +0 -2
  290. package/dist/atomic/p-519d9abd.entry.js.map +0 -1
  291. package/dist/atomic/p-56c97c3e.js +0 -2
  292. package/dist/atomic/p-56c97c3e.js.map +0 -1
  293. package/dist/atomic/p-736f4d7e.entry.js +0 -2
  294. package/dist/atomic/p-736f4d7e.entry.js.map +0 -1
  295. package/dist/atomic/p-7709fba4.js.map +0 -1
  296. package/dist/atomic/p-8572a953.entry.js +0 -2
  297. package/dist/atomic/p-8572a953.entry.js.map +0 -1
  298. package/dist/atomic/p-97748161.js.map +0 -1
  299. package/dist/atomic/p-9c7dbbdf.js.map +0 -1
  300. package/dist/atomic/p-bd3542d2.entry.js.map +0 -1
  301. package/dist/atomic/p-da845e35.entry.js +0 -2
  302. package/dist/atomic/p-da845e35.entry.js.map +0 -1
  303. package/dist/atomic/p-ea1b81fa.entry.js +0 -2
  304. package/dist/atomic/p-ea1b81fa.entry.js.map +0 -1
  305. package/dist/cjs/atomic-result-placeholder_8.cjs.entry.js.map +0 -1
  306. package/dist/cjs/atomic-result-section-children.cjs.entry.js +0 -23
  307. package/dist/cjs/atomic-result-section-children.cjs.entry.js.map +0 -1
  308. package/dist/cjs/atomic-result-section-emphasized.cjs.entry.js +0 -23
  309. package/dist/cjs/atomic-result-section-emphasized.cjs.entry.js.map +0 -1
  310. package/dist/cjs/atomic-result-section-title-metadata.cjs.entry.js +0 -23
  311. package/dist/cjs/atomic-result-section-title-metadata.cjs.entry.js.map +0 -1
  312. package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js +0 -234
  313. package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js.map +0 -1
  314. package/dist/cjs/clock-f03ff827.js +0 -7
  315. package/dist/cjs/clock-f03ff827.js.map +0 -1
  316. package/dist/cjs/display-options-14f05862.js.map +0 -1
  317. package/dist/cjs/insight-layout-355a94dd.js.map +0 -1
  318. package/dist/cjs/item-section-utils-8579462c.js +0 -11
  319. package/dist/cjs/item-section-utils-8579462c.js.map +0 -1
  320. package/dist/cjs/result-template-common-88359dad.js.map +0 -1
  321. package/dist/cjs/sections-4b4af2f8.js.map +0 -1
  322. package/dist/cjs/sections-fbb93b53.js.map +0 -1
  323. package/dist/esm/atomic-result-placeholder_8.entry.js.map +0 -1
  324. package/dist/esm/atomic-result-section-children.entry.js +0 -19
  325. package/dist/esm/atomic-result-section-children.entry.js.map +0 -1
  326. package/dist/esm/atomic-result-section-emphasized.entry.js +0 -19
  327. package/dist/esm/atomic-result-section-emphasized.entry.js.map +0 -1
  328. package/dist/esm/atomic-result-section-title-metadata.entry.js +0 -19
  329. package/dist/esm/atomic-result-section-title-metadata.entry.js.map +0 -1
  330. package/dist/esm/atomic-search-box-query-suggestions_2.entry.js +0 -229
  331. package/dist/esm/atomic-search-box-query-suggestions_2.entry.js.map +0 -1
  332. package/dist/esm/clock-add3e9a5.js +0 -5
  333. package/dist/esm/clock-add3e9a5.js.map +0 -1
  334. package/dist/esm/display-options-c16840c6.js.map +0 -1
  335. package/dist/esm/insight-layout-776b87f2.js.map +0 -1
  336. package/dist/esm/item-section-utils-46828f30.js +0 -9
  337. package/dist/esm/item-section-utils-46828f30.js.map +0 -1
  338. package/dist/esm/result-template-common-ac9fecab.js.map +0 -1
  339. package/dist/esm/sections-ae00b53a.js.map +0 -1
  340. package/dist/types/components/common/layout/sections.d.ts +0 -6
  341. package/dist/types/components/search/result-template-components/atomic-result-sections/atomic-result-section-children.d.ts +0 -10
  342. package/dist/types/components/search/result-template-components/atomic-result-sections/atomic-result-section-emphasized.d.ts +0 -12
  343. package/dist/types/components/search/result-template-components/atomic-result-sections/atomic-result-section-title-metadata.d.ts +0 -13
  344. package/dist/types/components/search/result-template-components/atomic-result-sections/atomic-result-section-visual.d.ts +0 -20
  345. package/dist/types/components/search/search-box-suggestions/atomic-search-box-recent-queries/atomic-search-box-recent-queries.d.ts +0 -37
  346. /package/dist/atomic/components/components/common/atomic-layout-section/{sections.js → atomic-layout-section-utils.js} +0 -0
  347. /package/dist/atomic/{p-5f706e3d.entry.js.map → p-170c7da6.entry.js.map} +0 -0
  348. /package/dist/atomic/{p-3857d6a3.entry.js.map → p-1bbaf206.entry.js.map} +0 -0
  349. /package/dist/atomic/{p-24854323.js.map → p-1e7294cc.js.map} +0 -0
  350. /package/dist/atomic/{p-4723ffa5.entry.js.map → p-20b33c18.entry.js.map} +0 -0
  351. /package/dist/atomic/{p-d6e04719.entry.js.map → p-373448df.entry.js.map} +0 -0
  352. /package/dist/atomic/{p-8bf425b0.entry.js.map → p-40c1dfcb.entry.js.map} +0 -0
  353. /package/dist/atomic/{p-d82b85ab.entry.js.map → p-52d5461a.entry.js.map} +0 -0
  354. /package/dist/atomic/{p-406a288c.entry.js.map → p-6078667f.entry.js.map} +0 -0
  355. /package/dist/atomic/{p-250f34d4.entry.js.map → p-62e85c20.entry.js.map} +0 -0
  356. /package/dist/atomic/{p-93da1f4e.entry.js.map → p-6f34dd3a.entry.js.map} +0 -0
  357. /package/dist/atomic/{p-0c0b8d41.entry.js.map → p-768b172e.entry.js.map} +0 -0
  358. /package/dist/atomic/{p-a4d277c7.entry.js.map → p-7fd5b6ac.entry.js.map} +0 -0
  359. /package/dist/atomic/{p-6289adc7.entry.js.map → p-9239be63.entry.js.map} +0 -0
  360. /package/dist/atomic/{p-f71b14b2.entry.js.map → p-9260dd7d.entry.js.map} +0 -0
  361. /package/dist/atomic/{p-ed8e5c4d.entry.js.map → p-98dd6df1.entry.js.map} +0 -0
  362. /package/dist/atomic/{p-0b5efb51.entry.js.map → p-a1e5f767.entry.js.map} +0 -0
  363. /package/dist/atomic/{p-1db20a4a.entry.js.map → p-a5f66ecd.entry.js.map} +0 -0
  364. /package/dist/atomic/{p-65dd9017.entry.js.map → p-af1b4924.entry.js.map} +0 -0
  365. /package/dist/atomic/{p-577d34ba.entry.js.map → p-c4fb6426.entry.js.map} +0 -0
  366. /package/dist/atomic/{p-9faad55b.entry.js.map → p-dc128135.entry.js.map} +0 -0
  367. /package/dist/atomic/{p-c280cd05.js.map → p-e1cc5150.js.map} +0 -0
  368. /package/dist/atomic/{p-d1795580.entry.js.map → p-e7a25b00.entry.js.map} +0 -0
  369. /package/dist/atomic/{p-9d56d3e8.entry.js.map → p-ea369f8a.entry.js.map} +0 -0
  370. /package/dist/atomic/{p-63844a6c.entry.js.map → p-fc9cab39.entry.js.map} +0 -0
  371. /package/dist/types/components/common/atomic-layout-section/{sections.d.ts → atomic-layout-section-utils.d.ts} +0 -0
@@ -0,0 +1,37 @@
1
+ /**
2
+ * A reactive controller that manages custom rendering function execution for item components.
3
+ */
4
+ export class CustomRenderController {
5
+ constructor(host, options) {
6
+ this.hasExecutedRenderFunction = false;
7
+ this.options = {
8
+ linkContainerRef: () => undefined,
9
+ onRenderComplete: () => { },
10
+ ...options,
11
+ };
12
+ host.addController(this);
13
+ }
14
+ hostConnected() {
15
+ this.resetRenderState();
16
+ }
17
+ hostUpdated() {
18
+ this.executeRenderFunction();
19
+ }
20
+ resetRenderState() {
21
+ this.hasExecutedRenderFunction = false;
22
+ }
23
+ executeRenderFunction() {
24
+ const renderingFunction = this.options.renderingFunction();
25
+ const itemData = this.options.itemData();
26
+ const rootElementRef = this.options.rootElementRef();
27
+ if (!renderingFunction ||
28
+ !itemData ||
29
+ !rootElementRef ||
30
+ this.hasExecutedRenderFunction) {
31
+ return;
32
+ }
33
+ const customRenderOutput = renderingFunction(itemData, rootElementRef, this.options.linkContainerRef());
34
+ this.options.onRenderComplete(rootElementRef, customRenderOutput);
35
+ this.hasExecutedRenderFunction = true;
36
+ }
37
+ }
@@ -1,4 +1,4 @@
1
- import { containsSections } from './sections';
1
+ import { containsSections, } from './item-layout-sections';
2
2
  function getDisplayClass(display) {
3
3
  switch (display) {
4
4
  case 'grid':
@@ -0,0 +1,103 @@
1
+ import { ItemLayout, } from './display-options';
2
+ /**
3
+ * A reactive controller that manages layout creation and class application for item components.
4
+ */
5
+ export class ItemLayoutController {
6
+ constructor(host, options) {
7
+ this.layoutInstance = null;
8
+ this.host = host;
9
+ this.options = {
10
+ ...options,
11
+ };
12
+ host.addController(this);
13
+ }
14
+ hostConnected() {
15
+ this.createLayout();
16
+ }
17
+ hostUpdated() {
18
+ this.applyLayoutClasses();
19
+ }
20
+ /**
21
+ * Gets the current layout instance
22
+ */
23
+ getLayout() {
24
+ return this.layoutInstance;
25
+ }
26
+ /**
27
+ * Gets combined layout and extra classes
28
+ */
29
+ getCombinedClasses(additionalContent) {
30
+ const layout = this.getLayout();
31
+ const layoutClasses = layout ? layout.getClasses(additionalContent) : [];
32
+ const itemClasses = this.options
33
+ .itemClasses()
34
+ .split(/\s+/)
35
+ .filter((c) => c);
36
+ return [...layoutClasses, ...itemClasses];
37
+ }
38
+ /**
39
+ * Applies layout classes to a specific element (useful for custom rendering)
40
+ */
41
+ applyLayoutClassesToElement(element, additionalContent) {
42
+ const layout = this.getLayout();
43
+ if (!layout) {
44
+ return;
45
+ }
46
+ const classes = this.getCombinedClasses(additionalContent);
47
+ if (classes.length > 0) {
48
+ element.classList.add(...classes);
49
+ }
50
+ }
51
+ applyLayoutClasses() {
52
+ const layout = this.getLayout();
53
+ if (!layout) {
54
+ return;
55
+ }
56
+ const classes = this.getCombinedClasses();
57
+ const root = this.host.shadowRoot?.querySelector('.result-root');
58
+ if (!root || classes.length === 0) {
59
+ return;
60
+ }
61
+ if (this.hasCustomRenderFunction()) {
62
+ this.observeAndApplyClasses(root, classes);
63
+ }
64
+ else {
65
+ this.addClassesToElements(root, classes);
66
+ }
67
+ }
68
+ createLayout() {
69
+ const content = this.options.content();
70
+ if (!content) {
71
+ console.warn(`${this.options.elementPrefix}: content property is undefined. Cannot create layout.`, this.host);
72
+ this.layoutInstance = null;
73
+ return;
74
+ }
75
+ const config = this.options.layoutConfig();
76
+ this.layoutInstance = new ItemLayout(content.children, config.display, config.density, config.imageSize);
77
+ }
78
+ hasCustomRenderFunction() {
79
+ return this.options.renderingFunction() !== undefined;
80
+ }
81
+ addClassesToElements(root, classes) {
82
+ if (classes.length === 0) {
83
+ return;
84
+ }
85
+ const elements = root.querySelectorAll('*');
86
+ elements.forEach((element) => {
87
+ const tagName = element.tagName.toLowerCase();
88
+ if (tagName.startsWith(`${this.options.elementPrefix}-`)) {
89
+ element.classList.add(...classes);
90
+ }
91
+ });
92
+ }
93
+ observeAndApplyClasses(root, classes) {
94
+ const observer = new MutationObserver((mutations) => {
95
+ const hasNewElements = mutations.some((mutation) => mutation.type === 'childList' && mutation.addedNodes.length > 0);
96
+ if (hasNewElements) {
97
+ this.addClassesToElements(root, classes);
98
+ observer.disconnect();
99
+ }
100
+ });
101
+ observer.observe(root, { childList: true, subtree: true });
102
+ }
103
+ }
@@ -1,4 +1,4 @@
1
- import { isElementNode } from '../../../utils/utils';
1
+ import { isElementNode } from "../../../utils/utils";
2
2
  const resultSectionTags = new Set([
3
3
  'atomic-result-section-visual',
4
4
  'atomic-result-section-badges',
@@ -2,7 +2,7 @@ import { ProductTemplatesHelpers, } from '@coveo/headless/commerce';
2
2
  import { intersection } from '../../../utils/set';
3
3
  import { isElementNode, isVisualNode } from '../../../utils/utils';
4
4
  import { tableElementTagName } from '../../search/atomic-table-result/table-element-utils';
5
- import { isResultSectionNode } from '../layout/sections';
5
+ import { isResultSectionNode } from '../layout/item-layout-sections';
6
6
  export function getTemplateNodeType(node) {
7
7
  if (isResultSectionNode(node)) {
8
8
  return 'section';
@@ -1,4 +1,4 @@
1
- import { findSection, sectionSelector, } from '../../common/atomic-layout-section/sections';
1
+ import { findSection, sectionSelector, } from '../../common/atomic-layout-section/atomic-layout-section-utils';
2
2
  const tabsSelector = 'atomic-insight-tabs';
3
3
  const refineModalSelector = 'atomic-insight-refine-modal';
4
4
  const searchBoxSelector = 'atomic-insight-search-box';
@@ -0,0 +1,25 @@
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 { css, LitElement } from 'lit';
8
+ import { customElement } from 'lit/decorators.js';
9
+ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
+ /**
11
+ * This section allows the information seeker to perform an action on an item without having to view its details.
12
+ * For example, in Commerce you can add an item to the cart directly or add it to a wish list to view at a later time.
13
+ *
14
+ * Behavior:
15
+ * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.
16
+ * ** You should ensure that elements inside of it have `height: var(--line-height)`.
17
+ * * Is a wrapping flexbox with a gap.
18
+ * * May appear over, next to, or beneath the visual section.
19
+ */
20
+ let AtomicResultSectionActions = class AtomicResultSectionActions extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-actions{text-align:left;&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{display:flex;flex-wrap:wrap;gap:.5rem;grid-area:actions;max-height:calc(var(--row-height, 2rem)*2 + .5rem);--row-height:2rem;atomic-result-quickview{display:inline-block}@media (width >= 1024px){&.display-list{&.density-comfortable{margin-bottom:1.5rem}&.density-compact,&.density-normal{margin-bottom:1rem}}&.display-grid{&.density-comfortable{margin-top:2.25rem;--row-height:2.5rem}&.density-normal{margin-top:1.75rem}&.density-compact,&.density-normal{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.density-compact{margin-top:1.25rem}}}@media not all and (width >= 1024px){&.display-list{--row-height:2.5rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5em}}&.display-grid{&.image-large{--row-height:2.5rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5em}}&.image-icon,&.image-none,&.image-small{&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}&.density-compact{margin-top:.75rem}}}}&.display-table{&.density-comfortable{margin-bottom:1.5rem}&.density-compact,&.density-normal{margin-bottom:1rem}}}}`) {
21
+ };
22
+ AtomicResultSectionActions = __decorate([
23
+ customElement('atomic-result-section-actions')
24
+ ], AtomicResultSectionActions);
25
+ export { AtomicResultSectionActions };
@@ -0,0 +1,24 @@
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 { css, LitElement } from 'lit';
8
+ import { customElement } from 'lit/decorators.js';
9
+ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
+ /**
11
+ * This section provides badges that highlight special features of the item.
12
+ *
13
+ * Behavior:
14
+ * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.
15
+ * ** You should ensure that elements inside of it have `height: var(--line-height)`.
16
+ * * Is a wrapping flexbox with a gap.
17
+ * * May appear over, next to, or beneath the visual section.
18
+ */
19
+ let AtomicResultSectionBadges = class AtomicResultSectionBadges extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-badges{text-align:left;&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{display:flex;flex-wrap:wrap;gap:.5rem;grid-area:badges;margin-bottom:1rem;max-height:calc(var(--row-height, 2rem)*2 + .5rem);--row-height:2rem;@media (width >= 1024px){&.display-list{&.density-comfortable{margin-bottom:1.5rem}}&.display-grid{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.image-icon{&.density-comfortable{margin-bottom:2rem}&.density-normal{margin-bottom:1.5rem}}}}@media not all and (width >= 1024px){&.display-list{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.display-grid{&.image-icon,&.image-none,&.image-small{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}}}&.display-table{&.density-comfortable{margin-bottom:1.5rem}}}}`) {
20
+ };
21
+ AtomicResultSectionBadges = __decorate([
22
+ customElement('atomic-result-section-badges')
23
+ ], AtomicResultSectionBadges);
24
+ export { AtomicResultSectionBadges };
@@ -0,0 +1,25 @@
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 { css, LitElement } from 'lit';
8
+ import { customElement } from 'lit/decorators.js';
9
+ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
+ /**
11
+ * This section displays additional descriptive information about the item.
12
+ *
13
+ * Behavior:
14
+ * * Has a maximum height of two lines.
15
+ * ** We recommend that you use `atomic-result-fields-list` to ensure that the fields in this section don’t overflow.
16
+ * * Exposes the `--line-height` variable so child elements can adjust to the current line height.
17
+ * * Has a defined CSS `color` property for text.
18
+ * * Has a font weight.
19
+ */
20
+ let AtomicResultSectionBottomMetadata = class AtomicResultSectionBottomMetadata extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-bottom-metadata{&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{color:var(--atomic-neutral-dark);grid-area:bottom-metadata;--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);@media (width >= 1024px){&.display-list{&.density-comfortable{margin-top:1.25rem;max-height:4rem}&.density-normal{margin-top:.875rem;max-height:3.5rem}&.density-compact{margin-top:.6875rem;max-height:3.25rem}}&.display-grid{&.density-comfortable{margin-top:1.75rem;max-height:4rem}&.density-normal{margin-top:1.375rem;max-height:3.5rem}&.density-compact{margin-top:.9375rem;max-height:3.25rem}}}@media not all and (width >= 1024px){&.display-list{&.density-comfortable{margin-top:.75rem;max-height:4rem}&.density-normal{margin-top:.625rem;max-height:3.5rem}&.density-compact{margin-top:.4375rem;max-height:3.25rem}}&.display-grid{&.image-large{&.density-comfortable{margin-top:.75rem;max-height:4rem}&.density-normal{margin-top:.625rem;max-height:3.5rem}&.density-compact{margin-top:.4375rem;max-height:3.25rem}}&.image-icon,&.image-none,&.image-small{max-height:3rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5rem}}}}&.display-table{&.density-comfortable{margin-top:1.25rem;max-height:4rem}&.density-normal{margin-top:.875rem;max-height:3.5rem}&.density-compact{margin-top:.6875rem;max-height:3.25rem}}}}`) {
21
+ };
22
+ AtomicResultSectionBottomMetadata = __decorate([
23
+ customElement('atomic-result-section-bottom-metadata')
24
+ ], AtomicResultSectionBottomMetadata);
25
+ export { AtomicResultSectionBottomMetadata };
@@ -0,0 +1,21 @@
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 { css, LitElement } from 'lit';
8
+ import { customElement } from 'lit/decorators.js';
9
+ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
+ /**
11
+ * This section displays the folded results, available when using the <atomic-result-children> component.
12
+ *
13
+ * Behavior:
14
+ * * Shows children at the bottom of the result, indented and wrapped in a border.
15
+ */
16
+ let AtomicResultSectionChildren = class AtomicResultSectionChildren extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */@layer properties;atomic-result-section-children{&.with-sections{grid-area:children;@media (width >= 1024px){&.display-list{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px}&.density-comfortable{atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:1.25rem;padding:1.75rem}&::part(show-hide-button){margin-bottom:1.25rem;margin-top:1.25rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.875rem;padding:1.5rem}&::part(show-hide-button){margin-bottom:.875rem;margin-top:.875rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.475rem;padding:1rem}&::part(show-hide-button){margin-bottom:.475rem;margin-top:.475rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1rem}}}}@media not all and (width >= 1024px){&.display-list{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-top:1px var(--tw-border-style) var(--atomic-neutral)}}&.display-grid{&.image-large{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-top:1px var(--tw-border-style) var(--atomic-neutral)}}&.image-icon,&.image-none,&.image-small{&.density-comfortable{margin-top:1.25rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){margin-inline:calc(var(--spacing, .25rem)*-4);margin-top:calc(var(--spacing, .25rem)*4);padding-top:1.75rem;padding-inline:calc(var(--spacing, .25rem)*4)}&::part(show-hide-button){margin-bottom:1.25rem;margin-top:1.25rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){margin-inline:calc(var(--spacing, .25rem)*-4);margin-top:calc(var(--spacing, .25rem)*4);padding-top:1.5rem;padding-inline:calc(var(--spacing, .25rem)*4)}&::part(show-hide-button){margin-bottom:.875rem;margin-top:.875rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){margin-inline:calc(var(--spacing, .25rem)*-4);margin-top:calc(var(--spacing, .25rem)*4);padding-top:1rem;padding-inline:calc(var(--spacing, .25rem)*4)}&::part(show-hide-button){margin-bottom:.475rem;margin-top:.475rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1rem}}}}}&.display-table{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px}&.density-comfortable{atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:1.25rem;padding:1.75rem}&::part(show-hide-button){margin-bottom:1.25rem;margin-top:1.25rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.875rem;padding:1.5rem}&::part(show-hide-button){margin-bottom:.875rem;margin-top:.875rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.475rem;padding:1rem}&::part(show-hide-button){margin-bottom:.475rem;margin-top:.475rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1rem}}}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid}}}`) {
17
+ };
18
+ AtomicResultSectionChildren = __decorate([
19
+ customElement('atomic-result-section-children')
20
+ ], AtomicResultSectionChildren);
21
+ export { AtomicResultSectionChildren };
@@ -0,0 +1,23 @@
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 { css, LitElement } from 'lit';
8
+ import { customElement } from 'lit/decorators.js';
9
+ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
+ /**
11
+ * This section displays the field that's important for its search criteria.
12
+ * For example, in Commerce, a product's cost is often more important than the title itself.
13
+ *
14
+ * Behavior:
15
+ * * Has a very large font size.
16
+ * * Is the second closest element beneath the title section.
17
+ */
18
+ let AtomicResultSectionEmphasized = class AtomicResultSectionEmphasized extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-emphasized{font-weight:500;--font-size:var(--atomic-text-2xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);margin-top:.5rem;&.with-sections{grid-area:emphasized;overflow:hidden;text-overflow:ellipsis}}`) {
19
+ };
20
+ AtomicResultSectionEmphasized = __decorate([
21
+ customElement('atomic-result-section-emphasized')
22
+ ], AtomicResultSectionEmphasized);
23
+ export { AtomicResultSectionEmphasized };
@@ -0,0 +1,24 @@
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 { css, LitElement } from 'lit';
8
+ import { customElement } from 'lit/decorators.js';
9
+ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
+ /**
11
+ * This section contains an informative summary of the item's content.
12
+ *
13
+ * Behavior:
14
+ * * Has a fixed height of one to three lines, depending on the layout and density.
15
+ * * Ellipses overflowing text.
16
+ * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.
17
+ * * Has a defined CSS `color` property for text.
18
+ */
19
+ let AtomicResultSectionExcerpt = class AtomicResultSectionExcerpt extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-excerpt{&.with-sections{text-overflow:ellipsis}&.with-sections{color:var(--atomic-neutral-dark);display:-webkit-box;grid-area:excerpt;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;@media (width >= 1024px){&.density-comfortable{--font-size:var(--atomic-text-lg);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);-webkit-line-clamp:3}&.density-comfortable,&.density-compact{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}&.density-compact{-webkit-line-clamp:1}&.display-list{&.density-comfortable{margin-top:1.75rem;max-height:4.5rem}&.density-normal{margin-top:1.25rem;max-height:2.5rem}&.density-compact{margin-top:1rem;max-height:1.25rem}}&.display-grid{&.density-comfortable{margin-top:2.25rem}&.density-normal{margin-top:1.75rem}&.density-compact{margin-top:1.25rem}}}@media not all and (width >= 1024px){&.display-list{&.density-comfortable,&.density-normal{max-height:2.5rem}&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}}&.display-grid{&.image-large{&.density-comfortable,&.density-normal{max-height:2.5rem}&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}}&.image-icon,&.image-none,&.image-small{&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}&.density-compact{display:-webkit-box;margin-top:.75rem;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}}}}&.display-table{&.density-comfortable{margin-top:1.75rem;max-height:4.5rem}&.density-normal{margin-top:1.25rem;max-height:2.5rem}&.density-compact{margin-top:1rem;max-height:1.25rem}}}}`) {
20
+ };
21
+ AtomicResultSectionExcerpt = __decorate([
22
+ customElement('atomic-result-section-excerpt')
23
+ ], AtomicResultSectionExcerpt);
24
+ export { AtomicResultSectionExcerpt };
@@ -0,0 +1,24 @@
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 { css, LitElement } from 'lit';
8
+ import { customElement } from 'lit/decorators.js';
9
+ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
+ /**
11
+ * This section identifies the item by its name, and its main use is to make the result list scannable.
12
+ * This is usually the page title.
13
+ *
14
+ * Behavior:
15
+ * * Has a fixed height of two lines on grid layouts.
16
+ * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.
17
+ * * Has a defined CSS `color` property for text.
18
+ */
19
+ let AtomicResultSectionTitle = class AtomicResultSectionTitle extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-title{&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{color:var(--atomic-on-background);grid-area:title;--font-size:var(--atomic-text-xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.density-comfortable{--font-size:var(--atomic-text-2xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}@media (width >= 1024px){&.display-grid{display:-webkit-box;overflow:hidden;word-break:break-word;-webkit-box-orient:vertical;-webkit-line-clamp:2}}@media not all and (width >= 1024px){&.display-list{--font-size:var(--atomic-text-xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.display-grid{&.image-large{--font-size:var(--atomic-text-xl);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio))}&.image-icon,&.image-large,&.image-none,&.image-small{font-size:var(--font-size);line-height:var(--line-height)}&.image-icon,&.image-none,&.image-small{--font-size:var(--atomic-text-lg);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));display:-webkit-box;max-height:3rem;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}}}}}`) {
20
+ };
21
+ AtomicResultSectionTitle = __decorate([
22
+ customElement('atomic-result-section-title')
23
+ ], AtomicResultSectionTitle);
24
+ export { AtomicResultSectionTitle };
@@ -0,0 +1,24 @@
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 { css, LitElement } from 'lit';
8
+ import { customElement } from 'lit/decorators.js';
9
+ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
+ /**
11
+ * This section surfaces some fields that are directly related to the title of the item.
12
+ * For example, in Commerce, this could be the item's rating, which is tied to the nature of the product itself,
13
+ * rather than to the product's description.
14
+ *
15
+ * Behavior:
16
+ * * Has a very small font size.
17
+ * * Is the closest element beneath the title section.
18
+ */
19
+ let AtomicResultSectionTitleMetadata = class AtomicResultSectionTitleMetadata extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-title-metadata{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.with-sections{grid-area:title-metadata;margin-top:.475rem;overflow:hidden;text-overflow:ellipsis}}`) {
20
+ };
21
+ AtomicResultSectionTitleMetadata = __decorate([
22
+ customElement('atomic-result-section-title-metadata')
23
+ ], AtomicResultSectionTitleMetadata);
24
+ export { AtomicResultSectionTitleMetadata };
@@ -0,0 +1,29 @@
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 { css, LitElement } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
+ /**
11
+ * This section provides visual information about the item.
12
+ * For example, in Commerce, an image is a great shorthand for a result category.
13
+ * An icon can quickly show the item type, or an avatar can help identify to whom it is related.
14
+ *
15
+ * Behavior:
16
+ * * Has a fixed size that depends on the specified image size, the layout, the density, and the screen size.
17
+ * ** When the image size is set to `icon`, this section stays very small.
18
+ * ** You should ensure that elements inside of it take the available space.
19
+ * * Always has a 1:1 aspect ratio.
20
+ */
21
+ let AtomicResultSectionVisual = class AtomicResultSectionVisual extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-visual{&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{grid-area:visual;&.image-icon{border-radius:var(--atomic-border-radius);height:2rem;width:2rem}&.image-none{display:none}@media (width >= 1024px){&.display-list{margin-right:1rem;&.density-comfortable{margin-right:1.5rem}&.image-large{&.density-compact{height:10rem;width:10rem}&.density-comfortable,&.density-normal{height:20.375rem;width:20.375rem}}&.image-small{height:10rem;width:10rem}}&.display-grid{margin-bottom:.5rem;&.image-large,&.image-small{width:100%;&.density-comfortable{margin:0 auto 2rem}&.density-normal{margin:0 auto 1.5rem}&.density-compact{margin:0 auto 1rem}}&.image-large{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:19.75rem}}&.image-small{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:14rem}}}}@media not all and (width >= 1024px){&.display-list{margin-right:1rem;&.image-large{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:7.25rem}margin-bottom:1rem;margin-right:0;width:100%}&.image-small{height:24vw;margin-bottom:1rem;width:24vw}&.image-icon{margin-bottom:0}}&.display-grid{&.image-large{margin-right:1rem;&.image-large{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:7.25rem}margin-bottom:1rem;margin-right:0;width:100%}&.image-small{height:24vw;margin-bottom:1rem;width:24vw}&.image-icon{margin-bottom:0}}&.image-icon,&.image-none,&.image-small{&.image-large,&.image-small{width:100%;&.density-comfortable{margin-bottom:1rem}&.density-normal{margin-bottom:.75rem}&.density-compact{margin-bottom:.5rem}}&.image-small{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:9rem}height:10.25rem;width:10.25rem}}}}&.display-table{margin-right:1rem;&.density-comfortable{margin-right:1.5rem}&.image-large{&.density-compact{height:10rem;width:10rem}&.density-comfortable,&.density-normal{height:20.375rem;width:20.375rem}}&.image-small{height:10rem;width:10rem}}}}`) {
22
+ };
23
+ __decorate([
24
+ property({ reflect: true, attribute: 'image-size', type: Object })
25
+ ], AtomicResultSectionVisual.prototype, "imageSize", void 0);
26
+ AtomicResultSectionVisual = __decorate([
27
+ customElement('atomic-result-section-visual')
28
+ ], AtomicResultSectionVisual);
29
+ export { AtomicResultSectionVisual };
@@ -0,0 +1,137 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { buildRecentQueriesList, } from '@coveo/headless';
8
+ import { html, LitElement, nothing } from 'lit';
9
+ import { customElement, property, state } from 'lit/decorators.js';
10
+ import { errorGuard } from "../../../decorators/error-guard";
11
+ import { SafeStorage, StorageItems } from "../../../utils/local-storage-utils";
12
+ import { once } from "../../../utils/utils";
13
+ const Clock = "<svg fill=\"none\" stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-linecap=\"round\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"8\" cy=\"8\" r=\"7.5\"/><path d=\"m8.5 4.5v4\"/><path d=\"m10.3066 10.1387-1.80932-1.5768\"/></svg>";
14
+ import { getPartialRecentQueryClearElement, getPartialRecentQueryElement, renderRecentQuery, renderRecentQueryClear, } from '../../common/suggestions/recent-queries';
15
+ import { dispatchSearchBoxSuggestionsEvent } from '../../common/suggestions/suggestions-events';
16
+ /**
17
+ * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
18
+ */
19
+ let AtomicSearchBoxRecentQueries = class AtomicSearchBoxRecentQueries extends LitElement {
20
+ constructor() {
21
+ super(...arguments);
22
+ /**
23
+ * The maximum number of suggestions to display when the user types in the input field.
24
+ */
25
+ this.maxWithQuery = 3;
26
+ this.warnUser = once(() => this.bindings.engine.logger.warn('The recent queries feature is deactivated because analytics are disabled.'));
27
+ }
28
+ connectedCallback() {
29
+ super.connectedCallback();
30
+ try {
31
+ dispatchSearchBoxSuggestionsEvent((bindings) => {
32
+ this.bindings = bindings;
33
+ return this.initialize();
34
+ }, this, ['atomic-search-box']);
35
+ }
36
+ catch (error) {
37
+ this.error = error;
38
+ }
39
+ }
40
+ initialize() {
41
+ this.storage = new SafeStorage();
42
+ this.recentQueriesList = buildRecentQueriesList(this.bindings.engine, {
43
+ initialState: { queries: this.retrieveLocalStorage() },
44
+ options: {
45
+ maxLength: 1000,
46
+ clearFilters: this.bindings.clearFilters,
47
+ },
48
+ });
49
+ this.recentQueriesList.subscribe(() => this.updateLocalStorage());
50
+ return {
51
+ position: Array.from(this.parentNode.children).indexOf(this),
52
+ renderItems: () => this.renderItems(),
53
+ };
54
+ }
55
+ retrieveLocalStorage() {
56
+ return this.storage.getParsedJSON(StorageItems.RECENT_QUERIES, []);
57
+ }
58
+ updateLocalStorage() {
59
+ if (!this.recentQueriesList.state.analyticsEnabled) {
60
+ return this.disableFeature();
61
+ }
62
+ return this.storage.setJSON(StorageItems.RECENT_QUERIES, this.recentQueriesList.state.queries);
63
+ }
64
+ disableFeature() {
65
+ this.warnUser();
66
+ this.storage.removeItem(StorageItems.RECENT_QUERIES);
67
+ }
68
+ renderItems() {
69
+ if (!this.recentQueriesList.state.analyticsEnabled) {
70
+ return [];
71
+ }
72
+ const query = this.bindings.searchBoxController.state.value;
73
+ const hasQuery = query !== '';
74
+ const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;
75
+ const filteredQueries = this.recentQueriesList.state.queries
76
+ .filter((recentQuery) => recentQuery.toLowerCase().startsWith(query.toLowerCase()))
77
+ .slice(0, max);
78
+ const suggestionElements = filteredQueries.map((value) => this.renderItem(value));
79
+ if (suggestionElements.length) {
80
+ suggestionElements.unshift(this.renderClear());
81
+ }
82
+ return suggestionElements;
83
+ }
84
+ renderClear() {
85
+ const partialItem = getPartialRecentQueryClearElement(this.bindings.i18n);
86
+ return {
87
+ ...partialItem,
88
+ content: renderRecentQueryClear({ i18n: this.bindings.i18n }),
89
+ onSelect: () => {
90
+ this.recentQueriesList.clear();
91
+ this.bindings.triggerSuggestions();
92
+ },
93
+ };
94
+ }
95
+ renderItem(value) {
96
+ const query = this.bindings.searchBoxController.state.value;
97
+ const partialItem = getPartialRecentQueryElement(value, this.bindings.i18n);
98
+ return {
99
+ ...partialItem,
100
+ content: renderRecentQuery({
101
+ icon: this.icon || Clock,
102
+ query,
103
+ value,
104
+ }),
105
+ onSelect: () => {
106
+ if (this.bindings.isStandalone) {
107
+ this.bindings.searchBoxController.updateText(value);
108
+ this.bindings.searchBoxController.submit();
109
+ return;
110
+ }
111
+ this.recentQueriesList.executeRecentQuery(this.recentQueriesList.state.queries.indexOf(value));
112
+ },
113
+ };
114
+ }
115
+ render() {
116
+ return html `${nothing}`;
117
+ }
118
+ };
119
+ __decorate([
120
+ state()
121
+ ], AtomicSearchBoxRecentQueries.prototype, "error", void 0);
122
+ __decorate([
123
+ property()
124
+ ], AtomicSearchBoxRecentQueries.prototype, "icon", void 0);
125
+ __decorate([
126
+ property({ type: Number, attribute: 'max-with-query', reflect: true })
127
+ ], AtomicSearchBoxRecentQueries.prototype, "maxWithQuery", void 0);
128
+ __decorate([
129
+ property({ type: Number, attribute: 'max-without-query', reflect: true })
130
+ ], AtomicSearchBoxRecentQueries.prototype, "maxWithoutQuery", void 0);
131
+ __decorate([
132
+ errorGuard()
133
+ ], AtomicSearchBoxRecentQueries.prototype, "render", null);
134
+ AtomicSearchBoxRecentQueries = __decorate([
135
+ customElement('atomic-search-box-recent-queries')
136
+ ], AtomicSearchBoxRecentQueries);
137
+ export { AtomicSearchBoxRecentQueries };
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
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
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { buildSearchEngine, buildSearchStatus, buildUrlManager, EcommerceDefaultFieldsToInclude, VERSION as HEADLESS_VERSION, loadConfigurationActions, loadFieldActions, loadQueryActions, loadSearchConfigurationActions, } from '@coveo/headless';
7
+ import { buildSearchEngine, buildSearchStatus, buildUrlManager, EcommerceDefaultFieldsToInclude, VERSION as HEADLESS_VERSION, loadFieldActions, loadQueryActions, loadSearchConfigurationActions, } from '@coveo/headless';
8
8
  import { provide } from '@lit/context';
9
9
  import i18next from 'i18next';
10
10
  import { css, html, LitElement } from 'lit';
@@ -26,7 +26,6 @@ import { getAnalyticsConfig } from './analytics-config';
26
26
  import { createSearchStore } from './store';
27
27
  // TODO - Remove once all components that use atomic-modal have been migrated.
28
28
  import "../../common/atomic-modal/atomic-modal";
29
- import { augmentAnalyticsConfigWithAtomicVersion } from '../../common/interface/analytics-config';
30
29
  const FirstSearchExecutedFlag = 'firstSearchExecuted';
31
30
  /**
32
31
  * The `atomic-search-interface` component is the parent to all other atomic components in a search page. It handles the headless search engine and localization configurations.
@@ -173,9 +172,6 @@ let AtomicSearchInterface = class AtomicSearchInterface extends ChildrenUpdateCo
173
172
  if (this.searchHub && this.searchHub !== engine.state.searchHub) {
174
173
  console.warn('Mismatch between search interface search hub and engine search hub. The engine search hub will be used.');
175
174
  }
176
- engine.dispatch(loadConfigurationActions(engine).updateAnalyticsConfiguration({
177
- ...augmentAnalyticsConfigWithAtomicVersion(),
178
- }));
179
175
  return this.internalInitialization(() => {
180
176
  this.engine = engine;
181
177
  });
@@ -2,6 +2,16 @@
2
2
  export { AtomicPager } from './atomic-pager/atomic-pager.js';
3
3
  export { AtomicQuerySummary } from './atomic-query-summary/atomic-query-summary.js';
4
4
  export { AtomicRelevanceInspector } from './atomic-relevance-inspector/atomic-relevance-inspector.js';
5
+ export { AtomicResultSectionActions } from './atomic-result-section-actions/atomic-result-section-actions.js';
6
+ export { AtomicResultSectionBadges } from './atomic-result-section-badges/atomic-result-section-badges.js';
7
+ export { AtomicResultSectionBottomMetadata } from './atomic-result-section-bottom-metadata/atomic-result-section-bottom-metadata.js';
8
+ export { AtomicResultSectionChildren } from './atomic-result-section-children/atomic-result-section-children.js';
9
+ export { AtomicResultSectionEmphasized } from './atomic-result-section-emphasized/atomic-result-section-emphasized.js';
10
+ export { AtomicResultSectionExcerpt } from './atomic-result-section-excerpt/atomic-result-section-excerpt.js';
11
+ export { AtomicResultSectionTitle } from './atomic-result-section-title/atomic-result-section-title.js';
12
+ export { AtomicResultSectionTitleMetadata } from './atomic-result-section-title-metadata/atomic-result-section-title-metadata.js';
13
+ export { AtomicResultSectionVisual } from './atomic-result-section-visual/atomic-result-section-visual.js';
5
14
  export { AtomicResultsPerPage } from './atomic-results-per-page/atomic-results-per-page.js';
15
+ export { AtomicSearchBoxRecentQueries } from './atomic-search-box-recent-queries/atomic-search-box-recent-queries.js';
6
16
  export { AtomicSearchInterface } from './atomic-search-interface/atomic-search-interface.js';
7
17
  export { AtomicSearchLayout } from './atomic-search-layout/atomic-search-layout.js';