@coveo/atomic 3.50.0 → 3.52.0

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 (465) hide show
  1. package/custom-elements.json +15081 -13083
  2. package/dist/atomic/_atomic.esm.js +1 -1
  3. package/dist/atomic/atomic.esm.js.map +1 -1
  4. package/dist/atomic/components/_index.d.ts +0 -18
  5. package/dist/atomic/components/_index.js +97 -31
  6. package/dist/atomic/components/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +2 -2
  7. package/dist/atomic/components/components/common/atomic-facet-date-input/atomic-facet-date-input.js +1 -0
  8. package/dist/atomic/components/components/common/facets/timeframe-facet-common.js +1 -0
  9. package/dist/atomic/components/components/common/generated-answer/atomic-answer-content/atomic-answer-content.js +166 -0
  10. package/dist/atomic/components/components/common/generated-answer/atomic-generated-answer-thread-item/atomic-generated-answer-thread-item.js +155 -0
  11. package/dist/atomic/components/components/common/generated-answer/atomic-generated-answers-thread/atomic-generated-answers-thread.js +165 -0
  12. package/dist/atomic/components/components/common/generated-answer/render-feedback-and-copy-buttons.js +4 -3
  13. package/dist/atomic/components/components/common/generated-answer/render-follow-up-input.js +66 -0
  14. package/dist/atomic/components/components/common/generated-answer/styles/generated-answer.tw.css.js +1 -1
  15. package/dist/atomic/components/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.js +444 -0
  16. package/dist/atomic/components/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.tw.css.js +2 -0
  17. package/dist/atomic/components/components/insight/atomic-insight-result-action/atomic-insight-result-action.js +169 -0
  18. package/dist/atomic/components/components/insight/atomic-insight-result-attach-to-case-action/atomic-insight-result-attach-to-case-action.js +122 -0
  19. package/dist/atomic/components/components/insight/atomic-insight-result-children/atomic-insight-result-children.js +3 -2
  20. package/dist/atomic/components/components/insight/atomic-insight-result-children-template/atomic-insight-result-children-template.js +79 -0
  21. package/dist/atomic/components/components/insight/atomic-insight-timeframe-facet/atomic-insight-timeframe-facet.js +267 -0
  22. package/dist/atomic/components/components/insight/atomic-insight-user-actions-session/atomic-insight-user-actions-session.js +1 -1
  23. package/dist/atomic/components/components/insight/atomic-insight-user-actions-timeline/atomic-insight-user-actions-timeline.js +1 -1
  24. package/dist/atomic/components/components/insight/index.js +5 -0
  25. package/dist/atomic/components/components/insight/lazy-index.js +5 -0
  26. package/dist/atomic/components/components/ipx/atomic-ipx-button/atomic-ipx-button.js +1 -1
  27. package/dist/atomic/components/components/ipx/atomic-ipx-recs-list/atomic-ipx-recs-list.js +483 -0
  28. package/dist/atomic/components/components/ipx/atomic-ipx-refine-modal/atomic-ipx-refine-modal.js +202 -0
  29. package/dist/atomic/components/components/ipx/atomic-ipx-refine-toggle/atomic-ipx-refine-toggle.js +123 -0
  30. package/dist/atomic/components/components/ipx/index.js +3 -0
  31. package/dist/atomic/components/components/ipx/lazy-index.js +3 -0
  32. package/dist/atomic/components/components/recommendations/atomic-recs-result/atomic-recs-result.js +1 -0
  33. package/dist/atomic/components/components/search/atomic-external/atomic-external.js +1 -1
  34. package/dist/atomic/components/components/search/atomic-generated-answer/atomic-generated-answer.js +103 -10
  35. package/dist/atomic/components/components/search/atomic-refine-modal/atomic-refine-modal.js +2 -1
  36. package/dist/atomic/components/components/search/atomic-search-box/atomic-search-box.js +2 -2
  37. package/dist/atomic/components/decorators/bindings.js +1 -1
  38. package/dist/atomic/components/global/environment.js +1 -1
  39. package/dist/atomic/components/index.js.map +1 -1
  40. package/dist/atomic/components/mixins/bindings-mixin.js +1 -1
  41. package/dist/atomic/components/utils/custom-element-tags.js +11 -1
  42. package/dist/atomic/components/utils/tailwind.global.tw.css.js +2 -2
  43. package/dist/atomic/index.esm.js +1 -1
  44. package/dist/atomic/index.esm.js.map +1 -1
  45. package/dist/atomic/lang/cs.json +1 -1
  46. package/dist/atomic/lang/da.json +1 -1
  47. package/dist/atomic/lang/de.json +1 -1
  48. package/dist/atomic/lang/dev.json +1 -1
  49. package/dist/atomic/lang/el.json +1 -1
  50. package/dist/atomic/lang/en.json +1 -1
  51. package/dist/atomic/lang/es.json +1 -1
  52. package/dist/atomic/lang/fi.json +1 -1
  53. package/dist/atomic/lang/fr.json +1 -1
  54. package/dist/atomic/lang/hu.json +1 -1
  55. package/dist/atomic/lang/id.json +1 -1
  56. package/dist/atomic/lang/it.json +1 -1
  57. package/dist/atomic/lang/ja.json +1 -1
  58. package/dist/atomic/lang/ko.json +1 -1
  59. package/dist/atomic/lang/nl.json +1 -1
  60. package/dist/atomic/lang/no.json +1 -1
  61. package/dist/atomic/lang/pl.json +1 -1
  62. package/dist/atomic/lang/pt-BR.json +1 -1
  63. package/dist/atomic/lang/pt.json +1 -1
  64. package/dist/atomic/lang/ru.json +1 -1
  65. package/dist/atomic/lang/sv.json +1 -1
  66. package/dist/atomic/lang/th.json +1 -1
  67. package/dist/atomic/lang/tr.json +1 -1
  68. package/dist/atomic/lang/zh-CN.json +1 -1
  69. package/dist/atomic/lang/zh-TW.json +1 -1
  70. package/dist/atomic/lang/zh.json +1 -1
  71. package/dist/atomic/p-998f7983.js +3 -0
  72. package/dist/atomic/p-998f7983.js.map +1 -0
  73. package/dist/cjs/_index.cjs.js +110 -28
  74. package/dist/cjs/_loader.cjs.js +3 -4
  75. package/dist/cjs/app-globals-18f43c37.js +506 -0
  76. package/dist/cjs/app-globals-18f43c37.js.map +1 -0
  77. package/dist/cjs/atomic.cjs.js +4 -5
  78. package/dist/cjs/atomic.cjs.js.map +1 -1
  79. package/dist/cjs/index.cjs.js.map +1 -1
  80. package/dist/cjs/loader.cjs.js.map +1 -1
  81. package/dist/cjs/version.cjs.js +2 -2
  82. package/dist/esm/_index.js +97 -23
  83. package/dist/esm/_loader.js +3 -4
  84. package/dist/esm/app-globals-c5b073da.js +481 -0
  85. package/dist/esm/app-globals-c5b073da.js.map +1 -0
  86. package/dist/esm/atomic.js +3 -4
  87. package/dist/esm/atomic.js.map +1 -1
  88. package/dist/esm/index.js.map +1 -1
  89. package/dist/esm/loader.js.map +1 -1
  90. package/dist/esm/version.js +2 -2
  91. package/dist/types/components/common/context/bindings-context.d.ts +1 -1
  92. package/dist/types/components/common/facets/timeframe-facet-common.d.ts +1 -0
  93. package/dist/types/components/common/generated-answer/atomic-answer-content/atomic-answer-content.d.ts +50 -0
  94. package/dist/types/components/common/generated-answer/{generated-answer-thread-item/generated-answer-thread-item.d.ts → atomic-generated-answer-thread-item/atomic-generated-answer-thread-item.d.ts} +3 -3
  95. package/dist/types/components/common/generated-answer/atomic-generated-answers-thread/atomic-generated-answers-thread.d.ts +42 -0
  96. package/dist/types/components/common/generated-answer/render-feedback-and-copy-buttons.d.ts +8 -2
  97. package/dist/types/components/common/item-list/table-layout.d.ts +1 -1
  98. package/dist/types/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.d.ts +54 -35
  99. package/dist/types/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.tw.css.d.ts +2 -0
  100. package/dist/types/components/insight/atomic-insight-result-action/atomic-insight-result-action.d.ts +33 -18
  101. package/dist/types/components/insight/atomic-insight-result-attach-to-case-action/atomic-insight-result-attach-to-case-action.d.ts +25 -20
  102. package/dist/types/components/insight/atomic-insight-result-children/atomic-insight-result-children.d.ts +1 -0
  103. package/dist/types/components/insight/atomic-insight-result-children-template/atomic-insight-result-children-template.d.ts +62 -0
  104. package/dist/types/components/insight/atomic-insight-timeframe-facet/atomic-insight-timeframe-facet.d.ts +47 -28
  105. package/dist/types/components/insight/index.d.ts +5 -0
  106. package/dist/types/components/ipx/atomic-ipx-button/atomic-ipx-button.d.ts +1 -1
  107. package/dist/types/components/ipx/atomic-ipx-recs-list/{atomic-recs-list/atomic-ipx-recs-list.d.ts → atomic-ipx-recs-list.d.ts} +43 -21
  108. package/dist/types/components/ipx/atomic-ipx-refine-modal/atomic-ipx-refine-modal.d.ts +62 -15
  109. package/dist/types/components/ipx/atomic-ipx-refine-toggle/atomic-ipx-refine-toggle.d.ts +26 -11
  110. package/dist/types/components/ipx/index.d.ts +3 -0
  111. package/dist/types/components/recommendations/atomic-recs-result/atomic-recs-result.d.ts +1 -0
  112. package/dist/types/components/search/atomic-external/atomic-external.d.ts +1 -1
  113. package/dist/types/components/search/atomic-generated-answer/atomic-generated-answer.d.ts +11 -2
  114. package/dist/types/components/search/atomic-refine-modal/atomic-refine-modal.d.ts +4 -3
  115. package/dist/types/components.d.ts +0 -547
  116. package/dist/types/decorators/bindings.d.ts +1 -1
  117. package/dist/types/index.d.ts +2 -3
  118. package/dist/types/utils/accessibility-utils.d.ts +2 -2
  119. package/dist/types/utils/init-queue.d.ts +1 -1
  120. package/docs/atomic-docs.json +2 -68
  121. package/package.json +4 -8
  122. package/dist/atomic/components/_commonjsHelpers.js +0 -5
  123. package/dist/atomic/components/_commonjsHelpers.js.map +0 -1
  124. package/dist/atomic/components/arrow-top-rounded.js +0 -7
  125. package/dist/atomic/components/arrow-top-rounded.js.map +0 -1
  126. package/dist/atomic/components/atomic-insight-generated-answer.d.ts +0 -11
  127. package/dist/atomic/components/atomic-insight-generated-answer.js +0 -3264
  128. package/dist/atomic/components/atomic-insight-generated-answer.js.map +0 -1
  129. package/dist/atomic/components/atomic-insight-result-action.d.ts +0 -11
  130. package/dist/atomic/components/atomic-insight-result-action.js +0 -155
  131. package/dist/atomic/components/atomic-insight-result-action.js.map +0 -1
  132. package/dist/atomic/components/atomic-insight-result-attach-to-case-action.d.ts +0 -11
  133. package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js +0 -102
  134. package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js.map +0 -1
  135. package/dist/atomic/components/atomic-insight-result-children-template.d.ts +0 -11
  136. package/dist/atomic/components/atomic-insight-result-children-template.js +0 -243
  137. package/dist/atomic/components/atomic-insight-result-children-template.js.map +0 -1
  138. package/dist/atomic/components/atomic-insight-timeframe-facet.d.ts +0 -11
  139. package/dist/atomic/components/atomic-insight-timeframe-facet.js +0 -726
  140. package/dist/atomic/components/atomic-insight-timeframe-facet.js.map +0 -1
  141. package/dist/atomic/components/atomic-ipx-recs-list.d.ts +0 -11
  142. package/dist/atomic/components/atomic-ipx-recs-list.js +0 -631
  143. package/dist/atomic/components/atomic-ipx-recs-list.js.map +0 -1
  144. package/dist/atomic/components/atomic-ipx-refine-modal.d.ts +0 -11
  145. package/dist/atomic/components/atomic-ipx-refine-modal.js +0 -8
  146. package/dist/atomic/components/atomic-ipx-refine-modal.js.map +0 -1
  147. package/dist/atomic/components/atomic-ipx-refine-modal2.js +0 -162
  148. package/dist/atomic/components/atomic-ipx-refine-modal2.js.map +0 -1
  149. package/dist/atomic/components/atomic-ipx-refine-toggle.d.ts +0 -11
  150. package/dist/atomic/components/atomic-ipx-refine-toggle.js +0 -121
  151. package/dist/atomic/components/atomic-ipx-refine-toggle.js.map +0 -1
  152. package/dist/atomic/components/atomic-stencil-facet-date-input.d.ts +0 -11
  153. package/dist/atomic/components/atomic-stencil-facet-date-input.js +0 -107
  154. package/dist/atomic/components/atomic-stencil-facet-date-input.js.map +0 -1
  155. package/dist/atomic/components/attach.js +0 -115
  156. package/dist/atomic/components/attach.js.map +0 -1
  157. package/dist/atomic/components/components/common/layout/display-options.js +0 -28
  158. package/dist/atomic/components/date-utils.js +0 -26
  159. package/dist/atomic/components/date-utils.js.map +0 -1
  160. package/dist/atomic/components/initialization-utils.js +0 -226
  161. package/dist/atomic/components/initialization-utils.js.map +0 -1
  162. package/dist/atomic/components/popover-type.js +0 -12
  163. package/dist/atomic/components/popover-type.js.map +0 -1
  164. package/dist/atomic/components/props-utils.js +0 -57
  165. package/dist/atomic/components/props-utils.js.map +0 -1
  166. package/dist/atomic/components/stencil-button.js +0 -148
  167. package/dist/atomic/components/stencil-button.js.map +0 -1
  168. package/dist/atomic/components/stencil-heading.js +0 -169
  169. package/dist/atomic/components/stencil-heading.js.map +0 -1
  170. package/dist/atomic/components/stencil-iconButton.js +0 -16
  171. package/dist/atomic/components/stencil-iconButton.js.map +0 -1
  172. package/dist/atomic/components/store.js +0 -13
  173. package/dist/atomic/components/store.js.map +0 -1
  174. package/dist/atomic/components/utils.js +0 -1421
  175. package/dist/atomic/components/utils.js.map +0 -1
  176. package/dist/atomic/p-0698ccf1.entry.js +0 -2
  177. package/dist/atomic/p-0698ccf1.entry.js.map +0 -1
  178. package/dist/atomic/p-0f896350.entry.js +0 -2
  179. package/dist/atomic/p-0f896350.entry.js.map +0 -1
  180. package/dist/atomic/p-1580513b.js +0 -2
  181. package/dist/atomic/p-1580513b.js.map +0 -1
  182. package/dist/atomic/p-4117289b.entry.js +0 -2
  183. package/dist/atomic/p-4117289b.entry.js.map +0 -1
  184. package/dist/atomic/p-4573c419.js +0 -2
  185. package/dist/atomic/p-4573c419.js.map +0 -1
  186. package/dist/atomic/p-4a32511f.js +0 -2
  187. package/dist/atomic/p-4a32511f.js.map +0 -1
  188. package/dist/atomic/p-578d761c.js +0 -2
  189. package/dist/atomic/p-578d761c.js.map +0 -1
  190. package/dist/atomic/p-677f9c40.js +0 -2
  191. package/dist/atomic/p-677f9c40.js.map +0 -1
  192. package/dist/atomic/p-70cc18a1.js +0 -2
  193. package/dist/atomic/p-70cc18a1.js.map +0 -1
  194. package/dist/atomic/p-74210c4b.entry.js +0 -9
  195. package/dist/atomic/p-74210c4b.entry.js.map +0 -1
  196. package/dist/atomic/p-81d6e743.js +0 -2
  197. package/dist/atomic/p-81d6e743.js.map +0 -1
  198. package/dist/atomic/p-8b039c2e.entry.js +0 -2
  199. package/dist/atomic/p-8b039c2e.entry.js.map +0 -1
  200. package/dist/atomic/p-991e840f.entry.js +0 -2
  201. package/dist/atomic/p-991e840f.entry.js.map +0 -1
  202. package/dist/atomic/p-9c5ec170.js +0 -2
  203. package/dist/atomic/p-9c5ec170.js.map +0 -1
  204. package/dist/atomic/p-9dfe5ab1.js +0 -2
  205. package/dist/atomic/p-9dfe5ab1.js.map +0 -1
  206. package/dist/atomic/p-9f774145.entry.js +0 -2
  207. package/dist/atomic/p-9f774145.entry.js.map +0 -1
  208. package/dist/atomic/p-a33748a9.js +0 -2
  209. package/dist/atomic/p-a33748a9.js.map +0 -1
  210. package/dist/atomic/p-b09433bb.js +0 -3
  211. package/dist/atomic/p-b09433bb.js.map +0 -1
  212. package/dist/atomic/p-b4cfedf1.js +0 -2
  213. package/dist/atomic/p-b4cfedf1.js.map +0 -1
  214. package/dist/atomic/p-c81f1edb.entry.js +0 -2
  215. package/dist/atomic/p-c81f1edb.entry.js.map +0 -1
  216. package/dist/atomic/p-d75a4630.js +0 -2
  217. package/dist/atomic/p-d75a4630.js.map +0 -1
  218. package/dist/atomic/p-dac60354.js +0 -2
  219. package/dist/atomic/p-dac60354.js.map +0 -1
  220. package/dist/atomic/p-e1255160.js +0 -2
  221. package/dist/atomic/p-e1255160.js.map +0 -1
  222. package/dist/atomic/p-ec1c5f46.js +0 -3
  223. package/dist/atomic/p-ec1c5f46.js.map +0 -1
  224. package/dist/atomic/p-eea2c139.entry.js +0 -2
  225. package/dist/atomic/p-eea2c139.entry.js.map +0 -1
  226. package/dist/atomic/p-f321aab0.js +0 -2
  227. package/dist/atomic/p-f321aab0.js.map +0 -1
  228. package/dist/cjs/_commonjsHelpers-68cdf74f.js +0 -7
  229. package/dist/cjs/_commonjsHelpers-68cdf74f.js.map +0 -1
  230. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  231. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  232. package/dist/cjs/arrow-top-rounded-885250ea.js +0 -10
  233. package/dist/cjs/arrow-top-rounded-885250ea.js.map +0 -1
  234. package/dist/cjs/atomic-insight-generated-answer.cjs.entry.js +0 -3238
  235. package/dist/cjs/atomic-insight-generated-answer.cjs.entry.js.map +0 -1
  236. package/dist/cjs/atomic-insight-result-action.cjs.entry.js +0 -140
  237. package/dist/cjs/atomic-insight-result-action.cjs.entry.js.map +0 -1
  238. package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js +0 -90
  239. package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js.map +0 -1
  240. package/dist/cjs/atomic-insight-result-children-template.cjs.entry.js +0 -223
  241. package/dist/cjs/atomic-insight-result-children-template.cjs.entry.js.map +0 -1
  242. package/dist/cjs/atomic-insight-timeframe-facet.cjs.entry.js +0 -700
  243. package/dist/cjs/atomic-insight-timeframe-facet.cjs.entry.js.map +0 -1
  244. package/dist/cjs/atomic-ipx-recs-list.cjs.entry.js +0 -600
  245. package/dist/cjs/atomic-ipx-recs-list.cjs.entry.js.map +0 -1
  246. package/dist/cjs/atomic-ipx-refine-modal.cjs.entry.js +0 -143
  247. package/dist/cjs/atomic-ipx-refine-modal.cjs.entry.js.map +0 -1
  248. package/dist/cjs/atomic-ipx-refine-toggle.cjs.entry.js +0 -99
  249. package/dist/cjs/atomic-ipx-refine-toggle.cjs.entry.js.map +0 -1
  250. package/dist/cjs/atomic-stencil-facet-date-input.cjs.entry.js +0 -86
  251. package/dist/cjs/atomic-stencil-facet-date-input.cjs.entry.js.map +0 -1
  252. package/dist/cjs/attach-19283bec.js +0 -10
  253. package/dist/cjs/attach-19283bec.js.map +0 -1
  254. package/dist/cjs/date-utils-aae1d713.js +0 -28
  255. package/dist/cjs/date-utils-aae1d713.js.map +0 -1
  256. package/dist/cjs/event-utils-9bfcf3c5.js +0 -27
  257. package/dist/cjs/event-utils-9bfcf3c5.js.map +0 -1
  258. package/dist/cjs/index-3532822e.js +0 -1448
  259. package/dist/cjs/index-3532822e.js.map +0 -1
  260. package/dist/cjs/initialization-lit-stencil-common-utils-f19f74c0.js +0 -95
  261. package/dist/cjs/initialization-lit-stencil-common-utils-f19f74c0.js.map +0 -1
  262. package/dist/cjs/initialization-utils-51a423fe.js +0 -148
  263. package/dist/cjs/initialization-utils-51a423fe.js.map +0 -1
  264. package/dist/cjs/popover-type-22f285e1.js +0 -16
  265. package/dist/cjs/popover-type-22f285e1.js.map +0 -1
  266. package/dist/cjs/props-utils-bc5feb04.js +0 -59
  267. package/dist/cjs/props-utils-bc5feb04.js.map +0 -1
  268. package/dist/cjs/stencil-button-f39da03e.js +0 -130
  269. package/dist/cjs/stencil-button-f39da03e.js.map +0 -1
  270. package/dist/cjs/stencil-heading-ecec9ab3.js +0 -174
  271. package/dist/cjs/stencil-heading-ecec9ab3.js.map +0 -1
  272. package/dist/cjs/stencil-iconButton-f8b9fda0.js +0 -18
  273. package/dist/cjs/stencil-iconButton-f8b9fda0.js.map +0 -1
  274. package/dist/cjs/stencil-result-template-decorators-1f099c15.js +0 -114
  275. package/dist/cjs/stencil-result-template-decorators-1f099c15.js.map +0 -1
  276. package/dist/cjs/store-70fff5e6.js +0 -16
  277. package/dist/cjs/store-70fff5e6.js.map +0 -1
  278. package/dist/cjs/utils-e845f262.js +0 -1431
  279. package/dist/cjs/utils-e845f262.js.map +0 -1
  280. package/dist/esm/_commonjsHelpers-1c8beb5f.js +0 -5
  281. package/dist/esm/_commonjsHelpers-1c8beb5f.js.map +0 -1
  282. package/dist/esm/app-globals-0f993ce5.js +0 -5
  283. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  284. package/dist/esm/arrow-top-rounded-745b84a6.js +0 -7
  285. package/dist/esm/arrow-top-rounded-745b84a6.js.map +0 -1
  286. package/dist/esm/atomic-insight-generated-answer.entry.js +0 -3234
  287. package/dist/esm/atomic-insight-generated-answer.entry.js.map +0 -1
  288. package/dist/esm/atomic-insight-result-action.entry.js +0 -136
  289. package/dist/esm/atomic-insight-result-action.entry.js.map +0 -1
  290. package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js +0 -86
  291. package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js.map +0 -1
  292. package/dist/esm/atomic-insight-result-children-template.entry.js +0 -219
  293. package/dist/esm/atomic-insight-result-children-template.entry.js.map +0 -1
  294. package/dist/esm/atomic-insight-timeframe-facet.entry.js +0 -696
  295. package/dist/esm/atomic-insight-timeframe-facet.entry.js.map +0 -1
  296. package/dist/esm/atomic-ipx-recs-list.entry.js +0 -596
  297. package/dist/esm/atomic-ipx-recs-list.entry.js.map +0 -1
  298. package/dist/esm/atomic-ipx-refine-modal.entry.js +0 -139
  299. package/dist/esm/atomic-ipx-refine-modal.entry.js.map +0 -1
  300. package/dist/esm/atomic-ipx-refine-toggle.entry.js +0 -95
  301. package/dist/esm/atomic-ipx-refine-toggle.entry.js.map +0 -1
  302. package/dist/esm/atomic-stencil-facet-date-input.entry.js +0 -82
  303. package/dist/esm/atomic-stencil-facet-date-input.entry.js.map +0 -1
  304. package/dist/esm/attach-81bb8872.js +0 -8
  305. package/dist/esm/attach-81bb8872.js.map +0 -1
  306. package/dist/esm/date-utils-3b955e79.js +0 -26
  307. package/dist/esm/date-utils-3b955e79.js.map +0 -1
  308. package/dist/esm/event-utils-8de63ec3.js +0 -24
  309. package/dist/esm/event-utils-8de63ec3.js.map +0 -1
  310. package/dist/esm/index-3eb0b28e.js +0 -1417
  311. package/dist/esm/index-3eb0b28e.js.map +0 -1
  312. package/dist/esm/initialization-lit-stencil-common-utils-e7755434.js +0 -88
  313. package/dist/esm/initialization-lit-stencil-common-utils-e7755434.js.map +0 -1
  314. package/dist/esm/initialization-utils-82d28c63.js +0 -144
  315. package/dist/esm/initialization-utils-82d28c63.js.map +0 -1
  316. package/dist/esm/popover-type-c85677ef.js +0 -12
  317. package/dist/esm/popover-type-c85677ef.js.map +0 -1
  318. package/dist/esm/props-utils-d343133b.js +0 -57
  319. package/dist/esm/props-utils-d343133b.js.map +0 -1
  320. package/dist/esm/stencil-button-c25899df.js +0 -128
  321. package/dist/esm/stencil-button-c25899df.js.map +0 -1
  322. package/dist/esm/stencil-heading-98a5f23f.js +0 -169
  323. package/dist/esm/stencil-heading-98a5f23f.js.map +0 -1
  324. package/dist/esm/stencil-iconButton-ed5804d3.js +0 -16
  325. package/dist/esm/stencil-iconButton-ed5804d3.js.map +0 -1
  326. package/dist/esm/stencil-result-template-decorators-9cbe1e1c.js +0 -110
  327. package/dist/esm/stencil-result-template-decorators-9cbe1e1c.js.map +0 -1
  328. package/dist/esm/store-50d170c8.js +0 -13
  329. package/dist/esm/store-50d170c8.js.map +0 -1
  330. package/dist/esm/utils-b5bab369.js +0 -1421
  331. package/dist/esm/utils-b5bab369.js.map +0 -1
  332. package/dist/types/components/commerce/product-template-component-utils/context/stencil-product-template-decorators.d.ts +0 -14
  333. package/dist/types/components/common/atomic-rating/stencil-rating.d.ts +0 -18
  334. package/dist/types/components/common/atomic-result-placeholder/stencil-placeholders.d.ts +0 -20
  335. package/dist/types/components/common/breadbox/stencil-breadcrumb-button.d.ts +0 -15
  336. package/dist/types/components/common/breadbox/stencil-breadcrumb-clear-all.d.ts +0 -13
  337. package/dist/types/components/common/breadbox/stencil-breadcrumb-container.d.ts +0 -11
  338. package/dist/types/components/common/breadbox/stencil-breadcrumb-content.d.ts +0 -14
  339. package/dist/types/components/common/breadbox/stencil-breadcrumb-show-less.d.ts +0 -13
  340. package/dist/types/components/common/breadbox/stencil-breadcrumb-show-more.d.ts +0 -14
  341. package/dist/types/components/common/facets/category-facet/stencil-all-categories-button.d.ts +0 -13
  342. package/dist/types/components/common/facets/category-facet/stencil-child-value-link.d.ts +0 -9
  343. package/dist/types/components/common/facets/category-facet/stencil-children-as-tree-container.d.ts +0 -9
  344. package/dist/types/components/common/facets/category-facet/stencil-parent-as-tree-container.d.ts +0 -10
  345. package/dist/types/components/common/facets/category-facet/stencil-parent-button.d.ts +0 -16
  346. package/dist/types/components/common/facets/category-facet/stencil-parent-value-link.d.ts +0 -9
  347. package/dist/types/components/common/facets/category-facet/stencil-search-results-container.d.ts +0 -5
  348. package/dist/types/components/common/facets/category-facet/stencil-search-value.d.ts +0 -19
  349. package/dist/types/components/common/facets/category-facet/stencil-value-as-tree-container.d.ts +0 -5
  350. package/dist/types/components/common/facets/category-facet/stencil-value-link.d.ts +0 -20
  351. package/dist/types/components/common/facets/facet-container/stencil-facet-container.d.ts +0 -5
  352. package/dist/types/components/common/facets/facet-header/stencil-facet-header.d.ts +0 -17
  353. package/dist/types/components/common/facets/facet-placeholder/stencil-facet-placeholder.d.ts +0 -10
  354. package/dist/types/components/common/facets/facet-search/stencil-facet-search-input-guard.d.ts +0 -11
  355. package/dist/types/components/common/facets/facet-search/stencil-facet-search-input.d.ts +0 -14
  356. package/dist/types/components/common/facets/facet-search/stencil-facet-search-matches.d.ts +0 -14
  357. package/dist/types/components/common/facets/facet-search/stencil-facet-search-value.d.ts +0 -6
  358. package/dist/types/components/common/facets/facet-show-more-less/stencil-facet-show-more-less.d.ts +0 -17
  359. package/dist/types/components/common/facets/facet-value/stencil-facet-value.d.ts +0 -22
  360. package/dist/types/components/common/facets/facet-value-box/stencil-facet-value-box.d.ts +0 -6
  361. package/dist/types/components/common/facets/facet-value-checkbox/stencil-facet-value-checkbox.d.ts +0 -11
  362. package/dist/types/components/common/facets/facet-value-exclude/stencil-facet-value-exclude.d.ts +0 -10
  363. package/dist/types/components/common/facets/facet-value-label-highlight/stencil-facet-value-label-highlight.d.ts +0 -12
  364. package/dist/types/components/common/facets/facet-value-link/stencil-facet-value-link.d.ts +0 -10
  365. package/dist/types/components/common/facets/facet-values-group/stencil-facet-values-group.d.ts +0 -12
  366. package/dist/types/components/common/facets/numeric-facet/stencil-value-link.d.ts +0 -12
  367. package/dist/types/components/common/facets/numeric-facet/stencil-values-container.d.ts +0 -11
  368. package/dist/types/components/common/facets/stencil-facet-common.d.ts +0 -43
  369. package/dist/types/components/common/facets/stencil-facet-date-input/stencil-facet-date-input.d.ts +0 -33
  370. package/dist/types/components/common/facets/stencil-facet-guard.d.ts +0 -12
  371. package/dist/types/components/common/facets/stencil-timeframe-facet-common.d.ts +0 -72
  372. package/dist/types/components/common/generated-answer/generated-answer-common.d.ts +0 -58
  373. package/dist/types/components/common/generated-answer/generated-content/stencil-generated-markdown-content.d.ts +0 -10
  374. package/dist/types/components/common/generated-answer/generated-content/stencil-generated-text-content.d.ts +0 -10
  375. package/dist/types/components/common/generated-answer/stencil-copy-button.d.ts +0 -12
  376. package/dist/types/components/common/generated-answer/stencil-feedback-button.d.ts +0 -13
  377. package/dist/types/components/common/generated-answer/stencil-generated-content-container.d.ts +0 -11
  378. package/dist/types/components/common/generated-answer/stencil-retry-prompt.d.ts +0 -11
  379. package/dist/types/components/common/generated-answer/stencil-show-button.d.ts +0 -12
  380. package/dist/types/components/common/generated-answer/stencil-source-citations.d.ts +0 -10
  381. package/dist/types/components/common/interface/interface-common-stencil.d.ts +0 -34
  382. package/dist/types/components/common/interface/stencil-i18n.d.ts +0 -11
  383. package/dist/types/components/common/item-link/stencil-item-link.d.ts +0 -30
  384. package/dist/types/components/common/item-list/item-list-decorators.d.ts +0 -17
  385. package/dist/types/components/common/item-list/stencil-display-grid.d.ts +0 -17
  386. package/dist/types/components/common/item-list/stencil-display-wrapper.d.ts +0 -11
  387. package/dist/types/components/common/item-list/stencil-item-decorators.d.ts +0 -41
  388. package/dist/types/components/common/item-list/stencil-item-display-guard.d.ts +0 -10
  389. package/dist/types/components/common/item-list/stencil-item-list-common.d.ts +0 -31
  390. package/dist/types/components/common/item-list/stencil-item-list-guard.d.ts +0 -13
  391. package/dist/types/components/common/item-text/stencil-item-text-fallback.d.ts +0 -14
  392. package/dist/types/components/common/item-text/stencil-item-text-highlighted.d.ts +0 -13
  393. package/dist/types/components/common/load-more/guard.d.ts +0 -10
  394. package/dist/types/components/common/load-more/stencil-button.d.ts +0 -13
  395. package/dist/types/components/common/load-more/stencil-container.d.ts +0 -5
  396. package/dist/types/components/common/load-more/stencil-progress-bar.d.ts +0 -10
  397. package/dist/types/components/common/load-more/stencil-summary.d.ts +0 -13
  398. package/dist/types/components/common/no-items/stencil-container.d.ts +0 -5
  399. package/dist/types/components/common/no-items/stencil-guard.d.ts +0 -11
  400. package/dist/types/components/common/no-items/stencil-magnifying-glass.d.ts +0 -5
  401. package/dist/types/components/common/no-items/stencil-no-items.d.ts +0 -12
  402. package/dist/types/components/common/no-items/stencil-tips.d.ts +0 -10
  403. package/dist/types/components/common/pager/stencil-pager-buttons.d.ts +0 -33
  404. package/dist/types/components/common/pager/stencil-pager-navigation.d.ts +0 -10
  405. package/dist/types/components/common/product-template/stencil-product-template-common.d.ts +0 -26
  406. package/dist/types/components/common/query-correction/stencil-auto-correction.d.ts +0 -12
  407. package/dist/types/components/common/query-correction/stencil-correction.d.ts +0 -12
  408. package/dist/types/components/common/query-correction/stencil-guard.d.ts +0 -9
  409. package/dist/types/components/common/query-correction/stencil-trigger-correction.d.ts +0 -13
  410. package/dist/types/components/common/query-error/stencil-container.d.ts +0 -5
  411. package/dist/types/components/common/query-error/stencil-description.d.ts +0 -13
  412. package/dist/types/components/common/query-error/stencil-details.d.ts +0 -10
  413. package/dist/types/components/common/query-error/stencil-guard.d.ts +0 -9
  414. package/dist/types/components/common/query-error/stencil-icon.d.ts +0 -9
  415. package/dist/types/components/common/query-error/stencil-link.d.ts +0 -11
  416. package/dist/types/components/common/query-error/stencil-show-more.d.ts +0 -13
  417. package/dist/types/components/common/query-error/stencil-title.d.ts +0 -12
  418. package/dist/types/components/common/query-summary/stencil-container.d.ts +0 -9
  419. package/dist/types/components/common/query-summary/stencil-guard.d.ts +0 -11
  420. package/dist/types/components/common/query-summary/stencil-utils.d.ts +0 -23
  421. package/dist/types/components/common/refine-modal/stencil-body.d.ts +0 -7
  422. package/dist/types/components/common/refine-modal/stencil-button.d.ts +0 -12
  423. package/dist/types/components/common/refine-modal/stencil-filters.d.ts +0 -20
  424. package/dist/types/components/common/refine-modal/stencil-guard.d.ts +0 -11
  425. package/dist/types/components/common/refine-modal/stencil-modal.d.ts +0 -18
  426. package/dist/types/components/common/refine-modal/stencil-sort.d.ts +0 -11
  427. package/dist/types/components/common/result-children/stencil-children-wrapper.d.ts +0 -9
  428. package/dist/types/components/common/result-children/stencil-collection-guard.d.ts +0 -16
  429. package/dist/types/components/common/result-children/stencil-guard.d.ts +0 -11
  430. package/dist/types/components/common/result-children/stencil-show-hide-button.d.ts +0 -14
  431. package/dist/types/components/common/result-templates/stencil-result-template-common.d.ts +0 -24
  432. package/dist/types/components/common/search-box/stencil-search-box-wrapper.d.ts +0 -10
  433. package/dist/types/components/common/search-box/stencil-search-text-area.d.ts +0 -22
  434. package/dist/types/components/common/search-box/stencil-submit-button.d.ts +0 -12
  435. package/dist/types/components/common/search-box/stencil-text-area-clear-button.d.ts +0 -12
  436. package/dist/types/components/common/smart-snippets/atomic-smart-snippet/stencil-smart-snippet-common.d.ts +0 -31
  437. package/dist/types/components/common/smart-snippets/atomic-smart-snippet-feedback-modal/stencil-smart-snippet-feedback-modal-common.d.ts +0 -57
  438. package/dist/types/components/common/smart-snippets/atomic-smart-snippet-suggestions/stencil-smart-snippet-suggestions-common.d.ts +0 -43
  439. package/dist/types/components/common/smart-snippets/stencil-smart-snippet-feedback-banner.d.ts +0 -18
  440. package/dist/types/components/common/stencil-button-style.d.ts +0 -11
  441. package/dist/types/components/common/stencil-button.d.ts +0 -30
  442. package/dist/types/components/common/stencil-carousel.d.ts +0 -15
  443. package/dist/types/components/common/stencil-checkbox.d.ts +0 -22
  444. package/dist/types/components/common/stencil-fieldset-group.d.ts +0 -9
  445. package/dist/types/components/common/stencil-heading.d.ts +0 -7
  446. package/dist/types/components/common/stencil-hidden.d.ts +0 -5
  447. package/dist/types/components/common/stencil-iconButton.d.ts +0 -13
  448. package/dist/types/components/common/stencil-radio-button.d.ts +0 -12
  449. package/dist/types/components/common/stencil-switch.d.ts +0 -15
  450. package/dist/types/components/common/stencil-triStateCheckbox.d.ts +0 -11
  451. package/dist/types/components/common/suggestions/stencil-instant-item.d.ts +0 -19
  452. package/dist/types/components/common/suggestions/stencil-query-suggestions.d.ts +0 -32
  453. package/dist/types/components/common/suggestions/stencil-suggestion-manager.d.ts +0 -96
  454. package/dist/types/components/insight/result-templates/atomic-insight-result-children-template/atomic-insight-result-children-template.d.ts +0 -50
  455. package/dist/types/components/search/facets/facet-segmented-value/stencil-facet-segmented-value.d.ts +0 -6
  456. package/dist/types/components/search/result-template-component-utils/context/stencil-result-template-decorators.d.ts +0 -32
  457. package/dist/types/components/search/result-template-components/quickview-iframe/stencil-quickview-iframe.d.ts +0 -14
  458. package/dist/types/utils/__mocks__/stencil-resource-url.d.ts +0 -1
  459. package/dist/types/utils/initialization-utils.d.ts +0 -70
  460. package/dist/types/utils/jsx-utils.d.ts +0 -6
  461. package/dist/types/utils/stencil-accessibility-utils.d.ts +0 -43
  462. package/dist/types/utils/stencil-asset-path-utils.d.ts +0 -1
  463. package/dist/types/utils/stencil-resource-url.d.ts +0 -1
  464. /package/dist/atomic/components/utils/{initialization-lit-stencil-common-utils.js → initialization-common-utils.js} +0 -0
  465. /package/dist/types/utils/{initialization-lit-stencil-common-utils.d.ts → initialization-common-utils.d.ts} +0 -0
