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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (833) hide show
  1. package/CHANGELOG.md +531 -0
  2. package/core/index.js +9 -1
  3. package/core/index.js.map +1 -1
  4. package/design-system/deprecated-full-theme.css +2371 -2371
  5. package/docs/API-reference/api/x-adapter-platform.md +12 -0
  6. package/docs/API-reference/api/x-adapter-platform.nextqueriesrelatedpromptsschema.md +11 -0
  7. package/docs/API-reference/api/x-adapter-platform.platformadapter.relatedprompts.md +1 -1
  8. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.md +23 -0
  9. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.nextqueries.md +11 -0
  10. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.suggestiontext.md +11 -0
  11. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.tagging.md +11 -0
  12. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.type.md +11 -0
  13. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.md +22 -0
  14. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplay.md +11 -0
  15. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplayadd2cart.md +11 -0
  16. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplayclick.md +11 -0
  17. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsrequest.md +15 -0
  18. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsresponse.data.md +13 -0
  19. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsresponse.md +21 -0
  20. package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsresponse.status.md +11 -0
  21. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.md +22 -0
  22. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.nextqueries.md +11 -0
  23. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.toolingdisplay.md +11 -0
  24. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.toolingdisplayclick.md +11 -0
  25. package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.catalog.md +6 -0
  26. package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.md +1 -1
  27. package/docs/API-reference/api/x-adapter-platform.relatedpromptschema.md +13 -0
  28. package/docs/API-reference/api/x-adapter-platform.relatedpromptsendpointadapter.md +13 -0
  29. package/docs/API-reference/api/x-adapter-platform.relatedpromptsrequestmapper.md +13 -0
  30. package/docs/API-reference/api/x-adapter-platform.relatedpromptsrequestschema.md +13 -0
  31. package/docs/API-reference/api/x-adapter-platform.relatedpromptsresponsemapper.md +13 -0
  32. package/docs/API-reference/api/x-adapter-platform.relatedpromptsresponseschema.md +13 -0
  33. package/docs/API-reference/api/x-components.animationprop.md +6 -1
  34. package/docs/API-reference/api/x-components.bannerslist.md +3 -3
  35. package/docs/API-reference/api/x-components.baseaddtocart.md +1 -0
  36. package/docs/API-reference/api/x-components.basedropdown.md +5 -5
  37. package/docs/API-reference/api/x-components.baseeventsmodal.md +2 -2
  38. package/docs/API-reference/api/x-components.basegrid.md +3 -3
  39. package/docs/API-reference/api/x-components.baseheadertogglepanel.md +5 -5
  40. package/docs/API-reference/api/x-components.baseidmodal.md +2 -2
  41. package/docs/API-reference/api/x-components.baseidtogglepanel.md +5 -5
  42. package/docs/API-reference/api/x-components.basemodal.md +10 -10
  43. package/docs/API-reference/api/x-components.baseresultimage.md +9 -9
  44. package/docs/API-reference/api/x-components.baseslider.md +70 -0
  45. package/docs/API-reference/api/x-components.basesuggestions.md +3 -3
  46. package/docs/API-reference/api/x-components.baseswitch.md +1 -1
  47. package/docs/API-reference/api/x-components.basetabspanel.md +8 -8
  48. package/docs/API-reference/api/x-components.baseteleport.md +21 -0
  49. package/docs/API-reference/api/x-components.basetogglepanel.md +3 -3
  50. package/docs/API-reference/api/x-components.basevariablecolumngrid.md +3 -3
  51. package/docs/API-reference/api/x-components.cancelfetchandsaverelatedprompts.md +13 -0
  52. package/docs/API-reference/api/x-components.configmutations.config.md +11 -0
  53. package/docs/API-reference/api/x-components.configmutations.md +29 -0
  54. package/docs/API-reference/api/x-components.configmutations.mergeconfig.md +24 -0
  55. package/docs/API-reference/api/x-components.configmutations.setconfig.md +24 -0
  56. package/docs/API-reference/api/x-components.createrelatedtagsquerygetter.md +26 -0
  57. package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.getrelatedtags.md +13 -0
  58. package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.md +20 -0
  59. package/docs/API-reference/api/x-components.createtrackrelatedprompttoolingdisplayclickwire.md +19 -0
  60. package/docs/API-reference/api/x-components.createtracktoolingadd2cartwire.md +19 -0
  61. package/docs/API-reference/api/x-components.createtracktoolingdisplaywire.md +19 -0
  62. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice._constructor_.md → x-components.defaultexternaltaggingservice._constructor_.md} +3 -3
  63. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.add_to_cart_id_key.md +13 -0
  64. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.instance.md +13 -0
  65. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.localstorageservice.md +11 -0
  66. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.md +43 -0
  67. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.movetosessionstorage.md → x-components.defaultexternaltaggingservice.movetosessionstorage.md} +2 -2
  68. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.result_clicked_id_key.md +13 -0
  69. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.sessionstorageservice.md +11 -0
  70. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagekey.md +11 -0
  71. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagettlms.md +11 -0
  72. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.store.md → x-components.defaultexternaltaggingservice.store.md} +2 -2
  73. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storeaddtocart.md +24 -0
  74. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.storeresultclicked.md → x-components.defaultexternaltaggingservice.storeresultclicked.md} +3 -3
  75. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.trackaddtocart.md → x-components.defaultexternaltaggingservice.trackaddtocart.md} +3 -3
  76. package/docs/API-reference/api/x-components.displayclickprovider.md +66 -0
  77. package/docs/API-reference/api/x-components.empathize.md +6 -6
  78. package/docs/API-reference/api/x-components.empathizemutations.md +1 -1
  79. package/docs/API-reference/api/x-components.externaltaggingservice.md +23 -0
  80. package/docs/API-reference/api/{x-components.pdpaddtocartservice.movetosessionstorage.md → x-components.externaltaggingservice.movetosessionstorage.md} +2 -2
  81. package/docs/API-reference/api/x-components.externaltaggingservice.storeaddtocart.md +24 -0
  82. package/docs/API-reference/api/{x-components.pdpaddtocartservice.storeresultclicked.md → x-components.externaltaggingservice.storeresultclicked.md} +3 -3
  83. package/docs/API-reference/api/{x-components.pdpaddtocartservice.trackaddtocart.md → x-components.externaltaggingservice.trackaddtocart.md} +3 -3
  84. package/docs/API-reference/api/x-components.facets.md +3 -3
  85. package/docs/API-reference/api/x-components.facetsmutations.md +1 -1
  86. package/docs/API-reference/api/x-components.featurelocation.md +1 -1
  87. package/docs/API-reference/api/x-components.fetchandsaverelatedprompts.md +13 -0
  88. package/docs/API-reference/api/x-components.fetchrelatedprompts.md +13 -0
  89. package/docs/API-reference/api/x-components.filterslist.md +3 -3
  90. package/docs/API-reference/api/x-components.globalxbus.md +14 -0
  91. package/docs/API-reference/api/x-components.hierarchicalfilter.md +9 -2
  92. package/docs/API-reference/api/x-components.historyqueriesmutations.md +1 -1
  93. package/docs/API-reference/api/x-components.historyqueriesstate.md +1 -1
  94. package/docs/API-reference/api/x-components.identifierresults.md +3 -3
  95. package/docs/API-reference/api/x-components.identifierresultsmutations.md +1 -1
  96. package/docs/API-reference/api/x-components.identifierresultsstate.md +1 -1
  97. package/docs/API-reference/api/x-components.installxoptions.domelement.md +1 -1
  98. package/docs/API-reference/api/x-components.installxoptions.installextraplugins.md +2 -2
  99. package/docs/API-reference/api/x-components.installxoptions.md +1 -1
  100. package/docs/API-reference/api/x-components.itemslist.md +3 -3
  101. package/docs/API-reference/api/x-components.mainmodal.md +2 -2
  102. package/docs/API-reference/api/x-components.md +39 -3
  103. package/docs/API-reference/api/x-components.mergeconfig.md +27 -0
  104. package/docs/API-reference/api/x-components.multicolumnmaxwidthlayout.md +5 -5
  105. package/docs/API-reference/api/x-components.myhistory.md +3 -3
  106. package/docs/API-reference/api/x-components.nextqueriesgroup.md +22 -0
  107. package/docs/API-reference/api/x-components.nextqueriesgroup.modelname.md +11 -0
  108. package/docs/API-reference/api/x-components.nextqueriesgroup.nextqueries.md +11 -0
  109. package/docs/API-reference/api/x-components.nextquerieslist.md +3 -3
  110. package/docs/API-reference/api/x-components.nextqueriesmutations.md +1 -1
  111. package/docs/API-reference/api/x-components.nextqueriesstate.md +1 -1
  112. package/docs/API-reference/api/x-components.pageselector.md +80 -0
  113. package/docs/API-reference/api/x-components.partialresultslist.md +3 -3
  114. package/docs/API-reference/api/x-components.popularsearchesmutations.md +1 -1
  115. package/docs/API-reference/api/x-components.promotedslist.md +3 -3
  116. package/docs/API-reference/api/x-components.queriespreviewmutations.md +1 -1
  117. package/docs/API-reference/api/x-components.queryfeature.md +1 -1
  118. package/docs/API-reference/api/x-components.querymutations.md +20 -0
  119. package/docs/API-reference/api/x-components.querymutations.setquery.md +24 -0
  120. package/docs/API-reference/api/x-components.querypreviewlist.md +3 -3
  121. package/docs/API-reference/api/x-components.querystate.md +20 -0
  122. package/docs/API-reference/api/x-components.querystate.query.md +13 -0
  123. package/docs/API-reference/api/x-components.querysuggestionsmutations.md +1 -1
  124. package/docs/API-reference/api/x-components.querysuggestionsstate.md +1 -1
  125. package/docs/API-reference/api/x-components.recommendations.md +3 -3
  126. package/docs/API-reference/api/x-components.recommendationsmutations.md +1 -1
  127. package/docs/API-reference/api/x-components.relatedprompt.md +33 -0
  128. package/docs/API-reference/api/x-components.relatedpromptsactioncontext.md +15 -0
  129. package/docs/API-reference/api/x-components.relatedpromptsactions.cancelfetchandsaverelatedprompts.md +17 -0
  130. package/docs/API-reference/api/x-components.relatedpromptsactions.fetchandsaverelatedprompts.md +24 -0
  131. package/docs/API-reference/api/x-components.relatedpromptsactions.fetchrelatedprompts.md +24 -0
  132. package/docs/API-reference/api/x-components.relatedpromptsactions.md +23 -0
  133. package/docs/API-reference/api/x-components.relatedpromptsactions.seturlparams.md +24 -0
  134. package/docs/API-reference/api/x-components.relatedpromptsgetters.md +21 -0
  135. package/docs/API-reference/api/x-components.relatedpromptsgetters.query.md +13 -0
  136. package/docs/API-reference/api/x-components.relatedpromptsgetters.request.md +13 -0
  137. package/docs/API-reference/api/x-components.relatedpromptslist.md +72 -0
  138. package/docs/API-reference/api/x-components.relatedpromptsmutations.md +27 -0
  139. package/docs/API-reference/api/x-components.relatedpromptsmutations.resetrelatedpromptsstate.md +17 -0
  140. package/docs/API-reference/api/x-components.relatedpromptsmutations.resetselectedprompt.md +17 -0
  141. package/docs/API-reference/api/x-components.relatedpromptsmutations.setparams.md +24 -0
  142. package/docs/API-reference/api/x-components.relatedpromptsmutations.setrelatedpromptsproducts.md +24 -0
  143. package/docs/API-reference/api/x-components.relatedpromptsmutations.setrelatedpromptsrelatedtags.md +24 -0
  144. package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedprompt.md +24 -0
  145. package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedquery.md +24 -0
  146. package/docs/API-reference/api/x-components.relatedpromptsstate.md +25 -0
  147. package/docs/API-reference/api/x-components.relatedpromptsstate.params.md +13 -0
  148. package/docs/API-reference/api/x-components.relatedpromptsstate.relatedprompts.md +13 -0
  149. package/docs/API-reference/api/x-components.relatedpromptsstate.relatedtags.md +13 -0
  150. package/docs/API-reference/api/x-components.relatedpromptsstate.selectedprompt.md +13 -0
  151. package/docs/API-reference/api/x-components.relatedpromptsstate.selectedquery.md +13 -0
  152. package/docs/API-reference/api/x-components.relatedpromptstaglist.md +72 -0
  153. package/docs/API-reference/api/x-components.relatedpromptsxevents.md +25 -0
  154. package/docs/API-reference/api/x-components.relatedpromptsxevents.relatedpromptsrequestupdated.md +13 -0
  155. package/docs/API-reference/api/x-components.relatedpromptsxevents.selectedrelatedpromptchanged.md +13 -0
  156. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptadd2cart.md +13 -0
  157. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptresult.md +13 -0
  158. package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedprompt.md +13 -0
  159. package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedpromptquery.md +13 -0
  160. package/docs/API-reference/api/x-components.relatedpromptsxmodule.md +13 -0
  161. package/docs/API-reference/api/x-components.relatedpromptsxstoremodule.md +15 -0
  162. package/docs/API-reference/api/x-components.relatedtags.md +3 -3
  163. package/docs/API-reference/api/x-components.relatedtagsmutations.md +1 -1
  164. package/docs/API-reference/api/x-components.relatedtagsstate.md +1 -1
  165. package/docs/API-reference/api/x-components.resultfeature.md +1 -1
  166. package/docs/API-reference/api/x-components.resultslist.md +3 -3
  167. package/docs/API-reference/api/x-components.scrolltotop.md +5 -5
  168. package/docs/API-reference/api/x-components.searchboxmutations.md +1 -1
  169. package/docs/API-reference/api/x-components.searchboxstate.md +1 -1
  170. package/docs/API-reference/api/x-components.searchconfig.md +1 -0
  171. package/docs/API-reference/api/x-components.searchconfig.pagemode.md +11 -0
  172. package/docs/API-reference/api/x-components.searchinputplaceholder.md +3 -3
  173. package/docs/API-reference/api/x-components.searchmutations.md +2 -1
  174. package/docs/API-reference/api/x-components.searchmutations.setstats.md +24 -0
  175. package/docs/API-reference/api/x-components.searchstate.md +2 -1
  176. package/docs/API-reference/api/x-components.searchstate.stats.md +13 -0
  177. package/docs/API-reference/api/x-components.searchxevents.md +1 -0
  178. package/docs/API-reference/api/x-components.searchxevents.userselectedapage.md +13 -0
  179. package/docs/API-reference/api/x-components.selectedfilterslist.md +3 -3
  180. package/docs/API-reference/api/x-components.semanticqueriesgetters.md +1 -0
  181. package/docs/API-reference/api/x-components.semanticqueriesgetters.query.md +13 -0
  182. package/docs/API-reference/api/x-components.semanticqueriesmutations.md +2 -1
  183. package/docs/API-reference/api/x-components.semanticqueriesmutations.setsemanticqueriesrelatedtags.md +24 -0
  184. package/docs/API-reference/api/x-components.semanticqueriesstate.md +2 -1
  185. package/docs/API-reference/api/x-components.semanticqueriesstate.relatedtags.md +13 -0
  186. package/docs/API-reference/api/x-components.setconfig.md +27 -0
  187. package/docs/API-reference/api/x-components.setquery.md +25 -0
  188. package/docs/API-reference/api/x-components.seturlprompt.md +13 -0
  189. package/docs/API-reference/api/x-components.simplefilter.md +7 -0
  190. package/docs/API-reference/api/x-components.singlecolumnlayout.md +3 -3
  191. package/docs/API-reference/api/x-components.slidingpanel.md +13 -5
  192. package/docs/API-reference/api/x-components.snippetcallbacks.md +7 -0
  193. package/docs/API-reference/api/x-components.sortdropdown.md +1 -1
  194. package/docs/API-reference/api/x-components.tagging.md +6 -6
  195. package/docs/API-reference/api/x-components.taggingconfig.md +2 -2
  196. package/docs/API-reference/api/{x-components.taggingconfig.clickedresultstoragekey.md → x-components.taggingconfig.storagekey.md} +3 -3
  197. package/docs/API-reference/api/x-components.taggingconfig.storagettlms.md +13 -0
  198. package/docs/API-reference/api/x-components.taggingmutations.md +1 -1
  199. package/docs/API-reference/api/x-components.taggingxevents.md +1 -1
  200. package/docs/API-reference/api/x-components.taggingxevents.resulturltrackingenabled.md +1 -1
  201. package/docs/API-reference/api/x-components.trackrelatedprompttoolingdisplayclickwire.md +13 -0
  202. package/docs/API-reference/api/x-components.tracktoolingadd2cartwire.md +13 -0
  203. package/docs/API-reference/api/x-components.tracktoolingdisplayclickedwire.md +13 -0
  204. package/docs/API-reference/api/x-components.typing.md +13 -0
  205. package/docs/API-reference/api/x-components.typingoptions.md +22 -0
  206. package/docs/API-reference/api/x-components.typingoptions.speed.md +13 -0
  207. package/docs/API-reference/api/x-components.typingoptions.targetattr.md +18 -0
  208. package/docs/API-reference/api/x-components.typingoptions.text.md +13 -0
  209. package/docs/API-reference/api/x-components.urlmutations.md +2 -1
  210. package/docs/API-reference/api/x-components.urlmutations.setprompt.md +24 -0
  211. package/docs/API-reference/api/x-components.urlparams.md +1 -0
  212. package/docs/API-reference/api/x-components.urlparams.prompt.md +11 -0
  213. package/docs/API-reference/api/x-components.urlstate.md +1 -1
  214. package/docs/API-reference/api/x-components.usealiasapi.md +1 -0
  215. package/docs/API-reference/api/x-components.usealiasapi.pricestats.md +16 -0
  216. package/docs/API-reference/api/x-components.xeventstypes.md +3 -3
  217. package/docs/API-reference/api/x-components.xmodulestree.md +1 -0
  218. package/docs/API-reference/api/x-components.xmodulestree.relatedprompts.md +11 -0
  219. package/docs/API-reference/api/x-types.md +2 -0
  220. package/docs/API-reference/api/x-types.relatedprompt.md +4 -1
  221. package/docs/API-reference/api/x-types.relatedprompt.nextqueries.md +1 -1
  222. package/docs/API-reference/api/x-types.relatedprompt.relatedpromptnextqueries.md +13 -0
  223. package/docs/API-reference/api/x-types.relatedprompt.tagging.md +17 -0
  224. package/docs/API-reference/api/x-types.relatedprompt.toolingdisplaytagging.md +13 -0
  225. package/docs/API-reference/api/x-types.relatedpromptnextquery.md +23 -0
  226. package/docs/API-reference/api/x-types.relatedpromptnextquery.query.md +13 -0
  227. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayadd2carttagging.md +13 -0
  228. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayclicktagging.md +13 -0
  229. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplaytagging.md +13 -0
  230. package/docs/API-reference/api/x-types.searchresponse.md +1 -0
  231. package/docs/API-reference/api/x-types.searchresponse.stats.md +11 -0
  232. package/docs/API-reference/api/x-types.stats.md +22 -0
  233. package/docs/API-reference/api/x-types.stats.price.md +14 -0
  234. package/docs/API-reference/components/common/result/x-components.base-result-image.md +2 -2
  235. package/docs/API-reference/components/common/x-components.base-slider.md +189 -0
  236. package/docs/API-reference/components/common/x-components.base-teleport.md +19 -0
  237. package/docs/API-reference/components/common/x-components.display-click-provider.md +17 -0
  238. package/docs/API-reference/components/common/x-components.items-list.md +1 -1
  239. package/docs/API-reference/components/common/x-components.page-selector.md +136 -0
  240. package/docs/API-reference/components/common/x-components.sliding-panel.md +7 -7
  241. package/docs/API-reference/components/facets/x-components.facets/facets.md +1 -1
  242. package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +1 -1
  243. package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +22 -0
  244. package/docs/API-reference/components/related-prompts/x-components.related-prompts-list.md +196 -0
  245. package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +32 -0
  246. package/docs/API-reference/components/search/x-components.results-list.md +1 -1
  247. package/docs/API-reference/components/tagging/x-components.tagging.md +15 -16
  248. package/js/components/animations/fade-and-slide.vue.js +1 -2
  249. package/js/components/animations/fade-and-slide.vue.js.map +1 -1
  250. package/js/components/base-dropdown.vue.js +1 -3
  251. package/js/components/base-dropdown.vue.js.map +1 -1
  252. package/js/components/base-dropdown.vue2.js +1 -7
  253. package/js/components/base-dropdown.vue2.js.map +1 -1
  254. package/js/components/base-event-button.vue.js +1 -2
  255. package/js/components/base-event-button.vue.js.map +1 -1
  256. package/js/components/base-grid.vue.js +11 -18
  257. package/js/components/base-grid.vue.js.map +1 -1
  258. package/js/components/base-grid.vue2.js.map +1 -1
  259. package/js/components/base-grid.vue3.js +1 -1
  260. package/js/components/base-keyboard-navigation.vue.js +1 -2
  261. package/js/components/base-keyboard-navigation.vue.js.map +1 -1
  262. package/js/components/base-rating.vue.js +1 -3
  263. package/js/components/base-rating.vue.js.map +1 -1
  264. package/js/components/base-slider.vue.js +65 -0
  265. package/js/components/base-slider.vue.js.map +1 -0
  266. package/js/components/base-slider.vue2.js +109 -0
  267. package/js/components/base-slider.vue2.js.map +1 -0
  268. package/js/components/base-slider.vue3.js +7 -0
  269. package/js/components/base-slider.vue3.js.map +1 -0
  270. package/js/components/base-switch.vue.js.map +1 -1
  271. package/js/components/base-switch.vue2.js +3 -7
  272. package/js/components/base-switch.vue2.js.map +1 -1
  273. package/js/components/base-teleport.vue.js +17 -0
  274. package/js/components/base-teleport.vue.js.map +1 -0
  275. package/js/components/base-teleport.vue2.js +14 -0
  276. package/js/components/base-teleport.vue2.js.map +1 -0
  277. package/js/components/base-teleport.vue3.js +7 -0
  278. package/js/components/base-teleport.vue3.js.map +1 -0
  279. package/js/components/base-variable-column-grid.vue.js +1 -2
  280. package/js/components/base-variable-column-grid.vue.js.map +1 -1
  281. package/js/components/column-picker/base-column-picker-dropdown.vue.js +1 -3
  282. package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
  283. package/js/components/column-picker/base-column-picker-list.vue.js +1 -3
  284. package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
  285. package/js/components/display-click-provider.vue.js +74 -0
  286. package/js/components/display-click-provider.vue.js.map +1 -0
  287. package/js/components/display-click-provider.vue2.js +6 -0
  288. package/js/components/display-click-provider.vue2.js.map +1 -0
  289. package/js/components/filters/labels/base-rating-filter-label.vue.js +1 -3
  290. package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
  291. package/js/components/icons/cross-tiny.vue.js +2 -2
  292. package/js/components/icons/plus.vue.js +2 -2
  293. package/js/components/items-list.vue.js +1 -2
  294. package/js/components/items-list.vue.js.map +1 -1
  295. package/js/components/items-list.vue2.js +2 -2
  296. package/js/components/items-list.vue2.js.map +1 -1
  297. package/js/components/layouts/fixed-header-and-asides-layout.vue.js +1 -7
  298. package/js/components/layouts/fixed-header-and-asides-layout.vue.js.map +1 -1
  299. package/js/components/layouts/multi-column-max-width-layout.vue.js +1 -9
  300. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  301. package/js/components/layouts/single-column-layout.vue.js +1 -9
  302. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  303. package/js/components/modals/base-events-modal-close.vue.js +1 -2
  304. package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
  305. package/js/components/modals/base-events-modal-open.vue.js +1 -2
  306. package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
  307. package/js/components/modals/base-id-modal-close.vue.js +1 -2
  308. package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
  309. package/js/components/modals/base-id-modal-open.vue.js +1 -2
  310. package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
  311. package/js/components/modals/base-modal.vue.js +1 -2
  312. package/js/components/modals/base-modal.vue.js.map +1 -1
  313. package/js/components/modals/base-modal.vue2.js +13 -6
  314. package/js/components/modals/base-modal.vue2.js.map +1 -1
  315. package/js/components/page-loader-button.vue.js +8 -10
  316. package/js/components/page-loader-button.vue.js.map +1 -1
  317. package/js/components/page-loader-button.vue2.js.map +1 -1
  318. package/js/components/page-loader-button.vue3.js +7 -0
  319. package/js/components/page-loader-button.vue3.js.map +1 -0
  320. package/js/components/page-selector.vue.js +78 -0
  321. package/js/components/page-selector.vue.js.map +1 -0
  322. package/js/components/page-selector.vue2.js +128 -0
  323. package/js/components/page-selector.vue2.js.map +1 -0
  324. package/js/components/page-selector.vue3.js +7 -0
  325. package/js/components/page-selector.vue3.js.map +1 -0
  326. package/js/components/panels/base-header-toggle-panel.vue.js +1 -5
  327. package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
  328. package/js/components/panels/base-id-toggle-panel-button.vue.js +1 -2
  329. package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
  330. package/js/components/panels/base-id-toggle-panel.vue.js +1 -2
  331. package/js/components/panels/base-id-toggle-panel.vue.js.map +1 -1
  332. package/js/components/panels/base-tabs-panel.vue.js +1 -4
  333. package/js/components/panels/base-tabs-panel.vue.js.map +1 -1
  334. package/js/components/panels/base-toggle-panel.vue.js +1 -2
  335. package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
  336. package/js/components/result/base-result-add-to-cart.vue.js +3 -3
  337. package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
  338. package/js/components/result/base-result-add-to-cart.vue2.js +19 -5
  339. package/js/components/result/base-result-add-to-cart.vue2.js.map +1 -1
  340. package/js/components/result/base-result-current-price.vue.js +1 -2
  341. package/js/components/result/base-result-current-price.vue.js.map +1 -1
  342. package/js/components/result/base-result-image.vue.js +39 -59
  343. package/js/components/result/base-result-image.vue.js.map +1 -1
  344. package/js/components/result/base-result-image.vue2.js +5 -5
  345. package/js/components/result/base-result-image.vue2.js.map +1 -1
  346. package/js/components/result/base-result-link.vue.js +1 -2
  347. package/js/components/result/base-result-link.vue.js.map +1 -1
  348. package/js/components/result/base-result-previous-price.vue.js +1 -2
  349. package/js/components/result/base-result-previous-price.vue.js.map +1 -1
  350. package/js/components/result/base-result-rating.vue.js +1 -4
  351. package/js/components/result/base-result-rating.vue.js.map +1 -1
  352. package/js/components/result/result-variant-selector.vue.js +1 -3
  353. package/js/components/result/result-variant-selector.vue.js.map +1 -1
  354. package/js/components/sliding-panel.vue.js +3 -6
  355. package/js/components/sliding-panel.vue.js.map +1 -1
  356. package/js/components/sliding-panel.vue2.js +2 -2
  357. package/js/components/sliding-panel.vue2.js.map +1 -1
  358. package/js/components/suggestions/base-suggestion.vue.js +1 -2
  359. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  360. package/js/components/suggestions/base-suggestions.vue.js +1 -2
  361. package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
  362. package/js/composables/use-alias-api.js +4 -1
  363. package/js/composables/use-alias-api.js.map +1 -1
  364. package/js/composables/use-getter.js +1 -1
  365. package/js/composables/use-state.js +1 -1
  366. package/js/directives/typing.js +58 -0
  367. package/js/directives/typing.js.map +1 -0
  368. package/js/index.js +21 -4
  369. package/js/index.js.map +1 -1
  370. package/js/types/animation-prop.js +5 -0
  371. package/js/types/animation-prop.js.map +1 -1
  372. package/js/x-installer/x-installer/x-installer.js +3 -3
  373. package/js/x-installer/x-installer/x-installer.js.map +1 -1
  374. package/js/x-modules/device/store/emitters.js +1 -0
  375. package/js/x-modules/device/store/emitters.js.map +1 -1
  376. package/js/x-modules/empathize/components/empathize.vue.js +1 -2
  377. package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
  378. package/js/x-modules/empathize/components/empathize.vue2.js +10 -3
  379. package/js/x-modules/empathize/components/empathize.vue2.js.map +1 -1
  380. package/js/x-modules/empathize/store/emitters.js +1 -0
  381. package/js/x-modules/empathize/store/emitters.js.map +1 -1
  382. package/js/x-modules/experience-controls/store/emitters.js +1 -0
  383. package/js/x-modules/experience-controls/store/emitters.js.map +1 -1
  384. package/js/x-modules/extra-params/components/extra-params.vue.js +1 -1
  385. package/js/x-modules/extra-params/components/extra-params.vue.js.map +1 -1
  386. package/js/x-modules/extra-params/store/emitters.js +1 -0
  387. package/js/x-modules/extra-params/store/emitters.js.map +1 -1
  388. package/js/x-modules/facets/components/facets/facets.vue.js +20 -33
  389. package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
  390. package/js/x-modules/facets/components/facets/facets.vue2.js +2 -2
  391. package/js/x-modules/facets/components/facets/facets.vue2.js.map +1 -1
  392. package/js/x-modules/facets/components/filters/all-filter.vue.js +1 -2
  393. package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
  394. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +1 -6
  395. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
  396. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +1 -3
  397. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
  398. package/js/x-modules/facets/components/filters/number-range-filter.vue.js +1 -3
  399. package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
  400. package/js/x-modules/facets/components/filters/simple-filter.vue.js +1 -3
  401. package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
  402. package/js/x-modules/facets/components/lists/filters-list.vue.js +1 -2
  403. package/js/x-modules/facets/components/lists/filters-list.vue.js.map +1 -1
  404. package/js/x-modules/facets/components/lists/filters-search.vue.js +1 -3
  405. package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
  406. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +11 -18
  407. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
  408. package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js +2 -2
  409. package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js.map +1 -1
  410. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +1 -4
  411. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  412. package/js/x-modules/history-queries/components/clear-history-queries.vue.js +1 -2
  413. package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
  414. package/js/x-modules/history-queries/components/history-queries.vue.js +1 -10
  415. package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
  416. package/js/x-modules/history-queries/components/history-query.vue.js +1 -6
  417. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  418. package/js/x-modules/history-queries/components/my-history.vue.js +1 -4
  419. package/js/x-modules/history-queries/components/my-history.vue.js.map +1 -1
  420. package/js/x-modules/history-queries/components/remove-history-query.vue.js +1 -2
  421. package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
  422. package/js/x-modules/history-queries/store/emitters.js +1 -0
  423. package/js/x-modules/history-queries/store/emitters.js.map +1 -1
  424. package/js/x-modules/identifier-results/components/identifier-results.vue.js +1 -2
  425. package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
  426. package/js/x-modules/identifier-results/store/emitters.js +1 -0
  427. package/js/x-modules/identifier-results/store/emitters.js.map +1 -1
  428. package/js/x-modules/next-queries/components/next-queries.vue.js +1 -7
  429. package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
  430. package/js/x-modules/next-queries/components/next-query-preview.vue.js +1 -3
  431. package/js/x-modules/next-queries/components/next-query-preview.vue.js.map +1 -1
  432. package/js/x-modules/next-queries/components/next-query.vue.js +1 -4
  433. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  434. package/js/x-modules/next-queries/store/emitters.js +1 -0
  435. package/js/x-modules/next-queries/store/emitters.js.map +1 -1
  436. package/js/x-modules/popular-searches/components/popular-search.vue.js +1 -4
  437. package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
  438. package/js/x-modules/popular-searches/components/popular-searches.vue.js +1 -7
  439. package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
  440. package/js/x-modules/queries-preview/components/query-preview-button.vue.js +1 -2
  441. package/js/x-modules/queries-preview/components/query-preview-button.vue.js.map +1 -1
  442. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js +8 -0
  443. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js.map +1 -1
  444. package/js/x-modules/queries-preview/components/query-preview-list.vue.js.map +1 -1
  445. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js +15 -2
  446. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js.map +1 -1
  447. package/js/x-modules/queries-preview/components/query-preview.vue.js +1 -2
  448. package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
  449. package/js/x-modules/queries-preview/components/query-preview.vue2.js +9 -1
  450. package/js/x-modules/queries-preview/components/query-preview.vue2.js.map +1 -1
  451. package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js +2 -1
  452. package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js.map +1 -1
  453. package/js/x-modules/queries-preview/store/emitters.js +1 -0
  454. package/js/x-modules/queries-preview/store/emitters.js.map +1 -1
  455. package/js/x-modules/queries-preview/store/module.js +1 -1
  456. package/js/x-modules/queries-preview/store/module.js.map +1 -1
  457. package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js +6 -4
  458. package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js.map +1 -1
  459. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +1 -4
  460. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
  461. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +1 -7
  462. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
  463. package/js/x-modules/query-suggestions/store/emitters.js +1 -0
  464. package/js/x-modules/query-suggestions/store/emitters.js.map +1 -1
  465. package/js/x-modules/recommendations/components/recommendations.vue.js +1 -2
  466. package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
  467. package/js/x-modules/recommendations/store/emitters.js +1 -0
  468. package/js/x-modules/recommendations/store/emitters.js.map +1 -1
  469. package/js/x-modules/related-prompts/components/related-prompt.vue.js +27 -0
  470. package/js/x-modules/related-prompts/components/related-prompt.vue.js.map +1 -0
  471. package/js/x-modules/related-prompts/components/related-prompt.vue2.js +31 -0
  472. package/js/x-modules/related-prompts/components/related-prompt.vue2.js.map +1 -0
  473. package/js/x-modules/related-prompts/components/related-prompt.vue3.js +7 -0
  474. package/js/x-modules/related-prompts/components/related-prompt.vue3.js.map +1 -0
  475. package/js/x-modules/related-prompts/components/related-prompts-list.vue.js +154 -0
  476. package/js/x-modules/related-prompts/components/related-prompts-list.vue.js.map +1 -0
  477. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js +6 -0
  478. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js.map +1 -0
  479. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js +101 -0
  480. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js.map +1 -0
  481. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js +221 -0
  482. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js.map +1 -0
  483. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js +7 -0
  484. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js.map +1 -0
  485. package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js +29 -0
  486. package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js.map +1 -0
  487. package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js +20 -0
  488. package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js.map +1 -0
  489. package/js/x-modules/related-prompts/store/actions/set-url-params.action.js +15 -0
  490. package/js/x-modules/related-prompts/store/actions/set-url-params.action.js.map +1 -0
  491. package/js/x-modules/related-prompts/store/emitters.js +16 -0
  492. package/js/x-modules/related-prompts/store/emitters.js.map +1 -0
  493. package/js/x-modules/related-prompts/store/getters/related-prompts-query.getter.js +18 -0
  494. package/js/x-modules/related-prompts/store/getters/related-prompts-query.getter.js.map +1 -0
  495. package/js/x-modules/related-prompts/store/getters/request.getter.js +17 -0
  496. package/js/x-modules/related-prompts/store/getters/request.getter.js.map +1 -0
  497. package/js/x-modules/related-prompts/store/module.js +64 -0
  498. package/js/x-modules/related-prompts/store/module.js.map +1 -0
  499. package/js/x-modules/related-prompts/wiring.js +82 -0
  500. package/js/x-modules/related-prompts/wiring.js.map +1 -0
  501. package/js/x-modules/related-prompts/x-module.js +21 -0
  502. package/js/x-modules/related-prompts/x-module.js.map +1 -0
  503. package/js/x-modules/related-tags/components/related-tag.vue.js +1 -2
  504. package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
  505. package/js/x-modules/related-tags/components/related-tags.vue.js +1 -4
  506. package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
  507. package/js/x-modules/related-tags/store/emitters.js +1 -0
  508. package/js/x-modules/related-tags/store/emitters.js.map +1 -1
  509. package/js/x-modules/scroll/components/scroll-to-top.vue.js +1 -2
  510. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
  511. package/js/x-modules/scroll/components/scroll-to-top.vue2.js +8 -0
  512. package/js/x-modules/scroll/components/scroll-to-top.vue2.js.map +1 -1
  513. package/js/x-modules/scroll/store/emitters.js +1 -0
  514. package/js/x-modules/scroll/store/emitters.js.map +1 -1
  515. package/js/x-modules/search/components/partial-results-list.vue.js +1 -2
  516. package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
  517. package/js/x-modules/search/components/results-list.vue.js +2 -2
  518. package/js/x-modules/search/components/results-list.vue.js.map +1 -1
  519. package/js/x-modules/search/components/sort-dropdown.vue.js +1 -3
  520. package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
  521. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +10 -3
  522. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
  523. package/js/x-modules/search/store/actions/save-search-response.action.js +3 -1
  524. package/js/x-modules/search/store/actions/save-search-response.action.js.map +1 -1
  525. package/js/x-modules/search/store/emitters.js +1 -0
  526. package/js/x-modules/search/store/emitters.js.map +1 -1
  527. package/js/x-modules/search/store/module.js +9 -3
  528. package/js/x-modules/search/store/module.js.map +1 -1
  529. package/js/x-modules/search/wiring.js +4 -0
  530. package/js/x-modules/search/wiring.js.map +1 -1
  531. package/js/x-modules/search-box/components/clear-search-input.vue.js +1 -2
  532. package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
  533. package/js/x-modules/search-box/components/search-button.vue.js +1 -2
  534. package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
  535. package/js/x-modules/search-box/store/emitters.js +1 -0
  536. package/js/x-modules/search-box/store/emitters.js.map +1 -1
  537. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js +1 -3
  538. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js.map +1 -1
  539. package/js/x-modules/semantic-queries/components/semantic-query.vue.js +1 -4
  540. package/js/x-modules/semantic-queries/components/semantic-query.vue.js.map +1 -1
  541. package/js/x-modules/semantic-queries/store/getters/normalized-query.getter.js +1 -1
  542. package/js/x-modules/semantic-queries/store/getters/normalized-query.getter.js.map +1 -1
  543. package/js/x-modules/semantic-queries/store/getters/request.getter.js +5 -4
  544. package/js/x-modules/semantic-queries/store/getters/request.getter.js.map +1 -1
  545. package/js/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.js +18 -0
  546. package/js/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.js.map +1 -0
  547. package/js/x-modules/semantic-queries/store/module.js +8 -2
  548. package/js/x-modules/semantic-queries/store/module.js.map +1 -1
  549. package/js/x-modules/semantic-queries/wiring.js +5 -0
  550. package/js/x-modules/semantic-queries/wiring.js.map +1 -1
  551. package/js/x-modules/tagging/components/tagging.vue.js +8 -7
  552. package/js/x-modules/tagging/components/tagging.vue.js.map +1 -1
  553. package/js/x-modules/tagging/service/{pdp-add-to-cart.service.js → external-tagging.service.js} +56 -25
  554. package/js/x-modules/tagging/service/external-tagging.service.js.map +1 -0
  555. package/js/x-modules/tagging/store/emitters.js +1 -1
  556. package/js/x-modules/tagging/store/emitters.js.map +1 -1
  557. package/js/x-modules/tagging/store/module.js +7 -3
  558. package/js/x-modules/tagging/store/module.js.map +1 -1
  559. package/js/x-modules/tagging/wiring.js +110 -9
  560. package/js/x-modules/tagging/wiring.js.map +1 -1
  561. package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
  562. package/js/x-modules/url/components/url-handler.vue2.js +4 -5
  563. package/js/x-modules/url/components/url-handler.vue2.js.map +1 -1
  564. package/js/x-modules/url/store/emitters.js +1 -0
  565. package/js/x-modules/url/store/emitters.js.map +1 -1
  566. package/js/x-modules/url/store/getters/url-params.getter.js +2 -3
  567. package/js/x-modules/url/store/getters/url-params.getter.js.map +1 -1
  568. package/js/x-modules/url/store/initial-state.js +2 -1
  569. package/js/x-modules/url/store/initial-state.js.map +1 -1
  570. package/js/x-modules/url/store/module.js +3 -0
  571. package/js/x-modules/url/store/module.js.map +1 -1
  572. package/js/x-modules/url/wiring.js +10 -1
  573. package/js/x-modules/url/wiring.js.map +1 -1
  574. package/package.json +50 -49
  575. package/related-prompts/index.d.ts +1 -0
  576. package/related-prompts/index.js +9 -0
  577. package/report/x-adapter-platform.api.json +895 -67
  578. package/report/x-components.api.json +16491 -17162
  579. package/report/x-components.api.md +847 -215
  580. package/report/x-types.api.json +320 -4
  581. package/tagging/index.js +2 -2
  582. package/types/adapter/mocked-responses.d.ts +3 -0
  583. package/types/adapter/mocked-responses.d.ts.map +1 -1
  584. package/types/components/base-dropdown.vue.d.ts +5 -5
  585. package/types/components/base-dropdown.vue.d.ts.map +1 -1
  586. package/types/components/base-grid.vue.d.ts +3 -3
  587. package/types/components/base-slider.vue.d.ts +74 -0
  588. package/types/components/base-slider.vue.d.ts.map +1 -0
  589. package/types/components/base-switch.vue.d.ts +2 -1
  590. package/types/components/base-switch.vue.d.ts.map +1 -1
  591. package/types/components/base-teleport.vue.d.ts +13 -0
  592. package/types/components/base-teleport.vue.d.ts.map +1 -0
  593. package/types/components/base-variable-column-grid.vue.d.ts +3 -3
  594. package/types/components/display-click-provider.vue.d.ts +61 -0
  595. package/types/components/display-click-provider.vue.d.ts.map +1 -0
  596. package/types/components/global-x-bus.vue.d.ts +14 -0
  597. package/types/components/global-x-bus.vue.d.ts.map +1 -1
  598. package/types/components/index.d.ts +4 -0
  599. package/types/components/index.d.ts.map +1 -1
  600. package/types/components/items-list.vue.d.ts +3 -3
  601. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts +5 -5
  602. package/types/components/layouts/single-column-layout.vue.d.ts +3 -3
  603. package/types/components/modals/base-events-modal.vue.d.ts +2 -2
  604. package/types/components/modals/base-id-modal.vue.d.ts +2 -2
  605. package/types/components/modals/base-modal.vue.d.ts +10 -10
  606. package/types/components/modals/base-modal.vue.d.ts.map +1 -1
  607. package/types/components/modals/main-modal.vue.d.ts +2 -2
  608. package/types/components/page-selector.vue.d.ts +125 -0
  609. package/types/components/page-selector.vue.d.ts.map +1 -0
  610. package/types/components/panels/base-header-toggle-panel.vue.d.ts +5 -5
  611. package/types/components/panels/base-id-toggle-panel.vue.d.ts +5 -5
  612. package/types/components/panels/base-tabs-panel.vue.d.ts +8 -8
  613. package/types/components/panels/base-toggle-panel.vue.d.ts +3 -3
  614. package/types/components/result/base-result-add-to-cart.vue.d.ts +2 -0
  615. package/types/components/result/base-result-add-to-cart.vue.d.ts.map +1 -1
  616. package/types/components/result/base-result-image.vue.d.ts +10 -10
  617. package/types/components/result/base-result-image.vue.d.ts.map +1 -1
  618. package/types/components/sliding-panel.vue.d.ts +15 -5
  619. package/types/components/sliding-panel.vue.d.ts.map +1 -1
  620. package/types/components/snippet-callbacks.vue.d.ts +7 -0
  621. package/types/components/snippet-callbacks.vue.d.ts.map +1 -1
  622. package/types/components/suggestions/base-suggestions.vue.d.ts +3 -3
  623. package/types/composables/use-alias-api.d.ts +5 -0
  624. package/types/composables/use-alias-api.d.ts.map +1 -1
  625. package/types/composables/use-store.d.ts +2 -2
  626. package/types/composables/use-store.d.ts.map +1 -1
  627. package/types/directives/index.d.ts +1 -0
  628. package/types/directives/index.d.ts.map +1 -1
  629. package/types/directives/typing.d.ts +35 -0
  630. package/types/directives/typing.d.ts.map +1 -0
  631. package/types/index.d.ts +1 -0
  632. package/types/index.d.ts.map +1 -1
  633. package/types/store/index.d.ts +4 -1
  634. package/types/store/index.d.ts.map +1 -1
  635. package/types/tailwind/plugin-options.d.ts +1 -2
  636. package/types/tailwind/plugin-options.d.ts.map +1 -1
  637. package/types/types/animation-prop.d.ts +6 -2
  638. package/types/types/animation-prop.d.ts.map +1 -1
  639. package/types/types/origin.d.ts +3 -3
  640. package/types/types/origin.d.ts.map +1 -1
  641. package/types/types/page-mode.d.ts +2 -0
  642. package/types/types/page-mode.d.ts.map +1 -0
  643. package/types/types/url-params.d.ts +1 -0
  644. package/types/types/url-params.d.ts.map +1 -1
  645. package/types/views/home/types.d.ts +3 -0
  646. package/types/views/home/types.d.ts.map +1 -1
  647. package/types/wiring/events.types.d.ts +3 -1
  648. package/types/wiring/events.types.d.ts.map +1 -1
  649. package/types/x-installer/x-installer/types.d.ts +2 -2
  650. package/types/x-installer/x-installer/types.d.ts.map +1 -1
  651. package/types/x-installer/x-installer/x-installer.d.ts +4 -4
  652. package/types/x-installer/x-installer/x-installer.d.ts.map +1 -1
  653. package/types/x-modules/empathize/components/empathize.vue.d.ts +6 -6
  654. package/types/x-modules/empathize/components/empathize.vue.d.ts.map +1 -1
  655. package/types/x-modules/facets/components/facets/facets.vue.d.ts +3 -3
  656. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +9 -2
  657. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  658. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts +7 -0
  659. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
  660. package/types/x-modules/facets/components/lists/filters-list.vue.d.ts +3 -3
  661. package/types/x-modules/facets/components/lists/selected-filters-list.vue.d.ts +3 -3
  662. package/types/x-modules/history-queries/components/my-history.vue.d.ts +3 -3
  663. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +3 -3
  664. package/types/x-modules/next-queries/components/next-queries-list.vue.d.ts +3 -3
  665. package/types/x-modules/next-queries/index.d.ts +1 -0
  666. package/types/x-modules/next-queries/index.d.ts.map +1 -1
  667. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts +3 -3
  668. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts.map +1 -1
  669. package/types/x-modules/queries-preview/components/query-preview.vue.d.ts.map +1 -1
  670. package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts.map +1 -1
  671. package/types/x-modules/queries-preview/store/module.d.ts.map +1 -1
  672. package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts +4 -2
  673. package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts.map +1 -1
  674. package/types/x-modules/recommendations/components/recommendations.vue.d.ts +3 -3
  675. package/types/x-modules/related-prompts/components/index.d.ts +4 -0
  676. package/types/x-modules/related-prompts/components/index.d.ts.map +1 -0
  677. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts +28 -0
  678. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts.map +1 -0
  679. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts +106 -0
  680. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts.map +1 -0
  681. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts +131 -0
  682. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -0
  683. package/types/x-modules/related-prompts/events.types.d.ts +41 -0
  684. package/types/x-modules/related-prompts/events.types.d.ts.map +1 -0
  685. package/types/x-modules/related-prompts/index.d.ts +6 -0
  686. package/types/x-modules/related-prompts/index.d.ts.map +1 -0
  687. package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts +17 -0
  688. package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts.map +1 -0
  689. package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts +13 -0
  690. package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts.map +1 -0
  691. package/types/x-modules/related-prompts/store/actions/set-url-params.action.d.ts +11 -0
  692. package/types/x-modules/related-prompts/store/actions/set-url-params.action.d.ts.map +1 -0
  693. package/types/x-modules/related-prompts/store/emitters.d.ts +10 -0
  694. package/types/x-modules/related-prompts/store/emitters.d.ts.map +1 -0
  695. package/types/x-modules/related-prompts/store/getters/index.d.ts +3 -0
  696. package/types/x-modules/related-prompts/store/getters/index.d.ts.map +1 -0
  697. package/types/x-modules/related-prompts/store/getters/related-prompts-query.getter.d.ts +13 -0
  698. package/types/x-modules/related-prompts/store/getters/related-prompts-query.getter.d.ts.map +1 -0
  699. package/types/x-modules/related-prompts/store/getters/request.getter.d.ts +14 -0
  700. package/types/x-modules/related-prompts/store/getters/request.getter.d.ts.map +1 -0
  701. package/types/x-modules/related-prompts/store/index.d.ts +6 -0
  702. package/types/x-modules/related-prompts/store/index.d.ts.map +1 -0
  703. package/types/x-modules/related-prompts/store/module.d.ts +8 -0
  704. package/types/x-modules/related-prompts/store/module.d.ts.map +1 -0
  705. package/types/x-modules/related-prompts/store/types.d.ts +125 -0
  706. package/types/x-modules/related-prompts/store/types.d.ts.map +1 -0
  707. package/types/x-modules/related-prompts/types.d.ts +10 -0
  708. package/types/x-modules/related-prompts/types.d.ts.map +1 -0
  709. package/types/x-modules/related-prompts/wiring.d.ts +42 -0
  710. package/types/x-modules/related-prompts/wiring.d.ts.map +1 -0
  711. package/types/x-modules/related-prompts/x-module.d.ts +16 -0
  712. package/types/x-modules/related-prompts/x-module.d.ts.map +1 -0
  713. package/types/x-modules/related-tags/components/related-tags.vue.d.ts +3 -3
  714. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +5 -5
  715. package/types/x-modules/search/components/banners-list.vue.d.ts +3 -3
  716. package/types/x-modules/search/components/partial-results-list.vue.d.ts +3 -3
  717. package/types/x-modules/search/components/promoteds-list.vue.d.ts +3 -3
  718. package/types/x-modules/search/components/results-list.vue.d.ts +3 -3
  719. package/types/x-modules/search/components/sort-dropdown.vue.d.ts +1 -1
  720. package/types/x-modules/search/config.types.d.ts +2 -0
  721. package/types/x-modules/search/config.types.d.ts.map +1 -1
  722. package/types/x-modules/search/events.types.d.ts +4 -0
  723. package/types/x-modules/search/events.types.d.ts.map +1 -1
  724. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
  725. package/types/x-modules/search/store/actions/save-search-response.action.d.ts.map +1 -1
  726. package/types/x-modules/search/store/module.d.ts +2 -0
  727. package/types/x-modules/search/store/module.d.ts.map +1 -1
  728. package/types/x-modules/search/store/types.d.ts +9 -1
  729. package/types/x-modules/search/store/types.d.ts.map +1 -1
  730. package/types/x-modules/search/wiring.d.ts +4 -0
  731. package/types/x-modules/search/wiring.d.ts.map +1 -1
  732. package/types/x-modules/search-box/components/search-input-placeholder.vue.d.ts +3 -3
  733. package/types/x-modules/semantic-queries/store/getters/index.d.ts +1 -0
  734. package/types/x-modules/semantic-queries/store/getters/index.d.ts.map +1 -1
  735. package/types/x-modules/semantic-queries/store/getters/normalized-query.getter.d.ts +1 -1
  736. package/types/x-modules/semantic-queries/store/getters/request.getter.d.ts +2 -1
  737. package/types/x-modules/semantic-queries/store/getters/request.getter.d.ts.map +1 -1
  738. package/types/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.d.ts +13 -0
  739. package/types/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.d.ts.map +1 -0
  740. package/types/x-modules/semantic-queries/store/module.d.ts.map +1 -1
  741. package/types/x-modules/semantic-queries/store/types.d.ts +13 -1
  742. package/types/x-modules/semantic-queries/store/types.d.ts.map +1 -1
  743. package/types/x-modules/semantic-queries/wiring.d.ts +3 -0
  744. package/types/x-modules/semantic-queries/wiring.d.ts.map +1 -1
  745. package/types/x-modules/tagging/components/tagging.vue.d.ts +14 -12
  746. package/types/x-modules/tagging/components/tagging.vue.d.ts.map +1 -1
  747. package/types/x-modules/tagging/config.types.d.ts +3 -3
  748. package/types/x-modules/tagging/config.types.d.ts.map +1 -1
  749. package/types/x-modules/tagging/events.types.d.ts +2 -2
  750. package/types/x-modules/tagging/service/{pdp-add-to-cart.service.d.ts → external-tagging.service.d.ts} +31 -13
  751. package/types/x-modules/tagging/service/external-tagging.service.d.ts.map +1 -0
  752. package/types/x-modules/tagging/service/index.d.ts +1 -1
  753. package/types/x-modules/tagging/service/index.d.ts.map +1 -1
  754. package/types/x-modules/tagging/service/types.d.ts +13 -4
  755. package/types/x-modules/tagging/service/types.d.ts.map +1 -1
  756. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  757. package/types/x-modules/tagging/wiring.d.ts +54 -2
  758. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  759. package/types/x-modules/url/components/url-handler.vue.d.ts.map +1 -1
  760. package/types/x-modules/url/store/getters/url-params.getter.d.ts +2 -3
  761. package/types/x-modules/url/store/getters/url-params.getter.d.ts.map +1 -1
  762. package/types/x-modules/url/store/initial-state.d.ts.map +1 -1
  763. package/types/x-modules/url/store/module.d.ts.map +1 -1
  764. package/types/x-modules/url/store/types.d.ts +6 -0
  765. package/types/x-modules/url/store/types.d.ts.map +1 -1
  766. package/types/x-modules/url/wiring.d.ts +9 -0
  767. package/types/x-modules/url/wiring.d.ts.map +1 -1
  768. package/types/x-modules/x-modules.types.d.ts +2 -0
  769. package/types/x-modules/x-modules.types.d.ts.map +1 -1
  770. package/url/index.js +1 -1
  771. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragekey.md +0 -11
  772. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragettlms.md +0 -11
  773. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.instance.md +0 -13
  774. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.localstorageservice.md +0 -11
  775. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.md +0 -41
  776. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.result_clicked_id_key.md +0 -13
  777. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.sessionstorageservice.md +0 -11
  778. package/docs/API-reference/api/x-components.pdpaddtocartservice.md +0 -22
  779. package/docs/API-reference/api/x-components.taggingconfig.clickedresultstoragettlms.md +0 -13
  780. package/docs/API-reference/api/x-components.usestore.md +0 -19
  781. package/docs/assets/features/overview-my-history.svg +0 -279
  782. package/docs/assets/features/overview-product-results-card.svg +0 -128
  783. package/docs/assets/interface/build-search-ui.svg +0 -167
  784. package/docs/assets/interface/experience-search-intro.svg +0 -1
  785. package/docs/assets/interface/integration-guide.svg +0 -1
  786. package/docs/assets/interface/integration-video.png +0 -0
  787. package/docs/assets/interface/x-architecture.svg +0 -1
  788. package/docs/assets/interface/x-empathize.gif +0 -0
  789. package/docs/assets/interface/x-facets.gif +0 -0
  790. package/docs/assets/interface/x-facets.svg +0 -189
  791. package/docs/assets/interface/x-history-queries.gif +0 -0
  792. package/docs/assets/interface/x-id-results.gif +0 -0
  793. package/docs/assets/interface/x-next-queries.gif +0 -0
  794. package/docs/assets/interface/x-popular-searches.gif +0 -0
  795. package/docs/assets/interface/x-query-suggestions.gif +0 -0
  796. package/docs/assets/interface/x-recommendations.gif +0 -0
  797. package/docs/assets/interface/x-recommendations.svg +0 -472
  798. package/docs/assets/interface/x-related-tags.gif +0 -0
  799. package/docs/assets/interface/x-results-layout.svg +0 -259
  800. package/docs/assets/interface/x-search-box-elements.svg +0 -1
  801. package/docs/assets/interface/x-search-box.svg +0 -60
  802. package/docs/build-search-ui/README.md +0 -127
  803. package/docs/build-search-ui/sidebar.js +0 -7
  804. package/docs/build-search-ui/web-archetype-development-guide.md +0 -186
  805. package/docs/build-search-ui/web-archetype-integration-guide.md +0 -458
  806. package/docs/build-search-ui/web-how-to-use-x-components-guide.md +0 -200
  807. package/docs/build-search-ui/web-x-architecture.md +0 -83
  808. package/docs/build-search-ui/web-x-components-development-guide.md +0 -157
  809. package/docs/experience-search-and-discovery/README.md +0 -132
  810. package/docs/experience-search-and-discovery/empathize.md +0 -119
  811. package/docs/experience-search-and-discovery/facets-and-filters.md +0 -154
  812. package/docs/experience-search-and-discovery/history-queries.md +0 -70
  813. package/docs/experience-search-and-discovery/id-results.md +0 -49
  814. package/docs/experience-search-and-discovery/my-history.md +0 -60
  815. package/docs/experience-search-and-discovery/next-queries.md +0 -72
  816. package/docs/experience-search-and-discovery/popular-searches.md +0 -50
  817. package/docs/experience-search-and-discovery/product-results-ui.md +0 -82
  818. package/docs/experience-search-and-discovery/query-suggestions.md +0 -48
  819. package/docs/experience-search-and-discovery/recommendations.md +0 -134
  820. package/docs/experience-search-and-discovery/related-tags.md +0 -66
  821. package/docs/experience-search-and-discovery/search-box.md +0 -99
  822. package/docs/experience-search-and-discovery/serp-ui.md +0 -125
  823. package/docs/experience-search-and-discovery/sidebar.js +0 -17
  824. package/docs/experience-search-and-discovery/web-local-storage.md +0 -30
  825. package/docs/input-status-machine-state.png +0 -0
  826. package/js/composables/use-store.js +0 -15
  827. package/js/composables/use-store.js.map +0 -1
  828. package/js/utils/options-api.js +0 -4
  829. package/js/utils/options-api.js.map +0 -1
  830. package/js/x-modules/tagging/service/pdp-add-to-cart.service.js.map +0 -1
  831. package/types/utils/options-api.d.ts +0 -3
  832. package/types/utils/options-api.d.ts.map +0 -1
  833. package/types/x-modules/tagging/service/pdp-add-to-cart.service.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/search/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { isStringEmpty } from '../../../utils/string';\nimport { searchXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the search module.\n *\n * @internal\n */\nexport const searchEmitters = createStoreEmitters(searchXStoreModule, {\n FacetsChanged: {\n selector: state => state.facets,\n filter(newValue, oldValue): boolean {\n return newValue.length !== 0 || oldValue.length !== 0;\n }\n },\n PageChanged: state => state.page,\n ResultsChanged: state => state.results,\n SearchRequestChanged: (_, getters) => getters.request,\n SearchRequestUpdated: (_, getters) => getters.request,\n SearchResponseChanged: {\n selector: (state, getters) => {\n return {\n request: getters.request!,\n status: state.status,\n banners: state.banners,\n facets: state.facets,\n partialResults: state.partialResults,\n promoteds: state.promoteds,\n queryTagging: state.queryTagging,\n displayTagging: state.displayTagging,\n redirections: state.redirections,\n results: state.results,\n spellcheck: state.spellcheckedQuery,\n totalResults: state.totalResults\n };\n },\n filter: (newValue, oldValue) => {\n return (\n newValue.status !== oldValue.status && oldValue.status === 'loading' && !!newValue.request\n );\n }\n },\n SearchTaggingChanged: {\n selector: state => state.queryTagging,\n filter: ({ url }) => !isStringEmpty(url)\n },\n SpellcheckChanged: state => state.spellcheckedQuery,\n SortChanged: state => state.sort\n});\n"],"names":[],"mappings":";;;;AAIA;;;;AAIG;AACU,MAAA,cAAc,GAAG,mBAAmB,CAAC,kBAAkB,EAAE;AACpE,IA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AA;AACD,IAAA,oBAAoB,EAAE;AACpB,QAAA,QAAQ,EAAE,KAAK,IAAI,KAAK,CAAC,YAAY;AACrC,QAAA,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC;AACzC,KAAA;AACD,IAAA,iBAAiB,EAAE,KAAK,IAAI,KAAK,CAAC,iBAAiB;AACnD,IAAA,WAAW,EAAE,KAAK,IAAI,KAAK,CAAC,IAAI;AACjC,CAAA;;;;"}
1
+ {"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/search/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { isStringEmpty } from '../../../utils/string';\nimport { searchXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the search module.\n *\n * @internal\n */\nexport const searchEmitters = createStoreEmitters(searchXStoreModule, {\n FacetsChanged: {\n selector: state => state.facets,\n filter(newValue, oldValue): boolean {\n return newValue.length !== 0 || oldValue.length !== 0;\n }\n },\n PageChanged: state => state.page,\n ResultsChanged: state => state.results,\n SearchRequestChanged: (_, getters) => getters.request,\n SearchRequestUpdated: (_, getters) => getters.request,\n SearchResponseChanged: {\n selector: (state, getters) => {\n return {\n request: getters.request!,\n status: state.status,\n banners: state.banners,\n facets: state.facets,\n partialResults: state.partialResults,\n promoteds: state.promoteds,\n queryTagging: state.queryTagging,\n displayTagging: state.displayTagging,\n redirections: state.redirections,\n results: state.results,\n spellcheck: state.spellcheckedQuery,\n totalResults: state.totalResults\n };\n },\n filter: (newValue, oldValue) => {\n return (\n newValue.status !== oldValue.status && oldValue.status === 'loading' && !!newValue.request\n );\n }\n },\n SearchTaggingChanged: {\n selector: state => state.queryTagging,\n filter: ({ url }) => !isStringEmpty(url)\n },\n SpellcheckChanged: state => state.spellcheckedQuery,\n SortChanged: state => state.sort\n});\n"],"names":[],"mappings":";;;;;AAIA;;;;AAIG;AACU,MAAA,cAAc,GAAG,mBAAmB,CAAC,kBAAkB,EAAE;AACpE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,KAAA;AACD,IAAA,oBAAoB,EAAE;AACpB,QAAA,QAAQ,EAAE,KAAK,IAAI,KAAK,CAAC,YAAY;AACrC,QAAA,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC;AACzC,KAAA;AACD,IAAA,iBAAiB,EAAE,KAAK,IAAI,KAAK,CAAC,iBAAiB;AACnD,IAAA,WAAW,EAAE,KAAK,IAAI,KAAK,CAAC,IAAI;AACjC,CAAA;;;;"}
@@ -1,8 +1,9 @@
1
1
  import { isFacetFilter } from '@empathyco/x-types';
