@coveo/atomic 3.33.8-pre.9cacc0cb9c → 3.33.8-pre.a40e031589

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 (271) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/atomic.esm.js.map +1 -1
  3. package/dist/atomic/components/_index.d.ts +2 -0
  4. package/dist/atomic/components/_index.js +2 -2
  5. package/dist/atomic/components/analytics-config.js +1 -1
  6. package/dist/atomic/components/atomic-category-facet.js +1 -1
  7. package/dist/atomic/components/atomic-facet.js +1 -1
  8. package/dist/atomic/components/atomic-format-currency.js +1 -1
  9. package/dist/atomic/components/atomic-format-number.js +1 -1
  10. package/dist/atomic/components/atomic-format-unit.js +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-search-box.js +4 -3
  14. package/dist/atomic/components/atomic-insight-search-box.js.map +1 -1
  15. package/dist/atomic/components/atomic-insight-user-actions-toggle.js +2 -2
  16. package/dist/atomic/components/atomic-insight-user-actions-toggle.js.map +1 -1
  17. package/dist/atomic/components/atomic-numeric-facet.js +1 -1
  18. package/dist/atomic/components/atomic-quickview-modal2.js +1 -1
  19. package/dist/atomic/components/atomic-quickview.js +1 -1
  20. package/dist/atomic/components/atomic-result-children.js +1 -1
  21. package/dist/atomic/components/atomic-result-fields-list.js +1 -1
  22. package/dist/atomic/components/atomic-result-link.js +1 -1
  23. package/dist/atomic/components/atomic-result-list.js +1 -1
  24. package/dist/atomic/components/atomic-search-box-instant-results.js +2 -2
  25. package/dist/atomic/components/atomic-search-box-instant-results.js.map +1 -1
  26. package/dist/atomic/components/atomic-search-box-query-suggestions2.js +2 -2
  27. package/dist/atomic/components/atomic-search-box-query-suggestions2.js.map +1 -1
  28. package/dist/atomic/components/atomic-search-box-recent-queries.d.ts +11 -0
  29. package/dist/atomic/components/atomic-search-box-recent-queries.js +8 -0
  30. package/dist/atomic/components/atomic-search-box-recent-queries.js.map +1 -0
  31. package/dist/atomic/components/atomic-search-box-recent-queries2.js +183 -0
  32. package/dist/atomic/components/atomic-search-box-recent-queries2.js.map +1 -0
  33. package/dist/atomic/components/atomic-search-box.js +25 -7
  34. package/dist/atomic/components/atomic-search-box.js.map +1 -1
  35. package/dist/atomic/components/atomic-smart-snippet-feedback-modal2.js +2 -2
  36. package/dist/atomic/components/atomic-sort-dropdown.js +2 -2
  37. package/dist/atomic/components/atomic-sort-expression.js +1 -1
  38. package/dist/atomic/components/atomic-suggestion-renderer2.js +1 -1
  39. package/dist/atomic/components/atomic-suggestion-renderer2.js.map +1 -1
  40. package/dist/atomic/components/atomic-tab-manager.js +1 -1
  41. package/dist/atomic/components/clock.js +2 -2
  42. package/dist/atomic/components/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +14 -6
  43. package/dist/atomic/components/components/commerce/atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products.js +1 -1
  44. package/dist/atomic/components/components/commerce/atomic-commerce-search-box-query-suggestions/atomic-commerce-search-box-query-suggestions.js +1 -1
  45. package/dist/atomic/components/components/commerce/atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.js +1 -1
  46. package/dist/atomic/components/components/common/atomic-modal/atomic-modal.js +2 -0
  47. package/dist/atomic/components/components/common/suggestions/suggestion-manager.js +1 -1
  48. package/dist/atomic/components/components/common/suggestions/{suggestions-events.js → suggestions-common.js} +18 -16
  49. package/dist/atomic/components/components/search/index.js +0 -1
  50. package/dist/atomic/components/components/search/lazy-index.js +0 -1
  51. package/dist/atomic/components/global/environment.js +1 -1
  52. package/dist/atomic/components/stencil-query-suggestions.js.map +1 -1
  53. package/dist/atomic/components/stencil-suggestion-manager.js +2 -20
  54. package/dist/atomic/components/stencil-suggestion-manager.js.map +1 -1
  55. package/dist/atomic/components/{suggestions-events.js → suggestions-common.js} +20 -18
  56. package/dist/atomic/components/suggestions-common.js.map +1 -0
  57. package/dist/atomic/index.esm.js +1 -1
  58. package/dist/atomic/index.esm.js.map +1 -1
  59. package/dist/atomic/{p-75e00690.entry.js → p-089be992.entry.js} +2 -2
  60. package/dist/atomic/{p-4b3d253b.entry.js → p-09a3a067.entry.js} +2 -2
  61. package/dist/atomic/{p-3ac0a150.entry.js → p-11ff1517.entry.js} +2 -2
  62. package/dist/atomic/{p-7b899b57.entry.js → p-1d1f54a5.entry.js} +2 -2
  63. package/dist/atomic/p-1f22292a.entry.js +2 -0
  64. package/dist/atomic/p-1f22292a.entry.js.map +1 -0
  65. package/dist/atomic/p-29fd6768.js +2 -0
  66. package/dist/atomic/p-29fd6768.js.map +1 -0
  67. package/dist/atomic/{p-ae98c582.entry.js → p-2ce8220a.entry.js} +2 -2
  68. package/dist/atomic/{p-d0f47b33.entry.js → p-36e71b99.entry.js} +2 -2
  69. package/dist/atomic/p-36e71b99.entry.js.map +1 -0
  70. package/dist/atomic/{p-877d35b1.entry.js → p-3b023e83.entry.js} +2 -2
  71. package/dist/atomic/{p-01336eda.entry.js → p-4718485f.entry.js} +2 -2
  72. package/dist/atomic/{p-52ba404c.entry.js → p-49c38b27.entry.js} +2 -2
  73. package/dist/atomic/{p-992b3f11.entry.js → p-4b1fecf5.entry.js} +2 -2
  74. package/dist/atomic/{p-d00a12e9.entry.js → p-5f1fa581.entry.js} +2 -2
  75. package/dist/atomic/{p-ba4bf29f.entry.js → p-6329ff94.entry.js} +2 -2
  76. package/dist/atomic/{p-7383fd32.entry.js → p-6e6d686e.entry.js} +2 -2
  77. package/dist/atomic/p-7601c3de.js +2 -0
  78. package/dist/atomic/p-7601c3de.js.map +1 -0
  79. package/dist/atomic/{p-a760d9f9.entry.js → p-7e2109e9.entry.js} +2 -2
  80. package/dist/atomic/{p-26a51a77.entry.js → p-8867af82.entry.js} +2 -2
  81. package/dist/atomic/p-8867af82.entry.js.map +1 -0
  82. package/dist/atomic/{p-b28011e6.entry.js → p-89085429.entry.js} +2 -2
  83. package/dist/atomic/{p-39e63678.entry.js → p-89ab44de.entry.js} +2 -2
  84. package/dist/atomic/{p-1ef117be.js → p-8f8da1ef.js} +2 -2
  85. package/dist/atomic/{p-330e6e7c.entry.js → p-9c9b1965.entry.js} +2 -2
  86. package/dist/atomic/{p-78b70622.entry.js → p-a8882a2a.entry.js} +2 -2
  87. package/dist/atomic/{p-fbfe913d.entry.js → p-aa4224ea.entry.js} +2 -2
  88. package/dist/atomic/p-aa4224ea.entry.js.map +1 -0
  89. package/dist/atomic/p-ae6c5f54.entry.js +2 -0
  90. package/dist/atomic/p-ae6c5f54.entry.js.map +1 -0
  91. package/dist/atomic/p-af93b44c.js.map +1 -1
  92. package/dist/atomic/{p-f22bcb8c.entry.js → p-b6963bae.entry.js} +2 -2
  93. package/dist/atomic/{p-3c8d109e.entry.js → p-b7063a0d.entry.js} +2 -2
  94. package/dist/atomic/{p-e1cc5150.js → p-c280cd05.js} +1 -1
  95. package/dist/atomic/{p-7b0b9e9b.entry.js → p-f289269f.entry.js} +2 -2
  96. package/dist/atomic/{p-c49cfa0c.entry.js → p-fda26113.entry.js} +2 -2
  97. package/dist/cjs/_index.cjs.js +2 -5
  98. package/dist/cjs/_loader.cjs.js +1 -1
  99. package/dist/cjs/{analytics-config-32b7c6ab.js → analytics-config-25d3be01.js} +2 -2
  100. package/dist/cjs/{analytics-config-32b7c6ab.js.map → analytics-config-25d3be01.js.map} +1 -1
  101. package/dist/cjs/atomic-category-facet.cjs.entry.js +1 -1
  102. package/dist/cjs/atomic-facet.cjs.entry.js +1 -1
  103. package/dist/cjs/atomic-format-currency.cjs.entry.js +1 -1
  104. package/dist/cjs/atomic-format-number.cjs.entry.js +1 -1
  105. package/dist/cjs/atomic-format-unit.cjs.entry.js +1 -1
  106. package/dist/cjs/atomic-insight-history-toggle.cjs.entry.js +2 -2
  107. package/dist/cjs/atomic-insight-history-toggle.cjs.entry.js.map +1 -1
  108. package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
  109. package/dist/cjs/atomic-insight-search-box.cjs.entry.js +5 -5
  110. package/dist/cjs/atomic-insight-search-box.cjs.entry.js.map +1 -1
  111. package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js +2 -2
  112. package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js.map +1 -1
  113. package/dist/cjs/atomic-numeric-facet.cjs.entry.js +1 -1
  114. package/dist/cjs/atomic-quickview-modal.cjs.entry.js +1 -1
  115. package/dist/cjs/atomic-quickview.cjs.entry.js +1 -1
  116. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  117. package/dist/cjs/atomic-result-children.cjs.entry.js +1 -1
  118. package/dist/cjs/atomic-result-fields-list.cjs.entry.js +1 -1
  119. package/dist/cjs/atomic-result-link.cjs.entry.js +1 -1
  120. package/dist/cjs/atomic-result-list.cjs.entry.js +1 -1
  121. package/dist/cjs/atomic-search-box-instant-results.cjs.entry.js +3 -3
  122. package/dist/cjs/atomic-search-box-instant-results.cjs.entry.js.map +1 -1
  123. package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js +234 -0
  124. package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js.map +1 -0
  125. package/dist/cjs/atomic-search-box.cjs.entry.js +18 -7
  126. package/dist/cjs/atomic-search-box.cjs.entry.js.map +1 -1
  127. package/dist/cjs/atomic-search-interface.cjs.entry.js +1 -1
  128. package/dist/cjs/atomic-smart-snippet-feedback-modal.cjs.entry.js +2 -2
  129. package/dist/cjs/atomic-sort-dropdown.cjs.entry.js +2 -2
  130. package/dist/cjs/atomic-sort-expression.cjs.entry.js +1 -1
  131. package/dist/cjs/atomic-suggestion-renderer.cjs.entry.js +1 -1
  132. package/dist/cjs/atomic-suggestion-renderer.cjs.entry.js.map +1 -1
  133. package/dist/cjs/atomic-tab-manager.cjs.entry.js +1 -1
  134. package/dist/cjs/atomic.cjs.js +1 -1
  135. package/dist/cjs/clock-f03ff827.js +7 -0
  136. package/dist/cjs/clock-f03ff827.js.map +1 -0
  137. package/dist/cjs/index-757bc886.js +2 -2
  138. package/dist/cjs/index.cjs.js.map +1 -1
  139. package/dist/cjs/stencil-query-suggestions-03268ecc.js.map +1 -1
  140. package/dist/cjs/{stencil-suggestion-manager-2cba6d69.js → stencil-suggestion-manager-c0878ef2.js} +4 -4
  141. package/dist/cjs/{stencil-suggestion-manager-2cba6d69.js.map → stencil-suggestion-manager-c0878ef2.js.map} +1 -1
  142. package/dist/cjs/{suggestions-events-63dd0640.js → suggestions-common-5097a362.js} +21 -17
  143. package/dist/cjs/suggestions-common-5097a362.js.map +1 -0
  144. package/dist/cjs/version.cjs.js +2 -2
  145. package/dist/esm/_index.js +1 -2
  146. package/dist/esm/_loader.js +1 -1
  147. package/dist/esm/{analytics-config-709e0114.js → analytics-config-db964380.js} +2 -2
  148. package/dist/esm/{analytics-config-709e0114.js.map → analytics-config-db964380.js.map} +1 -1
  149. package/dist/esm/atomic-category-facet.entry.js +1 -1
  150. package/dist/esm/atomic-facet.entry.js +1 -1
  151. package/dist/esm/atomic-format-currency.entry.js +1 -1
  152. package/dist/esm/atomic-format-number.entry.js +1 -1
  153. package/dist/esm/atomic-format-unit.entry.js +1 -1
  154. package/dist/esm/atomic-insight-history-toggle.entry.js +2 -2
  155. package/dist/esm/atomic-insight-history-toggle.entry.js.map +1 -1
  156. package/dist/esm/atomic-insight-interface.entry.js +1 -1
  157. package/dist/esm/atomic-insight-search-box.entry.js +4 -4
  158. package/dist/esm/atomic-insight-search-box.entry.js.map +1 -1
  159. package/dist/esm/atomic-insight-user-actions-toggle.entry.js +2 -2
  160. package/dist/esm/atomic-insight-user-actions-toggle.entry.js.map +1 -1
  161. package/dist/esm/atomic-numeric-facet.entry.js +1 -1
  162. package/dist/esm/atomic-quickview-modal.entry.js +1 -1
  163. package/dist/esm/atomic-quickview.entry.js +1 -1
  164. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  165. package/dist/esm/atomic-result-children.entry.js +1 -1
  166. package/dist/esm/atomic-result-fields-list.entry.js +1 -1
  167. package/dist/esm/atomic-result-link.entry.js +1 -1
  168. package/dist/esm/atomic-result-list.entry.js +1 -1
  169. package/dist/esm/atomic-search-box-instant-results.entry.js +2 -2
  170. package/dist/esm/atomic-search-box-instant-results.entry.js.map +1 -1
  171. package/dist/esm/atomic-search-box-query-suggestions_2.entry.js +229 -0
  172. package/dist/esm/atomic-search-box-query-suggestions_2.entry.js.map +1 -0
  173. package/dist/esm/atomic-search-box.entry.js +17 -6
  174. package/dist/esm/atomic-search-box.entry.js.map +1 -1
  175. package/dist/esm/atomic-search-interface.entry.js +1 -1
  176. package/dist/esm/atomic-smart-snippet-feedback-modal.entry.js +2 -2
  177. package/dist/esm/atomic-sort-dropdown.entry.js +2 -2
  178. package/dist/esm/atomic-sort-expression.entry.js +1 -1
  179. package/dist/esm/atomic-suggestion-renderer.entry.js +1 -1
  180. package/dist/esm/atomic-suggestion-renderer.entry.js.map +1 -1
  181. package/dist/esm/atomic-tab-manager.entry.js +1 -1
  182. package/dist/esm/atomic.js +1 -1
  183. package/dist/esm/clock-add3e9a5.js +5 -0
  184. package/dist/esm/clock-add3e9a5.js.map +1 -0
  185. package/dist/esm/index-3f35faca.js +2 -2
  186. package/dist/esm/index.js.map +1 -1
  187. package/dist/esm/stencil-query-suggestions-5d6a46d7.js.map +1 -1
  188. package/dist/esm/{stencil-suggestion-manager-376f83e8.js → stencil-suggestion-manager-486094dd.js} +2 -2
  189. package/dist/esm/{stencil-suggestion-manager-376f83e8.js.map → stencil-suggestion-manager-486094dd.js.map} +1 -1
  190. package/dist/esm/{suggestions-events-b7a6f007.js → suggestions-common-2b20db26.js} +20 -18
  191. package/dist/esm/suggestions-common-2b20db26.js.map +1 -0
  192. package/dist/esm/version.js +2 -2
  193. package/dist/types/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.d.ts +1 -0
  194. package/dist/types/components/commerce/atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products.d.ts +1 -1
  195. package/dist/types/components/commerce/atomic-commerce-search-box-query-suggestions/atomic-commerce-search-box-query-suggestions.d.ts +1 -1
  196. package/dist/types/components/commerce/atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.d.ts +1 -1
  197. package/dist/types/components/common/atomic-suggestion-renderer/atomic-suggestion-renderer.d.ts +1 -1
  198. package/dist/types/components/common/suggestions/instant-item.d.ts +1 -1
  199. package/dist/types/components/common/suggestions/query-suggestions.d.ts +1 -1
  200. package/dist/types/components/common/suggestions/recent-queries.d.ts +1 -1
  201. package/dist/types/components/common/suggestions/stencil-instant-item.d.ts +1 -1
  202. package/dist/types/components/common/suggestions/stencil-query-suggestions.d.ts +1 -1
  203. package/dist/types/components/common/suggestions/stencil-recent-queries.d.ts +1 -1
  204. package/dist/types/components/common/suggestions/stencil-suggestion-manager.d.ts +1 -1
  205. package/dist/types/components/common/suggestions/suggestion-manager.d.ts +1 -1
  206. package/dist/types/components/common/suggestions/{suggestions-types.d.ts → suggestions-common.d.ts} +16 -6
  207. package/dist/types/components/search/atomic-search-box/atomic-search-box.d.ts +2 -1
  208. package/dist/types/components/search/index.d.ts +0 -1
  209. package/dist/types/components/search/search-box-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results.d.ts +1 -1
  210. package/dist/types/components/search/{atomic-search-box-recent-queries → search-box-suggestions/atomic-search-box-recent-queries}/atomic-search-box-recent-queries.d.ts +7 -15
  211. package/dist/types/components.d.ts +51 -2
  212. package/dist/types/decorators/types.d.ts +1 -1
  213. package/dist/types/index.d.ts +1 -3
  214. package/docs/atomic-docs.json +100 -3
  215. package/package.json +3 -3
  216. package/dist/atomic/components/components/common/suggestions/suggestions-types.js +0 -1
  217. package/dist/atomic/components/components/common/suggestions/suggestions-utils.js +0 -18
  218. package/dist/atomic/components/components/search/atomic-search-box-recent-queries/atomic-search-box-recent-queries.js +0 -139
  219. package/dist/atomic/components/suggestions-events.js.map +0 -1
  220. package/dist/atomic/p-0a051b8d.js +0 -2
  221. package/dist/atomic/p-0a051b8d.js.map +0 -1
  222. package/dist/atomic/p-16f4ce98.js +0 -2
  223. package/dist/atomic/p-16f4ce98.js.map +0 -1
  224. package/dist/atomic/p-26a51a77.entry.js.map +0 -1
  225. package/dist/atomic/p-2e9db4ca.entry.js +0 -2
  226. package/dist/atomic/p-2e9db4ca.entry.js.map +0 -1
  227. package/dist/atomic/p-4b7a19db.js +0 -2
  228. package/dist/atomic/p-4b7a19db.js.map +0 -1
  229. package/dist/atomic/p-c88a3d2d.entry.js +0 -2
  230. package/dist/atomic/p-c88a3d2d.entry.js.map +0 -1
  231. package/dist/atomic/p-d0f47b33.entry.js.map +0 -1
  232. package/dist/atomic/p-fbfe913d.entry.js.map +0 -1
  233. package/dist/cjs/atomic-search-box-query-suggestions.cjs.entry.js +0 -76
  234. package/dist/cjs/atomic-search-box-query-suggestions.cjs.entry.js.map +0 -1
  235. package/dist/cjs/clock-7aeb19d0.js +0 -7
  236. package/dist/cjs/clock-7aeb19d0.js.map +0 -1
  237. package/dist/cjs/suggestions-events-63dd0640.js.map +0 -1
  238. package/dist/cjs/suggestions-utils-61000808.js +0 -25
  239. package/dist/cjs/suggestions-utils-61000808.js.map +0 -1
  240. package/dist/esm/atomic-search-box-query-suggestions.entry.js +0 -72
  241. package/dist/esm/atomic-search-box-query-suggestions.entry.js.map +0 -1
  242. package/dist/esm/clock-b1f5d7f7.js +0 -5
  243. package/dist/esm/clock-b1f5d7f7.js.map +0 -1
  244. package/dist/esm/suggestions-events-b7a6f007.js.map +0 -1
  245. package/dist/esm/suggestions-utils-591559a0.js +0 -22
  246. package/dist/esm/suggestions-utils-591559a0.js.map +0 -1
  247. package/dist/types/components/common/suggestions/suggestions-events.d.ts +0 -14
  248. package/dist/types/components/common/suggestions/suggestions-utils.d.ts +0 -15
  249. /package/dist/atomic/{p-75e00690.entry.js.map → p-089be992.entry.js.map} +0 -0
  250. /package/dist/atomic/{p-4b3d253b.entry.js.map → p-09a3a067.entry.js.map} +0 -0
  251. /package/dist/atomic/{p-3ac0a150.entry.js.map → p-11ff1517.entry.js.map} +0 -0
  252. /package/dist/atomic/{p-7b899b57.entry.js.map → p-1d1f54a5.entry.js.map} +0 -0
  253. /package/dist/atomic/{p-ae98c582.entry.js.map → p-2ce8220a.entry.js.map} +0 -0
  254. /package/dist/atomic/{p-877d35b1.entry.js.map → p-3b023e83.entry.js.map} +0 -0
  255. /package/dist/atomic/{p-01336eda.entry.js.map → p-4718485f.entry.js.map} +0 -0
  256. /package/dist/atomic/{p-52ba404c.entry.js.map → p-49c38b27.entry.js.map} +0 -0
  257. /package/dist/atomic/{p-992b3f11.entry.js.map → p-4b1fecf5.entry.js.map} +0 -0
  258. /package/dist/atomic/{p-d00a12e9.entry.js.map → p-5f1fa581.entry.js.map} +0 -0
  259. /package/dist/atomic/{p-ba4bf29f.entry.js.map → p-6329ff94.entry.js.map} +0 -0
  260. /package/dist/atomic/{p-7383fd32.entry.js.map → p-6e6d686e.entry.js.map} +0 -0
  261. /package/dist/atomic/{p-a760d9f9.entry.js.map → p-7e2109e9.entry.js.map} +0 -0
  262. /package/dist/atomic/{p-b28011e6.entry.js.map → p-89085429.entry.js.map} +0 -0
  263. /package/dist/atomic/{p-39e63678.entry.js.map → p-89ab44de.entry.js.map} +0 -0
  264. /package/dist/atomic/{p-1ef117be.js.map → p-8f8da1ef.js.map} +0 -0
  265. /package/dist/atomic/{p-330e6e7c.entry.js.map → p-9c9b1965.entry.js.map} +0 -0
  266. /package/dist/atomic/{p-78b70622.entry.js.map → p-a8882a2a.entry.js.map} +0 -0
  267. /package/dist/atomic/{p-f22bcb8c.entry.js.map → p-b6963bae.entry.js.map} +0 -0
  268. /package/dist/atomic/{p-3c8d109e.entry.js.map → p-b7063a0d.entry.js.map} +0 -0
  269. /package/dist/atomic/{p-e1cc5150.js.map → p-c280cd05.js.map} +0 -0
  270. /package/dist/atomic/{p-7b0b9e9b.entry.js.map → p-f289269f.entry.js.map} +0 -0
  271. /package/dist/atomic/{p-c49cfa0c.entry.js.map → p-fda26113.entry.js.map} +0 -0
