@coveo/atomic 3.35.0-pre.62aec01e2b → 3.35.0-pre.657dcf9743

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 (206) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/components/atomic-category-facet.js +17 -7
  3. package/dist/atomic/components/atomic-category-facet.js.map +1 -1
  4. package/dist/atomic/components/atomic-insight-smart-snippet-suggestions.js +2 -2
  5. package/dist/atomic/components/atomic-insight-smart-snippet-suggestions.js.map +1 -1
  6. package/dist/atomic/components/atomic-insight-smart-snippet.js +2 -2
  7. package/dist/atomic/components/atomic-insight-smart-snippet.js.map +1 -1
  8. package/dist/atomic/components/atomic-ipx-result-link.js +5 -5
  9. package/dist/atomic/components/atomic-ipx-result-link.js.map +1 -1
  10. package/dist/atomic/components/atomic-recs-interface.js +1 -1
  11. package/dist/atomic/components/atomic-result-link.js +5 -5
  12. package/dist/atomic/components/atomic-result-link.js.map +1 -1
  13. package/dist/atomic/components/atomic-result-printable-uri.js +2 -2
  14. package/dist/atomic/components/atomic-result-printable-uri.js.map +1 -1
  15. package/dist/atomic/components/atomic-search-box.js +9 -5
  16. package/dist/atomic/components/atomic-search-box.js.map +1 -1
  17. package/dist/atomic/components/atomic-smart-snippet-suggestions.js +2 -2
  18. package/dist/atomic/components/atomic-smart-snippet-suggestions.js.map +1 -1
  19. package/dist/atomic/components/atomic-smart-snippet.js +2 -2
  20. package/dist/atomic/components/atomic-smart-snippet.js.map +1 -1
  21. package/dist/atomic/components/attributes-slot.js +12 -8
  22. package/dist/atomic/components/attributes-slot.js.map +1 -1
  23. package/dist/atomic/components/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.js +3 -1
  24. package/dist/atomic/components/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.js +3 -0
  25. package/dist/atomic/components/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +11 -3
  26. package/dist/atomic/components/components/commerce/atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.js +3 -0
  27. package/dist/atomic/components/components/commerce/atomic-product-link/atomic-product-link.js +2 -2
  28. package/dist/atomic/components/components/common/breadbox/breadcrumb-button.js +6 -1
  29. package/dist/atomic/components/components/common/facets/category-facet/all-categories-button.js +3 -2
  30. package/dist/atomic/components/components/common/facets/category-facet/all-categories-localized-label.js +9 -0
  31. package/dist/atomic/components/components/common/facets/category-facet/search-value.js +6 -1
  32. package/dist/atomic/components/components/common/item-link/attributes-slot.js +11 -7
  33. package/dist/atomic/components/components/common/search-box/text-area-clear-button.js +1 -1
  34. package/dist/atomic/components/generated-answer-common.js +2 -3
  35. package/dist/atomic/components/generated-answer-common.js.map +1 -1
  36. package/dist/atomic/components/global/environment.js +1 -1
  37. package/dist/atomic/components/slot-utils.js +6 -23
  38. package/dist/atomic/components/slot-utils.js.map +1 -1
  39. package/dist/atomic/components/stencil-suggestion-manager.js +1 -1
  40. package/dist/atomic/components/stencil-suggestion-manager.js.map +1 -1
  41. package/dist/atomic/components/utils/slot-utils.js +5 -22
  42. package/dist/atomic/lang/cs.json +1 -1
  43. package/dist/atomic/lang/da.json +1 -1
  44. package/dist/atomic/lang/de.json +1 -1
  45. package/dist/atomic/lang/dev.json +1 -1
  46. package/dist/atomic/lang/el.json +1 -1
  47. package/dist/atomic/lang/en.json +1 -1
  48. package/dist/atomic/lang/es.json +1 -1
  49. package/dist/atomic/lang/fi.json +1 -1
  50. package/dist/atomic/lang/fr.json +1 -1
  51. package/dist/atomic/lang/hu.json +1 -1
  52. package/dist/atomic/lang/id.json +1 -1
  53. package/dist/atomic/lang/it.json +1 -1
  54. package/dist/atomic/lang/ja.json +1 -1
  55. package/dist/atomic/lang/ko.json +1 -1
  56. package/dist/atomic/lang/nl.json +1 -1
  57. package/dist/atomic/lang/no.json +1 -1
  58. package/dist/atomic/lang/pl.json +1 -1
  59. package/dist/atomic/lang/pt-BR.json +1 -1
  60. package/dist/atomic/lang/pt.json +1 -1
  61. package/dist/atomic/lang/ru.json +1 -1
  62. package/dist/atomic/lang/sv.json +1 -1
  63. package/dist/atomic/lang/th.json +1 -1
  64. package/dist/atomic/lang/tr.json +1 -1
  65. package/dist/atomic/lang/zh-CN.json +1 -1
  66. package/dist/atomic/lang/zh-TW.json +1 -1
  67. package/dist/atomic/lang/zh.json +1 -1
  68. package/dist/atomic/{p-ceca3fb8.entry.js → p-163f09d7.entry.js} +2 -2
  69. package/dist/atomic/p-163f09d7.entry.js.map +1 -0
  70. package/dist/atomic/p-2c94b87e.js +2 -0
  71. package/dist/atomic/p-2c94b87e.js.map +1 -0
  72. package/dist/atomic/{p-67f62282.entry.js → p-2d3cf551.entry.js} +2 -2
  73. package/dist/atomic/p-2d3cf551.entry.js.map +1 -0
  74. package/dist/atomic/{p-72cdb9d8.entry.js → p-4ba1eb36.entry.js} +2 -2
  75. package/dist/atomic/p-4ba1eb36.entry.js.map +1 -0
  76. package/dist/atomic/{p-5eaee0be.entry.js → p-50ab95ec.entry.js} +2 -2
  77. package/dist/atomic/p-50ab95ec.entry.js.map +1 -0
  78. package/dist/atomic/{p-dda4be4d.js → p-59479bcc.js} +2 -2
  79. package/dist/atomic/p-59479bcc.js.map +1 -0
  80. package/dist/atomic/{p-87eafe2f.entry.js → p-77727995.entry.js} +2 -2
  81. package/dist/atomic/{p-ff23598b.entry.js → p-7c743cbd.entry.js} +2 -2
  82. package/dist/atomic/p-7c743cbd.entry.js.map +1 -0
  83. package/dist/atomic/{p-a48ae7ab.entry.js → p-7caa81e6.entry.js} +2 -2
  84. package/dist/atomic/p-7caa81e6.entry.js.map +1 -0
  85. package/dist/atomic/{p-626e15cc.entry.js → p-84d53614.entry.js} +2 -2
  86. package/dist/atomic/p-904f3adb.js +2 -0
  87. package/dist/atomic/p-904f3adb.js.map +1 -0
  88. package/dist/atomic/{p-6da5e67e.entry.js → p-a1c0d1dd.entry.js} +2 -2
  89. package/dist/atomic/p-a1c0d1dd.entry.js.map +1 -0
  90. package/dist/atomic/p-a62f2bf9.js +2 -0
  91. package/dist/atomic/p-a62f2bf9.js.map +1 -0
  92. package/dist/atomic/{p-e0d103ba.entry.js → p-b2c0cff1.entry.js} +2 -2
  93. package/dist/atomic/p-b2c0cff1.entry.js.map +1 -0
  94. package/dist/atomic/{p-bb0e0b5d.entry.js → p-c7d0c91f.entry.js} +2 -2
  95. package/dist/atomic/{p-06bc57be.entry.js → p-c936b64c.entry.js} +2 -2
  96. package/dist/atomic/{p-875eb57b.entry.js → p-f404a6ac.entry.js} +2 -2
  97. package/dist/atomic/p-f404a6ac.entry.js.map +1 -0
  98. package/dist/cjs/atomic-category-facet.cjs.entry.js +17 -7
  99. package/dist/cjs/atomic-category-facet.cjs.entry.js.map +1 -1
  100. package/dist/cjs/atomic-generated-answer.cjs.entry.js +2 -2
  101. package/dist/cjs/atomic-insight-generated-answer.cjs.entry.js +2 -2
  102. package/dist/cjs/atomic-insight-search-box.cjs.entry.js +1 -1
  103. package/dist/cjs/atomic-insight-smart-snippet-suggestions.cjs.entry.js +3 -3
  104. package/dist/cjs/atomic-insight-smart-snippet-suggestions.cjs.entry.js.map +1 -1
  105. package/dist/cjs/atomic-insight-smart-snippet.cjs.entry.js +3 -3
  106. package/dist/cjs/atomic-insight-smart-snippet.cjs.entry.js.map +1 -1
  107. package/dist/cjs/atomic-ipx-result-link.cjs.entry.js +5 -5
  108. package/dist/cjs/atomic-ipx-result-link.cjs.entry.js.map +1 -1
  109. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  110. package/dist/cjs/atomic-result-link.cjs.entry.js +5 -5
  111. package/dist/cjs/atomic-result-link.cjs.entry.js.map +1 -1
  112. package/dist/cjs/atomic-result-printable-uri.cjs.entry.js +3 -3
  113. package/dist/cjs/atomic-result-printable-uri.cjs.entry.js.map +1 -1
  114. package/dist/cjs/atomic-search-box.cjs.entry.js +10 -6
  115. package/dist/cjs/atomic-search-box.cjs.entry.js.map +1 -1
  116. package/dist/cjs/atomic-smart-snippet-suggestions.cjs.entry.js +3 -3
  117. package/dist/cjs/atomic-smart-snippet-suggestions.cjs.entry.js.map +1 -1
  118. package/dist/cjs/atomic-smart-snippet.cjs.entry.js +3 -3
  119. package/dist/cjs/atomic-smart-snippet.cjs.entry.js.map +1 -1
  120. package/dist/cjs/attributes-slot-bb450885.js +32 -0
  121. package/dist/cjs/attributes-slot-bb450885.js.map +1 -0
  122. package/dist/cjs/{generated-answer-common-0d1fc031.js → generated-answer-common-b4b7dc00.js} +3 -4
  123. package/dist/cjs/generated-answer-common-b4b7dc00.js.map +1 -0
  124. package/dist/cjs/slot-utils-086dacac.js +23 -0
  125. package/dist/cjs/slot-utils-086dacac.js.map +1 -0
  126. package/dist/cjs/{stencil-suggestion-manager-83efa596.js → stencil-suggestion-manager-62c42aa3.js} +2 -2
  127. package/dist/cjs/stencil-suggestion-manager-62c42aa3.js.map +1 -0
  128. package/dist/cjs/version.cjs.js +2 -2
  129. package/dist/esm/atomic-category-facet.entry.js +17 -7
  130. package/dist/esm/atomic-category-facet.entry.js.map +1 -1
  131. package/dist/esm/atomic-generated-answer.entry.js +2 -2
  132. package/dist/esm/atomic-insight-generated-answer.entry.js +2 -2
  133. package/dist/esm/atomic-insight-search-box.entry.js +1 -1
  134. package/dist/esm/atomic-insight-smart-snippet-suggestions.entry.js +3 -3
  135. package/dist/esm/atomic-insight-smart-snippet-suggestions.entry.js.map +1 -1
  136. package/dist/esm/atomic-insight-smart-snippet.entry.js +3 -3
  137. package/dist/esm/atomic-insight-smart-snippet.entry.js.map +1 -1
  138. package/dist/esm/atomic-ipx-result-link.entry.js +5 -5
  139. package/dist/esm/atomic-ipx-result-link.entry.js.map +1 -1
  140. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  141. package/dist/esm/atomic-result-link.entry.js +5 -5
  142. package/dist/esm/atomic-result-link.entry.js.map +1 -1
  143. package/dist/esm/atomic-result-printable-uri.entry.js +3 -3
  144. package/dist/esm/atomic-result-printable-uri.entry.js.map +1 -1
  145. package/dist/esm/atomic-search-box.entry.js +10 -6
  146. package/dist/esm/atomic-search-box.entry.js.map +1 -1
  147. package/dist/esm/atomic-smart-snippet-suggestions.entry.js +3 -3
  148. package/dist/esm/atomic-smart-snippet-suggestions.entry.js.map +1 -1
  149. package/dist/esm/atomic-smart-snippet.entry.js +3 -3
  150. package/dist/esm/atomic-smart-snippet.entry.js.map +1 -1
  151. package/dist/esm/attributes-slot-b43923b8.js +30 -0
  152. package/dist/esm/attributes-slot-b43923b8.js.map +1 -0
  153. package/dist/esm/{generated-answer-common-50a58790.js → generated-answer-common-5a0df077.js} +3 -4
  154. package/dist/esm/generated-answer-common-5a0df077.js.map +1 -0
  155. package/dist/esm/slot-utils-3a3874a2.js +20 -0
  156. package/dist/esm/slot-utils-3a3874a2.js.map +1 -0
  157. package/dist/esm/{stencil-suggestion-manager-c1c4298e.js → stencil-suggestion-manager-3d2eea75.js} +2 -2
  158. package/dist/esm/stencil-suggestion-manager-3d2eea75.js.map +1 -0
  159. package/dist/esm/version.js +2 -2
  160. package/dist/types/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.d.ts +1 -0
  161. package/dist/types/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.d.ts +1 -0
  162. package/dist/types/components/commerce/atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.d.ts +1 -0
  163. package/dist/types/components/common/breadbox/breadcrumb-button.d.ts +2 -0
  164. package/dist/types/components/common/facets/category-facet/all-categories-button.d.ts +2 -0
  165. package/dist/types/components/common/facets/category-facet/all-categories-localized-label.d.ts +6 -0
  166. package/dist/types/components/common/facets/category-facet/search-value.d.ts +1 -0
  167. package/dist/types/components/common/facets/category-facet/stencil-all-categories-button.d.ts +2 -0
  168. package/dist/types/components/common/facets/category-facet/stencil-search-value.d.ts +1 -0
  169. package/dist/types/components/common/item-link/attributes-slot.d.ts +1 -1
  170. package/dist/types/components/search/atomic-search-box/atomic-search-box.d.ts +1 -0
  171. package/dist/types/directives/hierarchical-path.d.ts +1 -1
  172. package/dist/types/utils/slot-utils.d.ts +2 -2
  173. package/docs/atomic-docs.json +1 -1
  174. package/package.json +5 -8
  175. package/dist/atomic/p-1891bbcf.js +0 -2
  176. package/dist/atomic/p-1891bbcf.js.map +0 -1
  177. package/dist/atomic/p-5eaee0be.entry.js.map +0 -1
  178. package/dist/atomic/p-67f62282.entry.js.map +0 -1
  179. package/dist/atomic/p-6da5e67e.entry.js.map +0 -1
  180. package/dist/atomic/p-72cdb9d8.entry.js.map +0 -1
  181. package/dist/atomic/p-875eb57b.entry.js.map +0 -1
  182. package/dist/atomic/p-a48ae7ab.entry.js.map +0 -1
  183. package/dist/atomic/p-aa290a01.js +0 -2
  184. package/dist/atomic/p-aa290a01.js.map +0 -1
  185. package/dist/atomic/p-b309aadd.js +0 -2
  186. package/dist/atomic/p-b309aadd.js.map +0 -1
  187. package/dist/atomic/p-ceca3fb8.entry.js.map +0 -1
  188. package/dist/atomic/p-dda4be4d.js.map +0 -1
  189. package/dist/atomic/p-e0d103ba.entry.js.map +0 -1
  190. package/dist/atomic/p-ff23598b.entry.js.map +0 -1
  191. package/dist/cjs/attributes-slot-4e7d7a75.js +0 -28
  192. package/dist/cjs/attributes-slot-4e7d7a75.js.map +0 -1
  193. package/dist/cjs/generated-answer-common-0d1fc031.js.map +0 -1
  194. package/dist/cjs/slot-utils-a30cb814.js +0 -40
  195. package/dist/cjs/slot-utils-a30cb814.js.map +0 -1
  196. package/dist/cjs/stencil-suggestion-manager-83efa596.js.map +0 -1
  197. package/dist/esm/attributes-slot-cb60f29b.js +0 -26
  198. package/dist/esm/attributes-slot-cb60f29b.js.map +0 -1
  199. package/dist/esm/generated-answer-common-50a58790.js.map +0 -1
  200. package/dist/esm/slot-utils-dcf4fc27.js +0 -37
  201. package/dist/esm/slot-utils-dcf4fc27.js.map +0 -1
  202. package/dist/esm/stencil-suggestion-manager-c1c4298e.js.map +0 -1
  203. /package/dist/atomic/{p-87eafe2f.entry.js.map → p-77727995.entry.js.map} +0 -0
  204. /package/dist/atomic/{p-626e15cc.entry.js.map → p-84d53614.entry.js.map} +0 -0
  205. /package/dist/atomic/{p-bb0e0b5d.entry.js.map → p-c7d0c91f.entry.js.map} +0 -0
  206. /package/dist/atomic/{p-06bc57be.entry.js.map → p-c936b64c.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"atomic-insight-smart-snippet-suggestions.entry.js","mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAM,uCAAuC,GAAG,ojoEAAojoE,CAAC;AACrmoE,mDAAe,uCAAuC;;;;;;;;;;;;MCmCzC,oCAAoC;;;;;;QAcjB,iBAAY,GAAG,CAAC,CAAC;;4BAAF,CAAC;;;IAkBvC,UAAU;QACf,IAAI,CAAC,EAAE,KAAK,QAAQ,CAAC,mCAAmC,CAAC,CAAC;QAC1D,IAAI,CAAC,yBAAyB,GAAGA,8BAAqC,CACpE,IAAI,CAAC,QAAQ,CAAC,MAAM,CACrB,CAAC;KACH;IAEM,MAAM;QACX,IAAI,CAAC,IAAI,CAAC,8BAA8B,CAAC,SAAS,CAAC,MAAM,EAAE;YACzD,OAAO,EAAC,MAAM,OAAU,CAAC;SAC1B;QAED,QACE,EAAC,8BAA8B,IAC7B,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,IAEvB,IAAI,CAAC,8BAA8B,CAAC,SAAS,CAAC,GAAG,CAChD,CAAC,eAAe,EAAE,CAAC,KAAK,IAAI,CAAC,qBAAqB,CAAC,eAAe,EAAE,CAAC,CAAC,CACvE,CAC8B,EACjC;KACH;IAEO,qBAAqB,CAC3B,eAA4C,EAC5C,KAAa;QAEb,QACE,EAAC,sCAAsC,IACrC,QAAQ,EAAE,eAAe,CAAC,QAAQ,EAClC,GAAG,EAAE,eAAe,CAAC,gBAAgB,IAErC,EAAC,+BAA+B,IAC9B,YAAY,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,KAAK,E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KACH;IAEO,YAAY,CAAC,gBAAwB,EAAE,MAAc;QAC3D,QACE,EAAC,6BAA6B,IAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,IACrD,mCACE,gBAAgB,EAAE,yBAAyB,CACzC,IAAI,CAAC,IAAI,EACT,0BAA0B,CAC3B,EACD,0BAA0B,EAAE,MAC1B,IAAI,CAAC,yBAAyB,CAAC,wBAAwB,CACrD,gBAAgB,CACjB,EAEH,2BAA2B,EAAE,MAC3B,IAAI,CAAC,yBAAyB,CAAC,yBAAyB,CACtD,gBAAgB,CACjB,EAEH,cAAc,EAAE,MACd,IAAI,CAAC,yBAAyB,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAE/D,MAAM,EAAE,MAAM,GACe,CACD,EAChC;KACH;IAED,IAAY,KAAK;QACf,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI;aACvB,aAAa,CAAC,UAAU,CAAC;cACxB,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;QACD,OAAO,QAAQ,CAAC,SAAS,CAAC;KAC3B;IAEO,cAAc,CAAC,eAA4C;QACjE,IAAI,eAAe,CAAC,QAAQ,EAAE;YAC5B,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;SAC3E;aAAM;YACL,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;SACzE;KACF;;;AApK4B;IAA5B,kBAAkB,EAAE;sEAAmC;AAIjD;IAFN,qBAAqB,CAAC,2BAA2B,CAAC;4FAE2B;;;;;","names":["buildInsightSmartSnippetQuestionsList"],"sources":["src/components/insight/smart-snippets/atomic-insight-smart-snippet-suggestions/atomic-insight-smart-snippet-suggestions.pcss?tag=atomic-insight-smart-snippet-suggestions&encapsulation=shadow","src/components/insight/smart-snippets/atomic-insight-smart-snippet-suggestions/atomic-insight-smart-snippet-suggestions.tsx"],"sourcesContent":["@import '../../../common/smart-snippets/atomic-smart-snippet-suggestions/atomic-smart-snippet-suggestions.pcss';\n","import {getAttributesFromLinkSlot} from '@/src/components/common/item-link/attributes-slot';\nimport {Hidden} from '@/src/components/common/stencil-hidden';\nimport {randomID} from '@/src/utils/utils';\nimport {\n buildSmartSnippetQuestionsList as buildInsightSmartSnippetQuestionsList,\n SmartSnippetQuestionsList as InsightSmartSnippetQuestionsList,\n SmartSnippetQuestionsListState as InsightSmartSnippetQuestionsListState,\n Result,\n SmartSnippetRelatedQuestion,\n} from '@coveo/headless/insight';\nimport {Component, Prop, State, Element, h} from '@stencil/core';\nimport ArrowDown from '../../../../images/arrow-down.svg';\nimport ArrowRight from '../../../../images/arrow-right.svg';\nimport {\n InitializableComponent,\n InitializeBindings,\n BindStateToController,\n} from '../../../../utils/initialization-utils';\nimport {\n getQuestionPart,\n SmartSnippetSuggestionsAnswerAndSourceWrapper,\n SmartSnippetSuggestionsFooter,\n SmartSnippetSuggestionsQuestion,\n SmartSnippetSuggestionsQuestionWrapper,\n SmartSnippetSuggestionsWrapper,\n} from '../../../common/smart-snippets/atomic-smart-snippet-suggestions/smart-snippet-suggestions-common';\nimport {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-smart-snippet-suggestions',\n styleUrl: 'atomic-insight-smart-snippet-suggestions.pcss',\n shadow: true,\n})\nexport class AtomicInsightSmartSnippetSuggestions\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n public smartSnippetQuestionsList!: InsightSmartSnippetQuestionsList;\n @BindStateToController('smartSnippetQuestionsList')\n @State()\n public smartSnippetQuestionsListState!: InsightSmartSnippetQuestionsListState;\n public error!: Error;\n @Element() public host!: HTMLElement;\n\n /**\n * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the \"People also ask\" heading over the snippets, from 1 to 5.\n */\n @Prop({reflect: true}) public headingLevel = 0;\n\n /**\n * Sets the style of the snippets.\n *\n * Example:\n * ```ts\n * smartSnippet.snippetStyle = `\n * b {\n * color: blue;\n * }\n * `;\n * ```\n */\n @Prop() snippetStyle?: string;\n\n private id!: string;\n\n public initialize() {\n this.id ||= randomID('atomic-smart-snippet-suggestions-');\n this.smartSnippetQuestionsList = buildInsightSmartSnippetQuestionsList(\n this.bindings.engine\n );\n }\n\n public render() {\n if (!this.smartSnippetQuestionsListState.questions.length) {\n return <Hidden></Hidden>;\n }\n\n return (\n <SmartSnippetSuggestionsWrapper\n headingLevel={this.headingLevel}\n i18n={this.bindings.i18n}\n >\n {this.smartSnippetQuestionsListState.questions.map(\n (relatedQuestion, i) => this.renderRelatedQuestion(relatedQuestion, i)\n )}\n </SmartSnippetSuggestionsWrapper>\n );\n }\n\n private renderRelatedQuestion(\n relatedQuestion: SmartSnippetRelatedQuestion,\n index: number\n ) {\n return (\n <SmartSnippetSuggestionsQuestionWrapper\n expanded={relatedQuestion.expanded}\n key={relatedQuestion.questionAnswerId}\n >\n <SmartSnippetSuggestionsQuestion\n ariaControls={`${this.id}-${index}`}\n expanded={relatedQuestion.expanded}\n headingLevel={this.headingLevel}\n onClick={() => this.toggleQuestion(relatedQuestion)}\n question={relatedQuestion.question}\n >\n <atomic-icon\n icon={relatedQuestion.expanded ? ArrowDown : ArrowRight}\n part={getQuestionPart('icon', relatedQuestion.expanded)}\n class=\"mr-3 w-2.5 stroke-[1.25]\"\n ></atomic-icon>\n </SmartSnippetSuggestionsQuestion>\n {relatedQuestion.expanded && this.renderAnswer(relatedQuestion, index)}\n </SmartSnippetSuggestionsQuestionWrapper>\n );\n }\n\n private renderAnswer(\n relatedQuestion: SmartSnippetRelatedQuestion,\n index: number\n ) {\n return (\n <SmartSnippetSuggestionsAnswerAndSourceWrapper\n expanded={relatedQuestion.expanded}\n id={`${this.id}-${index}`}\n >\n <atomic-smart-snippet-answer\n exportparts=\"answer\"\n htmlContent={relatedQuestion.answer}\n innerStyle={this.style}\n onSelectInlineLink={(e) =>\n this.smartSnippetQuestionsList.selectInlineLink(\n relatedQuestion.questionAnswerId,\n e.detail\n )\n }\n onBeginDelayedSelectInlineLink={(e) =>\n this.smartSnippetQuestionsList.beginDelayedSelectInlineLink(\n relatedQuestion.questionAnswerId,\n e.detail\n )\n }\n onCancelPendingSelectInlineLink={(e) =>\n this.smartSnippetQuestionsList.cancelPendingSelectInlineLink(\n relatedQuestion.questionAnswerId,\n e.detail\n )\n }\n ></atomic-smart-snippet-answer>\n {relatedQuestion.source &&\n this.renderSource(\n relatedQuestion.questionAnswerId,\n relatedQuestion.source\n )}\n </SmartSnippetSuggestionsAnswerAndSourceWrapper>\n );\n }\n\n private renderSource(questionAnswerId: string, source: Result) {\n return (\n <SmartSnippetSuggestionsFooter i18n={this.bindings.i18n}>\n <atomic-smart-snippet-source\n anchorAttributes={getAttributesFromLinkSlot(\n this.host,\n 'source-anchor-attributes'\n )}\n onBeginDelayedSelectSource={() =>\n this.smartSnippetQuestionsList.beginDelayedSelectSource(\n questionAnswerId\n )\n }\n onCancelPendingSelectSource={() =>\n this.smartSnippetQuestionsList.cancelPendingSelectSource(\n questionAnswerId\n )\n }\n onSelectSource={() =>\n this.smartSnippetQuestionsList.selectSource(questionAnswerId)\n }\n source={source}\n ></atomic-smart-snippet-source>\n </SmartSnippetSuggestionsFooter>\n );\n }\n\n private get style() {\n const styleTag = this.host\n .querySelector('template')\n ?.content.querySelector('style');\n if (!styleTag) {\n return this.snippetStyle;\n }\n return styleTag.innerHTML;\n }\n\n private toggleQuestion(relatedQuestion: SmartSnippetRelatedQuestion) {\n if (relatedQuestion.expanded) {\n this.smartSnippetQuestionsList.collapse(relatedQuestion.questionAnswerId);\n } else {\n this.smartSnippetQuestionsList.expand(relatedQuestion.questionAnswerId);\n }\n }\n}\n"],"version":3}