2
2
  import { setQuery } from '../../../store/utils/query.utils.js';
3
+ import { setConfig, mergeConfig } from '../../../store/utils/config-store.utils.js';
4
+ import '@empathyco/x-utils';
3
5
  import { setStatus } from '../../../store/utils/status-store.utils.js';
4
6
  import { groupItemsBy } from '../../../utils/array.js';
5
- import { setConfig, mergeConfig } from '../../../store/utils/config-store.utils.js';
6
7
  import { UNKNOWN_FACET_KEY } from '../../facets/store/constants.js';
7
8
  import { cancelFetchAndSaveSearchResponse, fetchAndSaveSearchResponse } from './actions/fetch-and-save-search-response.action.js';
8
9
  import { fetchSearchResponse } from './actions/fetch-search-response.action.js';
@@ -25,7 +26,8 @@ const searchXStoreModule = {
25
26
  selectedFilters: {},
26
27
  params: {},
27
28
  config: {
28
- pageSize: 24
29
+ pageSize: 24,
30
+ pageMode: 'infinite_scroll'
29
31
  },
30
32
  status: 'initial',
31
33
  isNoResults: false,
@@ -112,6 +114,9 @@ const searchXStoreModule = {
112
114
  if (stateResult) {
113
115
  Object.assign(stateResult, result);
114
116
  }
117
+ },
118
+ setStats(state, stats) {
119
+ state.stats = stats;
115
120
  }
116
121
  },