@@ -1,22 +1,6 @@
1
1
  import { c as closest } from './dom-utils-f6086cd3.js';
2
2
  import { b as buildCustomEvent } from './event-utils-8de63ec3.js';
3
3
 
4
- /**
5
- * Dispatches an event which retrieves the `SearchBoxSuggestionsBindings` on a configured parent search box.
6
- *
7
- * @param event Event sent from the registered query suggestions to the parent search box
8
- * @param element Element on which to dispatch the event, which must be the child of a configured search box
9
- * @param allowedSearchBoxElements Optional array of allowed search box element selectors
10
- *
11
- * @throws Error if the element is not a child of an allowed search box element
12
- */
13
- const dispatchSearchBoxSuggestionsEvent = (event, element, allowedSearchBoxElements = searchBoxElements) => {
14
- const interfaceElement = closest(element, searchBoxElements.join(', '));
15
- if (!interfaceElement) {
16
- throw new Error(`The "${element.nodeName.toLowerCase()}" component was not handled, as it is not a child of the following elements: ${allowedSearchBoxElements.join(', ')}`);
17
- }
18
- void dispatchSearchBoxSuggestionsEventEventually(interfaceElement, element, event);
19
- };
20
4
  const searchBoxElements = [
21
5
  'atomic-search-box',
22
6
  'atomic-insight-search-box',
@@ -34,7 +18,25 @@ const dispatchSearchBoxSuggestionsEventEventually = async (interfaceElement, ele
34
18
  }
35
19
  element.dispatchEvent(buildCustomEvent('atomic/searchBoxSuggestion/register', event));
36
20
  };
