@empathyco/x-components 6.0.0-alpha.6 → 6.0.0-alpha.61

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 (833) hide show
  1. package/CHANGELOG.md +531 -0
  2. package/core/index.js +9 -1
  3. package/core/index.js.map +1 -1
  4. package/design-system/deprecated-full-theme.css +2371 -2371
  5. package/docs/API-reference/api/x-adapter-platform.md +12 -0
  6. package/docs/API-reference/api/x-adapter-platform.nextqueriesrelatedpromptsschema.md +11 -0
  7. package/docs/API-reference/api/x-adapter-platform.platformadapter.relatedprompts.md +1 -1
  8. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.md +23 -0
  9. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.nextqueries.md +11 -0
  10. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.suggestiontext.md +11 -0
  11. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.tagging.md +11 -0
  12. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.type.md +11 -0
  13. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.md +22 -0
  14. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplay.md +11 -0
  15. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplayadd2cart.md +11 -0
  16. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplayclick.md +11 -0
  17. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsrequest.md +15 -0
  18. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsresponse.data.md +13 -0
  19. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsresponse.md +21 -0
  20. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsresponse.status.md +11 -0
  21. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.md +22 -0
  22. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.nextqueries.md +11 -0
  23. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.toolingdisplay.md +11 -0
  24. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.toolingdisplayclick.md +11 -0
  25. package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.catalog.md +6 -0
  26. package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.md +1 -1
  27. package/docs/API-reference/api/x-adapter-platform.relatedpromptschema.md +13 -0
  28. package/docs/API-reference/api/x-adapter-platform.relatedpromptsendpointadapter.md +13 -0
  29. package/docs/API-reference/api/x-adapter-platform.relatedpromptsrequestmapper.md +13 -0
  30. package/docs/API-reference/api/x-adapter-platform.relatedpromptsrequestschema.md +13 -0
  31. package/docs/API-reference/api/x-adapter-platform.relatedpromptsresponsemapper.md +13 -0
  32. package/docs/API-reference/api/x-adapter-platform.relatedpromptsresponseschema.md +13 -0
  33. package/docs/API-reference/api/x-components.animationprop.md +6 -1
  34. package/docs/API-reference/api/x-components.bannerslist.md +3 -3
  35. package/docs/API-reference/api/x-components.baseaddtocart.md +1 -0
  36. package/docs/API-reference/api/x-components.basedropdown.md +5 -5
  37. package/docs/API-reference/api/x-components.baseeventsmodal.md +2 -2
  38. package/docs/API-reference/api/x-components.basegrid.md +3 -3
  39. package/docs/API-reference/api/x-components.baseheadertogglepanel.md +5 -5
  40. package/docs/API-reference/api/x-components.baseidmodal.md +2 -2
  41. package/docs/API-reference/api/x-components.baseidtogglepanel.md +5 -5
  42. package/docs/API-reference/api/x-components.basemodal.md +10 -10
  43. package/docs/API-reference/api/x-components.baseresultimage.md +9 -9
  44. package/docs/API-reference/api/x-components.baseslider.md +70 -0
  45. package/docs/API-reference/api/x-components.basesuggestions.md +3 -3
  46. package/docs/API-reference/api/x-components.baseswitch.md +1 -1
  47. package/docs/API-reference/api/x-components.basetabspanel.md +8 -8
  48. package/docs/API-reference/api/x-components.baseteleport.md +21 -0
  49. package/docs/API-reference/api/x-components.basetogglepanel.md +3 -3
  50. package/docs/API-reference/api/x-components.basevariablecolumngrid.md +3 -3
  51. package/docs/API-reference/api/x-components.cancelfetchandsaverelatedprompts.md +13 -0
  52. package/docs/API-reference/api/x-components.configmutations.config.md +11 -0
  53. package/docs/API-reference/api/x-components.configmutations.md +29 -0
  54. package/docs/API-reference/api/x-components.configmutations.mergeconfig.md +24 -0
  55. package/docs/API-reference/api/x-components.configmutations.setconfig.md +24 -0
  56. package/docs/API-reference/api/x-components.createrelatedtagsquerygetter.md +26 -0
  57. package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.getrelatedtags.md +13 -0
  58. package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.md +20 -0
  59. package/docs/API-reference/api/x-components.createtrackrelatedprompttoolingdisplayclickwire.md +19 -0
  60. package/docs/API-reference/api/x-components.createtracktoolingadd2cartwire.md +19 -0
  61. package/docs/API-reference/api/x-components.createtracktoolingdisplaywire.md +19 -0
  62. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice._constructor_.md → x-components.defaultexternaltaggingservice._constructor_.md} +3 -3
  63. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.add_to_cart_id_key.md +13 -0
  64. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.instance.md +13 -0
  65. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.localstorageservice.md +11 -0
  66. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.md +43 -0
  67. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.movetosessionstorage.md → x-components.defaultexternaltaggingservice.movetosessionstorage.md} +2 -2
  68. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.result_clicked_id_key.md +13 -0
  69. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.sessionstorageservice.md +11 -0
  70. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagekey.md +11 -0
  71. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagettlms.md +11 -0
  72. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.store.md → x-components.defaultexternaltaggingservice.store.md} +2 -2
  73. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storeaddtocart.md +24 -0
  74. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.storeresultclicked.md → x-components.defaultexternaltaggingservice.storeresultclicked.md} +3 -3
  75. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.trackaddtocart.md → x-components.defaultexternaltaggingservice.trackaddtocart.md} +3 -3
  76. package/docs/API-reference/api/x-components.displayclickprovider.md +66 -0
  77. package/docs/API-reference/api/x-components.empathize.md +6 -6
  78. package/docs/API-reference/api/x-components.empathizemutations.md +1 -1
  79. package/docs/API-reference/api/x-components.externaltaggingservice.md +23 -0
  80. package/docs/API-reference/api/{x-components.pdpaddtocartservice.movetosessionstorage.md → x-components.externaltaggingservice.movetosessionstorage.md} +2 -2
  81. package/docs/API-reference/api/x-components.externaltaggingservice.storeaddtocart.md +24 -0
  82. package/docs/API-reference/api/{x-components.pdpaddtocartservice.storeresultclicked.md → x-components.externaltaggingservice.storeresultclicked.md} +3 -3
  83. package/docs/API-reference/api/{x-components.pdpaddtocartservice.trackaddtocart.md → x-components.externaltaggingservice.trackaddtocart.md} +3 -3
  84. package/docs/API-reference/api/x-components.facets.md +3 -3
  85. package/docs/API-reference/api/x-components.facetsmutations.md +1 -1
  86. package/docs/API-reference/api/x-components.featurelocation.md +1 -1
  87. package/docs/API-reference/api/x-components.fetchandsaverelatedprompts.md +13 -0
  88. package/docs/API-reference/api/x-components.fetchrelatedprompts.md +13 -0
  89. package/docs/API-reference/api/x-components.filterslist.md +3 -3
  90. package/docs/API-reference/api/x-components.globalxbus.md +14 -0
  91. package/docs/API-reference/api/x-components.hierarchicalfilter.md +9 -2
  92. package/docs/API-reference/api/x-components.historyqueriesmutations.md +1 -1
  93. package/docs/API-reference/api/x-components.historyqueriesstate.md +1 -1
  94. package/docs/API-reference/api/x-components.identifierresults.md +3 -3
  95. package/docs/API-reference/api/x-components.identifierresultsmutations.md +1 -1
  96. package/docs/API-reference/api/x-components.identifierresultsstate.md +1 -1
  97. package/docs/API-reference/api/x-components.installxoptions.domelement.md +1 -1
  98. package/docs/API-reference/api/x-components.installxoptions.installextraplugins.md +2 -2
  99. package/docs/API-reference/api/x-components.installxoptions.md +1 -1
  100. package/docs/API-reference/api/x-components.itemslist.md +3 -3
  101. package/docs/API-reference/api/x-components.mainmodal.md +2 -2
  102. package/docs/API-reference/api/x-components.md +39 -3
  103. package/docs/API-reference/api/x-components.mergeconfig.md +27 -0
  104. package/docs/API-reference/api/x-components.multicolumnmaxwidthlayout.md +5 -5
  105. package/docs/API-reference/api/x-components.myhistory.md +3 -3
  106. package/docs/API-reference/api/x-components.nextqueriesgroup.md +22 -0
  107. package/docs/API-reference/api/x-components.nextqueriesgroup.modelname.md +11 -0
  108. package/docs/API-reference/api/x-components.nextqueriesgroup.nextqueries.md +11 -0
  109. package/docs/API-reference/api/x-components.nextquerieslist.md +3 -3
  110. package/docs/API-reference/api/x-components.nextqueriesmutations.md +1 -1
  111. package/docs/API-reference/api/x-components.nextqueriesstate.md +1 -1
  112. package/docs/API-reference/api/x-components.pageselector.md +80 -0
  113. package/docs/API-reference/api/x-components.partialresultslist.md +3 -3
  114. package/docs/API-reference/api/x-components.popularsearchesmutations.md +1 -1
  115. package/docs/API-reference/api/x-components.promotedslist.md +3 -3
  116. package/docs/API-reference/api/x-components.queriespreviewmutations.md +1 -1
  117. package/docs/API-reference/api/x-components.queryfeature.md +1 -1
  118. package/docs/API-reference/api/x-components.querymutations.md +20 -0
  119. package/docs/API-reference/api/x-components.querymutations.setquery.md +24 -0
  120. package/docs/API-reference/api/x-components.querypreviewlist.md +3 -3
  121. package/docs/API-reference/api/x-components.querystate.md +20 -0
  122. package/docs/API-reference/api/x-components.querystate.query.md +13 -0
  123. package/docs/API-reference/api/x-components.querysuggestionsmutations.md +1 -1
  124. package/docs/API-reference/api/x-components.querysuggestionsstate.md +1 -1
  125. package/docs/API-reference/api/x-components.recommendations.md +3 -3
  126. package/docs/API-reference/api/x-components.recommendationsmutations.md +1 -1
  127. package/docs/API-reference/api/x-components.relatedprompt.md +33 -0
  128. package/docs/API-reference/api/x-components.relatedpromptsactioncontext.md +15 -0
  129. package/docs/API-reference/api/x-components.relatedpromptsactions.cancelfetchandsaverelatedprompts.md +17 -0
  130. package/docs/API-reference/api/x-components.relatedpromptsactions.fetchandsaverelatedprompts.md +24 -0
  131. package/docs/API-reference/api/x-components.relatedpromptsactions.fetchrelatedprompts.md +24 -0
  132. package/docs/API-reference/api/x-components.relatedpromptsactions.md +23 -0
  133. package/docs/API-reference/api/x-components.relatedpromptsactions.seturlparams.md +24 -0
  134. package/docs/API-reference/api/x-components.relatedpromptsgetters.md +21 -0
  135. package/docs/API-reference/api/x-components.relatedpromptsgetters.query.md +13 -0
  136. package/docs/API-reference/api/x-components.relatedpromptsgetters.request.md +13 -0
  137. package/docs/API-reference/api/x-components.relatedpromptslist.md +72 -0
  138. package/docs/API-reference/api/x-components.relatedpromptsmutations.md +27 -0
  139. package/docs/API-reference/api/x-components.relatedpromptsmutations.resetrelatedpromptsstate.md +17 -0
  140. package/docs/API-reference/api/x-components.relatedpromptsmutations.resetselectedprompt.md +17 -0
  141. package/docs/API-reference/api/x-components.relatedpromptsmutations.setparams.md +24 -0
  142. package/docs/API-reference/api/x-components.relatedpromptsmutations.setrelatedpromptsproducts.md +24 -0
  143. package/docs/API-reference/api/x-components.relatedpromptsmutations.setrelatedpromptsrelatedtags.md +24 -0
  144. package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedprompt.md +24 -0
  145. package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedquery.md +24 -0
  146. package/docs/API-reference/api/x-components.relatedpromptsstate.md +25 -0
  147. package/docs/API-reference/api/x-components.relatedpromptsstate.params.md +13 -0
  148. package/docs/API-reference/api/x-components.relatedpromptsstate.relatedprompts.md +13 -0
  149. package/docs/API-reference/api/x-components.relatedpromptsstate.relatedtags.md +13 -0
  150. package/docs/API-reference/api/x-components.relatedpromptsstate.selectedprompt.md +13 -0
  151. package/docs/API-reference/api/x-components.relatedpromptsstate.selectedquery.md +13 -0
  152. package/docs/API-reference/api/x-components.relatedpromptstaglist.md +72 -0
  153. package/docs/API-reference/api/x-components.relatedpromptsxevents.md +25 -0
  154. package/docs/API-reference/api/x-components.relatedpromptsxevents.relatedpromptsrequestupdated.md +13 -0
  155. package/docs/API-reference/api/x-components.relatedpromptsxevents.selectedrelatedpromptchanged.md +13 -0
  156. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptadd2cart.md +13 -0
  157. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptresult.md +13 -0
  158. package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedprompt.md +13 -0
  159. package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedpromptquery.md +13 -0
  160. package/docs/API-reference/api/x-components.relatedpromptsxmodule.md +13 -0
  161. package/docs/API-reference/api/x-components.relatedpromptsxstoremodule.md +15 -0
  162. package/docs/API-reference/api/x-components.relatedtags.md +3 -3
  163. package/docs/API-reference/api/x-components.relatedtagsmutations.md +1 -1
  164. package/docs/API-reference/api/x-components.relatedtagsstate.md +1 -1
  165. package/docs/API-reference/api/x-components.resultfeature.md +1 -1
  166. package/docs/API-reference/api/x-components.resultslist.md +3 -3
  167. package/docs/API-reference/api/x-components.scrolltotop.md +5 -5
  168. package/docs/API-reference/api/x-components.searchboxmutations.md +1 -1
  169. package/docs/API-reference/api/x-components.searchboxstate.md +1 -1
  170. package/docs/API-reference/api/x-components.searchconfig.md +1 -0
  171. package/docs/API-reference/api/x-components.searchconfig.pagemode.md +11 -0
  172. package/docs/API-reference/api/x-components.searchinputplaceholder.md +3 -3
  173. package/docs/API-reference/api/x-components.searchmutations.md +2 -1
  174. package/docs/API-reference/api/x-components.searchmutations.setstats.md +24 -0
  175. package/docs/API-reference/api/x-components.searchstate.md +2 -1
  176. package/docs/API-reference/api/x-components.searchstate.stats.md +13 -0
  177. package/docs/API-reference/api/x-components.searchxevents.md +1 -0
  178. package/docs/API-reference/api/x-components.searchxevents.userselectedapage.md +13 -0
  179. package/docs/API-reference/api/x-components.selectedfilterslist.md +3 -3
  180. package/docs/API-reference/api/x-components.semanticqueriesgetters.md +1 -0
  181. package/docs/API-reference/api/x-components.semanticqueriesgetters.query.md +13 -0
  182. package/docs/API-reference/api/x-components.semanticqueriesmutations.md +2 -1
  183. package/docs/API-reference/api/x-components.semanticqueriesmutations.setsemanticqueriesrelatedtags.md +24 -0
  184. package/docs/API-reference/api/x-components.semanticqueriesstate.md +2 -1
  185. package/docs/API-reference/api/x-components.semanticqueriesstate.relatedtags.md +13 -0
  186. package/docs/API-reference/api/x-components.setconfig.md +27 -0
  187. package/docs/API-reference/api/x-components.setquery.md +25 -0
  188. package/docs/API-reference/api/x-components.seturlprompt.md +13 -0
  189. package/docs/API-reference/api/x-components.simplefilter.md +7 -0
  190. package/docs/API-reference/api/x-components.singlecolumnlayout.md +3 -3
  191. package/docs/API-reference/api/x-components.slidingpanel.md +13 -5
  192. package/docs/API-reference/api/x-components.snippetcallbacks.md +7 -0
  193. package/docs/API-reference/api/x-components.sortdropdown.md +1 -1
  194. package/docs/API-reference/api/x-components.tagging.md +6 -6
  195. package/docs/API-reference/api/x-components.taggingconfig.md +2 -2
  196. package/docs/API-reference/api/{x-components.taggingconfig.clickedresultstoragekey.md → x-components.taggingconfig.storagekey.md} +3 -3
  197. package/docs/API-reference/api/x-components.taggingconfig.storagettlms.md +13 -0
  198. package/docs/API-reference/api/x-components.taggingmutations.md +1 -1
  199. package/docs/API-reference/api/x-components.taggingxevents.md +1 -1
  200. package/docs/API-reference/api/x-components.taggingxevents.resulturltrackingenabled.md +1 -1
  201. package/docs/API-reference/api/x-components.trackrelatedprompttoolingdisplayclickwire.md +13 -0
  202. package/docs/API-reference/api/x-components.tracktoolingadd2cartwire.md +13 -0
  203. package/docs/API-reference/api/x-components.tracktoolingdisplayclickedwire.md +13 -0
  204. package/docs/API-reference/api/x-components.typing.md +13 -0
  205. package/docs/API-reference/api/x-components.typingoptions.md +22 -0
  206. package/docs/API-reference/api/x-components.typingoptions.speed.md +13 -0
  207. package/docs/API-reference/api/x-components.typingoptions.targetattr.md +18 -0
  208. package/docs/API-reference/api/x-components.typingoptions.text.md +13 -0
  209. package/docs/API-reference/api/x-components.urlmutations.md +2 -1
  210. package/docs/API-reference/api/x-components.urlmutations.setprompt.md +24 -0
  211. package/docs/API-reference/api/x-components.urlparams.md +1 -0
  212. package/docs/API-reference/api/x-components.urlparams.prompt.md +11 -0
  213. package/docs/API-reference/api/x-components.urlstate.md +1 -1
  214. package/docs/API-reference/api/x-components.usealiasapi.md +1 -0
  215. package/docs/API-reference/api/x-components.usealiasapi.pricestats.md +16 -0
  216. package/docs/API-reference/api/x-components.xeventstypes.md +3 -3
  217. package/docs/API-reference/api/x-components.xmodulestree.md +1 -0
  218. package/docs/API-reference/api/x-components.xmodulestree.relatedprompts.md +11 -0
  219. package/docs/API-reference/api/x-types.md +2 -0
  220. package/docs/API-reference/api/x-types.relatedprompt.md +4 -1
  221. package/docs/API-reference/api/x-types.relatedprompt.nextqueries.md +1 -1
  222. package/docs/API-reference/api/x-types.relatedprompt.relatedpromptnextqueries.md +13 -0
  223. package/docs/API-reference/api/x-types.relatedprompt.tagging.md +17 -0
  224. package/docs/API-reference/api/x-types.relatedprompt.toolingdisplaytagging.md +13 -0
  225. package/docs/API-reference/api/x-types.relatedpromptnextquery.md +23 -0
  226. package/docs/API-reference/api/x-types.relatedpromptnextquery.query.md +13 -0
  227. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayadd2carttagging.md +13 -0
  228. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayclicktagging.md +13 -0
  229. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplaytagging.md +13 -0
  230. package/docs/API-reference/api/x-types.searchresponse.md +1 -0
  231. package/docs/API-reference/api/x-types.searchresponse.stats.md +11 -0
  232. package/docs/API-reference/api/x-types.stats.md +22 -0
  233. package/docs/API-reference/api/x-types.stats.price.md +14 -0
  234. package/docs/API-reference/components/common/result/x-components.base-result-image.md +2 -2
  235. package/docs/API-reference/components/common/x-components.base-slider.md +189 -0
  236. package/docs/API-reference/components/common/x-components.base-teleport.md +19 -0
  237. package/docs/API-reference/components/common/x-components.display-click-provider.md +17 -0
  238. package/docs/API-reference/components/common/x-components.items-list.md +1 -1
  239. package/docs/API-reference/components/common/x-components.page-selector.md +136 -0
  240. package/docs/API-reference/components/common/x-components.sliding-panel.md +7 -7
  241. package/docs/API-reference/components/facets/x-components.facets/facets.md +1 -1
  242. package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +1 -1
  243. package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +22 -0
  244. package/docs/API-reference/components/related-prompts/x-components.related-prompts-list.md +196 -0
  245. package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +32 -0
  246. package/docs/API-reference/components/search/x-components.results-list.md +1 -1
  247. package/docs/API-reference/components/tagging/x-components.tagging.md +15 -16
  248. package/js/components/animations/fade-and-slide.vue.js +1 -2
  249. package/js/components/animations/fade-and-slide.vue.js.map +1 -1
  250. package/js/components/base-dropdown.vue.js +1 -3
  251. package/js/components/base-dropdown.vue.js.map +1 -1
  252. package/js/components/base-dropdown.vue2.js +1 -7
  253. package/js/components/base-dropdown.vue2.js.map +1 -1
  254. package/js/components/base-event-button.vue.js +1 -2
  255. package/js/components/base-event-button.vue.js.map +1 -1
  256. package/js/components/base-grid.vue.js +11 -18
  257. package/js/components/base-grid.vue.js.map +1 -1
  258. package/js/components/base-grid.vue2.js.map +1 -1
  259. package/js/components/base-grid.vue3.js +1 -1
  260. package/js/components/base-keyboard-navigation.vue.js +1 -2
  261. package/js/components/base-keyboard-navigation.vue.js.map +1 -1
  262. package/js/components/base-rating.vue.js +1 -3
  263. package/js/components/base-rating.vue.js.map +1 -1
  264. package/js/components/base-slider.vue.js +65 -0
  265. package/js/components/base-slider.vue.js.map +1 -0
  266. package/js/components/base-slider.vue2.js +109 -0
  267. package/js/components/base-slider.vue2.js.map +1 -0
  268. package/js/components/base-slider.vue3.js +7 -0
  269. package/js/components/base-slider.vue3.js.map +1 -0
  270. package/js/components/base-switch.vue.js.map +1 -1
  271. package/js/components/base-switch.vue2.js +3 -7
  272. package/js/components/base-switch.vue2.js.map +1 -1
  273. package/js/components/base-teleport.vue.js +17 -0
  274. package/js/components/base-teleport.vue.js.map +1 -0
  275. package/js/components/base-teleport.vue2.js +14 -0
  276. package/js/components/base-teleport.vue2.js.map +1 -0
  277. package/js/components/base-teleport.vue3.js +7 -0
  278. package/js/components/base-teleport.vue3.js.map +1 -0
  279. package/js/components/base-variable-column-grid.vue.js +1 -2
  280. package/js/components/base-variable-column-grid.vue.js.map +1 -1
  281. package/js/components/column-picker/base-column-picker-dropdown.vue.js +1 -3
  282. package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
  283. package/js/components/column-picker/base-column-picker-list.vue.js +1 -3
  284. package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
  285. package/js/components/display-click-provider.vue.js +74 -0
  286. package/js/components/display-click-provider.vue.js.map +1 -0
  287. package/js/components/display-click-provider.vue2.js +6 -0
  288. package/js/components/display-click-provider.vue2.js.map +1 -0
  289. package/js/components/filters/labels/base-rating-filter-label.vue.js +1 -3
  290. package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
  291. package/js/components/icons/cross-tiny.vue.js +2 -2
  292. package/js/components/icons/plus.vue.js +2 -2
  293. package/js/components/items-list.vue.js +1 -2
  294. package/js/components/items-list.vue.js.map +1 -1
  295. package/js/components/items-list.vue2.js +2 -2
  296. package/js/components/items-list.vue2.js.map +1 -1
  297. package/js/components/layouts/fixed-header-and-asides-layout.vue.js +1 -7
  298. package/js/components/layouts/fixed-header-and-asides-layout.vue.js.map +1 -1
  299. package/js/components/layouts/multi-column-max-width-layout.vue.js +1 -9
  300. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  301. package/js/components/layouts/single-column-layout.vue.js +1 -9
  302. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  303. package/js/components/modals/base-events-modal-close.vue.js +1 -2
  304. package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
  305. package/js/components/modals/base-events-modal-open.vue.js +1 -2
  306. package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
  307. package/js/components/modals/base-id-modal-close.vue.js +1 -2
  308. package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
  309. package/js/components/modals/base-id-modal-open.vue.js +1 -2
  310. package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
  311. package/js/components/modals/base-modal.vue.js +1 -2
  312. package/js/components/modals/base-modal.vue.js.map +1 -1
  313. package/js/components/modals/base-modal.vue2.js +13 -6
  314. package/js/components/modals/base-modal.vue2.js.map +1 -1
  315. package/js/components/page-loader-button.vue.js +8 -10
  316. package/js/components/page-loader-button.vue.js.map +1 -1
  317. package/js/components/page-loader-button.vue2.js.map +1 -1
  318. package/js/components/page-loader-button.vue3.js +7 -0
  319. package/js/components/page-loader-button.vue3.js.map +1 -0
  320. package/js/components/page-selector.vue.js +78 -0
  321. package/js/components/page-selector.vue.js.map +1 -0
  322. package/js/components/page-selector.vue2.js +128 -0
  323. package/js/components/page-selector.vue2.js.map +1 -0
  324. package/js/components/page-selector.vue3.js +7 -0
  325. package/js/components/page-selector.vue3.js.map +1 -0
  326. package/js/components/panels/base-header-toggle-panel.vue.js +1 -5
  327. package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
  328. package/js/components/panels/base-id-toggle-panel-button.vue.js +1 -2
  329. package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
  330. package/js/components/panels/base-id-toggle-panel.vue.js +1 -2
  331. package/js/components/panels/base-id-toggle-panel.vue.js.map +1 -1
  332. package/js/components/panels/base-tabs-panel.vue.js +1 -4
  333. package/js/components/panels/base-tabs-panel.vue.js.map +1 -1
  334. package/js/components/panels/base-toggle-panel.vue.js +1 -2
  335. package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
  336. package/js/components/result/base-result-add-to-cart.vue.js +3 -3
  337. package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
  338. package/js/components/result/base-result-add-to-cart.vue2.js +19 -5
  339. package/js/components/result/base-result-add-to-cart.vue2.js.map +1 -1
  340. package/js/components/result/base-result-current-price.vue.js +1 -2
  341. package/js/components/result/base-result-current-price.vue.js.map +1 -1
  342. package/js/components/result/base-result-image.vue.js +39 -59
  343. package/js/components/result/base-result-image.vue.js.map +1 -1
  344. package/js/components/result/base-result-image.vue2.js +5 -5
  345. package/js/components/result/base-result-image.vue2.js.map +1 -1
  346. package/js/components/result/base-result-link.vue.js +1 -2
  347. package/js/components/result/base-result-link.vue.js.map +1 -1
  348. package/js/components/result/base-result-previous-price.vue.js +1 -2
  349. package/js/components/result/base-result-previous-price.vue.js.map +1 -1
  350. package/js/components/result/base-result-rating.vue.js +1 -4
  351. package/js/components/result/base-result-rating.vue.js.map +1 -1
  352. package/js/components/result/result-variant-selector.vue.js +1 -3
  353. package/js/components/result/result-variant-selector.vue.js.map +1 -1
  354. package/js/components/sliding-panel.vue.js +3 -6
  355. package/js/components/sliding-panel.vue.js.map +1 -1
  356. package/js/components/sliding-panel.vue2.js +2 -2
  357. package/js/components/sliding-panel.vue2.js.map +1 -1
  358. package/js/components/suggestions/base-suggestion.vue.js +1 -2
  359. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  360. package/js/components/suggestions/base-suggestions.vue.js +1 -2
  361. package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
  362. package/js/composables/use-alias-api.js +4 -1
  363. package/js/composables/use-alias-api.js.map +1 -1
  364. package/js/composables/use-getter.js +1 -1
  365. package/js/composables/use-state.js +1 -1
  366. package/js/directives/typing.js +58 -0
  367. package/js/directives/typing.js.map +1 -0
  368. package/js/index.js +21 -4
  369. package/js/index.js.map +1 -1
  370. package/js/types/animation-prop.js +5 -0
  371. package/js/types/animation-prop.js.map +1 -1
  372. package/js/x-installer/x-installer/x-installer.js +3 -3
  373. package/js/x-installer/x-installer/x-installer.js.map +1 -1
  374. package/js/x-modules/device/store/emitters.js +1 -0
  375. package/js/x-modules/device/store/emitters.js.map +1 -1
  376. package/js/x-modules/empathize/components/empathize.vue.js +1 -2
  377. package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
  378. package/js/x-modules/empathize/components/empathize.vue2.js +10 -3
  379. package/js/x-modules/empathize/components/empathize.vue2.js.map +1 -1
  380. package/js/x-modules/empathize/store/emitters.js +1 -0
  381. package/js/x-modules/empathize/store/emitters.js.map +1 -1
  382. package/js/x-modules/experience-controls/store/emitters.js +1 -0
  383. package/js/x-modules/experience-controls/store/emitters.js.map +1 -1
  384. package/js/x-modules/extra-params/components/extra-params.vue.js +1 -1
  385. package/js/x-modules/extra-params/components/extra-params.vue.js.map +1 -1
  386. package/js/x-modules/extra-params/store/emitters.js +1 -0
  387. package/js/x-modules/extra-params/store/emitters.js.map +1 -1
  388. package/js/x-modules/facets/components/facets/facets.vue.js +20 -33
  389. package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
  390. package/js/x-modules/facets/components/facets/facets.vue2.js +2 -2
  391. package/js/x-modules/facets/components/facets/facets.vue2.js.map +1 -1
  392. package/js/x-modules/facets/components/filters/all-filter.vue.js +1 -2
  393. package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
  394. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +1 -6
  395. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
  396. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +1 -3
  397. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
  398. package/js/x-modules/facets/components/filters/number-range-filter.vue.js +1 -3
  399. package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
  400. package/js/x-modules/facets/components/filters/simple-filter.vue.js +1 -3
  401. package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
  402. package/js/x-modules/facets/components/lists/filters-list.vue.js +1 -2
  403. package/js/x-modules/facets/components/lists/filters-list.vue.js.map +1 -1
  404. package/js/x-modules/facets/components/lists/filters-search.vue.js +1 -3
  405. package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
  406. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +11 -18
  407. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
  408. package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js +2 -2
  409. package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js.map +1 -1
  410. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +1 -4
  411. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  412. package/js/x-modules/history-queries/components/clear-history-queries.vue.js +1 -2
  413. package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
  414. package/js/x-modules/history-queries/components/history-queries.vue.js +1 -10
  415. package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
  416. package/js/x-modules/history-queries/components/history-query.vue.js +1 -6
  417. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  418. package/js/x-modules/history-queries/components/my-history.vue.js +1 -4
  419. package/js/x-modules/history-queries/components/my-history.vue.js.map +1 -1
  420. package/js/x-modules/history-queries/components/remove-history-query.vue.js +1 -2
  421. package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
  422. package/js/x-modules/history-queries/store/emitters.js +1 -0
  423. package/js/x-modules/history-queries/store/emitters.js.map +1 -1
  424. package/js/x-modules/identifier-results/components/identifier-results.vue.js +1 -2
  425. package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
  426. package/js/x-modules/identifier-results/store/emitters.js +1 -0
  427. package/js/x-modules/identifier-results/store/emitters.js.map +1 -1
  428. package/js/x-modules/next-queries/components/next-queries.vue.js +1 -7
  429. package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
  430. package/js/x-modules/next-queries/components/next-query-preview.vue.js +1 -3
  431. package/js/x-modules/next-queries/components/next-query-preview.vue.js.map +1 -1
  432. package/js/x-modules/next-queries/components/next-query.vue.js +1 -4
  433. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  434. package/js/x-modules/next-queries/store/emitters.js +1 -0
  435. package/js/x-modules/next-queries/store/emitters.js.map +1 -1
  436. package/js/x-modules/popular-searches/components/popular-search.vue.js +1 -4
  437. package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
  438. package/js/x-modules/popular-searches/components/popular-searches.vue.js +1 -7
  439. package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
  440. package/js/x-modules/queries-preview/components/query-preview-button.vue.js +1 -2
  441. package/js/x-modules/queries-preview/components/query-preview-button.vue.js.map +1 -1
  442. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js +8 -0
  443. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js.map +1 -1
  444. package/js/x-modules/queries-preview/components/query-preview-list.vue.js.map +1 -1
  445. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js +15 -2
  446. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js.map +1 -1
  447. package/js/x-modules/queries-preview/components/query-preview.vue.js +1 -2
  448. package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
  449. package/js/x-modules/queries-preview/components/query-preview.vue2.js +9 -1
  450. package/js/x-modules/queries-preview/components/query-preview.vue2.js.map +1 -1
  451. package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js +2 -1
  452. package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js.map +1 -1
  453. package/js/x-modules/queries-preview/store/emitters.js +1 -0
  454. package/js/x-modules/queries-preview/store/emitters.js.map +1 -1
  455. package/js/x-modules/queries-preview/store/module.js +1 -1
  456. package/js/x-modules/queries-preview/store/module.js.map +1 -1
  457. package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js +6 -4
  458. package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js.map +1 -1
  459. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +1 -4
  460. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
  461. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +1 -7
  462. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
  463. package/js/x-modules/query-suggestions/store/emitters.js +1 -0
  464. package/js/x-modules/query-suggestions/store/emitters.js.map +1 -1
  465. package/js/x-modules/recommendations/components/recommendations.vue.js +1 -2
  466. package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
  467. package/js/x-modules/recommendations/store/emitters.js +1 -0
  468. package/js/x-modules/recommendations/store/emitters.js.map +1 -1
  469. package/js/x-modules/related-prompts/components/related-prompt.vue.js +27 -0
  470. package/js/x-modules/related-prompts/components/related-prompt.vue.js.map +1 -0
  471. package/js/x-modules/related-prompts/components/related-prompt.vue2.js +31 -0
  472. package/js/x-modules/related-prompts/components/related-prompt.vue2.js.map +1 -0
  473. package/js/x-modules/related-prompts/components/related-prompt.vue3.js +7 -0
  474. package/js/x-modules/related-prompts/components/related-prompt.vue3.js.map +1 -0
  475. package/js/x-modules/related-prompts/components/related-prompts-list.vue.js +154 -0
  476. package/js/x-modules/related-prompts/components/related-prompts-list.vue.js.map +1 -0
  477. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js +6 -0
  478. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js.map +1 -0
  479. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js +101 -0
  480. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js.map +1 -0
  481. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js +221 -0
  482. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js.map +1 -0
  483. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js +7 -0
  484. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js.map +1 -0
  485. package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js +29 -0
  486. package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js.map +1 -0
  487. package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js +20 -0
  488. package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js.map +1 -0
  489. package/js/x-modules/related-prompts/store/actions/set-url-params.action.js +15 -0
  490. package/js/x-modules/related-prompts/store/actions/set-url-params.action.js.map +1 -0
  491. package/js/x-modules/related-prompts/store/emitters.js +16 -0
  492. package/js/x-modules/related-prompts/store/emitters.js.map +1 -0
  493. package/js/x-modules/related-prompts/store/getters/related-prompts-query.getter.js +18 -0
  494. package/js/x-modules/related-prompts/store/getters/related-prompts-query.getter.js.map +1 -0
  495. package/js/x-modules/related-prompts/store/getters/request.getter.js +17 -0
  496. package/js/x-modules/related-prompts/store/getters/request.getter.js.map +1 -0
  497. package/js/x-modules/related-prompts/store/module.js +64 -0
  498. package/js/x-modules/related-prompts/store/module.js.map +1 -0
  499. package/js/x-modules/related-prompts/wiring.js +82 -0
  500. package/js/x-modules/related-prompts/wiring.js.map +1 -0
  501. package/js/x-modules/related-prompts/x-module.js +21 -0
  502. package/js/x-modules/related-prompts/x-module.js.map +1 -0
  503. package/js/x-modules/related-tags/components/related-tag.vue.js +1 -2
  504. package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
  505. package/js/x-modules/related-tags/components/related-tags.vue.js +1 -4
  506. package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
  507. package/js/x-modules/related-tags/store/emitters.js +1 -0
  508. package/js/x-modules/related-tags/store/emitters.js.map +1 -1
  509. package/js/x-modules/scroll/components/scroll-to-top.vue.js +1 -2
  510. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
  511. package/js/x-modules/scroll/components/scroll-to-top.vue2.js +8 -0
  512. package/js/x-modules/scroll/components/scroll-to-top.vue2.js.map +1 -1
  513. package/js/x-modules/scroll/store/emitters.js +1 -0
  514. package/js/x-modules/scroll/store/emitters.js.map +1 -1
  515. package/js/x-modules/search/components/partial-results-list.vue.js +1 -2
  516. package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
  517. package/js/x-modules/search/components/results-list.vue.js +2 -2
  518. package/js/x-modules/search/components/results-list.vue.js.map +1 -1
  519. package/js/x-modules/search/components/sort-dropdown.vue.js +1 -3
  520. package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
  521. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +10 -3
  522. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
  523. package/js/x-modules/search/store/actions/save-search-response.action.js +3 -1
  524. package/js/x-modules/search/store/actions/save-search-response.action.js.map +1 -1
  525. package/js/x-modules/search/store/emitters.js +1 -0
  526. package/js/x-modules/search/store/emitters.js.map +1 -1
  527. package/js/x-modules/search/store/module.js +9 -3
  528. package/js/x-modules/search/store/module.js.map +1 -1
  529. package/js/x-modules/search/wiring.js +4 -0
  530. package/js/x-modules/search/wiring.js.map +1 -1
  531. package/js/x-modules/search-box/components/clear-search-input.vue.js +1 -2
  532. package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
  533. package/js/x-modules/search-box/components/search-button.vue.js +1 -2
  534. package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
  535. package/js/x-modules/search-box/store/emitters.js +1 -0
  536. package/js/x-modules/search-box/store/emitters.js.map +1 -1
  537. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js +1 -3
  538. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js.map +1 -1
  539. package/js/x-modules/semantic-queries/components/semantic-query.vue.js +1 -4
  540. package/js/x-modules/semantic-queries/components/semantic-query.vue.js.map +1 -1
  541. package/js/x-modules/semantic-queries/store/getters/normalized-query.getter.js +1 -1
  542. package/js/x-modules/semantic-queries/store/getters/normalized-query.getter.js.map +1 -1
  543. package/js/x-modules/semantic-queries/store/getters/request.getter.js +5 -4
  544. package/js/x-modules/semantic-queries/store/getters/request.getter.js.map +1 -1
  545. package/js/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.js +18 -0
  546. package/js/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.js.map +1 -0
  547. package/js/x-modules/semantic-queries/store/module.js +8 -2
  548. package/js/x-modules/semantic-queries/store/module.js.map +1 -1
  549. package/js/x-modules/semantic-queries/wiring.js +5 -0
  550. package/js/x-modules/semantic-queries/wiring.js.map +1 -1
  551. package/js/x-modules/tagging/components/tagging.vue.js +8 -7
  552. package/js/x-modules/tagging/components/tagging.vue.js.map +1 -1
  553. package/js/x-modules/tagging/service/{pdp-add-to-cart.service.js → external-tagging.service.js} +56 -25
  554. package/js/x-modules/tagging/service/external-tagging.service.js.map +1 -0
  555. package/js/x-modules/tagging/store/emitters.js +1 -1
  556. package/js/x-modules/tagging/store/emitters.js.map +1 -1
  557. package/js/x-modules/tagging/store/module.js +7 -3
  558. package/js/x-modules/tagging/store/module.js.map +1 -1
  559. package/js/x-modules/tagging/wiring.js +110 -9
  560. package/js/x-modules/tagging/wiring.js.map +1 -1
  561. package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
  562. package/js/x-modules/url/components/url-handler.vue2.js +4 -5
  563. package/js/x-modules/url/components/url-handler.vue2.js.map +1 -1
  564. package/js/x-modules/url/store/emitters.js +1 -0
  565. package/js/x-modules/url/store/emitters.js.map +1 -1
  566. package/js/x-modules/url/store/getters/url-params.getter.js +2 -3
  567. package/js/x-modules/url/store/getters/url-params.getter.js.map +1 -1
  568. package/js/x-modules/url/store/initial-state.js +2 -1
  569. package/js/x-modules/url/store/initial-state.js.map +1 -1
  570. package/js/x-modules/url/store/module.js +3 -0
  571. package/js/x-modules/url/store/module.js.map +1 -1
  572. package/js/x-modules/url/wiring.js +10 -1
  573. package/js/x-modules/url/wiring.js.map +1 -1
  574. package/package.json +50 -49
  575. package/related-prompts/index.d.ts +1 -0
  576. package/related-prompts/index.js +9 -0
  577. package/report/x-adapter-platform.api.json +895 -67
  578. package/report/x-components.api.json +16491 -17162
  579. package/report/x-components.api.md +847 -215
  580. package/report/x-types.api.json +320 -4
  581. package/tagging/index.js +2 -2
  582. package/types/adapter/mocked-responses.d.ts +3 -0
  583. package/types/adapter/mocked-responses.d.ts.map +1 -1
  584. package/types/components/base-dropdown.vue.d.ts +5 -5
  585. package/types/components/base-dropdown.vue.d.ts.map +1 -1
  586. package/types/components/base-grid.vue.d.ts +3 -3
  587. package/types/components/base-slider.vue.d.ts +74 -0
  588. package/types/components/base-slider.vue.d.ts.map +1 -0
  589. package/types/components/base-switch.vue.d.ts +2 -1
  590. package/types/components/base-switch.vue.d.ts.map +1 -1
  591. package/types/components/base-teleport.vue.d.ts +13 -0
  592. package/types/components/base-teleport.vue.d.ts.map +1 -0
  593. package/types/components/base-variable-column-grid.vue.d.ts +3 -3
  594. package/types/components/display-click-provider.vue.d.ts +61 -0
  595. package/types/components/display-click-provider.vue.d.ts.map +1 -0
  596. package/types/components/global-x-bus.vue.d.ts +14 -0
  597. package/types/components/global-x-bus.vue.d.ts.map +1 -1
  598. package/types/components/index.d.ts +4 -0
  599. package/types/components/index.d.ts.map +1 -1
  600. package/types/components/items-list.vue.d.ts +3 -3
  601. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts +5 -5
  602. package/types/components/layouts/single-column-layout.vue.d.ts +3 -3
  603. package/types/components/modals/base-events-modal.vue.d.ts +2 -2
  604. package/types/components/modals/base-id-modal.vue.d.ts +2 -2
  605. package/types/components/modals/base-modal.vue.d.ts +10 -10
  606. package/types/components/modals/base-modal.vue.d.ts.map +1 -1
  607. package/types/components/modals/main-modal.vue.d.ts +2 -2
  608. package/types/components/page-selector.vue.d.ts +125 -0
  609. package/types/components/page-selector.vue.d.ts.map +1 -0
  610. package/types/components/panels/base-header-toggle-panel.vue.d.ts +5 -5
  611. package/types/components/panels/base-id-toggle-panel.vue.d.ts +5 -5
  612. package/types/components/panels/base-tabs-panel.vue.d.ts +8 -8
  613. package/types/components/panels/base-toggle-panel.vue.d.ts +3 -3
  614. package/types/components/result/base-result-add-to-cart.vue.d.ts +2 -0
  615. package/types/components/result/base-result-add-to-cart.vue.d.ts.map +1 -1
  616. package/types/components/result/base-result-image.vue.d.ts +10 -10
  617. package/types/components/result/base-result-image.vue.d.ts.map +1 -1
  618. package/types/components/sliding-panel.vue.d.ts +15 -5
  619. package/types/components/sliding-panel.vue.d.ts.map +1 -1
  620. package/types/components/snippet-callbacks.vue.d.ts +7 -0
  621. package/types/components/snippet-callbacks.vue.d.ts.map +1 -1
  622. package/types/components/suggestions/base-suggestions.vue.d.ts +3 -3
  623. package/types/composables/use-alias-api.d.ts +5 -0
  624. package/types/composables/use-alias-api.d.ts.map +1 -1
  625. package/types/composables/use-store.d.ts +2 -2
  626. package/types/composables/use-store.d.ts.map +1 -1
  627. package/types/directives/index.d.ts +1 -0
  628. package/types/directives/index.d.ts.map +1 -1
  629. package/types/directives/typing.d.ts +35 -0
  630. package/types/directives/typing.d.ts.map +1 -0
  631. package/types/index.d.ts +1 -0
  632. package/types/index.d.ts.map +1 -1
  633. package/types/store/index.d.ts +4 -1
  634. package/types/store/index.d.ts.map +1 -1
  635. package/types/tailwind/plugin-options.d.ts +1 -2
  636. package/types/tailwind/plugin-options.d.ts.map +1 -1
  637. package/types/types/animation-prop.d.ts +6 -2
  638. package/types/types/animation-prop.d.ts.map +1 -1
  639. package/types/types/origin.d.ts +3 -3
  640. package/types/types/origin.d.ts.map +1 -1
  641. package/types/types/page-mode.d.ts +2 -0
  642. package/types/types/page-mode.d.ts.map +1 -0
  643. package/types/types/url-params.d.ts +1 -0
  644. package/types/types/url-params.d.ts.map +1 -1
  645. package/types/views/home/types.d.ts +3 -0
  646. package/types/views/home/types.d.ts.map +1 -1
  647. package/types/wiring/events.types.d.ts +3 -1
  648. package/types/wiring/events.types.d.ts.map +1 -1
  649. package/types/x-installer/x-installer/types.d.ts +2 -2
  650. package/types/x-installer/x-installer/types.d.ts.map +1 -1
  651. package/types/x-installer/x-installer/x-installer.d.ts +4 -4
  652. package/types/x-installer/x-installer/x-installer.d.ts.map +1 -1
  653. package/types/x-modules/empathize/components/empathize.vue.d.ts +6 -6
  654. package/types/x-modules/empathize/components/empathize.vue.d.ts.map +1 -1
  655. package/types/x-modules/facets/components/facets/facets.vue.d.ts +3 -3
  656. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +9 -2
  657. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  658. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts +7 -0
  659. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
  660. package/types/x-modules/facets/components/lists/filters-list.vue.d.ts +3 -3
  661. package/types/x-modules/facets/components/lists/selected-filters-list.vue.d.ts +3 -3
  662. package/types/x-modules/history-queries/components/my-history.vue.d.ts +3 -3
  663. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +3 -3
  664. package/types/x-modules/next-queries/components/next-queries-list.vue.d.ts +3 -3
  665. package/types/x-modules/next-queries/index.d.ts +1 -0
  666. package/types/x-modules/next-queries/index.d.ts.map +1 -1
  667. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts +3 -3
  668. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts.map +1 -1
  669. package/types/x-modules/queries-preview/components/query-preview.vue.d.ts.map +1 -1
  670. package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts.map +1 -1
  671. package/types/x-modules/queries-preview/store/module.d.ts.map +1 -1
  672. package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts +4 -2
  673. package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts.map +1 -1
  674. package/types/x-modules/recommendations/components/recommendations.vue.d.ts +3 -3
  675. package/types/x-modules/related-prompts/components/index.d.ts +4 -0
  676. package/types/x-modules/related-prompts/components/index.d.ts.map +1 -0
  677. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts +28 -0
  678. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts.map +1 -0
  679. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts +106 -0
  680. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts.map +1 -0
  681. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts +131 -0
  682. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -0
  683. package/types/x-modules/related-prompts/events.types.d.ts +41 -0
  684. package/types/x-modules/related-prompts/events.types.d.ts.map +1 -0
  685. package/types/x-modules/related-prompts/index.d.ts +6 -0
  686. package/types/x-modules/related-prompts/index.d.ts.map +1 -0
  687. package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts +17 -0
  688. package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts.map +1 -0
  689. package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts +13 -0
  690. package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts.map +1 -0
  691. package/types/x-modules/related-prompts/store/actions/set-url-params.action.d.ts +11 -0
  692. package/types/x-modules/related-prompts/store/actions/set-url-params.action.d.ts.map +1 -0
  693. package/types/x-modules/related-prompts/store/emitters.d.ts +10 -0
  694. package/types/x-modules/related-prompts/store/emitters.d.ts.map +1 -0
  695. package/types/x-modules/related-prompts/store/getters/index.d.ts +3 -0
  696. package/types/x-modules/related-prompts/store/getters/index.d.ts.map +1 -0
  697. package/types/x-modules/related-prompts/store/getters/related-prompts-query.getter.d.ts +13 -0
  698. package/types/x-modules/related-prompts/store/getters/related-prompts-query.getter.d.ts.map +1 -0
  699. package/types/x-modules/related-prompts/store/getters/request.getter.d.ts +14 -0
  700. package/types/x-modules/related-prompts/store/getters/request.getter.d.ts.map +1 -0
  701. package/types/x-modules/related-prompts/store/index.d.ts +6 -0
  702. package/types/x-modules/related-prompts/store/index.d.ts.map +1 -0
  703. package/types/x-modules/related-prompts/store/module.d.ts +8 -0
  704. package/types/x-modules/related-prompts/store/module.d.ts.map +1 -0
  705. package/types/x-modules/related-prompts/store/types.d.ts +125 -0
  706. package/types/x-modules/related-prompts/store/types.d.ts.map +1 -0
  707. package/types/x-modules/related-prompts/types.d.ts +10 -0
  708. package/types/x-modules/related-prompts/types.d.ts.map +1 -0
  709. package/types/x-modules/related-prompts/wiring.d.ts +42 -0
  710. package/types/x-modules/related-prompts/wiring.d.ts.map +1 -0
  711. package/types/x-modules/related-prompts/x-module.d.ts +16 -0
  712. package/types/x-modules/related-prompts/x-module.d.ts.map +1 -0
  713. package/types/x-modules/related-tags/components/related-tags.vue.d.ts +3 -3
  714. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +5 -5
  715. package/types/x-modules/search/components/banners-list.vue.d.ts +3 -3
  716. package/types/x-modules/search/components/partial-results-list.vue.d.ts +3 -3
  717. package/types/x-modules/search/components/promoteds-list.vue.d.ts +3 -3
  718. package/types/x-modules/search/components/results-list.vue.d.ts +3 -3
  719. package/types/x-modules/search/components/sort-dropdown.vue.d.ts +1 -1
  720. package/types/x-modules/search/config.types.d.ts +2 -0
  721. package/types/x-modules/search/config.types.d.ts.map +1 -1
  722. package/types/x-modules/search/events.types.d.ts +4 -0
  723. package/types/x-modules/search/events.types.d.ts.map +1 -1
  724. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
  725. package/types/x-modules/search/store/actions/save-search-response.action.d.ts.map +1 -1
  726. package/types/x-modules/search/store/module.d.ts +2 -0
  727. package/types/x-modules/search/store/module.d.ts.map +1 -1
  728. package/types/x-modules/search/store/types.d.ts +9 -1
  729. package/types/x-modules/search/store/types.d.ts.map +1 -1
  730. package/types/x-modules/search/wiring.d.ts +4 -0
  731. package/types/x-modules/search/wiring.d.ts.map +1 -1
  732. package/types/x-modules/search-box/components/search-input-placeholder.vue.d.ts +3 -3
  733. package/types/x-modules/semantic-queries/store/getters/index.d.ts +1 -0
  734. package/types/x-modules/semantic-queries/store/getters/index.d.ts.map +1 -1
  735. package/types/x-modules/semantic-queries/store/getters/normalized-query.getter.d.ts +1 -1
  736. package/types/x-modules/semantic-queries/store/getters/request.getter.d.ts +2 -1
  737. package/types/x-modules/semantic-queries/store/getters/request.getter.d.ts.map +1 -1
  738. package/types/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.d.ts +13 -0
  739. package/types/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.d.ts.map +1 -0
  740. package/types/x-modules/semantic-queries/store/module.d.ts.map +1 -1
  741. package/types/x-modules/semantic-queries/store/types.d.ts +13 -1
  742. package/types/x-modules/semantic-queries/store/types.d.ts.map +1 -1
  743. package/types/x-modules/semantic-queries/wiring.d.ts +3 -0
  744. package/types/x-modules/semantic-queries/wiring.d.ts.map +1 -1
  745. package/types/x-modules/tagging/components/tagging.vue.d.ts +14 -12
  746. package/types/x-modules/tagging/components/tagging.vue.d.ts.map +1 -1
  747. package/types/x-modules/tagging/config.types.d.ts +3 -3
  748. package/types/x-modules/tagging/config.types.d.ts.map +1 -1
  749. package/types/x-modules/tagging/events.types.d.ts +2 -2
  750. package/types/x-modules/tagging/service/{pdp-add-to-cart.service.d.ts → external-tagging.service.d.ts} +31 -13
  751. package/types/x-modules/tagging/service/external-tagging.service.d.ts.map +1 -0
  752. package/types/x-modules/tagging/service/index.d.ts +1 -1
  753. package/types/x-modules/tagging/service/index.d.ts.map +1 -1
  754. package/types/x-modules/tagging/service/types.d.ts +13 -4
  755. package/types/x-modules/tagging/service/types.d.ts.map +1 -1
  756. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  757. package/types/x-modules/tagging/wiring.d.ts +54 -2
  758. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  759. package/types/x-modules/url/components/url-handler.vue.d.ts.map +1 -1
  760. package/types/x-modules/url/store/getters/url-params.getter.d.ts +2 -3
  761. package/types/x-modules/url/store/getters/url-params.getter.d.ts.map +1 -1
  762. package/types/x-modules/url/store/initial-state.d.ts.map +1 -1
  763. package/types/x-modules/url/store/module.d.ts.map +1 -1
  764. package/types/x-modules/url/store/types.d.ts +6 -0
  765. package/types/x-modules/url/store/types.d.ts.map +1 -1
  766. package/types/x-modules/url/wiring.d.ts +9 -0
  767. package/types/x-modules/url/wiring.d.ts.map +1 -1
  768. package/types/x-modules/x-modules.types.d.ts +2 -0
  769. package/types/x-modules/x-modules.types.d.ts.map +1 -1
  770. package/url/index.js +1 -1
  771. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragekey.md +0 -11
  772. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragettlms.md +0 -11
  773. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.instance.md +0 -13
  774. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.localstorageservice.md +0 -11
  775. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.md +0 -41
  776. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.result_clicked_id_key.md +0 -13
  777. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.sessionstorageservice.md +0 -11
  778. package/docs/API-reference/api/x-components.pdpaddtocartservice.md +0 -22
  779. package/docs/API-reference/api/x-components.taggingconfig.clickedresultstoragettlms.md +0 -13
  780. package/docs/API-reference/api/x-components.usestore.md +0 -19
  781. package/docs/assets/features/overview-my-history.svg +0 -279
  782. package/docs/assets/features/overview-product-results-card.svg +0 -128
  783. package/docs/assets/interface/build-search-ui.svg +0 -167
  784. package/docs/assets/interface/experience-search-intro.svg +0 -1
  785. package/docs/assets/interface/integration-guide.svg +0 -1
  786. package/docs/assets/interface/integration-video.png +0 -0
  787. package/docs/assets/interface/x-architecture.svg +0 -1
  788. package/docs/assets/interface/x-empathize.gif +0 -0
  789. package/docs/assets/interface/x-facets.gif +0 -0
  790. package/docs/assets/interface/x-facets.svg +0 -189
  791. package/docs/assets/interface/x-history-queries.gif +0 -0
  792. package/docs/assets/interface/x-id-results.gif +0 -0
  793. package/docs/assets/interface/x-next-queries.gif +0 -0
  794. package/docs/assets/interface/x-popular-searches.gif +0 -0
  795. package/docs/assets/interface/x-query-suggestions.gif +0 -0
  796. package/docs/assets/interface/x-recommendations.gif +0 -0
  797. package/docs/assets/interface/x-recommendations.svg +0 -472
  798. package/docs/assets/interface/x-related-tags.gif +0 -0
  799. package/docs/assets/interface/x-results-layout.svg +0 -259
  800. package/docs/assets/interface/x-search-box-elements.svg +0 -1
  801. package/docs/assets/interface/x-search-box.svg +0 -60
  802. package/docs/build-search-ui/README.md +0 -127
  803. package/docs/build-search-ui/sidebar.js +0 -7
  804. package/docs/build-search-ui/web-archetype-development-guide.md +0 -186
  805. package/docs/build-search-ui/web-archetype-integration-guide.md +0 -458
  806. package/docs/build-search-ui/web-how-to-use-x-components-guide.md +0 -200
  807. package/docs/build-search-ui/web-x-architecture.md +0 -83
  808. package/docs/build-search-ui/web-x-components-development-guide.md +0 -157
  809. package/docs/experience-search-and-discovery/README.md +0 -132
  810. package/docs/experience-search-and-discovery/empathize.md +0 -119
  811. package/docs/experience-search-and-discovery/facets-and-filters.md +0 -154
  812. package/docs/experience-search-and-discovery/history-queries.md +0 -70
  813. package/docs/experience-search-and-discovery/id-results.md +0 -49
  814. package/docs/experience-search-and-discovery/my-history.md +0 -60
  815. package/docs/experience-search-and-discovery/next-queries.md +0 -72
  816. package/docs/experience-search-and-discovery/popular-searches.md +0 -50
  817. package/docs/experience-search-and-discovery/product-results-ui.md +0 -82
  818. package/docs/experience-search-and-discovery/query-suggestions.md +0 -48
  819. package/docs/experience-search-and-discovery/recommendations.md +0 -134
  820. package/docs/experience-search-and-discovery/related-tags.md +0 -66
  821. package/docs/experience-search-and-discovery/search-box.md +0 -99
  822. package/docs/experience-search-and-discovery/serp-ui.md +0 -125
  823. package/docs/experience-search-and-discovery/sidebar.js +0 -17
  824. package/docs/experience-search-and-discovery/web-local-storage.md +0 -30
  825. package/docs/input-status-machine-state.png +0 -0
  826. package/js/composables/use-store.js +0 -15
  827. package/js/composables/use-store.js.map +0 -1
  828. package/js/utils/options-api.js +0 -4
  829. package/js/utils/options-api.js.map +0 -1
  830. package/js/x-modules/tagging/service/pdp-add-to-cart.service.js.map +0 -1
  831. package/types/utils/options-api.d.ts +0 -3
  832. package/types/utils/options-api.d.ts.map +0 -1
  833. package/types/x-modules/tagging/service/pdp-add-to-cart.service.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './recommendations.vue2.js';
