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

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 (823) hide show
  1. package/CHANGELOG.md +522 -0
  2. package/core/index.js +8 -1
  3. package/core/index.js.map +1 -1
  4. package/design-system/deprecated-full-theme.css +1647 -1648
  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.basetogglepanel.md +3 -3
  49. package/docs/API-reference/api/x-components.basevariablecolumngrid.md +3 -3
  50. package/docs/API-reference/api/x-components.cancelfetchandsaverelatedprompts.md +13 -0
  51. package/docs/API-reference/api/x-components.configmutations.config.md +11 -0
  52. package/docs/API-reference/api/x-components.configmutations.md +29 -0
  53. package/docs/API-reference/api/x-components.configmutations.mergeconfig.md +24 -0
  54. package/docs/API-reference/api/x-components.configmutations.setconfig.md +24 -0
  55. package/docs/API-reference/api/x-components.createrelatedtagsquerygetter.md +26 -0
  56. package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.getrelatedtags.md +13 -0
  57. package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.md +20 -0
  58. package/docs/API-reference/api/x-components.createtrackrelatedprompttoolingdisplayclickwire.md +19 -0
  59. package/docs/API-reference/api/x-components.createtracktoolingadd2cartwire.md +19 -0
  60. package/docs/API-reference/api/x-components.createtracktoolingdisplaywire.md +19 -0
  61. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice._constructor_.md → x-components.defaultexternaltaggingservice._constructor_.md} +3 -3
  62. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.add_to_cart_id_key.md +13 -0
  63. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.instance.md +13 -0
  64. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.localstorageservice.md +11 -0
  65. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.md +43 -0
  66. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.movetosessionstorage.md → x-components.defaultexternaltaggingservice.movetosessionstorage.md} +2 -2
  67. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.result_clicked_id_key.md +13 -0
  68. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.sessionstorageservice.md +11 -0
  69. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagekey.md +11 -0
  70. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagettlms.md +11 -0
  71. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.store.md → x-components.defaultexternaltaggingservice.store.md} +2 -2
  72. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storeaddtocart.md +24 -0
  73. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.storeresultclicked.md → x-components.defaultexternaltaggingservice.storeresultclicked.md} +3 -3
  74. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.trackaddtocart.md → x-components.defaultexternaltaggingservice.trackaddtocart.md} +3 -3
  75. package/docs/API-reference/api/x-components.displayclickprovider.md +66 -0
  76. package/docs/API-reference/api/x-components.empathize.md +6 -6
  77. package/docs/API-reference/api/x-components.empathizemutations.md +1 -1
  78. package/docs/API-reference/api/x-components.externaltaggingservice.md +23 -0
  79. package/docs/API-reference/api/{x-components.pdpaddtocartservice.movetosessionstorage.md → x-components.externaltaggingservice.movetosessionstorage.md} +2 -2
  80. package/docs/API-reference/api/x-components.externaltaggingservice.storeaddtocart.md +24 -0
  81. package/docs/API-reference/api/{x-components.pdpaddtocartservice.storeresultclicked.md → x-components.externaltaggingservice.storeresultclicked.md} +3 -3
  82. package/docs/API-reference/api/{x-components.pdpaddtocartservice.trackaddtocart.md → x-components.externaltaggingservice.trackaddtocart.md} +3 -3
  83. package/docs/API-reference/api/x-components.facets.md +3 -3
  84. package/docs/API-reference/api/x-components.facetsmutations.md +1 -1
  85. package/docs/API-reference/api/x-components.featurelocation.md +1 -1
  86. package/docs/API-reference/api/x-components.fetchandsaverelatedprompts.md +13 -0
  87. package/docs/API-reference/api/x-components.fetchrelatedprompts.md +13 -0
  88. package/docs/API-reference/api/x-components.filterslist.md +3 -3
  89. package/docs/API-reference/api/x-components.globalxbus.md +14 -0
  90. package/docs/API-reference/api/x-components.hierarchicalfilter.md +9 -2
  91. package/docs/API-reference/api/x-components.historyqueriesmutations.md +1 -1
  92. package/docs/API-reference/api/x-components.historyqueriesstate.md +1 -1
  93. package/docs/API-reference/api/x-components.identifierresults.md +3 -3
  94. package/docs/API-reference/api/x-components.identifierresultsmutations.md +1 -1
  95. package/docs/API-reference/api/x-components.identifierresultsstate.md +1 -1
  96. package/docs/API-reference/api/x-components.installxoptions.domelement.md +1 -1
  97. package/docs/API-reference/api/x-components.installxoptions.installextraplugins.md +2 -2
  98. package/docs/API-reference/api/x-components.installxoptions.md +1 -1
  99. package/docs/API-reference/api/x-components.itemslist.md +3 -3
  100. package/docs/API-reference/api/x-components.mainmodal.md +2 -2
  101. package/docs/API-reference/api/x-components.md +38 -3
  102. package/docs/API-reference/api/x-components.mergeconfig.md +27 -0
  103. package/docs/API-reference/api/x-components.multicolumnmaxwidthlayout.md +5 -5
  104. package/docs/API-reference/api/x-components.myhistory.md +3 -3
  105. package/docs/API-reference/api/x-components.nextqueriesgroup.md +22 -0
  106. package/docs/API-reference/api/x-components.nextqueriesgroup.modelname.md +11 -0
  107. package/docs/API-reference/api/x-components.nextqueriesgroup.nextqueries.md +11 -0
  108. package/docs/API-reference/api/x-components.nextquerieslist.md +3 -3
  109. package/docs/API-reference/api/x-components.nextqueriesmutations.md +1 -1
  110. package/docs/API-reference/api/x-components.nextqueriesstate.md +1 -1
  111. package/docs/API-reference/api/x-components.pageselector.md +80 -0
  112. package/docs/API-reference/api/x-components.partialresultslist.md +3 -3
  113. package/docs/API-reference/api/x-components.popularsearchesmutations.md +1 -1
  114. package/docs/API-reference/api/x-components.promotedslist.md +3 -3
  115. package/docs/API-reference/api/x-components.queriespreviewmutations.md +1 -1
  116. package/docs/API-reference/api/x-components.queryfeature.md +1 -1
  117. package/docs/API-reference/api/x-components.querymutations.md +20 -0
  118. package/docs/API-reference/api/x-components.querymutations.setquery.md +24 -0
  119. package/docs/API-reference/api/x-components.querypreviewlist.md +3 -3
  120. package/docs/API-reference/api/x-components.querystate.md +20 -0
  121. package/docs/API-reference/api/x-components.querystate.query.md +13 -0
  122. package/docs/API-reference/api/x-components.querysuggestionsmutations.md +1 -1
  123. package/docs/API-reference/api/x-components.querysuggestionsstate.md +1 -1
  124. package/docs/API-reference/api/x-components.recommendations.md +3 -3
  125. package/docs/API-reference/api/x-components.recommendationsmutations.md +1 -1
  126. package/docs/API-reference/api/x-components.relatedprompt.md +33 -0
  127. package/docs/API-reference/api/x-components.relatedpromptsactioncontext.md +15 -0
  128. package/docs/API-reference/api/x-components.relatedpromptsactions.cancelfetchandsaverelatedprompts.md +17 -0
  129. package/docs/API-reference/api/x-components.relatedpromptsactions.fetchandsaverelatedprompts.md +24 -0
  130. package/docs/API-reference/api/x-components.relatedpromptsactions.fetchrelatedprompts.md +24 -0
  131. package/docs/API-reference/api/x-components.relatedpromptsactions.md +23 -0
  132. package/docs/API-reference/api/x-components.relatedpromptsactions.seturlparams.md +24 -0
  133. package/docs/API-reference/api/x-components.relatedpromptsgetters.md +21 -0
  134. package/docs/API-reference/api/x-components.relatedpromptsgetters.query.md +13 -0
  135. package/docs/API-reference/api/x-components.relatedpromptsgetters.request.md +13 -0
  136. package/docs/API-reference/api/x-components.relatedpromptslist.md +72 -0
  137. package/docs/API-reference/api/x-components.relatedpromptsmutations.md +27 -0
  138. package/docs/API-reference/api/x-components.relatedpromptsmutations.resetrelatedpromptsstate.md +17 -0
  139. package/docs/API-reference/api/x-components.relatedpromptsmutations.resetselectedprompt.md +17 -0
  140. package/docs/API-reference/api/x-components.relatedpromptsmutations.setparams.md +24 -0
  141. package/docs/API-reference/api/x-components.relatedpromptsmutations.setrelatedpromptsproducts.md +24 -0
  142. package/docs/API-reference/api/x-components.relatedpromptsmutations.setrelatedpromptsrelatedtags.md +24 -0
  143. package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedprompt.md +24 -0
  144. package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedquery.md +24 -0
  145. package/docs/API-reference/api/x-components.relatedpromptsstate.md +25 -0
  146. package/docs/API-reference/api/x-components.relatedpromptsstate.params.md +13 -0
  147. package/docs/API-reference/api/x-components.relatedpromptsstate.relatedprompts.md +13 -0
  148. package/docs/API-reference/api/x-components.relatedpromptsstate.relatedtags.md +13 -0
  149. package/docs/API-reference/api/x-components.relatedpromptsstate.selectedprompt.md +13 -0
  150. package/docs/API-reference/api/x-components.relatedpromptsstate.selectedquery.md +13 -0
  151. package/docs/API-reference/api/x-components.relatedpromptstaglist.md +72 -0
  152. package/docs/API-reference/api/x-components.relatedpromptsxevents.md +25 -0
  153. package/docs/API-reference/api/x-components.relatedpromptsxevents.relatedpromptsrequestupdated.md +13 -0
  154. package/docs/API-reference/api/x-components.relatedpromptsxevents.selectedrelatedpromptchanged.md +13 -0
  155. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptadd2cart.md +13 -0
  156. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptresult.md +13 -0
  157. package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedprompt.md +13 -0
  158. package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedpromptquery.md +13 -0
  159. package/docs/API-reference/api/x-components.relatedpromptsxmodule.md +13 -0
  160. package/docs/API-reference/api/x-components.relatedpromptsxstoremodule.md +15 -0
  161. package/docs/API-reference/api/x-components.relatedtags.md +3 -3
  162. package/docs/API-reference/api/x-components.relatedtagsmutations.md +1 -1
  163. package/docs/API-reference/api/x-components.relatedtagsstate.md +1 -1
  164. package/docs/API-reference/api/x-components.resultfeature.md +1 -1
  165. package/docs/API-reference/api/x-components.resultslist.md +3 -3
  166. package/docs/API-reference/api/x-components.scrolltotop.md +5 -5
  167. package/docs/API-reference/api/x-components.searchboxmutations.md +1 -1
  168. package/docs/API-reference/api/x-components.searchboxstate.md +1 -1
  169. package/docs/API-reference/api/x-components.searchconfig.md +1 -0
  170. package/docs/API-reference/api/x-components.searchconfig.pagemode.md +11 -0
  171. package/docs/API-reference/api/x-components.searchinputplaceholder.md +3 -3
  172. package/docs/API-reference/api/x-components.searchmutations.md +2 -1
  173. package/docs/API-reference/api/x-components.searchmutations.setstats.md +24 -0
  174. package/docs/API-reference/api/x-components.searchstate.md +2 -1
  175. package/docs/API-reference/api/x-components.searchstate.stats.md +13 -0
  176. package/docs/API-reference/api/x-components.searchxevents.md +1 -0
  177. package/docs/API-reference/api/x-components.searchxevents.userselectedapage.md +13 -0
  178. package/docs/API-reference/api/x-components.selectedfilterslist.md +3 -3
  179. package/docs/API-reference/api/x-components.semanticqueriesgetters.md +1 -0
  180. package/docs/API-reference/api/x-components.semanticqueriesgetters.query.md +13 -0
  181. package/docs/API-reference/api/x-components.semanticqueriesmutations.md +2 -1
  182. package/docs/API-reference/api/x-components.semanticqueriesmutations.setsemanticqueriesrelatedtags.md +24 -0
  183. package/docs/API-reference/api/x-components.semanticqueriesstate.md +2 -1
  184. package/docs/API-reference/api/x-components.semanticqueriesstate.relatedtags.md +13 -0
  185. package/docs/API-reference/api/x-components.setconfig.md +27 -0
  186. package/docs/API-reference/api/x-components.setquery.md +25 -0
  187. package/docs/API-reference/api/x-components.seturlprompt.md +13 -0
  188. package/docs/API-reference/api/x-components.simplefilter.md +7 -0
  189. package/docs/API-reference/api/x-components.singlecolumnlayout.md +3 -3
  190. package/docs/API-reference/api/x-components.slidingpanel.md +13 -5
  191. package/docs/API-reference/api/x-components.snippetcallbacks.md +7 -0
  192. package/docs/API-reference/api/x-components.sortdropdown.md +1 -1
  193. package/docs/API-reference/api/x-components.tagging.md +6 -6
  194. package/docs/API-reference/api/x-components.taggingconfig.md +2 -2
  195. package/docs/API-reference/api/{x-components.taggingconfig.clickedresultstoragekey.md → x-components.taggingconfig.storagekey.md} +3 -3
  196. package/docs/API-reference/api/x-components.taggingconfig.storagettlms.md +13 -0
  197. package/docs/API-reference/api/x-components.taggingmutations.md +1 -1
  198. package/docs/API-reference/api/x-components.taggingxevents.md +1 -1
  199. package/docs/API-reference/api/x-components.taggingxevents.resulturltrackingenabled.md +1 -1
  200. package/docs/API-reference/api/x-components.trackrelatedprompttoolingdisplayclickwire.md +13 -0
  201. package/docs/API-reference/api/x-components.tracktoolingadd2cartwire.md +13 -0
  202. package/docs/API-reference/api/x-components.tracktoolingdisplayclickedwire.md +13 -0
  203. package/docs/API-reference/api/x-components.typing.md +13 -0
  204. package/docs/API-reference/api/x-components.typingoptions.md +22 -0
  205. package/docs/API-reference/api/x-components.typingoptions.speed.md +13 -0
  206. package/docs/API-reference/api/x-components.typingoptions.targetattr.md +18 -0
  207. package/docs/API-reference/api/x-components.typingoptions.text.md +13 -0
  208. package/docs/API-reference/api/x-components.urlmutations.md +2 -1
  209. package/docs/API-reference/api/x-components.urlmutations.setprompt.md +24 -0
  210. package/docs/API-reference/api/x-components.urlparams.md +1 -0
  211. package/docs/API-reference/api/x-components.urlparams.prompt.md +11 -0
  212. package/docs/API-reference/api/x-components.urlstate.md +1 -1
  213. package/docs/API-reference/api/x-components.usealiasapi.md +1 -0
  214. package/docs/API-reference/api/x-components.usealiasapi.pricestats.md +16 -0
  215. package/docs/API-reference/api/x-components.xeventstypes.md +3 -3
  216. package/docs/API-reference/api/x-components.xmodulestree.md +1 -0
  217. package/docs/API-reference/api/x-components.xmodulestree.relatedprompts.md +11 -0
  218. package/docs/API-reference/api/x-types.md +2 -0
  219. package/docs/API-reference/api/x-types.relatedprompt.md +4 -1
  220. package/docs/API-reference/api/x-types.relatedprompt.nextqueries.md +1 -1
  221. package/docs/API-reference/api/x-types.relatedprompt.relatedpromptnextqueries.md +13 -0
  222. package/docs/API-reference/api/x-types.relatedprompt.tagging.md +17 -0
  223. package/docs/API-reference/api/x-types.relatedprompt.toolingdisplaytagging.md +13 -0
  224. package/docs/API-reference/api/x-types.relatedpromptnextquery.md +23 -0
  225. package/docs/API-reference/api/x-types.relatedpromptnextquery.query.md +13 -0
  226. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayadd2carttagging.md +13 -0
  227. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayclicktagging.md +13 -0
  228. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplaytagging.md +13 -0
  229. package/docs/API-reference/api/x-types.searchresponse.md +1 -0
  230. package/docs/API-reference/api/x-types.searchresponse.stats.md +11 -0
  231. package/docs/API-reference/api/x-types.stats.md +22 -0
  232. package/docs/API-reference/api/x-types.stats.price.md +14 -0
  233. package/docs/API-reference/components/common/result/x-components.base-result-image.md +2 -2
  234. package/docs/API-reference/components/common/x-components.base-slider.md +189 -0
  235. package/docs/API-reference/components/common/x-components.display-click-provider.md +17 -0
  236. package/docs/API-reference/components/common/x-components.items-list.md +1 -1
  237. package/docs/API-reference/components/common/x-components.page-selector.md +136 -0
  238. package/docs/API-reference/components/common/x-components.sliding-panel.md +7 -7
  239. package/docs/API-reference/components/facets/x-components.facets/facets.md +1 -1
  240. package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +1 -1
  241. package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +22 -0
  242. package/docs/API-reference/components/related-prompts/x-components.related-prompts-list.md +196 -0
  243. package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +32 -0
  244. package/docs/API-reference/components/search/x-components.results-list.md +1 -1
  245. package/docs/API-reference/components/tagging/x-components.tagging.md +15 -16
  246. package/js/components/animations/fade-and-slide.vue.js +1 -2
  247. package/js/components/animations/fade-and-slide.vue.js.map +1 -1
  248. package/js/components/base-dropdown.vue.js +1 -3
  249. package/js/components/base-dropdown.vue.js.map +1 -1
  250. package/js/components/base-dropdown.vue2.js +1 -7
  251. package/js/components/base-dropdown.vue2.js.map +1 -1
  252. package/js/components/base-event-button.vue.js +1 -2
  253. package/js/components/base-event-button.vue.js.map +1 -1
  254. package/js/components/base-grid.vue.js +11 -18
  255. package/js/components/base-grid.vue.js.map +1 -1
  256. package/js/components/base-grid.vue2.js.map +1 -1
  257. package/js/components/base-grid.vue3.js +1 -1
  258. package/js/components/base-keyboard-navigation.vue.js +1 -2
  259. package/js/components/base-keyboard-navigation.vue.js.map +1 -1
  260. package/js/components/base-rating.vue.js +1 -3
  261. package/js/components/base-rating.vue.js.map +1 -1
  262. package/js/components/base-slider.vue.js +65 -0
  263. package/js/components/base-slider.vue.js.map +1 -0
  264. package/js/components/base-slider.vue2.js +109 -0
  265. package/js/components/base-slider.vue2.js.map +1 -0
  266. package/js/components/base-slider.vue3.js +7 -0
  267. package/js/components/base-slider.vue3.js.map +1 -0
  268. package/js/components/base-switch.vue.js.map +1 -1
  269. package/js/components/base-switch.vue2.js +3 -7
  270. package/js/components/base-switch.vue2.js.map +1 -1
  271. package/js/components/base-variable-column-grid.vue.js +1 -2
  272. package/js/components/base-variable-column-grid.vue.js.map +1 -1
  273. package/js/components/column-picker/base-column-picker-dropdown.vue.js +1 -3
  274. package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
  275. package/js/components/column-picker/base-column-picker-list.vue.js +1 -3
  276. package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
  277. package/js/components/display-click-provider.vue.js +74 -0
  278. package/js/components/display-click-provider.vue.js.map +1 -0
  279. package/js/components/display-click-provider.vue2.js +6 -0
  280. package/js/components/display-click-provider.vue2.js.map +1 -0
  281. package/js/components/filters/labels/base-rating-filter-label.vue.js +1 -3
  282. package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
  283. package/js/components/icons/cross-tiny.vue.js +2 -2
  284. package/js/components/icons/plus.vue.js +2 -2
  285. package/js/components/items-list.vue.js +1 -2
  286. package/js/components/items-list.vue.js.map +1 -1
  287. package/js/components/items-list.vue2.js +2 -2
  288. package/js/components/items-list.vue2.js.map +1 -1
  289. package/js/components/layouts/fixed-header-and-asides-layout.vue.js +1 -7
  290. package/js/components/layouts/fixed-header-and-asides-layout.vue.js.map +1 -1
  291. package/js/components/layouts/multi-column-max-width-layout.vue.js +1 -9
  292. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  293. package/js/components/layouts/single-column-layout.vue.js +1 -9
  294. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  295. package/js/components/modals/base-events-modal-close.vue.js +1 -2
  296. package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
  297. package/js/components/modals/base-events-modal-open.vue.js +1 -2
  298. package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
  299. package/js/components/modals/base-id-modal-close.vue.js +1 -2
  300. package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
  301. package/js/components/modals/base-id-modal-open.vue.js +1 -2
  302. package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
  303. package/js/components/modals/base-modal.vue.js +1 -2
  304. package/js/components/modals/base-modal.vue.js.map +1 -1
  305. package/js/components/modals/base-modal.vue2.js +13 -6
  306. package/js/components/modals/base-modal.vue2.js.map +1 -1
  307. package/js/components/page-loader-button.vue.js +8 -10
  308. package/js/components/page-loader-button.vue.js.map +1 -1
  309. package/js/components/page-loader-button.vue2.js.map +1 -1
  310. package/js/components/page-loader-button.vue3.js +7 -0
  311. package/js/components/page-loader-button.vue3.js.map +1 -0
  312. package/js/components/page-selector.vue.js +78 -0
  313. package/js/components/page-selector.vue.js.map +1 -0
  314. package/js/components/page-selector.vue2.js +128 -0
  315. package/js/components/page-selector.vue2.js.map +1 -0
  316. package/js/components/page-selector.vue3.js +7 -0
  317. package/js/components/page-selector.vue3.js.map +1 -0
  318. package/js/components/panels/base-header-toggle-panel.vue.js +1 -5
  319. package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
  320. package/js/components/panels/base-id-toggle-panel-button.vue.js +1 -2
  321. package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
  322. package/js/components/panels/base-id-toggle-panel.vue.js +1 -2
  323. package/js/components/panels/base-id-toggle-panel.vue.js.map +1 -1
  324. package/js/components/panels/base-tabs-panel.vue.js +1 -4
  325. package/js/components/panels/base-tabs-panel.vue.js.map +1 -1
  326. package/js/components/panels/base-toggle-panel.vue.js +1 -2
  327. package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
  328. package/js/components/result/base-result-add-to-cart.vue.js +3 -3
  329. package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
  330. package/js/components/result/base-result-add-to-cart.vue2.js +19 -5
  331. package/js/components/result/base-result-add-to-cart.vue2.js.map +1 -1
  332. package/js/components/result/base-result-current-price.vue.js +1 -2
  333. package/js/components/result/base-result-current-price.vue.js.map +1 -1
  334. package/js/components/result/base-result-image.vue.js +39 -59
  335. package/js/components/result/base-result-image.vue.js.map +1 -1
  336. package/js/components/result/base-result-image.vue2.js +5 -5
  337. package/js/components/result/base-result-image.vue2.js.map +1 -1
  338. package/js/components/result/base-result-link.vue.js +1 -2
  339. package/js/components/result/base-result-link.vue.js.map +1 -1
  340. package/js/components/result/base-result-previous-price.vue.js +1 -2
  341. package/js/components/result/base-result-previous-price.vue.js.map +1 -1
  342. package/js/components/result/base-result-rating.vue.js +1 -4
  343. package/js/components/result/base-result-rating.vue.js.map +1 -1
  344. package/js/components/result/result-variant-selector.vue.js +1 -3
  345. package/js/components/result/result-variant-selector.vue.js.map +1 -1
  346. package/js/components/sliding-panel.vue.js +3 -6
  347. package/js/components/sliding-panel.vue.js.map +1 -1
  348. package/js/components/sliding-panel.vue2.js +2 -2
  349. package/js/components/sliding-panel.vue2.js.map +1 -1
  350. package/js/components/suggestions/base-suggestion.vue.js +1 -2
  351. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  352. package/js/components/suggestions/base-suggestions.vue.js +1 -2
  353. package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
  354. package/js/composables/use-alias-api.js +4 -1
  355. package/js/composables/use-alias-api.js.map +1 -1
  356. package/js/composables/use-getter.js +1 -1
  357. package/js/composables/use-state.js +1 -1
  358. package/js/directives/typing.js +58 -0
  359. package/js/directives/typing.js.map +1 -0
  360. package/js/index.js +20 -4
  361. package/js/index.js.map +1 -1
  362. package/js/types/animation-prop.js +5 -0
  363. package/js/types/animation-prop.js.map +1 -1
  364. package/js/x-installer/x-installer/x-installer.js +3 -3
  365. package/js/x-installer/x-installer/x-installer.js.map +1 -1
  366. package/js/x-modules/device/store/emitters.js +1 -0
  367. package/js/x-modules/device/store/emitters.js.map +1 -1
  368. package/js/x-modules/empathize/components/empathize.vue.js +1 -2
  369. package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
  370. package/js/x-modules/empathize/components/empathize.vue2.js +8 -3
  371. package/js/x-modules/empathize/components/empathize.vue2.js.map +1 -1
  372. package/js/x-modules/empathize/store/emitters.js +1 -0
  373. package/js/x-modules/empathize/store/emitters.js.map +1 -1
  374. package/js/x-modules/experience-controls/store/emitters.js +1 -0
  375. package/js/x-modules/experience-controls/store/emitters.js.map +1 -1
  376. package/js/x-modules/extra-params/components/extra-params.vue.js +1 -1
  377. package/js/x-modules/extra-params/components/extra-params.vue.js.map +1 -1
  378. package/js/x-modules/extra-params/store/emitters.js +1 -0
  379. package/js/x-modules/extra-params/store/emitters.js.map +1 -1
  380. package/js/x-modules/facets/components/facets/facets.vue.js +20 -33
  381. package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
  382. package/js/x-modules/facets/components/facets/facets.vue2.js +2 -2
  383. package/js/x-modules/facets/components/facets/facets.vue2.js.map +1 -1
  384. package/js/x-modules/facets/components/filters/all-filter.vue.js +1 -2
  385. package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
  386. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +1 -6
  387. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
  388. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +1 -3
  389. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
  390. package/js/x-modules/facets/components/filters/number-range-filter.vue.js +1 -3
  391. package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
  392. package/js/x-modules/facets/components/filters/simple-filter.vue.js +1 -3
  393. package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
  394. package/js/x-modules/facets/components/lists/filters-list.vue.js +1 -2
  395. package/js/x-modules/facets/components/lists/filters-list.vue.js.map +1 -1
  396. package/js/x-modules/facets/components/lists/filters-search.vue.js +1 -3
  397. package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
  398. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +11 -18
  399. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
  400. package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js +2 -2
  401. package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js.map +1 -1
  402. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +1 -4
  403. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  404. package/js/x-modules/history-queries/components/clear-history-queries.vue.js +1 -2
  405. package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
  406. package/js/x-modules/history-queries/components/history-queries.vue.js +1 -10
  407. package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
  408. package/js/x-modules/history-queries/components/history-query.vue.js +1 -6
  409. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  410. package/js/x-modules/history-queries/components/my-history.vue.js +1 -4
  411. package/js/x-modules/history-queries/components/my-history.vue.js.map +1 -1
  412. package/js/x-modules/history-queries/components/remove-history-query.vue.js +1 -2
  413. package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
  414. package/js/x-modules/history-queries/store/emitters.js +1 -0
  415. package/js/x-modules/history-queries/store/emitters.js.map +1 -1
  416. package/js/x-modules/identifier-results/components/identifier-results.vue.js +1 -2
  417. package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
  418. package/js/x-modules/identifier-results/store/emitters.js +1 -0
  419. package/js/x-modules/identifier-results/store/emitters.js.map +1 -1
  420. package/js/x-modules/next-queries/components/next-queries.vue.js +1 -7
  421. package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
  422. package/js/x-modules/next-queries/components/next-query-preview.vue.js +1 -3
  423. package/js/x-modules/next-queries/components/next-query-preview.vue.js.map +1 -1
  424. package/js/x-modules/next-queries/components/next-query.vue.js +1 -4
  425. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  426. package/js/x-modules/next-queries/store/emitters.js +1 -0
  427. package/js/x-modules/next-queries/store/emitters.js.map +1 -1
  428. package/js/x-modules/popular-searches/components/popular-search.vue.js +1 -4
  429. package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
  430. package/js/x-modules/popular-searches/components/popular-searches.vue.js +1 -7
  431. package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
  432. package/js/x-modules/queries-preview/components/query-preview-button.vue.js +1 -2
  433. package/js/x-modules/queries-preview/components/query-preview-button.vue.js.map +1 -1
  434. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js +6 -0
  435. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js.map +1 -1
  436. package/js/x-modules/queries-preview/components/query-preview-list.vue.js.map +1 -1
  437. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js +15 -2
  438. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js.map +1 -1
  439. package/js/x-modules/queries-preview/components/query-preview.vue.js +1 -2
  440. package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
  441. package/js/x-modules/queries-preview/components/query-preview.vue2.js +7 -1
  442. package/js/x-modules/queries-preview/components/query-preview.vue2.js.map +1 -1
  443. package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js +2 -1
  444. package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js.map +1 -1
  445. package/js/x-modules/queries-preview/store/emitters.js +1 -0
  446. package/js/x-modules/queries-preview/store/emitters.js.map +1 -1
  447. package/js/x-modules/queries-preview/store/module.js +1 -1
  448. package/js/x-modules/queries-preview/store/module.js.map +1 -1
  449. package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js +6 -4
  450. package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js.map +1 -1
  451. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +1 -4
  452. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
  453. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +1 -7
  454. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
  455. package/js/x-modules/query-suggestions/store/emitters.js +1 -0
  456. package/js/x-modules/query-suggestions/store/emitters.js.map +1 -1
  457. package/js/x-modules/recommendations/components/recommendations.vue.js +1 -2
  458. package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
  459. package/js/x-modules/recommendations/store/emitters.js +1 -0
  460. package/js/x-modules/recommendations/store/emitters.js.map +1 -1
  461. package/js/x-modules/related-prompts/components/related-prompt.vue.js +27 -0
  462. package/js/x-modules/related-prompts/components/related-prompt.vue.js.map +1 -0
  463. package/js/x-modules/related-prompts/components/related-prompt.vue2.js +31 -0
  464. package/js/x-modules/related-prompts/components/related-prompt.vue2.js.map +1 -0
  465. package/js/x-modules/related-prompts/components/related-prompt.vue3.js +7 -0
  466. package/js/x-modules/related-prompts/components/related-prompt.vue3.js.map +1 -0
  467. package/js/x-modules/related-prompts/components/related-prompts-list.vue.js +154 -0
  468. package/js/x-modules/related-prompts/components/related-prompts-list.vue.js.map +1 -0
  469. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js +6 -0
  470. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js.map +1 -0
  471. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js +101 -0
  472. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js.map +1 -0
  473. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js +221 -0
  474. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js.map +1 -0
  475. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js +7 -0
  476. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js.map +1 -0
  477. package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js +29 -0
  478. package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js.map +1 -0
  479. package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js +20 -0
  480. package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js.map +1 -0
  481. package/js/x-modules/related-prompts/store/actions/set-url-params.action.js +15 -0
  482. package/js/x-modules/related-prompts/store/actions/set-url-params.action.js.map +1 -0
  483. package/js/x-modules/related-prompts/store/emitters.js +16 -0
  484. package/js/x-modules/related-prompts/store/emitters.js.map +1 -0
  485. package/js/x-modules/related-prompts/store/getters/related-prompts-query.getter.js +18 -0
  486. package/js/x-modules/related-prompts/store/getters/related-prompts-query.getter.js.map +1 -0
  487. package/js/x-modules/related-prompts/store/getters/request.getter.js +17 -0
  488. package/js/x-modules/related-prompts/store/getters/request.getter.js.map +1 -0
  489. package/js/x-modules/related-prompts/store/module.js +64 -0
  490. package/js/x-modules/related-prompts/store/module.js.map +1 -0
  491. package/js/x-modules/related-prompts/wiring.js +82 -0
  492. package/js/x-modules/related-prompts/wiring.js.map +1 -0
  493. package/js/x-modules/related-prompts/x-module.js +21 -0
  494. package/js/x-modules/related-prompts/x-module.js.map +1 -0
  495. package/js/x-modules/related-tags/components/related-tag.vue.js +1 -2
  496. package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
  497. package/js/x-modules/related-tags/components/related-tags.vue.js +1 -4
  498. package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
  499. package/js/x-modules/related-tags/store/emitters.js +1 -0
  500. package/js/x-modules/related-tags/store/emitters.js.map +1 -1
  501. package/js/x-modules/scroll/components/scroll-to-top.vue.js +1 -2
  502. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
  503. package/js/x-modules/scroll/components/scroll-to-top.vue2.js +6 -0
  504. package/js/x-modules/scroll/components/scroll-to-top.vue2.js.map +1 -1
  505. package/js/x-modules/scroll/store/emitters.js +1 -0
  506. package/js/x-modules/scroll/store/emitters.js.map +1 -1
  507. package/js/x-modules/search/components/partial-results-list.vue.js +1 -2
  508. package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
  509. package/js/x-modules/search/components/results-list.vue.js +2 -2
  510. package/js/x-modules/search/components/results-list.vue.js.map +1 -1
  511. package/js/x-modules/search/components/sort-dropdown.vue.js +1 -3
  512. package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
  513. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +10 -3
  514. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
  515. package/js/x-modules/search/store/actions/save-search-response.action.js +3 -1
  516. package/js/x-modules/search/store/actions/save-search-response.action.js.map +1 -1
  517. package/js/x-modules/search/store/emitters.js +1 -0
  518. package/js/x-modules/search/store/emitters.js.map +1 -1
  519. package/js/x-modules/search/store/module.js +9 -3
  520. package/js/x-modules/search/store/module.js.map +1 -1
  521. package/js/x-modules/search/wiring.js +4 -0
  522. package/js/x-modules/search/wiring.js.map +1 -1
  523. package/js/x-modules/search-box/components/clear-search-input.vue.js +1 -2
  524. package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
  525. package/js/x-modules/search-box/components/search-button.vue.js +1 -2
  526. package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
  527. package/js/x-modules/search-box/store/emitters.js +1 -0
  528. package/js/x-modules/search-box/store/emitters.js.map +1 -1
  529. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js +1 -3
  530. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js.map +1 -1
  531. package/js/x-modules/semantic-queries/components/semantic-query.vue.js +1 -4
  532. package/js/x-modules/semantic-queries/components/semantic-query.vue.js.map +1 -1
  533. package/js/x-modules/semantic-queries/store/getters/normalized-query.getter.js +1 -1
  534. package/js/x-modules/semantic-queries/store/getters/normalized-query.getter.js.map +1 -1
  535. package/js/x-modules/semantic-queries/store/getters/request.getter.js +5 -4
  536. package/js/x-modules/semantic-queries/store/getters/request.getter.js.map +1 -1
  537. package/js/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.js +18 -0
  538. package/js/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.js.map +1 -0
  539. package/js/x-modules/semantic-queries/store/module.js +8 -2
  540. package/js/x-modules/semantic-queries/store/module.js.map +1 -1
  541. package/js/x-modules/semantic-queries/wiring.js +5 -0
  542. package/js/x-modules/semantic-queries/wiring.js.map +1 -1
  543. package/js/x-modules/tagging/components/tagging.vue.js +8 -7
  544. package/js/x-modules/tagging/components/tagging.vue.js.map +1 -1
  545. package/js/x-modules/tagging/service/{pdp-add-to-cart.service.js → external-tagging.service.js} +56 -25
  546. package/js/x-modules/tagging/service/external-tagging.service.js.map +1 -0
  547. package/js/x-modules/tagging/store/emitters.js +1 -1
  548. package/js/x-modules/tagging/store/emitters.js.map +1 -1
  549. package/js/x-modules/tagging/store/module.js +7 -3
  550. package/js/x-modules/tagging/store/module.js.map +1 -1
  551. package/js/x-modules/tagging/wiring.js +110 -9
  552. package/js/x-modules/tagging/wiring.js.map +1 -1
  553. package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
  554. package/js/x-modules/url/components/url-handler.vue2.js +4 -5
  555. package/js/x-modules/url/components/url-handler.vue2.js.map +1 -1
  556. package/js/x-modules/url/store/emitters.js +1 -0
  557. package/js/x-modules/url/store/emitters.js.map +1 -1
  558. package/js/x-modules/url/store/getters/url-params.getter.js +2 -3
  559. package/js/x-modules/url/store/getters/url-params.getter.js.map +1 -1
  560. package/js/x-modules/url/store/initial-state.js +2 -1
  561. package/js/x-modules/url/store/initial-state.js.map +1 -1
  562. package/js/x-modules/url/store/module.js +3 -0
  563. package/js/x-modules/url/store/module.js.map +1 -1
  564. package/js/x-modules/url/wiring.js +10 -1
  565. package/js/x-modules/url/wiring.js.map +1 -1
  566. package/package.json +50 -49
  567. package/related-prompts/index.d.ts +1 -0
  568. package/related-prompts/index.js +9 -0
  569. package/report/x-adapter-platform.api.json +895 -67
  570. package/report/x-components.api.json +16383 -17149
  571. package/report/x-components.api.md +834 -215
  572. package/report/x-types.api.json +320 -4
  573. package/tagging/index.js +2 -2
  574. package/types/adapter/mocked-responses.d.ts +3 -0
  575. package/types/adapter/mocked-responses.d.ts.map +1 -1
  576. package/types/components/base-dropdown.vue.d.ts +5 -5
  577. package/types/components/base-dropdown.vue.d.ts.map +1 -1
  578. package/types/components/base-grid.vue.d.ts +3 -3
  579. package/types/components/base-slider.vue.d.ts +74 -0
  580. package/types/components/base-slider.vue.d.ts.map +1 -0
  581. package/types/components/base-switch.vue.d.ts +2 -1
  582. package/types/components/base-switch.vue.d.ts.map +1 -1
  583. package/types/components/base-variable-column-grid.vue.d.ts +3 -3
  584. package/types/components/display-click-provider.vue.d.ts +61 -0
  585. package/types/components/display-click-provider.vue.d.ts.map +1 -0
  586. package/types/components/global-x-bus.vue.d.ts +14 -0
  587. package/types/components/global-x-bus.vue.d.ts.map +1 -1
  588. package/types/components/index.d.ts +3 -0
  589. package/types/components/index.d.ts.map +1 -1
  590. package/types/components/items-list.vue.d.ts +3 -3
  591. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts +5 -5
  592. package/types/components/layouts/single-column-layout.vue.d.ts +3 -3
  593. package/types/components/modals/base-events-modal.vue.d.ts +2 -2
  594. package/types/components/modals/base-id-modal.vue.d.ts +2 -2
  595. package/types/components/modals/base-modal.vue.d.ts +10 -10
  596. package/types/components/modals/base-modal.vue.d.ts.map +1 -1
  597. package/types/components/modals/main-modal.vue.d.ts +2 -2
  598. package/types/components/page-selector.vue.d.ts +125 -0
  599. package/types/components/page-selector.vue.d.ts.map +1 -0
  600. package/types/components/panels/base-header-toggle-panel.vue.d.ts +5 -5
  601. package/types/components/panels/base-id-toggle-panel.vue.d.ts +5 -5
  602. package/types/components/panels/base-tabs-panel.vue.d.ts +8 -8
  603. package/types/components/panels/base-toggle-panel.vue.d.ts +3 -3
  604. package/types/components/result/base-result-add-to-cart.vue.d.ts +2 -0
  605. package/types/components/result/base-result-add-to-cart.vue.d.ts.map +1 -1
  606. package/types/components/result/base-result-image.vue.d.ts +10 -10
  607. package/types/components/result/base-result-image.vue.d.ts.map +1 -1
  608. package/types/components/sliding-panel.vue.d.ts +15 -5
  609. package/types/components/sliding-panel.vue.d.ts.map +1 -1
  610. package/types/components/snippet-callbacks.vue.d.ts +7 -0
  611. package/types/components/snippet-callbacks.vue.d.ts.map +1 -1
  612. package/types/components/suggestions/base-suggestions.vue.d.ts +3 -3
  613. package/types/composables/use-alias-api.d.ts +5 -0
  614. package/types/composables/use-alias-api.d.ts.map +1 -1
  615. package/types/composables/use-store.d.ts +2 -2
  616. package/types/composables/use-store.d.ts.map +1 -1
  617. package/types/directives/index.d.ts +1 -0
  618. package/types/directives/index.d.ts.map +1 -1
  619. package/types/directives/typing.d.ts +35 -0
  620. package/types/directives/typing.d.ts.map +1 -0
  621. package/types/index.d.ts +1 -0
  622. package/types/index.d.ts.map +1 -1
  623. package/types/store/index.d.ts +4 -1
  624. package/types/store/index.d.ts.map +1 -1
  625. package/types/tailwind/plugin-options.d.ts +1 -2
  626. package/types/tailwind/plugin-options.d.ts.map +1 -1
  627. package/types/types/animation-prop.d.ts +6 -2
  628. package/types/types/animation-prop.d.ts.map +1 -1
  629. package/types/types/origin.d.ts +3 -3
  630. package/types/types/origin.d.ts.map +1 -1
  631. package/types/types/page-mode.d.ts +2 -0
  632. package/types/types/page-mode.d.ts.map +1 -0
  633. package/types/types/url-params.d.ts +1 -0
  634. package/types/types/url-params.d.ts.map +1 -1
  635. package/types/views/home/types.d.ts +3 -0
  636. package/types/views/home/types.d.ts.map +1 -1
  637. package/types/wiring/events.types.d.ts +3 -1
  638. package/types/wiring/events.types.d.ts.map +1 -1
  639. package/types/x-installer/x-installer/types.d.ts +2 -2
  640. package/types/x-installer/x-installer/types.d.ts.map +1 -1
  641. package/types/x-installer/x-installer/x-installer.d.ts +4 -4
  642. package/types/x-installer/x-installer/x-installer.d.ts.map +1 -1
  643. package/types/x-modules/empathize/components/empathize.vue.d.ts +6 -6
  644. package/types/x-modules/empathize/components/empathize.vue.d.ts.map +1 -1
  645. package/types/x-modules/facets/components/facets/facets.vue.d.ts +3 -3
  646. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +9 -2
  647. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  648. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts +7 -0
  649. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
  650. package/types/x-modules/facets/components/lists/filters-list.vue.d.ts +3 -3
  651. package/types/x-modules/facets/components/lists/selected-filters-list.vue.d.ts +3 -3
  652. package/types/x-modules/history-queries/components/my-history.vue.d.ts +3 -3
  653. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +3 -3
  654. package/types/x-modules/next-queries/components/next-queries-list.vue.d.ts +3 -3
  655. package/types/x-modules/next-queries/index.d.ts +1 -0
  656. package/types/x-modules/next-queries/index.d.ts.map +1 -1
  657. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts +3 -3
  658. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts.map +1 -1
  659. package/types/x-modules/queries-preview/components/query-preview.vue.d.ts.map +1 -1
  660. package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts.map +1 -1
  661. package/types/x-modules/queries-preview/store/module.d.ts.map +1 -1
  662. package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts +4 -2
  663. package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts.map +1 -1
  664. package/types/x-modules/recommendations/components/recommendations.vue.d.ts +3 -3
  665. package/types/x-modules/related-prompts/components/index.d.ts +4 -0
  666. package/types/x-modules/related-prompts/components/index.d.ts.map +1 -0
  667. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts +28 -0
  668. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts.map +1 -0
  669. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts +106 -0
  670. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts.map +1 -0
  671. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts +131 -0
  672. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -0
  673. package/types/x-modules/related-prompts/events.types.d.ts +41 -0
  674. package/types/x-modules/related-prompts/events.types.d.ts.map +1 -0
  675. package/types/x-modules/related-prompts/index.d.ts +6 -0
  676. package/types/x-modules/related-prompts/index.d.ts.map +1 -0
  677. package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts +17 -0
  678. package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts.map +1 -0
  679. package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts +13 -0
  680. package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts.map +1 -0
  681. package/types/x-modules/related-prompts/store/actions/set-url-params.action.d.ts +11 -0
  682. package/types/x-modules/related-prompts/store/actions/set-url-params.action.d.ts.map +1 -0
  683. package/types/x-modules/related-prompts/store/emitters.d.ts +10 -0
  684. package/types/x-modules/related-prompts/store/emitters.d.ts.map +1 -0
  685. package/types/x-modules/related-prompts/store/getters/index.d.ts +3 -0
  686. package/types/x-modules/related-prompts/store/getters/index.d.ts.map +1 -0
  687. package/types/x-modules/related-prompts/store/getters/related-prompts-query.getter.d.ts +13 -0
  688. package/types/x-modules/related-prompts/store/getters/related-prompts-query.getter.d.ts.map +1 -0
  689. package/types/x-modules/related-prompts/store/getters/request.getter.d.ts +14 -0
  690. package/types/x-modules/related-prompts/store/getters/request.getter.d.ts.map +1 -0
  691. package/types/x-modules/related-prompts/store/index.d.ts +6 -0
  692. package/types/x-modules/related-prompts/store/index.d.ts.map +1 -0
  693. package/types/x-modules/related-prompts/store/module.d.ts +8 -0
  694. package/types/x-modules/related-prompts/store/module.d.ts.map +1 -0
  695. package/types/x-modules/related-prompts/store/types.d.ts +125 -0
  696. package/types/x-modules/related-prompts/store/types.d.ts.map +1 -0
  697. package/types/x-modules/related-prompts/types.d.ts +10 -0
  698. package/types/x-modules/related-prompts/types.d.ts.map +1 -0
  699. package/types/x-modules/related-prompts/wiring.d.ts +42 -0
  700. package/types/x-modules/related-prompts/wiring.d.ts.map +1 -0
  701. package/types/x-modules/related-prompts/x-module.d.ts +16 -0
  702. package/types/x-modules/related-prompts/x-module.d.ts.map +1 -0
  703. package/types/x-modules/related-tags/components/related-tags.vue.d.ts +3 -3
  704. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +5 -5
  705. package/types/x-modules/search/components/banners-list.vue.d.ts +3 -3
  706. package/types/x-modules/search/components/partial-results-list.vue.d.ts +3 -3
  707. package/types/x-modules/search/components/promoteds-list.vue.d.ts +3 -3
  708. package/types/x-modules/search/components/results-list.vue.d.ts +3 -3
  709. package/types/x-modules/search/components/sort-dropdown.vue.d.ts +1 -1
  710. package/types/x-modules/search/config.types.d.ts +2 -0
  711. package/types/x-modules/search/config.types.d.ts.map +1 -1
  712. package/types/x-modules/search/events.types.d.ts +4 -0
  713. package/types/x-modules/search/events.types.d.ts.map +1 -1
  714. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
  715. package/types/x-modules/search/store/actions/save-search-response.action.d.ts.map +1 -1
  716. package/types/x-modules/search/store/module.d.ts +2 -0
  717. package/types/x-modules/search/store/module.d.ts.map +1 -1
  718. package/types/x-modules/search/store/types.d.ts +9 -1
  719. package/types/x-modules/search/store/types.d.ts.map +1 -1
  720. package/types/x-modules/search/wiring.d.ts +4 -0
  721. package/types/x-modules/search/wiring.d.ts.map +1 -1
  722. package/types/x-modules/search-box/components/search-input-placeholder.vue.d.ts +3 -3
  723. package/types/x-modules/semantic-queries/store/getters/index.d.ts +1 -0
  724. package/types/x-modules/semantic-queries/store/getters/index.d.ts.map +1 -1
  725. package/types/x-modules/semantic-queries/store/getters/normalized-query.getter.d.ts +1 -1
  726. package/types/x-modules/semantic-queries/store/getters/request.getter.d.ts +2 -1
  727. package/types/x-modules/semantic-queries/store/getters/request.getter.d.ts.map +1 -1
  728. package/types/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.d.ts +13 -0
  729. package/types/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.d.ts.map +1 -0
  730. package/types/x-modules/semantic-queries/store/module.d.ts.map +1 -1
  731. package/types/x-modules/semantic-queries/store/types.d.ts +13 -1
  732. package/types/x-modules/semantic-queries/store/types.d.ts.map +1 -1
  733. package/types/x-modules/semantic-queries/wiring.d.ts +3 -0
  734. package/types/x-modules/semantic-queries/wiring.d.ts.map +1 -1
  735. package/types/x-modules/tagging/components/tagging.vue.d.ts +14 -12
  736. package/types/x-modules/tagging/components/tagging.vue.d.ts.map +1 -1
  737. package/types/x-modules/tagging/config.types.d.ts +3 -3
  738. package/types/x-modules/tagging/config.types.d.ts.map +1 -1
  739. package/types/x-modules/tagging/events.types.d.ts +2 -2
  740. package/types/x-modules/tagging/service/{pdp-add-to-cart.service.d.ts → external-tagging.service.d.ts} +31 -13
  741. package/types/x-modules/tagging/service/external-tagging.service.d.ts.map +1 -0
  742. package/types/x-modules/tagging/service/index.d.ts +1 -1
  743. package/types/x-modules/tagging/service/index.d.ts.map +1 -1
  744. package/types/x-modules/tagging/service/types.d.ts +13 -4
  745. package/types/x-modules/tagging/service/types.d.ts.map +1 -1
  746. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  747. package/types/x-modules/tagging/wiring.d.ts +54 -2
  748. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  749. package/types/x-modules/url/components/url-handler.vue.d.ts.map +1 -1
  750. package/types/x-modules/url/store/getters/url-params.getter.d.ts +2 -3
  751. package/types/x-modules/url/store/getters/url-params.getter.d.ts.map +1 -1
  752. package/types/x-modules/url/store/initial-state.d.ts.map +1 -1
  753. package/types/x-modules/url/store/module.d.ts.map +1 -1
  754. package/types/x-modules/url/store/types.d.ts +6 -0
  755. package/types/x-modules/url/store/types.d.ts.map +1 -1
  756. package/types/x-modules/url/wiring.d.ts +9 -0
  757. package/types/x-modules/url/wiring.d.ts.map +1 -1
  758. package/types/x-modules/x-modules.types.d.ts +2 -0
  759. package/types/x-modules/x-modules.types.d.ts.map +1 -1
  760. package/url/index.js +1 -1
  761. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragekey.md +0 -11
  762. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragettlms.md +0 -11
  763. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.instance.md +0 -13
  764. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.localstorageservice.md +0 -11
  765. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.md +0 -41
  766. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.result_clicked_id_key.md +0 -13
  767. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.sessionstorageservice.md +0 -11
  768. package/docs/API-reference/api/x-components.pdpaddtocartservice.md +0 -22
  769. package/docs/API-reference/api/x-components.taggingconfig.clickedresultstoragettlms.md +0 -13
  770. package/docs/API-reference/api/x-components.usestore.md +0 -19
  771. package/docs/assets/features/overview-my-history.svg +0 -279
  772. package/docs/assets/features/overview-product-results-card.svg +0 -128
  773. package/docs/assets/interface/build-search-ui.svg +0 -167
  774. package/docs/assets/interface/experience-search-intro.svg +0 -1
  775. package/docs/assets/interface/integration-guide.svg +0 -1
  776. package/docs/assets/interface/integration-video.png +0 -0
  777. package/docs/assets/interface/x-architecture.svg +0 -1
  778. package/docs/assets/interface/x-empathize.gif +0 -0
  779. package/docs/assets/interface/x-facets.gif +0 -0
  780. package/docs/assets/interface/x-facets.svg +0 -189
  781. package/docs/assets/interface/x-history-queries.gif +0 -0
  782. package/docs/assets/interface/x-id-results.gif +0 -0
  783. package/docs/assets/interface/x-next-queries.gif +0 -0
  784. package/docs/assets/interface/x-popular-searches.gif +0 -0
  785. package/docs/assets/interface/x-query-suggestions.gif +0 -0
  786. package/docs/assets/interface/x-recommendations.gif +0 -0
  787. package/docs/assets/interface/x-recommendations.svg +0 -472
  788. package/docs/assets/interface/x-related-tags.gif +0 -0
  789. package/docs/assets/interface/x-results-layout.svg +0 -259
  790. package/docs/assets/interface/x-search-box-elements.svg +0 -1
  791. package/docs/assets/interface/x-search-box.svg +0 -60
  792. package/docs/build-search-ui/README.md +0 -127
  793. package/docs/build-search-ui/sidebar.js +0 -7
  794. package/docs/build-search-ui/web-archetype-development-guide.md +0 -186
  795. package/docs/build-search-ui/web-archetype-integration-guide.md +0 -458
  796. package/docs/build-search-ui/web-how-to-use-x-components-guide.md +0 -200
  797. package/docs/build-search-ui/web-x-architecture.md +0 -83
  798. package/docs/build-search-ui/web-x-components-development-guide.md +0 -157
  799. package/docs/experience-search-and-discovery/README.md +0 -132
  800. package/docs/experience-search-and-discovery/empathize.md +0 -119
  801. package/docs/experience-search-and-discovery/facets-and-filters.md +0 -154
  802. package/docs/experience-search-and-discovery/history-queries.md +0 -70
  803. package/docs/experience-search-and-discovery/id-results.md +0 -49
  804. package/docs/experience-search-and-discovery/my-history.md +0 -60
  805. package/docs/experience-search-and-discovery/next-queries.md +0 -72
  806. package/docs/experience-search-and-discovery/popular-searches.md +0 -50
  807. package/docs/experience-search-and-discovery/product-results-ui.md +0 -82
  808. package/docs/experience-search-and-discovery/query-suggestions.md +0 -48
  809. package/docs/experience-search-and-discovery/recommendations.md +0 -134
  810. package/docs/experience-search-and-discovery/related-tags.md +0 -66
  811. package/docs/experience-search-and-discovery/search-box.md +0 -99
  812. package/docs/experience-search-and-discovery/serp-ui.md +0 -125
  813. package/docs/experience-search-and-discovery/sidebar.js +0 -17
  814. package/docs/experience-search-and-discovery/web-local-storage.md +0 -30
  815. package/docs/input-status-machine-state.png +0 -0
  816. package/js/composables/use-store.js +0 -15
  817. package/js/composables/use-store.js.map +0 -1
  818. package/js/utils/options-api.js +0 -4
  819. package/js/utils/options-api.js.map +0 -1
  820. package/js/x-modules/tagging/service/pdp-add-to-cart.service.js.map +0 -1
  821. package/types/utils/options-api.d.ts +0 -3
  822. package/types/utils/options-api.d.ts.map +0 -1
  823. 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 './popular-search.vue2.js';