21
+ /**
22
+ * Dispatches an event which retrieves the `SearchBoxSuggestionsBindings` on a configured parent search box.
23
+ * @param event Event sent from the registered query suggestions to the parent search box.
24
+ * @param element Element on which to dispatch the event, which must be the child of a configured search box.
25
+ */
26
+ const dispatchSearchBoxSuggestionsEvent = (event, element, allowedSearchBoxElements = searchBoxElements) => {
27
+ const interfaceElement = closest(element, searchBoxElements.join(', '));
28
+ if (!interfaceElement) {
29
+ throw new Error(`The "${element.nodeName.toLowerCase()}" component was not handled, as it is not a child of the following elements: ${allowedSearchBoxElements.join(', ')}`);
30
+ }
31
+ void dispatchSearchBoxSuggestionsEventEventually(interfaceElement, element, event);
32
+ };
33
+ function elementHasNoQuery(el) {
34
+ return !el.query || el.query.trim() === '';
35
+ }
36
+ function elementHasQuery(el) {
37
+ return !!el.query && el.query.trim() !== '';
38
+ }
37
39
 
38
- export { dispatchSearchBoxSuggestionsEvent as d };
40
+ export { elementHasNoQuery as a, dispatchSearchBoxSuggestionsEvent as d, elementHasQuery as e };
39
41
 