1
+ {"file":"atomic-insight-smart-snippet-suggestions.entry.js","mapp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ACrD,gBAAgB,CACjB,EAEH,2BAA2B,EAAE,MAC3B,IAAI,CAAC,yBAAyB,CAAC,yBAAyB,CACtD,gBAAgB,CACjB,EAEH,cAAc,EAAE,MACd,IAAI,CAAC,yBAAyB,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAE/D,MAAM,EAAE,MAAM,GACe,CACD,EAChC;KACH;IAED,IAAY,KAAK;QACf,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI;aACvB,aAAa,CAAC,UAAU,CAAC;cACxB,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;QACD,OAAO,QAAQ,CAAC,SAAS,CAAC;KAC3B;IAEO,cAAc,CAAC,eAA4C;QACjE,IAAI,eAAe,CAAC,QAAQ,EAAE;YAC5B,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;SAC3E;aAAM;YACL,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;SACzE;KACF;;;AApK4B;IAA5B,kBAAkB,EAAE;sEAAmC;AAIjD;IAFN,qBAAqB,CAAC,2BAA2B,CAAC;4FAE2B;;;;;","names":["buildInsightSmartSnippetQuestionsList"],"sources":["src/components/insight/smart-snippets/atomic-insight-smart-snippet-suggestions/atomic-insight-smart-snippet-suggestions.pcss?tag=atomic-insight-smart-snippet-suggestions&encapsulation=shadow","src/components/insight/smart-snippets/atomic-insight-smart-snippet-suggestions/atomic-insight-smart-snippet-suggestions.tsx"],"sourcesContent":["@import '../../../common/smart-snippets/atomic-smart-snippet-suggestions/atomic-smart-snippet-suggestions.pcss';\n","import {getAttributesFromLinkSlotContent} from '@/src/components/common/item-link/attributes-slot';\nimport {Hidden} from '@/src/components/common/stencil-hidden';\nimport {randomID} from '@/src/utils/utils';\nimport {\n buildSmartSnippetQuestionsList as buildInsightSmartSnippetQuestionsList,\n SmartSnippetQuestionsList as InsightSmartSnippetQuestionsList,\n SmartSnippetQuestionsListState as InsightSmartSnippetQuestionsListState,\n Result,\n SmartSnippetRelatedQuestion,\n} from '@coveo/headless/insight';\nimport {Component, Prop, State, Element, h} from '@stencil/core';\nimport ArrowDown from '../../../../images/arrow-down.svg';\nimport ArrowRight from '../../../../images/arrow-right.svg';\nimport {\n InitializableComponent,\n InitializeBindings,\n BindStateToController,\n} from '../../../../utils/initialization-utils';\nimport {\n getQuestionPart,\n SmartSnippetSuggestionsAnswerAndSourceWrapper,\n SmartSnippetSuggestionsFooter,\n SmartSnippetSuggestionsQuestion,\n SmartSnippetSuggestionsQuestionWrapper,\n SmartSnippetSuggestionsWrapper,\n} from '../../../common/smart-snippets/atomic-smart-snippet-suggestions/smart-snippet-suggestions-common';\nimport {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-smart-snippet-suggestions',\n styleUrl: 'atomic-insight-smart-snippet-suggestions.pcss',\n shadow: true,\n})\nexport class AtomicInsightSmartSnippetSuggestions\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n public smartSnippetQuestionsList!: InsightSmartSnippetQuestionsList;\n @BindStateToController('smartSnippetQuestionsList')\n @State()\n public smartSnippetQuestionsListState!: InsightSmartSnippetQuestionsListState;\n public error!: Error;\n @Element() public host!: HTMLElement;\n\n /**\n * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the \"People also ask\" heading over the snippets, from 1 to 5.\n */\n @Prop({reflect: true}) public headingLevel = 0;\n\n /**\n * Sets the style of the snippets.\n *\n * Example:\n * ```ts\n * smartSnippet.snippetStyle = `\n * b {\n * color: blue;\n * }\n * `;\n * ```\n */\n @Prop() snippetStyle?: string;\n\n private id!: string;\n\n public initialize() {\n this.id ||= randomID('atomic-smart-snippet-suggestions-');\n this.smartSnippetQuestionsList = buildInsightSmartSnippetQuestionsList(\n this.bindings.engine\n );\n }\n\n public render() {\n if (!this.smartSnippetQuestionsListState.questions.length) {\n return <Hidden></Hidden>;\n }\n\n return (\n <SmartSnippetSuggestionsWrapper\n headingLevel={this.headingLevel}\n i18n={this.bindings.i18n}\n >\n {this.smartSnippetQuestionsListState.questions.map(\n (relatedQuestion, i) => this.renderRelatedQuestion(relatedQuestion, i)\n )}\n </SmartSnippetSuggestionsWrapper>\n );\n }\n\n private renderRelatedQuestion(\n relatedQuestion: SmartSnippetRelatedQuestion,\n index: number\n ) {\n return (\n <SmartSnippetSuggestionsQuestionWrapper\n expanded={relatedQuestion.expanded}\n key={relatedQuestion.questionAnswerId}\n >\n <SmartSnippetSuggestionsQuestion\n ariaControls={`${this.id}-${index}`}\n expanded={relatedQuestion.expanded}\n headingLevel={this.headingLevel}\n onClick={() => this.toggleQuestion(relatedQuestion)}\n question={relatedQuestion.question}\n >\n <atomic-icon\n icon={relatedQuestion.expanded ? ArrowDown : ArrowRight}\n part={getQuestionPart('icon', relatedQuestion.expanded)}\n class=\"mr-3 w-2.5 stroke-[1.25]\"\n ></atomic-icon>\n </SmartSnippetSuggestionsQuestion>\n {relatedQuestion.expanded && this.renderAnswer(relatedQuestion, index)}\n </SmartSnippetSuggestionsQuestionWrapper>\n );\n }\n\n private renderAnswer(\n relatedQuestion: SmartSnippetRelatedQuestion,\n index: number\n ) {\n return (\n <SmartSnippetSuggestionsAnswerAndSourceWrapper\n expanded={relatedQuestion.expanded}\n id={`${this.id}-${index}`}\n >\n <atomic-smart-snippet-answer\n exportparts=\"answer\"\n htmlContent={relatedQuestion.answer}\n innerStyle={this.style}\n onSelectInlineLink={(e) =>\n this.smartSnippetQuestionsList.selectInlineLink(\n relatedQuestion.questionAnswerId,\n e.detail\n )\n }\n onBeginDelayedSelectInlineLink={(e) =>\n this.smartSnippetQuestionsList.beginDelayedSelectInlineLink(\n relatedQuestion.questionAnswerId,\n e.detail\n )\n }\n onCancelPendingSelectInlineLink={(e) =>\n this.smartSnippetQuestionsList.cancelPendingSelectInlineLink(\n relatedQuestion.questionAnswerId,\n e.detail\n )\n }\n ></atomic-smart-snippet-answer>\n {relatedQuestion.source &&\n this.renderSource(\n relatedQuestion.questionAnswerId,\n relatedQuestion.source\n )}\n </SmartSnippetSuggestionsAnswerAndSourceWrapper>\n );\n }\n\n private renderSource(questionAnswerId: string, source: Result) {\n return (\n <SmartSnippetSuggestionsFooter i18n={this.bindings.i18n}>\n <atomic-smart-snippet-source\n anchorAttributes={getAttributesFromLinkSlotContent(\n this.host,\n 'source-anchor-attributes'\n )}\n onBeginDelayedSelectSource={() =>\n this.smartSnippetQuestionsList.beginDelayedSelectSource(\n questionAnswerId\n )\n }\n onCancelPendingSelectSource={() =>\n this.smartSnippetQuestionsList.cancelPendingSelectSource(\n questionAnswerId\n )\n }\n onSelectSource={() =>\n this.smartSnippetQuestionsList.selectSource(questionAnswerId)\n }\n source={source}\n ></atomic-smart-snippet-source>\n </SmartSnippetSuggestionsFooter>\n );\n }\n\n private get style() {\n const styleTag = this.host\n .querySelector('template')\n ?.content.querySelector('style');\n if (!styleTag) {\n return this.snippetStyle;\n }\n return styleTag.innerHTML;\n }\n\n private toggleQuestion(relatedQuestion: SmartSnippetRelatedQuestion) {\n if (relatedQuestion.expanded) {\n this.smartSnippetQuestionsList.collapse(relatedQuestion.questionAnswerId);\n } else {\n this.smartSnippetQuestionsList.expand(relatedQuestion.questionAnswerId);\n }\n }\n}\n"],"version":3}
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-3f35faca.js';
2
- import { g as getAttributesFromLinkSlot } from './attributes-slot-cb60f29b.js';
2
+ import { g as getAttributesFromLinkSlotContent } from './attributes-slot-b43923b8.js';
3
3
  import { S as SmartSnippetQuestion, a as SmartSnippetFooter, b as SmartSnippetFeedbackBanner, c as SmartSnippetWrapper } from './smart-snippet-common-bf32e4ba.js';