2
- import { openBlock, createBlock, resolveDynamicComponent, withCtx, createElementBlock, Fragment, renderList, createCommentVNode, renderSlot } from 'vue';
2
+ import { openBlock, createBlock, resolveDynamicComponent, withCtx, createElementBlock, Fragment, renderList, renderSlot, createCommentVNode } from 'vue';
3
3
  import './recommendations.vue3.js';
4
4
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
5
5
 
@@ -20,7 +20,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
20
20
  class: "x-recommendations__item",
21
21
  "data-test": "recommendation-item"
22
22
  }, [
23
- createCommentVNode("\n @slot (Required) Recommendation content.\n @binding {recommendation} recommendation - Recommendation data.\n "),
24
23
  renderSlot(_ctx.$slots, "default", { recommendation }, void 0, true)
25
24
  ]);
26
25
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"recommendations.vue.js","sources":["../../../../../src/x-modules/recommendations/components/recommendations.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"recommendations.length\"\n tag=\"ul\"\n data-test=\"recommendations\"\n class=\"x-recommendations\"\n >\n <li\n v-for=\"recommendation in recommendations\"\n :key=\"recommendation.id\"\n class=\"x-recommendations__item\"\n data-test=\"recommendation-item\"\n >\n <!--\n @slot (Required) Recommendation content.\n @binding {recommendation} recommendation - Recommendation data.\n -->\n <slot :recommendation=\"recommendation\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { Result } from '@empathyco/x-types';\n import { computed, defineComponent, provide, ComputedRef } from 'vue';\n import { useState } from '../../../composables';\n import { PropsWithType } from '../../../utils';\n import { XEventsTypes } from '../../../wiring';\n import { recommendationsXModule } from '../x-module';\n import { AnimationProp } from '../../../types';\n\n /**\n * It renders a list of recommendations from the\n * {@link RecommendationsState.recommendations} state by default.\n * The component provides the slot layout which wraps the whole component with the\n * recommendations bounded. It also provides the default slot to customize the item, which is\n * within the layout slot, with the recommendation bounded. Each recommendation should be\n * represented by a {@link BaseResultLink} component besides any other component.\n *\n * @public\n */\n export default defineComponent({\n name: 'Recommendations',\n xModule: recommendationsXModule.name,\n props: {\n /** Animation component that will be used to animate the recommendations. */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n /** Number of recommendations to be rendered. */\n maxItemsToRender: Number\n },\n setup(props, { slots }) {\n /** The module's list of recommendations. */\n const storedRecommendations: ComputedRef<Result[]> = useState('recommendations', [\n 'recommendations'\n ]).recommendations;\n\n /** The additional events to be emitted by the mandatory {@link BaseResultLink} component. */\n provide<PropsWithType<XEventsTypes, Result>[]>('resultClickExtraEvents', [\n 'UserClickedARecommendation'\n ]);\n\n /**\n * Slices the recommendations from the state.\n *\n * @returns - The list of recommendations slice by the number of items to render.\n */\n const recommendations = computed<Result[]>(() =>\n storedRecommendations.value.slice(0, props.maxItemsToRender)\n );\n\n /**\n * Render function to execute the `layout` slot, binding `slotsProps` and getting only the\n * first `vNode` to avoid Fragments and Text root nodes.\n * If there are no recommendations, nothing is rendered.\n *\n * @remarks `slotProps` must be values without Vue reactivity and located inside the\n * render-function to update the binding data properly.\n *\n * @returns The root `vNode` of the `layout` slot or empty string if there are\n * no recommendations.\n */\n function renderLayoutSlot() {\n const slotProps = {\n animation: props.animation,\n recommendations: recommendations.value\n };\n return recommendations.value.length ? slots.layout?.(slotProps)[0] : '';\n }\n\n /* Hack to render through a render-function, the `layout` slot or, in its absence,\n the component itself. It is the alternative for the NoElement antipattern. */\n const componentProps = { recommendations };\n return (slots.layout ? renderLayoutSlot : componentProps) as typeof componentProps;\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-recommendations {\n display: flex;\n list-style-type: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits no events, but it makes components such as `BaseResultLink` emit additional\nevents:\n\n- [`UserClickedARecommendation`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the link of a recommendation.\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nTo use this component, the Topclicked service must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nHere you have a basic example on how the recommendations are rendered. You can customize how each\nresult is rendered by using the `default` slot. It is highly recommended to use base components such\nas the `BaseResultLink` or the `BaseResultAddToCart`, as they provides integration with other\nmodules such like the `tagging` one.\n\n```vue live\n<template>\n <Recommendations #default=\"{ recommendation }\">\n <BaseResultLink :result=\"recommendation\" class=\"x-recommendations__link\">\n <img :src=\"recommendation.images[0]\" class=\"x-recommendations__image\" />\n <span class=\"x-recommendations__title\">{{ recommendation.name }}</span>\n </BaseResultLink>\n <BaseResultAddToCart>Add to cart</BaseResultAddToCart>\n </Recommendations>\n</template>\n<script>\n import { Recommendations } from '@empathyco/x-components/recommendations';\n import { BaseResultLink, BaseResultAddToCart } from '@empathyco/x-components';\n\n export default {\n name: 'RecommendationsDemo',\n components: {\n Recommendations,\n BaseResultLink,\n BaseResultAddToCart\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the component will render a maximum of 4 result recommendations, and will use the\n`StaggeredFadeAndSlide` animation for the results, smoothing the entrance.\n\n```vue live\n<template>\n <Recommendations\n #default=\"{ recommendation }\"\n :maxItemsToRender=\"4\"\n animation=\"StaggeredFadeAndSlide\"\n >\n <BaseResultLink :result=\"recommendation\" class=\"x-recommendations__link\">\n <img :src=\"recommendation.images[0]\" class=\"x-recommendations__image\" />\n <span class=\"x-recommendations__title\">{{ recommendation.name }}</span>\n </BaseResultLink>\n <BaseResultAddToCart>Add to cart</BaseResultAddToCart>\n </Recommendations>\n</template>\n<script>\n import Vue from 'vue';\n import { Recommendations } from '@empathyco/x-components/recommendations';\n import { BaseResultLink, BaseResultAddToCart } from '@empathyco/x-components';\n\n Vue.component('StaggeredFadeAndSlide', StaggeredFadeAndSlide);\n export default {\n name: 'RecommendationsDemo',\n components: {\n Recommendations,\n BaseResultLink,\n BaseResultAddToCart\n }\n };\n</script>\n```\n\n### Play with the layout\n\nIn this example you can build your own layout, and the `Recommendations` component will just act as\na provider of the result recommendations data. Using the component this way, and due to Vue 2\nlimitations you will only be allowed to render a single element inside the `layout` slot.\n\n```vue live\n<template>\n <Recommendations #layout=\"{ recommendations }\">\n <div class=\"x-recommendations\">\n <article\n class=\"x-recommendations-list\"\n v-for=\"recommendation in recommendations\"\n :key=\"recommendation.id\"\n >\n <BaseResultLink :result=\"recommendation\" class=\"x-recommendations__link\">\n <img :src=\"recommendation.images[0]\" class=\"x-recommendations__image\" />\n <span class=\"x-recommendations__title\">{{ recommendation.name }}</span>\n </BaseResultLink>\n <BaseResultAddToCart>Add to cart</BaseResultAddToCart>\n </article>\n </div>\n </Recommendations>\n</template>\n<script>\n import { Recommendations } from '@empathyco/x-components/recommendations';\n import { BaseResultLink, BaseResultAddToCart } from '@empathyco/x-components';\n\n export default {\n name: 'RecommendationsDemo',\n components: {\n Recommendations,\n BaseResultLink,\n BaseResultAddToCart\n }\n };\n</script>\n```\n</docs>\n"],"names":["animation","_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","_createCommentVNode"],"mappings":";;;;;AACE,SAAA,WAAA,CAAA,IAAA,EAAA,MAAA,EADF,MAESA,EAAAA,MAAAA,EAAAA,KAAAA,EAAAA,QAAAA,EAAAA;SAFT,IAIY,CAAA,eAAA,CAAA,MAAA,IAAAC,SAAA,EAAA,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA;AAAA,IACR,GAAA,EAAA,CAAA;AAAA,IACA,GAAK,EAAA,IAAA;AAAA,IAAA,WAAA,EAAA,iBAAA;AANT,IAAA,KAAA,EAAA,mBAAA;AAAA,GAAA,EAAA;;AAUY,OAAAF,SAAA,CAAA,IAAA,CAAA,EAAAG,kBAAA;AAAA,QAAiBC,QAAA;AAAA,QAAA,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,eAAA,EAAA,CAAA,cAAA,KAAA;AAClB,UAAA,OAAAL,SAAA,EAA0B,EAAAG,kBAAA,CAAA,IAAA,EAAA;AAAA,YAC/B,GAAU,EAAA,cAAA,CAAA,EAAA;AAAA,YAAA,KAAA,EAAA,yBAAA;AAEV,YAAA,WAAA,EAAA,qBAAA;AAAA,WAIA,EAAA;AAAA,YAAAG,kBAAA,CAAA,qIAAA,CAAA;;;AAlBN,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAAA;AAAA,KAAA,CAAA;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,CAAA,IAAAA,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"recommendations.vue.js","sources":["../../../../../src/x-modules/recommendations/components/recommendations.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"recommendations.length\"\n tag=\"ul\"\n data-test=\"recommendations\"\n class=\"x-recommendations\"\n >\n <li\n v-for=\"recommendation in recommendations\"\n :key=\"recommendation.id\"\n class=\"x-recommendations__item\"\n data-test=\"recommendation-item\"\n >\n <!--\n @slot (Required) Recommendation content.\n @binding {recommendation} recommendation - Recommendation data.\n -->\n <slot :recommendation=\"recommendation\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { Result } from '@empathyco/x-types';\n import { computed, defineComponent, provide, ComputedRef } from 'vue';\n import { useState } from '../../../composables';\n import { PropsWithType } from '../../../utils';\n import { XEventsTypes } from '../../../wiring';\n import { recommendationsXModule } from '../x-module';\n import { AnimationProp } from '../../../types';\n\n /**\n * It renders a list of recommendations from the\n * {@link RecommendationsState.recommendations} state by default.\n * The component provides the slot layout which wraps the whole component with the\n * recommendations bounded. It also provides the default slot to customize the item, which is\n * within the layout slot, with the recommendation bounded. Each recommendation should be\n * represented by a {@link BaseResultLink} component besides any other component.\n *\n * @public\n */\n export default defineComponent({\n name: 'Recommendations',\n xModule: recommendationsXModule.name,\n props: {\n /** Animation component that will be used to animate the recommendations. */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n /** Number of recommendations to be rendered. */\n maxItemsToRender: Number\n },\n setup(props, { slots }) {\n /** The module's list of recommendations. */\n const storedRecommendations: ComputedRef<Result[]> = useState('recommendations', [\n 'recommendations'\n ]).recommendations;\n\n /** The additional events to be emitted by the mandatory {@link BaseResultLink} component. */\n provide<PropsWithType<XEventsTypes, Result>[]>('resultClickExtraEvents', [\n 'UserClickedARecommendation'\n ]);\n\n /**\n * Slices the recommendations from the state.\n *\n * @returns - The list of recommendations slice by the number of items to render.\n */\n const recommendations = computed<Result[]>(() =>\n storedRecommendations.value.slice(0, props.maxItemsToRender)\n );\n\n /**\n * Render function to execute the `layout` slot, binding `slotsProps` and getting only the\n * first `vNode` to avoid Fragments and Text root nodes.\n * If there are no recommendations, nothing is rendered.\n *\n * @remarks `slotProps` must be values without Vue reactivity and located inside the\n * render-function to update the binding data properly.\n *\n * @returns The root `vNode` of the `layout` slot or empty string if there are\n * no recommendations.\n */\n function renderLayoutSlot() {\n const slotProps = {\n animation: props.animation,\n recommendations: recommendations.value\n };\n return recommendations.value.length ? slots.layout?.(slotProps)[0] : '';\n }\n\n /* Hack to render through a render-function, the `layout` slot or, in its absence,\n the component itself. It is the alternative for the NoElement antipattern. */\n const componentProps = { recommendations };\n return (slots.layout ? renderLayoutSlot : componentProps) as typeof componentProps;\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-recommendations {\n display: flex;\n list-style-type: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits no events, but it makes components such as `BaseResultLink` emit additional\nevents:\n\n- [`UserClickedARecommendation`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the link of a recommendation.\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nTo use this component, the Topclicked service must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nHere you have a basic example on how the recommendations are rendered. You can customize how each\nresult is rendered by using the `default` slot. It is highly recommended to use base components such\nas the `BaseResultLink` or the `BaseResultAddToCart`, as they provides integration with other\nmodules such like the `tagging` one.\n\n```vue live\n<template>\n <Recommendations #default=\"{ recommendation }\">\n <BaseResultLink :result=\"recommendation\" class=\"x-recommendations__link\">\n <img :src=\"recommendation.images[0]\" class=\"x-recommendations__image\" />\n <span class=\"x-recommendations__title\">{{ recommendation.name }}</span>\n </BaseResultLink>\n <BaseResultAddToCart>Add to cart</BaseResultAddToCart>\n </Recommendations>\n</template>\n<script>\n import { Recommendations } from '@empathyco/x-components/recommendations';\n import { BaseResultLink, BaseResultAddToCart } from '@empathyco/x-components';\n\n export default {\n name: 'RecommendationsDemo',\n components: {\n Recommendations,\n BaseResultLink,\n BaseResultAddToCart\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the component will render a maximum of 4 result recommendations, and will use the\n`StaggeredFadeAndSlide` animation for the results, smoothing the entrance.\n\n```vue live\n<template>\n <Recommendations\n #default=\"{ recommendation }\"\n :maxItemsToRender=\"4\"\n animation=\"StaggeredFadeAndSlide\"\n >\n <BaseResultLink :result=\"recommendation\" class=\"x-recommendations__link\">\n <img :src=\"recommendation.images[0]\" class=\"x-recommendations__image\" />\n <span class=\"x-recommendations__title\">{{ recommendation.name }}</span>\n </BaseResultLink>\n <BaseResultAddToCart>Add to cart</BaseResultAddToCart>\n </Recommendations>\n</template>\n<script>\n import Vue from 'vue';\n import { Recommendations } from '@empathyco/x-components/recommendations';\n import { BaseResultLink, BaseResultAddToCart } from '@empathyco/x-components';\n\n Vue.component('StaggeredFadeAndSlide', StaggeredFadeAndSlide);\n export default {\n name: 'RecommendationsDemo',\n components: {\n Recommendations,\n BaseResultLink,\n BaseResultAddToCart\n }\n };\n</script>\n```\n\n### Play with the layout\n\nIn this example you can build your own layout, and the `Recommendations` component will just act as\na provider of the result recommendations data. Using the component this way, and due to Vue 2\nlimitations you will only be allowed to render a single element inside the `layout` slot.\n\n```vue live\n<template>\n <Recommendations #layout=\"{ recommendations }\">\n <div class=\"x-recommendations\">\n <article\n class=\"x-recommendations-list\"\n v-for=\"recommendation in recommendations\"\n :key=\"recommendation.id\"\n >\n <BaseResultLink :result=\"recommendation\" class=\"x-recommendations__link\">\n <img :src=\"recommendation.images[0]\" class=\"x-recommendations__image\" />\n <span class=\"x-recommendations__title\">{{ recommendation.name }}</span>\n </BaseResultLink>\n <BaseResultAddToCart>Add to cart</BaseResultAddToCart>\n </article>\n </div>\n </Recommendations>\n</template>\n<script>\n import { Recommendations } from '@empathyco/x-components/recommendations';\n import { BaseResultLink, BaseResultAddToCart } from '@empathyco/x-components';\n\n export default {\n name: 'RecommendationsDemo',\n components: {\n Recommendations,\n BaseResultLink,\n BaseResultAddToCart\n }\n };\n</script>\n```\n</docs>\n"],"names":["animation","_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","_createCommentVNode"],"mappings":";;;;;AACE,SAAA,WAAA,CAAA,IAAA,EAAA,MAAA,EADF,MAESA,EAAAA,MAAAA,EAAAA,KAAAA,EAAAA,QAAAA,EAAAA;SAFT,IAIY,CAAA,eAAA,CAAA,MAAA,IAAAC,SAAA,EAAA,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA;AAAA,IACR,GAAA,EAAA,CAAA;AAAA,IACA,GAAK,EAAA,IAAA;AAAA,IAAA,WAAA,EAAA,iBAAA;AANT,IAAA,KAAA,EAAA,mBAAA;AAAA,GAAA,EAAA;;AAUY,OAAAF,SAAA,CAAA,IAAA,CAAA,EAAAG,kBAAA;AAAA,QAAiBC,QAAA;AAAA,QAAA,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,eAAA,EAAA,CAAA,cAAA,KAAA;AAClB,UAAA,OAAAL,SAAA,EAA0B,EAAAG,kBAAA,CAAA,IAAA,EAAA;AAAA,YAC/B,GAAU,EAAA,cAAA,CAAA,EAAA;AAAA,YAAA,KAAA,EAAA,yBAAA;YAMV,WAAyC,EAAA,qBAAA;AAAA,WAAA,EAAA;;;AAlB/C,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAAA;AAAA,KAAA,CAAA;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,CAAA,IAAAG,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
@@ -1,3 +1,4 @@
1
+ import '@empathyco/x-utils';
1
2
  import { createStoreEmitters } from '../../../store/utils/store-emitters.utils.js';