40
- //# sourceMappingURL=suggestions-events-b7a6f007.js.map
42
+ //# sourceMappingURL=suggestions-common-2b20db26.js.map
@@ -0,0 +1 @@
1
+ {"file":"suggestions-common-2b20db26.js","mappings":";;;AA0FA,MAAM,iBAAiB,GAAG;IACxB,mBAAmB;IACnB,2BAA2B;IAC3B,4BAA4B;CACpB,CAAC;AAoDX,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,CAAC;AAEF;;;;;MAKa,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;SAEc,iBAAiB,CAAC,EAA8B;IAC9D,OAAO,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;AAC7C,CAAC;SAEe,eAAe,CAAC,EAA8B;IAC5D,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;AAC9C;;;;","names":[],"sources":["src/components/common/suggestions/suggestions-common.ts"],"sourcesContent":["import type {VNode} from '@stencil/core';\nimport 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';\n\n/**\n * Element which will be rendered in the list of suggestions.\n */\nexport interface SearchBoxSuggestionElement {\n /**\n * Stable identity which enables Stencil to reuse DOM elements for better performance.\n * The best way to pick a key is to use a string that uniquely identifies that list item among its siblings (often your data will already have IDs).\n */\n key: string;\n /**\n * Rendered content of the element.\n *\n * @remarks\n * The `VNode` type will be deprecated in v4 as we are detaching from Stencil.\n */\n content: Element | VNode;\n /**\n * Hook called when the selection is selected.\n * @param e DOM event.\n */\n onSelect?(e: Event): void;\n /**\n * The query associated with the suggestion which will replace the query in the search box if the suggestion is selected.\n */\n query?: string;\n /**\n * For improved accessibility, provide this property with additional information.\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label\n */\n ariaLabel?: string;\n /**\n * Adds a specific shadow part attribute that can be selected with the CSS ::part pseudo-element.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/::part\n */\n part?: string;\n /**\n * Hide the suggestion if it's the last in the list.\n */\n hideIfLast?: boolean;\n}\n\n/**\n * List of suggestions that will be displayed along other lists (e.g recent queries) when the search box's input is selected.\n */\nexport interface SearchBoxSuggestions {\n /**\n * The search box will sort the position of suggestions using this value. The lowest value being first.\n * By default, the DOM position will be used.\n */\n position: number;\n /**\n * Whether the suggestions should be listed in the right or left panel. By default, the suggestions are listed in the right panel.\n */\n panel?: 'left' | 'right';\n /**\n * Method that returns the list of elements which will be rendered in the list of suggestions.\n */\n renderItems(): SearchBoxSuggestionElement[];\n /**\n * Hook called when the user changes the search box's input value. This can lead to all the query suggestions being updated.\n */\n onInput?(): Promise<unknown>;\n /**\n * Hook called when the suggested query changes as a user traverses through the list of suggestions.\n * This is used for instant results, which are rendered based on the current suggested query.\n * @param q The new suggested query.\n */\n onSuggestedQueryChange?(q: string): Promise<unknown>;\n}\n\n/**\n * Event sent from the registered query suggestions to the parent search box.\n */\nexport type SearchBoxSuggestionsEvent<\n SearchBoxController,\n Bindings = AnyBindings,\n> = (\n /**\n * The bindings passed from the search box to the suggestions.\n */\n bindings: SearchBoxSuggestionsBindings<SearchBoxController, Bindings>\n) => SearchBoxSuggestions;\n\nconst searchBoxElements = [\n 'atomic-search-box',\n 'atomic-insight-search-box',\n 'atomic-commerce-search-box',\n] as const;\n\n/**\n * The bindings passed from the search box to the suggestions.\n */\nexport type SearchBoxSuggestionsBindings<\n SearchBoxController,\n Bindings = AnyBindings,\n> = Bindings & {\n /**\n * The unique id of the search box.\n */\n id: string;\n /**\n * Whether the search box is [standalone](https://docs.coveo.com/en/atomic/latest/usage/ssb/).\n */\n isStandalone: boolean;\n /**\n * The search box headless controller.\n */\n searchBoxController: SearchBoxController;\n /**\n * The number of queries to display when the user interacts with the search box.\n */\n numberOfQueries: number;\n /**\n * Whether to clear all active query filters when the end user submits a new query from the search box.\n */\n clearFilters: boolean;\n /**\n * Retrieves the suggested query, meaning the query that would be sent if the search is executed.\n * The suggested query changes as a user traverses through the list of suggestions.\n */\n suggestedQuery(): string;\n /**\n * Removes the current suggestions.\n */\n clearSuggestions(): void;\n /**\n * Triggers update & retrieval of all suggestions.\n */\n triggerSuggestions(): void;\n /**\n * Retrieves the current suggestions.\n */\n getSuggestions(): SearchBoxSuggestions[];\n /**\n * Retrieves the current suggestions elements.\n */\n getSuggestionElements(): SearchBoxSuggestionElement[];\n};\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\n/**\n * Dispatches an event which retrieves the `SearchBoxSuggestionsBindings` on a configured parent search box.\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 */\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\nexport function elementHasNoQuery(el: SearchBoxSuggestionElement) {\n return !el.query || el.query.trim() === '';\n}\n\nexport function elementHasQuery(el: SearchBoxSuggestionElement) {\n return !!el.query && el.query.trim() !== '';\n}\n"],"version":3}
@@ -1,2 +1,2 @@
1
- export const headlessVersion = '3.31.1-pre.9cacc0cb9c';
2
- export const atomicVersion = '3.33.8-pre.9cacc0cb9c';
1
+ export const headlessVersion = '3.31.0';
2
+ export const atomicVersion = '3.33.8-pre.a40e031589';
@@ -137,6 +137,7 @@ export declare class AtomicCommerceSearchBox extends LitElement implements Initi
137
137
  private renderSuggestions;