2
- import { resolveComponent, openBlock, createBlock, withCtx, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
2
+ import { resolveComponent, openBlock, createBlock, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
3
3
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
4
4
 
5
5
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -12,9 +12,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
12
12
  feature: "popular_search"
13
13
  }, {
14
14
  default: withCtx((baseScope) => [
15
- createCommentVNode(" eslint-disable max-len "),
16
- createCommentVNode("\n @slot Popular Search content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter \\| undefined</code> - Suggestion's filter\n "),
17
- createCommentVNode(" eslint-enable max-len "),
18
15
  renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ ...baseScope })))
19
16
  ]),
20
17
  _: 3
@@ -1 +1 @@
1
- {"version":3,"file":"popular-search.vue.js","sources":["../../../../../src/x-modules/popular-searches/components/popular-search.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n class=\"x-popular-search\"\n :suggestion=\"suggestion\"\n :suggestionSelectedEvents=\"events\"\n data-test=\"popular-search\"\n feature=\"popular_search\"\n #default=\"baseScope\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Popular Search content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter \\| undefined</code> - Suggestion's filter\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope }\" />\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import { computed, defineComponent, PropType } from 'vue';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { popularSearchesXModule } from '../x-module';\n\n /**\n * Renders a popular search item which receives the suggestion that will be rendered as a prop. It\n * exposes a default slot to change the popular search content. If the slot is not overridden,\n * it will render the suggestion query by default.\n *\n * @public\n */\n export default defineComponent({\n name: 'PopularSearch',\n xModule: popularSearchesXModule.name,\n components: { BaseSuggestion },\n props: {\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n suggestion: {\n type: Object as PropType<Suggestion>,\n required: true\n }\n },\n setup(props) {\n /**\n * Events list which are going to be emitted when a popular search is selected.\n *\n * @returns The {@link XEvent} to emit.\n * @public\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserSelectedAPopularSearch: props.suggestion })\n );\n\n return { events };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserSelectedAPopularSearch`](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 button. The event payload is the popular search\n data.\n\n## Examples\n\nThis components expects just a suggestion as a prop to be rendered. It has a slot to override the\ncontent. By default, it renders the suggestion query of the popular search.\n\n### Basic Usage\n\n```vue live\n<template>\n <PopularSearch :suggestion=\"suggestion\" />\n</template>\n\n<script>\n import { PopularSearch } from '@empathyco/x-components/popular-searches';\n export default {\n name: 'PopularSearchDemo',\n components: {\n PopularSearch\n },\n data() {\n return {\n suggestion: {\n modelName: 'PopularSearch',\n query: 'tshirt',\n facets: []\n }\n };\n }\n };\n</script>\n```\n\n### Custom Usage\n\n```vue live\n<template>\n <PopularSearch :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <TrendingIcon />\n <span :aria-label=\"suggestion.query\">{{ suggestion.query }}</span>\n </template>\n </PopularSearch>\n</template>\n\n<script>\n import { PopularSearch } from '@empathyco/x-components/popular-searches';\n import { TrendingIcon } from '@empathyco/x-components';\n\n export default {\n name: 'PopularSearchDemo',\n components: {\n PopularSearch,\n TrendingIcon\n },\n data() {\n return {\n suggestion: {\n modelName: 'PopularSearch',\n query: 'tshirt',\n facets: []\n }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_withCtx","_createCommentVNode","_renderSlot","_normalizeProps","_guardReactiveProps"],"mappings":";;;;;oCACEA,gBAeiB,CAAA,gBAAA,CAAA,CAAA;AAbd,EAAA,OAAAC,SAAA,EAAsB,EAAAC,WAAA,CAAA,yBAAA,EAAA;AAAA,IACtB,KAAA,EAAA,kBAAA;AAAA,IACD,YAAS,IAAC,CAAA,UAAA;AAAA,IACV,wBAAwB,EAAA,IAAA,CAAA,MAAA;AAAA,IAAA,WAAA,EAAA,gBAAA;IACvB,OAAO,EAAA,gBAAA;AAAA,GAAA,EAAA;AAGR,IAAA,OAAA,EAAAC,OAAA,CAAA,CAAA,SAAA,KAAA;AAAA,MAIAC,kBAA8B,CAAA,0BAAA,CAAA;AAAA,MAC9BA,mBAAkC,0UAAN,CAAA;AAAA,MAAAA,kBAAA,CAAA,yBAAA,CAAA;AAfhC,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAA,CAAA,CAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"popular-search.vue.js","sources":["../../../../../src/x-modules/popular-searches/components/popular-search.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n class=\"x-popular-search\"\n :suggestion=\"suggestion\"\n :suggestionSelectedEvents=\"events\"\n data-test=\"popular-search\"\n feature=\"popular_search\"\n #default=\"baseScope\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Popular Search content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter \\| undefined</code> - Suggestion's filter\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope }\" />\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import { computed, defineComponent, PropType } from 'vue';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { popularSearchesXModule } from '../x-module';\n\n /**\n * Renders a popular search item which receives the suggestion that will be rendered as a prop. It\n * exposes a default slot to change the popular search content. If the slot is not overridden,\n * it will render the suggestion query by default.\n *\n * @public\n */\n export default defineComponent({\n name: 'PopularSearch',\n xModule: popularSearchesXModule.name,\n components: { BaseSuggestion },\n props: {\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n suggestion: {\n type: Object as PropType<Suggestion>,\n required: true\n }\n },\n setup(props) {\n /**\n * Events list which are going to be emitted when a popular search is selected.\n *\n * @returns The {@link XEvent} to emit.\n * @public\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserSelectedAPopularSearch: props.suggestion })\n );\n\n return { events };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserSelectedAPopularSearch`](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 button. The event payload is the popular search\n data.\n\n## Examples\n\nThis components expects just a suggestion as a prop to be rendered. It has a slot to override the\ncontent. By default, it renders the suggestion query of the popular search.\n\n### Basic Usage\n\n```vue live\n<template>\n <PopularSearch :suggestion=\"suggestion\" />\n</template>\n\n<script>\n import { PopularSearch } from '@empathyco/x-components/popular-searches';\n export default {\n name: 'PopularSearchDemo',\n components: {\n PopularSearch\n },\n data() {\n return {\n suggestion: {\n modelName: 'PopularSearch',\n query: 'tshirt',\n facets: []\n }\n };\n }\n };\n</script>\n```\n\n### Custom Usage\n\n```vue live\n<template>\n <PopularSearch :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <TrendingIcon />\n <span :aria-label=\"suggestion.query\">{{ suggestion.query }}</span>\n </template>\n </PopularSearch>\n</template>\n\n<script>\n import { PopularSearch } from '@empathyco/x-components/popular-searches';\n import { TrendingIcon } from '@empathyco/x-components';\n\n export default {\n name: 'PopularSearchDemo',\n components: {\n PopularSearch,\n TrendingIcon\n },\n data() {\n return {\n suggestion: {\n modelName: 'PopularSearch',\n query: 'tshirt',\n facets: []\n }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_renderSlot","_normalizeProps","_guardReactiveProps"],"mappings":";;;;;oCACEA,gBAeiB,CAAA,gBAAA,CAAA,CAAA;AAbd,EAAA,OAAAC,SAAA,EAAsB,EAAAC,WAAA,CAAA,yBAAA,EAAA;AAAA,IACtB,KAAA,EAAA,kBAAA;AAAA,IACD,YAAS,IAAC,CAAA,UAAA;AAAA,IACV,wBAAwB,EAAA,IAAA,CAAA,MAAA;AAAA,IAAA,WAAA,EAAA,gBAAA;IACvB,OAAO,EAAA,gBAAA;AAAA,GAAA,EAAA;;AAPZ,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAA,CAAA,CAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './popular-searches.vue2.js';
2
- import { resolveComponent, openBlock, createBlock, withCtx, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps, createVNode } from 'vue';
2
+ import { resolveComponent, openBlock, createBlock, withCtx, renderSlot, normalizeProps, guardReactiveProps, createVNode } from 'vue';
3
3
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
4
4
 