4
4
  import { I as InitializeBindings, B as BindStateToController, H as Hidden } from './initialization-utils-ffbc4136.js';
5
5
  import { r as randomID } from './utils-6400ebde.js';
6
6
  import { buildSmartSnippet } from '@coveo/headless/insight';
7
- import './slot-utils-dcf4fc27.js';
7
+ import './slot-utils-3a3874a2.js';
8
8
  import './stencil-button-49254c75.js';
9
9
  import './event-utils-8de63ec3.js';
10
10
  import './stencil-radio-button-8d40e86f.js';
@@ -71,7 +71,7 @@ const AtomicInsightSmartSnippet = class {
71
71
  return h(Hidden, null);
72
72
  }
73
73
  const source = this.smartSnippetState.source;
74
- return (h(SmartSnippetWrapper, { headingLevel: this.headingLevel, i18n: this.bindings.i18n }, h("atomic-smart-snippet-collapse-wrapper", null, h(SmartSnippetQuestion, { headingLevel: this.headingLevel, question: this.smartSnippetState.question }), h("atomic-smart-snippet-expandable-answer", { collapsedHeight: this.collapsedHeight, expanded: this.smartSnippetState.expanded, exportparts: "answer,show-more-button,show-less-button,truncated-answer", htmlContent: this.smartSnippetState.answer, maximumHeight: this.maximumHeight, onCollapse: () => this.smartSnippet.collapse(), onExpand: () => this.smartSnippet.expand(), part: "body", snippetStyle: this.style }), h(SmartSnippetFooter, { i18n: this.bindings.i18n }, source && (h("atomic-smart-snippet-source", { anchorAttributes: getAttributesFromLinkSlot(this.host, 'source-anchor-attributes'), onBeginDelayedSelectSource: this.smartSnippet.beginDelayedSelectSource, onCancelPendingSelectSource: this.smartSnippet.cancelPendingSelectSource, onSelectSource: this.smartSnippet.selectSource, source: source })), h(SmartSnippetFeedbackBanner, { disliked: this.smartSnippetState.disliked, explainWhyRef: (button) => {
74
+ return (h(SmartSnippetWrapper, { headingLevel: this.headingLevel, i18n: this.bindings.i18n }, h("atomic-smart-snippet-collapse-wrapper", null, h(SmartSnippetQuestion, { headingLevel: this.headingLevel, question: this.smartSnippetState.question }), h("atomic-smart-snippet-expandable-answer", { collapsedHeight: this.collapsedHeight, expanded: this.smartSnippetState.expanded, exportparts: "answer,show-more-button,show-less-button,truncated-answer", htmlContent: this.smartSnippetState.answer, maximumHeight: this.maximumHeight, onCollapse: () => this.smartSnippet.collapse(), onExpand: () => this.smartSnippet.expand(), part: "body", snippetStyle: this.style }), h(SmartSnippetFooter, { i18n: this.bindings.i18n }, source && (h("atomic-smart-snippet-source", { anchorAttributes: getAttributesFromLinkSlotContent(this.host, 'source-anchor-attributes'), onBeginDelayedSelectSource: this.smartSnippet.beginDelayedSelectSource, onCancelPendingSelectSource: this.smartSnippet.cancelPendingSelectSource, onSelectSource: this.smartSnippet.selectSource, source: source })), h(SmartSnippetFeedbackBanner, { disliked: this.smartSnippetState.disliked, explainWhyRef: (button) => {
75
75
  if (this.modalRef) {
76
76
  this.modalRef.source = button;
77
77
  }
@@ -1 +1 @@
1
- {"file":"atomic-insight-smart-snippet.entry.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,4BAA4B,GAAG,0/nEAA0/nE,CAAC;AAChioE,wCAAe,4BAA4B;;;;;;;;;;;;MC6B9B,yBAAyB;;;;;;QAmBN,iBAAY,GAAG,CAAC,CAAC;;;;QAKxB,kBAAa,GAAG,GAAG,CAAC;;;;QAIpB,oBAAe,GAAG,GAAG,CAAC;QAgBpC,iBAAY,GAAG,KAAK,CAAC;;4BAzBe,CAAC;6BAKP,GAAG;+BAID,GAAG;;4BAgBpB,KAAK;;IAEtB,UAAU;QACf,IAAI,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;QACvB,IAAI,CAAC,YAAY,GAAGA,iBAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;KACpE;IAEO,WAAW,CAAC,GAAgB;QAClC,IAAI,CAAC,QAAQ,GAAG,GAAwD,CAAC;KAC1E;IAEO,eAAe,CAAC,MAAe;QACrC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;KAC5B;IAEM,mBAAmB;QACxB,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,KAAK,IAAI,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE;YACtE,IAA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,aAAa,EAAE,QAAQ,CAAC,CAAC;KAC1D;;;AAzJ4B;IAA5B,kBAAkB,EAAE;2DAAmC;AAKjD;IAFN,qBAAqB,CAAC,cAAc,CAAC;oEAEc;;;;;","names":["buildInsightSmartSnippet"],"sources":["src/components/insight/smart-snippets/atomic-insight-smart-snippet/atomic-insight-smart-snippet.pcss?tag=atomic-insight-smart-snippet&encapsulation=shadow","src/components/insight/smart-snippets/atomic-insight-smart-snippet/atomic-insight-smart-snippet.tsx"],"sourcesContent":["@import '../../../common/smart-snippets/atomic-smart-snippet/atomic-smart-snippet.pcss';\n","import {getAttributesFromLinkSlot} from '@/src/components/common/item-link/attributes-slot';\nimport {SmartSnippetFeedbackBanner} from '@/src/components/common/smart-snippets/atomic-smart-snippet-feedback-banner';\nimport {\n SmartSnippetFooter,\n SmartSnippetQuestion,\n SmartSnippetWrapper,\n} from '@/src/components/common/smart-snippets/atomic-smart-snippet/smart-snippet-common';\nimport {Hidden} from '@/src/components/common/stencil-hidden';\nimport {randomID} from '@/src/utils/utils';\nimport {\n buildSmartSnippet as buildInsightSmartSnippet,\n SmartSnippet as InsightSmartSnippet,\n SmartSnippetState as InsightSmartSnippetState,\n} from '@coveo/headless/insight';\nimport {Component, Prop, State, Element, h} from '@stencil/core';\nimport {\n InitializableComponent,\n InitializeBindings,\n BindStateToController,\n} from '../../../../utils/initialization-utils';\nimport {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-smart-snippet',\n styleUrl: 'atomic-insight-smart-snippet.pcss',\n shadow: true,\n})\nexport class AtomicInsightSmartSnippet\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n public smartSnippet!: InsightSmartSnippet;\n\n @BindStateToController('smartSnippet')\n @State()\n public smartSnippetState!: InsightSmartSnippetState;\n public error!: Error;\n\n @Element() public host!: HTMLElement;\n\n private id!: string;\n private modalRef?: HTMLAtomicSmartSnippetFeedbackModalElement;\n\n /**\n * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the question at the top of the snippet, from 1 to 5.\n */\n @Prop({reflect: true}) public headingLevel = 0;\n\n /**\n * The maximum height (in pixels) a snippet can have before the component truncates it and displays a \"show more\" button.\n */\n @Prop({reflect: true}) maximumHeight = 250;\n /**\n * When the answer is partly hidden, how much of its height (in pixels) should be visible.\n */\n @Prop({reflect: true}) collapsedHeight = 180;\n\n /**\n * Sets the style of the snippet.\n *\n * Example:\n * ```ts\n * smartSnippet.snippetStyle = `\n * b {\n * color: blue;\n * }\n * `;\n * ```\n */\n @Prop({reflect: true}) snippetStyle?: string;\n\n @State() feedbackSent = false;\n\n public initialize() {\n this.id ||= randomID();\n this.smartSnippet = buildInsightSmartSnippet(this.bindings.engine);\n }\n\n private setModalRef(ref: HTMLElement) {\n this.modalRef = ref as HTMLAtomicInsightSmartSnippetFeedbackModalElement;\n }\n\n private setFeedbackSent(isSent: boolean) {\n this.feedbackSent = isSent;\n }\n\n public componentWillUpdate() {\n if (!(this.smartSnippetState.liked || this.smartSnippetState.disliked)) {\n this.setFeedbackSent(false);\n }\n }\n\n public render() {\n if (!this.smartSnippetState.answerFound) {\n return <Hidden></Hidden>;\n }\n\n const source = this.smartSnippetState.source;\n\n return (\n <SmartSnippetWrapper\n headingLevel={this.headingLevel}\n i18n={this.bindings.i18n}\n >\n <atomic-smart-snippet-collapse-wrapper>\n <SmartSnippetQuestion\n headingLevel={this.headingLevel}\n question={this.smartSnippetState.question}\n />\n <atomic-smart-snippet-expandable-answer\n collapsedHeight={this.collapsedHeight}\n expanded={this.smartSnippetState.expanded}\n exportparts=\"answer,show-more-button,show-less-button,truncated-answer\"\n htmlContent={this.smartSnippetState.answer}\n maximumHeight={this.maximumHeight}\n onCollapse={() => this.smartSnippet.collapse()}\n onExpand={() => this.smartSnippet.expand()}\n part=\"body\"\n snippetStyle={this.style}\n ></atomic-smart-snippet-expandable-answer>\n <SmartSnippetFooter i18n={this.bindings.i18n}>\n {source && (\n <atomic-smart-snippet-source\n anchorAttributes={getAttributesFromLinkSlot(\n this.host,\n 'source-anchor-attributes'\n )}\n onBeginDelayedSelectSource={\n this.smartSnippet.beginDelayedSelectSource\n }\n onCancelPendingSelectSource={\n this.smartSnippet.cancelPendingSelectSource\n }\n onSelectSource={this.smartSnippet.selectSource}\n source={source}\n ></atomic-smart-snippet-source>\n )}\n <SmartSnippetFeedbackBanner\n disliked={this.smartSnippetState.disliked}\n explainWhyRef={(button) => {\n if (this.modalRef) {\n this.modalRef.source = button;\n }\n }}\n feedbackSent={this.feedbackSent}\n id={this.id}\n i18n={this.bindings.i18n}\n liked={this.smartSnippetState.liked}\n onDislike={() => {\n this.loadModal();\n this.smartSnippet.dislike();\n }}\n onLike={() => this.smartSnippet.like()}\n onPressExplainWhy={() => (this.modalRef!.isOpen = true)}\n ></SmartSnippetFeedbackBanner>\n </SmartSnippetFooter>\n </atomic-smart-snippet-collapse-wrapper>\n </SmartSnippetWrapper>\n );\n }\n\n private get style() {\n const styleTag = this.host\n .querySelector('template')\n ?.content.querySelector('style');\n if (!styleTag) {\n return this.snippetStyle;\n }\n return styleTag.innerHTML;\n }\n\n private loadModal() {\n if (this.modalRef) {\n return;\n }\n const modalRef = document.createElement(\n 'atomic-insight-smart-snippet-feedback-modal'\n );\n modalRef.addEventListener('feedbackSent', () => {\n this.setFeedbackSent(true);\n });\n this.setModalRef(modalRef);\n this.host.insertAdjacentElement('beforebegin', modalRef);\n }\n}\n"],"version":3}
1
+ {"file":"atomic-insight-smart-snippet.entry.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,4BAA4B,GAAG,0/nEAA0/nE,CAAC;AAChioE,wCAAe,4BAA4B;;;;;;;;;;;;MC6B9B,yBAAyB;;;;;;QAmBN,iBAAY,GAAG,CAAC,CAAC;;;;QAKxB,kBAAa,GAAG,GAAG,CAAC;;;;QAIpB,oBAAe,GAAG,GAAG,CAAC;QAgBpC,iBAAY,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AAC;cACxB,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;QACD,OAAO,QAAQ,CAAC,SAAS,CAAC;KAC3B;IAEO,SAAS;QACf,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO;SACR;QACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CACrC,6CAA6C,CAC9C,CAAC;QACF,QAAQ,CAAC,gBAAgB,CAAC,cAAc,EAAE;YACxC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;SAC5B,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;KAC1D;;;AAzJ4B;IAA5B,kBAAkB,EAAE;2DAAmC;AAKjD;IAFN,qBAAqB,CAAC,cAAc,CAAC;oEAEc;;;;;","names":["buildInsightSmartSnippet"],"sources":["src/components/insight/smart-snippets/atomic-insight-smart-snippet/atomic-insight-smart-snippet.pcss?tag=atomic-insight-smart-snippet&encapsulation=shadow","src/components/insight/smart-snippets/atomic-insight-smart-snippet/atomic-insight-smart-snippet.tsx"],"sourcesContent":["@import '../../../common/smart-snippets/atomic-smart-snippet/atomic-smart-snippet.pcss';\n","import {getAttributesFromLinkSlotContent} from '@/src/components/common/item-link/attributes-slot';\nimport {SmartSnippetFeedbackBanner} from '@/src/components/common/smart-snippets/atomic-smart-snippet-feedback-banner';\nimport {\n SmartSnippetFooter,\n SmartSnippetQuestion,\n SmartSnippetWrapper,\n} from '@/src/components/common/smart-snippets/atomic-smart-snippet/smart-snippet-common';\nimport {Hidden} from '@/src/components/common/stencil-hidden';\nimport {randomID} from '@/src/utils/utils';\nimport {\n buildSmartSnippet as buildInsightSmartSnippet,\n SmartSnippet as InsightSmartSnippet,\n SmartSnippetState as InsightSmartSnippetState,\n} from '@coveo/headless/insight';\nimport {Component, Prop, State, Element, h} from '@stencil/core';\nimport {\n InitializableComponent,\n InitializeBindings,\n BindStateToController,\n} from '../../../../utils/initialization-utils';\nimport {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-smart-snippet',\n styleUrl: 'atomic-insight-smart-snippet.pcss',\n shadow: true,\n})\nexport class AtomicInsightSmartSnippet\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n public smartSnippet!: InsightSmartSnippet;\n\n @BindStateToController('smartSnippet')\n @State()\n public smartSnippetState!: InsightSmartSnippetState;\n public error!: Error;\n\n @Element() public host!: HTMLElement;\n\n private id!: string;\n private modalRef?: HTMLAtomicSmartSnippetFeedbackModalElement;\n\n /**\n * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the question at the top of the snippet, from 1 to 5.\n */\n @Prop({reflect: true}) public headingLevel = 0;\n\n /**\n * The maximum height (in pixels) a snippet can have before the component truncates it and displays a \"show more\" button.\n */\n @Prop({reflect: true}) maximumHeight = 250;\n /**\n * When the answer is partly hidden, how much of its height (in pixels) should be visible.\n */\n @Prop({reflect: true}) collapsedHeight = 180;\n\n /**\n * Sets the style of the snippet.\n *\n * Example:\n * ```ts\n * smartSnippet.snippetStyle = `\n * b {\n * color: blue;\n * }\n * `;\n * ```\n */\n @Prop({reflect: true}) snippetStyle?: string;\n\n @State() feedbackSent = false;\n\n public initialize() {\n this.id ||= randomID();\n this.smartSnippet = buildInsightSmartSnippet(this.bindings.engine);\n }\n\n private setModalRef(ref: HTMLElement) {\n this.modalRef = ref as HTMLAtomicInsightSmartSnippetFeedbackModalElement;\n }\n\n private setFeedbackSent(isSent: boolean) {\n this.feedbackSent = isSent;\n }\n\n public componentWillUpdate() {\n if (!(this.smartSnippetState.liked || this.smartSnippetState.disliked)) {\n this.setFeedbackSent(false);\n }\n }\n\n public render() {\n if (!this.smartSnippetState.answerFound) {\n return <Hidden></Hidden>;\n }\n\n const source = this.smartSnippetState.source;\n\n return (\n <SmartSnippetWrapper\n headingLevel={this.headingLevel}\n i18n={this.bindings.i18n}\n >\n <atomic-smart-snippet-collapse-wrapper>\n <SmartSnippetQuestion\n headingLevel={this.headingLevel}\n question={this.smartSnippetState.question}\n />\n <atomic-smart-snippet-expandable-answer\n collapsedHeight={this.collapsedHeight}\n expanded={this.smartSnippetState.expanded}\n exportparts=\"answer,show-more-button,show-less-button,truncated-answer\"\n htmlContent={this.smartSnippetState.answer}\n maximumHeight={this.maximumHeight}\n onCollapse={() => this.smartSnippet.collapse()}\n onExpand={() => this.smartSnippet.expand()}\n part=\"body\"\n snippetStyle={this.style}\n ></atomic-smart-snippet-expandable-answer>\n <SmartSnippetFooter i18n={this.bindings.i18n}>\n {source && (\n <atomic-smart-snippet-source\n anchorAttributes={getAttributesFromLinkSlotContent(\n this.host,\n 'source-anchor-attributes'\n )}\n onBeginDelayedSelectSource={\n this.smartSnippet.beginDelayedSelectSource\n }\n onCancelPendingSelectSource={\n this.smartSnippet.cancelPendingSelectSource\n }\n onSelectSource={this.smartSnippet.selectSource}\n source={source}\n ></atomic-smart-snippet-source>\n )}\n <SmartSnippetFeedbackBanner\n disliked={this.smartSnippetState.disliked}\n explainWhyRef={(button) => {\n if (this.modalRef) {\n this.modalRef.source = button;\n }\n }}\n feedbackSent={this.feedbackSent}\n id={this.id}\n i18n={this.bindings.i18n}\n liked={this.smartSnippetState.liked}\n onDislike={() => {\n this.loadModal();\n this.smartSnippet.dislike();\n }}\n onLike={() => this.smartSnippet.like()}\n onPressExplainWhy={() => (this.modalRef!.isOpen = true)}\n ></SmartSnippetFeedbackBanner>\n </SmartSnippetFooter>\n </atomic-smart-snippet-collapse-wrapper>\n </SmartSnippetWrapper>\n );\n }\n\n private get style() {\n const styleTag = this.host\n .querySelector('template')\n ?.content.querySelector('style');\n if (!styleTag) {\n return this.snippetStyle;\n }\n return styleTag.innerHTML;\n }\n\n private loadModal() {\n if (this.modalRef) {\n return;\n }\n const modalRef = document.createElement(\n 'atomic-insight-smart-snippet-feedback-modal'\n );\n modalRef.addEventListener('feedbackSent', () => {\n this.setFeedbackSent(true);\n });\n this.setModalRef(modalRef);\n this.host.insertAdjacentElement('beforebegin', modalRef);\n }\n}\n"],"version":3}
@@ -4,8 +4,8 @@ import { loadIPXActionsHistoryActions } from '@coveo/headless';
4
4
  import { b as buildCustomEvent } from './event-utils-8de63ec3.js';
5
5
  import { I as InitializeBindings } from './initialization-utils-ffbc4136.js';
6
6
  import { a as buildStringTemplateFromResult } from './result-utils-7e9b6b5c.js';
7
- import { a as getDefaultSlotFromHost } from './slot-utils-dcf4fc27.js';
8
- import { g as getAttributesFromLinkSlot } from './attributes-slot-cb60f29b.js';
7
+ import { a as getDefaultSlotContent } from './slot-utils-3a3874a2.js';
8
+ import { g as getAttributesFromLinkSlotContent } from './attributes-slot-b43923b8.js';
9
9
  import { L as LinkWithItemAnalytics } from './stencil-item-link-0183987b.js';
10
10
  import { R as ResultContext, I as InteractiveResultContext } from './stencil-result-template-decorators-f989bc6b.js';
11
11
  import './dom-utils-f6086cd3.js';
@@ -40,8 +40,8 @@ const AtomicIPXResultLink = class {
40
40
  }
41
41
  connectedCallback() {
42
42
  const slotName = 'attributes';
43
- this.hasDefaultSlot = !!getDefaultSlotFromHost(this.host);
44
- this.linkAttributes = getAttributesFromLinkSlot(this.host, slotName);
43
+ this.hasDefaultSlot = getDefaultSlotContent(this.host).length > 0;
44
+ this.linkAttributes = getAttributesFromLinkSlotContent(this.host, slotName);
45
45
  }
46
46
  async onSelect() {
47
47
  const resultPermanentId = this.result.raw.permanentid;
@@ -55,7 +55,7 @@ const AtomicIPXResultLink = class {
55
55
  const href = isUndefined(this.hrefTemplate)
56
56
  ? this.result.clickUri
57
57
  : buildStringTemplateFromResult(this.hrefTemplate, this.result, this.bindings);
58
- return (h(LinkWithItemAnalytics, { key: '402038d2246f98e38859a7563dffb363b34debfd', href: href, onSelect: () => this.onSelect(), onBeginDelayedSelect: () => this.interactiveResult.beginDelayedSelect(), onCancelPendingSelect: () => this.interactiveResult.cancelPendingSelect(), attributes: this.linkAttributes, stopPropagation: this.stopPropagation }, this.hasDefaultSlot ? (h("slot", null)) : (h("atomic-result-text", { field: "title", default: "no-title" }))));
58
+ return (h(LinkWithItemAnalytics, { key: '12cad04a11c8cda9326e7e9b7baf9f6baf580580', href: href, onSelect: () => this.onSelect(), onBeginDelayedSelect: () => this.interactiveResult.beginDelayedSelect(), onCancelPendingSelect: () => this.interactiveResult.cancelPendingSelect(), attributes: this.linkAttributes, stopPropagation: this.stopPropagation }, this.hasDefaultSlot ? (h("slot", null)) : (h("atomic-result-text", { field: "title", default: "no-title" }))));
59
59
  }
60
60
  get host() { return getElement(this); }
61
61
  };
@@ -1 +1 @@
1
- {"file":"atomic-ipx-result-link.entry.js","mappings":";;;;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,o8kEAAo8kE,CAAC;AACp+kE,kCAAe,sBAAsB;;;;;;;;;;;;MCiCxB,mBAAmB;;;;;IA6BvB,UAAU;QACf,IAAI,CAAC,IAAI,CAAC,aAAa,CACrB,gBAAgB,CACd,+BAA+B,EAC/B,CAAC,eAAwB;YACvB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;SACxC,CACF,CACF,CAAC;QACF,IAAI,CAAC,qBAAqB,GAAG,4BAA4B,CACvD,IAAI,CAAC,QAAQ,CAAC,MAAM,CACrB,CAAC;KACH;IAEM,iBAAiB;QACtB,MAAM,QAAQ,GAAG,YAAY,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAG,yBAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KACtE;IAEM,MAAM,QAAQ;QACnB,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;QACtD,IAAI,iBAAiB,IAAI,IAAI,CAAC,qBAAqB,EAAE;YACnD,MAAM,MAAM,GACV,IAAI,CAAC,qBAAqB,CAAC,gCAAgC,CACzD,iBAAiB,CAClB,CAAC;YACJ,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACvC;QACD,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;KACjC;IAEM,MAAM;QACX,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;cACvC,IAAI,CAAC,MAAM,CAAC,QAAQ;cACpB,6BAA6B,CAC3B,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,QAAQ,CACd,CAAC;QAEN,QACE,EAAC,qBAAqB,qDACpB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,EACvE,qBAAqB,EAAE,MACrB,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,EAE9C,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,eAAe,EAAE,IAAI,CAAC,eAAe,IAEpC,IAAI,CAAC,cAAc,IAClB,eAAQ,KAER,0BACE,KAAK,EAAC,OAAO,EACb,OAAO,EAAC,UAAU,GACE,CACvB,CACqB,EACxB;KACH;;;AAxF4B;IAA5B,kBAAkB,EAAE;qDAAgC;AAG5B;IAAxB,aAAa,EAAE;mDAAkC;AACd;IAAnC,wBAAwB,EAAE;8DAA+C;;;;;","names":[],"sources":["src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.pcss?tag=atomic-ipx-result-link","src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n@reference '../../../utils/tailwind-utilities/link-style.css';\n\natomic-ipx-result-link {\n a {\n @apply link-style;\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {\n IPXActionsHistoryActionCreators,\n InteractiveResult,\n loadIPXActionsHistoryActions,\n} from '@coveo/headless';\nimport {Component, h, Prop, Element} from '@stencil/core';\nimport {buildCustomEvent} from '../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {buildStringTemplateFromResult} from '../../../utils/result-utils';\nimport {getDefaultSlotFromHost} from '../../../utils/slot-utils';\nimport {AnyUnfoldedItem} from '../../common/item-list/unfolded-item';\nimport {getAttributesFromLinkSlot} from '../../common/item-link/attributes-slot';\nimport {LinkWithItemAnalytics} from '../../common/item-link/stencil-item-link';\nimport {RecsBindings} from '../../recommendations/atomic-recs-interface/atomic-recs-interface';\nimport {\n ResultContext,\n InteractiveResultContext,\n} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\n\n/**\n * The `atomic-ipx-result-link` component automatically transforms a search result title into a clickable link that points to the original item. It is an experimental internal component not intended for general use.\n * @slot default - Lets you display alternative content inside the link\n * @slot attributes - Lets you pass [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) down to the link element, overriding other attributes, to be used exclusively with an \"a\" tag such as `<a slot=\"attributes\" target=\"_blank\" download></a>`.\n * @internal\n */\n@Component({\n tag: 'atomic-ipx-result-link',\n styleUrl: 'atomic-ipx-result-link.pcss',\n shadow: false,\n})\nexport class AtomicIPXResultLink\n implements InitializableComponent<RecsBindings>\n{\n @InitializeBindings() public bindings!: RecsBindings;\n public error!: Error;\n\n @ResultContext() private result!: AnyUnfoldedItem;\n @InteractiveResultContext() private interactiveResult!: InteractiveResult;\n\n @Element() private host!: HTMLElement;\n\n /**\n * Specifies a template literal from which to generate the `href` attribute value (see\n * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).\n *\n * The template literal can reference any number of result properties from the parent result. It can also reference the window object.\n *\n * For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the result's `clickUri` and `itemtitle` fields.\n * ```html\n * <atomic-ipx-result-link href-template='${clickUri}?id=${raw.itemtitle}'></atomic-ipx-result-link>\n * ```\n */\n @Prop({reflect: true}) hrefTemplate?: string;\n\n private hasDefaultSlot!: boolean;\n private linkAttributes?: Attr[];\n private stopPropagation?: boolean;\n private actionsHistoryActions?: IPXActionsHistoryActionCreators;\n\n public initialize() {\n this.host.dispatchEvent(\n buildCustomEvent(\n 'atomic/resolveStopPropagation',\n (stopPropagation: boolean) => {\n this.stopPropagation = stopPropagation;\n }\n )\n );\n this.actionsHistoryActions = loadIPXActionsHistoryActions(\n this.bindings.engine\n );\n }\n\n public connectedCallback() {\n const slotName = 'attributes';\n this.hasDefaultSlot = !!getDefaultSlotFromHost(this.host);\n this.linkAttributes = getAttributesFromLinkSlot(this.host, slotName);\n }\n\n public async onSelect() {\n const resultPermanentId = this.result.raw.permanentid;\n if (resultPermanentId && this.actionsHistoryActions) {\n const action =\n this.actionsHistoryActions.addPageViewEntryInActionsHistory(\n resultPermanentId\n );\n this.bindings.engine.dispatch(action);\n }\n this.interactiveResult.select();\n }\n\n public render() {\n const href = isUndefined(this.hrefTemplate)\n ? this.result.clickUri\n : buildStringTemplateFromResult(\n this.hrefTemplate,\n this.result,\n this.bindings\n );\n\n return (\n <LinkWithItemAnalytics\n href={href}\n onSelect={() => this.onSelect()}\n onBeginDelayedSelect={() => this.interactiveResult.beginDelayedSelect()}\n onCancelPendingSelect={() =>\n this.interactiveResult.cancelPendingSelect()\n }\n attributes={this.linkAttributes}\n stopPropagation={this.stopPropagation}\n >\n {this.hasDefaultSlot ? (\n <slot />\n ) : (\n <atomic-result-text\n field=\"title\"\n default=\"no-title\"\n ></atomic-result-text>\n )}\n </LinkWithItemAnalytics>\n );\n }\n}\n"],"version":3}
1
+ {"file":"atomic-ipx-result-link.entry.js","mappings":";;;;;;;;;;;;;;;;AAAA,M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Q,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,EACvE,qBAAqB,EAAE,MACrB,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,EAE9C,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,eAAe,EAAE,IAAI,CAAC,eAAe,IAEpC,IAAI,CAAC,cAAc,IAClB,eAAQ,KAER,0BACE,KAAK,EAAC,OAAO,EACb,OAAO,EAAC,UAAU,GACE,CACvB,CACqB,EACxB;KACH;;;AAxF4B;IAA5B,kBAAkB,EAAE;qDAAgC;AAG5B;IAAxB,aAAa,EAAE;mDAAkC;AACd;IAAnC,wBAAwB,EAAE;8DAA+C;;;;;","names":[],"sources":["src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.pcss?tag=atomic-ipx-result-link","src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n@reference '../../../utils/tailwind-utilities/link-style.css';\n\natomic-ipx-result-link {\n a {\n @apply link-style;\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {\n IPXActionsHistoryActionCreators,\n InteractiveResult,\n loadIPXActionsHistoryActions,\n} from '@coveo/headless';\nimport {Component, h, Prop, Element} from '@stencil/core';\nimport {buildCustomEvent} from '../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {buildStringTemplateFromResult} from '../../../utils/result-utils';\nimport {getDefaultSlotContent} from '../../../utils/slot-utils';\nimport {AnyUnfoldedItem} from '../../common/item-list/unfolded-item';\nimport {getAttributesFromLinkSlotContent} from '../../common/item-link/attributes-slot';\nimport {LinkWithItemAnalytics} from '../../common/item-link/stencil-item-link';\nimport {RecsBindings} from '../../recommendations/atomic-recs-interface/atomic-recs-interface';\nimport {\n ResultContext,\n InteractiveResultContext,\n} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\n\n/**\n * The `atomic-ipx-result-link` component automatically transforms a search result title into a clickable link that points to the original item. It is an experimental internal component not intended for general use.\n * @slot default - Lets you display alternative content inside the link\n * @slot attributes - Lets you pass [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) down to the link element, overriding other attributes, to be used exclusively with an \"a\" tag such as `<a slot=\"attributes\" target=\"_blank\" download></a>`.\n * @internal\n */\n@Component({\n tag: 'atomic-ipx-result-link',\n styleUrl: 'atomic-ipx-result-link.pcss',\n shadow: false,\n})\nexport class AtomicIPXResultLink\n implements InitializableComponent<RecsBindings>\n{\n @InitializeBindings() public bindings!: RecsBindings;\n public error!: Error;\n\n @ResultContext() private result!: AnyUnfoldedItem;\n @InteractiveResultContext() private interactiveResult!: InteractiveResult;\n\n @Element() private host!: HTMLElement;\n\n /**\n * Specifies a template literal from which to generate the `href` attribute value (see\n * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).\n *\n * The template literal can reference any number of result properties from the parent result. It can also reference the window object.\n *\n * For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the result's `clickUri` and `itemtitle` fields.\n * ```html\n * <atomic-ipx-result-link href-template='${clickUri}?id=${raw.itemtitle}'></atomic-ipx-result-link>\n * ```\n */\n @Prop({reflect: true}) hrefTemplate?: string;\n\n private hasDefaultSlot!: boolean;\n private linkAttributes?: Attr[];\n private stopPropagation?: boolean;\n private actionsHistoryActions?: IPXActionsHistoryActionCreators;\n\n public initialize() {\n this.host.dispatchEvent(\n buildCustomEvent(\n 'atomic/resolveStopPropagation',\n (stopPropagation: boolean) => {\n this.stopPropagation = stopPropagation;\n }\n )\n );\n this.actionsHistoryActions = loadIPXActionsHistoryActions(\n this.bindings.engine\n );\n }\n\n public connectedCallback() {\n const slotName = 'attributes';\n this.hasDefaultSlot = getDefaultSlotContent(this.host).length > 0;\n this.linkAttributes = getAttributesFromLinkSlotContent(this.host, slotName);\n }\n\n public async onSelect() {\n const resultPermanentId = this.result.raw.permanentid;\n if (resultPermanentId && this.actionsHistoryActions) {\n const action =\n this.actionsHistoryActions.addPageViewEntryInActionsHistory(\n resultPermanentId\n );\n this.bindings.engine.dispatch(action);\n }\n this.interactiveResult.select();\n }\n\n public render() {\n const href = isUndefined(this.hrefTemplate)\n ? this.result.clickUri\n : buildStringTemplateFromResult(\n this.hrefTemplate,\n this.result,\n this.bindings\n );\n\n return (\n <LinkWithItemAnalytics\n href={href}\n onSelect={() => this.onSelect()}\n onBeginDelayedSelect={() => this.interactiveResult.beginDelayedSelect()}\n onCancelPendingSelect={() =>\n this.interactiveResult.cancelPendingSelect()\n }\n attributes={this.linkAttributes}\n stopPropagation={this.stopPropagation}\n >\n {this.hasDefaultSlot ? (\n <slot />\n ) : (\n <atomic-result-text\n field=\"title\"\n default=\"no-title\"\n ></atomic-result-text>\n )}\n </LinkWithItemAnalytics>\n );\n }\n}\n"],"version":3}
@@ -2163,7 +2163,7 @@ function getWindow() {
2163
2163
  }
2164
2164
  function getAtomicEnvironment(headlessVersion) {
2165
2165
  return {
2166
- version: "3.35.0-pre.62aec01e2b",
2166
+ version: "3.35.0-pre.657dcf9743",
2167
2167
  headlessVersion,
2168
2168
  };
2169
2169
  }
@@ -3,8 +3,8 @@ import { isUndefined } from '@coveo/bueno';
3
3
  import { b as buildCustomEvent } from './event-utils-8de63ec3.js';
4
4
  import { I as InitializeBindings } from './initialization-utils-ffbc4136.js';
5
5
  import { a as buildStringTemplateFromResult } from './result-utils-7e9b6b5c.js';
6
- import { a as getDefaultSlotFromHost } from './slot-utils-dcf4fc27.js';
7
- import { g as getAttributesFromLinkSlot } from './attributes-slot-cb60f29b.js';
6
+ import { a as getDefaultSlotContent } from './slot-utils-3a3874a2.js';
7
+ import { g as getAttributesFromLinkSlotContent } from './attributes-slot-b43923b8.js';
8
8
  import { L as LinkWithItemAnalytics } from './stencil-item-link-0183987b.js';
9
9
  import { R as ResultContext, I as InteractiveResultContext } from './stencil-result-template-decorators-f989bc6b.js';
10
10
  import './dom-utils-f6086cd3.js';
@@ -39,14 +39,14 @@ const AtomicResultLink = class {
39
39
  }
40
40
  connectedCallback() {
41
41
  const slotName = 'attributes';
42
- this.hasDefaultSlot = !!getDefaultSlotFromHost(this.host);
43
- this.linkAttributes = getAttributesFromLinkSlot(this.host, slotName);
42
+ this.hasDefaultSlot = getDefaultSlotContent(this.host).length > 0;
43
+ this.linkAttributes = getAttributesFromLinkSlotContent(this.host, slotName);
44
44
  }
45
45
  render() {
46
46
  const href = isUndefined(this.hrefTemplate)
47
47
  ? this.result.clickUri
48
48
  : buildStringTemplateFromResult(this.hrefTemplate, this.result, this.bindings);
49
- return (h(LinkWithItemAnalytics, { key: '868e9a4b2790d8c6e557be3a1ea8d9515ed89f38', href: href, onSelect: () => this.interactiveResult.select(), onBeginDelayedSelect: () => this.interactiveResult.beginDelayedSelect(), onCancelPendingSelect: () => this.interactiveResult.cancelPendingSelect(), attributes: this.linkAttributes, stopPropagation: this.stopPropagation }, this.hasDefaultSlot ? (h("slot", null)) : (h("atomic-result-text", { field: "title", default: "no-title" }))));
49
+ return (h(LinkWithItemAnalytics, { key: '1e5df8f581891728324ea8ebfc75be57e5a5d867', href: href, onSelect: () => this.interactiveResult.select(), onBeginDelayedSelect: () => this.interactiveResult.beginDelayedSelect(), onCancelPendingSelect: () => this.interactiveResult.cancelPendingSelect(), attributes: this.linkAttributes, stopPropagation: this.stopPropagation }, this.hasDefaultSlot ? (h("slot", null)) : (h("atomic-result-text", { field: "title", default: "no-title" }))));
50
50
  }
51
51
  get host() { return getElement(this); }
52
52
  };
@@ -1 +1 @@
1
- {"file":"atomic-result-link.entry.js","mappings":";;;;;;;;;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,g5kEAAg5kE,CAAC;AAC76kE,+BAAe,mBAAmB;;;;;;;;;;;;MC4BrB,gBAAgB;;;;;IA0BpB,UAAU;QACf,IAAI,CAAC,IAAI,CAAC,aAAa,CACrB,gBAAgB,CACd,+BAA+B,EAC/B,CAAC,eAAwB;YACvB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;SACxC,CACF,CACF,CAAC;KACH;IAEM,iBAAiB;QACtB,MAAM,QAAQ,GAAG,YAAY,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAG,yBAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KACtE;IAEM,MAAM;QACX,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;cACvC,IAAI,CAAC,MAAM,CAAC,QAAQ;cACpB,6BAA6B,CAC3B,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,QAAQ,CACd,CAAC;QAEN,QACE,EAAC,qBAAqB,qDACpB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,EAC/C,oBAAoB,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,EACvE,qBAAqB,EAAE,MACrB,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,EAE9C,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,eAAe,EAAE,IAAI,CAAC,eAAe,IAEpC,IAAI,CAAC,cAAc,IAClB,eAAQ,KAER,0BACE,KAAK,EAAC,OAAO,EACb,OAAO,EAAC,UAAU,GACE,CACvB,CACqB,EACxB;KACH;;;AAxE4B;IAA5B,kBAAkB,EAAE;kDAA4B;AAGxB;IAAxB,aAAa,EAAE;gDAAkC;AACd;IAAnC,wBAAwB,EAAE;2DAA+C;;;;;","names":[],"sources":["src/components/search/result-template-components/atomic-result-link/atomic-result-link.pcss?tag=atomic-result-link","src/components/search/result-template-components/atomic-result-link/atomic-result-link.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n@reference '../../../../utils/tailwind-utilities/link-style.css';\natomic-result-link {\n a {\n @apply link-style;\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {InteractiveResult} from '@coveo/headless';\nimport {Component, h, Prop, Element} from '@stencil/core';\nimport {buildCustomEvent} from '../../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {buildStringTemplateFromResult} from '../../../../utils/result-utils';\nimport {getDefaultSlotFromHost} from '../../../../utils/slot-utils';\nimport {AnyUnfoldedItem} from '../../../common/item-list/unfolded-item';\nimport {getAttributesFromLinkSlot} from '../../../common/item-link/attributes-slot';\nimport {LinkWithItemAnalytics} from '../../../common/item-link/stencil-item-link';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {\n InteractiveResultContext,\n ResultContext,\n} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\n\n/**\n * The `atomic-result-link` component automatically transforms a search result title into a clickable link that points to the original item.\n * @slot default - Lets you display alternative content inside the link\n * @slot attributes - Lets you pass [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) down to the link element, overriding other attributes, to be used exclusively with an \"a\" tag such as `<a slot=\"attributes\" target=\"_blank\" download></a>`.\n */\n@Component({\n tag: 'atomic-result-link',\n styleUrl: 'atomic-result-link.pcss',\n shadow: false,\n})\nexport class AtomicResultLink implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n public error!: Error;\n\n @ResultContext() private result!: AnyUnfoldedItem;\n @InteractiveResultContext() private interactiveResult!: InteractiveResult;\n\n @Element() private host!: HTMLElement;\n\n /**\n * Specifies a template literal from which to generate the `href` attribute value (see\n * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).\n *\n * The template literal can reference any number of result properties from the parent result. It can also reference the window object.\n *\n * For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the result's `clickUri` and `itemtitle` fields.\n * ```html\n * <atomic-result-link href-template='${clickUri}?id=${raw.itemtitle}'></atomic-result-link>\n * ```\n */\n @Prop({reflect: true}) hrefTemplate?: string;\n\n private hasDefaultSlot!: boolean;\n private linkAttributes?: Attr[];\n private stopPropagation?: boolean;\n\n public initialize() {\n this.host.dispatchEvent(\n buildCustomEvent(\n 'atomic/resolveStopPropagation',\n (stopPropagation: boolean) => {\n this.stopPropagation = stopPropagation;\n }\n )\n );\n }\n\n public connectedCallback() {\n const slotName = 'attributes';\n this.hasDefaultSlot = !!getDefaultSlotFromHost(this.host);\n this.linkAttributes = getAttributesFromLinkSlot(this.host, slotName);\n }\n\n public render() {\n const href = isUndefined(this.hrefTemplate)\n ? this.result.clickUri\n : buildStringTemplateFromResult(\n this.hrefTemplate,\n this.result,\n this.bindings\n );\n\n return (\n <LinkWithItemAnalytics\n href={href}\n onSelect={() => this.interactiveResult.select()}\n onBeginDelayedSelect={() => this.interactiveResult.beginDelayedSelect()}\n onCancelPendingSelect={() =>\n this.interactiveResult.cancelPendingSelect()\n }\n attributes={this.linkAttributes}\n stopPropagation={this.stopPropagation}\n >\n {this.hasDefaultSlot ? (\n <slot />\n ) : (\n <atomic-result-text\n field=\"title\"\n default=\"no-title\"\n ></atomic-result-text>\n )}\n </LinkWithItemAnalytics>\n );\n }\n}\n"],"version":3}
1
+ {"file":"atomic-result-link.entry.js","mappings":";;;;;;;;;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,g5kEAAg5kE,CAAC;AAC76kE,+BAAe,mBAAmB;;;;;;;;;;;;MC4BrB,gBAAgB;;;;;IA0BpB,UAAU;QACf,IAAI,CAAC,IAAI,CAAC,aAAa,CACrB,gBAAgB,CACd,+BAA+B,EAC/B,CAAC,eAAwB;YACvB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;SACxC,CACF,CACF,CAAC;KACH;IAEM,iBAAiB;QACtB,MAAM,QAAQ,GAAG,YAAY,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAI,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACnE,IAAI,CAAC,cAAc,GAAG,gCAAgC,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KAC7E;IAEM,MAAM;QACX,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;cACvC,IAAI,CAAC,MAAM,CAAC,QAAQ;cACpB,6BAA6B,CAC3B,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,QAAQ,CACd,CAAC;QAEN,QACE,EAAC,qBAAqB,qDACpB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,EAC/C,oBAAoB,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,EACvE,qBAAqB,EAAE,MACrB,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,EAE9C,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,eAAe,EAAE,IAAI,CAAC,eAAe,IAEpC,IAAI,CAAC,cAAc,IAClB,eAAQ,KAER,0BACE,KAAK,EAAC,OAAO,EACb,OAAO,EAAC,UAAU,GACE,CACvB,CACqB,EACxB;KACH;;;AAxE4B;IAA5B,kBAAkB,EAAE;kDAA4B;AAGxB;IAAxB,aAAa,EAAE;gDAAkC;AACd;IAAnC,wBAAwB,EAAE;2DAA+C;;;;;","names":[],"sources":["src/components/search/result-template-components/atomic-result-link/atomic-result-link.pcss?tag=atomic-result-link","src/components/search/result-template-components/atomic-result-link/atomic-result-link.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n@reference '../../../../utils/tailwind-utilities/link-style.css';\natomic-result-link {\n a {\n @apply link-style;\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {InteractiveResult} from '@coveo/headless';\nimport {Component, h, Prop, Element} from '@stencil/core';\nimport {buildCustomEvent} from '../../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {buildStringTemplateFromResult} from '../../../../utils/result-utils';\nimport {getDefaultSlotContent} from '../../../../utils/slot-utils';\nimport {AnyUnfoldedItem} from '../../../common/item-list/unfolded-item';\nimport {getAttributesFromLinkSlotContent} from '../../../common/item-link/attributes-slot';\nimport {LinkWithItemAnalytics} from '../../../common/item-link/stencil-item-link';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {\n InteractiveResultContext,\n ResultContext,\n} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\n\n/**\n * The `atomic-result-link` component automatically transforms a search result title into a clickable link that points to the original item.\n * @slot default - Lets you display alternative content inside the link\n * @slot attributes - Lets you pass [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) down to the link element, overriding other attributes, to be used exclusively with an \"a\" tag such as `<a slot=\"attributes\" target=\"_blank\" download></a>`.\n */\n@Component({\n tag: 'atomic-result-link',\n styleUrl: 'atomic-result-link.pcss',\n shadow: false,\n})\nexport class AtomicResultLink implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n public error!: Error;\n\n @ResultContext() private result!: AnyUnfoldedItem;\n @InteractiveResultContext() private interactiveResult!: InteractiveResult;\n\n @Element() private host!: HTMLElement;\n\n /**\n * Specifies a template literal from which to generate the `href` attribute value (see\n * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).\n *\n * The template literal can reference any number of result properties from the parent result. It can also reference the window object.\n *\n * For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the result's `clickUri` and `itemtitle` fields.\n * ```html\n * <atomic-result-link href-template='${clickUri}?id=${raw.itemtitle}'></atomic-result-link>\n * ```\n */\n @Prop({reflect: true}) hrefTemplate?: string;\n\n private hasDefaultSlot!: boolean;\n private linkAttributes?: Attr[];\n private stopPropagation?: boolean;\n\n public initialize() {\n this.host.dispatchEvent(\n buildCustomEvent(\n 'atomic/resolveStopPropagation',\n (stopPropagation: boolean) => {\n this.stopPropagation = stopPropagation;\n }\n )\n );\n }\n\n public connectedCallback() {\n const slotName = 'attributes';\n this.hasDefaultSlot = getDefaultSlotContent(this.host).length > 0;\n this.linkAttributes = getAttributesFromLinkSlotContent(this.host, slotName);\n }\n\n public render() {\n const href = isUndefined(this.hrefTemplate)\n ? this.result.clickUri\n : buildStringTemplateFromResult(\n this.hrefTemplate,\n this.result,\n this.bindings\n );\n\n return (\n <LinkWithItemAnalytics\n href={href}\n onSelect={() => this.interactiveResult.select()}\n onBeginDelayedSelect={() => this.interactiveResult.beginDelayedSelect()}\n onCancelPendingSelect={() =>\n this.interactiveResult.cancelPendingSelect()\n }\n attributes={this.linkAttributes}\n stopPropagation={this.stopPropagation}\n >\n {this.hasDefaultSlot ? (\n <slot />\n ) : (\n <atomic-result-text\n field=\"title\"\n default=\"no-title\"\n ></atomic-result-text>\n )}\n </LinkWithItemAnalytics>\n );\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ import { A as ArrowRight } from './arrow-right-cb365b01.js';
5
5
  import { I as InitializeBindings } from './initialization-utils-ffbc4136.js';
6
6
  import { F as FocusTargetController } from './stencil-accessibility-utils-ae75044b.js';
7
7
  import { p as parseXML } from './utils-6400ebde.js';
8
- import { g as getAttributesFromLinkSlot } from './attributes-slot-cb60f29b.js';
8
+ import { g as getAttributesFromLinkSlotContent } from './attributes-slot-b43923b8.js';
9
9
  import { L as LinkWithItemAnalytics } from './stencil-item-link-0183987b.js';
10
10
  import { R as ResultContext } from './stencil-result-template-decorators-f989bc6b.js';
11
11
  import './dom-utils-f6086cd3.js';
@@ -14,7 +14,7 @@ import './init-queue-fbe942c3.js';
14
14
  import './initialization-lit-stencil-common-utils-804fe146.js';
15
15
  import './purify-c7ebd240.js';
16
16
  import './_commonjsHelpers-1789f0cf.js';
17
- import './slot-utils-dcf4fc27.js';
17
+ import './slot-utils-3a3874a2.js';
18
18
  import './xss-utils-c92f3869.js';
19
19
  import './stencil-item-decorators-6c453c11.js';
20
20
 
@@ -59,7 +59,7 @@ const AtomicResultPrintableUri = class {
59
59
  this.error = error;
60
60
  }
61
61
  const slotName = 'attributes';
62
- this.linkAttributes = getAttributesFromLinkSlot(this.host, slotName);
62
+ this.linkAttributes = getAttributesFromLinkSlotContent(this.host, slotName);
63
63
  }
64
64
  initialize() {
65
65
  this.interactiveResult = buildInteractiveResult(this.bindings.engine, {
@@ -1 +1 @@
1
- {"file":"atomic-result-printable-uri.entry.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,2BAA2B,GAAG,w/lEAAw/lE,CAAC;AAC7hmE,uCAAe,2BAA2B;;;;;;;;;;;;MC0B7B,wBAAwB;;;QAK1B,iBAAY,GAAG,KAAK,CAAC;;;;QAMP,qBAAgB,GAAG,CAAC,CAAC;4BANpB,KAAK;;gCAMa,CAAC;;IAO3C,IAAY,WAAW;QACrB,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;YAC3B,IAAI,CAAC,iBAAiB,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC;SAC1D;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAC;KAC/B;IAEM,iBAAiB;QACtB,IAAI;YACF,IAAI,MAAM,CAAC;gBACT,gBAAgB,EAAE,IAAI,WAAW,CAAC,EAAC,GAAG,EAAE,CAAC,EAAC,CAAC;aAC5C,CAAC,CAAC,QAAQ,CAAC,EAAC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAC,CAAC,CAAC;SACxD;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,KAAK,GAAG,KAAc,CAAC;SAC7B;QACD,MAAM,QAAQ,GAAG,YAAY,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,yBAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KACtE;IAEM,UAAU;QACf,IAAI,CAAC,iBAAiB,GAAG,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;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MAAM,EAAE;YAClB,QACE,wBAAgB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,IAAG,OAAO,CAAM,EACrE;SACH;QAED,OAAO,IAAI,CAAC,UAAU,CACpB,0BAAoB,KAAK,EAAC,cAAc,GAAsB,EAC9D,IAAI,CAAC,MAAM,CAAC,QAAQ,EACpB,KAAK,CACN,CAAC;KACH;;;AAhJ4B;IAA5B,kBAAkB,EAAE;0DAA4B;AACxB;IAAxB,aAAa,EAAE;wDAAyB;;;;;","names":["Arrow"],"sources":["src/components/search/result-template-components/atomic-result-printable-uri/atomic-result-printable-uri.pcss?tag=atomic-result-printable-uri","src/components/search/result-template-components/atomic-result-printable-uri/atomic-result-printable-uri.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n\natomic-result-printable-uri {\n max-width: 100%;\n word-break: break-word;\n\n a,\n button {\n @apply text-primary;\n\n &:hover,\n &:focus-visible {\n text-decoration: underline;\n @apply text-primary;\n }\n\n &:focus {\n outline: none;\n }\n\n &:visited {\n @apply text-visited;\n }\n }\n\n ul {\n display: flex;\n flex-wrap: wrap;\n }\n\n li {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n\n a {\n display: inline-block;\n vertical-align: middle;\n max-width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n white-space: nowrap;\n &:last-child {\n white-space: normal;\n\n &::after {\n content: none;\n }\n }\n\n .result-printable-uri-separator {\n display: inline-block;\n margin: 0 0.5rem;\n vertical-align: middle;\n width: 0.75rem;\n height: 0.75rem;\n @apply text-neutral-dark;\n }\n }\n}\n","import {Schema, NumberValue} from '@coveo/bueno';\nimport {\n buildInteractiveResult,\n InteractiveResult,\n Result,\n} from '@coveo/headless';\nimport {Component, Element, h, Prop, State, VNode} from '@stencil/core';\nimport Arrow from '../../../../images/arrow-right.svg';\nimport {InitializeBindings} from '../../../../utils/initialization-utils';\nimport {FocusTargetController} from '../../../../utils/stencil-accessibility-utils';\nimport {parseXML} from '../../../../utils/utils';\nimport {getAttributesFromLinkSlot} from '../../../common/item-link/attributes-slot';\nimport {LinkWithItemAnalytics} from '../../../common/item-link/stencil-item-link';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\n\n/**\n * The `atomic-result-printable-uri` component displays the URI, or path, to access a result.\n *\n * @slot attributes - Lets you pass [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) down to anchor elements, overriding other attributes.\n * To be used exclusively in anchor elements, such as: `<a slot=\"attributes\" target=\"_blank\" download></a>`.\n */\n@Component({\n tag: 'atomic-result-printable-uri',\n styleUrl: 'atomic-result-printable-uri.pcss',\n shadow: false,\n})\nexport class AtomicResultPrintableUri {\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n @Element() public host!: HTMLElement;\n\n @State() listExpanded = false;\n @State() error!: Error;\n\n /**\n * The maximum number of Uri parts to display. This has to be over the minimum of `3` in order to be effective. Putting `Infinity` will disable the ellipsis.\n */\n @Prop({reflect: true}) maxNumberOfParts = 5;\n\n private expandedPartFocus?: FocusTargetController;\n\n private interactiveResult!: InteractiveResult;\n private linkAttributes?: Attr[];\n\n private get focusTarget() {\n if (!this.expandedPartFocus) {\n this.expandedPartFocus = new FocusTargetController(this);\n }\n return this.expandedPartFocus;\n }\n\n public connectedCallback() {\n try {\n new Schema({\n maxNumberOfParts: new NumberValue({min: 3}),\n }).validate({maxNumberOfParts: this.maxNumberOfParts});\n } catch (error) {\n this.error = error as Error;\n }\n const slotName = 'attributes';\n this.linkAttributes = getAttributesFromLinkSlot(this.host, slotName);\n }\n\n public initialize() {\n this.interactiveResult = buildInteractiveResult(this.bindings.engine, {\n options: {result: this.result},\n });\n }\n\n private getIndexOfEllipsis(parentsCount: number) {\n const valuesToHide = Math.max(2, parentsCount - this.maxNumberOfParts);\n const valuesToShowBeforeEllipsis = parentsCount - valuesToHide - 1;\n return valuesToShowBeforeEllipsis;\n }\n\n private renderEllipsis() {\n return (\n <li>\n <button\n aria-label={this.bindings.i18n.t('collapsed-uri-parts')}\n onClick={(e) => {\n e.stopPropagation();\n this.focusTarget.focusOnNextTarget();\n this.listExpanded = true;\n }}\n >\n ...\n </button>\n {this.renderSeparator()}\n </li>\n );\n }\n\n private get allParents() {\n const parentsXml = parseXML(`${this.result.raw.parents}`);\n const parents = Array.from(parentsXml.getElementsByTagName('parent'));\n const ellipsisIndex = this.getIndexOfEllipsis(parents.length);\n return parents.map((parent, i) => {\n const name = parent.getAttribute('name');\n const uri = parent.getAttribute('uri')!;\n return (\n <li>\n {this.renderLink(name, uri, i === ellipsisIndex)}\n {i === parents.length - 1 ? null : this.renderSeparator()}\n </li>\n );\n });\n }\n\n private renderSeparator() {\n return (\n <atomic-icon\n class=\"result-printable-uri-separator\"\n icon={Arrow}\n role=\"separator\"\n ></atomic-icon>\n );\n }\n\n private renderParents() {\n const parents = this.allParents;\n if (this.listExpanded || parents.length <= this.maxNumberOfParts) {\n return parents;\n }\n\n return [\n parents.slice(0, this.getIndexOfEllipsis(parents.length)),\n this.renderEllipsis(),\n parents.slice(-1),\n ];\n }\n\n private renderLink(\n content: VNode | string | null,\n uri: string,\n shouldSetTarget: boolean\n ) {\n return (\n <LinkWithItemAnalytics\n href={uri}\n title={typeof content === 'string' ? content : undefined}\n onSelect={() => this.interactiveResult.select()}\n onBeginDelayedSelect={() => this.interactiveResult.beginDelayedSelect()}\n onCancelPendingSelect={() =>\n this.interactiveResult.cancelPendingSelect()\n }\n attributes={this.linkAttributes}\n ref={\n shouldSetTarget\n ? (el?: HTMLAnchorElement) => this.focusTarget.setTarget(el)\n : undefined\n }\n >\n {content}\n </LinkWithItemAnalytics>\n );\n }\n\n public render() {\n const parents = this.renderParents();\n if (parents.length) {\n return (\n <ul aria-label={this.bindings.i18n.t('printable-uri')}>{parents}</ul>\n );\n }\n\n return this.renderLink(\n <atomic-result-text field=\"printableUri\"></atomic-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AAC,QAAQ,EACpB,KAAK,CACN,CAAC;KACH;;;AAhJ4B;IAA5B,kBAAkB,EAAE;0DAA4B;AACxB;IAAxB,aAAa,EAAE;wDAAyB;;;;;","names":["Arrow"],"sources":["src/components/search/result-template-components/atomic-result-printable-uri/atomic-result-printable-uri.pcss?tag=atomic-result-printable-uri","src/components/search/result-template-components/atomic-result-printable-uri/atomic-result-printable-uri.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n\natomic-result-printable-uri {\n max-width: 100%;\n word-break: break-word;\n\n a,\n button {\n @apply text-primary;\n\n &:hover,\n &:focus-visible {\n text-decoration: underline;\n @apply text-primary;\n }\n\n &:focus {\n outline: none;\n }\n\n &:visited {\n @apply text-visited;\n }\n }\n\n ul {\n display: flex;\n flex-wrap: wrap;\n }\n\n li {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n\n a {\n display: inline-block;\n vertical-align: middle;\n max-width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n white-space: nowrap;\n &:last-child {\n white-space: normal;\n\n &::after {\n content: none;\n }\n }\n\n .result-printable-uri-separator {\n display: inline-block;\n margin: 0 0.5rem;\n vertical-align: middle;\n width: 0.75rem;\n height: 0.75rem;\n @apply text-neutral-dark;\n }\n }\n}\n","import {Schema, NumberValue} from '@coveo/bueno';\nimport {\n buildInteractiveResult,\n InteractiveResult,\n Result,\n} from '@coveo/headless';\nimport {Component, Element, h, Prop, State, VNode} from '@stencil/core';\nimport Arrow from '../../../../images/arrow-right.svg';\nimport {InitializeBindings} from '../../../../utils/initialization-utils';\nimport {FocusTargetController} from '../../../../utils/stencil-accessibility-utils';\nimport {parseXML} from '../../../../utils/utils';\nimport {getAttributesFromLinkSlotContent} from '../../../common/item-link/attributes-slot';\nimport {LinkWithItemAnalytics} from '../../../common/item-link/stencil-item-link';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\nimport {ResultContext} from '@/src/components/search/result-template-component-utils/context/stencil-result-template-decorators';\n\n/**\n * The `atomic-result-printable-uri` component displays the URI, or path, to access a result.\n *\n * @slot attributes - Lets you pass [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) down to anchor elements, overriding other attributes.\n * To be used exclusively in anchor elements, such as: `<a slot=\"attributes\" target=\"_blank\" download></a>`.\n */\n@Component({\n tag: 'atomic-result-printable-uri',\n styleUrl: 'atomic-result-printable-uri.pcss',\n shadow: false,\n})\nexport class AtomicResultPrintableUri {\n @InitializeBindings() public bindings!: Bindings;\n @ResultContext() private result!: Result;\n @Element() public host!: HTMLElement;\n\n @State() listExpanded = false;\n @State() error!: Error;\n\n /**\n * The maximum number of Uri parts to display. This has to be over the minimum of `3` in order to be effective. Putting `Infinity` will disable the ellipsis.\n */\n @Prop({reflect: true}) maxNumberOfParts = 5;\n\n private expandedPartFocus?: FocusTargetController;\n\n private interactiveResult!: InteractiveResult;\n private linkAttributes?: Attr[];\n\n private get focusTarget() {\n if (!this.expandedPartFocus) {\n this.expandedPartFocus = new FocusTargetController(this);\n }\n return this.expandedPartFocus;\n }\n\n public connectedCallback() {\n try {\n new Schema({\n maxNumberOfParts: new NumberValue({min: 3}),\n }).validate({maxNumberOfParts: this.maxNumberOfParts});\n } catch (error) {\n this.error = error as Error;\n }\n const slotName = 'attributes';\n this.linkAttributes = getAttributesFromLinkSlotContent(this.host, slotName);\n }\n\n public initialize() {\n this.interactiveResult = buildInteractiveResult(this.bindings.engine, {\n options: {result: this.result},\n });\n }\n\n private getIndexOfEllipsis(parentsCount: number) {\n const valuesToHide = Math.max(2, parentsCount - this.maxNumberOfParts);\n const valuesToShowBeforeEllipsis = parentsCount - valuesToHide - 1;\n return valuesToShowBeforeEllipsis;\n }\n\n private renderEllipsis() {\n return (\n <li>\n <button\n aria-label={this.bindings.i18n.t('collapsed-uri-parts')}\n onClick={(e) => {\n e.stopPropagation();\n this.focusTarget.focusOnNextTarget();\n this.listExpanded = true;\n }}\n >\n ...\n </button>\n {this.renderSeparator()}\n </li>\n );\n }\n\n private get allParents() {\n const parentsXml = parseXML(`${this.result.raw.parents}`);\n const parents = Array.from(parentsXml.getElementsByTagName('parent'));\n const ellipsisIndex = this.getIndexOfEllipsis(parents.length);\n return parents.map((parent, i) => {\n const name = parent.getAttribute('name');\n const uri = parent.getAttribute('uri')!;\n return (\n <li>\n {this.renderLink(name, uri, i === ellipsisIndex)}\n {i === parents.length - 1 ? null : this.renderSeparator()}\n </li>\n );\n });\n }\n\n private renderSeparator() {\n return (\n <atomic-icon\n class=\"result-printable-uri-separator\"\n icon={Arrow}\n role=\"separator\"\n ></atomic-icon>\n );\n }\n\n private renderParents() {\n const parents = this.allParents;\n if (this.listExpanded || parents.length <= this.maxNumberOfParts) {\n return parents;\n }\n\n return [\n parents.slice(0, this.getIndexOfEllipsis(parents.length)),\n this.renderEllipsis(),\n parents.slice(-1),\n ];\n }\n\n private renderLink(\n content: VNode | string | null,\n uri: string,\n shouldSetTarget: boolean\n ) {\n return (\n <LinkWithItemAnalytics\n href={uri}\n title={typeof content === 'string' ? content : undefined}\n onSelect={() => this.interactiveResult.select()}\n onBeginDelayedSelect={() => this.interactiveResult.beginDelayedSelect()}\n onCancelPendingSelect={() =>\n this.interactiveResult.cancelPendingSelect()\n }\n attributes={this.linkAttributes}\n ref={\n shouldSetTarget\n ? (el?: HTMLAnchorElement) => this.focusTarget.setTarget(el)\n : undefined\n }\n >\n {content}\n </LinkWithItemAnalytics>\n );\n }\n\n public render() {\n const parents = this.renderParents();\n if (parents.length) {\n return (\n <ul aria-label={this.bindings.i18n.t('printable-uri')}>{parents}</ul>\n );\n }\n\n return this.renderLink(\n <atomic-result-text field=\"printableUri\"></atomic-result-text>,\n this.result.clickUri,\n false\n );\n }\n}\n"],"version":3}
@@ -7,10 +7,10 @@ import { a as StorageItems, S as SafeStorage } from './local-storage-utils-41026
7
7
  import { u as updateBreakpoints } from './replace-breakpoint-utils-13ff9ca5.js';
8
8
  import { A as AriaLiveRegion } from './stencil-accessibility-utils-ae75044b.js';
9
9
  import { o as once, r as randomID, h as spreadProperties, g as isFocusingOut } from './utils-6400ebde.js';
10
- import { a as SearchSlimIcon, b as SearchTextArea, S as SuggestionManager, c as SearchBoxWrapper } from './stencil-suggestion-manager-c1c4298e.js';
10
+ import { a as SearchSlimIcon, b as SearchTextArea, S as SuggestionManager, c as SearchBoxWrapper } from './stencil-suggestion-manager-3d2eea75.js';
11
11
  import { B as Button } from './stencil-button-49254c75.js';
12
12
  import { a as elementHasQuery } from './suggestions-utils-591559a0.js';
13
- import { a as getDefaultSlotFromHost } from './slot-utils-dcf4fc27.js';
13
+ import { a as getDefaultSlotContent } from './slot-utils-3a3874a2.js';
14
14
  import './dom-utils-f6086cd3.js';
15
15
  import './event-utils-8de63ec3.js';
16
16
  import './init-queue-fbe942c3.js';
@@ -107,6 +107,7 @@ const AtomicSearchBox = class {
107
107
  onInput: (e) => this.onInput(e.target.value),
108
108
  onKeyDown: (e) => this.onKeyDown(e),
109
109
  onClear: () => {
110
+ this.announceClearSearchBoxToScreenReader();
110
111
  this.searchBox.clear();
111
112
  this.suggestionManager.clearSuggestions();
112
113
  },
@@ -415,6 +416,9 @@ const AtomicSearchBox = class {
415
416
  this.suggestionsAriaMessage = ariaLabel;
416
417
  }
417
418
  }
419
+ announceClearSearchBoxToScreenReader() {
420
+ this.suggestionsAriaMessage = this.bindings.i18n.t("search-box-cleared");
421
+ }
418
422
  announceNewSuggestionsToScreenReader() {
419
423
  const elsLength = this.suggestionManager.allSuggestionElements.filter(elementHasQuery).length;
420
424
  this.searchBoxAriaMessage = elsLength
@@ -427,7 +431,7 @@ const AtomicSearchBox = class {
427
431
  : this.bindings.i18n.t('query-suggestions-unavailable');
428
432
  }
429
433
  renderSlotContent() {
430
- const hasDefaultSlot = !!getDefaultSlotFromHost(this.host);
434
+ const hasDefaultSlot = getDefaultSlotContent(this.host).length > 0;
431
435
  if (hasDefaultSlot) {
432
436
  return h("slot", null);
433
437
  }
@@ -443,14 +447,14 @@ const AtomicSearchBox = class {
443
447
  if (!this.suggestionManager.suggestions.length) {
444
448
  this.registerSearchboxSuggestionEvents();
445
449
  }
446
- return (h(Host, { key: '61c430e9b3d8be2b3f965d518023dae529400e43' }, this.renderAbsolutePositionSpacer(), [
447
- h(SearchBoxWrapper, { key: '0526df044c47d640c73276b87dc3ed120dc0881e', disabled: isDisabled, onFocusout: (event) => {
450
+ return (h(Host, { key: '8b3603e69827be263a7ba10f191e25f7bb577175' }, this.renderAbsolutePositionSpacer(), [
451
+ h(SearchBoxWrapper, { key: 'ef87514e37b2ee22bed81ca385be14eb099dc61b', disabled: isDisabled, onFocusout: (event) => {
448
452
  if (!isFocusingOut(event)) {
449
453
  return;
450
454
  }
451
455
  this.suggestionManager.clearSuggestions();
452
456
  this.isExpanded = false;
453
- } }, this.renderTextBox(searchLabel), h(SubmitButton, { key: '25d055ef5be19d3cf54ab8ec7d08af5e483e3d2b', bindings: this.bindings, disabled: isDisabled, onClick: () => {
457
+ } }, this.renderTextBox(searchLabel), h(SubmitButton, { key: '356687da8d6f972abf328727cd92834a77435223', bindings: this.bindings, disabled: isDisabled, onClick: () => {
454
458
  this.searchBox.submit();
455
459
  this.suggestionManager.clearSuggestions();
456
460
  } }), this.renderSuggestions()),