138
138
  private renderPanel;
139
139
  private renderSuggestion;
140
+ private renderSlotContent;
140
141
  render(): import("lit-html").TemplateResult<1>;
141
142
  }
142
143
  declare global {
@@ -2,7 +2,7 @@ import { type Product, type SearchBox } from '@coveo/headless/commerce';
2
2
  import { LitElement } from 'lit';
3
3
  import type { ItemRenderingFunction } from "../../common/item-list/item-list-common";
4
4
  import type { ItemDisplayDensity, ItemDisplayImageSize } from "../../common/layout/display-options";
5
- import type { SearchBoxSuggestions, SearchBoxSuggestionsBindings } from "../../common/suggestions/suggestions-types";
5
+ import { type SearchBoxSuggestions, type SearchBoxSuggestionsBindings } from "../../common/suggestions/suggestions-common";
6
6
  import type { SearchBoxSuggestionsComponent } from "../../../decorators/types";
7
7
  import type { CommerceBindings } from '../atomic-commerce-interface/atomic-commerce-interface';
8
8
  export type AriaLabelGenerator = (bindings: CommerceBindings, product: Product) => string | undefined;
@@ -1,6 +1,6 @@
1
1
  import { type SearchBox } from '@coveo/headless/commerce';
2
2
  import { LitElement } from 'lit';
3
- import type { SearchBoxSuggestions, SearchBoxSuggestionsBindings } from "../../common/suggestions/suggestions-types";
3
+ import { type SearchBoxSuggestions, type SearchBoxSuggestionsBindings } from "../../common/suggestions/suggestions-common";
4
4
  import type { SearchBoxSuggestionsComponent } from "../../../decorators/types";
5
5
  import type { CommerceBindings } from '../atomic-commerce-interface/atomic-commerce-interface';
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  import { type SearchBox } from '@coveo/headless/commerce';
2
2
  import { LitElement } from 'lit';
3
3
  import type { SearchBoxSuggestionsComponent } from "../../../decorators/types";
4
- import type { SearchBoxSuggestions, SearchBoxSuggestionsBindings } from '../../common/suggestions/suggestions-types';
4
+ import { type SearchBoxSuggestions, type SearchBoxSuggestionsBindings } from '../../common/suggestions/suggestions-common';
5
5
  import type { CommerceBindings } from '../atomic-commerce-interface/atomic-commerce-interface';
6
6
  /**
7
7
  * The `atomic-commerce-search-box-recent-queries` component can be added as a child of an `atomic-commerce-search-box` component, allowing for the configuration of recent query suggestions.
@@ -1,5 +1,5 @@
1
1
  import { i18n } from 'i18next';
2
- import { SearchBoxSuggestionElement } from '../suggestions/suggestions-types';
2
+ import { SearchBoxSuggestionElement } from '../suggestions/suggestions-common';
3
3
  /**
4
4
  * The `atomic-suggestion-renderer` component is used to render individual suggestions. It was created to isolate
5
5
  * the rendering logic of the 'content' property of the `SearchBoxSuggestionElement` interface. This property can be Stencil
@@ -1,5 +1,5 @@
1
1
  import type { i18n } from 'i18next';
2
- import type { SearchBoxSuggestionElement } from './suggestions-types';
2
+ import type { SearchBoxSuggestionElement } from './suggestions-common';
3
3
  export declare const getPartialInstantItemElement: (i18n: i18n, itemTitle: string, itemUniqueId: string) => Pick<SearchBoxSuggestionElement, "ariaLabel" | "key" | "part">;
4
4
  export declare const getPartialInstantItemShowAllElement: (i18n: i18n) => Pick<SearchBoxSuggestionElement, "key" | "part" | "ariaLabel">;
5
5
  interface InstantItemShowAllButtonProps {
@@ -1,5 +1,5 @@
1
1
  import type { i18n } from 'i18next';
2
- import type { SearchBoxSuggestionElement } from './suggestions-types.js';
2
+ import type { SearchBoxSuggestionElement } from './suggestions-common.js';
3
3
  interface Suggestion {
4
4
  highlightedValue: string;
5
5
  rawValue: string;
@@ -1,5 +1,5 @@
1
1
  import type { i18n } from 'i18next';
2
- import type { SearchBoxSuggestionElement } from './suggestions-types';
2
+ import type { SearchBoxSuggestionElement } from './suggestions-common';
3
3
  export declare const getPartialRecentQueryElement: (value: string, i18n: i18n) => Pick<SearchBoxSuggestionElement, "ariaLabel" | "key" | "query" | "part">;
4
4
  export declare const getPartialRecentQueryClearElement: (i18n: i18n) => Pick<SearchBoxSuggestionElement, "ariaLabel" | "key" | "part" | "hideIfLast">;
5
5
  export interface RecentQueriesContainerProps {
@@ -1,6 +1,6 @@
1
1
  import { FunctionalComponent } from '../../../stencil-public-runtime';
2
2
  import { i18n } from 'i18next';
3
- import { SearchBoxSuggestionElement } from './suggestions-types';
3
+ import { SearchBoxSuggestionElement } from './suggestions-common';
4
4
  export declare const getPartialInstantItemElement: (i18n: i18n, itemTitle: string, itemUniqueId: string) => Pick<SearchBoxSuggestionElement, "ariaLabel" | "key" | "part">;
5
5
  export declare const getPartialInstantItemShowAllElement: (i18n: i18n) => Pick<SearchBoxSuggestionElement, "key" | "part" | "ariaLabel">;
6
6
  interface InstantItemShowAllButtonProps {
@@ -1,6 +1,6 @@
1
1
  import { FunctionalComponent } from '../../../stencil-public-runtime';
2
2
  import { i18n } from 'i18next';
3
- import { SearchBoxSuggestionElement } from './suggestions-types.js';
3
+ import { SearchBoxSuggestionElement } from './suggestions-common.js';
4
4
  interface Suggestion {
5
5
  highlightedValue: string;
6
6
  rawValue: string;
@@ -1,6 +1,6 @@
1
1
  import { FunctionalComponent } from '../../../stencil-public-runtime';
2
2
  import { i18n } from 'i18next';
3
- import { SearchBoxSuggestionElement } from './suggestions-types';
3
+ import { SearchBoxSuggestionElement } from './suggestions-common';
4
4
  export declare const getPartialRecentQueryElement: (value: string, i18n: i18n) => Pick<SearchBoxSuggestionElement, "ariaLabel" | "key" | "query" | "part">;
5
5
  export declare const getPartialRecentQueryClearElement: (i18n: i18n) => Pick<SearchBoxSuggestionElement, "ariaLabel" | "key" | "part" | "hideIfLast">;
6
6
  export declare const RecentQueriesContainer: FunctionalComponent;
@@ -1,4 +1,4 @@
1
- import type { SearchBoxSuggestionElement, SearchBoxSuggestionsBindings, SearchBoxSuggestionsEvent } from './suggestions-types';
1
+ import { type SearchBoxSuggestionElement, type SearchBoxSuggestionsBindings, type SearchBoxSuggestionsEvent } from './suggestions-common';
2
2
  /**
3
3
  * List of suggestions that will be displayed along other lists (e.g recent queries) when the search box's input is selected.
4
4
  */
@@ -1,5 +1,5 @@
1
1
  import type { LitElement } from 'lit';
2
- import type { SearchBoxSuggestionElement, SearchBoxSuggestionsBindings, SearchBoxSuggestionsEvent } from './suggestions-types';
2
+ import { type SearchBoxSuggestionElement, type SearchBoxSuggestionsBindings, type SearchBoxSuggestionsEvent } from './suggestions-common';
3
3
  /**
4
4
  * List of suggestions that will be displayed along other lists (e.g recent queries) when the search box's input is selected.
5
5
  */
@@ -68,6 +68,15 @@ export interface SearchBoxSuggestions {
68
68
  */
69
69
  onSuggestedQueryChange?(q: string): Promise<unknown>;
70
70
  }
71
+ /**
72
+ * Event sent from the registered query suggestions to the parent search box.
73
+ */
74
+ export type SearchBoxSuggestionsEvent<SearchBoxController, Bindings = AnyBindings> = (
75
+ /**
76
+ * The bindings passed from the search box to the suggestions.
77
+ */
78
+ bindings: SearchBoxSuggestionsBindings<SearchBoxController, Bindings>) => SearchBoxSuggestions;
79
+ declare const searchBoxElements: readonly ["atomic-search-box", "atomic-insight-search-box", "atomic-commerce-search-box"];
71
80
  /**
72
81
  * The bindings passed from the search box to the suggestions.
73
82
  */
@@ -115,10 +124,11 @@ export type SearchBoxSuggestionsBindings<SearchBoxController, Bindings = AnyBind
115
124
  getSuggestionElements(): SearchBoxSuggestionElement[];
116
125
  };