5
5
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -11,18 +11,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11
11
  "data-test": "popular-searches"
12
12
  }, {
13
13
  default: withCtx((baseScope) => [
14
- createCommentVNode(" eslint-disable max-len "),
15
- createCommentVNode("\n @slot Popular Search item\n @binding {Object} v-bind - Popular Search suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - Popular Search suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - Popular Search suggestion index\n "),
16
- createCommentVNode(" eslint-enable max-len "),
17
14
  renderSlot(_ctx.$slots, "suggestion", normalizeProps(guardReactiveProps({ ...baseScope })), () => [
18
15
  createVNode(_component_PopularSearch, {
19
16
  suggestion: baseScope.suggestion,
20
17
  class: "x-popular-searches__suggestion x-suggestion"
21
18
  }, {
22
19
  default: withCtx((popularSearchScope) => [
23
- createCommentVNode(" eslint-disable max-len "),
24
- createCommentVNode("\n @slot Popular Search content\n @binding {Object} v-bind - Popular Search suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - Popular Search suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - Popular Search suggestion index\n "),
25
- createCommentVNode(" eslint-enable max-len "),
26
20
  renderSlot(_ctx.$slots, "suggestion-content", normalizeProps(guardReactiveProps({ ...baseScope, ...popularSearchScope })))
27
21
  ]),
28
22
  _: 2
@@ -1 +1 @@
1
- {"version":3,"file":"popular-searches.vue.js","sources":["../../../../../src/x-modules/popular-searches/components/popular-searches.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"popularSearches\"\n class=\"x-popular-searches\"\n data-test=\"popular-searches\"\n >\n <template #default=\"baseScope\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Popular Search item\n @binding {Object} v-bind - Popular Search suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - Popular Search suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - Popular Search suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion\" v-bind=\"{ ...baseScope }\">\n <PopularSearch\n :suggestion=\"baseScope.suggestion\"\n class=\"x-popular-searches__suggestion x-suggestion\"\n #default=\"popularSearchScope\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Popular Search content\n @binding {Object} v-bind - Popular Search suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - Popular Search suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - Popular Search suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion-content\" v-bind=\"{ ...baseScope, ...popularSearchScope }\" />\n </PopularSearch>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { popularSearchesXModule } from '../x-module';\n import { useGetter } from '../../../composables/use-getter';\n import PopularSearch from './popular-search.vue';\n\n /**\n * Simple popular-searches component that renders a list of suggestions, allowing the user to\n * select one of them, and emitting the needed events.\n * A popular search is just a query that has been searched a lot in a certain period and may\n * optionally have associated a set of filters.\n *\n * @public\n */\n export default defineComponent({\n name: 'PopularSearches',\n xModule: popularSearchesXModule.name,\n components: {\n PopularSearch,\n BaseSuggestions\n },\n setup() {\n /**\n * The list of popular searches.\n *\n * @internal\n */\n const { popularSearches } = useGetter('popularSearches', ['popularSearches']);\n\n return { popularSearches };\n }\n });\n</script>\n\n<!--eslint-disable max-len -->\n<docs lang=\"mdx\">\n## Inherited props\n\nThis component inherits the [`BaseSuggestions`](../base-components/x-components.base-suggestions.md)\nprops.\n\n| Name | Description | Type | Default |\n| ------------------ | ----------------------------------------------------------------- | -------- | ------- |\n| `animation` | Animation component that will be used to animate the suggestions. | `Vue` | `\"ul\"` |\n| `maxItemsToRender` | Number of popular searches to be rendered. | `number` | |\n\n## Examples\n\n### Default Usage\n\nYou don't need to pass any props, or slots. Simply add the component, and when it has any popular\nsearches it will show them.\n\n```vue live\n<template>\n <PopularSearches />\n</template>\n\n<script>\n import { PopularSearches } from '@empathyco/x-components/popular-searches';\n export default {\n name: 'PopularSearchesDemo',\n components: {\n PopularSearches\n }\n };\n</script>\n```\n\nThe component has two optional props. `animation` to render the component with an animation and\n`maxItemsToRender` to limit the number of popular searches will be rendered (by default it is 5).\n\n```vue live\n<template>\n <PopularSearches :animation=\"'FadeAndSlide'\" :maxItemsToRender=\"10\" />\n</template>\n\n<script>\n import Vue from 'vue';\n import { PopularSearches } from '@empathyco/x-components/popular-searches';\n import FadeAndSlide from '@empathyco/x-components';\n\n // Registering the animation as a global component\n Vue.component('FadeAndSlide', FadeAndSlide);\n export default {\n name: 'PopularSearchesDemo',\n components: {\n PopularSearches,\n FadeAndSlide\n }\n };\n</script>\n```\n\n### Overriding Popular Search's Content\n\nYou can use your custom implementation of the Popular Search's content. In the example below,\ninstead of using the default Popular Search's content, an icon is added, as well as a span with the\nquery of the Popular Search's suggestion.\n\n```vue live\n<template>\n <PopularSearches>\n <template #suggestion-content=\"{ suggestion }\">\n <TrendingIcon />\n <span class=\"x-popular-search__query\">{{ suggestion.query }}</span>\n </template>\n </PopularSearches>\n</template>\n\n<script>\n import { PopularSearches } from '@empathyco/x-components/popular-searches';\n import { TrendingIcon } from '@empathyco/x-components';\n\n export default {\n name: 'PopularSearchesDemo',\n components: {\n PopularSearches,\n TrendingIcon\n }\n };\n</script>\n```\n\n### Adding a Custom Popular Search Item\n\nYou can use your custom implementation for the whole Popular Search item. In the example below, we\nchange the default implementation of the Popular Search in Popular Searches. A custom Popular Search\nimplementation is added, it has an image and a span as content (as in the previous example). Also, a\nbutton with a user customized behaviour is added at the same hierarchical level as the Popular\nSearch component.\n\n```vue live\n<template>\n <PopularSearches>\n <template #suggestion=\"{ suggestion }\">\n <PopularSearch :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <TrendingIcon />\n <span class=\"x-popular-search__query\">{{ suggestion.query }}</span>\n </template>\n </PopularSearch>\n <button>Custom Behaviour</button>\n </template>\n </PopularSearches>\n</template>\n\n<script>\n import { PopularSearches, PopularSearch } from '@empathyco/x-components/popular-searches';\n import { TrendingIcon } from '@empathyco/x-components';\n\n export default {\n name: 'PopularSearchesDemo',\n components: {\n PopularSearches,\n PopularSearch,\n TrendingIcon\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_withCtx","_createCommentVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_createVNode"],"mappings":";;;;;;AA6BoB,EAAA,MAAA,0BAAA,GAAAA,gBAAA,CAAA,iBAAA,CAAA,CAAA;AA1BX,EAAA,OAAAC,SAAA,EAAqB,EAAAC,WAAA,CAAA,0BAAA,EAAA;AAAA,IAC1B,WAAU,EAAA,IAAA,CAAA,eAAA;AAAA,IAAA,KAAA,EAAA,oBAAA;IAEC,WAAO,EAAA,kBAAA;AAAA,GAAA,EAAA;AAEhB,IAAA,OAAA,EAAAC,OAAA,CAAA,CAAA,SAAA,KAAA;AAAA,MAIAC,kBAA8B,CAAA,0BAAA,CAAA;AAAA,MAC9BA,kBAcO,CAAA,ySAAA,CAAA;AAAA,MADWA,kBAAA,CAAA,yBAAA,CAAA;AAAA,MAXbC,UAAA,CAAA,IAAA,CAAY,QAAS,YAAW,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAA,CAAA,CAAA,EAAA,MAAA;AAAA,QAC3BC,WAAA,CAAA,wBAAA,EAAA;AAAA,UAAA,UAAA,EAAA,SAAA,CAAA,UAAA;UACL,KAAO,EAAA,6CAAA;AAAA,SAAA,EAAA;AAGR,UAAA,OAAA,EAAAL,OAAA,CAAA,CAAA,kBAAA,KAAA;AAAA,YAIAC,kBAA8B,CAAA,0BAAA,CAAA;AAAA,YAC9BA,mBAAmF,wTAAN,CAAA;AAAA,YAAAA,kBAAA,CAAA,yBAAA,CAAA;AAzBvF,YAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,oBAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAA,GAAA,kBAAA,EAAA,CAAA,CAAA,CAAA;AAAA,WAAA,CAAA;;;;AAAA,OAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"popular-searches.vue.js","sources":["../../../../../src/x-modules/popular-searches/components/popular-searches.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"popularSearches\"\n class=\"x-popular-searches\"\n data-test=\"popular-searches\"\n >\n <template #default=\"baseScope\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Popular Search item\n @binding {Object} v-bind - Popular Search suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - Popular Search suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - Popular Search suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion\" v-bind=\"{ ...baseScope }\">\n <PopularSearch\n :suggestion=\"baseScope.suggestion\"\n class=\"x-popular-searches__suggestion x-suggestion\"\n #default=\"popularSearchScope\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Popular Search content\n @binding {Object} v-bind - Popular Search suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - Popular Search suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - Popular Search suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion-content\" v-bind=\"{ ...baseScope, ...popularSearchScope }\" />\n </PopularSearch>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { popularSearchesXModule } from '../x-module';\n import { useGetter } from '../../../composables/use-getter';\n import PopularSearch from './popular-search.vue';\n\n /**\n * Simple popular-searches component that renders a list of suggestions, allowing the user to\n * select one of them, and emitting the needed events.\n * A popular search is just a query that has been searched a lot in a certain period and may\n * optionally have associated a set of filters.\n *\n * @public\n */\n export default defineComponent({\n name: 'PopularSearches',\n xModule: popularSearchesXModule.name,\n components: {\n PopularSearch,\n BaseSuggestions\n },\n setup() {\n /**\n * The list of popular searches.\n *\n * @internal\n */\n const { popularSearches } = useGetter('popularSearches', ['popularSearches']);\n\n return { popularSearches };\n }\n });\n</script>\n\n<!--eslint-disable max-len -->\n<docs lang=\"mdx\">\n## Inherited props\n\nThis component inherits the [`BaseSuggestions`](../base-components/x-components.base-suggestions.md)\nprops.\n\n| Name | Description | Type | Default |\n| ------------------ | ----------------------------------------------------------------- | -------- | ------- |\n| `animation` | Animation component that will be used to animate the suggestions. | `Vue` | `\"ul\"` |\n| `maxItemsToRender` | Number of popular searches to be rendered. | `number` | |\n\n## Examples\n\n### Default Usage\n\nYou don't need to pass any props, or slots. Simply add the component, and when it has any popular\nsearches it will show them.\n\n```vue live\n<template>\n <PopularSearches />\n</template>\n\n<script>\n import { PopularSearches } from '@empathyco/x-components/popular-searches';\n export default {\n name: 'PopularSearchesDemo',\n components: {\n PopularSearches\n }\n };\n</script>\n```\n\nThe component has two optional props. `animation` to render the component with an animation and\n`maxItemsToRender` to limit the number of popular searches will be rendered (by default it is 5).\n\n```vue live\n<template>\n <PopularSearches :animation=\"'FadeAndSlide'\" :maxItemsToRender=\"10\" />\n</template>\n\n<script>\n import Vue from 'vue';\n import { PopularSearches } from '@empathyco/x-components/popular-searches';\n import FadeAndSlide from '@empathyco/x-components';\n\n // Registering the animation as a global component\n Vue.component('FadeAndSlide', FadeAndSlide);\n export default {\n name: 'PopularSearchesDemo',\n components: {\n PopularSearches,\n FadeAndSlide\n }\n };\n</script>\n```\n\n### Overriding Popular Search's Content\n\nYou can use your custom implementation of the Popular Search's content. In the example below,\ninstead of using the default Popular Search's content, an icon is added, as well as a span with the\nquery of the Popular Search's suggestion.\n\n```vue live\n<template>\n <PopularSearches>\n <template #suggestion-content=\"{ suggestion }\">\n <TrendingIcon />\n <span class=\"x-popular-search__query\">{{ suggestion.query }}</span>\n </template>\n </PopularSearches>\n</template>\n\n<script>\n import { PopularSearches } from '@empathyco/x-components/popular-searches';\n import { TrendingIcon } from '@empathyco/x-components';\n\n export default {\n name: 'PopularSearchesDemo',\n components: {\n PopularSearches,\n TrendingIcon\n }\n };\n</script>\n```\n\n### Adding a Custom Popular Search Item\n\nYou can use your custom implementation for the whole Popular Search item. In the example below, we\nchange the default implementation of the Popular Search in Popular Searches. A custom Popular Search\nimplementation is added, it has an image and a span as content (as in the previous example). Also, a\nbutton with a user customized behaviour is added at the same hierarchical level as the Popular\nSearch component.\n\n```vue live\n<template>\n <PopularSearches>\n <template #suggestion=\"{ suggestion }\">\n <PopularSearch :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <TrendingIcon />\n <span class=\"x-popular-search__query\">{{ suggestion.query }}</span>\n </template>\n </PopularSearch>\n <button>Custom Behaviour</button>\n </template>\n </PopularSearches>\n</template>\n\n<script>\n import { PopularSearches, PopularSearch } from '@empathyco/x-components/popular-searches';\n import { TrendingIcon } from '@empathyco/x-components';\n\n export default {\n name: 'PopularSearchesDemo',\n components: {\n PopularSearches,\n PopularSearch,\n TrendingIcon\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_createVNode"],"mappings":";;;;;;AA6BoB,EAAA,MAAA,0BAAA,GAAAA,gBAAA,CAAA,iBAAA,CAAA,CAAA;AA1BX,EAAA,OAAAC,SAAA,EAAqB,EAAAC,WAAA,CAAA,0BAAA,EAAA;AAAA,IAC1B,WAAU,EAAA,IAAA,CAAA,eAAA;AAAA,IAAA,KAAA,EAAA,oBAAA;IAEC,WAAO,EAAA,kBAAA;AAAA,GAAA,EAAA;aAQdC,OAYgB,CAAA,CAAA,SAAA,KAAA;AAAA,MAXbC,UAAA,CAAA,IAAA,CAAY,QAAS,YAAW,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAA,CAAA,CAAA,EAAA,MAAA;AAAA,QAC3BC,WAAA,CAAA,wBAAA,EAAA;AAAA,UAAA,UAAA,EAAA,SAAA,CAAA,UAAA;UACL,KAAO,EAAA,6CAAA;AAAA,SAAA,EAAA;;AAjBlB,YAAAH,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,oBAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAA,GAAA,kBAAA,EAAA,CAAA,CAAA,CAAA;AAAA,WAAA,CAAA;;;;AAAA,OAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './query-preview-button.vue2.js';
2
- import { resolveComponent, openBlock, createBlock, withCtx, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from 'vue';
2
+ import { resolveComponent, openBlock, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString } from 'vue';
3
3
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
4
4
 
5
5
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -11,7 +11,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11
11
  "data-test": "query-preview-button"
12
12
  }, {
13
13
  default: withCtx(() => [
14
- createCommentVNode(" @slot Button content with a text, an icon or both "),
15
14
  renderSlot(_ctx.$slots, "default", { queryPreviewInfo: _ctx.fullQueryPreviewInfo }, () => [
16
15
  createTextVNode(
17
16
  toDisplayString(_ctx.queryPreviewInfo.query),
@@ -1 +1 @@
1
- {"version":3,"file":"query-preview-button.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-button.vue"],"sourcesContent":["<template>\n <BaseEventButton\n :events=\"events\"\n :metadata=\"metadata\"\n class=\"x-query-preview-button x-button\"\n data-test=\"query-preview-button\"\n >\n <!-- @slot Button content with a text, an icon or both -->\n <slot :queryPreviewInfo=\"fullQueryPreviewInfo\">\n {{ queryPreviewInfo.query }}\n </slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { QueryPreviewInfo } from '../store/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { BaseEventButton } from '../../../components';\n import { queriesPreviewXModule } from '../x-module';\n import { useState } from '../../../composables/use-state';\n import { WireMetadata } from '../../../wiring/index';\n\n /**\n * Component containing an event button that emits\n * {@link QueriesPreviewXEvents.UserAcceptedAQueryPreview} when clicked with\n * the full query preview info as payload.\n *\n * It has a default slot to customize its contents.\n *\n * @public\n */\n export default defineComponent({\n name: 'QueryPreviewButton',\n xModule: queriesPreviewXModule.name,\n components: { BaseEventButton },\n props: {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n queryPreviewInfo: {\n type: Object as PropType<QueryPreviewInfo>,\n required: true\n },\n /**\n * The metadata property for the request on each query preview.\n *\n * @public\n */\n metadata: {\n type: Object as PropType<Omit<WireMetadata, 'moduleName'>>\n }\n },\n setup(props) {\n /**\n * We use the module extra params to combine them with the query preview's extra params.\n */\n const { params } = useState('queriesPreview', ['params']);\n\n /**\n * The provided query preview with the base extra params from the module merged in.\n *\n * @returns The query preview info with the base extra params merged in.\n * @public\n */\n const fullQueryPreviewInfo = computed(\n (): QueryPreviewInfo => ({\n ...props.queryPreviewInfo,\n extraParams: {\n ...params.value,\n ...props.queryPreviewInfo.extraParams\n },\n filters: props.queryPreviewInfo.filters\n })\n );\n\n /**\n * List of events to emit by the BaseEventButton.\n *\n * @returns An object with the event and payload.\n *\n * @internal\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserAcceptedAQueryPreview: fullQueryPreviewInfo.value })\n );\n\n return {\n fullQueryPreviewInfo,\n events\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThe component content has the query preview query as default\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\" />\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n### Customizing slots\n\nThe content of the button is customizable via its default slot\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\">\n {{ `Search for: ${queryPreviewInfo.query}` }}\n </QueryPreviewButton>\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserAcceptedAQueryPreview`: the event is emitted after the user clicks the button. The event\n payload is the `QueryPreviewInfo` of the query.\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_withCtx","_createCommentVNode","_renderSlot"],"mappings":";;;;;AAWoB,EAAA,MAAA,0BAAA,GAAAA,gBAAA,CAAA,iBAAA,CAAA,CAAA;AARf,EAAA,OAAAC,SAAA,EAAkB,EAAAC,WAAA,CAAA,0BAAA,EAAA;AAAA,IACnB,MAAM,EAAA,IAAA,CAAA,MAAA;AAAA,IACN,QAAU,EAAA,IAAA,CAAA,QAAA;AAAA,IAAA,KAAA,EAAA,iCAAA;AALd,IAAA,WAAA,EAAA,sBAAA;AAAA,GAAA,EAAA;aAQIC,OAEO,CAAA,MAAA;AAAA,MAAAC,kBAAA,CAVX,qDAS+B,CAAA;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAA,gBAAA,EAAA,IAAA,CAAA,oBAAA,EAAA,EAAA,MAAA;;;;;;AAT/B,OAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"query-preview-button.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-button.vue"],"sourcesContent":["<template>\n <BaseEventButton\n :events=\"events\"\n :metadata=\"metadata\"\n class=\"x-query-preview-button x-button\"\n data-test=\"query-preview-button\"\n >\n <!-- @slot Button content with a text, an icon or both -->\n <slot :queryPreviewInfo=\"fullQueryPreviewInfo\">\n {{ queryPreviewInfo.query }}\n </slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { QueryPreviewInfo } from '../store/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { BaseEventButton } from '../../../components';\n import { queriesPreviewXModule } from '../x-module';\n import { useState } from '../../../composables/use-state';\n import { WireMetadata } from '../../../wiring/index';\n\n /**\n * Component containing an event button that emits\n * {@link QueriesPreviewXEvents.UserAcceptedAQueryPreview} when clicked with\n * the full query preview info as payload.\n *\n * It has a default slot to customize its contents.\n *\n * @public\n */\n export default defineComponent({\n name: 'QueryPreviewButton',\n xModule: queriesPreviewXModule.name,\n components: { BaseEventButton },\n props: {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n queryPreviewInfo: {\n type: Object as PropType<QueryPreviewInfo>,\n required: true\n },\n /**\n * The metadata property for the request on each query preview.\n *\n * @public\n */\n metadata: {\n type: Object as PropType<Omit<WireMetadata, 'moduleName'>>\n }\n },\n setup(props) {\n /**\n * We use the module extra params to combine them with the query preview's extra params.\n */\n const { params } = useState('queriesPreview', ['params']);\n\n /**\n * The provided query preview with the base extra params from the module merged in.\n *\n * @returns The query preview info with the base extra params merged in.\n * @public\n */\n const fullQueryPreviewInfo = computed(\n (): QueryPreviewInfo => ({\n ...props.queryPreviewInfo,\n extraParams: {\n ...params.value,\n ...props.queryPreviewInfo.extraParams\n },\n filters: props.queryPreviewInfo.filters\n })\n );\n\n /**\n * List of events to emit by the BaseEventButton.\n *\n * @returns An object with the event and payload.\n *\n * @internal\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserAcceptedAQueryPreview: fullQueryPreviewInfo.value })\n );\n\n return {\n fullQueryPreviewInfo,\n events\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThe component content has the query preview query as default\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\" />\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n### Customizing slots\n\nThe content of the button is customizable via its default slot\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\">\n {{ `Search for: ${queryPreviewInfo.query}` }}\n </QueryPreviewButton>\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserAcceptedAQueryPreview`: the event is emitted after the user clicks the button. The event\n payload is the `QueryPreviewInfo` of the query.\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_withCtx","_renderSlot"],"mappings":";;;;;AAWoB,EAAA,MAAA,0BAAA,GAAAA,gBAAA,CAAA,iBAAA,CAAA,CAAA;AARf,EAAA,OAAAC,SAAA,EAAkB,EAAAC,WAAA,CAAA,0BAAA,EAAA;AAAA,IACnB,MAAM,EAAA,IAAA,CAAA,MAAA;AAAA,IACN,QAAU,EAAA,IAAA,CAAA,QAAA;AAAA,IAAA,KAAA,EAAA,iCAAA;AALd,IAAA,WAAA,EAAA,sBAAA;AAAA,GAAA,EAAA;AAAA,IAAA,OAAA,EAAAC,OAAA,CAAA,MAAA;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAA,gBAAA,EAAA,IAAA,CAAA,oBAAA,EAAA,EAAA,MAAA;;;;;;AAAA,OAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
@@ -82,6 +82,8 @@ import '../../../components/base-grid.vue3.js';
82
82
  import '../../../components/base-keyboard-navigation.vue2.js';
83
83
  import '../../../components/base-rating.vue2.js';
84
84
  import '../../../components/base-rating.vue3.js';
85
+ import '../../../components/base-slider.vue2.js';
86
+ import '../../../components/base-slider.vue3.js';
85
87
  import '../../../components/base-switch.vue2.js';
86
88
  import '../../../components/base-switch.vue3.js';
87
89
  import '../../../components/base-variable-column-grid.vue2.js';
@@ -94,6 +96,10 @@ import '../../../components/sliding-panel.vue2.js';
94
96
  import '../../../components/sliding-panel.vue3.js';
95
97
  import '../../../components/snippet-callbacks.vue2.js';
96
98
  import '../../../components/page-loader-button.vue2.js';
99
+ import '../../../components/page-loader-button.vue3.js';
100
+ import '../../../components/page-selector.vue2.js';
101
+ import '../../../components/page-selector.vue3.js';
102
+ import '../../../components/display-click-provider.vue.js';
97
103
  import { queriesPreviewXModule } from '../x-module.js';
98
104
  import { useState } from '../../../composables/use-state.js';
99
105
 
@@ -1 +1 @@
1
- {"version":3,"file":"query-preview-button.vue2.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-button.vue"],"sourcesContent":["<template>\n <BaseEventButton\n :events=\"events\"\n :metadata=\"metadata\"\n class=\"x-query-preview-button x-button\"\n data-test=\"query-preview-button\"\n >\n <!-- @slot Button content with a text, an icon or both -->\n <slot :queryPreviewInfo=\"fullQueryPreviewInfo\">\n {{ queryPreviewInfo.query }}\n </slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { QueryPreviewInfo } from '../store/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { BaseEventButton } from '../../../components';\n import { queriesPreviewXModule } from '../x-module';\n import { useState } from '../../../composables/use-state';\n import { WireMetadata } from '../../../wiring/index';\n\n /**\n * Component containing an event button that emits\n * {@link QueriesPreviewXEvents.UserAcceptedAQueryPreview} when clicked with\n * the full query preview info as payload.\n *\n * It has a default slot to customize its contents.\n *\n * @public\n */\n export default defineComponent({\n name: 'QueryPreviewButton',\n xModule: queriesPreviewXModule.name,\n components: { BaseEventButton },\n props: {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n queryPreviewInfo: {\n type: Object as PropType<QueryPreviewInfo>,\n required: true\n },\n /**\n * The metadata property for the request on each query preview.\n *\n * @public\n */\n metadata: {\n type: Object as PropType<Omit<WireMetadata, 'moduleName'>>\n }\n },\n setup(props) {\n /**\n * We use the module extra params to combine them with the query preview's extra params.\n */\n const { params } = useState('queriesPreview', ['params']);\n\n /**\n * The provided query preview with the base extra params from the module merged in.\n *\n * @returns The query preview info with the base extra params merged in.\n * @public\n */\n const fullQueryPreviewInfo = computed(\n (): QueryPreviewInfo => ({\n ...props.queryPreviewInfo,\n extraParams: {\n ...params.value,\n ...props.queryPreviewInfo.extraParams\n },\n filters: props.queryPreviewInfo.filters\n })\n );\n\n /**\n * List of events to emit by the BaseEventButton.\n *\n * @returns An object with the event and payload.\n *\n * @internal\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserAcceptedAQueryPreview: fullQueryPreviewInfo.value })\n );\n\n return {\n fullQueryPreviewInfo,\n events\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThe component content has the query preview query as default\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\" />\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n### Customizing slots\n\nThe content of the button is customizable via its default slot\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\">\n {{ `Search for: ${queryPreviewInfo.query}` }}\n </QueryPreviewButton>\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserAcceptedAQueryPreview`: the event is emitted after the user clicks the button. The event\n payload is the `QueryPreviewInfo` of the query.\n</docs>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBE;;;;;;;;AAQE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,oBAAoB;IAC1B,OAAO,EAAE,qBAAqB,CAAC,IAAI;IACnC,UAAU,EAAE,EAAE,eAAc,EAAG;AAC/B,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,gBAAgB,EAAE;AAChB,YAAA,IAAI,EAAE,MAAoC;AAC1C,YAAA,QAAQ,EAAE,IAAG;AACd,SAAA;AACD;;;;AAIE;AACF,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,MAAmD;AAC3D,SAAA;AACD,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT;;AAEE;AACF,QAAA,MAAM,EAAE,MAAK,KAAM,QAAQ,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEzD;;;;;AAKE;AACF,QAAA,MAAM,oBAAqB,GAAE,QAAQ,CACnC,OAAyB;YACvB,GAAG,KAAK,CAAC,gBAAgB;AACzB,YAAA,WAAW,EAAE;gBACX,GAAG,MAAM,CAAC,KAAK;AACf,gBAAA,GAAG,KAAK,CAAC,gBAAgB,CAAC,WAAU;AACrC,aAAA;AACD,YAAA,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAM;AACvC,SAAA,CAAA,CACF,CAAA;AAED;;;;;;AAME;AACF,QAAA,MAAM,MAAO,GAAE,QAAQ,CACrB,OAA8B,EAAE,yBAAyB,EAAE,oBAAoB,CAAC,OAAO,CAAA,CACxF,CAAA;QAED,OAAO;YACL,oBAAoB;YACpB,MAAK;SACN,CAAA;KACH;AACD,CAAA,CAAC;;;;"}
1
+ {"version":3,"file":"query-preview-button.vue2.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-button.vue"],"sourcesContent":["<template>\n <BaseEventButton\n :events=\"events\"\n :metadata=\"metadata\"\n class=\"x-query-preview-button x-button\"\n data-test=\"query-preview-button\"\n >\n <!-- @slot Button content with a text, an icon or both -->\n <slot :queryPreviewInfo=\"fullQueryPreviewInfo\">\n {{ queryPreviewInfo.query }}\n </slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { QueryPreviewInfo } from '../store/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { BaseEventButton } from '../../../components';\n import { queriesPreviewXModule } from '../x-module';\n import { useState } from '../../../composables/use-state';\n import { WireMetadata } from '../../../wiring/index';\n\n /**\n * Component containing an event button that emits\n * {@link QueriesPreviewXEvents.UserAcceptedAQueryPreview} when clicked with\n * the full query preview info as payload.\n *\n * It has a default slot to customize its contents.\n *\n * @public\n */\n export default defineComponent({\n name: 'QueryPreviewButton',\n xModule: queriesPreviewXModule.name,\n components: { BaseEventButton },\n props: {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n queryPreviewInfo: {\n type: Object as PropType<QueryPreviewInfo>,\n required: true\n },\n /**\n * The metadata property for the request on each query preview.\n *\n * @public\n */\n metadata: {\n type: Object as PropType<Omit<WireMetadata, 'moduleName'>>\n }\n },\n setup(props) {\n /**\n * We use the module extra params to combine them with the query preview's extra params.\n */\n const { params } = useState('queriesPreview', ['params']);\n\n /**\n * The provided query preview with the base extra params from the module merged in.\n *\n * @returns The query preview info with the base extra params merged in.\n * @public\n */\n const fullQueryPreviewInfo = computed(\n (): QueryPreviewInfo => ({\n ...props.queryPreviewInfo,\n extraParams: {\n ...params.value,\n ...props.queryPreviewInfo.extraParams\n },\n filters: props.queryPreviewInfo.filters\n })\n );\n\n /**\n * List of events to emit by the BaseEventButton.\n *\n * @returns An object with the event and payload.\n *\n * @internal\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserAcceptedAQueryPreview: fullQueryPreviewInfo.value })\n );\n\n return {\n fullQueryPreviewInfo,\n events\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThe component content has the query preview query as default\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\" />\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n### Customizing slots\n\nThe content of the button is customizable via its default slot\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\">\n {{ `Search for: ${queryPreviewInfo.query}` }}\n </QueryPreviewButton>\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserAcceptedAQueryPreview`: the event is emitted after the user clicks the button. The event\n payload is the `QueryPreviewInfo` of the query.\n</docs>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBE;;;;;;;;AAQE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,oBAAoB;IAC1B,OAAO,EAAE,qBAAqB,CAAC,IAAI;IACnC,UAAU,EAAE,EAAE,eAAc,EAAG;AAC/B,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,gBAAgB,EAAE;AAChB,YAAA,IAAI,EAAE,MAAoC;AAC1C,YAAA,QAAQ,EAAE,IAAG;AACd,SAAA;AACD;;;;AAIE;AACF,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,MAAmD;AAC3D,SAAA;AACD,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT;;AAEE;AACF,QAAA,MAAM,EAAE,MAAK,KAAM,QAAQ,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEzD;;;;;AAKE;AACF,QAAA,MAAM,oBAAqB,GAAE,QAAQ,CACnC,OAAyB;YACvB,GAAG,KAAK,CAAC,gBAAgB;AACzB,YAAA,WAAW,EAAE;gBACX,GAAG,MAAM,CAAC,KAAK;AACf,gBAAA,GAAG,KAAK,CAAC,gBAAgB,CAAC,WAAU;AACrC,aAAA;AACD,YAAA,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAM;AACvC,SAAA,CAAA,CACF,CAAA;AAED;;;;;;AAME;AACF,QAAA,MAAM,MAAO,GAAE,QAAQ,CACrB,OAA8B,EAAE,yBAAyB,EAAE,oBAAoB,CAAC,OAAO,CAAA,CACxF,CAAA;QAED,OAAO;YACL,oBAAoB;YACpB,MAAK;SACN,CAAA;KACH;AACD,CAAA,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"query-preview-list.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-list.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" class=\"x-query-preview-list\" tag=\"ul\">\n <li\n v-for=\"(queryPreview, index) in renderedQueryPreviews\"\n :key=\"index\"\n data-test=\"query-preview-item\"\n >\n <QueryPreview\n @load=\"flagAsLoaded\"\n @error=\"flagAsFailed\"\n :debounceTimeMs=\"debounceTimeMs\"\n :maxItemsToRender=\"maxItemsToRender\"\n :persistInCache=\"persistInCache\"\n :queryFeature=\"queryFeature\"\n :queryPreviewInfo=\"queryPreview\"\n >\n <template v-for=\"(_, slotName) in $slots\" v-slot:[slotName]=\"scope\">\n <slot :name=\"slotName\" v-bind=\"scope\" />\n </template>\n </QueryPreview>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, watch } from 'vue';\n import { RequestStatus } from '../../../store';\n import { queriesPreviewXModule } from '../x-module';\n import { QueryPreviewInfo } from '../store/types';\n import { getHashFromQueryPreviewInfo } from '../utils/get-hash-from-query-preview';\n import { AnimationProp, QueryFeature } from '../../../types';\n import QueryPreview from './query-preview.vue';\n\n interface QueryPreviewStatusRecord {\n [query: string]: RequestStatus;\n }\n\n /**\n * Renders the results previews of a list of objects with the information about the query preview,\n * and exposes the {@link QueryPreview} slots to modify the content.\n * The requests are made in sequential order.\n *\n * @public\n */\n export default defineComponent({\n name: 'QueryPreviewList',\n xModule: queriesPreviewXModule.name,\n components: { QueryPreview },\n props: {\n /**\n * The list of queries preview to render.\n *\n * @public\n */\n queriesPreviewInfo: {\n type: Array as PropType<QueryPreviewInfo[]>,\n required: true\n },\n /**\n * The origin property for the request on each query preview.\n *\n * @public\n */\n queryFeature: {\n type: String as PropType<QueryFeature>\n },\n /**\n * Number of query preview results to be rendered on each query preview.\n *\n * @public\n */\n maxItemsToRender: {\n type: Number\n },\n /**\n * Debounce time in milliseconds for triggering the search requests\n * on each query preview.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n debounceTimeMs: {\n type: Number,\n default: 0\n },\n /**\n * Controls whether all the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n persistInCache: Boolean,\n /**\n * Animation component that will be used to animate the elements.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul'\n }\n },\n setup(props) {\n /**\n * Contains the status of the preview requests, indexed by query.\n */\n let queriesStatus = ref<QueryPreviewStatusRecord>({});\n\n /**\n * The list of queries to preview.\n *\n * @returns The list of queries in the queriesPreviewInfo list.\n * @internal\n */\n const queries = computed((): string[] =>\n props.queriesPreviewInfo.map(item => getHashFromQueryPreviewInfo(item))\n );\n\n /**\n * Gets all the queries to render, that are those that don't have an `error` status.\n *\n * @returns A list of queries.\n * @internal\n */\n const renderedQueryPreviews = computed((): QueryPreviewInfo[] => {\n return props.queriesPreviewInfo.filter(item => {\n const queryPreviewHash = getHashFromQueryPreviewInfo(item);\n return (\n queriesStatus.value[queryPreviewHash] === 'success' ||\n queriesStatus.value[queryPreviewHash] === 'loading'\n );\n });\n });\n\n /**\n * Tries to load the next query.\n *\n * @internal\n */\n const loadNext = (): void => {\n const queryToLoad = queries.value.find(query => !(query in queriesStatus.value));\n if (queryToLoad) {\n queriesStatus.value[queryToLoad] = 'loading';\n }\n };\n\n /**\n * Resets the status of all queries if they change.\n *\n * @param newQueries - The new queries.\n * @param oldQueries - The old queries.\n * @internal\n */\n watch(\n queries,\n (newQueries: string[], oldQueries: string[] | undefined) => {\n if (newQueries.toString() !== oldQueries?.toString()) {\n for (const key of Object.keys(queriesStatus.value)) {\n if (!newQueries.includes(key)) {\n delete queriesStatus.value[key];\n }\n }\n loadNext();\n }\n },\n { immediate: true, deep: true }\n );\n\n /**\n * Sets the status of a given query to `success`.\n *\n * @param loadedQuery - The query to flag as loaded.\n * @internal\n */\n const flagAsLoaded = (loadedQuery: string): void => {\n queriesStatus.value[loadedQuery] = 'success';\n loadNext();\n };\n\n /**\n * Sets the status of a given query to `error`.\n *\n * @param failedQuery - The query to flag as failed.\n * @internal\n */\n const flagAsFailed = (failedQuery: string): void => {\n queriesStatus.value[failedQuery] = 'error';\n loadNext();\n };\n\n return {\n renderedQueryPreviews,\n flagAsFailed,\n flagAsLoaded\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\nHere you have a basic example of how the QueryPreviewList is rendered. Keep in mind that this\ncomponent is intended to be used overriding its default slot. By default it will only render the\nnames of the results.\n\n```vue live\n<template>\n <QueryPreviewList :queriesPreviewInfo=\"queriesPreviewInfo\" />\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewListDemo',\n components: {\n QueryPreviewList\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <QueryPreviewList\n :queriesPreviewInfo=\"queriesPreviewInfo\"\n #default=\"{ queryPreviewInfo, totalResults, results }\"\n >\n <div class=\"x-flex x-flex-col x-gap-8 x-mb-16\">\n <h1 class=\"x-title2\">{{ queryPreviewInfo.query }} ({{ totalResults }})</h1>\n <SlidingPanel :resetOnContentChange=\"false\">\n <div class=\"x-flex x-gap-8\">\n <Result\n v-for=\"result in results\"\n :key=\"result.id\"\n :result=\"result\"\n style=\"max-width: 180px\"\n />\n </div>\n </SlidingPanel>\n </div>\n </QueryPreviewList>\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n import { BaseResultImage, BaseResultLink, SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'QueryPreviewListDemoOverridingSlot',\n components: {\n BaseResultImage,\n BaseResultLink,\n QueryPreviewList,\n SlidingPanel\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <QueryPreviewList\n class=\"x-flex x-gap-8\"\n :queriesPreviewInfo=\"queriesPreviewInfo\"\n #result=\"{ result }\"\n >\n <span class=\"x-font-bold\">{{ result.id }}:</span>\n <span>{{ result.name }}</span>\n </QueryPreviewList>\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewListDemoOverridingResultSlot',\n components: {\n QueryPreviewList\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","animation","_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","flagAsFailed","persistInCache","queryFeature","$slots","_withCtx"],"mappings":";;;;;AACE,EAAA,MAAA,uBAAA,GAAAA,gBAAA,CADF,cACkBC,CAAAA,CAAAA;SAA4CC,SAAI,EAAA,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA;AAAA,IAAA,KAAA,EAAA,sBAAA;AADlE,IAAA,GAAA,EAAA,IAAA;AAAA,GAAA,EAAA;;iBAIY,IAAK,CAAA,EAAAC,kBAAA;AAAA,QAAAC,QAAA;AAAA,QAAA,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,qBAAA,EAAA,CAAA,YAAA,EAAA,KAAA,KAAA;AACX,UAAA,OAAAL,SAAA,EAA8B,EAAAG,kBAAA,CAAA,IAAA,EAAA;AAAA,YAAA,GAAA,EAAA,KAAA;YAE9B,WAYe,EAAA,oBAAA;AAAA,WAAA,EAAA;wBAVLG,uBAAY,EAAA;AAAA,cACnB,MAAA,EAAA,IAAA,CAAA,YAAA;AAAA,cACA,OAAA,EAAA,IAAA,CAAA,YAAA;AAAA,cACA,cAAgBC,EAAAA,IAAAA,CAAAA,cAAAA;AAAAA,cAChB,gBAAcC,EAAAA,IAAAA,CAAAA,gBAAAA;AAAAA,cACd,gBAAgB,IAAE,CAAA,cAAA;AAAA,cAd3B,YAAA,EAAA,IAAA,CAAA,YAAA;AAAA,cAgB0CC,gBAAAA,EAAAA,YAAAA;AAAAA,aAAAA,EAAAA,WAAAA,CAAAA;;;;yBAAe,IAAU,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA,QAAA,KAAA;AAhBnE,gBAAA,OAAA;AAAA,kBAiBU,IAAA,EAAA,QAAA;AAAA,kBAAA,EAAA,EAAAC,OAAA,CAAA,CAAA,KAAA,KAAA;;;;;;;AAjBV,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"query-preview-list.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-list.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" class=\"x-query-preview-list\" tag=\"ul\">\n <li\n v-for=\"(queryPreview, index) in renderedQueryPreviews\"\n :key=\"index\"\n data-test=\"query-preview-item\"\n >\n <QueryPreview\n @load=\"flagAsLoaded\"\n @error=\"flagAsFailed\"\n :debounceTimeMs=\"debounceTimeMs\"\n :maxItemsToRender=\"maxItemsToRender\"\n :persistInCache=\"persistInCache\"\n :queryFeature=\"queryFeature\"\n :queryPreviewInfo=\"queryPreview\"\n >\n <template v-for=\"(_, slotName) in $slots\" v-slot:[slotName]=\"scope\">\n <slot :name=\"slotName\" v-bind=\"scope\" />\n </template>\n </QueryPreview>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, watch } from 'vue';\n import { RequestStatus } from '../../../store';\n import { queriesPreviewXModule } from '../x-module';\n import { QueryPreviewInfo } from '../store/types';\n import { getHashFromQueryPreviewInfo } from '../utils/get-hash-from-query-preview';\n import { AnimationProp, QueryFeature } from '../../../types';\n import { useState } from '../../../composables/index';\n import QueryPreview from './query-preview.vue';\n\n interface QueryPreviewStatusRecord {\n [query: string]: RequestStatus;\n }\n\n /**\n * Renders the results previews of a list of objects with the information about the query preview,\n * and exposes the {@link QueryPreview} slots to modify the content.\n * The requests are made in sequential order.\n *\n * @public\n */\n export default defineComponent({\n name: 'QueryPreviewList',\n xModule: queriesPreviewXModule.name,\n components: { QueryPreview },\n props: {\n /**\n * The list of queries preview to render.\n *\n * @public\n */\n queriesPreviewInfo: {\n type: Array as PropType<QueryPreviewInfo[]>,\n required: true\n },\n /**\n * The origin property for the request on each query preview.\n *\n * @public\n */\n queryFeature: {\n type: String as PropType<QueryFeature>\n },\n /**\n * Number of query preview results to be rendered on each query preview.\n *\n * @public\n */\n maxItemsToRender: {\n type: Number\n },\n /**\n * Debounce time in milliseconds for triggering the search requests\n * on each query preview.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n debounceTimeMs: {\n type: Number,\n default: 0\n },\n /**\n * Controls whether all the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n persistInCache: Boolean,\n /**\n * Animation component that will be used to animate the elements.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul'\n }\n },\n setup(props) {\n const { params } = useState('queriesPreview', ['params']);\n\n /**\n * Contains the status of the preview requests, indexed by query.\n */\n let queriesStatus = ref<QueryPreviewStatusRecord>({});\n\n /**\n * The list of queries to preview.\n *\n * @returns The list of queries in the queriesPreviewInfo list.\n * @internal\n */\n const queries = computed((): string[] =>\n props.queriesPreviewInfo.map(item =>\n getHashFromQueryPreviewInfo(item, params.value.lang as string)\n )\n );\n\n /**\n * Gets all the queries to render, that are those that don't have an `error` status.\n *\n * @returns A list of queries.\n * @internal\n */\n const renderedQueryPreviews = computed((): QueryPreviewInfo[] => {\n return props.queriesPreviewInfo.filter(item => {\n const queryPreviewHash = getHashFromQueryPreviewInfo(item, params.value.lang as string);\n return (\n queriesStatus.value[queryPreviewHash] === 'success' ||\n queriesStatus.value[queryPreviewHash] === 'loading'\n );\n });\n });\n\n /**\n * Tries to load the next query.\n *\n * @internal\n */\n const loadNext = (): void => {\n const queryToLoad = queries.value.find(query => !(query in queriesStatus.value));\n if (queryToLoad) {\n queriesStatus.value[queryToLoad] = 'loading';\n }\n };\n\n /**\n * Resets the status of all queries if they change.\n *\n * @param newQueries - The new queries.\n * @param oldQueries - The old queries.\n * @internal\n */\n watch(\n queries,\n (newQueries: string[], oldQueries: string[] | undefined) => {\n if (newQueries.toString() !== oldQueries?.toString()) {\n for (const key of Object.keys(queriesStatus.value)) {\n if (!newQueries.includes(key)) {\n delete queriesStatus.value[key];\n }\n }\n loadNext();\n }\n },\n { immediate: true, deep: true }\n );\n\n /**\n * Sets the status of a given query to `success`.\n *\n * @param loadedQuery - The query to flag as loaded.\n * @internal\n */\n const flagAsLoaded = (loadedQuery: string): void => {\n queriesStatus.value[loadedQuery] = 'success';\n loadNext();\n };\n\n /**\n * Sets the status of a given query to `error`.\n *\n * @param failedQuery - The query to flag as failed.\n * @internal\n */\n const flagAsFailed = (failedQuery: string): void => {\n queriesStatus.value[failedQuery] = 'error';\n loadNext();\n };\n\n return {\n renderedQueryPreviews,\n flagAsFailed,\n flagAsLoaded\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\nHere you have a basic example of how the QueryPreviewList is rendered. Keep in mind that this\ncomponent is intended to be used overriding its default slot. By default it will only render the\nnames of the results.\n\n```vue live\n<template>\n <QueryPreviewList :queriesPreviewInfo=\"queriesPreviewInfo\" />\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewListDemo',\n components: {\n QueryPreviewList\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <QueryPreviewList\n :queriesPreviewInfo=\"queriesPreviewInfo\"\n #default=\"{ queryPreviewInfo, totalResults, results }\"\n >\n <div class=\"x-flex x-flex-col x-gap-8 x-mb-16\">\n <h1 class=\"x-title2\">{{ queryPreviewInfo.query }} ({{ totalResults }})</h1>\n <SlidingPanel :resetOnContentChange=\"false\">\n <div class=\"x-flex x-gap-8\">\n <Result\n v-for=\"result in results\"\n :key=\"result.id\"\n :result=\"result\"\n style=\"max-width: 180px\"\n />\n </div>\n </SlidingPanel>\n </div>\n </QueryPreviewList>\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n import { BaseResultImage, BaseResultLink, SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'QueryPreviewListDemoOverridingSlot',\n components: {\n BaseResultImage,\n BaseResultLink,\n QueryPreviewList,\n SlidingPanel\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <QueryPreviewList\n class=\"x-flex x-gap-8\"\n :queriesPreviewInfo=\"queriesPreviewInfo\"\n #result=\"{ result }\"\n >\n <span class=\"x-font-bold\">{{ result.id }}:</span>\n <span>{{ result.name }}</span>\n </QueryPreviewList>\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewListDemoOverridingResultSlot',\n components: {\n QueryPreviewList\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","animation","_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","flagAsFailed","persistInCache","queryFeature","$slots","_withCtx"],"mappings":";;;;;AACE,EAAA,MAAA,uBAAA,GAAAA,gBAAA,CADF,cACkBC,CAAAA,CAAAA;SAA4CC,SAAI,EAAA,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA;AAAA,IAAA,KAAA,EAAA,sBAAA;AADlE,IAAA,GAAA,EAAA,IAAA;AAAA,GAAA,EAAA;;iBAIY,IAAK,CAAA,EAAAC,kBAAA;AAAA,QAAAC,QAAA;AAAA,QAAA,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,qBAAA,EAAA,CAAA,YAAA,EAAA,KAAA,KAAA;AACX,UAAA,OAAAL,SAAA,EAA8B,EAAAG,kBAAA,CAAA,IAAA,EAAA;AAAA,YAAA,GAAA,EAAA,KAAA;YAE9B,WAYe,EAAA,oBAAA;AAAA,WAAA,EAAA;wBAVLG,uBAAY,EAAA;AAAA,cACnB,MAAA,EAAA,IAAA,CAAA,YAAA;AAAA,cACA,OAAA,EAAA,IAAA,CAAA,YAAA;AAAA,cACA,cAAgBC,EAAAA,IAAAA,CAAAA,cAAAA;AAAAA,cAChB,gBAAcC,EAAAA,IAAAA,CAAAA,gBAAAA;AAAAA,cACd,gBAAgB,IAAE,CAAA,cAAA;AAAA,cAd3B,YAAA,EAAA,IAAA,CAAA,YAAA;AAAA,cAgB0CC,gBAAAA,EAAAA,YAAAA;AAAAA,aAAAA,EAAAA,WAAAA,CAAAA;;;;yBAAe,IAAU,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA,QAAA,KAAA;AAhBnE,gBAAA,OAAA;AAAA,kBAiBU,IAAA,EAAA,QAAA;AAAA,kBAAA,EAAA,EAAAC,OAAA,CAAA,CAAA,KAAA,KAAA;;;;;;;AAjBV,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
@@ -2,6 +2,18 @@ import { defineComponent, ref, computed, watch } from 'vue';
2
2
  import { queriesPreviewXModule } from '../x-module.js';
3
3
  import { getHashFromQueryPreviewInfo } from '../utils/get-hash-from-query-preview.js';
4
4
  import { AnimationProp } from '../../../types/animation-prop.js';
5
+ import '../../../composables/create-use-device.js';
6
+ import '@vue/devtools-api';
7
+ import '../../../plugins/devtools/timeline.devtools.js';
8
+ import '@empathyco/x-utils';
9
+ import 'rxjs/operators';
10
+ import 'rxjs';
11
+ import '../../../plugins/devtools/colors.utils.js';
12
+ import '../../../plugins/x-bus.js';
13
+ import '../../../plugins/x-plugin.js';
14
+ import 'vuex';
15
+ import '@vueuse/core';
16
+ import { useState } from '../../../composables/use-state.js';
5
17
  import QueryPreview from './query-preview.vue.js';
6
18
 
7
19
  /**
@@ -69,6 +81,7 @@ var _sfc_main = defineComponent({
69
81
  }
70
82
  },
71
83
  setup(props) {
84
+ const { params } = useState('queriesPreview', ['params']);
72
85
  /**
73
86
  * Contains the status of the preview requests, indexed by query.
74
87
  */
@@ -79,7 +92,7 @@ var _sfc_main = defineComponent({
79
92
  * @returns The list of queries in the queriesPreviewInfo list.
80
93
  * @internal
81
94
  */
82
- const queries = computed(() => props.queriesPreviewInfo.map(item => getHashFromQueryPreviewInfo(item)));
95
+ const queries = computed(() => props.queriesPreviewInfo.map(item => getHashFromQueryPreviewInfo(item, params.value.lang)));
83
96
  /**
84
97
  * Gets all the queries to render, that are those that don't have an `error` status.
85
98
  *
@@ -88,7 +101,7 @@ var _sfc_main = defineComponent({
88
101
  */
89
102
  const renderedQueryPreviews = computed(() => {
90
103
  return props.queriesPreviewInfo.filter(item => {
91
- const queryPreviewHash = getHashFromQueryPreviewInfo(item);
104
+ const queryPreviewHash = getHashFromQueryPreviewInfo(item, params.value.lang);
92
105
  return (queriesStatus.value[queryPreviewHash] === 'success' ||
93
106
  queriesStatus.value[queryPreviewHash] === 'loading');
94
107
  });
@@ -1 +1 @@
1
- {"version":3,"file":"query-preview-list.vue2.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-list.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" class=\"x-query-preview-list\" tag=\"ul\">\n <li\n v-for=\"(queryPreview, index) in renderedQueryPreviews\"\n :key=\"index\"\n data-test=\"query-preview-item\"\n >\n <QueryPreview\n @load=\"flagAsLoaded\"\n @error=\"flagAsFailed\"\n :debounceTimeMs=\"debounceTimeMs\"\n :maxItemsToRender=\"maxItemsToRender\"\n :persistInCache=\"persistInCache\"\n :queryFeature=\"queryFeature\"\n :queryPreviewInfo=\"queryPreview\"\n >\n <template v-for=\"(_, slotName) in $slots\" v-slot:[slotName]=\"scope\">\n <slot :name=\"slotName\" v-bind=\"scope\" />\n </template>\n </QueryPreview>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, watch } from 'vue';\n import { RequestStatus } from '../../../store';\n import { queriesPreviewXModule } from '../x-module';\n import { QueryPreviewInfo } from '../store/types';\n import { getHashFromQueryPreviewInfo } from '../utils/get-hash-from-query-preview';\n import { AnimationProp, QueryFeature } from '../../../types';\n import QueryPreview from './query-preview.vue';\n\n interface QueryPreviewStatusRecord {\n [query: string]: RequestStatus;\n }\n\n /**\n * Renders the results previews of a list of objects with the information about the query preview,\n * and exposes the {@link QueryPreview} slots to modify the content.\n * The requests are made in sequential order.\n *\n * @public\n */\n export default defineComponent({\n name: 'QueryPreviewList',\n xModule: queriesPreviewXModule.name,\n components: { QueryPreview },\n props: {\n /**\n * The list of queries preview to render.\n *\n * @public\n */\n queriesPreviewInfo: {\n type: Array as PropType<QueryPreviewInfo[]>,\n required: true\n },\n /**\n * The origin property for the request on each query preview.\n *\n * @public\n */\n queryFeature: {\n type: String as PropType<QueryFeature>\n },\n /**\n * Number of query preview results to be rendered on each query preview.\n *\n * @public\n */\n maxItemsToRender: {\n type: Number\n },\n /**\n * Debounce time in milliseconds for triggering the search requests\n * on each query preview.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n debounceTimeMs: {\n type: Number,\n default: 0\n },\n /**\n * Controls whether all the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n persistInCache: Boolean,\n /**\n * Animation component that will be used to animate the elements.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul'\n }\n },\n setup(props) {\n /**\n * Contains the status of the preview requests, indexed by query.\n */\n let queriesStatus = ref<QueryPreviewStatusRecord>({});\n\n /**\n * The list of queries to preview.\n *\n * @returns The list of queries in the queriesPreviewInfo list.\n * @internal\n */\n const queries = computed((): string[] =>\n props.queriesPreviewInfo.map(item => getHashFromQueryPreviewInfo(item))\n );\n\n /**\n * Gets all the queries to render, that are those that don't have an `error` status.\n *\n * @returns A list of queries.\n * @internal\n */\n const renderedQueryPreviews = computed((): QueryPreviewInfo[] => {\n return props.queriesPreviewInfo.filter(item => {\n const queryPreviewHash = getHashFromQueryPreviewInfo(item);\n return (\n queriesStatus.value[queryPreviewHash] === 'success' ||\n queriesStatus.value[queryPreviewHash] === 'loading'\n );\n });\n });\n\n /**\n * Tries to load the next query.\n *\n * @internal\n */\n const loadNext = (): void => {\n const queryToLoad = queries.value.find(query => !(query in queriesStatus.value));\n if (queryToLoad) {\n queriesStatus.value[queryToLoad] = 'loading';\n }\n };\n\n /**\n * Resets the status of all queries if they change.\n *\n * @param newQueries - The new queries.\n * @param oldQueries - The old queries.\n * @internal\n */\n watch(\n queries,\n (newQueries: string[], oldQueries: string[] | undefined) => {\n if (newQueries.toString() !== oldQueries?.toString()) {\n for (const key of Object.keys(queriesStatus.value)) {\n if (!newQueries.includes(key)) {\n delete queriesStatus.value[key];\n }\n }\n loadNext();\n }\n },\n { immediate: true, deep: true }\n );\n\n /**\n * Sets the status of a given query to `success`.\n *\n * @param loadedQuery - The query to flag as loaded.\n * @internal\n */\n const flagAsLoaded = (loadedQuery: string): void => {\n queriesStatus.value[loadedQuery] = 'success';\n loadNext();\n };\n\n /**\n * Sets the status of a given query to `error`.\n *\n * @param failedQuery - The query to flag as failed.\n * @internal\n */\n const flagAsFailed = (failedQuery: string): void => {\n queriesStatus.value[failedQuery] = 'error';\n loadNext();\n };\n\n return {\n renderedQueryPreviews,\n flagAsFailed,\n flagAsLoaded\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\nHere you have a basic example of how the QueryPreviewList is rendered. Keep in mind that this\ncomponent is intended to be used overriding its default slot. By default it will only render the\nnames of the results.\n\n```vue live\n<template>\n <QueryPreviewList :queriesPreviewInfo=\"queriesPreviewInfo\" />\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewListDemo',\n components: {\n QueryPreviewList\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <QueryPreviewList\n :queriesPreviewInfo=\"queriesPreviewInfo\"\n #default=\"{ queryPreviewInfo, totalResults, results }\"\n >\n <div class=\"x-flex x-flex-col x-gap-8 x-mb-16\">\n <h1 class=\"x-title2\">{{ queryPreviewInfo.query }} ({{ totalResults }})</h1>\n <SlidingPanel :resetOnContentChange=\"false\">\n <div class=\"x-flex x-gap-8\">\n <Result\n v-for=\"result in results\"\n :key=\"result.id\"\n :result=\"result\"\n style=\"max-width: 180px\"\n />\n </div>\n </SlidingPanel>\n </div>\n </QueryPreviewList>\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n import { BaseResultImage, BaseResultLink, SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'QueryPreviewListDemoOverridingSlot',\n components: {\n BaseResultImage,\n BaseResultLink,\n QueryPreviewList,\n SlidingPanel\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <QueryPreviewList\n class=\"x-flex x-gap-8\"\n :queriesPreviewInfo=\"queriesPreviewInfo\"\n #result=\"{ result }\"\n >\n <span class=\"x-font-bold\">{{ result.id }}:</span>\n <span>{{ result.name }}</span>\n </QueryPreviewList>\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewListDemoOverridingResultSlot',\n components: {\n QueryPreviewList\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;AAqCE;;;;;;AAME;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,qBAAqB,CAAC,IAAI;IACnC,UAAU,EAAE,EAAE,YAAW,EAAG;AAC5B,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,kBAAkB,EAAE;AAClB,YAAA,IAAI,EAAE,KAAqC;AAC3C,YAAA,QAAQ,EAAE,IAAG;AACd,SAAA;AACD;;;;AAIE;AACF,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,MAA+B;AACtC,SAAA;AACD;;;;AAIE;AACF,QAAA,gBAAgB,EAAE;AAChB,YAAA,IAAI,EAAE,MAAK;AACZ,SAAA;AACD;;;;;AAKE;AACF,QAAA,cAAc,EAAE;AACd,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,CAAA;AACV,SAAA;AACD;;;;;AAKE;AACF,QAAA,cAAc,EAAE,OAAO;AACvB;;;;AAIE;AACF,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,OAAO,EAAE,IAAG;AACd,SAAA;AACD,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT;;AAEE;AACF,QAAA,IAAI,gBAAgB,GAAG,CAA2B,EAAE,CAAC,CAAA;AAErD;;;;;AAKE;QACF,MAAM,OAAM,GAAI,QAAQ,CAAC,MACvB,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAK,IAAG,2BAA2B,CAAC,IAAI,CAAC,CAAA,CACvE,CAAA;AAED;;;;;AAKE;AACF,QAAA,MAAM,qBAAsB,GAAE,QAAQ,CAAC,MAA0B;YAC/D,OAAO,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAG,IAAK;AAC7C,gBAAA,MAAM,mBAAmB,2BAA2B,CAAC,IAAI,CAAC,CAAA;gBAC1D,QACE,aAAa,CAAC,KAAK,CAAC,gBAAgB,CAAE,KAAI,SAAQ;oBAClD,aAAa,CAAC,KAAK,CAAC,gBAAgB,MAAM,SAAQ,EACnD;AACH,aAAC,CAAC,CAAA;AACJ,SAAC,CAAC,CAAA;AAEF;;;;AAIE;QACF,MAAM,QAAS,GAAE,MAAY;YAC3B,MAAM,WAAY,GAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAM,IAAG,EAAE,KAAI,IAAK,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;AAChF,YAAA,IAAI,WAAW,EAAE;AACf,gBAAA,aAAa,CAAC,KAAK,CAAC,WAAW,CAAA,GAAI,SAAS,CAAA;AAC9C,aAAA;AACF,SAAC,CAAA;AAED;;;;;;AAME;QACF,KAAK,CACH,OAAO,EACP,CAAC,UAAoB,EAAE,UAAgC,KAAK;YAC1D,IAAI,UAAU,CAAC,QAAQ,EAAG,KAAI,UAAU,EAAE,QAAQ,EAAE,EAAE;gBACpD,KAAK,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE;AAClD,oBAAA,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC7B,wBAAA,OAAO,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AACjC,qBAAA;AACF,iBAAA;AACA,gBAAA,QAAQ,EAAE,CAAA;AACZ,aAAA;SACD,EACD,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAK,EAAA,CAC/B,CAAA;AAED;;;;;AAKE;AACF,QAAA,MAAM,eAAe,CAAC,WAAmB,KAAW;AAClD,YAAA,aAAa,CAAC,KAAK,CAAC,WAAW,CAAA,GAAI,SAAS,CAAA;AAC5C,YAAA,QAAQ,EAAE,CAAA;AACZ,SAAC,CAAA;AAED;;;;;AAKE;AACF,QAAA,MAAM,eAAe,CAAC,WAAmB,KAAW;AAClD,YAAA,aAAa,CAAC,KAAK,CAAC,WAAW,CAAA,GAAI,OAAO,CAAA;AAC1C,YAAA,QAAQ,EAAE,CAAA;AACZ,SAAC,CAAA;QAED,OAAO;YACL,qBAAqB;YACrB,YAAY;YACZ,YAAW;SACZ,CAAA;KACH;AACD,CAAA,CAAC;;;;"}
1
+ {"version":3,"file":"query-preview-list.vue2.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-list.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" class=\"x-query-preview-list\" tag=\"ul\">\n <li\n v-for=\"(queryPreview, index) in renderedQueryPreviews\"\n :key=\"index\"\n data-test=\"query-preview-item\"\n >\n <QueryPreview\n @load=\"flagAsLoaded\"\n @error=\"flagAsFailed\"\n :debounceTimeMs=\"debounceTimeMs\"\n :maxItemsToRender=\"maxItemsToRender\"\n :persistInCache=\"persistInCache\"\n :queryFeature=\"queryFeature\"\n :queryPreviewInfo=\"queryPreview\"\n >\n <template v-for=\"(_, slotName) in $slots\" v-slot:[slotName]=\"scope\">\n <slot :name=\"slotName\" v-bind=\"scope\" />\n </template>\n </QueryPreview>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, watch } from 'vue';\n import { RequestStatus } from '../../../store';\n import { queriesPreviewXModule } from '../x-module';\n import { QueryPreviewInfo } from '../store/types';\n import { getHashFromQueryPreviewInfo } from '../utils/get-hash-from-query-preview';\n import { AnimationProp, QueryFeature } from '../../../types';\n import { useState } from '../../../composables/index';\n import QueryPreview from './query-preview.vue';\n\n interface QueryPreviewStatusRecord {\n [query: string]: RequestStatus;\n }\n\n /**\n * Renders the results previews of a list of objects with the information about the query preview,\n * and exposes the {@link QueryPreview} slots to modify the content.\n * The requests are made in sequential order.\n *\n * @public\n */\n export default defineComponent({\n name: 'QueryPreviewList',\n xModule: queriesPreviewXModule.name,\n components: { QueryPreview },\n props: {\n /**\n * The list of queries preview to render.\n *\n * @public\n */\n queriesPreviewInfo: {\n type: Array as PropType<QueryPreviewInfo[]>,\n required: true\n },\n /**\n * The origin property for the request on each query preview.\n *\n * @public\n */\n queryFeature: {\n type: String as PropType<QueryFeature>\n },\n /**\n * Number of query preview results to be rendered on each query preview.\n *\n * @public\n */\n maxItemsToRender: {\n type: Number\n },\n /**\n * Debounce time in milliseconds for triggering the search requests\n * on each query preview.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n debounceTimeMs: {\n type: Number,\n default: 0\n },\n /**\n * Controls whether all the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n persistInCache: Boolean,\n /**\n * Animation component that will be used to animate the elements.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul'\n }\n },\n setup(props) {\n const { params } = useState('queriesPreview', ['params']);\n\n /**\n * Contains the status of the preview requests, indexed by query.\n */\n let queriesStatus = ref<QueryPreviewStatusRecord>({});\n\n /**\n * The list of queries to preview.\n *\n * @returns The list of queries in the queriesPreviewInfo list.\n * @internal\n */\n const queries = computed((): string[] =>\n props.queriesPreviewInfo.map(item =>\n getHashFromQueryPreviewInfo(item, params.value.lang as string)\n )\n );\n\n /**\n * Gets all the queries to render, that are those that don't have an `error` status.\n *\n * @returns A list of queries.\n * @internal\n */\n const renderedQueryPreviews = computed((): QueryPreviewInfo[] => {\n return props.queriesPreviewInfo.filter(item => {\n const queryPreviewHash = getHashFromQueryPreviewInfo(item, params.value.lang as string);\n return (\n queriesStatus.value[queryPreviewHash] === 'success' ||\n queriesStatus.value[queryPreviewHash] === 'loading'\n );\n });\n });\n\n /**\n * Tries to load the next query.\n *\n * @internal\n */\n const loadNext = (): void => {\n const queryToLoad = queries.value.find(query => !(query in queriesStatus.value));\n if (queryToLoad) {\n queriesStatus.value[queryToLoad] = 'loading';\n }\n };\n\n /**\n * Resets the status of all queries if they change.\n *\n * @param newQueries - The new queries.\n * @param oldQueries - The old queries.\n * @internal\n */\n watch(\n queries,\n (newQueries: string[], oldQueries: string[] | undefined) => {\n if (newQueries.toString() !== oldQueries?.toString()) {\n for (const key of Object.keys(queriesStatus.value)) {\n if (!newQueries.includes(key)) {\n delete queriesStatus.value[key];\n }\n }\n loadNext();\n }\n },\n { immediate: true, deep: true }\n );\n\n /**\n * Sets the status of a given query to `success`.\n *\n * @param loadedQuery - The query to flag as loaded.\n * @internal\n */\n const flagAsLoaded = (loadedQuery: string): void => {\n queriesStatus.value[loadedQuery] = 'success';\n loadNext();\n };\n\n /**\n * Sets the status of a given query to `error`.\n *\n * @param failedQuery - The query to flag as failed.\n * @internal\n */\n const flagAsFailed = (failedQuery: string): void => {\n queriesStatus.value[failedQuery] = 'error';\n loadNext();\n };\n\n return {\n renderedQueryPreviews,\n flagAsFailed,\n flagAsLoaded\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\nHere you have a basic example of how the QueryPreviewList is rendered. Keep in mind that this\ncomponent is intended to be used overriding its default slot. By default it will only render the\nnames of the results.\n\n```vue live\n<template>\n <QueryPreviewList :queriesPreviewInfo=\"queriesPreviewInfo\" />\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewListDemo',\n components: {\n QueryPreviewList\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <QueryPreviewList\n :queriesPreviewInfo=\"queriesPreviewInfo\"\n #default=\"{ queryPreviewInfo, totalResults, results }\"\n >\n <div class=\"x-flex x-flex-col x-gap-8 x-mb-16\">\n <h1 class=\"x-title2\">{{ queryPreviewInfo.query }} ({{ totalResults }})</h1>\n <SlidingPanel :resetOnContentChange=\"false\">\n <div class=\"x-flex x-gap-8\">\n <Result\n v-for=\"result in results\"\n :key=\"result.id\"\n :result=\"result\"\n style=\"max-width: 180px\"\n />\n </div>\n </SlidingPanel>\n </div>\n </QueryPreviewList>\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n import { BaseResultImage, BaseResultLink, SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'QueryPreviewListDemoOverridingSlot',\n components: {\n BaseResultImage,\n BaseResultLink,\n QueryPreviewList,\n SlidingPanel\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <QueryPreviewList\n class=\"x-flex x-gap-8\"\n :queriesPreviewInfo=\"queriesPreviewInfo\"\n #result=\"{ result }\"\n >\n <span class=\"x-font-bold\">{{ result.id }}:</span>\n <span>{{ result.name }}</span>\n </QueryPreviewList>\n</template>\n\n<script>\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewListDemoOverridingResultSlot',\n components: {\n QueryPreviewList\n },\n data() {\n return {\n queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAsCE;;;;;;AAME;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,qBAAqB,CAAC,IAAI;IACnC,UAAU,EAAE,EAAE,YAAW,EAAG;AAC5B,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,kBAAkB,EAAE;AAClB,YAAA,IAAI,EAAE,KAAqC;AAC3C,YAAA,QAAQ,EAAE,IAAG;AACd,SAAA;AACD;;;;AAIE;AACF,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,MAA+B;AACtC,SAAA;AACD;;;;AAIE;AACF,QAAA,gBAAgB,EAAE;AAChB,YAAA,IAAI,EAAE,MAAK;AACZ,SAAA;AACD;;;;;AAKE;AACF,QAAA,cAAc,EAAE;AACd,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,CAAA;AACV,SAAA;AACD;;;;;AAKE;AACF,QAAA,cAAc,EAAE,OAAO;AACvB;;;;AAIE;AACF,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,OAAO,EAAE,IAAG;AACd,SAAA;AACD,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,EAAE,MAAK,KAAM,QAAQ,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEzD;;AAEE;AACF,QAAA,IAAI,gBAAgB,GAAG,CAA2B,EAAE,CAAC,CAAA;AAErD;;;;;AAKE;AACF,QAAA,MAAM,OAAM,GAAI,QAAQ,CAAC,MACvB,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,QAC3B,2BAA2B,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAc,CAAA,CAC/D,CACD,CAAA;AAED;;;;;AAKE;AACF,QAAA,MAAM,qBAAsB,GAAE,QAAQ,CAAC,MAA0B;YAC/D,OAAO,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAG,IAAK;AAC7C,gBAAA,MAAM,gBAAe,GAAI,2BAA2B,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAc,CAAC,CAAA;gBACvF,QACE,aAAa,CAAC,KAAK,CAAC,gBAAgB,CAAE,KAAI,SAAQ;oBAClD,aAAa,CAAC,KAAK,CAAC,gBAAgB,MAAM,SAAQ,EACnD;AACH,aAAC,CAAC,CAAA;AACJ,SAAC,CAAC,CAAA;AAEF;;;;AAIE;QACF,MAAM,QAAS,GAAE,MAAY;YAC3B,MAAM,WAAY,GAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAM,IAAG,EAAE,KAAI,IAAK,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;AAChF,YAAA,IAAI,WAAW,EAAE;AACf,gBAAA,aAAa,CAAC,KAAK,CAAC,WAAW,CAAA,GAAI,SAAS,CAAA;AAC9C,aAAA;AACF,SAAC,CAAA;AAED;;;;;;AAME;QACF,KAAK,CACH,OAAO,EACP,CAAC,UAAoB,EAAE,UAAgC,KAAK;YAC1D,IAAI,UAAU,CAAC,QAAQ,EAAG,KAAI,UAAU,EAAE,QAAQ,EAAE,EAAE;gBACpD,KAAK,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE;AAClD,oBAAA,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC7B,wBAAA,OAAO,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AACjC,qBAAA;AACF,iBAAA;AACA,gBAAA,QAAQ,EAAE,CAAA;AACZ,aAAA;SACD,EACD,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAK,EAAA,CAC/B,CAAA;AAED;;;;;AAKE;AACF,QAAA,MAAM,eAAe,CAAC,WAAmB,KAAW;AAClD,YAAA,aAAa,CAAC,KAAK,CAAC,WAAW,CAAA,GAAI,SAAS,CAAA;AAC5C,YAAA,QAAQ,EAAE,CAAA;AACZ,SAAC,CAAA;AAED;;;;;AAKE;AACF,QAAA,MAAM,eAAe,CAAC,WAAmB,KAAW;AAClD,YAAA,aAAa,CAAC,KAAK,CAAC,WAAW,CAAA,GAAI,OAAO,CAAA;AAC1C,YAAA,QAAQ,EAAE,CAAA;AACZ,SAAC,CAAA;QAED,OAAO;YACL,qBAAqB;YACrB,YAAY;YACZ,YAAW;SACZ,CAAA;KACH;AACD,CAAA,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './query-preview.vue2.js';
2
- import { openBlock, createElementBlock, Fragment, renderList, createCommentVNode, renderSlot, createElementVNode, toDisplayString } from 'vue';
2
+ import { openBlock, createElementBlock, Fragment, renderList, renderSlot, createElementVNode, toDisplayString, createCommentVNode } from 'vue';
3
3
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
4
4
 
5
5
  const _hoisted_1 = {
@@ -19,7 +19,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
19
19
  class: "x-query-preview__item",
20
20
  "data-test": "query-preview-item"
21
21
  }, [
22
- createCommentVNode("\n @slot Query Preview result slot.\n @binding {Result} result - A Query Preview result\n "),
23
22
  renderSlot(_ctx.$slots, "result", { result }, () => [
24
23
  createElementVNode(
25
24
  "span",
@@ -1 +1 @@
1
- {"version":3,"file":"query-preview.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue"],"sourcesContent":["<template>\n <ul v-if=\"hasResults\" data-test=\"query-preview\" class=\"x-query-preview\">\n <li\n v-for=\"result in queryPreviewResults?.results\"\n :key=\"result.id\"\n class=\"x-query-preview__item\"\n data-test=\"query-preview-item\"\n >\n <!--\n @slot Query Preview result slot.\n @binding {Result} result - A Query Preview result\n -->\n <slot name=\"result\" :result=\"result\">\n <span data-test=\"result-name\">{{ result.name }}</span>\n </slot>\n </li>\n </ul>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n ComputedRef,\n defineComponent,\n inject,\n onBeforeUnmount,\n PropType,\n provide,\n Ref,\n watch\n } from 'vue';\n import { SearchRequest, Filter } from '@empathyco/x-types';\n import { deepEqual, Dictionary } from '@empathyco/x-utils';\n import { LIST_ITEMS_KEY } from '../../../components';\n import { QueryFeature, FeatureLocation } from '../../../types';\n import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';\n import { QueriesPreviewConfig } from '../config.types';\n import { queriesPreviewXModule } from '../x-module';\n import {\n DebouncedFunction,\n debounceFunction,\n createOrigin,\n createRawFilters\n } from '../../../utils';\n import { getHashFromQueryPreviewInfo } from '../utils/get-hash-from-query-preview';\n import { useXBus, useState } from '../../../composables';\n\n /**\n * Retrieves a preview of the results of a query and exposes them in the default slot,\n * along with the query preview and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\n export default defineComponent({\n name: 'QueryPreview',\n xModule: queriesPreviewXModule.name,\n props: {\n /** The information about the request of the query preview. */\n queryPreviewInfo: {\n type: Object as PropType<QueryPreviewInfo>,\n required: true\n },\n /** The origin property for the request. */\n queryFeature: {\n type: String as PropType<QueryFeature>\n },\n /** Number of query preview results to be rendered. */\n maxItemsToRender: {\n type: Number\n },\n /**\n * Debounce time in milliseconds for triggering the search requests.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n debounceTimeMs: {\n type: Number,\n default: 0\n },\n /**\n * Controls whether the QueryPreview should be removed from the state\n * when the component is destroyed.\n */\n persistInCache: {\n type: Boolean,\n default: false\n }\n },\n emits: ['load', 'error'],\n setup(props, { emit, slots }) {\n const xBus = useXBus();\n\n const queriesPreviewState = useState('queriesPreview', [\n 'queriesPreview',\n 'params',\n 'config'\n ]);\n\n /**\n * The results preview of the queries preview cacheable mounted.\n * It is a dictionary, indexed by the query preview query.\n */\n const previewResults: ComputedRef<Dictionary<QueryPreviewItem>> =\n queriesPreviewState.queriesPreview;\n\n /**\n * As the request is handled in this component, we need\n * the extra params that will be used in the request.\n */\n const params: ComputedRef<Dictionary<unknown>> = queriesPreviewState.params;\n\n /**\n * As the request is handled in this component, we need\n * the config that will be used in the request.\n */\n const config: ComputedRef<QueriesPreviewConfig> = queriesPreviewState.config;\n\n /**\n * Query Preview key converted into a unique id.\n *\n * @returns The query hash.\n */\n const queryPreviewHash = computed(() => getHashFromQueryPreviewInfo(props.queryPreviewInfo));\n\n provide('queryPreviewHash', queryPreviewHash);\n\n /**\n * Gets from the state the results preview of the query preview.\n *\n * @returns The results preview of the actual query preview.\n */\n const queryPreviewResults = computed(() => {\n const resultsPreview = previewResults.value[queryPreviewHash.value];\n return resultsPreview?.results\n ? {\n ...resultsPreview,\n results: resultsPreview.results.slice(0, props.maxItemsToRender)\n }\n : undefined;\n });\n\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n *\n * @returns A list of results.\n */\n const results = computed(() => queryPreviewResults.value?.results);\n provide(LIST_ITEMS_KEY as string, results);\n\n /**\n * It injects the provided {@link FeatureLocation} of the selected query in the search request.\n *\n * @internal\n */\n const injectedLocation = inject<Ref<FeatureLocation> | FeatureLocation>('location', 'none');\n const location =\n typeof injectedLocation === 'object' && 'value' in injectedLocation\n ? injectedLocation.value\n : injectedLocation;\n\n /**\n * The computed request object to be used to retrieve the query preview results.\n *\n * @returns The search request object.\n */\n const queryPreviewRequest = computed<SearchRequest>(() => {\n const origin = createOrigin({\n feature: props.queryFeature,\n location: location\n });\n const filters = props.queryPreviewInfo.filters?.reduce((filtersList, filterId) => {\n const facetId = filterId.split(':')[0];\n const rawFilter = createRawFilters([filterId])[0];\n filtersList[facetId] = filtersList[facetId]\n ? filtersList[facetId].concat(rawFilter)\n : [rawFilter];\n\n return filtersList;\n }, {} as Record<string, Filter[]>);\n\n return {\n query: props.queryPreviewInfo.query,\n rows: config.value.maxItemsToRequest,\n extraParams: {\n ...params.value,\n ...props.queryPreviewInfo.extraParams\n },\n filters: filters,\n ...(origin && { origin })\n };\n });\n\n /**\n * The debounce method to trigger the request after the debounceTimeMs defined\n * for cacheable queries.\n *\n * @returns The search request object.\n */\n const emitQueryPreviewRequestUpdated = computed<DebouncedFunction<[SearchRequest]>>(() =>\n debounceFunction(request => {\n xBus.emit('QueryPreviewRequestUpdated', request, { priority: 0, replaceable: false });\n }, props.debounceTimeMs)\n );\n\n /**\n * Initialises watcher to emit debounced requests, and first value for the requests.\n *\n * @internal\n */\n watch(queryPreviewRequest, (newRequest, oldRequest) => {\n if (!deepEqual(newRequest, oldRequest)) {\n emitQueryPreviewRequestUpdated.value(newRequest);\n }\n });\n\n const cachedQueryPreview = previewResults.value[queryPreviewHash.value];\n\n // If the query has been saved it will emit load instead of the emitting the updated request.\n if (cachedQueryPreview?.status === 'success') {\n emit('load', queryPreviewHash.value);\n xBus.emit('QueryPreviewMounted', queryPreviewHash.value, {\n priority: 0,\n replaceable: false\n });\n } else {\n emitQueryPreviewRequestUpdated.value(queryPreviewRequest.value);\n }\n\n /**\n * Cancels the (remaining) requests when the component is destroyed\n * via the `debounce.cancel()` method.\n * If the prop 'persistInCache' is set to false, it also removes the QueryPreview\n * from the state when the component is destroyed.\n */\n onBeforeUnmount(() => {\n emitQueryPreviewRequestUpdated.value.cancel();\n xBus.emit(\n 'QueryPreviewUnmounted',\n { queryPreviewHash: queryPreviewHash.value, cache: props.persistInCache },\n {\n priority: 0,\n replaceable: false\n }\n );\n });\n\n /**\n * Cancels the previous request when the debounced function changes (e.g: the debounceTimeMs\n * prop changes or there is a request in progress that cancels it).\n *\n * @param _new - The new debounced function.\n * @param old - The previous debounced function.\n * @internal\n */\n watch(\n emitQueryPreviewRequestUpdated,\n (_new: DebouncedFunction<[SearchRequest]>, old: DebouncedFunction<[SearchRequest]>) => {\n old.cancel();\n }\n );\n\n const queryPreviewResultsStatus = computed(() => queryPreviewResults.value?.status);\n\n /**\n * Emits an event when the query results are loaded or fail to load.\n *\n * @param status - The status of the query preview request.\n */\n watch(queryPreviewResultsStatus, () => {\n if (queryPreviewResultsStatus.value === 'success') {\n emit(results.value?.length ? 'load' : 'error', queryPreviewHash.value);\n } else if (queryPreviewResultsStatus.value === 'error') {\n emit('error', queryPreviewHash.value);\n }\n });\n\n const hasResults = computed(() => (queryPreviewResults.value?.totalResults ?? 0) > 0);\n\n /**\n * Render function to execute the `default` slot, binding `slotsProps` and getting only the\n * first `vNode` to avoid Fragments and Text root nodes.\n * If there are no results, 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 `default` slot or empty string if there are no results.\n */\n function renderDefaultSlot() {\n const slotProps = {\n queryPreviewInfo: props.queryPreviewInfo,\n results: queryPreviewResults.value?.results,\n totalResults: queryPreviewResults.value?.totalResults,\n displayTagging: queryPreviewResults.value?.displayTagging,\n queryTagging: queryPreviewResults.value?.queryTagging\n };\n\n return hasResults.value ? slots.default?.(slotProps)[0] : '';\n }\n\n /* Hack to render through a render-function, the `default` slot or, in its absence,\n the component itself. It is the alternative for the NoElement antipattern. */\n const componentProps = { hasResults, queryPreviewResults };\n return (slots.default ? renderDefaultSlot : componentProps) as typeof componentProps;\n }\n });\n</script>\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`QueryPreviewRequestUpdated`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted when the component is mounted and when the properties of the request object\n changes. The event payload is the `queryPreviewRequest` object.\n\n## Vue Events\n\nA list of vue events that the component will emit:\n\n- `load`: the event is emitted when the query results have been loaded.\n- `error`: the event is emitted if there is some error when retrieving the query results.\n\n## See it in action\n\nHere you have a basic example of how the QueryPreview is rendered. Keep in mind that this component\nis intended to be used overriding its default slot. By default it will only render the names of the\nresults.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" />\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'sandals' }\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #default=\"{ totalResults, results }\">\n <section>\n <p>Total results: {{ totalResults }}</p>\n <SlidingPanel :resetOnContentChange=\"false\">\n <article\n v-for=\"result in results\"\n :key=\"result.id\"\n class=\"x-result\"\n style=\"max-width: 300px; overflow: hidden\"\n >\n <BaseResultLink :result=\"result\">\n <BaseResultImage :result=\"result\" class=\"x-result__picture\" />\n </BaseResultLink>\n <div class=\"x-result__description\">\n <BaseResultLink :result=\"result\">\n <h1 class=\"x-title3\">{{ result.name }}</h1>\n </BaseResultLink>\n </div>\n </article>\n </SlidingPanel>\n </section>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n import { BaseResultImage, BaseResultLink, SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'QueryPreviewDemoOverridingSlot',\n components: {\n BaseResultImage,\n BaseResultLink,\n QueryPreview,\n SlidingPanel\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #result=\"{ result }\">\n <span>{{ result.id }}</span>\n <span>{{ result.name }}</span>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemoOverridingResultSlot',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the query preview has been limited to render a maximum of 4 results.\n\n```vue\n<template>\n <QueryPreview\n :maxItemsToRender=\"maxItemsToRender\"\n :queryPreviewInfo=\"queryPreviewInfo\"\n #default=\"{ results }\"\n >\n <BaseGrid #default=\"{ item }\" :items=\"results\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n </BaseResultLink>\n </BaseGrid>\n </QueryPreview>\n</template>\n\n<script>\n import { BaseGrid, BaseResultImage, BaseResultLink } from '@empathyco/x-components';\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n BaseGrid,\n BaseResultImage,\n BaseResultLink,\n QueryPreview\n },\n data() {\n return {\n maxItemsToRender: 4,\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_Fragment","_renderList","_createCommentVNode","_renderSlot"],"mappings":";;;;MACwB,UAAU,GAAA;AAAA,EAAgB,GAAK,EAAA,CAAA;AAAA,EAAA,WAAA,EAAA,eAAA;;;;AAArD,SAAA,WAAA,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAeK,QAfL,KAeK,EAAA,QAAA,EAAA;4DAdH,IAaK,EAAA,UAAA,EAAA;AAAA,KAAAA,SAAA,CAXG,IAAO,CAAE,EAAAC,kBAAA;AAAA,MAAAC,QAAA;AAAA,MAAA,IAAA;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,mBAAA,EAAA,OAAA,EAAA,CAAA,MAAA,KAAA;AACV,QAAA,OAAAH,SAAA,EAAwB,EAAAC,kBAAA,CAAA,IAAA,EAAA;AAAA,UAC7B,GAAS,EAAA,MAAA,CAAA,EAAA;AAAA,UAAA,KAAA,EAAA,uBAAA;AAET,UAAA,WAAA,EAAA,oBAAA;AAAA,SAIA,EAAA;AAAA,UAAAG,kBAAA,CACE,+GAA4C,CAAA;AAAA,UAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,QAAA,EAAA,EAAA,MAAA,EAAA,EAAA,MAAA;;;;;;;;;;AAbpD,OAAA,CAAA;AAAA,MAAA,GAAA;AAAA;AAAA,KAAA;AAAA,GAAA,CAAA,IAAAD,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"query-preview.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue"],"sourcesContent":["<template>\n <ul v-if=\"hasResults\" data-test=\"query-preview\" class=\"x-query-preview\">\n <li\n v-for=\"result in queryPreviewResults?.results\"\n :key=\"result.id\"\n class=\"x-query-preview__item\"\n data-test=\"query-preview-item\"\n >\n <!--\n @slot Query Preview result slot.\n @binding {Result} result - A Query Preview result\n -->\n <slot name=\"result\" :result=\"result\">\n <span data-test=\"result-name\">{{ result.name }}</span>\n </slot>\n </li>\n </ul>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n ComputedRef,\n defineComponent,\n inject,\n onBeforeUnmount,\n PropType,\n provide,\n Ref,\n watch\n } from 'vue';\n import { SearchRequest, Filter } from '@empathyco/x-types';\n import { deepEqual, Dictionary } from '@empathyco/x-utils';\n import { LIST_ITEMS_KEY } from '../../../components';\n import { QueryFeature, FeatureLocation } from '../../../types';\n import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';\n import { QueriesPreviewConfig } from '../config.types';\n import { queriesPreviewXModule } from '../x-module';\n import {\n DebouncedFunction,\n debounceFunction,\n createOrigin,\n createRawFilters\n } from '../../../utils';\n import { getHashFromQueryPreviewInfo } from '../utils/get-hash-from-query-preview';\n import { useXBus, useState } from '../../../composables';\n\n /**\n * Retrieves a preview of the results of a query and exposes them in the default slot,\n * along with the query preview and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\n export default defineComponent({\n name: 'QueryPreview',\n xModule: queriesPreviewXModule.name,\n props: {\n /** The information about the request of the query preview. */\n queryPreviewInfo: {\n type: Object as PropType<QueryPreviewInfo>,\n required: true\n },\n /** The origin property for the request. */\n queryFeature: {\n type: String as PropType<QueryFeature>\n },\n /** Number of query preview results to be rendered. */\n maxItemsToRender: {\n type: Number\n },\n /**\n * Debounce time in milliseconds for triggering the search requests.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n debounceTimeMs: {\n type: Number,\n default: 0\n },\n /**\n * Controls whether the QueryPreview should be removed from the state\n * when the component is destroyed.\n */\n persistInCache: {\n type: Boolean,\n default: false\n }\n },\n emits: ['load', 'error'],\n setup(props, { emit, slots }) {\n const xBus = useXBus();\n\n const queriesPreviewState = useState('queriesPreview', [\n 'queriesPreview',\n 'params',\n 'config'\n ]);\n\n /**\n * The results preview of the queries preview cacheable mounted.\n * It is a dictionary, indexed by the query preview query.\n */\n const previewResults: ComputedRef<Dictionary<QueryPreviewItem>> =\n queriesPreviewState.queriesPreview;\n\n /**\n * As the request is handled in this component, we need\n * the extra params that will be used in the request.\n */\n const params: ComputedRef<Dictionary<unknown>> = queriesPreviewState.params;\n\n /**\n * As the request is handled in this component, we need\n * the config that will be used in the request.\n */\n const config: ComputedRef<QueriesPreviewConfig> = queriesPreviewState.config;\n\n /**\n * Query Preview key converted into a unique id.\n *\n * @returns The query hash.\n */\n const queryPreviewHash = computed(() =>\n getHashFromQueryPreviewInfo(props.queryPreviewInfo, params.value.lang as string)\n );\n\n provide('queryPreviewHash', queryPreviewHash);\n\n /**\n * Gets from the state the results preview of the query preview.\n *\n * @returns The results preview of the actual query preview.\n */\n const queryPreviewResults = computed(() => {\n const resultsPreview = previewResults.value[queryPreviewHash.value];\n return resultsPreview?.results\n ? {\n ...resultsPreview,\n results: resultsPreview.results.slice(0, props.maxItemsToRender)\n }\n : undefined;\n });\n\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n *\n * @returns A list of results.\n */\n const results = computed(() => queryPreviewResults.value?.results);\n provide(LIST_ITEMS_KEY as string, results);\n\n /**\n * It injects the provided {@link FeatureLocation} of the selected query in the search request.\n *\n * @internal\n */\n const injectedLocation = inject<Ref<FeatureLocation> | FeatureLocation>('location', 'none');\n const location =\n typeof injectedLocation === 'object' && 'value' in injectedLocation\n ? injectedLocation.value\n : injectedLocation;\n\n /**\n * The computed request object to be used to retrieve the query preview results.\n *\n * @returns The search request object.\n */\n const queryPreviewRequest = computed<SearchRequest>(() => {\n const origin = createOrigin({\n feature: props.queryFeature,\n location: location\n });\n const filters = props.queryPreviewInfo.filters?.reduce((filtersList, filterId) => {\n const facetId = filterId.split(':')[0];\n const rawFilter = createRawFilters([filterId])[0];\n filtersList[facetId] = filtersList[facetId]\n ? filtersList[facetId].concat(rawFilter)\n : [rawFilter];\n\n return filtersList;\n }, {} as Record<string, Filter[]>);\n\n return {\n query: props.queryPreviewInfo.query,\n rows: config.value.maxItemsToRequest,\n extraParams: {\n ...params.value,\n ...props.queryPreviewInfo.extraParams\n },\n filters: filters,\n ...(origin && { origin })\n };\n });\n\n /**\n * The debounce method to trigger the request after the debounceTimeMs defined\n * for cacheable queries.\n *\n * @returns The search request object.\n */\n const emitQueryPreviewRequestUpdated = computed<DebouncedFunction<[SearchRequest]>>(() =>\n debounceFunction(request => {\n xBus.emit('QueryPreviewRequestUpdated', request, { priority: 0, replaceable: false });\n }, props.debounceTimeMs)\n );\n\n /**\n * Initialises watcher to emit debounced requests, and first value for the requests.\n *\n * @internal\n */\n watch(queryPreviewRequest, (newRequest, oldRequest) => {\n if (!deepEqual(newRequest, oldRequest)) {\n emitQueryPreviewRequestUpdated.value(newRequest);\n }\n });\n\n const cachedQueryPreview = previewResults.value[queryPreviewHash.value];\n\n // If the query has been saved it will emit load instead of the emitting the updated request.\n if (cachedQueryPreview?.status === 'success') {\n emit('load', queryPreviewHash.value);\n xBus.emit('QueryPreviewMounted', queryPreviewHash.value, {\n priority: 0,\n replaceable: false\n });\n } else {\n emitQueryPreviewRequestUpdated.value(queryPreviewRequest.value);\n }\n\n /**\n * Cancels the (remaining) requests when the component is destroyed\n * via the `debounce.cancel()` method.\n * If the prop 'persistInCache' is set to false, it also removes the QueryPreview\n * from the state when the component is destroyed.\n */\n onBeforeUnmount(() => {\n emitQueryPreviewRequestUpdated.value.cancel();\n xBus.emit(\n 'QueryPreviewUnmounted',\n { queryPreviewHash: queryPreviewHash.value, cache: props.persistInCache },\n {\n priority: 0,\n replaceable: false\n }\n );\n });\n\n /**\n * Cancels the previous request when the debounced function changes (e.g: the debounceTimeMs\n * prop changes or there is a request in progress that cancels it).\n *\n * @param _new - The new debounced function.\n * @param old - The previous debounced function.\n * @internal\n */\n watch(\n emitQueryPreviewRequestUpdated,\n (_new: DebouncedFunction<[SearchRequest]>, old: DebouncedFunction<[SearchRequest]>) => {\n old.cancel();\n }\n );\n\n const queryPreviewResultsStatus = computed(() => queryPreviewResults.value?.status);\n\n /**\n * Emits an event when the query results are loaded or fail to load.\n *\n * @param status - The status of the query preview request.\n */\n watch(queryPreviewResultsStatus, () => {\n if (queryPreviewResultsStatus.value === 'success') {\n emit(results.value?.length ? 'load' : 'error', queryPreviewHash.value);\n } else if (queryPreviewResultsStatus.value === 'error') {\n emit('error', queryPreviewHash.value);\n }\n });\n\n const hasResults = computed(() => (queryPreviewResults.value?.totalResults ?? 0) > 0);\n\n /**\n * Render function to execute the `default` slot, binding `slotsProps` and getting only the\n * first `vNode` to avoid Fragments and Text root nodes.\n * If there are no results, 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 `default` slot or empty string if there are no results.\n */\n function renderDefaultSlot() {\n const slotProps = {\n queryPreviewInfo: props.queryPreviewInfo,\n results: queryPreviewResults.value?.results,\n totalResults: queryPreviewResults.value?.totalResults,\n displayTagging: queryPreviewResults.value?.displayTagging,\n queryTagging: queryPreviewResults.value?.queryTagging\n };\n\n return hasResults.value ? slots.default?.(slotProps)[0] : '';\n }\n\n /* Hack to render through a render-function, the `default` slot or, in its absence,\n the component itself. It is the alternative for the NoElement antipattern. */\n const componentProps = { hasResults, queryPreviewResults };\n return (slots.default ? renderDefaultSlot : componentProps) as typeof componentProps;\n }\n });\n</script>\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`QueryPreviewRequestUpdated`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted when the component is mounted and when the properties of the request object\n changes. The event payload is the `queryPreviewRequest` object.\n\n## Vue Events\n\nA list of vue events that the component will emit:\n\n- `load`: the event is emitted when the query results have been loaded.\n- `error`: the event is emitted if there is some error when retrieving the query results.\n\n## See it in action\n\nHere you have a basic example of how the QueryPreview is rendered. Keep in mind that this component\nis intended to be used overriding its default slot. By default it will only render the names of the\nresults.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" />\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'sandals' }\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #default=\"{ totalResults, results }\">\n <section>\n <p>Total results: {{ totalResults }}</p>\n <SlidingPanel :resetOnContentChange=\"false\">\n <article\n v-for=\"result in results\"\n :key=\"result.id\"\n class=\"x-result\"\n style=\"max-width: 300px; overflow: hidden\"\n >\n <BaseResultLink :result=\"result\">\n <BaseResultImage :result=\"result\" class=\"x-result__picture\" />\n </BaseResultLink>\n <div class=\"x-result__description\">\n <BaseResultLink :result=\"result\">\n <h1 class=\"x-title3\">{{ result.name }}</h1>\n </BaseResultLink>\n </div>\n </article>\n </SlidingPanel>\n </section>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n import { BaseResultImage, BaseResultLink, SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'QueryPreviewDemoOverridingSlot',\n components: {\n BaseResultImage,\n BaseResultLink,\n QueryPreview,\n SlidingPanel\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #result=\"{ result }\">\n <span>{{ result.id }}</span>\n <span>{{ result.name }}</span>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemoOverridingResultSlot',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the query preview has been limited to render a maximum of 4 results.\n\n```vue\n<template>\n <QueryPreview\n :maxItemsToRender=\"maxItemsToRender\"\n :queryPreviewInfo=\"queryPreviewInfo\"\n #default=\"{ results }\"\n >\n <BaseGrid #default=\"{ item }\" :items=\"results\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n </BaseResultLink>\n </BaseGrid>\n </QueryPreview>\n</template>\n\n<script>\n import { BaseGrid, BaseResultImage, BaseResultLink } from '@empathyco/x-components';\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n BaseGrid,\n BaseResultImage,\n BaseResultLink,\n QueryPreview\n },\n data() {\n return {\n maxItemsToRender: 4,\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_Fragment","_renderList","_createCommentVNode"],"mappings":";;;;MACwB,UAAU,GAAA;AAAA,EAAgB,GAAK,EAAA,CAAA;AAAA,EAAA,WAAA,EAAA,eAAA;;;;AAArD,SAAA,WAAA,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAeK,QAfL,KAeK,EAAA,QAAA,EAAA;4DAdH,IAaK,EAAA,UAAA,EAAA;AAAA,KAAAA,SAAA,CAXG,IAAO,CAAE,EAAAC,kBAAA;AAAA,MAAAC,QAAA;AAAA,MAAA,IAAA;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,mBAAA,EAAA,OAAA,EAAA,CAAA,MAAA,KAAA;AACV,QAAA,OAAAH,SAAA,EAAwB,EAAAC,kBAAA,CAAA,IAAA,EAAA;AAAA,UAC7B,GAAS,EAAA,MAAA,CAAA,EAAA;AAAA,UAAA,KAAA,EAAA,uBAAA;UAMT,WAEO,EAAA,oBAAA;AAAA,SAAA,EAAA;;;;;;;;;;;AAdb,OAAA,CAAA;AAAA,MAAA,GAAA;AAAA;AAAA,KAAA;AAAA,GAAA,CAAA,IAAAG,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
@@ -84,6 +84,8 @@ import '../../../components/base-grid.vue3.js';
84
84
  import '../../../components/base-keyboard-navigation.vue2.js';
85
85
  import '../../../components/base-rating.vue2.js';
86
86
  import '../../../components/base-rating.vue3.js';
87
+ import '../../../components/base-slider.vue2.js';
88
+ import '../../../components/base-slider.vue3.js';
87
89
  import '../../../components/base-switch.vue2.js';
88
90
  import '../../../components/base-switch.vue3.js';
89
91
  import '../../../components/base-variable-column-grid.vue2.js';
@@ -96,6 +98,10 @@ import '../../../components/sliding-panel.vue2.js';
96
98
  import '../../../components/sliding-panel.vue3.js';
97
99
  import '../../../components/snippet-callbacks.vue2.js';
98
100
  import '../../../components/page-loader-button.vue2.js';
101
+ import '../../../components/page-loader-button.vue3.js';
102
+ import '../../../components/page-selector.vue2.js';
103
+ import '../../../components/page-selector.vue3.js';
104
+ import '../../../components/display-click-provider.vue.js';
99
105
  import { queriesPreviewXModule } from '../x-module.js';
100
106
  import { debounce } from '../../../utils/debounce.js';
101
107
  import { createRawFilters } from '../../../utils/filters.js';
@@ -176,7 +182,7 @@ var _sfc_main = defineComponent({
176
182
  *
177
183
  * @returns The query hash.
178
184
  */
179
- const queryPreviewHash = computed(() => getHashFromQueryPreviewInfo(props.queryPreviewInfo));
185
+ const queryPreviewHash = computed(() => getHashFromQueryPreviewInfo(props.queryPreviewInfo, params.value.lang));
180
186
  provide('queryPreviewHash', queryPreviewHash);
181
187
  /**
182
188
  * Gets from the state the results preview of the query preview.