2
3
  import { recommendationsXStoreModule } from './module.js';
3
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/recommendations/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { recommendationsXStoreModule } from './module';\n/**\n * {@link StoreEmitters} For the recommendations module.\n *\n * @internal\n */\nexport const recommendationsEmitters = createStoreEmitters(recommendationsXStoreModule, {\n RecommendationsChanged: state => state.recommendations,\n RecommendationsRequestUpdated: {\n selector: (_, getters) => getters.request\n }\n});\n"],"names":[],"mappings":";;;AAEA;;;;AAIG;AACU,MAAA,uBAAuB,GAAG,mBAAmB,CAAC,2BAA2B,EAAE;AACtF,IAAA,sBAAsB,EAAE,KAAK,IAAI,KAAK,CAAC,eAAe;AACtD,IAAA,6BAA6B,EAAE;QAC7B,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO;AAC1C,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/recommendations/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { recommendationsXStoreModule } from './module';\n/**\n * {@link StoreEmitters} For the recommendations module.\n *\n * @internal\n */\nexport const recommendationsEmitters = createStoreEmitters(recommendationsXStoreModule, {\n RecommendationsChanged: state => state.recommendations,\n RecommendationsRequestUpdated: {\n selector: (_, getters) => getters.request\n }\n});\n"],"names":[],"mappings":";;;;AAEA;;;;AAIG;AACU,MAAA,uBAAuB,GAAG,mBAAmB,CAAC,2BAA2B,EAAE;AACtF,IAAA,sBAAsB,EAAE,KAAK,IAAI,KAAK,CAAC,eAAe;AACtD,IAAA,6BAA6B,EAAE;QAC7B,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO;AAC1C,KAAA;AACF,CAAA;;;;"}
@@ -0,0 +1,27 @@
1
+ import _sfc_main from './related-prompt.vue2.js';
2
+ import { resolveDirective, openBlock, createElementBlock, renderSlot, withDirectives, createElementVNode, createBlock, resolveDynamicComponent } from 'vue';
3
+ import './related-prompt.vue3.js';
4
+ import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
5
+
6
+ const _hoisted_1 = { class: "x-related-prompt x-gap-8" };
7
+ const _hoisted_2 = { class: "x-text-left x-grow" };
8
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
9
+ const _directive_typing = resolveDirective("typing");
10
+ return openBlock(), createElementBlock("button", _hoisted_1, [
11
+ renderSlot(_ctx.$slots, "related-prompt-extra-content", { relatedPrompt: _ctx.relatedPrompt }),
12
+ withDirectives(createElementVNode(
13
+ "span",
14
+ _hoisted_2,
15
+ null,
16
+ 512
17
+ /* NEED_PATCH */
18
+ ), [
19
+ [_directive_typing, { text: _ctx.relatedPrompt.suggestionText, speed: 50 }]
20
+ ]),
21
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.selected ? "CrossTinyIcon" : "PlusIcon"), { class: "x-icon-lg x-related-prompt-icon x-shrink-0" }))
22
+ ]);
23
+ }
24
+ var RelatedPrompt = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
25
+
26
+ export { RelatedPrompt as default };
27
+ //# sourceMappingURL=related-prompt.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"related-prompt.vue.js","sources":["../../../../../src/x-modules/related-prompts/components/related-prompt.vue"],"sourcesContent":["<template>\n <button class=\"x-related-prompt x-gap-8\">\n <slot name=\"related-prompt-extra-content\" :relatedPrompt=\"relatedPrompt\" />\n <span v-typing=\"{ text: relatedPrompt.suggestionText, speed: 50 }\" class=\"x-text-left x-grow\" />\n <component\n :is=\"selected ? 'CrossTinyIcon' : 'PlusIcon'\"\n class=\"x-icon-lg x-related-prompt-icon x-shrink-0\"\n />\n </button>\n</template>\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { RelatedPrompt } from '@empathyco/x-types';\n import CrossTinyIcon from '../../../components/icons/cross-tiny.vue';\n import PlusIcon from '../../../components/icons/plus.vue';\n import { typing } from '../../../directives/typing';\n\n /**\n * This component shows a suggested related prompt.\n */\n export default defineComponent({\n name: 'RelatedPrompt',\n directives: {\n typing\n },\n components: {\n CrossTinyIcon,\n PlusIcon\n },\n props: {\n relatedPrompt: {\n type: Object as PropType<RelatedPrompt>,\n required: true\n },\n selected: {\n type: Boolean,\n default: false\n }\n }\n });\n</script>\n<style lang=\"css\">\n .x-related-prompt {\n display: flex;\n align-items: center;\n justify-content: space-between;\n text-align: start;\n padding: 8px;\n height: 100%;\n width: 100%;\n }\n\n .x-related-prompt-icon {\n align-self: start;\n }\n</style>\n"],"names":["_resolveDirective","_openBlock","_createElementBlock","_renderSlot","_withDirectives","_createElementVNode","selected"],"mappings":";;;;;;;;AACE,EAAA,MAAA,iBAAA,GAAAA,gBAAA,CAOS,QAPT,CAAA,CAAA;AAEE,EAAA,OAAAC,SAAA,EAAA,EAAAC,kBAAA,CAAgG,UAAhG,UAAgG,EAAA;AAAA,IAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,8BAAA,EAA1D,EAAc,aAAA,EAAA,IAAA,CAAA,aAAA,EAAA,CAAA;AAAA,IAAAC,cAAA,CAAAC,kBAAA;;;;;;;AACpD,MAAA,CAAA,iBAAA,EAAA,EAAA,IAAA,EAJJ,mCAKWC,KAAQ,EAAA,EAAA,EAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;"}
@@ -0,0 +1,31 @@
1
+ import { defineComponent } from 'vue';
2
+ import CrossTinyIcon from '../../../components/icons/cross-tiny.vue.js';
3
+ import PlusIcon from '../../../components/icons/plus.vue.js';
4
+ import { typing } from '../../../directives/typing.js';
5
+
6
+ /**
7
+ * This component shows a suggested related prompt.
8
+ */
9
+ var _sfc_main = defineComponent({
10
+ name: 'RelatedPrompt',
11
+ directives: {
12
+ typing
13
+ },
14
+ components: {
15
+ CrossTinyIcon,
16
+ PlusIcon
17
+ },
18
+ props: {
19
+ relatedPrompt: {
20
+ type: Object,
21
+ required: true
22
+ },
23
+ selected: {
24
+ type: Boolean,
25
+ default: false
26
+ }
27
+ }
28
+ });
29
+
30
+ export { _sfc_main as default };
31
+ //# sourceMappingURL=related-prompt.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"related-prompt.vue2.js","sources":["../../../../../src/x-modules/related-prompts/components/related-prompt.vue"],"sourcesContent":["<template>\n <button class=\"x-related-prompt x-gap-8\">\n <slot name=\"related-prompt-extra-content\" :relatedPrompt=\"relatedPrompt\" />\n <span v-typing=\"{ text: relatedPrompt.suggestionText, speed: 50 }\" class=\"x-text-left x-grow\" />\n <component\n :is=\"selected ? 'CrossTinyIcon' : 'PlusIcon'\"\n class=\"x-icon-lg x-related-prompt-icon x-shrink-0\"\n />\n </button>\n</template>\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { RelatedPrompt } from '@empathyco/x-types';\n import CrossTinyIcon from '../../../components/icons/cross-tiny.vue';\n import PlusIcon from '../../../components/icons/plus.vue';\n import { typing } from '../../../directives/typing';\n\n /**\n * This component shows a suggested related prompt.\n */\n export default defineComponent({\n name: 'RelatedPrompt',\n directives: {\n typing\n },\n components: {\n CrossTinyIcon,\n PlusIcon\n },\n props: {\n relatedPrompt: {\n type: Object as PropType<RelatedPrompt>,\n required: true\n },\n selected: {\n type: Boolean,\n default: false\n }\n }\n });\n</script>\n<style lang=\"css\">\n .x-related-prompt {\n display: flex;\n align-items: center;\n justify-content: space-between;\n text-align: start;\n padding: 8px;\n height: 100%;\n width: 100%;\n }\n\n .x-related-prompt-icon {\n align-self: start;\n }\n</style>\n"],"names":[],"mappings":";;;;;AAiBE;;AAEE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,eAAe;AACrB,IAAA,UAAU,EAAE;QACV,MAAK;AACN,KAAA;AACD,IAAA,UAAU,EAAE;QACV,aAAa;QACb,QAAO;AACR,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,aAAa,EAAE;AACb,YAAA,IAAI,EAAE,MAAiC;AACvC,YAAA,QAAQ,EAAE,IAAG;AACd,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,KAAI;AACf,SAAA;AACF,KAAA;AACD,CAAA,CAAC;;;;"}
@@ -0,0 +1,7 @@
1
+ import injectCss from '../../../../tools/inject-css.js';
2
+
3
+ var css = "[dir=ltr] .x-related-prompt{text-align:left}[dir=rtl] .x-related-prompt{text-align:right}.x-related-prompt{align-items:center;display:flex;height:100%;justify-content:space-between;padding:8px;width:100%}.x-related-prompt-icon{align-self:start}";
4
+ injectCss(css);
5
+
6
+ export { css, css as default };
7
+ //# sourceMappingURL=related-prompt.vue3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"related-prompt.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,154 @@
1
+ import { defineComponent, inject, computed, provide, h } from 'vue';
2
+ import { AnimationProp } from '../../../types/animation-prop.js';
3
+ import { groupItemsBy } from '../../../utils/array.js';
4
+ import ItemsList from '../../../components/items-list.vue.js';
5
+ import { QUERY_KEY, HAS_MORE_ITEMS_KEY, LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts.js';
6
+ import { relatedPromptsXModule } from '../x-module.js';
7
+ import { useState } from '../../../composables/use-state.js';
8
+
9
+ /**
10
+ * Component that inserts groups of related prompts in different positions of the injected search
11
+ * items list, based on the provided configuration.
12
+ *
13
+ * @public
14
+ */
15
+ var _sfc_main = defineComponent({
16
+ name: 'RelatedPromptsList',
17
+ xModule: relatedPromptsXModule.name,
18
+ props: {
19
+ /**
20
+ * Animation component that will be used to animate the related prompts groups.
21
+ */
22
+ animation: {
23
+ type: AnimationProp,
24
+ default: 'ul'
25
+ },
26
+ /**
27
+ * The first index to insert a group of related prompts at.
28
+ */
29
+ offset: {
30
+ type: Number,
31
+ default: 24
32
+ },
33
+ /**
34
+ * The items cycle size to keep inserting related prompts groups at.
35
+ */
36
+ frequency: {
37
+ type: Number,
38
+ default: 24
39
+ },
40
+ /**
41
+ * The maximum amount of related prompts to add in a single group.
42
+ */
43
+ maxRelatedPromptsPerGroup: {
44
+ type: Number,
45
+ default: 4
46
+ },
47
+ /**
48
+ * The maximum number of groups to insert into the injected list items list.
49
+ */
50
+ maxGroups: {
51
+ type: Number,
52
+ default: undefined
53
+ },
54
+ /**
55
+ * Determines if a group is added to the injected items list in case the number
56
+ * of items is smaller than the offset.
57
+ */
58
+ showOnlyAfterOffset: {
59
+ type: Boolean,
60
+ default: false
61
+ }
62
+ },
63
+ setup(props, { slots }) {
64
+ const { query, status } = useState('relatedPrompts', ['query', 'status']);
65
+ /**
66
+ * The state related prompts.
67
+ */
68
+ const relatedPrompts = useState('relatedPrompts', [
69
+ 'relatedPrompts'
70
+ ]).relatedPrompts;
71
+ /**
72
+ * Injected query, updated when the related request(s) have succeeded.
73
+ */
74
+ const injectedQuery = inject(QUERY_KEY);
75
+ /**
76
+ * Indicates if there are more available results than the injected.
77
+ */
78
+ const hasMoreItems = inject(HAS_MORE_ITEMS_KEY);
79
+ /**
80
+ * The grouped related prompts based on the given config.
81
+ *
82
+ * @returns A list of related prompts groups.
83
+ */
84
+ const relatedPromptsGroups = computed(() => Object.values(groupItemsBy(relatedPrompts.value, (_, index) => Math.floor(index / props.maxRelatedPromptsPerGroup)))
85
+ .slice(0, props.maxGroups)
86
+ .map((relatedPrompts, index) => ({
87
+ modelName: 'RelatedPromptsGroup',
88
+ id: `related-prompts-group-${index}`,
89
+ relatedPrompts
90
+ })));
91
+ /**
92
+ * It injects {@link ListItem} provided by an ancestor as injectedListItems.
93
+ */
94
+ const injectedListItems = inject(LIST_ITEMS_KEY);
95
+ /**
96
+ * Checks if the related prompts are outdated taking into account the injected query.
97
+ *
98
+ * @returns True if the related prompts are outdated, false if not.
99
+ */
100
+ const relatedPromptsAreOutdated = computed(() => !!injectedQuery?.value &&
101
+ (query.value !== injectedQuery.value || status.value !== 'success'));
102
+ /**
103
+ * Checks if the number of items is smaller than the offset so a group
104
+ * should be added to the injected items list.
105
+ *
106
+ * @returns True if a group should be added, false if not.
107
+ */
108
+ const hasNotEnoughListItems = computed(() => !props.showOnlyAfterOffset &&
109
+ !hasMoreItems?.value &&
110
+ injectedListItems !== undefined &&
111
+ injectedListItems.value.length > 0 &&
112
+ props.offset > injectedListItems.value.length);
113
+ /**
114
+ * New list of {@link ListItem}s to render.
115
+ *
116
+ * @returns The new list of {@link ListItem}s with the related prompts groups inserted.
117
+ */
118
+ const items = computed(() => {
119
+ if (!injectedListItems?.value) {
120
+ return relatedPromptsGroups.value;
121
+ }
122
+ if (relatedPromptsAreOutdated.value) {
123
+ return injectedListItems.value;
124
+ }
125
+ if (hasNotEnoughListItems.value) {
126
+ return injectedListItems.value.concat(relatedPromptsGroups.value[0] ?? []);
127
+ }
128
+ return relatedPromptsGroups?.value.reduce((items, relatedPromptsGroup, index) => {
129
+ const targetIndex = props.offset + props.frequency * index;
130
+ if (targetIndex <= items.length) {
131
+ items.splice(targetIndex, 0, relatedPromptsGroup);
132
+ }
133
+ return items;
134
+ }, [...injectedListItems.value]);
135
+ });
136
+ /**
137
+ * The computed list items of the entity that uses the mixin.
138
+ *
139
+ * @remarks It should be overridden in the component that uses the mixin and
140
+ * it's intended to be filled with items from the state. Vue doesn't allow
141
+ * mixins as abstract classes.
142
+ * @returns An empty array as fallback in case it is not overridden.
143
+ */
144
+ provide(LIST_ITEMS_KEY, items);
145
+ return () => {
146
+ const innerProps = { items: items.value, animation: props.animation };
147
+ // https://vue-land.github.io/faq/forwarding-slots#passing-all-slots
148
+ return slots.default?.(innerProps)[0] ?? h(ItemsList, innerProps, slots);
149
+ };
150
+ }
151
+ });
152
+
153
+ export { _sfc_main as default };
154
+ //# sourceMappingURL=related-prompts-list.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"related-prompts-list.vue.js","sources":["../../../../../src/x-modules/related-prompts/components/related-prompts-list.vue"],"sourcesContent":["<script lang=\"ts\">\n import { computed, ComputedRef, defineComponent, h, inject, provide, Ref } from 'vue';\n import { RelatedPrompt } from '@empathyco/x-types';\n import { AnimationProp } from '../../../types/animation-prop';\n import { groupItemsBy } from '../../../utils/array';\n import ItemsList from '../../../components/items-list.vue';\n import { ListItem } from '../../../utils/types';\n import {\n HAS_MORE_ITEMS_KEY,\n LIST_ITEMS_KEY,\n QUERY_KEY\n } from '../../../components/decorators/injection.consts';\n import { relatedPromptsXModule } from '../x-module';\n import { useState } from '../../../composables/use-state';\n import { RelatedPromptsGroup } from '../types';\n\n /**\n * Component that inserts groups of related prompts in different positions of the injected search\n * items list, based on the provided configuration.\n *\n * @public\n */\n export default defineComponent({\n name: 'RelatedPromptsList',\n xModule: relatedPromptsXModule.name,\n props: {\n /**\n * Animation component that will be used to animate the related prompts groups.\n */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n /**\n * The first index to insert a group of related prompts at.\n */\n offset: {\n type: Number,\n default: 24\n },\n /**\n * The items cycle size to keep inserting related prompts groups at.\n */\n frequency: {\n type: Number,\n default: 24\n },\n /**\n * The maximum amount of related prompts to add in a single group.\n */\n maxRelatedPromptsPerGroup: {\n type: Number,\n default: 4\n },\n /**\n * The maximum number of groups to insert into the injected list items list.\n */\n maxGroups: {\n type: Number,\n default: undefined\n },\n /**\n * Determines if a group is added to the injected items list in case the number\n * of items is smaller than the offset.\n */\n showOnlyAfterOffset: {\n type: Boolean,\n default: false\n }\n },\n setup(props, { slots }) {\n const { query, status } = useState('relatedPrompts', ['query', 'status']);\n\n /**\n * The state related prompts.\n */\n const relatedPrompts: ComputedRef<RelatedPrompt[]> = useState('relatedPrompts', [\n 'relatedPrompts'\n ]).relatedPrompts;\n\n /**\n * Injected query, updated when the related request(s) have succeeded.\n */\n const injectedQuery = inject<Ref<string | undefined>>(QUERY_KEY as string);\n\n /**\n * Indicates if there are more available results than the injected.\n */\n const hasMoreItems = inject<Ref<boolean | undefined>>(HAS_MORE_ITEMS_KEY as string);\n\n /**\n * The grouped related prompts based on the given config.\n *\n * @returns A list of related prompts groups.\n */\n const relatedPromptsGroups = computed<RelatedPromptsGroup[]>(() =>\n Object.values(\n groupItemsBy(relatedPrompts.value, (_, index) =>\n Math.floor(index / props.maxRelatedPromptsPerGroup)\n )\n )\n .slice(0, props.maxGroups)\n .map((relatedPrompts, index) => ({\n modelName: 'RelatedPromptsGroup' as const,\n id: `related-prompts-group-${index}`,\n relatedPrompts\n }))\n );\n\n /**\n * It injects {@link ListItem} provided by an ancestor as injectedListItems.\n */\n const injectedListItems = inject<Ref<ListItem[]>>(LIST_ITEMS_KEY as string);\n\n /**\n * Checks if the related prompts are outdated taking into account the injected query.\n *\n * @returns True if the related prompts are outdated, false if not.\n */\n const relatedPromptsAreOutdated = computed(\n () =>\n !!injectedQuery?.value &&\n (query.value !== injectedQuery.value || status.value !== 'success')\n );\n\n /**\n * Checks if the number of items is smaller than the offset so a group\n * should be added to the injected items list.\n *\n * @returns True if a group should be added, false if not.\n */\n const hasNotEnoughListItems = computed(\n () =>\n !props.showOnlyAfterOffset &&\n !hasMoreItems?.value &&\n injectedListItems !== undefined &&\n injectedListItems.value.length > 0 &&\n props.offset > injectedListItems.value.length\n );\n\n /**\n * New list of {@link ListItem}s to render.\n *\n * @returns The new list of {@link ListItem}s with the related prompts groups inserted.\n */\n const items = computed((): ListItem[] => {\n if (!injectedListItems?.value) {\n return relatedPromptsGroups.value;\n }\n if (relatedPromptsAreOutdated.value) {\n return injectedListItems.value;\n }\n if (hasNotEnoughListItems.value) {\n return injectedListItems.value.concat(relatedPromptsGroups.value[0] ?? []);\n }\n return relatedPromptsGroups?.value.reduce(\n (items, relatedPromptsGroup, index) => {\n const targetIndex = props.offset + props.frequency * index;\n if (targetIndex <= items.length) {\n items.splice(targetIndex, 0, relatedPromptsGroup);\n }\n return items;\n },\n [...injectedListItems.value]\n );\n });\n\n /**\n * The computed list items of the entity that uses the mixin.\n *\n * @remarks It should be overridden in the component that uses the mixin and\n * it's intended to be filled with items from the state. Vue doesn't allow\n * mixins as abstract classes.\n * @returns An empty array as fallback in case it is not overridden.\n */\n provide(LIST_ITEMS_KEY as string, items);\n\n return () => {\n const innerProps = { items: items.value, animation: props.animation };\n // https://vue-land.github.io/faq/forwarding-slots#passing-all-slots\n return slots.default?.(innerProps)[0] ?? h(ItemsList, innerProps, slots);\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits no events.\n\n## See it in action\n\n <!-- prettier-ignore-start -->\n\n:::warning Backend microservice required To use this component, the <b>QuerySignals</b> microservice\nmust be implemented. :::\n\n <!-- prettier-ignore-end -->\n\nUsually, this component is going to be used together with the `ResultsList` one. Related prompts\ngroups will be inserted between the results, guiding users to discover new searches directly from\nthe results list.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <RelatedPromptsList />\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { RelatedPromptsList } from '@empathyco/x-components/related-prompts';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'RelatedPromptsListDemo',\n components: {\n RelatedPromptsList,\n ResultsList,\n SearchInput\n }\n };\n</script>\n```\n\n### Play with the index that related prompts groups are inserted at\n\nThe component allows to customise where are the related prompts groups inserted. In the following\nexample, the first group of related prompts will be inserted at the index `48` (`offset`), and then\na second group will be inserted at index `120` because of the `frequency` prop configured to `72`.\nFinally, a third group will be inserted at index `192`. Because `maxGroups` is configured to `3`, no\nmore groups will be inserted. Each one of this groups will have up to `6` related prompts\n(`maxRelatedPromptsPerGroup`).\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <RelatedPromptsList\n :offset=\"48\"\n :frequency=\"72\"\n :maxRelatedPromptsPerGroup=\"6\"\n :maxGroups=\"3\"\n />\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { RelatedPromptsList } from '@empathyco/x-components/related-prompts';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'RelatedPromptsListDemo',\n components: {\n RelatedPromptsList,\n ResultsList,\n SearchInput\n }\n };\n</script>\n```\n\n### Showing/hiding first related prompts group when no more items\n\nBy default, the first related prompts group will be inserted when the total number of results is\nsmaller than the offset, but this behavior can be deactivated by setting the `showOnlyAfterOffset`\nto `true`.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <RelatedPromptsList\n :offset=\"48\"\n :frequency=\"72\"\n :maxRelatedPromptsPerGroup=\"1\"\n :showOnlyAfterOffset=\"true\"\n />\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { RelatedPromptsList } from '@empathyco/x-components/related-prompts';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'RelatedPromptsListDemo',\n components: {\n RelatedPromptsList,\n ResultsList,\n SearchInput\n }\n };\n</script>\n```\n\n### Customise the layout of the component\n\nThis component will render by default the `id` of each search item, both the injected, and for the\ngroups of related prompts generated, but the common case is to integrate it with another layout\ncomponent, for example the `BaseGrid`. To do so, you can use the `default` slot\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <RelatedPromptsList\n :offset=\"48\"\n :frequency=\"72\"\n :maxRelatedPromptsPerGroup=\"6\"\n :maxGroups=\"3\"\n #default=\"{ items }\"\n >\n <BaseGrid :items=\"items\" :animation=\"animation\">\n <template #related-prompts-group=\"{ item }\">\n <span v-for=\"const prompt of items.relatedPrompts\">\n RelatedPromptsGroup:\n <pre>{{ prompt }}</pre>\n </span>\n </template>\n <template #result=\"{ item }\">\n <span>Result: {{ item.name }}</span>\n </template>\n <template #default=\"{ item }\">\n <span>Default: {{ item }}</span>\n </template>\n </BaseGrid>\n </RelatedPromptsList>\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { RelatedPromptsList } from '@empathyco/x-components/related-prompts';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { BaseGrid } from '@empathyco/x-components';\n\n export default {\n name: 'RelatedPromptsListDemo',\n components: {\n RelatedPromptsLis,\n ResultsList,\n BaseGrid,\n SearchInput\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ import _sfc_main from './related-prompts-list.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
6
+ //# sourceMappingURL=related-prompts-list.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"related-prompts-list.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,101 @@
1
+ import _sfc_main from './related-prompts-tag-list.vue2.js';
2
+ import { resolveComponent, openBlock, createBlock, withCtx, renderSlot, createVNode, TransitionGroup, createElementBlock, Fragment, renderList, normalizeClass, normalizeStyle } from 'vue';
3
+ import './related-prompts-tag-list.vue3.js';
4
+ import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
5
+
6
+ const _hoisted_1 = ["data-index"];
7
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
8
+ const _component_RelatedPrompt = resolveComponent("RelatedPrompt");
9
+ const _component_DisplayEmitter = resolveComponent("DisplayEmitter");
10
+ const _component_SlidingPanel = resolveComponent("SlidingPanel");
11
+ return openBlock(), createBlock(_component_SlidingPanel, {
12
+ key: _ctx.x.query.search,
13
+ "reset-on-content-change": false,
14
+ "button-class": _ctx.buttonClass,
15
+ "show-buttons": _ctx.showButtons && _ctx.selectedPromptIndex === -1,
16
+ "scroll-container-class": [
17
+ "x-related-prompts-tag-list-scroll-container",
18
+ _ctx.scrollContainerClass || ""
19
+ ]
20
+ }, {
21
+ "sliding-panel-left-button": withCtx(() => [
22
+ renderSlot(_ctx.$slots, "sliding-panel-left-button")
23
+ ]),
24
+ "sliding-panel-right-button": withCtx(() => [
25
+ renderSlot(_ctx.$slots, "sliding-panel-right-button")
26
+ ]),
27
+ default: withCtx(() => [
28
+ createVNode(TransitionGroup, {
29
+ onBeforeEnter: _ctx.onBeforeEnter,
30
+ onEnter: _ctx.onEnter,
31
+ onLeave: _ctx.onLeave,
32
+ class: "x-related-prompts-tag-list",
33
+ css: false,
34
+ tag: "ul",
35
+ appear: ""
36
+ }, {
37
+ default: withCtx(() => [
38
+ (openBlock(true), createElementBlock(
39
+ Fragment,
40
+ null,
41
+ renderList(_ctx.visibleRelatedPrompts, ({ index, ...relatedPrompt }) => {
42
+ return openBlock(), createElementBlock("li", {
43
+ ref_for: true,
44
+ ref: "listItems",
45
+ key: relatedPrompt.suggestionText,
46
+ class: normalizeClass(["x-related-prompts-tag-list-item", [_ctx.tagClass, _ctx.tagColors && _ctx.tagColors[index % _ctx.tagColors.length]]]),
47
+ "data-index": index,
48
+ style: normalizeStyle({
49
+ ..._ctx.selectedPromptIndex === index && { width: "100%" },
50
+ ..._ctx.isAnimating && { pointerEvents: "none" }
51
+ }),
52
+ "data-test": "related-prompts-tag-list-item"
53
+ }, [
54
+ renderSlot(_ctx.$slots, "default", {
55
+ relatedPrompt,
56
+ onSelect: () => _ctx.onSelect(index),
57
+ isSelected: _ctx.selectedPromptIndex === index
58
+ }, () => [
59
+ createVNode(_component_DisplayEmitter, {
60
+ payload: relatedPrompt.tagging?.toolingDisplayTagging,
61
+ eventMetadata: {
62
+ feature: "related-prompts",
63
+ displayOriginalQuery: _ctx.x.query.searchBox,
64
+ replaceable: false
65
+ }
66
+ }, {
67
+ default: withCtx(() => [
68
+ createVNode(_component_RelatedPrompt, {
69
+ onClick: ($event) => _ctx.onSelect(index),
70
+ "related-prompt": relatedPrompt,
71
+ selected: _ctx.selectedPromptIndex === index
72
+ }, {
73
+ "related-prompt-extra-content": withCtx(() => [
74
+ renderSlot(_ctx.$slots, "related-prompt-extra-content", { relatedPrompt })
75
+ ]),
76
+ _: 2
77
+ /* DYNAMIC */
78
+ }, 1032, ["onClick", "related-prompt", "selected"])
79
+ ]),
80
+ _: 2
81
+ /* DYNAMIC */
82
+ }, 1032, ["payload", "eventMetadata"])
83
+ ])
84
+ ], 14, _hoisted_1);
85
+ }),
86
+ 128
87
+ /* KEYED_FRAGMENT */
88
+ ))
89
+ ]),
90
+ _: 3
91
+ /* FORWARDED */
92
+ }, 8, ["onBeforeEnter", "onEnter", "onLeave"])
93
+ ]),
94
+ _: 3
95
+ /* FORWARDED */
96
+ }, 8, ["button-class", "show-buttons", "scroll-container-class"]);
97
+ }
98
+ var relatedPromptsTagList = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
99
+
100
+ export { relatedPromptsTagList as default };
101
+ //# sourceMappingURL=related-prompts-tag-list.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"related-prompts-tag-list.vue.js","sources":["../../../../../src/x-modules/related-prompts/components/related-prompts-tag-list.vue"],"sourcesContent":["<template>\n <SlidingPanel\n :key=\"x.query.search\"\n :reset-on-content-change=\"false\"\n :button-class=\"buttonClass\"\n :show-buttons=\"showButtons && selectedPromptIndex === -1\"\n :scroll-container-class=\"[\n 'x-related-prompts-tag-list-scroll-container',\n scrollContainerClass || ''\n ]\"\n >\n <template #sliding-panel-left-button>\n <!--\n @slot sliding-panel-left-button - The button to be displayed on the left side of the sliding panel.\n -->\n <slot name=\"sliding-panel-left-button\" />\n </template>\n <transition-group\n @before-enter=\"onBeforeEnter\"\n @enter=\"onEnter\"\n @leave=\"onLeave\"\n class=\"x-related-prompts-tag-list\"\n :css=\"false\"\n tag=\"ul\"\n appear\n >\n <li\n v-for=\"{ index, ...relatedPrompt } in visibleRelatedPrompts\"\n ref=\"listItems\"\n :key=\"relatedPrompt.suggestionText\"\n class=\"x-related-prompts-tag-list-item\"\n :class=\"[tagClass, tagColors && tagColors[index % tagColors.length]]\"\n :data-index=\"index\"\n :style=\"{\n ...(selectedPromptIndex === index && { width: '100%' }),\n ...(isAnimating && { pointerEvents: 'none' })\n }\"\n data-test=\"related-prompts-tag-list-item\"\n >\n <!--\n @slot - The slot to render related prompt information.\n @prop {Object} relatedPrompt - The related prompt object.\n @prop {Function} onSelect - The function to select the related prompt.\n @prop {Boolean} isSelected - Indicates if the related prompt is currently selected.\n -->\n <slot\n :relatedPrompt=\"relatedPrompt\"\n :onSelect=\"() => onSelect(index)\"\n :isSelected=\"selectedPromptIndex === index\"\n >\n <DisplayEmitter\n :payload=\"relatedPrompt.tagging?.toolingDisplayTagging\"\n :eventMetadata=\"{\n feature: 'related-prompts',\n displayOriginalQuery: x.query.searchBox,\n replaceable: false\n }\"\n >\n <RelatedPrompt\n @click=\"onSelect(index)\"\n :related-prompt=\"relatedPrompt\"\n :selected=\"selectedPromptIndex === index\"\n >\n <template #related-prompt-extra-content>\n <slot name=\"related-prompt-extra-content\" :relatedPrompt=\"relatedPrompt\" />\n </template>\n </RelatedPrompt>\n </DisplayEmitter>\n </slot>\n </li>\n </transition-group>\n <template #sliding-panel-right-button>\n <!--\n @slot sliding-panel-right-button - The button to be displayed on the right side of the sliding panel.\n -->\n <slot name=\"sliding-panel-right-button\" />\n </template>\n </SlidingPanel>\n</template>\n\n<script lang=\"ts\">\n import { RelatedPrompt as RelatedPromptModel } from '@empathyco/x-types';\n import { computed, ComputedRef, defineComponent, PropType, ref } from 'vue';\n import SlidingPanel from '../../../components/sliding-panel.vue';\n import { relatedPromptsXModule } from '../x-module';\n import { use$x, useState } from '../../../composables';\n import DisplayEmitter from '../../../components/display-emitter.vue';\n import RelatedPrompt from './related-prompt.vue';\n\n /**\n * This component shows the list of `RelatedPrompts` components.\n *\n * If the default slot is reimplemented in the consumer, `onSelect` function will be\n * necessary to handle the selection of the related prompt and to trigger the stagger-fade-slide animation.\n *\n * @public\n */\n export default defineComponent({\n name: 'RelatedPromptsTagList',\n xModule: relatedPromptsXModule.name,\n components: { DisplayEmitter, RelatedPrompt, SlidingPanel },\n props: {\n /**\n * The CSS class for the left and right button of the sliding panel.\n *\n * @public\n */\n buttonClass: String,\n /**\n * The boolean prop to handle the visiblity of sliding pannel buttons.\n *\n * @public\n */\n showButtons: { type: Boolean, default: true },\n /**\n * The CSS class for the wrapper of all the related prompt wrapper elements.\n *\n * @public\n */\n scrollContainerClass: String,\n /**\n * The CSS class for all the related prompt wrapper elements.\n *\n * @public\n */\n tagClass: String,\n /**\n * Array of colors to apply to the related prompts. It will be applied to tag\n * elements cyclically according to their index in the nex way: `tagColors[index % tagColors.length]`.\n *\n * @public\n */\n tagColors: Array as PropType<string[]>,\n /**\n * The duration of the total animation in milliseconds.\n *\n * @public\n */\n animationDurationInMs: {\n type: Number,\n default: 700\n }\n },\n setup(props) {\n const x = use$x();\n const relatedPrompts: ComputedRef<RelatedPromptModel[]> = useState('relatedPrompts', [\n 'relatedPrompts'\n ]).relatedPrompts;\n const selectedPromptIndex: ComputedRef<number> = useState('relatedPrompts', [\n 'selectedPrompt'\n ]).selectedPrompt;\n\n const clickedListItemIndex = ref<number | null>(null);\n const initialOffsetLefts: Record<number, number> = {};\n const isAnimating = ref(false);\n const listItems = ref<HTMLElement[]>([]);\n\n const sortedListItems = computed<HTMLElement[]>(() =>\n [...listItems.value].sort(\n (a: HTMLElement, b: HTMLElement) =>\n Number.parseInt(b.getAttribute('data-index')!) -\n Number.parseInt(a.getAttribute('data-index')!)\n )\n );\n\n // The duration of a single animation (enter or leave) in milliseconds\n // if a related prompt is clicked (clickedListItemIndex.value !== null), the duration is divided by the number of related\n // prompts -1 (the clicked one is synchronized with the last one to leave or the first one to enter)\n const singleAnimationDurationInMs = computed(\n () =>\n props.animationDurationInMs /\n (clickedListItemIndex.value !== null\n ? relatedPrompts.value.length - 1\n : relatedPrompts.value.length)\n );\n\n const indexRelatedPrompts = computed(() =>\n relatedPrompts.value.map((relatedPrompt, index) => ({ ...relatedPrompt, index }))\n );\n\n const visibleRelatedPrompts = computed(() =>\n selectedPromptIndex.value !== -1\n ? [indexRelatedPrompts.value[selectedPromptIndex.value]]\n : indexRelatedPrompts.value\n );\n\n let timeOutId: number;\n const resetTransitionStyle = (excludedProperties: Array<string> = ['width']) => {\n if (timeOutId) {\n clearTimeout(timeOutId);\n }\n\n isAnimating.value = true;\n timeOutId = +setTimeout(() => {\n isAnimating.value = false;\n clickedListItemIndex.value = null;\n\n sortedListItems.value.forEach(element => {\n element.style.cssText\n .split(';')\n .map(rule => rule.split(':')[0]?.trim())\n .forEach(property => {\n if (!excludedProperties.includes(property)) {\n element.style.removeProperty(property);\n }\n });\n });\n }, props.animationDurationInMs);\n };\n\n const onSelect = (selectedIndex: number): void => {\n resetTransitionStyle();\n\n clickedListItemIndex.value = selectedIndex;\n const selected: HTMLElement = sortedListItems.value.find(\n element => Number.parseInt(element.getAttribute('data-index')!) === selectedIndex\n )!;\n\n // selectedPromptIndex.value === -1 ? 'SELECTING' : 'DESELECTING'\n if (selectedPromptIndex.value === -1) {\n // Prepare all the elements for the leave animation (~ 'beforeLeave' hook). Remember the elements are\n // sorted in descending order by index.\n sortedListItems.value.forEach(element => {\n const index = Number.parseInt(element.getAttribute('data-index')!);\n\n initialOffsetLefts[index] = element.offsetLeft;\n element.style.left = `${element.offsetLeft}px`;\n element.style.position = 'absolute';\n element.style.transitionDuration = `${singleAnimationDurationInMs.value}ms`;\n\n if (index !== selectedIndex) {\n element.style.opacity = '1';\n element.style.transitionDelay = `${\n (index < selectedIndex ? index : index - 1) * singleAnimationDurationInMs.value\n }ms`;\n }\n });\n\n // Synchronize the transition delay of the selected element with the last\n // element to leave\n selected.style.transitionDelay = `${\n (relatedPrompts.value.length > 1 ? relatedPrompts.value.length - 2 : 0) *\n singleAnimationDurationInMs.value\n }ms`;\n\n // Trigger the animation (selecting) for the selected element\n requestAnimationFrame(() => {\n const maxWidth = getComputedStyle(selected).maxWidth;\n\n selected.style.left = '0px';\n selected.style.setProperty(\n 'width',\n `${maxWidth !== 'none' ? maxWidth : '100%'}`,\n 'important'\n );\n });\n } else {\n // Prepare the selected element for the deselecting animation\n selected.style.transitionDuration = `${singleAnimationDurationInMs.value}ms`;\n selected.style.left = '0px';\n selected.style.position = 'absolute';\n\n // Trigger the animation (deselecting) for the selected element\n selected.style.removeProperty('width');\n requestAnimationFrame(() => {\n selected.style.left = `${initialOffsetLefts[selectedIndex]}px`;\n });\n }\n\n x.emit('UserSelectedARelatedPrompt', selectedIndex, {\n relatedPrompt: relatedPrompts.value[selectedIndex],\n selectedPrompt: selectedPromptIndex.value\n });\n };\n\n const onBeforeEnter = (el: Element) => {\n const element = el as HTMLElement;\n const index = Number.parseInt(element.getAttribute('data-index')!);\n\n // Prepare the element for the enter animation\n element.style.opacity = '0';\n element.style.transform = 'translateY(5px)';\n element.style.transitionDelay = `${\n (clickedListItemIndex.value !== null && index > clickedListItemIndex.value\n ? index - 1\n : index) * singleAnimationDurationInMs.value\n }ms`;\n element.style.transitionDuration = `${singleAnimationDurationInMs.value}ms`;\n };\n\n const onEnter = (el: Element, done: () => void) => {\n const element = el as HTMLElement;\n const index = Number.parseInt(element.getAttribute('data-index')!);\n\n // Also part of the preparation for the enter animation, but it needs to be done\n // once the element is inserted in DOM (if not the offsetLeft will be always 0)\n element.style.left = `${initialOffsetLefts[index] ?? element.offsetLeft}px`;\n\n // trigger enter animation\n requestAnimationFrame(() => {\n element.style.opacity = '1';\n element.style.position = 'absolute';\n element.style.transform = 'translateY(0)';\n });\n\n done();\n };\n\n const onLeave = (el: Element, done: () => void) => {\n const element = el as HTMLElement;\n\n // trigger leave animation\n requestAnimationFrame(() => {\n element.style.opacity = '0';\n element.style.transform = 'translateY(5px)';\n });\n\n // Wait for the animation to finish (done() exectution extracts the element from the DOM)\n setTimeout(done, props.animationDurationInMs);\n };\n\n // Changing the request will trigger the appear animation, so we need to reset the\n // style after it finishes\n x.on('SearchRequestChanged', false).subscribe(() => {\n resetTransitionStyle([]);\n });\n\n return {\n onSelect,\n onBeforeEnter,\n onEnter,\n onLeave,\n selectedPromptIndex,\n visibleRelatedPrompts,\n listItems,\n isAnimating,\n x\n };\n }\n });\n</script>\n\n<style lang=\"css\">\n .x-related-prompts-tag-list-scroll-container {\n height: 100%;\n position: relative;\n }\n .x-related-prompts-tag-list {\n display: flex;\n gap: 16px;\n min-width: 100%;\n width: 100%;\n }\n .x-related-prompts-tag-list-item {\n height: 100%;\n flex-shrink: 0;\n }\n</style>\n"],"names":["_resolveComponent","_openBlock","_createBlock","buttonClass","showButtons","scrollContainerClass","_renderSlot","_withCtx","onBeforeEnter","onEnter","onLeave","_createElementBlock","_Fragment","_renderList","_normalizeClass","selectedPromptIndex","isAnimating","_normalizeStyle","onSelect","_createVNode"],"mappings":";;;;;;;;;kCACEA,gBA4Ee,CAAA,cAAA,CAAA,CAAA;SA1EZC,SAA8B,EAAA,EAAAC,WAAA,CAAA,uBAAA,EAAA;AAAA,IAC9B,GAAcC,EAAAA,IAAAA,CAAAA,CAAAA,CAAAA,KAAAA,CAAAA,MAAAA;AAAAA,IACd,yBAAcC,EAAAA,KAAAA;AAAAA,IACd,cAAA,EAAA,IAAA,CAAA,WAAA;AAAA,IAAA,cAAA,EAAA,IAAA,CAAA,WAAA,IAAA,IAAA,CAAA,mBAAA,KAAA,CAAA,CAAA;AAAqFC,IAAAA,wBAAAA,EAAAA;AAAAA,MAAAA,6CAAAA;;AAK3E,KAAA;AAAA,GAAA,EAAA;;MA4DAC,UAIiC,CAAA,IAAA,CAAA,MAAA,EAAA,2BAAA,CAAA;AAAA,KAAA,CAAA;;MA3EhDA,UAsEuB,CAAA,IAAA,CAAA,MAAA,EAAA,4BAAA,CAAA;AAAA,KAAA,CAAA;AApDhB,IAAA,OAAA,EAAAC,OAAA,CAAY,MAAEC;AAAAA,MAAAA,WAAAA,CACPC,eAAO,EAAA;AAAA,QACd,aAAOC,EAAAA,IAAAA,CAAAA,aAAAA;AAAAA,QACR,OAAM,EAAA,IAAA,CAAA,OAAA;AAAA,QACL,SAAK,IAAK,CAAA,OAAA;AAAA,QACX,KAAI,EAAA,4BAAA;AAAA,QACJ,GAAA,EAAA,KAAA;AAAA,QAAA,GAAA,EAAA,IAAA;AAxBN,QAAA,MAAA,EAAA,EAAA;AAAA,OAAA,EAAA;;AAAA,WAAAT,SAAA,CAAA,IAAA,CAAA,EAAAU,kBAAA;AAAA,YAAAC,QAAA;AAAA,YAAA,IAAA;AAAA,YAAAC,UAAA,CAAA,IAAA,CAAA,qBAAA,EAAA,CAAA,EAAA,KAAA,EAAA,GAAA,aAAA,EAAA,KAAA;qBA4BYZ,SAAW,EAAA,EAAAU,kBAAA,CAAA,IAAA,EAAA;AAAA,gBACd,OAAK,EAAA,IAAA;AAAA,gBACN,GAAK,EAAA,WAAA;AAAA,gBAEJ,GAAiB,EAAA,aAAA,CAAA,cAAA;AAAA,gBACjB,KAjCT,EAAAG,cAAA,CAAA,CAAA,iCAAA,EAAA,CAAA,IAAA,CAAA,QAAA,EAAA,IAAA,CAAA,SAAA,IAAA,IAAA,CAAA,SAAA,CAAA,KAAA,GAAA,IAAA,CAAA,SAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA;AAAA,gBAiCgCC,YAAAA,EAAAA,KAAAA;AAAAA,gBAAmEC,KAAW,EAAAC,cAAA,CAAA;AAAA,kBAAA,GAAA,IAAA,CAAA,mBAAA,KAAA,KAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA;AAItG,kBAAA,GAAA,IAAA,CAAA,WAAA,IAAU,EAA+B,aAAA,EAAA,MAAA,EAAA;AAAA,iBAAA,CAAA;gBAQzC,WAuBO,EAAA,+BAAA;AAAA,eAAA,EAAA;AArBI,gBAAAX,UAAA,CAAA,IAAA,CAAA,MAAA,EAAQY,SAAS,EAAA;AAAA,kBACzB,aAAA;AAAA,kBAoBI,QAAA,EAAA,MAAA,IAAA,CAAA,QAAA,CAAA,KAAA,CAAA;AAAA,kBAlBL,UAiBiB,EAAA,IAAA,CAAA,mBAAA,KAAA,KAAA;AAAA,iBAhBd,EAAA,MAAA;AAAA,kBAAAC,WAAA,CACA,yBAAa,EAAA;AAAA,oBAAA,OAAA,EAAA,aAAA,CAAA,OAAA,EAAA,qBAAA;;;;;;;AAOX,oBAAA,OAAA,EAAAZ,OAAA,CAAK,MAAEW;AAAAA,sBAAAA,WAAAA,CACP,wBAA6B,EAAA;AAAA,wBAC7B,OAAA,EAAQ,CAAEH,MAAAA,KAAAA,IAAAA,CAAAA,QAAAA,CAAmB,KAAK,CAAA;AAAA,wBAAA,gBAAA,EAAA,aAAA;wBAExB,QAA4B,EAAA,IAAA,CAAA,mBAAA,KAAA,KAAA;AAAA,uBAAA,EAAA;;AA/DrD,0BAAAT,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,8BAAA,EAAA,EAAA,aAAA,EAAA,CAAA;AAAA,yBAAA,CAAA;;;AAAA,uBAAA,EAAA,IAAA,EAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,UAAA,CAAA,CAAA;AAAA,qBAAA,CAAA;;;AAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,SAAA,EAAA,eAAA,CAAA,CAAA;AAAA,iBAAA,CAAA;;AAAA,aAAA,CAAA;AAAA,YAAA,GAAA;AAAA;AAAA,WAAA;AAAA,SAAA,CAAA;;;AAAA,OAAA,EAAA,CAAA,EAAA,CAAA,eAAA,EAAA,SAAA,EAAA,SAAA,CAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}