117
126
  /**
118
- * Event sent from the registered query suggestions to the parent search box.
127
+ * Dispatches an event which retrieves the `SearchBoxSuggestionsBindings` on a configured parent search box.
128
+ * @param event Event sent from the registered query suggestions to the parent search box.
129
+ * @param element Element on which to dispatch the event, which must be the child of a configured search box.
119
130
  */
120
- export type SearchBoxSuggestionsEvent<SearchBoxController, Bindings = AnyBindings> = (
121
- /**
122
- * The bindings passed from the search box to the suggestions.
123
- */
124
- bindings: SearchBoxSuggestionsBindings<SearchBoxController, Bindings>) => SearchBoxSuggestions;
131
+ export declare const dispatchSearchBoxSuggestionsEvent: <SearchBoxController, Bindings = AnyBindings>(event: SearchBoxSuggestionsEvent<SearchBoxController, Bindings>, element: HTMLElement, allowedSearchBoxElements?: readonly (typeof searchBoxElements)[number][]) => void;
132
+ export declare function elementHasNoQuery(el: SearchBoxSuggestionElement): boolean;
133
+ export declare function elementHasQuery(el: SearchBoxSuggestionElement): boolean;
134
+ export {};
@@ -2,7 +2,7 @@ import { SearchBox, StandaloneSearchBox } from '@coveo/headless';
2
2
  import { EventEmitter } from '../../../stencil-public-runtime';
3
3
  import { InitializableComponent } from '../../../utils/initialization-utils';
4
4
  import { RedirectionPayload } from '../../common/search-box/redirection-payload';
5
- import type { SearchBoxSuggestionsEvent } from '../../common/suggestions/suggestions-types';
5
+ import { SearchBoxSuggestionsEvent } from '../../common/suggestions/suggestions-common';
6
6
  import { Bindings } from '../atomic-search-interface/atomic-search-interface';
7
7
  /**
8
8
  * The `atomic-search-box` component creates a search box with built-in support for suggestions.
@@ -161,5 +161,6 @@ export declare class AtomicSearchBox implements InitializableComponent<Bindings>
161
161
  private getSearchInputLabel;
162
162
  private announceNewActiveSuggestionToScreenReader;
163
163
  private announceNewSuggestionsToScreenReader;
164
+ private renderSlotContent;
164
165
  render(): any;
165
166
  }
@@ -1,4 +1,3 @@
1
1
  export { AtomicQuerySummary } from './atomic-query-summary/atomic-query-summary.js';
2
2
  export { AtomicResultsPerPage } from './atomic-results-per-page/atomic-results-per-page.js';
3
- export { AtomicSearchBoxRecentQueries } from './atomic-search-box-recent-queries/atomic-search-box-recent-queries.js';
4
3
  export { AtomicSearchLayout } from './atomic-search-layout/atomic-search-layout.js';
@@ -2,7 +2,7 @@ import { Result, SearchBox } from '@coveo/headless';
2
2
  import { InitializableComponent } from '../../../../utils/initialization-utils';
3
3
  import { ItemRenderingFunction } from '../../../common/item-list/stencil-item-list-common';
4
4
  import { ItemDisplayDensity, ItemDisplayImageSize } from '../../../common/layout/display-options';
5
- import type { SearchBoxSuggestions, SearchBoxSuggestionsBindings } from '../../../common/suggestions/suggestions-types';
5
+ import { SearchBoxSuggestions, SearchBoxSuggestionsBindings } from '../../../common/suggestions/suggestions-common';
6
6
  import { Bindings } from '../../atomic-search-interface/atomic-search-interface';
7
7
  export type AriaLabelGenerator = (bindings: Bindings, result: Result) => string | undefined;
8
8
  /**
@@ -1,15 +1,11 @@
1
- import { type SearchBox } from '@coveo/headless';
2
- import { LitElement } from 'lit';
3
- import type { SearchBoxSuggestionsComponent } from "../../../decorators/types";
4
- import type { SearchBoxSuggestions, SearchBoxSuggestionsBindings } from '../../common/suggestions/suggestions-types';
5
- import type { Bindings } from '../atomic-search-interface/interfaces';
6
1
  /**
7
2
  * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
8
3
  */