117
122
  actions: {
@@ -156,7 +161,8 @@ function resettableState() {
156
161
  displayTagging: {
157
162
  url: '',
158
163
  params: {}
159
- }
164
+ },
165
+ stats: {}
160
166
  };
161
167
  }
162
168
 
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/search/store/module.ts"],"sourcesContent":["import { isFacetFilter } from '@empathyco/x-types';\nimport { setQuery } from '../../../store/utils/query.utils';\nimport { setStatus } from '../../../store';\nimport { groupItemsBy } from '../../../utils/array';\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils';\nimport { UNKNOWN_FACET_KEY } from '../../facets/store/constants';\nimport {\n cancelFetchAndSaveSearchResponse,\n fetchAndSaveSearchResponse,\n fetchSearchResponse,\n increasePageAppendingResults,\n resetRequestOnRefinement,\n saveSearchResponse\n} from './actions';\nimport { saveOrigin } from './actions/save-origin.action';\nimport { setUrlParams } from './actions/set-url-params.action';\nimport { query } from './getters/query.getter';\nimport { request } from './getters/request.getter';\nimport { SearchXStoreModule } from './types';\n\n/**\n * {@link XStoreModule} For the search module.\n *\n * @internal\n */\nexport const searchXStoreModule: SearchXStoreModule = {\n state: () => ({\n ...resettableState(),\n selectedFilters: {},\n params: {},\n config: {\n pageSize: 24\n },\n status: 'initial',\n isNoResults: false,\n fromNoResultsWithFilters: false\n }),\n getters: {\n request,\n query\n },\n mutations: {\n appendResults(state, results) {\n state.results = [...state.results, ...results];\n },\n resetState(state) {\n Object.assign(state, resettableState());\n },\n resetStateForReload(state) {\n const { query, facets, sort, page, ...resettable } = resettableState();\n Object.assign(state, resettable);\n },\n setQuery,\n setResults(state, results) {\n state.results = results;\n },\n setPartialResults(state, partialResults) {\n state.partialResults = partialResults;\n },\n setFacets(state, facets) {\n state.facets = facets;\n },\n setRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags;\n },\n setSelectedFilters(state, selectedFilters) {\n state.selectedFilters = groupItemsBy(selectedFilters, filter =>\n isFacetFilter(filter) ? filter.facetId : UNKNOWN_FACET_KEY\n );\n },\n setBanners(state, banners) {\n state.banners = banners;\n },\n setPromoteds(state, promoteds) {\n state.promoteds = promoteds;\n },\n setSpellcheck(state, spellcheckedQuery) {\n state.spellcheckedQuery = spellcheckedQuery;\n },\n setTotalResults(state, totalResults) {\n state.totalResults = totalResults;\n },\n setSort(state, sort) {\n state.sort = sort;\n },\n setPage(state, page) {\n state.page = page;\n },\n setConfig,\n mergeConfig,\n setIsAppendResults(state, isAppendResults) {\n state.isAppendResults = isAppendResults;\n },\n setIsNoResults(state, isNoResults) {\n state.isNoResults = isNoResults;\n },\n setFromNoResultsWithFilters(state, fromNoResultsWithFilters) {\n state.fromNoResultsWithFilters = fromNoResultsWithFilters;\n },\n setStatus,\n setParams(state, params) {\n state.params = params;\n },\n setOrigin(state, origin = null) {\n state.origin = origin;\n },\n setRedirections(state, redirections) {\n state.redirections = redirections;\n },\n setQueryTagging(state, queryTagging) {\n state.queryTagging = queryTagging;\n },\n setDisplayTagging(state, displayTagging) {\n state.displayTagging = displayTagging;\n },\n updateResult(state, result) {\n const stateResult = state.results.find(stateResult => result.id === stateResult.id);\n if (stateResult) {\n Object.assign(stateResult, result);\n }\n }\n },\n actions: {\n cancelFetchAndSaveSearchResponse,\n fetchSearchResponse,\n fetchAndSaveSearchResponse,\n increasePageAppendingResults,\n resetRequestOnRefinement,\n saveSearchResponse,\n setUrlParams,\n saveOrigin\n }\n};\n\n/**\n * Function to return the \"resettable\" part of the state. This will be used in the `resetState`\n * mutation to reset to the initial state.\n *\n * @returns The \"resettable\" part of the {@link SearchState}.\n *\n * @internal\n */\nexport function resettableState() {\n return {\n query: '',\n results: [],\n partialResults: [],\n facets: [],\n relatedTags: [],\n banners: [],\n promoteds: [],\n totalResults: 0,\n spellcheckedQuery: '',\n sort: '',\n page: 1,\n origin: null,\n isAppendResults: false,\n redirections: [],\n queryTagging: {\n url: '',\n params: {}\n },\n displayTagging: {\n url: '',\n params: {}\n }\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA;;;;AAIG;AACU,MAAA,kBAAkB,GAAuB;AACpD,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,GAAG,eAAe,EAAE;AACpB,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,MAAM,EAAE,EAAE;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EAAE;AACX,SAAA;AACD,QAAA,cAAc,EAAE;AACd,YAAA,GAAG,EAAE,EAAE;AACP,YAAA,MAAM,EAAE,EAAE;AACX,SAAA;KACF,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/search/store/module.ts"],"sourcesContent":["import { isFacetFilter, Stats } from '@empathyco/x-types';\nimport { setQuery } from '../../../store/utils/query.utils';\nimport { setStatus } from '../../../store';\nimport { groupItemsBy } from '../../../utils/array';\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils';\nimport { UNKNOWN_FACET_KEY } from '../../facets/store/constants';\nimport {\n cancelFetchAndSaveSearchResponse,\n fetchAndSaveSearchResponse,\n fetchSearchResponse,\n increasePageAppendingResults,\n resetRequestOnRefinement,\n saveSearchResponse\n} from './actions';\nimport { saveOrigin } from './actions/save-origin.action';\nimport { setUrlParams } from './actions/set-url-params.action';\nimport { query } from './getters/query.getter';\nimport { request } from './getters/request.getter';\nimport { SearchXStoreModule } from './types';\n\n/**\n * {@link XStoreModule} For the search module.\n *\n * @internal\n */\nexport const searchXStoreModule: SearchXStoreModule = {\n state: () => ({\n ...resettableState(),\n selectedFilters: {},\n params: {},\n config: {\n pageSize: 24,\n pageMode: 'infinite_scroll'\n },\n status: 'initial',\n isNoResults: false,\n fromNoResultsWithFilters: false\n }),\n getters: {\n request,\n query\n },\n mutations: {\n appendResults(state, results) {\n state.results = [...state.results, ...results];\n },\n resetState(state) {\n Object.assign(state, resettableState());\n },\n resetStateForReload(state) {\n const { query, facets, sort, page, ...resettable } = resettableState();\n Object.assign(state, resettable);\n },\n setQuery,\n setResults(state, results) {\n state.results = results;\n },\n setPartialResults(state, partialResults) {\n state.partialResults = partialResults;\n },\n setFacets(state, facets) {\n state.facets = facets;\n },\n setRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags;\n },\n setSelectedFilters(state, selectedFilters) {\n state.selectedFilters = groupItemsBy(selectedFilters, filter =>\n isFacetFilter(filter) ? filter.facetId : UNKNOWN_FACET_KEY\n );\n },\n setBanners(state, banners) {\n state.banners = banners;\n },\n setPromoteds(state, promoteds) {\n state.promoteds = promoteds;\n },\n setSpellcheck(state, spellcheckedQuery) {\n state.spellcheckedQuery = spellcheckedQuery;\n },\n setTotalResults(state, totalResults) {\n state.totalResults = totalResults;\n },\n setSort(state, sort) {\n state.sort = sort;\n },\n setPage(state, page) {\n state.page = page;\n },\n setConfig,\n mergeConfig,\n setIsAppendResults(state, isAppendResults) {\n state.isAppendResults = isAppendResults;\n },\n setIsNoResults(state, isNoResults) {\n state.isNoResults = isNoResults;\n },\n setFromNoResultsWithFilters(state, fromNoResultsWithFilters) {\n state.fromNoResultsWithFilters = fromNoResultsWithFilters;\n },\n setStatus,\n setParams(state, params) {\n state.params = params;\n },\n setOrigin(state, origin = null) {\n state.origin = origin;\n },\n setRedirections(state, redirections) {\n state.redirections = redirections;\n },\n setQueryTagging(state, queryTagging) {\n state.queryTagging = queryTagging;\n },\n setDisplayTagging(state, displayTagging) {\n state.displayTagging = displayTagging;\n },\n updateResult(state, result) {\n const stateResult = state.results.find(stateResult => result.id === stateResult.id);\n if (stateResult) {\n Object.assign(stateResult, result);\n }\n },\n setStats(state, stats) {\n state.stats = stats;\n }\n },\n actions: {\n cancelFetchAndSaveSearchResponse,\n fetchSearchResponse,\n fetchAndSaveSearchResponse,\n increasePageAppendingResults,\n resetRequestOnRefinement,\n saveSearchResponse,\n setUrlParams,\n saveOrigin\n }\n};\n\n/**\n * Function to return the \"resettable\" part of the state. This will be used in the `resetState`\n * mutation to reset to the initial state.\n *\n * @returns The \"resettable\" part of the {@link SearchState}.\n *\n * @internal\n */\nexport function resettableState() {\n return {\n query: '',\n results: [],\n partialResults: [],\n facets: [],\n relatedTags: [],\n banners: [],\n promoteds: [],\n totalResults: 0,\n spellcheckedQuery: '',\n sort: '',\n page: 1,\n origin: null,\n isAppendResults: false,\n redirections: [],\n queryTagging: {\n url: '',\n params: {}\n },\n displayTagging: {\n url: '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AAA,WAAW,EAAE,EAAE;AACf,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,SAAS,EAAE,EAAE;AACb,QAAA,YAAY,EAAE,CAAC;AACf,QAAA,iBAAiB,EAAE,EAAE;AACrB,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,MAAM,EAAE,IAAI;AACZ,QAAA,eAAe,EAAE,KAAK;AACtB,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,YAAY,EAAE;AACZ,YAAA,GAAG,EAAE,EAAE;AACP,YAAA,MAAM,EAAE,EAAE;AACX,SAAA;AACD,QAAA,cAAc,EAAE;AACd,YAAA,GAAG,EAAE,EAAE;AACP,YAAA,MAAM,EAAE,EAAE;AACX,SAAA;AACD,QAAA,KAAK,EAAE,EAAW;KACnB,CAAC;AACJ;;;;"}
@@ -251,6 +251,10 @@ const searchWiring = createWiring({
251
251
  },
252
252
  UserSelectedAHistoryQuery: {
253
253
  setSearchSelectedFiltersFromHistoryQuery
254
+ },
255
+ UserSelectedAPage: {
256
+ setSearchPage,
257
+ resetAppending
254
258
  }
255
259
  });
256
260
 
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/search/wiring.ts"],"sourcesContent":["import {\n createWiring,\n filterTruthyPayload,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload,\n WirePayload\n} from '../../wiring';\nimport { createRawFilters } from '../../utils';\nimport { InternalSearchRequest } from './types';\n\n/**\n * `search` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'search';\n\n/**\n * WireCommit for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName);\n\n/**\n * WireCommit without Payload for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName);\n\n/**\n * WireDispatch for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName);\n\n/**\n * WireDispatchWithoutPayload for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName);\n\n/**\n * Cancels the {@link SearchActions.fetchAndSaveSearchResponse} request promise.\n *\n * @public\n */\nexport const cancelFetchAndSaveSearchResponseWire = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveSearchResponse'\n);\n\n/**\n * Sets the search state `origin`.\n *\n * @public\n */\nexport const saveOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata);\n\n/**\n * Requests and stores the search response.\n *\n * @public\n */\nexport const fetchAndSaveSearchResponseWire = wireDispatch('fetchAndSaveSearchResponse');\n\n/**\n * Resets the search state `spellcheckedQuery` to its initial value, an empty string.\n *\n * @public\n */\nexport const resetSpellcheckQuery = wireCommit('setSpellcheck', '');\n\n/**\n * Sets the search state `relatedTags`.\n *\n * @public\n */\nexport const setRelatedTags = wireCommit('setRelatedTags');\n\n/**\n * Sets the search state `query`.\n *\n * @public\n */\nexport const setSearchQuery = wireCommit('setQuery');\n\n/**\n * Clears the search state `query`.\n *\n * @public\n */\nexport const clearSearchQuery = wireCommit('setQuery', '');\n\n/**\n * Sets the search state `selectedFilters`.\n *\n * @public\n */\nexport const setSelectedFilters = wireCommit('setSelectedFilters');\n\n/**\n * Sets the search state `sort`.\n *\n * @public\n */\nexport const setSort = wireCommit('setSort');\n\n/**\n * Sets the search state `query`.\n *\n * @public\n */\nexport const setUrlParams = wireDispatch('setUrlParams');\n\n/**\n * Sets the search state `page`.\n *\n * @public\n */\nexport const setSearchPage = wireCommit('setPage');\n\n/**\n * Sets the search state `params`.\n *\n * @public\n */\nexport const setSearchExtraParams = wireCommit('setParams');\n\n/**\n * Resets the search state to reload the current search.\n *\n * @public\n */\nexport const resetStateForReloadWire = wireCommitWithoutPayload('resetStateForReload');\n\n/**\n * Resets the search state `isNoResults`.\n *\n * @public\n */\nexport const resetIsNoResults = wireCommit('setIsNoResults', false);\n\n/**\n * Resets the search state `fromNoResultsWithFilters`.\n *\n * @public\n */\nexport const resetFromNoResultsWithFilters = wireCommit('setFromNoResultsWithFilters', false);\n\n/**\n * Increases the current search state `page` by one.\n *\n * @public\n */\nexport const increasePageAppendingResultsWire = wireDispatchWithoutPayload(\n 'increasePageAppendingResults'\n);\n\n/**\n * Resets the search state `isAppendingResults`.\n *\n * @public\n */\nexport const resetAppending = wireCommit('setIsAppendResults', false);\n\n/**\n * Resets the {@link SearchGetters.request} parameters when refining request and before the actual\n * request is launched.\n *\n * @public\n */\nexport const resetRequestOnRefinementWire = wireDispatch(\n 'resetRequestOnRefinement',\n ({ eventPayload: newRequest, metadata: { oldValue } }: WirePayload<InternalSearchRequest>) => ({\n newRequest,\n oldRequest: oldValue as InternalSearchRequest\n })\n);\n\n/**\n * Resets the search state when the request is changed to null. See the\n * {@link searchXStoreModule} for details.\n *\n * @public\n */\nexport const resetStateIfNoRequestWire = filterTruthyPayload<InternalSearchRequest | null>(\n wireCommitWithoutPayload('resetState')\n);\n\n/**\n * Sets the search state `query` with the selectedQueryPreview's query.\n *\n * @public\n */\nexport const setSearchQueryFromPreview = wireCommit(\n 'setQuery',\n ({ eventPayload: { query } }) => query\n);\n\n/**\n * Sets the search state `params` with the selectedQueryPreview's extraParams.\n *\n * @public\n */\nexport const setSearchExtraParamsFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { extraParams } }) => extraParams\n);\n\n/**\n * Sets the search state `selectedFilters` with the selectedQueryPreview's filters.\n *\n * @public\n */\nexport const setSearchSelectedFiltersFromPreview = wireCommit(\n 'setSelectedFilters',\n ({ eventPayload: { filters } }) => (filters ? createRawFilters(filters) : [])\n);\n\n/**\n * Sets the search state `selectedFilters` with a selectedHistoryQuery's filters.\n *\n * @public\n */\nexport const setSearchSelectedFiltersFromHistoryQuery = wireCommit(\n 'setSelectedFilters',\n ({ eventPayload: { selectedFilters } }) => selectedFilters ?? []\n);\n\n/**\n * Search wiring.\n *\n * @internal\n */\nexport const searchWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n saveOriginWire\n },\n UserAcceptedAQuery: {\n setSearchQuery,\n saveOriginWire\n },\n UserAcceptedSpellcheckQuery: {\n resetSpellcheckQuery\n },\n UserClearedQuery: {\n setSearchQuery,\n cancelFetchAndSaveSearchResponseWire,\n resetFromNoResultsWithFilters,\n resetIsNoResults\n },\n UserClickedASort: {\n setSort\n },\n UserPickedARelatedTag: {\n saveOriginWire\n },\n UserReachedResultsListEnd: {\n increasePageAppendingResultsWire\n },\n SearchRequestUpdated: {\n resetStateIfNoRequestWire,\n fetchAndSaveSearchResponseWire\n },\n SearchRequestChanged: {\n resetRequestOnRefinementWire\n },\n SelectedRelatedTagsChanged: {\n setRelatedTags\n },\n SelectedFiltersForRequestChanged: {\n setSelectedFilters\n },\n ResultsChanged: {\n resetAppending\n },\n ReloadSearchRequested: {\n resetStateForReloadWire\n },\n SelectedSortProvided: {\n setSort\n },\n ExtraParamsChanged: {\n setSearchExtraParams\n },\n UserClickedCloseX: {\n clearSearchQuery\n },\n UserClickedOutOfMainModal: {\n clearSearchQuery\n },\n UserAcceptedAQueryPreview: {\n setSearchQueryFromPreview,\n setSearchExtraParamsFromPreview,\n setSearchSelectedFiltersFromPreview,\n saveOriginWire\n },\n QueryPreviewUnselected: {\n setSearchExtraParams\n },\n UserSelectedAHistoryQuery: {\n setSearchSelectedFiltersFromHistoryQuery\n }\n});\n"],"names":[],"mappings":";;;;;;AAYA;;;;AAIG;AACH,MAAM,UAAU,GAAG,QAAQ,CAAC;AAE5B;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAEpD;;;;AAIG;AACH,MAAM,wBAAwB,GAAG,kCAAkC,CAAC,UAAU,CAAC,CAAC;AAEhF;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAExD;;;;AAIG;AACH,MA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A;AACD,IAAA,qBAAqB,EAAE;QACrB,cAAc;AACf,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,gCAAgC;AACjC,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,yBAAyB;QACzB,8BAA8B;AAC/B,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,4BAA4B;AAC7B,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,cAAc;AACf,KAAA;AACD,IAAA,gCAAgC,EAAE;QAChC,kBAAkB;AACnB,KAAA;AACD,IAAA,cAAc,EAAE;QACd,cAAc;AACf,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,uBAAuB;AACxB,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,OAAO;AACR,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,oBAAoB;AACrB,KAAA;AACD,IAAA,iBAAiB,EAAE;QACjB,gBAAgB;AACjB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,gBAAgB;AACjB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,yBAAyB;QACzB,+BAA+B;QAC/B,mCAAmC;QACnC,cAAc;AACf,KAAA;AACD,IAAA,sBAAsB,EAAE;QACtB,oBAAoB;AACrB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,wCAAwC;AACzC,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/search/wiring.ts"],"sourcesContent":["import {\n createWiring,\n filterTruthyPayload,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload,\n WirePayload\n} from '../../wiring';\nimport { createRawFilters } from '../../utils';\nimport { InternalSearchRequest } from './types';\n\n/**\n * `search` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'search';\n\n/**\n * WireCommit for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName);\n\n/**\n * WireCommit without Payload for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName);\n\n/**\n * WireDispatch for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName);\n\n/**\n * WireDispatchWithoutPayload for {@link SearchXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName);\n\n/**\n * Cancels the {@link SearchActions.fetchAndSaveSearchResponse} request promise.\n *\n * @public\n */\nexport const cancelFetchAndSaveSearchResponseWire = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveSearchResponse'\n);\n\n/**\n * Sets the search state `origin`.\n *\n * @public\n */\nexport const saveOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata);\n\n/**\n * Requests and stores the search response.\n *\n * @public\n */\nexport const fetchAndSaveSearchResponseWire = wireDispatch('fetchAndSaveSearchResponse');\n\n/**\n * Resets the search state `spellcheckedQuery` to its initial value, an empty string.\n *\n * @public\n */\nexport const resetSpellcheckQuery = wireCommit('setSpellcheck', '');\n\n/**\n * Sets the search state `relatedTags`.\n *\n * @public\n */\nexport const setRelatedTags = wireCommit('setRelatedTags');\n\n/**\n * Sets the search state `query`.\n *\n * @public\n */\nexport const setSearchQuery = wireCommit('setQuery');\n\n/**\n * Clears the search state `query`.\n *\n * @public\n */\nexport const clearSearchQuery = wireCommit('setQuery', '');\n\n/**\n * Sets the search state `selectedFilters`.\n *\n * @public\n */\nexport const setSelectedFilters = wireCommit('setSelectedFilters');\n\n/**\n * Sets the search state `sort`.\n *\n * @public\n */\nexport const setSort = wireCommit('setSort');\n\n/**\n * Sets the search state `query`.\n *\n * @public\n */\nexport const setUrlParams = wireDispatch('setUrlParams');\n\n/**\n * Sets the search state `page`.\n *\n * @public\n */\nexport const setSearchPage = wireCommit('setPage');\n\n/**\n * Sets the search state `params`.\n *\n * @public\n */\nexport const setSearchExtraParams = wireCommit('setParams');\n\n/**\n * Resets the search state to reload the current search.\n *\n * @public\n */\nexport const resetStateForReloadWire = wireCommitWithoutPayload('resetStateForReload');\n\n/**\n * Resets the search state `isNoResults`.\n *\n * @public\n */\nexport const resetIsNoResults = wireCommit('setIsNoResults', false);\n\n/**\n * Resets the search state `fromNoResultsWithFilters`.\n *\n * @public\n */\nexport const resetFromNoResultsWithFilters = wireCommit('setFromNoResultsWithFilters', false);\n\n/**\n * Increases the current search state `page` by one.\n *\n * @public\n */\nexport const increasePageAppendingResultsWire = wireDispatchWithoutPayload(\n 'increasePageAppendingResults'\n);\n\n/**\n * Resets the search state `isAppendingResults`.\n *\n * @public\n */\nexport const resetAppending = wireCommit('setIsAppendResults', false);\n\n/**\n * Resets the {@link SearchGetters.request} parameters when refining request and before the actual\n * request is launched.\n *\n * @public\n */\nexport const resetRequestOnRefinementWire = wireDispatch(\n 'resetRequestOnRefinement',\n ({ eventPayload: newRequest, metadata: { oldValue } }: WirePayload<InternalSearchRequest>) => ({\n newRequest,\n oldRequest: oldValue as InternalSearchRequest\n })\n);\n\n/**\n * Resets the search state when the request is changed to null. See the\n * {@link searchXStoreModule} for details.\n *\n * @public\n */\nexport const resetStateIfNoRequestWire = filterTruthyPayload<InternalSearchRequest | null>(\n wireCommitWithoutPayload('resetState')\n);\n\n/**\n * Sets the search state `query` with the selectedQueryPreview's query.\n *\n * @public\n */\nexport const setSearchQueryFromPreview = wireCommit(\n 'setQuery',\n ({ eventPayload: { query } }) => query\n);\n\n/**\n * Sets the search state `params` with the selectedQueryPreview's extraParams.\n *\n * @public\n */\nexport const setSearchExtraParamsFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { extraParams } }) => extraParams\n);\n\n/**\n * Sets the search state `selectedFilters` with the selectedQueryPreview's filters.\n *\n * @public\n */\nexport const setSearchSelectedFiltersFromPreview = wireCommit(\n 'setSelectedFilters',\n ({ eventPayload: { filters } }) => (filters ? createRawFilters(filters) : [])\n);\n\n/**\n * Sets the search state `selectedFilters` with a selectedHistoryQuery's filters.\n *\n * @public\n */\nexport const setSearchSelectedFiltersFromHistoryQuery = wireCommit(\n 'setSelectedFilters',\n ({ eventPayload: { selectedFilters } }) => selectedFilters ?? []\n);\n\n/**\n * Search wiring.\n *\n * @internal\n */\nexport const searchWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n saveOriginWire\n },\n UserAcceptedAQuery: {\n setSearchQuery,\n saveOriginWire\n },\n UserAcceptedSpellcheckQuery: {\n resetSpellcheckQuery\n },\n UserClearedQuery: {\n setSearchQuery,\n cancelFetchAndSaveSearchResponseWire,\n resetFromNoResultsWithFilters,\n resetIsNoResults\n },\n UserClickedASort: {\n setSort\n },\n UserPickedARelatedTag: {\n saveOriginWire\n },\n UserReachedResultsListEnd: {\n increasePageAppendingResultsWire\n },\n SearchRequestUpdated: {\n resetStateIfNoRequestWire,\n fetchAndSaveSearchResponseWire\n },\n SearchRequestChanged: {\n resetRequestOnRefinementWire\n },\n SelectedRelatedTagsChanged: {\n setRelatedTags\n },\n SelectedFiltersForRequestChanged: {\n setSelectedFilters\n },\n ResultsChanged: {\n resetAppending\n },\n ReloadSearchRequested: {\n resetStateForReloadWire\n },\n SelectedSortProvided: {\n setSort\n },\n ExtraParamsChanged: {\n setSearchExtraParams\n },\n UserClickedCloseX: {\n clearSearchQuery\n },\n UserClickedOutOfMainModal: {\n clearSearchQuery\n },\n UserAcceptedAQueryPreview: {\n setSearchQueryFromPreview,\n setSearchExtraParamsFromPreview,\n setSearchSelectedFiltersFromPreview,\n saveOriginWire\n },\n QueryPreviewUnselected: {\n setSearchExtraParams\n },\n UserSelectedAHistoryQuery: {\n setSearchSelectedFiltersFromHistoryQuery\n },\n UserSelectedAPage: {\n setSearchPage,\n resetAppending\n }\n});\n"],"names":[],"mappings":";;;;;;AAYA;;;;AAIG;AACH,MAAM,UAAU,GAAG,QAAQ,CAAC;AAE5B;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAEpD;;;;AAI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AoB;AACrB,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,cAAc;QACd,oCAAoC;QACpC,6BAA6B;QAC7B,gBAAgB;AACjB,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,OAAO;AACR,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,cAAc;AACf,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,gCAAgC;AACjC,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,yBAAyB;QACzB,8BAA8B;AAC/B,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,4BAA4B;AAC7B,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,cAAc;AACf,KAAA;AACD,IAAA,gCAAgC,EAAE;QAChC,kBAAkB;AACnB,KAAA;AACD,IAAA,cAAc,EAAE;QACd,cAAc;AACf,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,uBAAuB;AACxB,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,OAAO;AACR,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,oBAAoB;AACrB,KAAA;AACD,IAAA,iBAAiB,EAAE;QACjB,gBAAgB;AACjB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,gBAAgB;AACjB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,yBAAyB;QACzB,+BAA+B;QAC/B,mCAAmC;QACnC,cAAc;AACf,KAAA;AACD,IAAA,sBAAsB,EAAE;QACtB,oBAAoB;AACrB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,wCAAwC;AACzC,KAAA;AACD,IAAA,iBAAiB,EAAE;QACjB,aAAa;QACb,cAAc;AACf,KAAA;AACF,CAAA;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './clear-search-input.vue2.js';
2
- import { resolveComponent, openBlock, createBlock, normalizeClass, withCtx, createCommentVNode, renderSlot, createTextVNode } from 'vue';
2
+ import { resolveComponent, openBlock, createBlock, normalizeClass, withCtx, renderSlot, createTextVNode } 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) {
@@ -10,7 +10,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
10
10
  "data-test": "clear-search-input"
11
11
  }, {
12
12
  default: withCtx(() => [
13
- createCommentVNode(" @slot _Required_. Button content (text, icon, or both) "),
14
13
  renderSlot(_ctx.$slots, "default", {}, () => [
15
14
  createTextVNode("\u2715")
16
15
  ])
@@ -1 +1 @@
1
- {"version":3,"file":"clear-search-input.vue.js","sources":["../../../../../src/x-modules/search-box/components/clear-search-input.vue"],"sourcesContent":["<template>\n <BaseEventButton\n class=\"x-clear-search-input x-button\"\n :class=\"dynamicClasses\"\n :events=\"clearSearchInputEvents\"\n data-test=\"clear-search-input\"\n >\n <!-- @slot _Required_. Button content (text, icon, or both) -->\n <slot>✕</slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, computed, ref } from 'vue';\n import BaseEventButton from '../../../components/base-event-button.vue';\n import { VueCSSClasses } from '../../../utils/types';\n import { useState } from '../../../composables/use-state';\n import { searchBoxXModule } from '../x-module';\n\n /**\n * This component renders a button to delete the current query.\n *\n * @remarks\n * A button that when pressed emits the {@link SearchBoxXEvents.UserPressedClearSearchBoxButton}\n * and {@link SearchBoxXEvents.UserClearedQuery} events, expressing the user intention to clear\n * the current query.\n * It also adds `x-clear-search-input--has-empty-query` as class when there is no query.\n *\n * @public\n */\n export default defineComponent({\n name: 'ClearSearchInput',\n components: { BaseEventButton },\n xModule: searchBoxXModule.name,\n setup: function () {\n const { query } = useState('searchBox', ['query']);\n\n /**\n * The events dictionary that are going to be emitted when the button is pressed.\n *\n * @internal\n */\n const clearSearchInputEvents = ref({\n UserPressedClearSearchBoxButton: undefined\n });\n\n const isQueryEmpty = computed(() => query.value.length === 0);\n\n const dynamicClasses = computed<VueCSSClasses>(() => ({\n 'x-clear-search-input--has-empty-query': isQueryEmpty.value\n }));\n\n return {\n dynamicClasses,\n clearSearchInputEvents\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`UserPressedClearSearchBoxButton`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserClearedQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n## See it in action\n\nHere a basic example of how the clear button is rendered.\n\n_Type any term in the input field and then click the Clear button to try it out!_\n\n```vue live\n<template>\n <div style=\"display: flex;\">\n <SearchInput />\n <ClearSearchInput />\n </div>\n</template>\n\n<script>\n import { ClearSearchInput, SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'ClearSearchInputDemo',\n components: {\n ClearSearchInput,\n SearchInput\n }\n };\n</script>\n```\n\n### Play with default slot\n\nIn this example, a custom text is passed in the default slot instead of the default text to\ncustomize the button content.\n\n_Click the icon button to try it out!_\n\n```vue live\n<template>\n <ClearSearchInput>Clear</ClearSearchInput>\n</template>\n\n<script>\n import { ClearSearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'ClearSearchInputDemo',\n components: {\n ClearSearchInput\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, the `UserPressedClearSearchBoxButton` event is implemented, triggering the message\n“clear” when the clear search input button is clicked.\n\n_Click the Clear button to try it out!_\n\n```vue live\n<template>\n <div>\n <ClearSearchInput @UserPressedClearSearchBoxButton=\"message = 'clear'\">Clear</ClearSearchInput>\n {{ message }}\n </div>\n</template>\n\n<script>\n import { ClearSearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'ClearSearchInputDemo',\n components: {\n ClearSearchInput\n },\n data() {\n return {\n message: ''\n };\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. Commonly, the `ClearSearchInput`\ncomponent communicates with the [`SearchInput`](./search-input.md), deleting the search term\nentered.\n\n_Type any term in the input field and then click the icon button to try it out!_\n\n```vue live\n<template>\n <div style=\"display: flex;\">\n <SearchInput />\n <ClearSearchInput />\n </div>\n</template>\n\n<script>\n import { SearchInput, ClearSearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'ClearSearchInputDemo',\n components: {\n SearchInput,\n ClearSearchInput\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_withCtx","_createCommentVNode","_renderSlot"],"mappings":";;;;;AASoB,EAAA,MAAA,0BAAA,GAAAA,gBAAA,CAAA,iBAAA,CAAA,CAAA;AALT,EAAA,OAAAC,SAAA,EAAwB,EAAAC,WAAA,CAAA,0BAAA,EAAA;AAAA,IAC/B,sBAAU,CAAoB,+BAAA,EAAA,IAAA,CAAA,cAAA,CAAA,CAAA;AAAA,IAAA,MAAA,EAAA,IAAA,CAAA,sBAAA;AALlC,IAAA,WAAA,EAAA,oBAAA;AAAA,GAAA,EAAA;aAQIC,OAAc,CAAA,MAAA;AAAA,MAAAC,kBAAA,CAAR,0DAAC,CAAA;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAA,EAAA,MAAA;;AARX,OAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"clear-search-input.vue.js","sources":["../../../../../src/x-modules/search-box/components/clear-search-input.vue"],"sourcesContent":["<template>\n <BaseEventButton\n class=\"x-clear-search-input x-button\"\n :class=\"dynamicClasses\"\n :events=\"clearSearchInputEvents\"\n data-test=\"clear-search-input\"\n >\n <!-- @slot _Required_. Button content (text, icon, or both) -->\n <slot>✕</slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, computed, ref } from 'vue';\n import BaseEventButton from '../../../components/base-event-button.vue';\n import { VueCSSClasses } from '../../../utils/types';\n import { useState } from '../../../composables/use-state';\n import { searchBoxXModule } from '../x-module';\n\n /**\n * This component renders a button to delete the current query.\n *\n * @remarks\n * A button that when pressed emits the {@link SearchBoxXEvents.UserPressedClearSearchBoxButton}\n * and {@link SearchBoxXEvents.UserClearedQuery} events, expressing the user intention to clear\n * the current query.\n * It also adds `x-clear-search-input--has-empty-query` as class when there is no query.\n *\n * @public\n */\n export default defineComponent({\n name: 'ClearSearchInput',\n components: { BaseEventButton },\n xModule: searchBoxXModule.name,\n setup: function () {\n const { query } = useState('searchBox', ['query']);\n\n /**\n * The events dictionary that are going to be emitted when the button is pressed.\n *\n * @internal\n */\n const clearSearchInputEvents = ref({\n UserPressedClearSearchBoxButton: undefined\n });\n\n const isQueryEmpty = computed(() => query.value.length === 0);\n\n const dynamicClasses = computed<VueCSSClasses>(() => ({\n 'x-clear-search-input--has-empty-query': isQueryEmpty.value\n }));\n\n return {\n dynamicClasses,\n clearSearchInputEvents\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`UserPressedClearSearchBoxButton`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserClearedQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n## See it in action\n\nHere a basic example of how the clear button is rendered.\n\n_Type any term in the input field and then click the Clear button to try it out!_\n\n```vue live\n<template>\n <div style=\"display: flex;\">\n <SearchInput />\n <ClearSearchInput />\n </div>\n</template>\n\n<script>\n import { ClearSearchInput, SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'ClearSearchInputDemo',\n components: {\n ClearSearchInput,\n SearchInput\n }\n };\n</script>\n```\n\n### Play with default slot\n\nIn this example, a custom text is passed in the default slot instead of the default text to\ncustomize the button content.\n\n_Click the icon button to try it out!_\n\n```vue live\n<template>\n <ClearSearchInput>Clear</ClearSearchInput>\n</template>\n\n<script>\n import { ClearSearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'ClearSearchInputDemo',\n components: {\n ClearSearchInput\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, the `UserPressedClearSearchBoxButton` event is implemented, triggering the message\n“clear” when the clear search input button is clicked.\n\n_Click the Clear button to try it out!_\n\n```vue live\n<template>\n <div>\n <ClearSearchInput @UserPressedClearSearchBoxButton=\"message = 'clear'\">Clear</ClearSearchInput>\n {{ message }}\n </div>\n</template>\n\n<script>\n import { ClearSearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'ClearSearchInputDemo',\n components: {\n ClearSearchInput\n },\n data() {\n return {\n message: ''\n };\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. Commonly, the `ClearSearchInput`\ncomponent communicates with the [`SearchInput`](./search-input.md), deleting the search term\nentered.\n\n_Type any term in the input field and then click the icon button to try it out!_\n\n```vue live\n<template>\n <div style=\"display: flex;\">\n <SearchInput />\n <ClearSearchInput />\n </div>\n</template>\n\n<script>\n import { SearchInput, ClearSearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'ClearSearchInputDemo',\n components: {\n SearchInput,\n ClearSearchInput\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_withCtx","_renderSlot"],"mappings":";;;;;AASoB,EAAA,MAAA,0BAAA,GAAAA,gBAAA,CAAA,iBAAA,CAAA,CAAA;AALT,EAAA,OAAAC,SAAA,EAAwB,EAAAC,WAAA,CAAA,0BAAA,EAAA;AAAA,IAC/B,sBAAU,CAAoB,+BAAA,EAAA,IAAA,CAAA,cAAA,CAAA,CAAA;AAAA,IAAA,MAAA,EAAA,IAAA,CAAA,sBAAA;AALlC,IAAA,WAAA,EAAA,oBAAA;AAAA,GAAA,EAAA;aAAAC,OAQW,CAAA,MAAA;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAA,EAAA,MAAA;;AARX,OAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './search-button.vue2.js';
2
- import { openBlock, createElementBlock, normalizeClass, createCommentVNode, renderSlot, createElementVNode } from 'vue';
2
+ import { openBlock, createElementBlock, normalizeClass, renderSlot, createElementVNode } from 'vue';
3
3
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
4
4
 
5
5
  const _hoisted_1 = /* @__PURE__ */ createElementVNode(
@@ -19,7 +19,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
19
19
  "data-test": "search-button"
20
20
  },
21
21
  [
22
- createCommentVNode(" @slot _Required_. Button content (text, icon, or both) "),
23
22
  renderSlot(_ctx.$slots, "default", {}, () => [
24
23
  _hoisted_1
25
24
  ])
@@ -1 +1 @@
1
- {"version":3,"file":"search-button.vue.js","sources":["../../../../../src/x-modules/search-box/components/search-button.vue"],"sourcesContent":["<template>\n <button\n ref=\"buttonRef\"\n @click=\"emitEvents\"\n class=\"x-search-button x-button\"\n :class=\"dynamicClasses\"\n data-test=\"search-button\"\n >\n <!-- @slot _Required_. Button content (text, icon, or both) -->\n <slot><span class=\"x-icon\">⌕</span></slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, ComputedRef, defineComponent, ref } from 'vue';\n import { VueCSSClasses } from '../../../utils/types';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { use$x } from '../../../composables/use-$x';\n import { useState } from '../../../composables/use-state';\n import { searchBoxXModule } from '../x-module';\n\n /**\n * This component renders a button to submit the query.\n *\n * @remarks\n * If query is not empty, it emits {@link XEventsTypes.UserAcceptedAQuery} and\n * {@link SearchBoxXEvents.UserPressedSearchButton} events with the query as payload.\n * It also adds `x-search-button--has-empty-query` as class when there is no query.\n *\n * @public\n */\n export default defineComponent({\n name: 'SearchButton',\n xModule: searchBoxXModule.name,\n setup: function () {\n const $x = use$x();\n\n const buttonRef = ref<HTMLElement | null>(null);\n\n const query: ComputedRef<string> = useState('searchBox', ['query']).query;\n\n const isQueryEmpty = computed(() => query.value.length === 0);\n\n const dynamicClasses = computed<VueCSSClasses>(() => ({\n 'x-search-button--has-empty-query': isQueryEmpty.value\n }));\n\n /**\n * Generates the {@link WireMetadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n function createEventMetadata(): Omit<WireMetadata, 'moduleName'> {\n return {\n target: buttonRef.value,\n feature: 'search_box'\n };\n }\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n function emitEvents() {\n if (!isQueryEmpty.value) {\n $x.emit('UserAcceptedAQuery', query.value, createEventMetadata());\n $x.emit('UserPressedSearchButton', query.value, createEventMetadata());\n }\n }\n\n return {\n dynamicClasses,\n buttonRef,\n emitEvents\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`UserAcceptedAQuery`]https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPressedSearchButton`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n<!-- prettier-ignore-start -->\n:::warning\nNote that no events are emitted if the query is empty.\n:::\n<!-- prettier-ignore-end -->\n\n## Dynamic classes\n\n`SearchButton` uses the `x-search-button--has-empty-query` dynamic CSS class to modify the HTML\nbutton style when the query is empty.\n\n## See it in action\n\nIn this example, a clickable button is rendered.\n\n_Click the Search button to try it out!_\n\n```vue live\n<template>\n <SearchButton />\n</template>\n\n<script>\n import { SearchButton } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'SearchButtonDemo',\n components: {\n SearchButton\n }\n };\n</script>\n```\n\n### Play with default slot\n\nHere text is passed in the default slot instead of an icon to customize the button content.\n\n_Click the icon button to try it out!_\n\n```vue live\n<template>\n <SearchButton>Search</SearchButton>\n</template>\n\n<script>\n import { SearchButton } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'SearchButtonDemo',\n components: {\n SearchButton\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, the `UserPressedSearchButton` event has been implemented so that when you enter a\nsearch term and click the Search button, the search term is displayed as a message.\n\n_Type any term in the input field and then click the Search button to try it out!_\n\n```vue live\n<template>\n <div>\n <div style=\"display: flex;\">\n <SearchInput />\n <SearchButton\n @UserPressedSearchButton=\"\n query => {\n message = query;\n }\n \"\n />\n </div>\n {{ message }}\n </div>\n</template>\n\n<script>\n import { SearchInput, SearchButton } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'SearchButtonDemo',\n components: {\n SearchInput,\n SearchButton\n },\n data() {\n return {\n message: ''\n };\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. Commonly, the `SearchButton` component\ncommunicates with the [`SearchInput`](./search-input.md) to submit the query. In this example, when\nyou enter a search term and click the Search button, the “Looking for results” message is displayed.\n\n_Type any term in the input field and then click the Search button to try it out!_\n\n```vue live\n<template>\n <div>\n <div style=\"display: flex;\">\n <SearchInput />\n <SearchButton @UserAcceptedAQuery=\"message = 'looking for results'\">Search</SearchButton>\n </div>\n {{ message }}\n </div>\n</template>\n\n<script>\n import { SearchButton, SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'SearchButtonDemo',\n components: {\n SearchButton,\n SearchInput\n },\n data() {\n return {\n message: ''\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_createCommentVNode","_renderSlot"],"mappings":";;;;;;;;;;;SAEQ,WAAW,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SACdA,SAAK,EAAA,EAAAC,kBAAA;AAAA,IAAA,QAAA;AAAA,IAAE;AAAA,MACR,GAAK,EAAA,WAAA;AAAA,MAEL,gBAAU,CAAe,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,UAAA,IAAA,IAAA,CAAA,UAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,MAAA,KAAA,EAAAC,cAAA,CAAA,CAAA,0BAAA,EAAA,IAAA,CAAA,cAAA,CAAA,CAAA;AAEzB,MAAA,WAAA,EAAA,eAAA;AAAA,KAAA;AACA,IAAA;AAAA,MAAmCC,kBAAA,CAAA,0DAAA,CAAA;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAA,EAAA,MAAA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"search-button.vue.js","sources":["../../../../../src/x-modules/search-box/components/search-button.vue"],"sourcesContent":["<template>\n <button\n ref=\"buttonRef\"\n @click=\"emitEvents\"\n class=\"x-search-button x-button\"\n :class=\"dynamicClasses\"\n data-test=\"search-button\"\n >\n <!-- @slot _Required_. Button content (text, icon, or both) -->\n <slot><span class=\"x-icon\">⌕</span></slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, ComputedRef, defineComponent, ref } from 'vue';\n import { VueCSSClasses } from '../../../utils/types';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { use$x } from '../../../composables/use-$x';\n import { useState } from '../../../composables/use-state';\n import { searchBoxXModule } from '../x-module';\n\n /**\n * This component renders a button to submit the query.\n *\n * @remarks\n * If query is not empty, it emits {@link XEventsTypes.UserAcceptedAQuery} and\n * {@link SearchBoxXEvents.UserPressedSearchButton} events with the query as payload.\n * It also adds `x-search-button--has-empty-query` as class when there is no query.\n *\n * @public\n */\n export default defineComponent({\n name: 'SearchButton',\n xModule: searchBoxXModule.name,\n setup: function () {\n const $x = use$x();\n\n const buttonRef = ref<HTMLElement | null>(null);\n\n const query: ComputedRef<string> = useState('searchBox', ['query']).query;\n\n const isQueryEmpty = computed(() => query.value.length === 0);\n\n const dynamicClasses = computed<VueCSSClasses>(() => ({\n 'x-search-button--has-empty-query': isQueryEmpty.value\n }));\n\n /**\n * Generates the {@link WireMetadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n function createEventMetadata(): Omit<WireMetadata, 'moduleName'> {\n return {\n target: buttonRef.value,\n feature: 'search_box'\n };\n }\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n function emitEvents() {\n if (!isQueryEmpty.value) {\n $x.emit('UserAcceptedAQuery', query.value, createEventMetadata());\n $x.emit('UserPressedSearchButton', query.value, createEventMetadata());\n }\n }\n\n return {\n dynamicClasses,\n buttonRef,\n emitEvents\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`UserAcceptedAQuery`]https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPressedSearchButton`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n<!-- prettier-ignore-start -->\n:::warning\nNote that no events are emitted if the query is empty.\n:::\n<!-- prettier-ignore-end -->\n\n## Dynamic classes\n\n`SearchButton` uses the `x-search-button--has-empty-query` dynamic CSS class to modify the HTML\nbutton style when the query is empty.\n\n## See it in action\n\nIn this example, a clickable button is rendered.\n\n_Click the Search button to try it out!_\n\n```vue live\n<template>\n <SearchButton />\n</template>\n\n<script>\n import { SearchButton } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'SearchButtonDemo',\n components: {\n SearchButton\n }\n };\n</script>\n```\n\n### Play with default slot\n\nHere text is passed in the default slot instead of an icon to customize the button content.\n\n_Click the icon button to try it out!_\n\n```vue live\n<template>\n <SearchButton>Search</SearchButton>\n</template>\n\n<script>\n import { SearchButton } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'SearchButtonDemo',\n components: {\n SearchButton\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, the `UserPressedSearchButton` event has been implemented so that when you enter a\nsearch term and click the Search button, the search term is displayed as a message.\n\n_Type any term in the input field and then click the Search button to try it out!_\n\n```vue live\n<template>\n <div>\n <div style=\"display: flex;\">\n <SearchInput />\n <SearchButton\n @UserPressedSearchButton=\"\n query => {\n message = query;\n }\n \"\n />\n </div>\n {{ message }}\n </div>\n</template>\n\n<script>\n import { SearchInput, SearchButton } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'SearchButtonDemo',\n components: {\n SearchInput,\n SearchButton\n },\n data() {\n return {\n message: ''\n };\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. Commonly, the `SearchButton` component\ncommunicates with the [`SearchInput`](./search-input.md) to submit the query. In this example, when\nyou enter a search term and click the Search button, the “Looking for results” message is displayed.\n\n_Type any term in the input field and then click the Search button to try it out!_\n\n```vue live\n<template>\n <div>\n <div style=\"display: flex;\">\n <SearchInput />\n <SearchButton @UserAcceptedAQuery=\"message = 'looking for results'\">Search</SearchButton>\n </div>\n {{ message }}\n </div>\n</template>\n\n<script>\n import { SearchButton, SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'SearchButtonDemo',\n components: {\n SearchButton,\n SearchInput\n },\n data() {\n return {\n message: ''\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass"],"mappings":";;;;;;;;;;;SAEQ,WAAW,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SACdA,SAAK,EAAA,EAAAC,kBAAA;AAAA,IAAA,QAAA;AAAA,IAAE;AAAA,MACR,GAAK,EAAA,WAAA;AAAA,MAEL,gBAAU,CAAe,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,UAAA,IAAA,IAAA,CAAA,UAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,MAAA,KAAA,EAAAC,cAAA,CAAA,CAAA,0BAAA,EAAA,IAAA,CAAA,cAAA,CAAA,CAAA;MAGzB,WAA0C,EAAA,eAAA;AAAA,KAAA;;;;;;;;;;;;;;"}
@@ -1,3 +1,4 @@
1
+ import '@empathyco/x-utils';
1
2
  import { createStoreEmitters } from '../../../store/utils/store-emitters.utils.js';
2
3
  import { isStringEmpty } from '../../../utils/string.js';
3
4
  import { searchBoxXStoreModule } from './module.js';
@@ -1 +1 @@
1
- {"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/search-box/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { isStringEmpty } from '../../../utils/string';\nimport { searchBoxXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the search-box module.\n *\n * @internal\n */\nexport const searchBoxEmitters = createStoreEmitters(searchBoxXStoreModule, {\n SearchBoxQueryChanged: (_, getters) => getters.trimmedQuery,\n UserClearedQuery: { selector: state => state.query, filter: isStringEmpty }\n});\n"],"names":[],"mappings":";;;;AAIA;;;;AAIG;AACU,MAAA,iBAAiB,GAAG,mBAAmB,CAAC,qBAAqB,EAAE;IAC1E,qBAAqB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,YAAY;AAC3D,IAAA,gBAAgB,EAAE,EAAE,QAAQ,EAAE,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE;AAC5E,CAAA;;;;"}
1
+ {"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/search-box/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { isStringEmpty } from '../../../utils/string';\nimport { searchBoxXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the search-box module.\n *\n * @internal\n */\nexport const searchBoxEmitters = createStoreEmitters(searchBoxXStoreModule, {\n SearchBoxQueryChanged: (_, getters) => getters.trimmedQuery,\n UserClearedQuery: { selector: state => state.query, filter: isStringEmpty }\n});\n"],"names":[],"mappings":";;;;;AAIA;;;;AAIG;AACU,MAAA,iBAAiB,GAAG,mBAAmB,CAAC,qBAAqB,EAAE;IAC1E,qBAAqB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,YAAY;AAC3D,IAAA,gBAAgB,EAAE,EAAE,QAAQ,EAAE,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE;AAC5E,CAAA;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './semantic-queries.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, createCommentVNode } 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,13 +11,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11
11
  suggestions: _ctx.suggestions
12
12
  }, {
13
13
  default: withCtx((baseSuggestionsScope) => [
14
- createCommentVNode("\n @slot Semantic Query content\n @binding {{suggestion: object - Suggestion data, index: number - Suggestion index}} v-bind\n BaseSuggestion bindings\n "),
15
14
  renderSlot(_ctx.$slots, "suggestion", normalizeProps(guardReactiveProps(baseSuggestionsScope)), () => [
16
15
  createVNode(_component_SemanticQuery, {
17
16
  suggestion: baseSuggestionsScope.suggestion
18
17
  }, {
19
18
  default: withCtx((baseSuggestionScope) => [
20
- createCommentVNode("\n @slot Semantic Query content\n @binding {{suggestion: object - Suggestion data, query: string - The query that the\n suggestion belongs to}} v-bind SemanticQuery bindings\n "),
21
19
  renderSlot(_ctx.$slots, "suggestion-content", normalizeProps(guardReactiveProps(baseSuggestionScope)))
22
20
  ]),
23
21
  _: 2
@@ -1 +1 @@
1
- {"version":3,"file":"semantic-queries.vue.js","sources":["../../../../../src/x-modules/semantic-queries/components/semantic-queries.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n v-if=\"suggestions.length\"\n class=\"x-semantic-queries\"\n :suggestions=\"suggestions\"\n #default=\"baseSuggestionsScope\"\n >\n <!--\n @slot Semantic Query content\n @binding {{suggestion: object - Suggestion data, index: number - Suggestion index}} v-bind\n BaseSuggestion bindings\n -->\n <slot name=\"suggestion\" v-bind=\"baseSuggestionsScope\">\n <SemanticQuery :suggestion=\"baseSuggestionsScope.suggestion\" #default=\"baseSuggestionScope\">\n <!--\n @slot Semantic Query content\n @binding {{suggestion: object - Suggestion data, query: string - The query that the\n suggestion belongs to}} v-bind SemanticQuery bindings\n -->\n <slot name=\"suggestion-content\" v-bind=\"baseSuggestionScope\" />\n </SemanticQuery>\n </slot>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { computed, ComputedRef, defineComponent } from 'vue';\n import { Suggestion } from '@empathyco/x-types';\n import { semanticQueriesXModule } from '../x-module';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { useState } from '../../../composables';\n import SemanticQuery from './semantic-query.vue';\n\n /**\n * Retrieves a list of semantic queries from the state and exposes them in the slots.\n *\n * @public\n */\n export default defineComponent({\n name: 'SemanticQueries',\n xModule: semanticQueriesXModule.name,\n components: { BaseSuggestions, SemanticQuery },\n setup(_, { slots }) {\n /** The semantic queries from the state. */\n const suggestions: ComputedRef<Suggestion[]> = useState('semanticQueries', [\n 'semanticQueries'\n ]).semanticQueries;\n\n /**\n * Maps the list of semantic queries to a list of queries, to make it compatible with\n * other components.\n */\n const queries = computed(() => suggestions.value.map(suggestion => suggestion.query));\n\n /**\n * Finds a {@link @empathyco/x-types#Suggestion} given a query.\n *\n * @param query - The query to search.\n * @returns The {@link @empathyco/x-types#Suggestion} or undefined if not found.\n */\n function findSemanticQuery(query: string) {\n return suggestions.value.find(suggestion => suggestion.query === query);\n }\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 suggestions, 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\n * no suggestions.\n */\n function renderDefaultSlot() {\n const slotProps = {\n suggestions: suggestions.value,\n queries: queries.value,\n findSemanticQuery\n };\n return suggestions.value.length ? 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 = { suggestions };\n return (slots.default ? renderDefaultSlot : componentProps) as typeof componentProps;\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\nBy default, the `SemanticQueries` component will render a list of semantic queries.\n\n```vue\n<template>\n <SemanticQueries />\n</template>\n\n<script>\n import { SemanticQueries } from '@empathyco/x-components/semantic-queries';\n\n export default {\n name: 'SemanticQueriesDemo',\n components: {\n SemanticQueries\n }\n };\n</script>\n```\n\n### Play with props\n\nThe component has the following props:\n\n- maxItemsToRender to limit the number of semantic queries to render.\n- animation to specify the animation to be used to animate the semantic queries.\n\n```vue live\n<template>\n <SemanticQueries :animation=\"animation\" :maxItemsToRender=\"3\" />\n</template>\n\n<script>\n import { FadeAndSlide } from '@empathyco/x-components';\n\n export default {\n name: 'SemanticQueriesPropsDemo',\n data() {\n return {\n animation: FadeAndSlide\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nThe default slot is used to overwrite the whole content of the component.\n\n```vue live\n<template>\n <SemanticQueries #default=\"{ suggestions }\">\n <section>\n <SlidingPanel>\n <div v-for=\"suggestion in suggestions\">\n {{ suggestion.query }}\n {{ suggestion.distance }}\n </div>\n </SlidingPanel>\n </section>\n </SemanticQueries>\n</template>\n\n<script>\n import { SemanticQueries } from '@empathyco/x-components/semantic-queries';\n import { SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'SemanticQueriesDefaultSlotDemo',\n components: {\n SemanticQueries,\n SlidingPanel\n }\n };\n</script>\n```\n\nThe default slot also exposes an array of semantic queries mapped to strings, and a method to find a\nsemantic query given a string query.\n\nThis is useful if you need an array of string queries, but also need to retrieve the original\nsemantic query to use it in another element.\n\n```vue live\n<template>\n <SemanticQueries #default=\"{ queries, findSemanticQuery }\">\n <section>\n <QueryPreviewList :queries=\"queries\" #slot=\"{ query, results }\">\n <div>\n <SemanticQuery :semanticQuery=\"findSemanticQuery(query)\" #default=\"{ query }\">\n {{ query.query }} ({{ query.distance }})\n </SemanticQuery>\n <ul>\n <li v-for=\"result in results\" :key=\"result.id\">\n {{ result.name }}\n </li>\n </ul>\n </div>\n </QueryPreviewList>\n </section>\n </SemanticQueries>\n</template>\n\n<script>\n import { SemanticQueries, SemanticQuery } from '@empathyco/x-components/semantic-queries';\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'SemanticQueriesDefaultSlotDemo2',\n components: {\n SemanticQueries,\n SemanticQuery,\n QueryPreviewList\n }\n };\n</script>\n```\n\n### Play with the suggestion slot\n\nThe suggestion slot can be used to override each semantic query item.\n\nIn this example, the query will be rendered along with the distance.\n\n```vue live\n<template>\n <SemanticQueries #suggestion=\"{ suggestion: { query, distance } }\">\n <span>\n ({{ distance }})\n {{ query }}\n </span>\n </SemanticQueries>\n</template>\n\n<script>\n import { SemanticQueries } from '@empathyco/x-components/semantic-queries';\n export default {\n name: 'SemanticQueriesItemSlotDemo',\n components: {\n SemanticQueries\n }\n };\n</script>\n```\n\n### Play with the suggestion content slot\n\nThe suggsetion content slot can be used to override only the content, but keep using the\nSemanticQuery component internally.\n\n```vue live\n<template>\n <SemanticQueries #suggestion-content=\"{ suggestion: { query, distance } }\">\n <span>\n ({{ distance }})\n {{ query }}\n </span>\n </SemanticQueries>\n</template>\n\n<script>\n import { SemanticQueries } from '@empathyco/x-components/semantic-queries';\n export default {\n name: 'SemanticQueriesItemSlotDemo',\n components: {\n SemanticQueries\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_withCtx","_createCommentVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_createVNode"],"mappings":";;;;;;AAE4B,EAAA,MAAA,0BAAA,GAAAA,gBAAA,CAAA,iBAAA,CAAA,CAAA;AAF5B,EAAA,OAAA,IAAA,CAAA,WAAA,CAAA,MAAA,IAAAC,SAAA,EAG8B,EAAAC,WAAA,CAAA,0BAAA,EAAA;AAAA,IACzB,GAAA,EAAA,CAAA;AAAA,IAAA,KAAA,EAAA,oBAAA;AACA,IAAA,WAAA,EAAO,IAER,CAAA,WAAA;AAAA,GAAA,EAAA;AAKA,IAAA,OAAA,EAAAC,OAAA,CASO,CArBX,oBAAA,KAAA;AAAA,MAoBsBC,kBAAA,CAAA,+KAAA,CAAA;AAAA,MAPAC,UAAA,CAAA,IAAA,CAAY,sBAAqBC,cAAU,CAAAC,kBAAA,CAAA,oBAAA,CAAA,CAAA,EAAA,MAAA;AAAA,QAAAC,WAAA,CAAA,wBAAA,EAAA;AAAG,UAAA,UAAA,EAAO,oBAAE,CAAA,UAAA;AAAA,SAAA,EAAA;mBAMrEL,OAA+D,CAAA,CAAA,mBAAA,KAAA;AAAA,YAAAC,kBAAA,CAAA,sNAAA,CAAA;AAnBvE,YAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,oBAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,mBAAA,CAAA,CAAA,CAAA;AAAA,WAAA,CAAA;;;;AAAA,OAAA,CAAA;AAAA,KAAA,CAAA;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,EAAA,CAAA,EAAA,CAAA,aAAA,CAAA,CAAA,IAAAH,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"semantic-queries.vue.js","sources":["../../../../../src/x-modules/semantic-queries/components/semantic-queries.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n v-if=\"suggestions.length\"\n class=\"x-semantic-queries\"\n :suggestions=\"suggestions\"\n #default=\"baseSuggestionsScope\"\n >\n <!--\n @slot Semantic Query content\n @binding {{suggestion: object - Suggestion data, index: number - Suggestion index}} v-bind\n BaseSuggestion bindings\n -->\n <slot name=\"suggestion\" v-bind=\"baseSuggestionsScope\">\n <SemanticQuery :suggestion=\"baseSuggestionsScope.suggestion\" #default=\"baseSuggestionScope\">\n <!--\n @slot Semantic Query content\n @binding {{suggestion: object - Suggestion data, query: string - The query that the\n suggestion belongs to}} v-bind SemanticQuery bindings\n -->\n <slot name=\"suggestion-content\" v-bind=\"baseSuggestionScope\" />\n </SemanticQuery>\n </slot>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { computed, ComputedRef, defineComponent } from 'vue';\n import { Suggestion } from '@empathyco/x-types';\n import { semanticQueriesXModule } from '../x-module';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { useState } from '../../../composables';\n import SemanticQuery from './semantic-query.vue';\n\n /**\n * Retrieves a list of semantic queries from the state and exposes them in the slots.\n *\n * @public\n */\n export default defineComponent({\n name: 'SemanticQueries',\n xModule: semanticQueriesXModule.name,\n components: { BaseSuggestions, SemanticQuery },\n setup(_, { slots }) {\n /** The semantic queries from the state. */\n const suggestions: ComputedRef<Suggestion[]> = useState('semanticQueries', [\n 'semanticQueries'\n ]).semanticQueries;\n\n /**\n * Maps the list of semantic queries to a list of queries, to make it compatible with\n * other components.\n */\n const queries = computed(() => suggestions.value.map(suggestion => suggestion.query));\n\n /**\n * Finds a {@link @empathyco/x-types#Suggestion} given a query.\n *\n * @param query - The query to search.\n * @returns The {@link @empathyco/x-types#Suggestion} or undefined if not found.\n */\n function findSemanticQuery(query: string) {\n return suggestions.value.find(suggestion => suggestion.query === query);\n }\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 suggestions, 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\n * no suggestions.\n */\n function renderDefaultSlot() {\n const slotProps = {\n suggestions: suggestions.value,\n queries: queries.value,\n findSemanticQuery\n };\n return suggestions.value.length ? 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 = { suggestions };\n return (slots.default ? renderDefaultSlot : componentProps) as typeof componentProps;\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\nBy default, the `SemanticQueries` component will render a list of semantic queries.\n\n```vue\n<template>\n <SemanticQueries />\n</template>\n\n<script>\n import { SemanticQueries } from '@empathyco/x-components/semantic-queries';\n\n export default {\n name: 'SemanticQueriesDemo',\n components: {\n SemanticQueries\n }\n };\n</script>\n```\n\n### Play with props\n\nThe component has the following props:\n\n- maxItemsToRender to limit the number of semantic queries to render.\n- animation to specify the animation to be used to animate the semantic queries.\n\n```vue live\n<template>\n <SemanticQueries :animation=\"animation\" :maxItemsToRender=\"3\" />\n</template>\n\n<script>\n import { FadeAndSlide } from '@empathyco/x-components';\n\n export default {\n name: 'SemanticQueriesPropsDemo',\n data() {\n return {\n animation: FadeAndSlide\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nThe default slot is used to overwrite the whole content of the component.\n\n```vue live\n<template>\n <SemanticQueries #default=\"{ suggestions }\">\n <section>\n <SlidingPanel>\n <div v-for=\"suggestion in suggestions\">\n {{ suggestion.query }}\n {{ suggestion.distance }}\n </div>\n </SlidingPanel>\n </section>\n </SemanticQueries>\n</template>\n\n<script>\n import { SemanticQueries } from '@empathyco/x-components/semantic-queries';\n import { SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'SemanticQueriesDefaultSlotDemo',\n components: {\n SemanticQueries,\n SlidingPanel\n }\n };\n</script>\n```\n\nThe default slot also exposes an array of semantic queries mapped to strings, and a method to find a\nsemantic query given a string query.\n\nThis is useful if you need an array of string queries, but also need to retrieve the original\nsemantic query to use it in another element.\n\n```vue live\n<template>\n <SemanticQueries #default=\"{ queries, findSemanticQuery }\">\n <section>\n <QueryPreviewList :queries=\"queries\" #slot=\"{ query, results }\">\n <div>\n <SemanticQuery :semanticQuery=\"findSemanticQuery(query)\" #default=\"{ query }\">\n {{ query.query }} ({{ query.distance }})\n </SemanticQuery>\n <ul>\n <li v-for=\"result in results\" :key=\"result.id\">\n {{ result.name }}\n </li>\n </ul>\n </div>\n </QueryPreviewList>\n </section>\n </SemanticQueries>\n</template>\n\n<script>\n import { SemanticQueries, SemanticQuery } from '@empathyco/x-components/semantic-queries';\n import { QueryPreviewList } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'SemanticQueriesDefaultSlotDemo2',\n components: {\n SemanticQueries,\n SemanticQuery,\n QueryPreviewList\n }\n };\n</script>\n```\n\n### Play with the suggestion slot\n\nThe suggestion slot can be used to override each semantic query item.\n\nIn this example, the query will be rendered along with the distance.\n\n```vue live\n<template>\n <SemanticQueries #suggestion=\"{ suggestion: { query, distance } }\">\n <span>\n ({{ distance }})\n {{ query }}\n </span>\n </SemanticQueries>\n</template>\n\n<script>\n import { SemanticQueries } from '@empathyco/x-components/semantic-queries';\n export default {\n name: 'SemanticQueriesItemSlotDemo',\n components: {\n SemanticQueries\n }\n };\n</script>\n```\n\n### Play with the suggestion content slot\n\nThe suggsetion content slot can be used to override only the content, but keep using the\nSemanticQuery component internally.\n\n```vue live\n<template>\n <SemanticQueries #suggestion-content=\"{ suggestion: { query, distance } }\">\n <span>\n ({{ distance }})\n {{ query }}\n </span>\n </SemanticQueries>\n</template>\n\n<script>\n import { SemanticQueries } from '@empathyco/x-components/semantic-queries';\n export default {\n name: 'SemanticQueriesItemSlotDemo',\n components: {\n SemanticQueries\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_createVNode","_createCommentVNode"],"mappings":";;;;;;AAE4B,EAAA,MAAA,0BAAA,GAAAA,gBAAA,CAAA,iBAAA,CAAA,CAAA;AAF5B,EAAA,OAAA,IAAA,CAAA,WAAA,CAAA,MAAA,IAAAC,SAAA,EAG8B,EAAAC,WAAA,CAAA,0BAAA,EAAA;AAAA,IACzB,GAAA,EAAA,CAAA;AAAA,IAAA,KAAA,EAAA,oBAAA;AACA,IAAA,WAAA,EAAO,IAOR,CAAA,WAAA;AAAA,GAAA,EAAA;aACEC,OAOgB,CAAA,CAAA,oBAAA,KAAA;AAAA,MAPAC,UAAA,CAAA,IAAA,CAAY,sBAAqBC,cAAU,CAAAC,kBAAA,CAAA,oBAAA,CAAA,CAAA,EAAA,MAAA;AAAA,QAAAC,WAAA,CAAA,wBAAA,EAAA;AAAG,UAAA,UAAA,EAAO,oBAAE,CAAA,UAAA;AAAA,SAAA,EAAA;;AAb7E,YAAAH,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,oBAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,mBAAA,CAAA,CAAA,CAAA;AAAA,WAAA,CAAA;;;;AAAA,OAAA,CAAA;AAAA,KAAA,CAAA;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,EAAA,CAAA,EAAA,CAAA,aAAA,CAAA,CAAA,IAAAE,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './semantic-query.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
  "data-test": "semantic-query"
13
13
  }, {
14
14
  default: withCtx((baseScope) => [
15
- createCommentVNode(" eslint-disable max-len "),
16
- createCommentVNode("\n @slot Semantic Query content\n @binding {{suggestion: object - Suggestion data, query: string - The query that the suggestion belongs to}} v-bind BaseSuggestion bindings\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":"semantic-query.vue.js","sources":["../../../../../src/x-modules/semantic-queries/components/semantic-query.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n :query=\"query\"\n :suggestion=\"suggestion\"\n :suggestionSelectedEvents=\"suggestionSelectedEvents\"\n feature=\"semantics\"\n data-test=\"semantic-query\"\n #default=\"baseScope\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Semantic Query content\n @binding {{suggestion: object - Suggestion data, query: string - The query that the suggestion belongs to}} v-bind BaseSuggestion bindings\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope }\" />\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { SemanticQuery } from '@empathyco/x-types';\n import { semanticQueriesXModule } from '../x-module';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { useGetter } from '../../../composables/use-getter';\n\n /**\n * This component renders a semantic query. A semantic query is a recommended query\n * that is similar in its meaning to another one.\n * It contains the query and the distance, which indicates how similar the query is\n * compared to the searched query.\n *\n * @public\n */\n export default defineComponent({\n name: 'SemanticQuery',\n xModule: semanticQueriesXModule.name,\n components: { BaseSuggestion },\n props: {\n /** The {@link @empathyco/x-types#SemanticQuery} to render. */\n suggestion: {\n type: Object as PropType<SemanticQuery>,\n required: true\n }\n },\n setup(props) {\n /** The normalized query of the semantic queries module. */\n const query = useGetter('semanticQueries', ['normalizedQuery']).normalizedQuery;\n\n /** The list of events that are going to be emitted when the button is pressed. */\n const suggestionSelectedEvents = {\n UserSelectedASemanticQuery: props.suggestion\n };\n\n return {\n query,\n suggestionSelectedEvents\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserSelectedASemanticQuery`](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 semantic query button. The event payload is the\n semantic query data.\n\n## See it in action\n\nHere you can see that the semantic query query is rendered.\n\n```vue live\n<template>\n <SemanticQuery :suggestion=\"semanticQuery\" />\n</template>\n\n<script>\n import { SemanticQuery } from '@empathyco/x-components/semantic-queries';\n\n export default {\n name: 'SemanticQueryDemo',\n components: {\n SemanticQuery\n },\n data() {\n return {\n semanticQuery: {\n modelName: 'SemanticQuery',\n query: 'jacket',\n distance: 2\n }\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, we add the distance of the semantic query next to the query.\n\n```vue live\n<template>\n <SemanticQuery :suggestion=\"semanticQuery\" #default=\"{ suggestion, query }\">\n <div>Original query: {{ query }}</div>\n <div>Suggested semantic query: {{ suggestion.query }} - {{ suggestion.distance }}</div>\n </SemanticQuery>\n</template>\n\n<script>\n import { SemanticQuery } from '@empathyco/x-components/semantic-queries';\n\n export default {\n name: 'SemanticQueryDemoDefaultSlot',\n components: {\n SemanticQuery\n },\n data() {\n return {\n semanticQuery: {\n modelName: 'SemanticQuery',\n query: 'jacket',\n distance: 2\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,IAAA,CAAA,KAAA;AAAA,IACD,UAAQ,EAAA,IAAA,CAAA,UAAA;AAAA,IACR,0BAAU,IAAgB,CAAA,wBAAA;AAAA,IAAA,OAAA,EAAA,WAAA;IACzB,WAAO,EAAA,gBAAA;AAAA,GAAA,EAAA;AAGR,IAAA,OAAA,EAAAC,OAAA,CAAA,CAAA,SAAA,KAAA;AAAA,MAIAC,kBAA8B,CAAA,0BAAA,CAAA;AAAA,MAC9BA,mBAAkC,kMAAN,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":"semantic-query.vue.js","sources":["../../../../../src/x-modules/semantic-queries/components/semantic-query.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n :query=\"query\"\n :suggestion=\"suggestion\"\n :suggestionSelectedEvents=\"suggestionSelectedEvents\"\n feature=\"semantics\"\n data-test=\"semantic-query\"\n #default=\"baseScope\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Semantic Query content\n @binding {{suggestion: object - Suggestion data, query: string - The query that the suggestion belongs to}} v-bind BaseSuggestion bindings\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope }\" />\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { SemanticQuery } from '@empathyco/x-types';\n import { semanticQueriesXModule } from '../x-module';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { useGetter } from '../../../composables/use-getter';\n\n /**\n * This component renders a semantic query. A semantic query is a recommended query\n * that is similar in its meaning to another one.\n * It contains the query and the distance, which indicates how similar the query is\n * compared to the searched query.\n *\n * @public\n */\n export default defineComponent({\n name: 'SemanticQuery',\n xModule: semanticQueriesXModule.name,\n components: { BaseSuggestion },\n props: {\n /** The {@link @empathyco/x-types#SemanticQuery} to render. */\n suggestion: {\n type: Object as PropType<SemanticQuery>,\n required: true\n }\n },\n setup(props) {\n /** The normalized query of the semantic queries module. */\n const query = useGetter('semanticQueries', ['normalizedQuery']).normalizedQuery;\n\n /** The list of events that are going to be emitted when the button is pressed. */\n const suggestionSelectedEvents = {\n UserSelectedASemanticQuery: props.suggestion\n };\n\n return {\n query,\n suggestionSelectedEvents\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserSelectedASemanticQuery`](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 semantic query button. The event payload is the\n semantic query data.\n\n## See it in action\n\nHere you can see that the semantic query query is rendered.\n\n```vue live\n<template>\n <SemanticQuery :suggestion=\"semanticQuery\" />\n</template>\n\n<script>\n import { SemanticQuery } from '@empathyco/x-components/semantic-queries';\n\n export default {\n name: 'SemanticQueryDemo',\n components: {\n SemanticQuery\n },\n data() {\n return {\n semanticQuery: {\n modelName: 'SemanticQuery',\n query: 'jacket',\n distance: 2\n }\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, we add the distance of the semantic query next to the query.\n\n```vue live\n<template>\n <SemanticQuery :suggestion=\"semanticQuery\" #default=\"{ suggestion, query }\">\n <div>Original query: {{ query }}</div>\n <div>Suggested semantic query: {{ suggestion.query }} - {{ suggestion.distance }}</div>\n </SemanticQuery>\n</template>\n\n<script>\n import { SemanticQuery } from '@empathyco/x-components/semantic-queries';\n\n export default {\n name: 'SemanticQueryDemoDefaultSlot',\n components: {\n SemanticQuery\n },\n data() {\n return {\n semanticQuery: {\n modelName: 'SemanticQuery',\n query: 'jacket',\n distance: 2\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,IAAA,CAAA,KAAA;AAAA,IACD,UAAQ,EAAA,IAAA,CAAA,UAAA;AAAA,IACR,0BAAU,IAAgB,CAAA,wBAAA;AAAA,IAAA,OAAA,EAAA,WAAA;IACzB,WAAO,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;;;;;;;;;"}
@@ -4,7 +4,7 @@ import { normalizeString } from '../../../../utils/normalize.js';
4
4
  * Default implementacion for the {@link SemanticQueriesGetters.normalizedQuery} getter.
5
5
  *
6
6
  * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the semantic
7
- * queries module.
7
+ * queries' module.
8
8
  *
9
9
  * @returns The normalized query.
10
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"normalized-query.getter.js","sources":["../../../../../../src/x-modules/semantic-queries/store/getters/normalized-query.getter.ts"],"sourcesContent":["import { SemanticQueriesXStoreModule } from '../types';\nimport { normalizeString } from '../../../../utils/normalize';\n\n/**\n * Default implementacion for the {@link SemanticQueriesGetters.normalizedQuery} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the semantic\n * queries module.\n *\n * @returns The normalized query.\n *\n * @public\n */\nexport const normalizedQuery: SemanticQueriesXStoreModule['getters']['normalizedQuery'] = ({\n query\n}) => normalizeString(query);\n"],"names":[],"mappings":";;AAGA;;;;;;;;;AASG;AACI,MAAM,eAAe,GAA8D,CAAC,EACzF,KAAK,EACN,KAAK,eAAe,CAAC,KAAK;;;;"}
1
+ {"version":3,"file":"normalized-query.getter.js","sources":["../../../../../../src/x-modules/semantic-queries/store/getters/normalized-query.getter.ts"],"sourcesContent":["import { SemanticQueriesXStoreModule } from '../types';\nimport { normalizeString } from '../../../../utils/normalize';\n\n/**\n * Default implementacion for the {@link SemanticQueriesGetters.normalizedQuery} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the semantic\n * queries' module.\n *\n * @returns The normalized query.\n *\n * @public\n */\nexport const normalizedQuery: SemanticQueriesXStoreModule['getters']['normalizedQuery'] = ({\n query\n}) => normalizeString(query);\n"],"names":[],"mappings":";;AAGA;;;;;;;;;AASG;AACI,MAAM,eAAe,GAA8D,CAAC,EACzF,KAAK,EACN,KAAK,eAAe,CAAC,KAAK;;;;"}
@@ -3,15 +3,16 @@
3
3
  *
4
4
  * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the semantic
5
5
  * queries module.
6
- *
6
+ * @param getters - Current {@link https://vuex.vuejs.org/guide/getters.html | getters} of the
7
+ * semantic queries' module.
7
8
  * @returns The semantic queries request to fetch data from the API.
8
9
  *
9
10
  * @public
10
11
  */
11
- const request = ({ query, params, totalResults, config: { threshold, maxItemsToRequest } }) => {
12
- return query && totalResults <= threshold
12
+ const request = ({ params, totalResults, config: { threshold, maxItemsToRequest } }, { normalizedQuery }) => {
13
+ return normalizedQuery && totalResults <= threshold
13
14
  ? {
14
- query,
15
+ query: normalizedQuery,
15
16
  extraParams: {
16
17
  ...params,
17
18
  k: maxItemsToRequest
@@ -1 +1 @@
1
- {"version":3,"file":"request.getter.js","sources":["../../../../../../src/x-modules/semantic-queries/store/getters/request.getter.ts"],"sourcesContent":["import { SemanticQueriesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link SemanticQueriesGetters.request} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the semantic\n * queries module.\n *\n * @returns The semantic queries request to fetch data from the API.\n *\n * @public\n */\nexport const request: SemanticQueriesXStoreModule['getters']['request'] = ({\n query,\n params,\n totalResults,\n config: { threshold, maxItemsToRequest }\n}) => {\n return query && totalResults <= threshold\n ? {\n query,\n extraParams: {\n ...params,\n k: maxItemsToRequest\n }\n }\n : null;\n};\n"],"names":[],"mappings":"AAEA;;;;;;;;;AASG;MACU,OAAO,GAAsD,CAAC,EACzE,KAAK,EACL,MAAM,EACN,YAAY,EACZ,MAAM,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,EACzC,KAAI;AACH,IAAA,OAAO,KAAK,IAAI,YAAY,IAAI,SAAS;AACvC,UAAE;YACE,KAAK;AACL,YAAA,WAAW,EAAE;AACX,gBAAA,GAAG,MAAM;AACT,gBAAA,CAAC,EAAE,iBAAiB;AACrB,aAAA;AACF,SAAA;UACD,IAAI,CAAC;AACX;;;;"}
1
+ {"version":3,"file":"request.getter.js","sources":["../../../../../../src/x-modules/semantic-queries/store/getters/request.getter.ts"],"sourcesContent":["import { SemanticQueriesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link SemanticQueriesGetters.request} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the semantic\n * queries module.\n * @param getters - Current {@link https://vuex.vuejs.org/guide/getters.html | getters} of the\n * semantic queries' module.\n * @returns The semantic queries request to fetch data from the API.\n *\n * @public\n */\nexport const request: SemanticQueriesXStoreModule['getters']['request'] = (\n { params, totalResults, config: { threshold, maxItemsToRequest } },\n { normalizedQuery }\n) => {\n return normalizedQuery && totalResults <= threshold\n ? {\n query: normalizedQuery,\n extraParams: {\n ...params,\n k: maxItemsToRequest\n }\n }\n : null;\n};\n"],"names":[],"mappings":"AAEA;;;;;;;;;;AAUG;MACU,OAAO,GAAsD,CACxE,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,EAClE,EAAE,eAAe,EAAE,KACjB;AACF,IAAA,OAAO,eAAe,IAAI,YAAY,IAAI,SAAS;AACjD,UAAE;AACE,YAAA,KAAK,EAAE,eAAe;AACtB,YAAA,WAAW,EAAE;AACX,gBAAA,GAAG,MAAM;AACT,gBAAA,CAAC,EAAE,iBAAiB;AACrB,aAAA;AACF,SAAA;UACD,IAAI,CAAC;AACX;;;;"}
@@ -0,0 +1,18 @@
1
+ import { createRelatedTagsQueryGetter } from '../../../../store/utils/query.utils.js';
2
+
3
+ /**
4
+ * Default implementation for the semantic queries query getter.
5
+ *
6
+ * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the semantic
7
+ * queries' module.
8
+ *
9
+ * @returns The query with the selected related tags concatenated.
10
+ *
11
+ * @public
12
+ */
13
+ const query = createRelatedTagsQueryGetter({
14
+ getRelatedTags: state => state.relatedTags
15
+ });
16
+
17
+ export { query };
18
+ //# sourceMappingURL=semanti-queries-query.getter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semanti-queries-query.getter.js","sources":["../../../../../../src/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.ts"],"sourcesContent":["import { createRelatedTagsQueryGetter } from '../../../../store/utils/query.utils';\nimport { SemanticQueriesXStoreModule } from '../types';\n\n/**\n * Default implementation for the semantic queries query getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the semantic\n * queries' module.\n *\n * @returns The query with the selected related tags concatenated.\n *\n * @public\n */\nexport const query: SemanticQueriesXStoreModule['getters']['query'] = createRelatedTagsQueryGetter({\n getRelatedTags: state => state.relatedTags\n});\n"],"names":[],"mappings":";;AAGA;;;;;;;;;AASG;AACI,MAAM,KAAK,GAAoD,4BAA4B,CAAC;AACjG,IAAA,cAAc,EAAE,KAAK,IAAI,KAAK,CAAC,WAAW;AAC3C,CAAA;;;;"}
@@ -4,6 +4,7 @@ import { fetchSemanticQuery } from './actions/fetch-semantic-query.action.js';
4
4
  import { fetchAndSaveSemanticQuery } from './actions/fetch-and-save-semantic-query.action.js';
5
5
  import { request } from './getters/request.getter.js';
6
6
  import { normalizedQuery } from './getters/normalized-query.getter.js';
7
+ import { query } from './getters/semanti-queries-query.getter.js';
7
8
 
8
9
  /**
9
10
  * {@link XStoreModule} For the `semantic-queries` module.
@@ -19,11 +20,13 @@ const semanticQueriesXStoreModule = {
19
20
  semanticQueries: [],
20
21
  params: {},
21
22
  query: '',
22
- totalResults: 0
23
+ totalResults: 0,
24
+ relatedTags: []
23
25
  }),
24
26
  getters: {
25
27
  request,
26
- normalizedQuery
28
+ normalizedQuery,
29
+ query
27
30
  },
28
31
  mutations: {
29
32
  setParams(state, params) {
@@ -36,6 +39,9 @@ const semanticQueriesXStoreModule = {
36
39
  setTotalResults(state, totalResults) {
37
40
  state.totalResults = totalResults;
38
41
  },
42
+ setSemanticQueriesRelatedTags(state, relatedTags) {
43
+ state.relatedTags = relatedTags;
44
+ },
39
45
  setConfig,
40
46
  mergeConfig
41
47
  },
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/semantic-queries/store/module.ts"],"sourcesContent":["import { mergeConfig, setConfig } from '../../../store/utils/config-store.utils';\nimport { setQuery } from '../../../store/utils/query.utils';\nimport { SemanticQueriesXStoreModule } from './types';\nimport { fetchSemanticQuery } from './actions/fetch-semantic-query.action';\nimport { fetchAndSaveSemanticQuery } from './actions/fetch-and-save-semantic-query.action';\nimport { request } from './getters/request.getter';\nimport { normalizedQuery } from './getters/normalized-query.getter';\n\n/**\n * {@link XStoreModule} For the `semantic-queries` module.\n *\n * @internal\n */\nexport const semanticQueriesXStoreModule: SemanticQueriesXStoreModule = {\n state: () => ({\n config: {\n threshold: 5,\n maxItemsToRequest: 3\n },\n semanticQueries: [],\n params: {},\n query: '',\n totalResults: 0\n }),\n getters: {\n request,\n normalizedQuery\n },\n mutations: {\n setParams(state, params) {\n state.params = params;\n },\n setSemanticQueries(state, queries) {\n state.semanticQueries = queries;\n },\n setQuery,\n setTotalResults(state, totalResults) {\n state.totalResults = totalResults;\n },\n setConfig,\n mergeConfig\n },\n actions: {\n fetchSemanticQuery,\n fetchAndSaveSemanticQuery\n }\n};\n"],"names":[],"mappings":";;;;;;;AAQA;;;;AAIG;AACU,MAAA,2BAA2B,GAAgC;AACtE,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE;AACN,YAAA,SAAS,EAAE,CAAC;AACZ,YAAA,iBAAiB,EAAE,CAAC;AACrB,SAAA;AACD,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,YAAY,EAAE,CAAC;KAChB,CAAC;AACF,IAAA,OAAO,EAAE;QACP,OAAO;QACP,eAAe;AAChB,KAAA;AACD,IAAA,SAAS,EAAE;QACT,SAAS,CAAC,KAAK,EAAE,MAAM,EAAA;AACrB,YAAA,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;SACvB;QACD,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAA;AAC/B,YAAA,KAAK,CAAC,eAAe,GAAG,OAAO,CAAC;SACjC;QACD,QAAQ;QACR,eAAe,CAAC,KAAK,EAAE,YAAY,EAAA;AACjC,YAAA,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;SACnC;QACD,SAAS;QACT,WAAW;AACZ,KAAA;AACD,IAAA,OAAO,EAAE;QACP,kBAAkB;QAClB,yBAAyB;AAC1B,KAAA;;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/semantic-queries/store/module.ts"],"sourcesContent":["import { mergeConfig, setConfig } from '../../../store/utils/config-store.utils';\nimport { setQuery } from '../../../store/utils/query.utils';\nimport { SemanticQueriesXStoreModule } from './types';\nimport { fetchSemanticQuery } from './actions/fetch-semantic-query.action';\nimport { fetchAndSaveSemanticQuery } from './actions/fetch-and-save-semantic-query.action';\nimport { request } from './getters/request.getter';\nimport { normalizedQuery } from './getters/normalized-query.getter';\nimport { query } from './getters/semanti-queries-query.getter';\n\n/**\n * {@link XStoreModule} For the `semantic-queries` module.\n *\n * @internal\n */\nexport const semanticQueriesXStoreModule: SemanticQueriesXStoreModule = {\n state: () => ({\n config: {\n threshold: 5,\n maxItemsToRequest: 3\n },\n semanticQueries: [],\n params: {},\n query: '',\n totalResults: 0,\n relatedTags: []\n }),\n getters: {\n request,\n normalizedQuery,\n query\n },\n mutations: {\n setParams(state, params) {\n state.params = params;\n },\n setSemanticQueries(state, queries) {\n state.semanticQueries = queries;\n },\n setQuery,\n setTotalResults(state, totalResults) {\n state.totalResults = totalResults;\n },\n setSemanticQueriesRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags;\n },\n setConfig,\n mergeConfig\n },\n actions: {\n fetchSemanticQuery,\n fetchAndSaveSemanticQuery\n }\n};\n"],"names":[],"mappings":";;;;;;;;AASA;;;;AAIG;AACU,MAAA,2BAA2B,GAAgC;AACtE,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE;AACN,YAAA,SAAS,EAAE,CAAC;AACZ,YAAA,iBAAiB,EAAE,CAAC;AACrB,SAAA;AACD,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,YAAY,EAAE,CAAC;AACf,QAAA,WAAW,EAAE,EAAE;KAChB,CAAC;AACF,IAAA,OAAO,EAAE;QACP,OAAO;QACP,eAAe;QACf,KAAK;AACN,KAAA;AACD,IAAA,SAAS,EAAE;QACT,SAAS,CAAC,KAAK,EAAE,MAAM,EAAA;AACrB,YAAA,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;SACvB;QACD,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAA;AAC/B,YAAA,KAAK,CAAC,eAAe,GAAG,OAAO,CAAC;SACjC;QACD,QAAQ;QACR,eAAe,CAAC,KAAK,EAAE,YAAY,EAAA;AACjC,YAAA,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;SACnC;QACD,6BAA6B,CAAC,KAAK,EAAE,WAAW,EAAA;AAC9C,YAAA,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;SACjC;QACD,SAAS;QACT,WAAW;AACZ,KAAA;AACD,IAAA,OAAO,EAAE;QACP,kBAAkB;QAClB,yBAAyB;AAC1B,KAAA;;;;;"}
@@ -50,6 +50,8 @@ const clearQueryWire = wireCommit('setQuery', '');
50
50
  * @public
51
51
  */
52
52
  const setTotalResultsWire = wireCommit('setTotalResults');
53
+ /** Sets the related prompts state `relatedTags`. */
54
+ const setSemanticQueriesRelatedTags = wireCommit('setSemanticQueriesRelatedTags');
53
55
  /**
54
56
  * Sets the total results taking the {@link SearchXEvents.SearchResponseChanged} payload.
55
57
  *
@@ -80,6 +82,9 @@ const semanticQueriesWiring = createWiring({
80
82
  SearchResponseChanged: {
81
83
  setQueryFromSearchResponseChangedWire,
82
84
  setTotalResultsFromSearchResponseChangedWire
85
+ },
86
+ SelectedRelatedTagsChanged: {
87
+ setSemanticQueriesRelatedTags
83
88
  }
84
89
  });
85
90
 
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/semantic-queries/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireDispatch\n} from '../../wiring/namespaced-wires.factory';\nimport { createWiring } from '../../wiring/wiring.utils';\nimport { mapWire } from '../../wiring/wires.operators';\nimport { SearchXEvents } from '../search/events.types';\nimport { ExtractMutationPayload } from '../../store/store.types';\n\n/**\n * `semanticQueries` {@link XModuleName | name}.\n *\n * @internal\n */\nconst moduleName = 'semanticQueries';\n\n/**\n * WireCommit for {@link SemanticQueriesXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName);\n\n/**\n * WireDispatch for {@link SemanticQueriesXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName);\n\n/**\n * Requests and stores the semantic query results.\n *\n * @public\n */\nexport const fetchAndSaveSemanticQueryWire = wireDispatch('fetchAndSaveSemanticQuery');\n\n/**\n * Sets the query.\n *\n * @public\n */\nexport const setQueryWire = wireCommit('setQuery');\n\n/**\n * Sets the query taking the {@link SearchXEvents.SearchResponseChanged} payload.\n *\n * @public\n */\nexport const setQueryFromSearchResponseChangedWire = mapWire<\n SearchXEvents['SearchResponseChanged'],\n ExtractMutationPayload<'semanticQueries', 'setQuery'>\n>(setQueryWire, ({ request: { query } }) => query);\n\n/**\n * Clears the query.\n *\n * @public\n */\nexport const clearQueryWire = wireCommit('setQuery', '');\n\n/**\n * Sets the total results.\n *\n * @public\n */\nexport const setTotalResultsWire = wireCommit('setTotalResults');\n\n/**\n * Sets the total results taking the {@link SearchXEvents.SearchResponseChanged} payload.\n *\n * @public\n */\nexport const setTotalResultsFromSearchResponseChangedWire = mapWire<\n SearchXEvents['SearchResponseChanged'],\n ExtractMutationPayload<'semanticQueries', 'setTotalResults'>\n>(setTotalResultsWire, ({ totalResults }) => totalResults);\n\n/**\n * Sets the semantic queries state `params`.\n *\n * @public\n */\nexport const setSemanticQueriesExtraParamsWire = wireCommit('setParams');\n\n/**\n * Wiring configuration for the {@link SemanticQueriesXModule | semanticQueries module}.\n *\n * @internal\n */\nexport const semanticQueriesWiring = createWiring({\n UserClearedQuery: {\n clearQueryWire\n },\n SemanticQueryRequestUpdated: {\n fetchAndSaveSemanticQueryWire\n },\n ExtraParamsChanged: {\n setSemanticQueriesExtraParamsWire\n },\n SearchResponseChanged: {\n setQueryFromSearchResponseChangedWire,\n setTotalResultsFromSearchResponseChangedWire\n }\n});\n"],"names":[],"mappings":";;;;AASA;;;;AAIG;AACH,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAErC;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAEpD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAExD;;;;AAIG;MACU,6BAA6B,GAAG,YAAY,CAAC,2BAA2B,EAAE;AAEvF;;;;AAIG;MACU,YAAY,GAAG,UAAU,CAAC,UAAU,EAAE;AAEnD;;;;AAIG;MACU,qCAAqC,GAAG,OAAO,CAG1D,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK,EAAE;AAEnD;;;;AAIG;AACU,MAAA,cAAc,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE,EAAE;AAEzD;;;;AAIG;MACU,mBAAmB,GAAG,UAAU,CAAC,iBAAiB,EAAE;AAEjE;;;;AAIG;AACU,MAAA,4CAA4C,GAAG,OAAO,CAGjE,mBAAmB,EAAE,CAAC,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE;AAE3D;;;;AAIG;MACU,iCAAiC,GAAG,UAAU,CAAC,WAAW,EAAE;AAEzE;;;;AAIG;AACI,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAChD,IAAA,gBAAgB,EAAE;QAChB,cAAc;AACf,KAAA;AACD,IAAA,2BAA2B,EAAE;QAC3B,6BAA6B;AAC9B,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,iCAAiC;AAClC,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,qCAAqC;QACrC,4CAA4C;AAC7C,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/semantic-queries/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireDispatch\n} from '../../wiring/namespaced-wires.factory';\nimport { createWiring } from '../../wiring/wiring.utils';\nimport { mapWire } from '../../wiring/wires.operators';\nimport { SearchXEvents } from '../search/events.types';\nimport { ExtractMutationPayload } from '../../store/store.types';\n\n/**\n * `semanticQueries` {@link XModuleName | name}.\n *\n * @internal\n */\nconst moduleName = 'semanticQueries';\n\n/**\n * WireCommit for {@link SemanticQueriesXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName);\n\n/**\n * WireDispatch for {@link SemanticQueriesXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName);\n\n/**\n * Requests and stores the semantic query results.\n *\n * @public\n */\nexport const fetchAndSaveSemanticQueryWire = wireDispatch('fetchAndSaveSemanticQuery');\n\n/**\n * Sets the query.\n *\n * @public\n */\nexport const setQueryWire = wireCommit('setQuery');\n\n/**\n * Sets the query taking the {@link SearchXEvents.SearchResponseChanged} payload.\n *\n * @public\n */\nexport const setQueryFromSearchResponseChangedWire = mapWire<\n SearchXEvents['SearchResponseChanged'],\n ExtractMutationPayload<'semanticQueries', 'setQuery'>\n>(setQueryWire, ({ request: { query } }) => query);\n\n/**\n * Clears the query.\n *\n * @public\n */\nexport const clearQueryWire = wireCommit('setQuery', '');\n\n/**\n * Sets the total results.\n *\n * @public\n */\nexport const setTotalResultsWire = wireCommit('setTotalResults');\n\n/** Sets the related prompts state `relatedTags`. */\nconst setSemanticQueriesRelatedTags = wireCommit('setSemanticQueriesRelatedTags');\n\n/**\n * Sets the total results taking the {@link SearchXEvents.SearchResponseChanged} payload.\n *\n * @public\n */\nexport const setTotalResultsFromSearchResponseChangedWire = mapWire<\n SearchXEvents['SearchResponseChanged'],\n ExtractMutationPayload<'semanticQueries', 'setTotalResults'>\n>(setTotalResultsWire, ({ totalResults }) => totalResults);\n\n/**\n * Sets the semantic queries state `params`.\n *\n * @public\n */\nexport const setSemanticQueriesExtraParamsWire = wireCommit('setParams');\n\n/**\n * Wiring configuration for the {@link SemanticQueriesXModule | semanticQueries module}.\n *\n * @internal\n */\nexport const semanticQueriesWiring = createWiring({\n UserClearedQuery: {\n clearQueryWire\n },\n SemanticQueryRequestUpdated: {\n fetchAndSaveSemanticQueryWire\n },\n ExtraParamsChanged: {\n setSemanticQueriesExtraParamsWire\n },\n SearchResponseChanged: {\n setQueryFromSearchResponseChangedWire,\n setTotalResultsFromSearchResponseChangedWire\n },\n SelectedRelatedTagsChanged: {\n setSemanticQueriesRelatedTags\n }\n});\n"],"names":[],"mappings":";;;;AASA;;;;AAIG;AACH,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAErC;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAEpD;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAExD;;;;AAIG;MACU,6BAA6B,GAAG,YAAY,CAAC,2BAA2B,EAAE;AAEvF;;;;AAIG;MACU,YAAY,GAAG,UAAU,CAAC,UAAU,EAAE;AAEnD;;;;AAIG;MACU,qCAAqC,GAAG,OAAO,CAG1D,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK,EAAE;AAEnD;;;;AAIG;AACU,MAAA,cAAc,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE,EAAE;AAEzD;;;;AAIG;MACU,mBAAmB,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