@@ -1,219 +0,0 @@
1
- import { h, r as registerInstance, g as getElement } from './index-3eb0b28e.js';
2
- import { M as MapProp } from './props-utils-d343133b.js';
3
- import { ResultTemplatesHelpers } from '@coveo/headless';
4
- import { i as isElementNode, a as aggregate, b as isVisualNode } from './utils-b5bab369.js';
5
- import '@coveo/bueno';
6
- import './_commonjsHelpers-1c8beb5f.js';
7
-
8
- const tableElementTagName = 'atomic-table-element';
9
-
10
- const resultSectionTags = new Set([
11
- 'atomic-result-section-visual',
12
- 'atomic-result-section-badges',
13
- 'atomic-result-section-actions',
14
- 'atomic-result-section-title',
15
- 'atomic-result-section-title-metadata',
16
- 'atomic-result-section-emphasized',
17
- 'atomic-result-section-excerpt',
18
- 'atomic-result-section-bottom-metadata',
19
- 'atomic-result-section-children',
20
- ]);
21
- const productSectionTags = new Set([
22
- 'atomic-product-section-visual',
23
- 'atomic-product-section-badges',
24
- 'atomic-product-section-actions',
25
- 'atomic-product-section-name',
26
- 'atomic-product-section-metadata',
27
- 'atomic-product-section-emphasized',
28
- 'atomic-product-section-description',
29
- 'atomic-product-section-bottom-metadata',
30
- 'atomic-product-section-children',
31
- ]);
32
- const allTags = new Set([...resultSectionTags, ...productSectionTags]);
33
- function isResultSectionNode(element) {
34
- if (!isElementNode(element)) {
35
- return false;
36
- }
37
- return allTags.has(element.tagName.toLowerCase());
38
- }
39
-
40
- function getTemplateNodeType(node) {
41
- if (isResultSectionNode(node)) {
42
- return 'section';
43
- }
44
- if (!isVisualNode(node)) {
45
- return 'metadata';
46
- }
47
- if (isElementNode(node) &&
48
- node.tagName.toLowerCase() === tableElementTagName) {
49
- return 'table-column-definition';
50
- }
51
- return 'other';
52
- }
53
- function groupNodesByType(nodes) {
54
- return aggregate(Array.from(nodes), (node) => getTemplateNodeType(node));
55
- }
56
- class ResultTemplateCommon {
57
- constructor({ host, setError, validParents, allowEmpty = false, }) {
58
- this.matchConditions = [];
59
- this.gridCellLinkTarget = '_self';
60
- this.host = host;
61
- this.validateTemplate(host, setError, validParents, allowEmpty);
62
- }
63
- validateTemplate(host, setError, validParents, allowEmpty = true) {
64
- const hasValidParent = validParents
65
- .map((p) => p.toUpperCase())
66
- .includes(host.parentElement?.nodeName || '');
67
- const tagName = host.nodeName.toLowerCase();
68
- if (!hasValidParent) {
69
- setError(new Error(`The "${tagName}" component has to be the child of one of the following: ${validParents
70
- .map((p) => `"${p.toLowerCase()}"`)
71
- .join(', ')}.`));
72
- return;
73
- }
74
- if (host.parentElement?.attributes.getNamedItem('display')?.value === 'grid') {
75
- this.gridCellLinkTarget = host.parentElement?.attributes.getNamedItem('grid-cell-link-target')?.value;
76
- }
77
- const template = host.querySelector('template:not([slot])');
78
- if (!template) {
79
- setError(new Error(`The "${tagName}" component has to contain a "template" element as a child.`));
80
- return;
81
- }
82
- if (!allowEmpty && !template.innerHTML.trim()) {
83
- setError(new Error(`The "template" tag inside "${tagName}" cannot be empty.`));
84
- return;
85
- }
86
- if (template.content.querySelector('script')) {
87
- console.warn('Any "script" tags defined inside of "template" elements are not supported and will not be executed when the results are rendered.', host);
88
- }
89
- const { section: sectionNodes, other: otherNodes } = groupNodesByType(template.content.childNodes);
90
- if (sectionNodes?.length && otherNodes?.length) {
91
- console.warn('Result templates should only contain section elements or non-section elements. Future updates could unpredictably affect this result template.', host, { sectionNodes, otherNodes });
92
- }
93
- }
94
- getTemplate(conditions, error) {
95
- if (error) {
96
- return null;
97
- }
98
- return {
99
- conditions: conditions.concat(this.matchConditions),
100
- content: getTemplateElement(this.host).content,
101
- linkContent: this.getLinkTemplateElement(this.host).content,
102
- priority: 1,
103
- };
104
- }
105
- renderIfError(error) {
106
- if (error) {
107
- return (h("atomic-component-error", { element: this.host, error: error }));
108
- }
109
- }
110
- getDefaultLinkTemplateElement() {
111
- const linkTemplate = document.createElement('template');
112
- linkTemplate.innerHTML = `<atomic-result-link>${this.gridCellLinkTarget ? `<a slot="attributes" target="${this.gridCellLinkTarget}"></a>` : ''}</atomic-result-link>`;
113
- return linkTemplate;
114
- }
115
- getLinkTemplateElement(host) {
116
- return (host.querySelector('template[slot="link"]') ??
117
- this.getDefaultLinkTemplateElement());
118
- }
119
- }
120
- function getTemplateElement(host) {
121
- return host.querySelector('template:not([slot])');
122
- }
123
- function makeMatchConditions(mustMatch, mustNotMatch) {
124
- const conditions = [];
125
- for (const field in mustMatch) {
126
- conditions.push(ResultTemplatesHelpers.fieldMustMatch(field, mustMatch[field]));
127
- }
128
- for (const field in mustNotMatch) {
129
- conditions.push(ResultTemplatesHelpers.fieldMustNotMatch(field, mustNotMatch[field]));
130
- }
131
- return conditions;
132
- }
133
- function makeDefinedConditions(ifDefined, ifNotDefined) {
134
- const conditions = [];
135
- if (ifDefined) {
136
- const fieldNames = ifDefined.split(',');
137
- conditions.push(ResultTemplatesHelpers.fieldsMustBeDefined(fieldNames));
138
- }
139
- if (ifNotDefined) {
140
- const fieldNames = ifNotDefined.split(',');
141
- conditions.push(ResultTemplatesHelpers.fieldsMustNotBeDefined(fieldNames));
142
- }
143
- return conditions;
144
- }
145
-
146
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
147
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
148
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
149
- r = Reflect.decorate(decorators, target, key, desc);
150
- else
151
- for (var i = decorators.length - 1; i >= 0; i--)
152
- if (d = decorators[i])
153
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
154
- return c > 3 && r && Object.defineProperty(target, key, r), r;
155
- };
156
- const AtomicInsightResultChildrenTemplate = class {
157
- constructor(hostRef) {
158
- registerInstance(this, hostRef);
159
- /**
160
- * A function that must return true on results for the result template to apply.
161
- * Set programmatically before initialization, not via attribute.
162
- *
163
- * For example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:
164
- * `document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`
165
- */
166
- this.conditions = [];
167
- /**
168
- * The field and values that define which result items the condition must be applied to.
169
- *
170
- * For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype="lithiummessage,YouTubePlaylist"`
171
- */
172
- this.mustMatch = {};
173
- /**
174
- * The field and values that define which result items the condition must not be applied to.
175
- *
176
- * For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype="lithiummessage"`
177
- */
178
- this.mustNotMatch = {};
179
- this.error = undefined;
180
- this.conditions = [];
181
- this.ifDefined = undefined;
182
- this.ifNotDefined = undefined;
183
- this.mustMatch = {};
184
- this.mustNotMatch = {};
185
- }
186
- connectedCallback() {
187
- this.resultTemplateCommon = new ResultTemplateCommon({
188
- host: this.host,
189
- setError: (err) => {
190
- this.error = err;
191
- },
192
- validParents: ['atomic-insight-result-children'],
193
- });
194
- }
195
- componentWillLoad() {
196
- this.conditions = makeDefinedConditions(this.ifDefined, this.ifNotDefined);
197
- this.resultTemplateCommon.matchConditions = makeMatchConditions(this.mustMatch, this.mustNotMatch);
198
- }
199
- /**
200
- * Gets the appropriate result template based on conditions applied.
201
- */
202
- async getTemplate() {
203
- return this.resultTemplateCommon.getTemplate(this.conditions, this.error);
204
- }
205
- render() {
206
- return this.resultTemplateCommon.renderIfError(this.error);
207
- }
208
- get host() { return getElement(this); }
209
- };
210
- __decorate([
211
- MapProp({ splitValues: true })
212
- ], AtomicInsightResultChildrenTemplate.prototype, "mustMatch", void 0);
213
- __decorate([
214
- MapProp({ splitValues: true })
215
- ], AtomicInsightResultChildrenTemplate.prototype, "mustNotMatch", void 0);
216
-
217
- export { AtomicInsightResultChildrenTemplate as atomic_insight_result_children_template };
218
-
219
- //# sourceMappingURL=atomic-insight-result-children-template.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"atomic-insight-result-children-template.entry.js","mappings":";;;;;;;AAAO,MAAM,mBAAmB,GAAG,sBAAsB;;ACEzD,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,8BAA8B;IAC9B,8BAA8B;IAC9B,+BAA+B;IAC/B,6BAA6B;IAC7B,sCAAsC;IACtC,kCAAkC;IAClC,+BAA+B;IAC/B,uCAAuC;IACvC,gCAAgC;CACxB,CAAC,CAAC;AAEZ,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,+BAA+B;IAC/B,+BAA+B;IAC/B,gCAAgC;IAChC,6BAA6B;IAC7B,iCAAiC;IACjC,mCAAmC;IACnC,oCAAoC;IACpC,wCAAwC;IACxC,iCAAiC;CACzB,CAAC,CAAC;AAEZ,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,iBAAiB,EAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC;SAMvD,mBAAmB,CAAC,OAAa;IAC/C,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAwB,CAAC,CAAC;AAC1E;;SCXgB,mBAAmB,CAAC,IAAU;IAC5C,IAAI,mBAAmB,CAAC,IAAI,CAAC,EAAE;QAC7B,OAAO,SAAS,CAAC;KAClB;IACD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;QACvB,OAAO,UAAU,CAAC;KACnB;IACD,IACE,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,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5D;;;AA/C4C;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;sEAG9B;AAOsC;IAApC,OAAO,CAAC,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;yEAG9B;;;;","names":[],"sources":["src/components/common/table-element-utils.ts","src/components/common/layout/item-layout-sections.ts","src/components/common/result-templates/stencil-result-template-common.tsx","src/components/insight/result-templates/atomic-insight-result-children-template/atomic-insight-result-children-template.tsx"],"sourcesContent":["export const tableElementTagName = 'atomic-table-element';\n","import {isElementNode} from '@/src/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","import {\n ResultTemplate,\n ResultTemplateCondition,\n ResultTemplatesHelpers,\n} from '@coveo/headless';\nimport {h} from '@stencil/core';\nimport {aggregate, isElementNode, isVisualNode} from '@/src/utils/utils';\nimport {tableElementTagName} from '../table-element-utils';\nimport {ItemTarget} from '../layout/display-options';\nimport {isResultSectionNode} from '../layout/item-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","import {ResultTemplate, ResultTemplateCondition} from '@coveo/headless';\nimport {Component, Element, Prop, State, Method} from '@stencil/core';\nimport {MapProp} from '../../../../utils/props-utils';\nimport {\n makeDefinedConditions,\n makeMatchConditions,\n ResultTemplateCommon,\n} from '../../../common/result-templates/stencil-result-template-common';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-result-children-template',\n shadow: true,\n})\nexport class AtomicInsightResultChildrenTemplate {\n @Element() public host!: HTMLDivElement;\n\n @State() public error!: Error;\n\n /**\n * A function that must return true on results for the result template to apply.\n * Set programmatically before initialization, not via attribute.\n *\n * For example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n * `document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`\n */\n @Prop() public conditions: ResultTemplateCondition[] = [];\n\n /**\n * The field that, when defined on a result item, would allow the template to be applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are defined: `if-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifDefined?: string;\n\n /**\n * The field that, when defined on a result item, would prevent the template from being applied.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` and `sourcetype` fields are NOT defined: `if-not-defined=\"filetype,sourcetype\"`\n */\n @Prop({reflect: true}) ifNotDefined?: string;\n\n /**\n * The field and values that define which result items the condition must be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is `lithiummessage` or `YouTubePlaylist`: `must-match-filetype=\"lithiummessage,YouTubePlaylist\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustMatch: Record<\n string,\n string[]\n > = {};\n\n /**\n * The field and values that define which result items the condition must not be applied to.\n *\n * For example, a template with the following attribute only applies to result items whose `filetype` is not `lithiummessage`: `must-not-match-filetype=\"lithiummessage\"`\n */\n @Prop() @MapProp({splitValues: true}) public mustNotMatch: Record<\n string,\n string[]\n > = {};\n\n public resultTemplateCommon!: ResultTemplateCommon;\n\n constructor() {}\n\n connectedCallback() {\n this.resultTemplateCommon = new ResultTemplateCommon({\n host: this.host,\n setError: (err) => {\n this.error = err;\n },\n validParents: ['atomic-insight-result-children'],\n });\n }\n\n public componentWillLoad() {\n this.conditions = makeDefinedConditions(this.ifDefined, this.ifNotDefined);\n this.resultTemplateCommon.matchConditions = makeMatchConditions(\n this.mustMatch,\n this.mustNotMatch\n );\n }\n\n /**\n * Gets the appropriate result template based on conditions applied.\n */\n @Method()\n public async getTemplate(): Promise<ResultTemplate<DocumentFragment> | null> {\n return this.resultTemplateCommon.getTemplate(this.conditions, this.error);\n }\n\n public render() {\n return this.resultTemplateCommon.renderIfError(this.error);\n }\n}\n"],"version":3}