9
- export declare class AtomicSearchBoxRecentQueries extends LitElement implements SearchBoxSuggestionsComponent<Bindings> {
10
- bindings: SearchBoxSuggestionsBindings<SearchBox, Bindings>;
4
+ export declare class AtomicSearchBoxRecentQueries {
5
+ private bindings;
11
6
  private recentQueriesList;
12
7
  private storage;
8
+ private host;
13
9
  error: Error;
14
10
  /**
15
11
  * The SVG icon to display.
@@ -27,8 +23,9 @@ export declare class AtomicSearchBoxRecentQueries extends LitElement implements
27
23
  * The maximum number of suggestions that will be displayed initially when the input field is empty.
28
24
  */
29
25
  maxWithoutQuery?: number;
30
- connectedCallback(): void;
31
- initialize(): SearchBoxSuggestions;
26
+ componentWillLoad(): void;
27
+ private renderIcon;
28
+ private initialize;
32
29
  private retrieveLocalStorage;
33
30
  private updateLocalStorage;
34
31
  private warnUser;
@@ -36,10 +33,5 @@ export declare class AtomicSearchBoxRecentQueries extends LitElement implements
36
33
  private renderItems;
37
34
  private renderClear;
38
35
  private renderItem;
39
- render(): import("lit-html").TemplateResult<1>;
40
- }
41
- declare global {
42
- interface HTMLElementTagNameMap {
43
- 'atomic-search-box-recent-queries': AtomicSearchBoxRecentQueries;
44
- }
36
+ render(): any;
45
37
  }
@@ -26,7 +26,7 @@ import { RedirectionPayload } from "./components/common/search-box/redirection-p
26
26
  import { AriaLabelGenerator } from "./components/search/search-box-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results";
27
27
  import { InitializationOptions } from "./components/search/atomic-search-interface/atomic-search-interface";
28
28
  import { StandaloneSearchBoxData } from "./utils/local-storage-utils";
29
- import { SearchBoxSuggestionElement } from "./components/common/suggestions/suggestions-types";
29
+ import { SearchBoxSuggestionElement } from "./components/common/suggestions/suggestions-common";
30
30
  export { AutomaticFacet, CategoryFacetSortCriterion, DateFilterRange, DateRangeRequest, FacetResultsMustMatch, FacetSortCriterion, FoldedResult, GeneratedAnswer, GeneratedAnswerCitation, InlineLink, InteractiveCitation, InteractiveResult, LogLevel, NumericFilter, NumericFilterState, RangeFacetRangeAlgorithm, RangeFacetSortCriterion, RelativeDateUnit, Result, ResultTemplate, ResultTemplateCondition, SearchEngine, SearchStatus } from "@coveo/headless";
31
31
  export { AtomicInterface } from "./utils/initialization-utils";
32
32
  export { AnyBindings } from "./components/common/interface/bindings";
@@ -48,7 +48,7 @@ export { RedirectionPayload } from "./components/common/search-box/redirection-p
48
48
  export { AriaLabelGenerator } from "./components/search/search-box-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results";
49
49
  export { InitializationOptions } from "./components/search/atomic-search-interface/atomic-search-interface";
50
50
  export { StandaloneSearchBoxData } from "./utils/local-storage-utils";
51
- export { SearchBoxSuggestionElement } from "./components/common/suggestions/suggestions-types";
51
+ export { SearchBoxSuggestionElement } from "./components/common/suggestions/suggestions-common";
52
52
  export namespace Components {
53
53
  /**
54
54
  * An automatic facet is a special type of facet generated by the automatic facets feature.
@@ -2432,6 +2432,23 @@ export namespace Components {
2432
2432
  */
2433
2433
  "maxWithoutQuery"?: number;
2434
2434
  }
2435
+ /**
2436
+ * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
2437
+ */
2438
+ interface AtomicSearchBoxRecentQueries {
2439
+ /**
2440
+ * The SVG icon to display. - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location. - Use a value that starts with `assets://`, to display an icon from the Atomic package. - Use a stringified SVG to display it directly.
2441
+ */
2442
+ "icon"?: string;
2443
+ /**
2444
+ * The maximum number of suggestions that will be displayed if the user has typed something into the input field.
2445
+ */
2446
+ "maxWithQuery": number;
2447
+ /**
2448
+ * The maximum number of suggestions that will be displayed initially when the input field is empty.
2449
+ */
2450
+ "maxWithoutQuery"?: number;
2451
+ }
2435
2452
  /**
2436
2453
  * The `atomic-search-interface` component is the parent to all other atomic components in a search page. It handles the headless search engine and localization configurations.
2437
2454
  */
@@ -4186,6 +4203,15 @@ declare global {
4186
4203
  prototype: HTMLAtomicSearchBoxQuerySuggestionsElement;
4187
4204
  new (): HTMLAtomicSearchBoxQuerySuggestionsElement;
4188
4205
  };
4206
+ /**
4207
+ * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
4208
+ */
4209
+ interface HTMLAtomicSearchBoxRecentQueriesElement extends Components.AtomicSearchBoxRecentQueries, HTMLStencilElement {
4210
+ }
4211
+ var HTMLAtomicSearchBoxRecentQueriesElement: {
4212
+ prototype: HTMLAtomicSearchBoxRecentQueriesElement;
4213
+ new (): HTMLAtomicSearchBoxRecentQueriesElement;
4214
+ };
4189
4215
  /**
4190
4216
  * The `atomic-search-interface` component is the parent to all other atomic components in a search page. It handles the headless search engine and localization configurations.
4191
4217
  */
@@ -4590,6 +4616,7 @@ declare global {
4590
4616
  "atomic-search-box": HTMLAtomicSearchBoxElement;
4591
4617
  "atomic-search-box-instant-results": HTMLAtomicSearchBoxInstantResultsElement;
4592
4618
  "atomic-search-box-query-suggestions": HTMLAtomicSearchBoxQuerySuggestionsElement;
4619
+ "atomic-search-box-recent-queries": HTMLAtomicSearchBoxRecentQueriesElement;
4593
4620
  "atomic-search-interface": HTMLAtomicSearchInterfaceElement;
4594
4621
  "atomic-segmented-facet": HTMLAtomicSegmentedFacetElement;
4595
4622
  "atomic-segmented-facet-scrollable": HTMLAtomicSegmentedFacetScrollableElement;
@@ -6872,6 +6899,23 @@ declare namespace LocalJSX {
6872
6899
  */
6873
6900
  "maxWithoutQuery"?: number;
6874
6901
  }
6902
+ /**
6903
+ * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
6904
+ */
6905
+ interface AtomicSearchBoxRecentQueries {
6906
+ /**
6907
+ * The SVG icon to display. - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location. - Use a value that starts with `assets://`, to display an icon from the Atomic package. - Use a stringified SVG to display it directly.
6908
+ */
6909
+ "icon"?: string;
6910
+ /**
6911
+ * The maximum number of suggestions that will be displayed if the user has typed something into the input field.
6912
+ */
6913
+ "maxWithQuery"?: number;
6914
+ /**
6915
+ * The maximum number of suggestions that will be displayed initially when the input field is empty.
6916
+ */
6917
+ "maxWithoutQuery"?: number;
6918
+ }
6875
6919
  /**
6876
6920
  * The `atomic-search-interface` component is the parent to all other atomic components in a search page. It handles the headless search engine and localization configurations.
6877
6921
  */
@@ -7444,6 +7488,7 @@ declare namespace LocalJSX {
7444
7488
  "atomic-search-box": AtomicSearchBox;
7445
7489
  "atomic-search-box-instant-results": AtomicSearchBoxInstantResults;
7446
7490
  "atomic-search-box-query-suggestions": AtomicSearchBoxQuerySuggestions;
7491
+ "atomic-search-box-recent-queries": AtomicSearchBoxRecentQueries;
7447
7492
  "atomic-search-interface": AtomicSearchInterface;
7448
7493
  "atomic-segmented-facet": AtomicSegmentedFacet;
7449
7494
  "atomic-segmented-facet-scrollable": AtomicSegmentedFacetScrollable;
@@ -7960,6 +8005,10 @@ declare module "@stencil/core" {
7960
8005
  * The `atomic-search-box-query-suggestions` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of query suggestion behavior.
7961
8006
  */
7962
8007
  "atomic-search-box-query-suggestions": LocalJSX.AtomicSearchBoxQuerySuggestions & JSXBase.HTMLAttributes<HTMLAtomicSearchBoxQuerySuggestionsElement>;
8008
+ /**
8009
+ * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.
8010
+ */
8011
+ "atomic-search-box-recent-queries": LocalJSX.AtomicSearchBoxRecentQueries & JSXBase.HTMLAttributes<HTMLAtomicSearchBoxRecentQueriesElement>;
7963
8012
  /**
7964
8013
  * The `atomic-search-interface` component is the parent to all other atomic components in a search page. It handles the headless search engine and localization configurations.
7965
8014
  */
@@ -1,7 +1,7 @@
1
1
  import type { LitElement, TemplateResult } from 'lit';
2
2
  import type { TemplateResultType } from 'lit/directive-helpers.js';
3
3
  import type { AnyBindings } from '../components/common/interface/bindings';
4
- import type { SearchBoxSuggestions } from '../components/common/suggestions/suggestions-types';
4
+ import type { SearchBoxSuggestions } from '../components/common/suggestions/suggestions-common';
5
5
  export type GenericRender<T extends TemplateResultType> = TemplateResult<T>;
6
6
  export type RenderGuardDecorator<Component, T extends TemplateResultType, Descriptor = TypedPropertyDescriptor<() => GenericRender<T>>> = (target: Component, propertyKey: 'render', descriptor: Descriptor) => Descriptor;
7
7
  /**
@@ -5,9 +5,7 @@ export { SelectChildProductEventArgs } from './components/commerce/atomic-produc
5
5
  export { productContext } from './components/commerce/product-template-component-utils/stencil-product-template-decorators';
6
6
  export { PopoverChildFacet } from './components/common/facets/popover/popover-type';
7
7
  export { RedirectionPayload } from './components/common/search-box/redirection-payload';
8
- export { dispatchSearchBoxSuggestionsEvent } from './components/common/suggestions/suggestions-events';
9
- export type { SearchBoxSuggestionElement, SearchBoxSuggestions, SearchBoxSuggestionsBindings, SearchBoxSuggestionsEvent, } from './components/common/suggestions/suggestions-types';
10
- export { elementHasNoQuery, elementHasQuery, } from './components/common/suggestions/suggestions-utils';
8
+ export { dispatchSearchBoxSuggestionsEvent, SearchBoxSuggestionElement, SearchBoxSuggestions, SearchBoxSuggestionsBindings, SearchBoxSuggestionsEvent, } from './components/common/suggestions/suggestions-common';
11
9
  export { RecsBindings } from './components/recommendations/atomic-recs-interface/atomic-recs-interface';
12
10
  export { Bindings } from './components/search/atomic-search-interface/atomic-search-interface';
13
11
  export { resultContext } from './components/search/result-template-components/result-template-decorators';
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-09-26T18:21:55",
2
+ "timestamp": "2025-09-25T16:58:50",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.20.0",
@@ -12480,11 +12480,13 @@
12480
12480
  "dependents": [],
12481
12481
  "dependencies": [
12482
12482
  "atomic-suggestion-renderer",
12483
+ "atomic-search-box-recent-queries",
12483
12484
  "atomic-search-box-query-suggestions"
12484
12485
  ],
12485
12486
  "dependencyGraph": {
12486
12487
  "atomic-search-box": [
12487
12488
  "atomic-suggestion-renderer",
12489
+ "atomic-search-box-recent-queries",
12488
12490
  "atomic-search-box-query-suggestions"
12489
12491
  ]
12490
12492
  }
@@ -12803,6 +12805,101 @@
12803
12805
  ]
12804
12806
  }
12805
12807
  },
12808
+ {
12809
+ "filePath": "src/components/search/search-box-suggestions/atomic-search-box-recent-queries/atomic-search-box-recent-queries.tsx",
12810
+ "encapsulation": "shadow",
12811
+ "tag": "atomic-search-box-recent-queries",
12812
+ "docs": "The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.",
12813
+ "docsTags": [],
12814
+ "usage": {},
12815
+ "props": [
12816
+ {
12817
+ "name": "icon",
12818
+ "type": "string | undefined",
12819
+ "complexType": {
12820
+ "original": "string",
12821
+ "resolved": "string | undefined",
12822
+ "references": {}
12823
+ },
12824
+ "mutable": false,
12825
+ "attr": "icon",
12826
+ "reflectToAttr": false,
12827
+ "docs": "The SVG icon to display.\n\n- Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n- Use a value that starts with `assets://`, to display an icon from the Atomic package.\n- Use a stringified SVG to display it directly.",
12828
+ "docsTags": [],
12829
+ "values": [
12830
+ {
12831
+ "type": "string"
12832
+ },
12833
+ {
12834
+ "type": "undefined"
12835
+ }
12836
+ ],
12837
+ "optional": true,
12838
+ "required": false
12839
+ },
12840
+ {
12841
+ "name": "maxWithQuery",
12842
+ "type": "number",
12843
+ "complexType": {
12844
+ "original": "number",
12845
+ "resolved": "number",
12846
+ "references": {}
12847
+ },
12848
+ "mutable": false,
12849
+ "attr": "max-with-query",
12850
+ "reflectToAttr": true,
12851
+ "docs": "The maximum number of suggestions that will be displayed if the user has typed something into the input field.",
12852
+ "docsTags": [],
12853
+ "default": "3",
12854
+ "values": [
12855
+ {
12856
+ "type": "number"
12857
+ }
12858
+ ],
12859
+ "optional": false,
12860
+ "required": false
12861
+ },
12862
+ {
12863
+ "name": "maxWithoutQuery",
12864
+ "type": "number | undefined",
12865
+ "complexType": {
12866
+ "original": "number",
12867
+ "resolved": "number | undefined",
12868
+ "references": {}
12869
+ },
12870
+ "mutable": false,
12871
+ "attr": "max-without-query",
12872
+ "reflectToAttr": true,
12873
+ "docs": "The maximum number of suggestions that will be displayed initially when the input field is empty.",
12874
+ "docsTags": [],
12875
+ "values": [
12876
+ {
12877
+ "type": "number"
12878
+ },
12879
+ {
12880
+ "type": "undefined"
12881
+ }
12882
+ ],
12883
+ "optional": true,
12884
+ "required": false
12885
+ }
12886
+ ],
12887
+ "methods": [],
12888
+ "events": [],
12889
+ "listeners": [],
12890
+ "styles": [],
12891
+ "slots": [],
12892
+ "parts": [],
12893
+ "dependents": [
12894
+ "atomic-search-box"
12895
+ ],
12896
+ "dependencies": [],
12897
+ "dependencyGraph": {
12898
+ "atomic-search-box": [
12899
+ "atomic-search-box-recent-queries"
12900
+ ]
12901
+ }
12902
+ },
12806
12903
  {
12807
12904
  "filePath": "src/components/search/atomic-search-interface/atomic-search-interface.tsx",
12808
12905
  "encapsulation": "shadow",
@@ -15992,10 +16089,10 @@
15992
16089
  "docstring": "",
15993
16090
  "path": "src/components/common/layout/display-options.ts"
15994
16091
  },
15995
- "src/components/common/suggestions/suggestions-types.ts::SearchBoxSuggestionElement": {
16092
+ "src/components/common/suggestions/suggestions-common.ts::SearchBoxSuggestionElement": {
15996
16093
  "declaration": "export interface SearchBoxSuggestionElement {\n /**\n * Stable identity which enables Stencil to reuse DOM elements for better performance.\n * The best way to pick a key is to use a string that uniquely identifies that list item among its siblings (often your data will already have IDs).\n */\n key: string;\n /**\n * Rendered content of the element.\n *\n * @remarks\n * The `VNode` type will be deprecated in v4 as we are detaching from Stencil.\n */\n content: Element | VNode;\n /**\n * Hook called when the selection is selected.\n * @param e DOM event.\n */\n onSelect?(e: Event): void;\n /**\n * The query associated with the suggestion which will replace the query in the search box if the suggestion is selected.\n */\n query?: string;\n /**\n * For improved accessibility, provide this property with additional information.\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label\n */\n ariaLabel?: string;\n /**\n * Adds a specific shadow part attribute that can be selected with the CSS ::part pseudo-element.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/::part\n */\n part?: string;\n /**\n * Hide the suggestion if it's the last in the list.\n */\n hideIfLast?: boolean;\n}",
15997
16094
  "docstring": "Element which will be rendered in the list of suggestions.",
15998
- "path": "src/components/common/suggestions/suggestions-types.ts"
16095
+ "path": "src/components/common/suggestions/suggestions-common.ts"
15999
16096
  },
16000
16097
  "../headless/dist/definitions/index.d.ts::RelativeDateUnit": {
16001
16098
  "declaration": "any",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coveo/atomic",
3
3
  "type": "module",
4
- "version": "3.33.8-pre.9cacc0cb9c",
4
+ "version": "3.33.8-pre.a40e031589",
5
5
  "description": "A web-component library for building modern UIs interfacing with the Coveo platform",
6
6
  "homepage": "https://docs.coveo.com/en/atomic/latest/",
7
7
  "repository": {
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "dependencies": {
83
83
  "@coveo/bueno": "1.1.2",
84
- "@coveo/headless": "3.31.1-pre.9cacc0cb9c",
84
+ "@coveo/headless": "3.31.0",
85
85
  "@lit/context": "1.1.6",
86
86
  "@open-wc/lit-helpers": "0.7.0",
87
87
  "@popperjs/core": "2.11.8",
@@ -153,7 +153,7 @@
153
153
  },
154
154
  "peerDependencies": {
155
155
  "@coveo/bueno": "1.1.2",
156
- "@coveo/headless": "3.31.1-pre.9cacc0cb9c",
156
+ "@coveo/headless": "3.31.0",
157
157
  "typescript": ">=5.0.0"
158
158
  },
159
159
  "peerDependenciesMeta": {
@@ -1,18 +0,0 @@
1
- /**
2
- * Checks if a search box suggestion element has no query.
3
- *
4
- * @param el - The search box suggestion element to check
5
- * @returns True if the element has no query or the query is whitespace-only
6
- */
7
- export function elementHasNoQuery(el) {
8
- return !el.query || el.query.trim() === '';
9
- }
10
- /**
11
- * Checks if a search box suggestion element has a query.
12
- *
13
- * @param el - The search box suggestion element to check
14
- * @returns True if the element has a non-empty, non-whitespace query
15
- */
16
- export function elementHasQuery(el) {
17
- return !!el.query && el.query.trim() !== '';
18
- }