@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
@@ -1 +0,0 @@
1
- {"version":3,"names":["atomicResultPlaceholderCss","AtomicResultPlaceholderStyle0","placeholderClasses","AtomicResultPlaceholder","renderExcerptLine","width","h","style","height","class","render","key","getItemDisplayClasses","this","display","density","imageSize","join","trim","Array","from","length","AtomicResultSectionActions","componentDidRender","hideEmptySection","host","AtomicResultSectionBadges","AtomicResultSectionBottomMetadata","AtomicResultSectionExcerpt","AtomicResultSectionTitle","AtomicResultSectionVisual","atomicResultTablePlaceholderCss","AtomicResultTablePlaceholderStyle0","AtomicResultTablePlaceholder","getClasses","rows"],"sources":["src/components/common/atomic-result-placeholder/atomic-result-placeholder.pcss?tag=atomic-result-placeholder&encapsulation=shadow","src/components/common/atomic-result-placeholder/atomic-result-placeholder.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-actions.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-badges.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-bottom-metadata.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-excerpt.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-title.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-visual.tsx","src/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.pcss?tag=atomic-result-table-placeholder&encapsulation=shadow","src/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n\n@import '../template-system/template-system.pcss';\n\n:host {\n @apply atomic-template-system;\n\n .result-root {\n &.display-grid {\n atomic-result-section-actions {\n display: none;\n }\n }\n\n .badge {\n width: 14rem;\n }\n\n .action {\n width: 10rem;\n }\n\n .title {\n display: grid;\n grid-auto-flow: column;\n grid-gap: 0.5rem;\n height: var(--line-height);\n width: 30rem;\n max-width: 100%;\n }\n\n .fields-placeholder {\n display: grid;\n grid-template-columns: repeat(auto-fill, min(11rem, 40%));\n grid-column-gap: 0.5rem;\n\n .field-value-placeholder {\n height: var(--font-size);\n margin: calc((var(--line-height) - var(--font-size)) / 2) 0;\n }\n }\n }\n}\n","import {Component, h, Prop} from '@stencil/core';\nimport {\n ItemDisplayLayout,\n ItemDisplayDensity,\n ItemDisplayImageSize,\n getItemDisplayClasses,\n} from '../../common/layout/display-options';\n\nconst placeholderClasses = 'block bg-neutral w-full h-full rounded';\n\n/**\n * The `atomic-result-placeholder` component provides an intermediate visual state that is rendered before the first results are available.\n * @internal\n */\n@Component({\n tag: 'atomic-result-placeholder',\n styleUrl: 'atomic-result-placeholder.pcss',\n shadow: true,\n})\nexport class AtomicResultPlaceholder {\n @Prop() display!: ItemDisplayLayout;\n @Prop() density!: ItemDisplayDensity;\n @Prop() imageSize!: ItemDisplayImageSize;\n\n private renderExcerptLine(width: string) {\n return (\n <div\n style={{\n height: 'var(--line-height)',\n width,\n }}\n >\n <div\n class={placeholderClasses}\n style={{height: 'var(--font-size)'}}\n ></div>\n </div>\n );\n }\n\n public render() {\n return (\n <div\n class={`result-root placeholder with-sections animate-pulse ${getItemDisplayClasses(\n this.display,\n this.density,\n this.imageSize\n )\n .join(' ')\n .trim()}`}\n >\n <atomic-result-section-visual>\n <div class={placeholderClasses}></div>\n </atomic-result-section-visual>\n <atomic-result-section-badges>\n <div class={`badge ${placeholderClasses}`}></div>\n </atomic-result-section-badges>\n <atomic-result-section-actions>\n <div class={`action ${placeholderClasses}`}></div>\n </atomic-result-section-actions>\n <atomic-result-section-title>\n <div class={`title ${placeholderClasses}`}></div>\n </atomic-result-section-title>\n <atomic-result-section-excerpt>\n {this.renderExcerptLine('100%')}\n {this.renderExcerptLine('95%')}\n {this.renderExcerptLine('98%')}\n </atomic-result-section-excerpt>\n <atomic-result-section-bottom-metadata>\n <div class=\"fields-placeholder\">\n {Array.from({length: 4}, () => (\n <div\n class={`field-value-placeholder ${placeholderClasses}`}\n ></div>\n ))}\n </div>\n </atomic-result-section-bottom-metadata>\n </div>\n );\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section allows the information seeker to perform an action on an item without having to view its details.\n * 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.\n *\n * Behavior:\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * ** You should ensure that elements inside of it have `height: var(--line-height)`.\n * * Is a wrapping flexbox with a gap.\n * * May appear over, next to, or beneath the visual section.\n */\n@Component({\n tag: 'atomic-result-section-actions',\n shadow: false,\n})\nexport class AtomicResultSectionActions {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section provides badges that highlight special features of the item.\n *\n * Behavior:\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * ** You should ensure that elements inside of it have `height: var(--line-height)`.\n * * Is a wrapping flexbox with a gap.\n * * May appear over, next to, or beneath the visual section.\n */\n@Component({\n tag: 'atomic-result-section-badges',\n shadow: false,\n})\nexport class AtomicResultSectionBadges {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section displays additional descriptive information about the item.\n *\n * Behavior:\n * * Has a maximum height of two lines.\n * ** We recommend that you use `atomic-result-fields-list` to ensure that the fields in this section don’t overflow.\n * * Exposes the `--line-height` variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n * * Has a font weight.\n */\n@Component({\n tag: 'atomic-result-section-bottom-metadata',\n shadow: false,\n})\nexport class AtomicResultSectionBottomMetadata {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section contains an informative summary of the item's content.\n *\n * Behavior:\n * * Has a fixed height of one to three lines, depending on the layout and density.\n * * Ellipses overflowing text.\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n */\n@Component({\n tag: 'atomic-result-section-excerpt',\n shadow: false,\n})\nexport class AtomicResultSectionExcerpt {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section identifies the item by its name, and its main use is to make the result list scannable.\n * This is usually the page title.\n *\n * Behavior:\n * * Has a fixed height of two lines on grid layouts.\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n */\n@Component({\n tag: 'atomic-result-section-title',\n shadow: false,\n})\nexport class AtomicResultSectionTitle {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component, Prop} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\nimport {ItemDisplayImageSize} from '../../../common/layout/display-options';\n\n/**\n * This section provides visual information about the item.\n * For example, in Commerce, an image is a great shorthand for a product category.\n * An icon can quickly show the item type, or an avatar can help identify to whom it is related.\n *\n * Behavior:\n * * Has a fixed size that depends on the specified image size, the layout, the density, and the screen size.\n * ** When the image size is set to `icon`, this section stays very small.\n * ** You should ensure that elements inside of it take the available space.\n * * Always has a 1:1 aspect ratio.\n */\n@Component({\n tag: 'atomic-result-section-visual',\n shadow: false,\n})\nexport class AtomicResultSectionVisual {\n @Element() private host!: HTMLElement;\n\n /**\n * How large or small the visual section of results using this template should be.\n */\n @Prop({reflect: true}) public imageSize?: ItemDisplayImageSize;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","@import '../../../global/global.pcss';\n@import '../../common/item-list/styles/mixins.pcss';\n\n:host {\n display: grid;\n}\n\n.list-root.display-table {\n @apply atomic-result-table border-neutral rounded-xl border;\n\n thead tr,\n tbody tr:not(:last-child) {\n position: relative;\n\n &::after {\n content: ' ';\n display: block;\n position: absolute;\n height: 1px;\n bottom: 0;\n left: var(--padding);\n right: var(--padding);\n @apply bg-neutral;\n }\n }\n\n th,\n td {\n border-color: transparent;\n border-radius: initial;\n }\n\n th {\n background-color: transparent;\n }\n}\n","import {Component, h, Prop} from '@stencil/core';\nimport {\n ItemDisplayDensity,\n ItemDisplayImageSize,\n getItemDisplayClasses,\n} from '../../common/layout/display-options';\n\nconst placeholderClasses = 'block bg-neutral rounded';\n\n/**\n * The `atomic-result-table-placeholder` component provides an intermediate visual state that is rendered before the first results are available.\n * @internal\n */\n@Component({\n tag: 'atomic-result-table-placeholder',\n styleUrl: 'atomic-result-table-placeholder.pcss',\n shadow: true,\n})\nexport class AtomicResultTablePlaceholder {\n @Prop() density!: ItemDisplayDensity;\n @Prop() imageSize!: ItemDisplayImageSize;\n @Prop() rows!: number;\n\n private getClasses() {\n return getItemDisplayClasses('table', this.density, this.imageSize);\n }\n\n public render() {\n return (\n <table class={`list-root animate-pulse ${this.getClasses().join(' ')}`}>\n <thead>\n <tr>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '14.5rem'}}\n ></div>\n </th>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '9.75rem'}}\n ></div>\n </th>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '6.5rem'}}\n ></div>\n </th>\n </tr>\n </thead>\n <tbody>\n {Array.from({length: this.rows}, () => (\n <tr>\n <td>\n <div\n class={`mb-6 h-8 ${placeholderClasses}`}\n style={{width: '22.875rem'}}\n ></div>\n <div\n class={`mb-2 h-5 ${placeholderClasses}`}\n style={{width: '23.75rem'}}\n ></div>\n <div\n class={`h-5 ${placeholderClasses}`}\n style={{width: '11.5rem'}}\n ></div>\n </td>\n <td>\n <div\n class={`mt-1.5 h-5 ${placeholderClasses}`}\n style={{width: '11rem'}}\n ></div>\n </td>\n <td>\n <div\n class={`mt-1.5 h-5 ${placeholderClasses}`}\n style={{width: '4.875rem'}}\n ></div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n }\n}\n"],"mappings":"0NAAA,MAAMA,EAA6B,ol2WACnC,MAAAC,EAAeD,ECOf,MAAME,EAAqB,yC,MAWdC,EAAuB,M,gGAK1B,iBAAAC,CAAkBC,GACxB,OACEC,EAAA,OACEC,MAAO,CACLC,OAAQ,qBACRH,UAGFC,EAAA,OACEG,MAAOP,EACPK,MAAO,CAACC,OAAQ,sB,CAMjB,MAAAE,GACL,OACEJ,EAAA,OAAAK,IAAA,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AC9DX,EAAA,SAAAK,IAAA,4CACEL,EAAA,MAAAK,IAAA,4CACEL,EAAA,MAAAK,IAAA,4CACEL,EAAA,OAAAK,IAAA,2CACEF,MAAO,YAAYP,IACnBK,MAAO,CAACF,MAAO,cAGnBC,EAAA,MAAAK,IAAA,4CACEL,EAAA,OAAAK,IAAA,2CACEF,MAAO,YAAYP,IACnBK,MAAO,CAACF,MAAO,cAGnBC,EAAA,MAAAK,IAAA,4CACEL,EAAA,OAAAK,IAAA,2CACEF,MAAO,YAAYP,IACnBK,MAAO,CAACF,MAAO,eAKvBC,EAAA,SAAAK,IAAA,4CACGQ,MAAMC,KAAK,CAACC,OAAQR,KAAKsB,OAAO,IAC/B7B,EAAA,UACEA,EAAA,UACEA,EAAA,OACEG,MAAO,YAAYP,IACnBK,MAAO,CAACF,MAAO,eAEjBC,EAAA,OACEG,MAAO,YAAYP,IACnBK,MAAO,CAACF,MAAO,cAEjBC,EAAA,OACEG,MAAO,OAAOP,IACdK,MAAO,CAACF,MAAO,cAGnBC,EAAA,UACEA,EAAA,OACEG,MAAO,cAAcP,IACrBK,MAAO,CAACF,MAAO,YAGnBC,EAAA,UACEA,EAAA,OACEG,MAAO,cAAcP,IACrBK,MAAO,CAACF,MAAO,mB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["getTemplateNodeType","node","isResultSectionNode","isVisualNode","isElementNode","tagName","toLowerCase","tableElementTagName","groupNodesByType","nodes","aggregate","Array","from","ResultTemplateCommon","constructor","host","setError","validParents","allowEmpty","this","matchConditions","gridCellLinkTarget","validateTemplate","hasValidParent","map","p","toUpperCase","includes","parentElement","nodeName","Error","join","attributes","getNamedItem","value","template","querySelector","innerHTML","trim","content","console","warn","section","sectionNodes","other","otherNodes","childNodes","length","getTemplate","conditions","error","concat","getTemplateElement","linkContent","getLinkTemplateElement","priority","renderIfError","h","element","getDefaultLinkTemplateElement","linkTemplate","document","createElement","makeMatchConditions","mustMatch","mustNotMatch","field","push","ResultTemplatesHelpers","fieldMustMatch","fieldMustNotMatch","makeDefinedConditions","ifDefined","ifNotDefined","fieldNames","split","fieldsMustBeDefined","fieldsMustNotBeDefined"],"sources":["src/components/common/result-templates/result-template-common.tsx"],"sourcesContent":["import {\n ResultTemplate,\n ResultTemplateCondition,\n ResultTemplatesHelpers,\n} from '@coveo/headless';\nimport {h} from '@stencil/core';\nimport {aggregate, isElementNode, isVisualNode} from '../../../utils/utils';\nimport {tableElementTagName} from '../../search/atomic-table-result/table-element-utils';\nimport {ItemTarget} from '../layout/display-options';\nimport {isResultSectionNode} from '../layout/sections';\n\nexport type TemplateContent = DocumentFragment;\n\ninterface ResultTemplateCommonProps {\n allowEmpty?: boolean;\n host: HTMLDivElement;\n validParents: string[];\n setError: (error: Error) => void;\n}\n\ntype TemplateNodeType =\n | 'section'\n | 'metadata'\n | 'table-column-definition'\n | 'other';\n\nexport function getTemplateNodeType(node: Node): TemplateNodeType {\n if (isResultSectionNode(node)) {\n return 'section';\n }\n if (!isVisualNode(node)) {\n return 'metadata';\n }\n if (\n isElementNode(node) &&\n node.tagName.toLowerCase() === tableElementTagName\n ) {\n return 'table-column-definition';\n }\n return 'other';\n}\n\nfunction groupNodesByType(nodes: NodeList) {\n return aggregate(Array.from(nodes), (node) => getTemplateNodeType(node));\n}\n\nexport class ResultTemplateCommon {\n private host: HTMLDivElement;\n public matchConditions: ResultTemplateCondition[] = [];\n private gridCellLinkTarget: ItemTarget = '_self';\n\n constructor({\n host,\n setError,\n validParents,\n allowEmpty = false,\n }: ResultTemplateCommonProps) {\n this.host = host;\n this.validateTemplate(host, setError, validParents, allowEmpty);\n }\n\n validateTemplate(\n host: HTMLDivElement,\n setError: (error: Error) => void,\n validParents: string[],\n allowEmpty = true\n ) {\n const hasValidParent = validParents\n .map((p) => p.toUpperCase())\n .includes(host.parentElement?.nodeName || '');\n const tagName = host.nodeName.toLowerCase();\n\n if (!hasValidParent) {\n setError(\n new Error(\n `The \"${tagName}\" component has to be the child of one of the following: ${validParents\n .map((p) => `\"${p.toLowerCase()}\"`)\n .join(', ')}.`\n )\n );\n return;\n }\n\n if (\n host.parentElement?.attributes.getNamedItem('display')?.value === 'grid'\n ) {\n this.gridCellLinkTarget = host.parentElement?.attributes.getNamedItem(\n 'grid-cell-link-target'\n )?.value as ItemTarget;\n }\n\n const template = host.querySelector<HTMLTemplateElement>(\n 'template:not([slot])'\n );\n if (!template) {\n setError(\n new Error(\n `The \"${tagName}\" component has to contain a \"template\" element as a child.`\n )\n );\n return;\n }\n\n if (!allowEmpty && !template.innerHTML.trim()) {\n setError(\n new Error(`The \"template\" tag inside \"${tagName}\" cannot be empty.`)\n );\n return;\n }\n\n if (template.content.querySelector('script')) {\n console.warn(\n 'Any \"script\" tags defined inside of \"template\" elements are not supported and will not be executed when the results are rendered.',\n host\n );\n }\n\n const {section: sectionNodes, other: otherNodes} = groupNodesByType(\n template.content.childNodes\n );\n if (sectionNodes?.length && otherNodes?.length) {\n console.warn(\n 'Result templates should only contain section elements or non-section elements. Future updates could unpredictably affect this result template.',\n host,\n {sectionNodes, otherNodes}\n );\n }\n }\n\n getTemplate(\n conditions: ResultTemplateCondition[],\n error: Error\n ): ResultTemplate<TemplateContent> | null {\n if (error) {\n return null;\n }\n\n return {\n conditions: conditions.concat(this.matchConditions),\n content: getTemplateElement(this.host).content!,\n linkContent: this.getLinkTemplateElement(this.host).content!,\n priority: 1,\n };\n }\n\n renderIfError(error: Error) {\n if (error) {\n return (\n <atomic-component-error\n element={this.host}\n error={error}\n ></atomic-component-error>\n );\n }\n }\n\n getDefaultLinkTemplateElement() {\n const linkTemplate = document.createElement('template');\n linkTemplate.innerHTML = `<atomic-result-link>${this.gridCellLinkTarget ? `<a slot=\"attributes\" target=\"${this.gridCellLinkTarget}\"></a>` : ''}</atomic-result-link>`;\n return linkTemplate;\n }\n\n getLinkTemplateElement(host: HTMLElement) {\n return (\n host.querySelector<HTMLTemplateElement>('template[slot=\"link\"]') ??\n this.getDefaultLinkTemplateElement()\n );\n }\n}\n\nfunction getTemplateElement(host: HTMLElement) {\n return host.querySelector<HTMLTemplateElement>('template:not([slot])')!;\n}\n\nexport function makeMatchConditions(\n mustMatch: Record<string, string[]>,\n mustNotMatch: Record<string, string[]>\n): ResultTemplateCondition[] {\n const conditions: ResultTemplateCondition[] = [];\n for (const field in mustMatch) {\n conditions.push(\n ResultTemplatesHelpers.fieldMustMatch(field, mustMatch[field])\n );\n }\n\n for (const field in mustNotMatch) {\n conditions.push(\n ResultTemplatesHelpers.fieldMustNotMatch(field, mustNotMatch[field])\n );\n }\n return conditions;\n}\n\nexport function makeDefinedConditions(\n ifDefined?: string,\n ifNotDefined?: string\n): ResultTemplateCondition[] {\n const conditions: ResultTemplateCondition[] = [];\n if (ifDefined) {\n const fieldNames = ifDefined.split(',');\n conditions.push(ResultTemplatesHelpers.fieldsMustBeDefined(fieldNames));\n }\n\n if (ifNotDefined) {\n const fieldNames = ifNotDefined.split(',');\n conditions.push(ResultTemplatesHelpers.fieldsMustNotBeDefined(fieldNames));\n }\n return conditions;\n}\n"],"mappings":"2NA0BgBA,EAAoBC,GAClC,GAAIC,EAAoBD,GAAO,CAC7B,MAAO,S,CAET,IAAKE,EAAaF,GAAO,CACvB,MAAO,U,CAET,GACEG,EAAcH,IACdA,EAAKI,QAAQC,gBAAkBC,EAC/B,CACA,MAAO,yB,CAET,MAAO,OACT,CAEA,SAASC,EAAiBC,GACxB,OAAOC,EAAUC,MAAMC,KAAKH,IAASR,GAASD,EAAoBC,IACpE,C,MAEaY,EAKX,WAAAC,EAAYC,KACVA,EAAIC,SACJA,EAAQC,aACRA,EAAYC,WACZA,EAAa,QAPRC,KAAAC,gBAA6C,GAC5CD,KAAAE,mBAAiC,QAQvCF,KAAKJ,KAAOA,EACZI,KAAKG,iBAAiBP,EAAMC,EAAUC,EAAcC,E,CAGtD,gBAAAI,CACEP,EACAC,EACAC,EACAC,EAAa,MAEb,MAAMK,EAAiBN,EACpBO,KAAKC,GAAMA,EAAEC,gBACbC,SA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,0BACxCjB,KAAKwC,+B,EAKX,SAASP,EAAmBrC,GAC1B,OAAOA,EAAKqB,cAAmC,uBACjD,C,SAEgB2B,EACdC,EACAC,GAEA,MAAMhB,EAAwC,GAC9C,IAAK,MAAMiB,KAASF,EAAW,CAC7Bf,EAAWkB,KACTC,EAAuBC,eAAeH,EAAOF,EAAUE,I,CAI3D,IAAK,MAAMA,KAASD,EAAc,CAChChB,EAAWkB,KACTC,EAAuBE,kBAAkBJ,EAAOD,EAAaC,I,CAGjE,OAAOjB,CACT,C,SAEgBsB,EACdC,EACAC,GAEA,MAAMxB,EAAwC,GAC9C,GAAIuB,EAAW,CACb,MAAME,EAAaF,EAAUG,MAAM,KACnC1B,EAAWkB,KAAKC,EAAuBQ,oBAAoBF,G,CAG7D,GAAID,EAAc,CAChB,MAAMC,EAAaD,EAAaE,MAAM,KACtC1B,EAAWkB,KAAKC,EAAuBS,uBAAuBH,G,CAEhE,OAAOzB,CACT,Q","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as s,g as t}from"./p-dc3df5ce.js";import{h as o}from"./p-56c97c3e.js";import"./p-a12e1c59.js";import"./p-f284897c.js";import"./p-0462f723.js";const r=class{constructor(t){s(this,t)}componentDidRender(){o(this.host)}get host(){return t(this)}};export{r as atomic_result_section_children};
2
- //# sourceMappingURL=p-8572a953.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["AtomicResultSectionChildren","componentDidRender","hideEmptySection","this","host"],"sources":["src/components/search/result-template-components/atomic-result-sections/atomic-result-section-children.tsx"],"sourcesContent":["import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section displays the folded results, available when using the <atomic-result-children> component.\n *\n * Behavior:\n * * Shows children at the bottom of the result, indented and wrapped in a border.\n */\n@Component({\n tag: 'atomic-result-section-children',\n shadow: false,\n})\nexport class AtomicResultSectionChildren {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n"],"mappings":"6JAaaA,EAA2B,M,yBAG/B,kBAAAC,GACLC,EAAiBC,KAAKC,K","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["resultSectionTags","Set","productSectionTags","allTags","isResultSectionNode","element","isElementNode","has","tagName","toLowerCase","containsSections","content","Array","from","values","some","tag","includes","child"],"sources":["src/components/common/layout/sections.ts"],"sourcesContent":["import {isElementNode} from '../../../utils/utils';\n\nconst resultSectionTags = new Set([\n 'atomic-result-section-visual',\n 'atomic-result-section-badges',\n 'atomic-result-section-actions',\n 'atomic-result-section-title',\n 'atomic-result-section-title-metadata',\n 'atomic-result-section-emphasized',\n 'atomic-result-section-excerpt',\n 'atomic-result-section-bottom-metadata',\n 'atomic-result-section-children',\n] as const);\n\nconst productSectionTags = new Set([\n 'atomic-product-section-visual',\n 'atomic-product-section-badges',\n 'atomic-product-section-actions',\n 'atomic-product-section-name',\n 'atomic-product-section-metadata',\n 'atomic-product-section-emphasized',\n 'atomic-product-section-description',\n 'atomic-product-section-bottom-metadata',\n 'atomic-product-section-children',\n] as const);\n\nconst allTags = new Set([...resultSectionTags, ...productSectionTags]);\n\ntype SetValueType<T> = T extends Set<infer U> ? U : never;\n\nexport type ItemSectionTagName = SetValueType<typeof allTags>;\n\nexport function isResultSectionNode(element: Node) {\n if (!isElementNode(element)) {\n return false;\n }\n return allTags.has(element.tagName.toLowerCase() as ItemSectionTagName);\n}\n\nexport function containsSections(content: string | NodeList | HTMLCollection) {\n if (typeof content === 'string') {\n return Array.from(allTags.values()).some((tag) => content.includes(tag));\n }\n return Array.from(content).some((child) => isResultSectionNode(child));\n}\n"],"mappings":"oCAEA,MAAMA,EAAoB,IAAIC,IAAI,CAChC,+BACA,+BACA,gCACA,8BACA,uCACA,mCACA,gCACA,wCACA,mCAGF,MAAMC,EAAqB,IAAID,IAAI,CACjC,gCACA,gCACA,iCACA,8BACA,kCACA,oCACA,qCACA,yCACA,oCAGF,MAAME,EAAU,IAAIF,IAAI,IAAID,KAAsBE,I,SAMlCE,EAAoBC,GAClC,IAAKC,EAAcD,GAAU,CAC3B,OAAO,K,CAET,OAAOF,EAAQI,IAAIF,EAAQG,QAAQC,cACrC,C,SAEgBC,EAAiBC,GAC/B,UAAWA,IAAY,SAAU,CAC/B,OAAOC,MAAMC,KAAKV,EAAQW,UAAUC,MAAMC,GAAQL,EAAQM,SAASD,I,CAErE,OAAOJ,MAAMC,KAAKF,GAASI,MAAMG,GAAUd,EAAoBc,IACjE,Q","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["findSection","element","section","querySelector","sectionSelector"],"sources":["src/components/common/atomic-layout-section/sections.ts"],"sourcesContent":["import type {AtomicLayoutSection} from './atomic-layout-section';\n\nexport type Section =\n | 'search'\n | 'facets'\n | 'main'\n | 'status'\n | 'results'\n | 'horizontal-facets'\n | 'products'\n | 'pagination';\n\nexport function findSection(element: HTMLElement, section: Section) {\n return element.querySelector(\n sectionSelector(section)\n ) as AtomicLayoutSection | null;\n}\n\nexport function sectionSelector(section: Section) {\n return `atomic-layout-section[section=\"${section}\"]`;\n}\n"],"mappings":"SAYgBA,EAAYC,EAAsBC,GAChD,OAAOD,EAAQE,cACbC,EAAgBF,GAEpB,C,SAEgBE,EAAgBF,GAC9B,MAAO,kCAAkCA,KAC3C,Q","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["RefineModalBody","_","children","h","part","slot","class","RefineModalFiltersSection","i18n","withAutomaticFacets","withFacets","Fragment","t","name","RefineModalFiltersClearButton","onClick","Button","style","text","RefineModalSortSection","onSelect","onChange","icon","SortIcon","atomicRefineModalCss","AtomicRefineModalStyle0","AtomicRefineModal","this","isOpen","collapseFacetsAfter","watchEnabled","host","querySelector","append","createFacetSlot","initialize","breadcrumbManager","buildBreadcrumbManager","bindings","engine","sort","buildSort","querySummary","buildQuerySummary","searchStatus","buildSearchStatus","facetManager","buildFacetManager","tabManager","buildTabManager","divSlot","document","createElement","setAttribute","addFacetColumnStyling","facets","store","getFacetElements","boundInterfaces","getBoundInterfaces","sortByDocumentPosition","facetsSection","horizontalFacetsSection","boundInterface","facetSection","findSection","push","horizontalFacetSection","triagedFacets","triageFacetsByParents","triagedFacet","values","sortedFacets","i","length","get","visibleFacets","invisibleFacets","sortFacetVisibility","getAllFacets","visibleFacetsClone","cloneFacets","invisibleFacetsClone","generator","makeAutomaticFacetGenerator","updateCollapseFacetsDependingOnFacetsVisibility","mainInterface","closest","Error","boundExternalInterfaces","Array","from","querySelectorAll","filter","atomicExternal","map","facet","classList","remove","popoverClass","isRefineModalFacet","clone","cloneNode","isCollapsed","state","automaticFacetSet","desiredCount","el","display","flexDirection","gap","options","sortOptions","select","e","composedPath","option","find","expression","value","sortBy","criteria","buildOption","label","tabs","shouldDisplayOnCurrentTab","included","excluded","tabManagerState","activeTab","selected","isSortedBy","renderSort","renderFilters","hasFacetElements","hasAutomaticFacets","set","undefined","breadcrumbManagerState","hasBreadcrumbs","deselectAll","render","RefineModal","key","onClose","title","numberOfItems","querySummaryState","total","openButton","componentDidLoad","__decorate","InitializeBindings","BindStateToController"],"sources":["src/components/common/refine-modal/stencil-body.tsx","src/components/common/refine-modal/stencil-filters.tsx","src/components/common/refine-modal/stencil-sort.tsx","src/components/search/atomic-refine-modal/atomic-refine-modal.pcss?tag=atomic-refine-modal&encapsulation=shadow","src/components/search/atomic-refine-modal/atomic-refine-modal.tsx"],"sourcesContent":["import {FunctionalComponent, h} from '@stencil/core';\n\nexport const RefineModalBody: FunctionalComponent = (_, children) => {\n return (\n <aside\n part=\"content\"\n slot=\"body\"\n class=\"flex flex-col w-full\"\n >\n {children}\n </aside>\n );\n};\n","import {FunctionalComponent, Fragment, h} from '@stencil/core';\nimport {i18n} from 'i18next';\nimport {Button} from '../stencil-button';\n\ninterface RefineModalFiltersSectionProps {\n i18n: i18n;\n withFacets: boolean;\n withAutomaticFacets: boolean;\n}\nexport const RefineModalFiltersSection: FunctionalComponent<\n RefineModalFiltersSectionProps\n> = ({i18n, withAutomaticFacets, withFacets}, children) => {\n return (\n <Fragment>\n <div part=\"filter-section\" class=\"mt-8 mb-3 flex w-full justify-between\">\n <h1\n part=\"section-title section-filters-title\"\n class=\"truncate text-2xl font-bold\"\n >\n {i18n.t('filters')}\n </h1>\n {children}\n </div>\n {withFacets && <slot name=\"facets\"></slot>}\n {withAutomaticFacets && <slot name=\"automatic-facets\"></slot>}\n </Fragment>\n );\n};\n\ninterface RefineModalFiltersClearButtonProps {\n i18n: i18n;\n onClick: () => void;\n}\nexport const RefineModalFiltersClearButton: FunctionalComponent<\n RefineModalFiltersClearButtonProps\n> = ({i18n, onClick}) => {\n return (\n <Button\n onClick={onClick}\n style=\"text-primary\"\n text={i18n.t('clear')}\n class=\"px-2 py-1\"\n part=\"filter-clear-all\"\n ></Button>\n );\n};\n","import {Fragment, FunctionalComponent, h} from '@stencil/core';\nimport {i18n} from 'i18next';\nimport SortIcon from '../../../images/sort.svg';\n\ninterface RefineModalSortSectionProps {\n i18n: i18n;\n onSelect: (e: Event) => void;\n}\nexport const RefineModalSortSection: FunctionalComponent<\n RefineModalSortSectionProps\n> = ({i18n, onSelect}, children) => {\n return (\n <Fragment>\n <h1\n part=\"section-title section-sort-title\"\n class=\"mb-3 truncate text-2xl font-bold\"\n >\n {i18n.t('sort')}\n </h1>\n <div part=\"select-wrapper\" class=\"relative\">\n <select\n class=\"btn-outline-neutral w-full grow cursor-pointer appearance-none rounded-lg px-6 py-5 text-lg font-bold\"\n part=\"select\"\n aria-label={i18n.t('sort-by')}\n onChange={onSelect}\n >\n {children}\n </select>\n <div\n part=\"select-icon-wrapper\"\n class=\"pointer-events-none absolute top-0 right-0 bottom-0 flex items-center justify-center pr-6\"\n >\n <atomic-icon\n part=\"select-icon\"\n icon={SortIcon}\n class=\"h-6 w-6\"\n ></atomic-icon>\n </div>\n </div>\n </Fragment>\n );\n};\n","@import '../../../global/global.pcss';\n\n/* This stylesheet can be removed once atomic-refine-modal is migrated to lit.\n\nThe remaining styles can also be removed as they have been moved to the refine-modal/sort.ts functional component*/\n\n/**\n * @prop --atomic-refine-modal-facet-margin: The spacing between the modal's facets.\n */\nselect:hover + div,\nselect:focus-visible + div {\n @apply text-primary-light;\n}\n","import {\n BreadcrumbManager,\n buildBreadcrumbManager,\n BreadcrumbManagerState,\n QuerySummary,\n QuerySummaryState,\n FacetManagerState,\n Sort,\n buildSort,\n SortState,\n buildQuerySummary,\n buildSearchStatus,\n SearchStatus,\n FacetManager,\n buildFacetManager,\n TabManager,\n TabManagerState,\n buildTabManager,\n} from '@coveo/headless';\nimport {Component, h, State, Prop, Element, Watch} from '@stencil/core';\nimport {\n AtomicInterface,\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {shouldDisplayOnCurrentTab} from '../../../utils/tab-utils';\nimport {sortByDocumentPosition} from '../../../utils/utils';\nimport {findSection} from '../../common/atomic-layout-section/sections';\nimport {popoverClass} from '../../common/facets/popover/popover-type';\nimport {\n BaseFacetElement,\n sortFacetVisibility,\n triageFacetsByParents,\n collapseFacetsAfter,\n} from '../../common/facets/stencil-facet-common';\nimport {isRefineModalFacet} from '../../common/interface/store';\nimport {RefineModalBody} from '../../common/refine-modal/stencil-body';\nimport {\n RefineModalFiltersClearButton,\n RefineModalFiltersSection,\n} from '../../common/refine-modal/stencil-filters';\nimport {RefineModal} from '../../common/refine-modal/stencil-modal';\nimport {RefineModalSortSection} from '../../common/refine-modal/stencil-sort';\nimport {Bindings} from '../atomic-search-interface/atomic-search-interface';\nimport {SortDropdownOption} from '../atomic-search-interface/store';\n\n/**\n * The `atomic-refine-modal` is automatically created as a child of the `atomic-search-interface` when the `atomic-refine-toggle` is initialized.\n *\n * When the modal is opened, the class `atomic-modal-opened` is added to the interface element and the body, allowing further customization.\n *\n * @part container - The modal's outermost container.\n * @part header-wrapper - The wrapper around the header.\n * @part header - The header of the modal, containing the title.\n * @part title - The title of the modal.\n * @part close-button - The button in the header that closes the modal.\n * @part close-icon - The icon of the close button.\n * @part header-ruler - The horizontal ruler underneath the header.\n * @part body-wrapper - The wrapper around the body.\n * @part body - The body of the modal, between the header and the footer.\n * @part content - The wrapper around the content inside the body of the modal.\n * @part section-title - The title for each section.\n * @part section-sort-title - The title for the sort section.\n * @part section-filters-title - The title for the filters section.\n * @part select-wrapper - The wrapper around the select element, used to position the icon.\n * @part select - The `<select>` element of the dropdown list.\n * @part select-icon-wrapper - The wrapper around the sort icon that's used to align it.\n * @part select-icon - The select dropdown's sort icon.\n * @part filter-section - The section containing facets and the \"filters\" title.\n * @part filter-clear-all - The button that resets all actively selected facet values.\n * @part footer-wrapper - The wrapper with a shadow or background color around the footer.\n * @part footer - The footer of the modal.\n * @part footer-content - The wrapper around the content inside the footer of the modal, containing the button to view results.\n * @part footer-button - The button in the footer that closes the modal.\n * @part footer-button-text - The text inside the button in the footer that closes the modal.\n * @part footer-button-count - The count inside the button in the footer that closes the modal.\n */\n@Component({\n tag: 'atomic-refine-modal',\n styleUrl: 'atomic-refine-modal.pcss',\n shadow: true,\n})\nexport class AtomicRefineModal implements InitializableComponent {\n private sort!: Sort;\n private breadcrumbManager!: BreadcrumbManager;\n public querySummary!: QuerySummary;\n public searchStatus!: SearchStatus;\n public facetManager!: FacetManager;\n @InitializeBindings() public bindings!: Bindings;\n @Element() public host!: HTMLElement;\n\n @BindStateToController('querySummary')\n @State()\n public querySummaryState!: QuerySummaryState;\n @BindStateToController('breadcrumbManager')\n @State()\n private breadcrumbManagerState!: BreadcrumbManagerState;\n @BindStateToController('facetManager')\n @State()\n public facetManagerState!: FacetManagerState;\n @State() @BindStateToController('sort') public sortState!: SortState;\n public tabManager!: TabManager;\n @BindStateToController('tabManager')\n @State()\n public tabManagerState!: TabManagerState;\n @State() public error!: Error;\n\n @Prop({mutable: true}) openButton?: HTMLElement;\n\n @Prop({reflect: true, mutable: true}) isOpen = false;\n\n /**\n * The number of expanded facets inside the refine modal.\n * Remaining facets are automatically collapsed.\n *\n * Using the value `0` collapses all facets.\n */\n @Prop({reflect: true}) public collapseFacetsAfter = 0;\n\n @Watch('isOpen')\n watchEnabled(isOpen: boolean) {\n if (isOpen) {\n if (this.host.querySelector('div[slot=\"facets\"]')) {\n return;\n }\n\n this.host.append(this.createFacetSlot());\n }\n }\n\n public initialize() {\n this.breadcrumbManager = buildBreadcrumbManager(this.bindings.engine);\n this.sort = buildSort(this.bindings.engine);\n this.querySummary = buildQuerySummary(this.bindings.engine);\n this.searchStatus = buildSearchStatus(this.bindings.engine);\n this.facetManager = buildFacetManager(this.bindings.engine);\n this.tabManager = buildTabManager(this.bindings.engine);\n this.watchEnabled(this.isOpen);\n }\n\n private createFacetSlot(): HTMLDivElement {\n const divSlot = document.createElement('div');\n divSlot.setAttribute('slot', 'facets');\n this.addFacetColumnStyling(divSlot);\n\n const facets = this.bindings.store.getFacetElements() as BaseFacetElement[];\n const boundInterfaces = this.getBoundInterfaces().sort(\n sortByDocumentPosition\n );\n const facetsSection = [];\n const horizontalFacetsSection = [];\n for (const boundInterface of boundInterfaces) {\n const facetSection = findSection(boundInterface, 'facets');\n if (facetSection) {\n facetsSection.push(facetSection);\n }\n const horizontalFacetSection = findSection(\n boundInterface,\n 'horizontal-facets'\n );\n if (horizontalFacetSection) {\n horizontalFacetsSection.push(horizontalFacetSection);\n }\n }\n const triagedFacets = triageFacetsByParents(\n facets,\n ...horizontalFacetsSection,\n ...facetsSection\n );\n for (const triagedFacet of triagedFacets.values()) {\n triagedFacet.sort(sortByDocumentPosition);\n }\n\n const sortedFacets = [];\n for (let i = 0; i < boundInterfaces.length; i++) {\n sortedFacets.push(...(triagedFacets.get(facetsSection[i]) || []));\n sortedFacets.push(\n ...(triagedFacets.get(horizontalFacetsSection[i]) || [])\n );\n }\n sortedFacets.push(...(triagedFacets.get(null) || []));\n\n const {visibleFacets, invisibleFacets} = sortFacetVisibility(\n sortedFacets,\n this.bindings.store.getAllFacets()\n );\n\n const visibleFacetsClone = this.cloneFacets(visibleFacets);\n const invisibleFacetsClone = this.cloneFacets(invisibleFacets);\n\n collapseFacetsAfter(visibleFacetsClone, this.collapseFacetsAfter);\n\n divSlot.append(...visibleFacetsClone);\n divSlot.append(...invisibleFacetsClone);\n\n const generator = this.makeAutomaticFacetGenerator();\n if (generator) {\n generator.updateCollapseFacetsDependingOnFacetsVisibility(\n this.collapseFacetsAfter,\n visibleFacets.length\n );\n divSlot.append(generator);\n }\n\n return divSlot;\n }\n\n private getBoundInterfaces(): AtomicInterface[] {\n const mainInterface: AtomicInterface | null =\n this.host.closest('atomic-search-interface') ??\n this.host.closest('atomic-external')?.boundInterface ??\n null;\n if (!mainInterface) {\n throw new Error('Cannot find bound interface');\n }\n const boundExternalInterfaces = Array.from(\n document.querySelectorAll('atomic-external')\n ).filter(\n (atomicExternal) => atomicExternal.boundInterface === mainInterface\n );\n return [...boundExternalInterfaces, mainInterface];\n }\n\n private cloneFacets(facets: BaseFacetElement[]): BaseFacetElement[] {\n return facets.map((facet, i) => {\n facet.classList.remove(popoverClass);\n facet.setAttribute(isRefineModalFacet, '');\n const clone = facet.cloneNode(true) as BaseFacetElement;\n clone.isCollapsed =\n this.collapseFacetsAfter === -1\n ? false\n : i + 1 > this.collapseFacetsAfter;\n return clone;\n });\n }\n\n private makeAutomaticFacetGenerator() {\n if (!this.bindings.engine.state.automaticFacetSet?.desiredCount) {\n return;\n }\n const generator = document.createElement(\n 'atomic-automatic-facet-generator'\n );\n\n generator.setAttribute(\n 'desired-count',\n `${this.bindings.engine.state.automaticFacetSet?.desiredCount}`\n );\n this.addFacetColumnStyling(generator);\n\n return generator;\n }\n\n private addFacetColumnStyling(el: HTMLElement) {\n el.style.display = 'flex';\n el.style.flexDirection = 'column';\n el.style.gap = 'var(--atomic-refine-modal-facet-margin, 20px)';\n }\n\n private get options() {\n return this.bindings.store.state.sortOptions;\n }\n\n private select(e: Event) {\n const select = e.composedPath()[0] as HTMLSelectElement;\n const option = this.options.find(\n (option) => option.expression === select.value\n );\n option && this.sort.sortBy(option.criteria);\n }\n\n private buildOption({expression, criteria, label, tabs}: SortDropdownOption) {\n if (\n !shouldDisplayOnCurrentTab(\n [...tabs.included],\n [...tabs.excluded],\n this.tabManagerState?.activeTab\n )\n ) {\n return;\n }\n return (\n <option value={expression} selected={this.sort.isSortedBy(criteria)}>\n {this.bindings.i18n.t(label)}\n </option>\n );\n }\n\n private renderSort() {\n if (!this.options.length) {\n return;\n }\n\n return (\n <RefineModalSortSection\n i18n={this.bindings.i18n}\n onSelect={(option) => this.select(option)}\n >\n {this.options.map((option) => this.buildOption(option))}\n </RefineModalSortSection>\n );\n }\n\n private renderFilters() {\n const hasFacetElements = this.bindings.store.getFacetElements().length > 0;\n const hasAutomaticFacets =\n this.bindings.engine.state.automaticFacetSet?.set !== undefined;\n\n if (!hasFacetElements && !hasAutomaticFacets) {\n return;\n }\n\n const {i18n} = this.bindings;\n\n return (\n <RefineModalFiltersSection\n i18n={i18n}\n withFacets={hasFacetElements}\n withAutomaticFacets={hasAutomaticFacets}\n >\n {this.breadcrumbManagerState.hasBreadcrumbs && (\n <RefineModalFiltersClearButton\n i18n={i18n}\n onClick={() => this.breadcrumbManager.deselectAll()}\n />\n )}\n </RefineModalFiltersSection>\n );\n }\n\n public render() {\n return (\n <RefineModal\n i18n={this.bindings.i18n}\n host={this.host}\n isOpen={this.isOpen}\n onClose={() => (this.isOpen = false)}\n title={this.bindings.i18n.t('sort-and-filter')}\n numberOfItems={this.querySummaryState.total}\n openButton={this.openButton}\n >\n <RefineModalBody>\n {this.renderSort()}\n {this.renderFilters()}\n </RefineModalBody>\n </RefineModal>\n );\n }\n\n public componentDidLoad() {\n this.host.style.display = '';\n }\n}\n"],"mappings":"uwBAEO,MAAMA,EAAuC,CAACC,EAAGC,IAEpDC,EAAA,SACEC,KAAK,UACLC,KAAK,OACLC,MAAM,wBAELJ,GCAA,MAAMK,EAET,EAAEC,OAAMC,sBAAqBC,cAAaR,IAE1CC,EAACQ,EAAQ,KACPR,EAAA,OAAKC,KAAK,iBAAiBE,MAAM,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,iB,wCAGwBF,EAAA,CAArCE,EAAsB,S,gCAIzBF,EAAA,CAFNE,EAAsB,e","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as s,g as t}from"./p-dc3df5ce.js";import{h as o}from"./p-56c97c3e.js";import"./p-a12e1c59.js";import"./p-f284897c.js";import"./p-0462f723.js";const r=class{constructor(t){s(this,t)}componentDidRender(){o(this.host)}get host(){return t(this)}};export{r as atomic_result_section_emphasized};
2
- //# sourceMappingURL=p-da845e35.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["AtomicResultSectionEmphasized","componentDidRender","hideEmptySection","this","host"],"sources":["src/components/search/result-template-components/atomic-result-sections/atomic-result-section-emphasized.tsx"],"sourcesContent":["import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section displays the field that's important for its search criteria.\n * For example, in Commerce, a product's cost is often more important than the title itself.\n *\n * Behavior:\n * * Has a very large font size.\n * * Is the second closest element beneath the title section.\n */\n@Component({\n tag: 'atomic-result-section-emphasized',\n shadow: false,\n})\nexport class AtomicResultSectionEmphasized {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n"],"mappings":"6JAeaA,EAA6B,M,yBAGjC,kBAAAC,GACLC,EAAiBC,KAAKC,K","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as t,h as e,g as s}from"./p-dc3df5ce.js";import{loadQuerySuggestActions as r,HighlightUtils as i,buildRecentQueriesList as n}from"@coveo/headless";import{S as a}from"./p-cfb3c589.js";import{g as c,Q as o,a as h,b as l}from"./p-af93b44c.js";import{d as u}from"./p-4b7a19db.js";import{C as p}from"./p-c280cd05.js";import{S as m,a as d}from"./p-946fe85f.js";import{o as f}from"./p-a12e1c59.js";import{e as y}from"./p-8f5830b4.js";import"./p-c9074946.js";import"./p-1580513b.js";import"./p-f284897c.js";import"./p-0462f723.js";const g=class{constructor(e){t(this,e);this.error=undefined;this.icon=undefined;this.maxWithQuery=undefined;this.maxWithoutQuery=undefined}componentWillLoad(){try{u((t=>{this.bindings=t;return this.initialize()}),this.host,["atomic-search-box"])}catch(t){this.error=t}}initialize(){const t=this.bindings.engine;const{registerQuerySuggest:e,fetchQuerySuggestions:s}=r(t);t.dispatch(e({id:this.bindings.id,count:this.bindings.numberOfQueries}));return{position:Array.from(this.host.parentNode.children).indexOf(this.host),onInput:()=>t.dispatch(s({id:this.bindings.id})),renderItems:()=>this.renderItems()}}renderItems(){const t=this.bindings.searchBoxController.state.value!=="";const e=t?this.maxWithQuery:this.maxWithoutQuery;return this.bindings.searchBoxController.state.suggestions.slice(0,e).map((t=>this.renderItem(t)))}renderItem(t){const s=this.bindings.searchBoxController.state.value!=="";const r=c(t,this.bindings.i18n);return{...r,content:e(l,null,e(h,{icon:this.icon||a,hasSuggestion:this.bindings.getSuggestions().length>1}),e(o,{suggestion:t,hasQuery:s})),onSelect:()=>{this.bindings.searchBoxController.selectSuggestion(t.rawValue)}}}render(){if(this.error){return e("atomic-component-error",{key:"c5e8f0a3254a31cdae54c36868f70432c1673888",element:this.host,error:this.error})}}get host(){return s(this)}};const b=(t,e)=>({part:"recent-query-item",query:t,key:`recent-${y(t)}`,ariaLabel:e.t("recent-query-suggestion-label",{query:t,interpolation:{escapeValue:false}})});const q=t=>({key:"recent-query-clear",ariaLabel:t.t("clear-recent-searches",{interpolation:{escapeValue:false}}),part:"recent-query-title-item suggestion-divider",hideIfLast:true});const j=(t,s)=>e("div",{part:"recent-query-content",class:"flex items-center text-left break-all"},s);const x=({icon:t})=>e("atomic-icon",{part:"recent-query-icon",icon:t,class:"mr-2 h-4 w-4 shrink-0"});const S=({query:t,value:s})=>{if(t===""){return e("span",{part:"recent-query-text",class:"line-clamp-2 break-all"},s)}return e("span",{part:"recent-query-text",class:"line-clamp-2 break-all",innerHTML:i.highlightString({content:s,openingDelimiter:'<span part="recent-query-text-highlight" class="font-bold">',closingDelimiter:"</span>",highlights:[{offset:t.length,length:s.length-t.length}]})})};const I=({i18n:t})=>e("div",{part:"recent-query-title-content",class:"flex w-full justify-between"},e("span",{class:"font-bold",part:"recent-query-title"},t.t("recent-searches")),e("span",{part:"recent-query-clear"},t.t("clear")));const L=class{constructor(e){t(this,e);this.maxWithQuery=3;this.warnUser=f((()=>this.bindings.engine.logger.warn("Because analytics are disabled, the recent queries feature is deactivated.")));this.error=undefined;this.icon=undefined;this.maxWithQuery=3;this.maxWithoutQuery=undefined}componentWillLoad(){try{u((t=>{this.bindings=t;return this.initialize()}),this.host,["atomic-search-box"])}catch(t){this.error=t}}renderIcon(){return this.icon||p}initialize(){this.storage=new m;this.recentQueriesList=n(this.bindings.engine,{initialState:{queries:this.retrieveLocalStorage()},options:{maxLength:1e3,clearFilters:this.bindings.clearFilters}});this.recentQueriesList.subscribe((()=>this.updateLocalStorage()));return{position:Array.from(this.host.parentNode.children).indexOf(this.host),renderItems:()=>this.renderItems()}}retrieveLocalStorage(){return this.storage.getParsedJSON(d.RECENT_QUERIES,[])}updateLocalStorage(){if(!this.recentQueriesList.state.analyticsEnabled){return this.disableFeature()}return this.storage.setJSON(d.RECENT_QUERIES,this.recentQueriesList.state.queries)}disableFeature(){this.warnUser();this.storage.removeItem(d.RECENT_QUERIES)}renderItems(){if(!this.recentQueriesList.state.analyticsEnabled){return[]}const t=this.bindings.searchBoxController.state.value;const e=t!=="";const s=e?this.maxWithQuery:this.maxWithoutQuery;const r=this.recentQueriesList.state.queries.filter((e=>e.toLowerCase().startsWith(t.toLowerCase()))).slice(0,s);const i=r.map((t=>this.renderItem(t)));if(i.length){i.unshift(this.renderClear())}return i}renderClear(){const t=q(this.bindings.i18n);return{...t,content:e(I,{i18n:this.bindings.i18n}),onSelect:()=>{this.recentQueriesList.clear();this.bindings.triggerSuggestions()}}}renderItem(t){const s=this.bindings.searchBoxController.state.value;const r=b(t,this.bindings.i18n);return{...r,content:e(j,null,e(x,{icon:this.renderIcon()}),e(S,{query:s,value:t})),onSelect:()=>{if(this.bindings.isStandalone){this.bindings.searchBoxController.updateText(t);this.bindings.searchBoxController.submit();return}this.recentQueriesList.executeRecentQuery(this.recentQueriesList.state.queries.indexOf(t))}}}render(){if(this.error){return e("atomic-component-error",{key:"a428e82c6ce29e81704777cbbf3bea98937b906a",element:this.host,error:this.error})}}get host(){return s(this)}};export{g as atomic_search_box_query_suggestions,L as atomic_search_box_recent_queries};
2
- //# sourceMappingURL=p-ea1b81fa.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["AtomicSearchBoxQuerySuggestions","componentWillLoad","dispatchSearchBoxSuggestionsEvent","bindings","this","initialize","host","error","engine","registerQuerySuggest","fetchQuerySuggestions","loadQuerySuggestActions","dispatch","id","count","numberOfQueries","position","Array","from","parentNode","children","indexOf","onInput","renderItems","hasQuery","searchBoxController","state","value","max","maxWithQuery","maxWithoutQuery","suggestions","slice","map","suggestion","renderItem","partialItem","getPartialSearchBoxSuggestionElement","i18n","content","h","QuerySuggestionContainer","QuerySuggestionIcon","icon","SearchIcon","hasSuggestion","getSuggestions","length","QuerySuggestionText","onSelect","selectSuggestion","rawValue","render","key","element","getPartialRecentQueryElement","part","query","encodeForDomAttribute","ariaLabel","t","interpolation","escapeValue","getPartialRecentQueryClearElement","hideIfLast","RecentQueriesContainer","_","class","RecentQueryIcon","RecentQueryText","innerHTML","HighlightUtils","highlightString","openingDelimiter","closingDelimiter","highlights","offset","RecentQueryClear","AtomicSearchBoxRecentQueries","warnUser","once","logger","warn","renderIcon","Clock","storage","SafeStorage","recentQueriesList","buildRecentQueriesList","initialState","queries","retrieveLocalStorage","options","maxLength","clearFilters","subscribe","updateLocalStorage","getParsedJSON","StorageItems","RECENT_QUERIES","analyticsEnabled","disableFeature","setJSON","removeItem","filteredQueries","filter","recentQuery","toLowerCase","startsWith","suggestionElements","unshift","renderClear","clear","triggerSuggestions","isStandalone","updateText","submit","executeRecentQuery"],"sources":["src/components/search/search-box-suggestions/atomic-search-box-query-suggestions/atomic-search-box-query-suggestions.tsx","src/components/common/suggestions/stencil-recent-queries.tsx","src/components/search/search-box-suggestions/atomic-search-box-recent-queries/atomic-search-box-recent-queries.tsx"],"sourcesContent":["import {\n loadQuerySuggestActions,\n SearchBox,\n SearchEngine,\n Suggestion,\n} from '@coveo/headless';\nimport {Component, Element, Prop, State, h} from '@stencil/core';\nimport SearchIcon from '../../../../images/search.svg';\nimport {\n getPartialSearchBoxSuggestionElement,\n QuerySuggestionContainer,\n QuerySuggestionIcon,\n QuerySuggestionText,\n} from '../../../common/suggestions/stencil-query-suggestions';\nimport {\n dispatchSearchBoxSuggestionsEvent,\n} from '../../../common/suggestions/suggestions-events';\nimport type {\n SearchBoxSuggestionElement,\n SearchBoxSuggestions,\n SearchBoxSuggestionsBindings,\n} from '../../../common/suggestions/suggestions-types';\n\n/**\n * The `atomic-search-box-query-suggestions` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of query suggestion behavior.\n */\n@Component({\n tag: 'atomic-search-box-query-suggestions',\n shadow: true,\n})\nexport class AtomicSearchBoxQuerySuggestions {\n private bindings!: SearchBoxSuggestionsBindings<SearchBox>;\n @Element() private host!: HTMLElement;\n\n @State() public error!: Error;\n\n /**\n * The SVG icon to display.\n *\n * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n * - Use a value that starts with `assets://`, to display an icon from the Atomic package.\n * - Use a stringified SVG to display it directly.\n */\n @Prop() public icon?: string;\n\n /**\n * The maximum number of suggestions that will be displayed if the user has typed something into the input field.\n */\n @Prop({reflect: true}) public maxWithQuery?: number;\n /**\n * The maximum number of suggestions that will be displayed initially when the input field is empty.\n */\n @Prop({reflect: true}) public maxWithoutQuery?: number;\n\n componentWillLoad() {\n try {\n dispatchSearchBoxSuggestionsEvent<SearchBox>(\n (bindings) => {\n this.bindings = bindings;\n return this.initialize();\n },\n this.host,\n ['atomic-search-box']\n );\n } catch (error) {\n this.error = error as Error;\n }\n }\n\n private initialize(): SearchBoxSuggestions {\n const engine = this.bindings.engine as SearchEngine<{\n querySet: string;\n querySuggest: string;\n }>;\n const {registerQuerySuggest, fetchQuerySuggestions} =\n loadQuerySuggestActions(engine);\n\n engine.dispatch(\n registerQuerySuggest({\n id: this.bindings.id,\n count: this.bindings.numberOfQueries,\n })\n );\n\n return {\n position: Array.from(this.host.parentNode!.children).indexOf(this.host),\n onInput: () =>\n engine.dispatch(\n fetchQuerySuggestions({\n id: this.bindings.id,\n })\n ),\n renderItems: () => this.renderItems(),\n };\n }\n\n private renderItems(): SearchBoxSuggestionElement[] {\n const hasQuery = this.bindings.searchBoxController.state.value !== '';\n const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;\n return this.bindings.searchBoxController.state.suggestions\n .slice(0, max)\n .map((suggestion) => this.renderItem(suggestion));\n }\n\n private renderItem(suggestion: Suggestion) {\n const hasQuery = this.bindings.searchBoxController.state.value !== '';\n const partialItem = getPartialSearchBoxSuggestionElement(\n suggestion,\n this.bindings.i18n\n );\n\n return {\n ...partialItem,\n content: (\n <QuerySuggestionContainer>\n <QuerySuggestionIcon\n icon={this.icon || SearchIcon}\n hasSuggestion={this.bindings.getSuggestions().length > 1}\n />\n\n <QuerySuggestionText suggestion={suggestion} hasQuery={hasQuery} />\n </QuerySuggestionContainer>\n ),\n onSelect: () => {\n this.bindings.searchBoxController.selectSuggestion(suggestion.rawValue);\n },\n };\n }\n\n public render() {\n if (this.error) {\n return (\n <atomic-component-error\n element={this.host}\n error={this.error}\n ></atomic-component-error>\n );\n }\n }\n}\n","import {HighlightUtils} from '@coveo/headless';\nimport {FunctionalComponent, h} from '@stencil/core';\nimport {i18n} from 'i18next';\nimport {encodeForDomAttribute} from '../../../utils/string-utils';\nimport {SearchBoxSuggestionElement} from './suggestions-types';\n\nexport const getPartialRecentQueryElement = (\n value: string,\n i18n: i18n\n): Pick<SearchBoxSuggestionElement, 'ariaLabel' | 'key' | 'query' | 'part'> => {\n return {\n part: 'recent-query-item',\n query: value,\n key: `recent-${encodeForDomAttribute(value)}`,\n ariaLabel: i18n.t('recent-query-suggestion-label', {\n query: value,\n interpolation: {escapeValue: false},\n }),\n };\n};\n\nexport const getPartialRecentQueryClearElement = (\n i18n: i18n\n): Pick<\n SearchBoxSuggestionElement,\n 'ariaLabel' | 'key' | 'part' | 'hideIfLast'\n> => {\n return {\n key: 'recent-query-clear',\n ariaLabel: i18n.t('clear-recent-searches', {\n interpolation: {escapeValue: false},\n }),\n part: 'recent-query-title-item suggestion-divider',\n hideIfLast: true,\n };\n};\n\nexport const RecentQueriesContainer: FunctionalComponent = (_, children) => {\n return (\n <div\n part=\"recent-query-content\"\n class=\"flex items-center text-left break-all\"\n >\n {children}\n </div>\n );\n};\n\ninterface RecentQueryIconProps {\n icon: string;\n}\n\nexport const RecentQueryIcon: FunctionalComponent<RecentQueryIconProps> = ({\n icon,\n}) => {\n return (\n <atomic-icon\n part=\"recent-query-icon\"\n icon={icon}\n class=\"mr-2 h-4 w-4 shrink-0\"\n ></atomic-icon>\n );\n};\n\ninterface RecentQueryTextProps {\n query: string;\n value: string;\n}\n\nexport const RecentQueryText: FunctionalComponent<RecentQueryTextProps> = ({\n query,\n value,\n}) => {\n if (query === '') {\n return (\n <span part=\"recent-query-text\" class=\"line-clamp-2 break-all\">\n {value}\n </span>\n );\n }\n return (\n <span\n part=\"recent-query-text\"\n class=\"line-clamp-2 break-all\"\n innerHTML={HighlightUtils.highlightString({\n content: value,\n openingDelimiter:\n '<span part=\"recent-query-text-highlight\" class=\"font-bold\">',\n closingDelimiter: '</span>',\n highlights: [\n {\n offset: query.length,\n length: value.length - query.length,\n },\n ],\n })}\n ></span>\n );\n};\n\ninterface RecentQueryClearProps {\n i18n: i18n;\n}\n\nexport const RecentQueryClear: FunctionalComponent<RecentQueryClearProps> = ({\n i18n,\n}) => {\n return (\n <div part=\"recent-query-title-content\" class=\"flex w-full justify-between\">\n <span class=\"font-bold\" part=\"recent-query-title\">\n {i18n.t('recent-searches')}\n </span>\n <span part=\"recent-query-clear\">{i18n.t('clear')}</span>\n </div>\n );\n};\n","import {\n buildRecentQueriesList,\n RecentQueriesList,\n SearchBox,\n} from '@coveo/headless';\nimport {Component, Element, Prop, State, h} from '@stencil/core';\nimport Clock from '../../../../images/clock.svg';\nimport {SafeStorage, StorageItems} from '../../../../utils/local-storage-utils';\nimport {once} from '../../../../utils/utils';\nimport {\n getPartialRecentQueryClearElement,\n getPartialRecentQueryElement,\n RecentQueriesContainer,\n RecentQueryClear,\n RecentQueryIcon,\n RecentQueryText,\n} from '../../../common/suggestions/stencil-recent-queries';\nimport {\n dispatchSearchBoxSuggestionsEvent,\n} from '../../../common/suggestions/suggestions-events';\nimport type {\n SearchBoxSuggestionElement,\n SearchBoxSuggestions,\n SearchBoxSuggestionsBindings,\n} from '../../../common/suggestions/suggestions-types';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\n\n/**\n * 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.\n */\n@Component({\n tag: 'atomic-search-box-recent-queries',\n shadow: true,\n})\nexport class AtomicSearchBoxRecentQueries {\n private bindings!: SearchBoxSuggestionsBindings<SearchBox, Bindings>;\n private recentQueriesList!: RecentQueriesList;\n private storage!: SafeStorage;\n\n @Element() private host!: HTMLElement;\n\n @State() public error!: Error;\n\n /**\n * The SVG icon to display.\n *\n * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n * - Use a value that starts with `assets://`, to display an icon from the Atomic package.\n * - Use a stringified SVG to display it directly.\n */\n @Prop() public icon?: string;\n\n /**\n * The maximum number of suggestions that will be displayed if the user has typed something into the input field.\n */\n @Prop({reflect: true}) public maxWithQuery = 3;\n /**\n * The maximum number of suggestions that will be displayed initially when the input field is empty.\n */\n @Prop({reflect: true}) public maxWithoutQuery?: number;\n\n componentWillLoad() {\n try {\n dispatchSearchBoxSuggestionsEvent<SearchBox, Bindings>(\n (bindings) => {\n this.bindings = bindings;\n return this.initialize();\n },\n this.host,\n ['atomic-search-box']\n );\n } catch (error) {\n this.error = error as Error;\n }\n }\n\n private renderIcon() {\n return this.icon || Clock;\n }\n\n private initialize(): SearchBoxSuggestions {\n this.storage = new SafeStorage();\n this.recentQueriesList = buildRecentQueriesList(this.bindings.engine, {\n initialState: {queries: this.retrieveLocalStorage()},\n options: {maxLength: 1000, clearFilters: this.bindings.clearFilters},\n });\n\n this.recentQueriesList.subscribe(() => this.updateLocalStorage());\n\n return {\n position: Array.from(this.host.parentNode!.children).indexOf(this.host),\n renderItems: () => this.renderItems(),\n };\n }\n\n private retrieveLocalStorage() {\n return this.storage.getParsedJSON(StorageItems.RECENT_QUERIES, []);\n }\n\n private updateLocalStorage() {\n if (!this.recentQueriesList.state.analyticsEnabled) {\n return this.disableFeature();\n }\n\n return this.storage.setJSON(\n StorageItems.RECENT_QUERIES,\n this.recentQueriesList.state.queries\n );\n }\n\n private warnUser = once(() =>\n this.bindings.engine.logger.warn(\n 'Because analytics are disabled, the recent queries feature is deactivated.'\n )\n );\n\n private disableFeature() {\n this.warnUser();\n this.storage.removeItem(StorageItems.RECENT_QUERIES);\n }\n\n private renderItems(): SearchBoxSuggestionElement[] {\n if (!this.recentQueriesList.state.analyticsEnabled) {\n return [];\n }\n\n const query = this.bindings.searchBoxController.state.value;\n const hasQuery = query !== '';\n const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;\n const filteredQueries = this.recentQueriesList.state.queries\n .filter((recentQuery) =>\n recentQuery.toLowerCase().startsWith(query.toLowerCase())\n )\n .slice(0, max);\n\n const suggestionElements: SearchBoxSuggestionElement[] =\n filteredQueries.map((value) => this.renderItem(value));\n if (suggestionElements.length) {\n suggestionElements.unshift(this.renderClear());\n }\n\n return suggestionElements;\n }\n\n private renderClear(): SearchBoxSuggestionElement {\n const partialItem = getPartialRecentQueryClearElement(this.bindings.i18n);\n\n return {\n ...partialItem,\n content: <RecentQueryClear i18n={this.bindings.i18n} />,\n onSelect: () => {\n this.recentQueriesList.clear();\n this.bindings.triggerSuggestions();\n },\n };\n }\n\n private renderItem(value: string): SearchBoxSuggestionElement {\n const query = this.bindings.searchBoxController.state.value;\n const partialItem = getPartialRecentQueryElement(value, this.bindings.i18n);\n return {\n ...partialItem,\n content: (\n <RecentQueriesContainer>\n <RecentQueryIcon icon={this.renderIcon()} />\n <RecentQueryText query={query} value={value} />\n </RecentQueriesContainer>\n ),\n\n onSelect: () => {\n if (this.bindings.isStandalone) {\n this.bindings.searchBoxController.updateText(value);\n this.bindings.searchBoxController.submit();\n return;\n }\n\n this.recentQueriesList.executeRecentQuery(\n this.recentQueriesList.state.queries.indexOf(value)\n );\n },\n };\n }\n\n public render() {\n if (this.error) {\n return (\n <atomic-component-error\n element={this.host}\n error={this.error}\n ></atomic-component-error>\n );\n }\n }\n}\n"],"mappings":"0hBA8BaA,EAA+B,M,6HAwB1C,iBAAAC,GACE,IACEC,GACGC,IACCC,KAAKD,SAAWA,EAChB,OAAOC,KAAKC,YAAY,GAE1BD,KAAKE,KACL,CAAC,qB,CAEH,MAAOC,GACPH,KAAKG,MAAQA,C,EAIT,UAAAF,GACN,MAAMG,EAASJ,KAAKD,SAASK,OAI7B,MAAMC,qBAACA,EAAoBC,sBAAEA,GAC3BC,EAAwBH,GAE1BA,EAAOI,SACLH,EAAqB,CACnBI,GAAIT,KAAKD,SAASU,GAClBC,MAAOV,KAAKD,SAASY,mBAIzB,MAAO,CACLC,SAAUC,MAAMC,KAAKd,KAAKE,KAAKa,WAAYC,UAAUC,QAAQjB,KAAKE,MAClEgB,QAAS,IACPd,EAAOI,SACLF,EAAsB,CACpBG,GAAIT,KAAKD,SAASU,MAGxBU,YAAa,IAAMnB,KAAKmB,c,CAIpB,WAAAA,GACN,MAAMC,EAAWpB,KAAKD,SAASsB,oBAAoBC,MAAMC,QAAU,GACnE,MAAMC,EAAMJ,EAAWpB,KAAKyB,aAAezB,KAAK0B,gBAChD,OAAO1B,KAAKD,SAASsB,oBAAoBC,MAAMK,YAC5CC,MAAM,EAAGJ,GACTK,KAAKC,GA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hH,KAAKmF,kBAAkB8B,mBACrBjH,KAAKmF,kBAAkB7D,MAAMgE,QAAQrE,QAAQM,GAC9C,E,CAKA,MAAAyB,GACL,GAAIhD,KAAKG,MAAO,CACd,OACEiC,EAAA,0BAAAa,IAAA,2CACEC,QAASlD,KAAKE,KACdC,MAAOH,KAAKG,O","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"file":"atomic-result-placeholder.atomic-result-section-actions.atomic-result-section-badges.atomic-result-section-bottom-metadata.atomic-result-section-excerpt.atomic-result-section-title.atomic-result-section-visual.atomic-result-table-placeholder.entry.cjs.js","mappings":";;;;;;;;;;;;AAAA,MAAM,0BAA0B,GAAG,ml2WAAml2W,CAAC;AACvn2W,sCAAe,0BAA0B;;ACOzC,MAAMA,oBAAkB,GAAG,wCAAwC,CAAC;MAWvD,uBAAuB;;;;;;;IAK1B,iBAAiB,CAAC,KAAa;QACrC,QACEC,iBACE,KAAK,EAAE;gBACL,MAAM,EAAE,oBAAoB;gBAC5B,KAAK;aACN,IAEDA,iBACE,KAAK,EAAED,oBAAkB,EACzB,KAAK,EAAE,EAAC,MAAM,EAAE,kBAAkB,EAAC,GAC9B,CACH,EACN;KACH;IAEM,MAAM;QACX,QACEC,kEACE,KAAK,EAAE,uDAAuDC,oCAAqB,CACjF,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,SAAS,CACf;iBACE,IAAI,CAAC,GAAG,CAAC;iBACT,IAAI,EAAE,EAAE,IAEXD,6FACEA,kEAAK,KAAK,EAAED,oBAAkB,GAAQ,CACT,EAC/BC,6FACEA,kEAAK,KAAK,EAAE,SAASD,oBAAkB,EAAE,GAAQ,CACpB,EAC/BC,8FACEA,kEAAK,KAAK,EAAE,UAAUD,oBAAkB,EAAE,GAAQ,CACpB,EAChCC,4FACEA,kEAAK,KAAK,EAAE,SAASD,oBAAkB,EAAE,GAAQ,CACrB,EAC9BC,8FACG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CA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G,CAAC,EAAE,IACpEA,sEACEA,mEACEA,mEACEA,kEACE,KAAK,EAAE,YAAY,kBAAkB,EAAE,EACvC,KAAK,EAAE,EAAC,KAAK,EAAE,SAAS,EAAC,GACpB,CACJ,EACLA,mEACEA,kEACE,KAAK,EAAE,YAAY,kBAAkB,EAAE,EACvC,KAAK,EAAE,EAAC,KAAK,EAAE,SAAS,EAAC,GACpB,CACJ,EACLA,mEACEA,kEACE,KAAK,EAAE,YAAY,kBAAkB,EAAE,EACvC,KAAK,EAAE,EAAC,KAAK,EAAE,QAAQ,EAAC,GACnB,CACJ,CACF,CACC,EACRA,sEACG,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAC,EAAE,OAC/BA,oBACEA,oBACEA,iBACE,KAAK,EAAE,YAAY,kBAAkB,EAAE,EACvC,KAAK,EAAE,EAAC,KAAK,EAAE,WAAW,EAAC,GACtB,EACPA,iBACE,KAAK,EAAE,YAAY,kBAAkB,EAAE,EACvC,KAAK,EAAE,EAAC,KAAK,EAAE,UAAU,EAAC,GACrB,EACPA,iBACE,KAAK,EAAE,OAAO,kBAAkB,EAAE,EAClC,KAAK,EAAE,EAAC,KAAK,EAAE,SAAS,EAAC,GACpB,CACJ,EACLA,oBACEA,iBACE,KAAK,EAAE,cAAc,kBAAkB,EAAE,EACzC,KAAK,EAAE,EAAC,KAAK,EAAE,OAAO,EAAC,GAClB,CACJ,EACLA,oBACEA,iBACE,KAAK,EAAE,cAAc,kBAAkB,EAAE,EACzC,KAAK,EAAE,EAAC,KAAK,EAAE,UAAU,EAAC,GACrB,CACJ,CACF,CACN,CAAC,CACI,CACF,EACR;KACH;;;;;;;;;;;;;","names":["placeholderClasses","h","getItemDisplayClasses","hideEmptySection"],"sources":["src/components/common/atomic-result-placeholder/atomic-result-placeholder.pcss?tag=atomic-result-placeholder&encapsulation=shadow","src/components/common/atomic-result-placeholder/atomic-result-placeholder.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-actions.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-badges.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-bottom-metadata.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-excerpt.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-title.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-visual.tsx","src/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.pcss?tag=atomic-result-table-placeholder&encapsulation=shadow","src/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n\n@import '../template-system/template-system.pcss';\n\n:host {\n @apply atomic-template-system;\n\n .result-root {\n &.display-grid {\n atomic-result-section-actions {\n display: none;\n }\n }\n\n .badge {\n width: 14rem;\n }\n\n .action {\n width: 10rem;\n }\n\n .title {\n display: grid;\n grid-auto-flow: column;\n grid-gap: 0.5rem;\n height: var(--line-height);\n width: 30rem;\n max-width: 100%;\n }\n\n .fields-placeholder {\n display: grid;\n grid-template-columns: repeat(auto-fill, min(11rem, 40%));\n grid-column-gap: 0.5rem;\n\n .field-value-placeholder {\n height: var(--font-size);\n margin: calc((var(--line-height) - var(--font-size)) / 2) 0;\n }\n }\n }\n}\n","import {Component, h, Prop} from '@stencil/core';\nimport {\n ItemDisplayLayout,\n ItemDisplayDensity,\n ItemDisplayImageSize,\n getItemDisplayClasses,\n} from '../../common/layout/display-options';\n\nconst placeholderClasses = 'block bg-neutral w-full h-full rounded';\n\n/**\n * The `atomic-result-placeholder` component provides an intermediate visual state that is rendered before the first results are available.\n * @internal\n */\n@Component({\n tag: 'atomic-result-placeholder',\n styleUrl: 'atomic-result-placeholder.pcss',\n shadow: true,\n})\nexport class AtomicResultPlaceholder {\n @Prop() display!: ItemDisplayLayout;\n @Prop() density!: ItemDisplayDensity;\n @Prop() imageSize!: ItemDisplayImageSize;\n\n private renderExcerptLine(width: string) {\n return (\n <div\n style={{\n height: 'var(--line-height)',\n width,\n }}\n >\n <div\n class={placeholderClasses}\n style={{height: 'var(--font-size)'}}\n ></div>\n </div>\n );\n }\n\n public render() {\n return (\n <div\n class={`result-root placeholder with-sections animate-pulse ${getItemDisplayClasses(\n this.display,\n this.density,\n this.imageSize\n )\n .join(' ')\n .trim()}`}\n >\n <atomic-result-section-visual>\n <div class={placeholderClasses}></div>\n </atomic-result-section-visual>\n <atomic-result-section-badges>\n <div class={`badge ${placeholderClasses}`}></div>\n </atomic-result-section-badges>\n <atomic-result-section-actions>\n <div class={`action ${placeholderClasses}`}></div>\n </atomic-result-section-actions>\n <atomic-result-section-title>\n <div class={`title ${placeholderClasses}`}></div>\n </atomic-result-section-title>\n <atomic-result-section-excerpt>\n {this.renderExcerptLine('100%')}\n {this.renderExcerptLine('95%')}\n {this.renderExcerptLine('98%')}\n </atomic-result-section-excerpt>\n <atomic-result-section-bottom-metadata>\n <div class=\"fields-placeholder\">\n {Array.from({length: 4}, () => (\n <div\n class={`field-value-placeholder ${placeholderClasses}`}\n ></div>\n ))}\n </div>\n </atomic-result-section-bottom-metadata>\n </div>\n );\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section allows the information seeker to perform an action on an item without having to view its details.\n * 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.\n *\n * Behavior:\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * ** You should ensure that elements inside of it have `height: var(--line-height)`.\n * * Is a wrapping flexbox with a gap.\n * * May appear over, next to, or beneath the visual section.\n */\n@Component({\n tag: 'atomic-result-section-actions',\n shadow: false,\n})\nexport class AtomicResultSectionActions {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section provides badges that highlight special features of the item.\n *\n * Behavior:\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * ** You should ensure that elements inside of it have `height: var(--line-height)`.\n * * Is a wrapping flexbox with a gap.\n * * May appear over, next to, or beneath the visual section.\n */\n@Component({\n tag: 'atomic-result-section-badges',\n shadow: false,\n})\nexport class AtomicResultSectionBadges {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section displays additional descriptive information about the item.\n *\n * Behavior:\n * * Has a maximum height of two lines.\n * ** We recommend that you use `atomic-result-fields-list` to ensure that the fields in this section don’t overflow.\n * * Exposes the `--line-height` variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n * * Has a font weight.\n */\n@Component({\n tag: 'atomic-result-section-bottom-metadata',\n shadow: false,\n})\nexport class AtomicResultSectionBottomMetadata {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section contains an informative summary of the item's content.\n *\n * Behavior:\n * * Has a fixed height of one to three lines, depending on the layout and density.\n * * Ellipses overflowing text.\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n */\n@Component({\n tag: 'atomic-result-section-excerpt',\n shadow: false,\n})\nexport class AtomicResultSectionExcerpt {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section identifies the item by its name, and its main use is to make the result list scannable.\n * This is usually the page title.\n *\n * Behavior:\n * * Has a fixed height of two lines on grid layouts.\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n */\n@Component({\n tag: 'atomic-result-section-title',\n shadow: false,\n})\nexport class AtomicResultSectionTitle {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component, Prop} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\nimport {ItemDisplayImageSize} from '../../../common/layout/display-options';\n\n/**\n * This section provides visual information about the item.\n * For example, in Commerce, an image is a great shorthand for a product category.\n * An icon can quickly show the item type, or an avatar can help identify to whom it is related.\n *\n * Behavior:\n * * Has a fixed size that depends on the specified image size, the layout, the density, and the screen size.\n * ** When the image size is set to `icon`, this section stays very small.\n * ** You should ensure that elements inside of it take the available space.\n * * Always has a 1:1 aspect ratio.\n */\n@Component({\n tag: 'atomic-result-section-visual',\n shadow: false,\n})\nexport class AtomicResultSectionVisual {\n @Element() private host!: HTMLElement;\n\n /**\n * How large or small the visual section of results using this template should be.\n */\n @Prop({reflect: true}) public imageSize?: ItemDisplayImageSize;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","@import '../../../global/global.pcss';\n@import '../../common/item-list/styles/mixins.pcss';\n\n:host {\n display: grid;\n}\n\n.list-root.display-table {\n @apply atomic-result-table border-neutral rounded-xl border;\n\n thead tr,\n tbody tr:not(:last-child) {\n position: relative;\n\n &::after {\n content: ' ';\n display: block;\n position: absolute;\n height: 1px;\n bottom: 0;\n left: var(--padding);\n right: var(--padding);\n @apply bg-neutral;\n }\n }\n\n th,\n td {\n border-color: transparent;\n border-radius: initial;\n }\n\n th {\n background-color: transparent;\n }\n}\n","import {Component, h, Prop} from '@stencil/core';\nimport {\n ItemDisplayDensity,\n ItemDisplayImageSize,\n getItemDisplayClasses,\n} from '../../common/layout/display-options';\n\nconst placeholderClasses = 'block bg-neutral rounded';\n\n/**\n * The `atomic-result-table-placeholder` component provides an intermediate visual state that is rendered before the first results are available.\n * @internal\n */\n@Component({\n tag: 'atomic-result-table-placeholder',\n styleUrl: 'atomic-result-table-placeholder.pcss',\n shadow: true,\n})\nexport class AtomicResultTablePlaceholder {\n @Prop() density!: ItemDisplayDensity;\n @Prop() imageSize!: ItemDisplayImageSize;\n @Prop() rows!: number;\n\n private getClasses() {\n return getItemDisplayClasses('table', this.density, this.imageSize);\n }\n\n public render() {\n return (\n <table class={`list-root animate-pulse ${this.getClasses().join(' ')}`}>\n <thead>\n <tr>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '14.5rem'}}\n ></div>\n </th>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '9.75rem'}}\n ></div>\n </th>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '6.5rem'}}\n ></div>\n </th>\n </tr>\n </thead>\n <tbody>\n {Array.from({length: this.rows}, () => (\n <tr>\n <td>\n <div\n class={`mb-6 h-8 ${placeholderClasses}`}\n style={{width: '22.875rem'}}\n ></div>\n <div\n class={`mb-2 h-5 ${placeholderClasses}`}\n style={{width: '23.75rem'}}\n ></div>\n <div\n class={`h-5 ${placeholderClasses}`}\n style={{width: '11.5rem'}}\n ></div>\n </td>\n <td>\n <div\n class={`mt-1.5 h-5 ${placeholderClasses}`}\n style={{width: '11rem'}}\n ></div>\n </td>\n <td>\n <div\n class={`mt-1.5 h-5 ${placeholderClasses}`}\n style={{width: '4.875rem'}}\n ></div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n }\n}\n"],"version":3}
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-757bc886.js');
6
- const itemSectionUtils = require('./item-section-utils-8579462c.js');
7
- require('./utils-7153ae6b.js');
8
- require('./purify-85b542e2.js');
9
- require('./_commonjsHelpers-b3309d7b.js');
10
-
11
- const AtomicResultSectionChildren = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- }
15
- componentDidRender() {
16
- itemSectionUtils.hideEmptySection(this.host);
17
- }
18
- get host() { return index.getElement(this); }
19
- };
20
-
21
- exports.atomic_result_section_children = AtomicResultSectionChildren;
22
-
23
- //# sourceMappingURL=atomic-result-section-children.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"atomic-result-section-children.entry.cjs.js","mappings":";;;;;;;;;;MAaa,2BAA2B;;;;IAG/B,kBAAkB;QACvBA,iCAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC7B;;;;;;","names":["hideEmptySection"],"sources":["src/components/search/result-template-components/atomic-result-sections/atomic-result-section-children.tsx"],"sourcesContent":["import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section displays the folded results, available when using the <atomic-result-children> component.\n *\n * Behavior:\n * * Shows children at the bottom of the result, indented and wrapped in a border.\n */\n@Component({\n tag: 'atomic-result-section-children',\n shadow: false,\n})\nexport class AtomicResultSectionChildren {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n"],"version":3}
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-757bc886.js');
6
- const itemSectionUtils = require('./item-section-utils-8579462c.js');
7
- require('./utils-7153ae6b.js');
8
- require('./purify-85b542e2.js');
9
- require('./_commonjsHelpers-b3309d7b.js');
10
-
11
- const AtomicResultSectionEmphasized = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- }
15
- componentDidRender() {
16
- itemSectionUtils.hideEmptySection(this.host);
17
- }
18
- get host() { return index.getElement(this); }
19
- };
20
-
21
- exports.atomic_result_section_emphasized = AtomicResultSectionEmphasized;
22
-
23
- //# sourceMappingURL=atomic-result-section-emphasized.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"atomic-result-section-emphasized.entry.cjs.js","mappings":";;;;;;;;;;MAea,6BAA6B;;;;IAGjC,kBAAkB;QACvBA,iCAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC7B;;;;;;","names":["hideEmptySection"],"sources":["src/components/search/result-template-components/atomic-result-sections/atomic-result-section-emphasized.tsx"],"sourcesContent":["import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section displays the field that's important for its search criteria.\n * For example, in Commerce, a product's cost is often more important than the title itself.\n *\n * Behavior:\n * * Has a very large font size.\n * * Is the second closest element beneath the title section.\n */\n@Component({\n tag: 'atomic-result-section-emphasized',\n shadow: false,\n})\nexport class AtomicResultSectionEmphasized {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n"],"version":3}
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-757bc886.js');
6
- const itemSectionUtils = require('./item-section-utils-8579462c.js');
7
- require('./utils-7153ae6b.js');
8
- require('./purify-85b542e2.js');
9
- require('./_commonjsHelpers-b3309d7b.js');
10
-
11
- const AtomicResultSectionTitleMetadata = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- }
15
- componentDidRender() {
16
- itemSectionUtils.hideEmptySection(this.host);
17
- }
18
- get host() { return index.getElement(this); }
19
- };
20
-
21
- exports.atomic_result_section_title_metadata = AtomicResultSectionTitleMetadata;
22
-
23
- //# sourceMappingURL=atomic-result-section-title-metadata.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"atomic-result-section-title-metadata.entry.cjs.js","mappings":";;;;;;;;;;MAgBa,gCAAgC;;;;IAGpC,kBAAkB;QACvBA,iCAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC7B;;;;;;","names":["hideEmptySection"],"sources":["src/components/search/result-template-components/atomic-result-sections/atomic-result-section-title-metadata.tsx"],"sourcesContent":["import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section surfaces some fields that are directly related to the title of the item.\n * For example, in Commerce, this could be the item's rating, which is tied to the nature of the product itself,\n * rather than to the product's description.\n *\n * Behavior:\n * * Has a very small font size.\n * * Is the closest element beneath the title section.\n */\n@Component({\n tag: 'atomic-result-section-title-metadata',\n shadow: false,\n})\nexport class AtomicResultSectionTitleMetadata {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n"],"version":3}
@@ -1,234 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-757bc886.js');
6
- const headless = require('@coveo/headless');
7
- const search = require('./search-a4774f02.js');
8
- const stencilQuerySuggestions = require('./stencil-query-suggestions-03268ecc.js');
9
- const suggestionsEvents = require('./suggestions-events-63dd0640.js');
10
- const clock = require('./clock-f03ff827.js');
11
- const localStorageUtils = require('./local-storage-utils-380ce22b.js');
12
- const utils = require('./utils-7153ae6b.js');
13
- const stringUtils = require('./string-utils-bdf08f8c.js');
14
- require('./dom-utils-d4790328.js');
15
- require('./event-utils-9bfcf3c5.js');
16
- require('./purify-85b542e2.js');
17
- require('./_commonjsHelpers-b3309d7b.js');
18
-
19
- const AtomicSearchBoxQuerySuggestions = class {
20
- constructor(hostRef) {
21
- index.registerInstance(this, hostRef);
22
- this.error = undefined;
23
- this.icon = undefined;
24
- this.maxWithQuery = undefined;
25
- this.maxWithoutQuery = undefined;
26
- }
27
- componentWillLoad() {
28
- try {
29
- suggestionsEvents.dispatchSearchBoxSuggestionsEvent((bindings) => {
30
- this.bindings = bindings;
31
- return this.initialize();
32
- }, this.host, ['atomic-search-box']);
33
- }
34
- catch (error) {
35
- this.error = error;
36
- }
37
- }
38
- initialize() {
39
- const engine = this.bindings.engine;
40
- const { registerQuerySuggest, fetchQuerySuggestions } = headless.loadQuerySuggestActions(engine);
41
- engine.dispatch(registerQuerySuggest({
42
- id: this.bindings.id,
43
- count: this.bindings.numberOfQueries,
44
- }));
45
- return {
46
- position: Array.from(this.host.parentNode.children).indexOf(this.host),
47
- onInput: () => engine.dispatch(fetchQuerySuggestions({
48
- id: this.bindings.id,
49
- })),
50
- renderItems: () => this.renderItems(),
51
- };
52
- }
53
- renderItems() {
54
- const hasQuery = this.bindings.searchBoxController.state.value !== '';
55
- const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;
56
- return this.bindings.searchBoxController.state.suggestions
57
- .slice(0, max)
58
- .map((suggestion) => this.renderItem(suggestion));
59
- }
60
- renderItem(suggestion) {
61
- const hasQuery = this.bindings.searchBoxController.state.value !== '';
62
- const partialItem = stencilQuerySuggestions.getPartialSearchBoxSuggestionElement(suggestion, this.bindings.i18n);
63
- return {
64
- ...partialItem,
65
- content: (index.h(stencilQuerySuggestions.QuerySuggestionContainer, null, index.h(stencilQuerySuggestions.QuerySuggestionIcon, { icon: this.icon || search.SearchIcon, hasSuggestion: this.bindings.getSuggestions().length > 1 }), index.h(stencilQuerySuggestions.QuerySuggestionText, { suggestion: suggestion, hasQuery: hasQuery }))),
66
- onSelect: () => {
67
- this.bindings.searchBoxController.selectSuggestion(suggestion.rawValue);
68
- },
69
- };
70
- }
71
- render() {
72
- if (this.error) {
73
- return (index.h("atomic-component-error", { key: 'c5e8f0a3254a31cdae54c36868f70432c1673888', element: this.host, error: this.error }));
74
- }
75
- }
76
- get host() { return index.getElement(this); }
77
- };
78
-
79
- const getPartialRecentQueryElement = (value, i18n) => {
80
- return {
81
- part: 'recent-query-item',
82
- query: value,
83
- key: `recent-${stringUtils.encodeForDomAttribute(value)}`,
84
- ariaLabel: i18n.t('recent-query-suggestion-label', {
85
- query: value,
86
- interpolation: { escapeValue: false },
87
- }),
88
- };
89
- };
90
- const getPartialRecentQueryClearElement = (i18n) => {
91
- return {
92
- key: 'recent-query-clear',
93
- ariaLabel: i18n.t('clear-recent-searches', {
94
- interpolation: { escapeValue: false },
95
- }),
96
- part: 'recent-query-title-item suggestion-divider',
97
- hideIfLast: true,
98
- };
99
- };
100
- const RecentQueriesContainer = (_, children) => {
101
- return (index.h("div", { part: "recent-query-content", class: "flex items-center text-left break-all" }, children));
102
- };
103
- const RecentQueryIcon = ({ icon, }) => {
104
- return (index.h("atomic-icon", { part: "recent-query-icon", icon: icon, class: "mr-2 h-4 w-4 shrink-0" }));
105
- };
106
- const RecentQueryText = ({ query, value, }) => {
107
- if (query === '') {
108
- return (index.h("span", { part: "recent-query-text", class: "line-clamp-2 break-all" }, value));
109
- }
110
- return (index.h("span", { part: "recent-query-text", class: "line-clamp-2 break-all", innerHTML: headless.HighlightUtils.highlightString({
111
- content: value,
112
- openingDelimiter: '<span part="recent-query-text-highlight" class="font-bold">',
113
- closingDelimiter: '</span>',
114
- highlights: [
115
- {
116
- offset: query.length,
117
- length: value.length - query.length,
118
- },
119
- ],
120
- }) }));
121
- };
122
- const RecentQueryClear = ({ i18n, }) => {
123
- return (index.h("div", { part: "recent-query-title-content", class: "flex w-full justify-between" },
124
- index.h("span", { class: "font-bold", part: "recent-query-title" }, i18n.t('recent-searches')),
125
- index.h("span", { part: "recent-query-clear" }, i18n.t('clear'))));
126
- };
127
-
128
- const AtomicSearchBoxRecentQueries = class {
129
- constructor(hostRef) {
130
- index.registerInstance(this, hostRef);
131
- /**
132
- * The maximum number of suggestions that will be displayed if the user has typed something into the input field.
133
- */
134
- this.maxWithQuery = 3;
135
- this.warnUser = utils.once(() => this.bindings.engine.logger.warn('Because analytics are disabled, the recent queries feature is deactivated.'));
136
- this.error = undefined;
137
- this.icon = undefined;
138
- this.maxWithQuery = 3;
139
- this.maxWithoutQuery = undefined;
140
- }
141
- componentWillLoad() {
142
- try {
143
- suggestionsEvents.dispatchSearchBoxSuggestionsEvent((bindings) => {
144
- this.bindings = bindings;
145
- return this.initialize();
146
- }, this.host, ['atomic-search-box']);
147
- }
148
- catch (error) {
149
- this.error = error;
150
- }
151
- }
152
- renderIcon() {
153
- return this.icon || clock.Clock;
154
- }
155
- initialize() {
156
- this.storage = new localStorageUtils.SafeStorage();
157
- this.recentQueriesList = headless.buildRecentQueriesList(this.bindings.engine, {
158
- initialState: { queries: this.retrieveLocalStorage() },
159
- options: { maxLength: 1000, clearFilters: this.bindings.clearFilters },
160
- });
161
- this.recentQueriesList.subscribe(() => this.updateLocalStorage());
162
- return {
163
- position: Array.from(this.host.parentNode.children).indexOf(this.host),
164
- renderItems: () => this.renderItems(),
165
- };
166
- }
167
- retrieveLocalStorage() {
168
- return this.storage.getParsedJSON(localStorageUtils.StorageItems.RECENT_QUERIES, []);
169
- }
170
- updateLocalStorage() {
171
- if (!this.recentQueriesList.state.analyticsEnabled) {
172
- return this.disableFeature();
173
- }
174
- return this.storage.setJSON(localStorageUtils.StorageItems.RECENT_QUERIES, this.recentQueriesList.state.queries);
175
- }
176
- disableFeature() {
177
- this.warnUser();
178
- this.storage.removeItem(localStorageUtils.StorageItems.RECENT_QUERIES);
179
- }
180
- renderItems() {
181
- if (!this.recentQueriesList.state.analyticsEnabled) {
182
- return [];
183
- }
184
- const query = this.bindings.searchBoxController.state.value;
185
- const hasQuery = query !== '';
186
- const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;
187
- const filteredQueries = this.recentQueriesList.state.queries
188
- .filter((recentQuery) => recentQuery.toLowerCase().startsWith(query.toLowerCase()))
189
- .slice(0, max);
190
- const suggestionElements = filteredQueries.map((value) => this.renderItem(value));
191
- if (suggestionElements.length) {
192
- suggestionElements.unshift(this.renderClear());
193
- }
194
- return suggestionElements;
195
- }
196
- renderClear() {
197
- const partialItem = getPartialRecentQueryClearElement(this.bindings.i18n);
198
- return {
199
- ...partialItem,
200
- content: index.h(RecentQueryClear, { i18n: this.bindings.i18n }),
201
- onSelect: () => {
202
- this.recentQueriesList.clear();
203
- this.bindings.triggerSuggestions();
204
- },
205
- };
206
- }
207
- renderItem(value) {
208
- const query = this.bindings.searchBoxController.state.value;
209
- const partialItem = getPartialRecentQueryElement(value, this.bindings.i18n);
210
- return {
211
- ...partialItem,
212
- content: (index.h(RecentQueriesContainer, null, index.h(RecentQueryIcon, { icon: this.renderIcon() }), index.h(RecentQueryText, { query: query, value: value }))),
213
- onSelect: () => {
214
- if (this.bindings.isStandalone) {
215
- this.bindings.searchBoxController.updateText(value);
216
- this.bindings.searchBoxController.submit();
217
- return;
218
- }
219
- this.recentQueriesList.executeRecentQuery(this.recentQueriesList.state.queries.indexOf(value));
220
- },
221
- };
222
- }
223
- render() {
224
- if (this.error) {
225
- return (index.h("atomic-component-error", { key: 'a428e82c6ce29e81704777cbbf3bea98937b906a', element: this.host, error: this.error }));
226
- }
227
- }
228
- get host() { return index.getElement(this); }
229
- };
230
-
231
- exports.atomic_search_box_query_suggestions = AtomicSearchBoxQuerySuggestions;
232
- exports.atomic_search_box_recent_queries = AtomicSearchBoxRecentQueries;
233
-
234
- //# sourceMappingURL=atomic-search-box-query-suggestions_2.cjs.entry.js.map