@empathyco/x-components 6.0.0-alpha.4 → 6.0.0-alpha.40

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 (690) hide show
  1. package/CHANGELOG.md +348 -0
  2. package/core/index.js +7 -1
  3. package/core/index.js.map +1 -1
  4. package/design-system/deprecated-full-theme.css +299 -298
  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 +11 -0
  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 +21 -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.platformsearchresponse.catalog.md +6 -0
  25. package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.md +1 -1
  26. package/docs/API-reference/api/x-adapter-platform.relatedpromptschema.md +13 -0
  27. package/docs/API-reference/api/x-adapter-platform.relatedpromptsendpointadapter.md +13 -0
  28. package/docs/API-reference/api/x-adapter-platform.relatedpromptsrequestmapper.md +13 -0
  29. package/docs/API-reference/api/x-adapter-platform.relatedpromptsrequestschema.md +13 -0
  30. package/docs/API-reference/api/x-adapter-platform.relatedpromptsresponsemapper.md +13 -0
  31. package/docs/API-reference/api/x-adapter-platform.relatedpromptsresponseschema.md +13 -0
  32. package/docs/API-reference/api/x-components.animationprop.md +6 -1
  33. package/docs/API-reference/api/x-components.bannerslist.md +3 -3
  34. package/docs/API-reference/api/x-components.baseaddtocart.md +1 -0
  35. package/docs/API-reference/api/x-components.basedropdown.md +5 -5
  36. package/docs/API-reference/api/x-components.baseeventsmodal.md +2 -2
  37. package/docs/API-reference/api/x-components.basegrid.md +3 -3
  38. package/docs/API-reference/api/x-components.baseheadertogglepanel.md +5 -5
  39. package/docs/API-reference/api/x-components.baseidmodal.md +2 -2
  40. package/docs/API-reference/api/x-components.baseidtogglepanel.md +5 -5
  41. package/docs/API-reference/api/x-components.basemodal.md +10 -10
  42. package/docs/API-reference/api/x-components.baseresultimage.md +9 -9
  43. package/docs/API-reference/api/x-components.baseslider.md +70 -0
  44. package/docs/API-reference/api/x-components.basesuggestions.md +3 -3
  45. package/docs/API-reference/api/x-components.basetabspanel.md +8 -8
  46. package/docs/API-reference/api/x-components.basetogglepanel.md +3 -3
  47. package/docs/API-reference/api/x-components.basevariablecolumngrid.md +3 -3
  48. package/docs/API-reference/api/x-components.cancelfetchandsaverelatedprompts.md +13 -0
  49. package/docs/API-reference/api/x-components.configmutations.config.md +11 -0
  50. package/docs/API-reference/api/x-components.configmutations.md +29 -0
  51. package/docs/API-reference/api/x-components.configmutations.mergeconfig.md +24 -0
  52. package/docs/API-reference/api/x-components.configmutations.setconfig.md +24 -0
  53. package/docs/API-reference/api/x-components.createrelatedtagsquerygetter.md +26 -0
  54. package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.getrelatedtags.md +13 -0
  55. package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.md +20 -0
  56. package/docs/API-reference/api/x-components.createtracktoolingadd2cartwire.md +19 -0
  57. package/docs/API-reference/api/x-components.createtracktoolingdisplaywire.md +19 -0
  58. package/docs/API-reference/api/x-components.displayclickprovider.md +58 -0
  59. package/docs/API-reference/api/x-components.empathize.md +5 -5
  60. package/docs/API-reference/api/x-components.empathizemutations.md +1 -1
  61. package/docs/API-reference/api/x-components.facets.md +3 -3
  62. package/docs/API-reference/api/x-components.facetsmutations.md +1 -1
  63. package/docs/API-reference/api/x-components.featurelocation.md +1 -1
  64. package/docs/API-reference/api/x-components.fetchandsaverelatedprompts.md +13 -0
  65. package/docs/API-reference/api/x-components.fetchrelatedprompts.md +13 -0
  66. package/docs/API-reference/api/x-components.filterslist.md +3 -3
  67. package/docs/API-reference/api/x-components.globalxbus.md +12 -0
  68. package/docs/API-reference/api/x-components.hierarchicalfilter.md +8 -2
  69. package/docs/API-reference/api/x-components.historyqueriesmutations.md +1 -1
  70. package/docs/API-reference/api/x-components.historyqueriesstate.md +1 -1
  71. package/docs/API-reference/api/x-components.identifierresults.md +3 -3
  72. package/docs/API-reference/api/x-components.identifierresultsmutations.md +1 -1
  73. package/docs/API-reference/api/x-components.identifierresultsstate.md +1 -1
  74. package/docs/API-reference/api/x-components.installxoptions.domelement.md +1 -1
  75. package/docs/API-reference/api/x-components.installxoptions.installextraplugins.md +2 -2
  76. package/docs/API-reference/api/x-components.installxoptions.md +1 -1
  77. package/docs/API-reference/api/x-components.itemslist.md +3 -3
  78. package/docs/API-reference/api/x-components.mainmodal.md +2 -2
  79. package/docs/API-reference/api/x-components.md +33 -1
  80. package/docs/API-reference/api/x-components.mergeconfig.md +27 -0
  81. package/docs/API-reference/api/x-components.multicolumnmaxwidthlayout.md +5 -5
  82. package/docs/API-reference/api/x-components.myhistory.md +3 -3
  83. package/docs/API-reference/api/x-components.nextqueriesgroup.md +22 -0
  84. package/docs/API-reference/api/x-components.nextqueriesgroup.modelname.md +11 -0
  85. package/docs/API-reference/api/x-components.nextqueriesgroup.nextqueries.md +11 -0
  86. package/docs/API-reference/api/x-components.nextquerieslist.md +3 -3
  87. package/docs/API-reference/api/x-components.nextqueriesmutations.md +1 -1
  88. package/docs/API-reference/api/x-components.nextqueriesstate.md +1 -1
  89. package/docs/API-reference/api/x-components.pageselector.md +80 -0
  90. package/docs/API-reference/api/x-components.partialresultslist.md +3 -3
  91. package/docs/API-reference/api/x-components.popularsearchesmutations.md +1 -1
  92. package/docs/API-reference/api/x-components.promotedslist.md +3 -3
  93. package/docs/API-reference/api/x-components.queriespreviewmutations.md +1 -1
  94. package/docs/API-reference/api/x-components.queryfeature.md +1 -1
  95. package/docs/API-reference/api/x-components.querymutations.md +20 -0
  96. package/docs/API-reference/api/x-components.querymutations.setquery.md +24 -0
  97. package/docs/API-reference/api/x-components.querypreviewlist.md +3 -3
  98. package/docs/API-reference/api/x-components.querystate.md +20 -0
  99. package/docs/API-reference/api/x-components.querystate.query.md +13 -0
  100. package/docs/API-reference/api/x-components.querysuggestionsmutations.md +1 -1
  101. package/docs/API-reference/api/x-components.querysuggestionsstate.md +1 -1
  102. package/docs/API-reference/api/x-components.recommendations.md +3 -3
  103. package/docs/API-reference/api/x-components.recommendationsmutations.md +1 -1
  104. package/docs/API-reference/api/x-components.relatedprompt.md +33 -0
  105. package/docs/API-reference/api/x-components.relatedpromptrequest.md +13 -0
  106. package/docs/API-reference/api/x-components.relatedpromptsactioncontext.md +15 -0
  107. package/docs/API-reference/api/x-components.relatedpromptsactions.cancelfetchandsaverelatedprompts.md +17 -0
  108. package/docs/API-reference/api/x-components.relatedpromptsactions.fetchandsaverelatedprompts.md +24 -0
  109. package/docs/API-reference/api/x-components.relatedpromptsactions.fetchrelatedprompts.md +24 -0
  110. package/docs/API-reference/api/x-components.relatedpromptsactions.md +22 -0
  111. package/docs/API-reference/api/x-components.relatedpromptsgetters.md +20 -0
  112. package/docs/API-reference/api/x-components.relatedpromptsgetters.request.md +13 -0
  113. package/docs/API-reference/api/x-components.relatedpromptslist.md +72 -0
  114. package/docs/API-reference/api/x-components.relatedpromptsmutations.md +26 -0
  115. package/docs/API-reference/api/x-components.relatedpromptsmutations.resetrelatedpromptsstate.md +17 -0
  116. package/docs/API-reference/api/x-components.relatedpromptsmutations.resetselectedprompt.md +17 -0
  117. package/docs/API-reference/api/x-components.relatedpromptsmutations.setparams.md +24 -0
  118. package/docs/API-reference/api/x-components.relatedpromptsmutations.setrelatedpromptsproducts.md +24 -0
  119. package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedprompt.md +24 -0
  120. package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedquery.md +24 -0
  121. package/docs/API-reference/api/x-components.relatedpromptsstate.md +24 -0
  122. package/docs/API-reference/api/x-components.relatedpromptsstate.params.md +13 -0
  123. package/docs/API-reference/api/x-components.relatedpromptsstate.relatedprompts.md +13 -0
  124. package/docs/API-reference/api/x-components.relatedpromptsstate.selectedprompt.md +13 -0
  125. package/docs/API-reference/api/x-components.relatedpromptsstate.selectedquery.md +13 -0
  126. package/docs/API-reference/api/x-components.relatedpromptstaglist.md +67 -0
  127. package/docs/API-reference/api/x-components.relatedpromptsxevents.md +24 -0
  128. package/docs/API-reference/api/x-components.relatedpromptsxevents.relatedpromptsrequestupdated.md +13 -0
  129. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptadd2cart.md +13 -0
  130. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptresult.md +13 -0
  131. package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedprompt.md +13 -0
  132. package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedpromptquery.md +13 -0
  133. package/docs/API-reference/api/x-components.relatedpromptsxmodule.md +13 -0
  134. package/docs/API-reference/api/x-components.relatedpromptsxstoremodule.md +15 -0
  135. package/docs/API-reference/api/x-components.relatedtags.md +3 -3
  136. package/docs/API-reference/api/x-components.relatedtagsmutations.md +1 -1
  137. package/docs/API-reference/api/x-components.relatedtagsstate.md +1 -1
  138. package/docs/API-reference/api/x-components.resultslist.md +3 -3
  139. package/docs/API-reference/api/x-components.scrolltotop.md +5 -5
  140. package/docs/API-reference/api/x-components.searchboxmutations.md +1 -1
  141. package/docs/API-reference/api/x-components.searchboxstate.md +1 -1
  142. package/docs/API-reference/api/x-components.searchconfig.md +1 -0
  143. package/docs/API-reference/api/x-components.searchconfig.pagemode.md +11 -0
  144. package/docs/API-reference/api/x-components.searchinputplaceholder.md +3 -3
  145. package/docs/API-reference/api/x-components.searchmutations.md +2 -1
  146. package/docs/API-reference/api/x-components.searchmutations.setstats.md +24 -0
  147. package/docs/API-reference/api/x-components.searchstate.md +2 -1
  148. package/docs/API-reference/api/x-components.searchstate.stats.md +13 -0
  149. package/docs/API-reference/api/x-components.searchxevents.md +1 -0
  150. package/docs/API-reference/api/x-components.searchxevents.userselectedapage.md +13 -0
  151. package/docs/API-reference/api/x-components.selectedfilterslist.md +3 -3
  152. package/docs/API-reference/api/x-components.semanticqueriesmutations.md +1 -1
  153. package/docs/API-reference/api/x-components.semanticqueriesstate.md +1 -1
  154. package/docs/API-reference/api/x-components.setconfig.md +27 -0
  155. package/docs/API-reference/api/x-components.setquery.md +25 -0
  156. package/docs/API-reference/api/x-components.simplefilter.md +6 -0
  157. package/docs/API-reference/api/x-components.singlecolumnlayout.md +3 -3
  158. package/docs/API-reference/api/x-components.snippetcallbacks.md +6 -0
  159. package/docs/API-reference/api/x-components.sortdropdown.md +1 -1
  160. package/docs/API-reference/api/x-components.taggingmutations.md +1 -1
  161. package/docs/API-reference/api/x-components.tracktoolingadd2cartwire.md +13 -0
  162. package/docs/API-reference/api/x-components.tracktoolingdisplayclickedwire.md +13 -0
  163. package/docs/API-reference/api/x-components.typingoptions.md +22 -0
  164. package/docs/API-reference/api/x-components.typingoptions.speed.md +13 -0
  165. package/docs/API-reference/api/x-components.typingoptions.targetattr.md +18 -0
  166. package/docs/API-reference/api/x-components.typingoptions.text.md +13 -0
  167. package/docs/API-reference/api/x-components.urlmutations.md +1 -1
  168. package/docs/API-reference/api/x-components.urlstate.md +1 -1
  169. package/docs/API-reference/api/x-components.usealiasapi.md +1 -0
  170. package/docs/API-reference/api/x-components.usealiasapi.pricestats.md +16 -0
  171. package/docs/API-reference/api/x-components.xeventstypes.md +3 -3
  172. package/docs/API-reference/api/x-components.xmodulestree.md +1 -0
  173. package/docs/API-reference/api/x-components.xmodulestree.relatedprompts.md +11 -0
  174. package/docs/API-reference/api/x-types.md +5 -0
  175. package/docs/API-reference/api/x-types.relatedprompt.md +24 -0
  176. package/docs/API-reference/api/x-types.relatedprompt.relatedpromptnextqueries.md +13 -0
  177. package/docs/API-reference/api/x-types.relatedprompt.suggestiontext.md +13 -0
  178. package/docs/API-reference/api/x-types.relatedprompt.toolingdisplaytagging.md +13 -0
  179. package/docs/API-reference/api/x-types.relatedprompt.type.md +13 -0
  180. package/docs/API-reference/api/x-types.relatedpromptnextquery.md +23 -0
  181. package/docs/API-reference/api/x-types.relatedpromptnextquery.query.md +13 -0
  182. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayadd2carttagging.md +13 -0
  183. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayclicktagging.md +13 -0
  184. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplaytagging.md +13 -0
  185. package/docs/API-reference/api/x-types.relatedpromptsrequest.md +15 -0
  186. package/docs/API-reference/api/x-types.relatedpromptsresponse.md +20 -0
  187. package/docs/API-reference/api/x-types.relatedpromptsresponse.relatedprompts.md +11 -0
  188. package/docs/API-reference/api/x-types.searchresponse.md +1 -0
  189. package/docs/API-reference/api/x-types.searchresponse.stats.md +11 -0
  190. package/docs/API-reference/api/x-types.stats.md +22 -0
  191. package/docs/API-reference/api/x-types.stats.price.md +14 -0
  192. package/docs/API-reference/api/x-types.xcomponentsadapter.md +1 -0
  193. package/docs/API-reference/api/x-types.xcomponentsadapter.relatedprompts.md +11 -0
  194. package/docs/API-reference/components/common/result/x-components.base-result-image.md +2 -2
  195. package/docs/API-reference/components/common/x-components.base-slider.md +189 -0
  196. package/docs/API-reference/components/common/x-components.display-click-provider.md +16 -0
  197. package/docs/API-reference/components/common/x-components.items-list.md +1 -1
  198. package/docs/API-reference/components/common/x-components.page-selector.md +136 -0
  199. package/docs/API-reference/components/facets/x-components.facets/facets.md +1 -1
  200. package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +1 -1
  201. package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +16 -0
  202. package/docs/API-reference/components/related-prompts/x-components.related-prompts-list.md +196 -0
  203. package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +31 -0
  204. package/docs/API-reference/components/search/x-components.results-list.md +1 -1
  205. package/js/components/animations/fade-and-slide.vue.js +1 -2
  206. package/js/components/animations/fade-and-slide.vue.js.map +1 -1
  207. package/js/components/base-dropdown.vue.js +1 -3
  208. package/js/components/base-dropdown.vue.js.map +1 -1
  209. package/js/components/base-dropdown.vue2.js +1 -7
  210. package/js/components/base-dropdown.vue2.js.map +1 -1
  211. package/js/components/base-event-button.vue.js +1 -2
  212. package/js/components/base-event-button.vue.js.map +1 -1
  213. package/js/components/base-grid.vue.js +11 -18
  214. package/js/components/base-grid.vue.js.map +1 -1
  215. package/js/components/base-grid.vue2.js.map +1 -1
  216. package/js/components/base-grid.vue3.js +1 -1
  217. package/js/components/base-keyboard-navigation.vue.js +1 -2
  218. package/js/components/base-keyboard-navigation.vue.js.map +1 -1
  219. package/js/components/base-rating.vue.js +1 -3
  220. package/js/components/base-rating.vue.js.map +1 -1
  221. package/js/components/base-slider.vue.js +65 -0
  222. package/js/components/base-slider.vue.js.map +1 -0
  223. package/js/components/base-slider.vue2.js +109 -0
  224. package/js/components/base-slider.vue2.js.map +1 -0
  225. package/js/components/base-slider.vue3.js +7 -0
  226. package/js/components/base-slider.vue3.js.map +1 -0
  227. package/js/components/base-variable-column-grid.vue.js +1 -2
  228. package/js/components/base-variable-column-grid.vue.js.map +1 -1
  229. package/js/components/column-picker/base-column-picker-dropdown.vue.js +1 -3
  230. package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
  231. package/js/components/column-picker/base-column-picker-list.vue.js +1 -3
  232. package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
  233. package/js/components/display-click-provider.vue.js +69 -0
  234. package/js/components/display-click-provider.vue.js.map +1 -0
  235. package/js/components/display-click-provider.vue2.js +6 -0
  236. package/js/components/display-click-provider.vue2.js.map +1 -0
  237. package/js/components/filters/labels/base-rating-filter-label.vue.js +1 -3
  238. package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
  239. package/js/components/icons/cross-tiny.vue.js +2 -2
  240. package/js/components/icons/plus.vue.js +2 -2
  241. package/js/components/items-list.vue.js +1 -2
  242. package/js/components/items-list.vue.js.map +1 -1
  243. package/js/components/items-list.vue2.js +2 -2
  244. package/js/components/items-list.vue2.js.map +1 -1
  245. package/js/components/layouts/fixed-header-and-asides-layout.vue.js +1 -7
  246. package/js/components/layouts/fixed-header-and-asides-layout.vue.js.map +1 -1
  247. package/js/components/layouts/multi-column-max-width-layout.vue.js +1 -9
  248. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  249. package/js/components/layouts/single-column-layout.vue.js +1 -9
  250. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  251. package/js/components/modals/base-events-modal-close.vue.js +1 -2
  252. package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
  253. package/js/components/modals/base-events-modal-open.vue.js +1 -2
  254. package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
  255. package/js/components/modals/base-id-modal-close.vue.js +1 -2
  256. package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
  257. package/js/components/modals/base-id-modal-open.vue.js +1 -2
  258. package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
  259. package/js/components/modals/base-modal.vue.js +1 -2
  260. package/js/components/modals/base-modal.vue.js.map +1 -1
  261. package/js/components/modals/base-modal.vue2.js +13 -6
  262. package/js/components/modals/base-modal.vue2.js.map +1 -1
  263. package/js/components/page-loader-button.vue.js +8 -10
  264. package/js/components/page-loader-button.vue.js.map +1 -1
  265. package/js/components/page-loader-button.vue2.js.map +1 -1
  266. package/js/components/page-loader-button.vue3.js +7 -0
  267. package/js/components/page-loader-button.vue3.js.map +1 -0
  268. package/js/components/page-selector.vue.js +78 -0
  269. package/js/components/page-selector.vue.js.map +1 -0
  270. package/js/components/page-selector.vue2.js +128 -0
  271. package/js/components/page-selector.vue2.js.map +1 -0
  272. package/js/components/page-selector.vue3.js +7 -0
  273. package/js/components/page-selector.vue3.js.map +1 -0
  274. package/js/components/panels/base-header-toggle-panel.vue.js +1 -5
  275. package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
  276. package/js/components/panels/base-id-toggle-panel-button.vue.js +1 -2
  277. package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
  278. package/js/components/panels/base-id-toggle-panel.vue.js +1 -2
  279. package/js/components/panels/base-id-toggle-panel.vue.js.map +1 -1
  280. package/js/components/panels/base-tabs-panel.vue.js +1 -4
  281. package/js/components/panels/base-tabs-panel.vue.js.map +1 -1
  282. package/js/components/panels/base-toggle-panel.vue.js +1 -2
  283. package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
  284. package/js/components/result/base-result-add-to-cart.vue.js +3 -3
  285. package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
  286. package/js/components/result/base-result-add-to-cart.vue2.js +19 -5
  287. package/js/components/result/base-result-add-to-cart.vue2.js.map +1 -1
  288. package/js/components/result/base-result-current-price.vue.js +1 -2
  289. package/js/components/result/base-result-current-price.vue.js.map +1 -1
  290. package/js/components/result/base-result-image.vue.js +39 -59
  291. package/js/components/result/base-result-image.vue.js.map +1 -1
  292. package/js/components/result/base-result-image.vue2.js +5 -5
  293. package/js/components/result/base-result-image.vue2.js.map +1 -1
  294. package/js/components/result/base-result-link.vue.js +1 -2
  295. package/js/components/result/base-result-link.vue.js.map +1 -1
  296. package/js/components/result/base-result-previous-price.vue.js +1 -2
  297. package/js/components/result/base-result-previous-price.vue.js.map +1 -1
  298. package/js/components/result/base-result-rating.vue.js +1 -4
  299. package/js/components/result/base-result-rating.vue.js.map +1 -1
  300. package/js/components/result/result-variant-selector.vue.js +1 -3
  301. package/js/components/result/result-variant-selector.vue.js.map +1 -1
  302. package/js/components/sliding-panel.vue.js +3 -6
  303. package/js/components/sliding-panel.vue.js.map +1 -1
  304. package/js/components/suggestions/base-suggestion.vue.js +1 -2
  305. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  306. package/js/components/suggestions/base-suggestions.vue.js +1 -2
  307. package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
  308. package/js/composables/use-alias-api.js +4 -1
  309. package/js/composables/use-alias-api.js.map +1 -1
  310. package/js/composables/use-getter.js +1 -1
  311. package/js/composables/use-state.js +1 -1
  312. package/js/directives/typing.js +52 -0
  313. package/js/directives/typing.js.map +1 -0
  314. package/js/index.js +18 -2
  315. package/js/index.js.map +1 -1
  316. package/js/types/animation-prop.js +5 -0
  317. package/js/types/animation-prop.js.map +1 -1
  318. package/js/x-installer/x-installer/x-installer.js +3 -3
  319. package/js/x-installer/x-installer/x-installer.js.map +1 -1
  320. package/js/x-modules/device/store/emitters.js +1 -0
  321. package/js/x-modules/device/store/emitters.js.map +1 -1
  322. package/js/x-modules/empathize/components/empathize.vue.js +1 -2
  323. package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
  324. package/js/x-modules/empathize/components/empathize.vue2.js +6 -0
  325. package/js/x-modules/empathize/components/empathize.vue2.js.map +1 -1
  326. package/js/x-modules/empathize/store/emitters.js +1 -0
  327. package/js/x-modules/empathize/store/emitters.js.map +1 -1
  328. package/js/x-modules/experience-controls/store/emitters.js +1 -0
  329. package/js/x-modules/experience-controls/store/emitters.js.map +1 -1
  330. package/js/x-modules/extra-params/components/extra-params.vue.js +1 -1
  331. package/js/x-modules/extra-params/components/extra-params.vue.js.map +1 -1
  332. package/js/x-modules/extra-params/store/emitters.js +1 -0
  333. package/js/x-modules/extra-params/store/emitters.js.map +1 -1
  334. package/js/x-modules/facets/components/facets/facets.vue.js +20 -33
  335. package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
  336. package/js/x-modules/facets/components/facets/facets.vue2.js +2 -2
  337. package/js/x-modules/facets/components/facets/facets.vue2.js.map +1 -1
  338. package/js/x-modules/facets/components/filters/all-filter.vue.js +1 -2
  339. package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
  340. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +1 -6
  341. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
  342. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +1 -3
  343. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
  344. package/js/x-modules/facets/components/filters/number-range-filter.vue.js +1 -3
  345. package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
  346. package/js/x-modules/facets/components/filters/simple-filter.vue.js +1 -3
  347. package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
  348. package/js/x-modules/facets/components/lists/filters-list.vue.js +1 -2
  349. package/js/x-modules/facets/components/lists/filters-list.vue.js.map +1 -1
  350. package/js/x-modules/facets/components/lists/filters-search.vue.js +1 -3
  351. package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
  352. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +11 -18
  353. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
  354. package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js +2 -2
  355. package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js.map +1 -1
  356. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +1 -4
  357. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  358. package/js/x-modules/history-queries/components/clear-history-queries.vue.js +1 -2
  359. package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
  360. package/js/x-modules/history-queries/components/history-queries.vue.js +1 -10
  361. package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
  362. package/js/x-modules/history-queries/components/history-query.vue.js +1 -6
  363. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  364. package/js/x-modules/history-queries/components/my-history.vue.js +1 -4
  365. package/js/x-modules/history-queries/components/my-history.vue.js.map +1 -1
  366. package/js/x-modules/history-queries/components/remove-history-query.vue.js +1 -2
  367. package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
  368. package/js/x-modules/history-queries/store/emitters.js +1 -0
  369. package/js/x-modules/history-queries/store/emitters.js.map +1 -1
  370. package/js/x-modules/identifier-results/components/identifier-results.vue.js +1 -2
  371. package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
  372. package/js/x-modules/identifier-results/store/emitters.js +1 -0
  373. package/js/x-modules/identifier-results/store/emitters.js.map +1 -1
  374. package/js/x-modules/next-queries/components/next-queries.vue.js +1 -7
  375. package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
  376. package/js/x-modules/next-queries/components/next-query-preview.vue.js +1 -3
  377. package/js/x-modules/next-queries/components/next-query-preview.vue.js.map +1 -1
  378. package/js/x-modules/next-queries/components/next-query.vue.js +1 -4
  379. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  380. package/js/x-modules/next-queries/store/emitters.js +1 -0
  381. package/js/x-modules/next-queries/store/emitters.js.map +1 -1
  382. package/js/x-modules/popular-searches/components/popular-search.vue.js +1 -4
  383. package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
  384. package/js/x-modules/popular-searches/components/popular-searches.vue.js +1 -7
  385. package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
  386. package/js/x-modules/queries-preview/components/query-preview-button.vue.js +1 -2
  387. package/js/x-modules/queries-preview/components/query-preview-button.vue.js.map +1 -1
  388. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js +6 -0
  389. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js.map +1 -1
  390. package/js/x-modules/queries-preview/components/query-preview-list.vue.js.map +1 -1
  391. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js +15 -2
  392. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js.map +1 -1
  393. package/js/x-modules/queries-preview/components/query-preview.vue.js +1 -2
  394. package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
  395. package/js/x-modules/queries-preview/components/query-preview.vue2.js +7 -1
  396. package/js/x-modules/queries-preview/components/query-preview.vue2.js.map +1 -1
  397. package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js +2 -1
  398. package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js.map +1 -1
  399. package/js/x-modules/queries-preview/store/emitters.js +1 -0
  400. package/js/x-modules/queries-preview/store/emitters.js.map +1 -1
  401. package/js/x-modules/queries-preview/store/module.js +1 -1
  402. package/js/x-modules/queries-preview/store/module.js.map +1 -1
  403. package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js +6 -4
  404. package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js.map +1 -1
  405. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +1 -4
  406. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
  407. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +1 -7
  408. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
  409. package/js/x-modules/query-suggestions/store/emitters.js +1 -0
  410. package/js/x-modules/query-suggestions/store/emitters.js.map +1 -1
  411. package/js/x-modules/recommendations/components/recommendations.vue.js +1 -2
  412. package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
  413. package/js/x-modules/recommendations/store/emitters.js +1 -0
  414. package/js/x-modules/recommendations/store/emitters.js.map +1 -1
  415. package/js/x-modules/related-prompts/components/related-prompt.vue.js +25 -0
  416. package/js/x-modules/related-prompts/components/related-prompt.vue.js.map +1 -0
  417. package/js/x-modules/related-prompts/components/related-prompt.vue2.js +31 -0
  418. package/js/x-modules/related-prompts/components/related-prompt.vue2.js.map +1 -0
  419. package/js/x-modules/related-prompts/components/related-prompt.vue3.js +7 -0
  420. package/js/x-modules/related-prompts/components/related-prompt.vue3.js.map +1 -0
  421. package/js/x-modules/related-prompts/components/related-prompts-list.vue.js +154 -0
  422. package/js/x-modules/related-prompts/components/related-prompts-list.vue.js.map +1 -0
  423. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js +6 -0
  424. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js.map +1 -0
  425. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js +89 -0
  426. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js.map +1 -0
  427. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js +221 -0
  428. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js.map +1 -0
  429. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js +7 -0
  430. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js.map +1 -0
  431. package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js +29 -0
  432. package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js.map +1 -0
  433. package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js +20 -0
  434. package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js.map +1 -0
  435. package/js/x-modules/related-prompts/store/emitters.js +15 -0
  436. package/js/x-modules/related-prompts/store/emitters.js.map +1 -0
  437. package/js/x-modules/related-prompts/store/getters/request.getter.js +16 -0
  438. package/js/x-modules/related-prompts/store/getters/request.getter.js.map +1 -0
  439. package/js/x-modules/related-prompts/store/module.js +61 -0
  440. package/js/x-modules/related-prompts/store/module.js.map +1 -0
  441. package/js/x-modules/related-prompts/wiring.js +99 -0
  442. package/js/x-modules/related-prompts/wiring.js.map +1 -0
  443. package/js/x-modules/related-prompts/x-module.js +21 -0
  444. package/js/x-modules/related-prompts/x-module.js.map +1 -0
  445. package/js/x-modules/related-tags/components/related-tag.vue.js +1 -2
  446. package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
  447. package/js/x-modules/related-tags/components/related-tags.vue.js +1 -4
  448. package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
  449. package/js/x-modules/related-tags/store/emitters.js +1 -0
  450. package/js/x-modules/related-tags/store/emitters.js.map +1 -1
  451. package/js/x-modules/scroll/components/scroll-to-top.vue.js +1 -2
  452. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
  453. package/js/x-modules/scroll/components/scroll-to-top.vue2.js +6 -0
  454. package/js/x-modules/scroll/components/scroll-to-top.vue2.js.map +1 -1
  455. package/js/x-modules/scroll/store/emitters.js +1 -0
  456. package/js/x-modules/scroll/store/emitters.js.map +1 -1
  457. package/js/x-modules/search/components/partial-results-list.vue.js +1 -2
  458. package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
  459. package/js/x-modules/search/components/results-list.vue.js +2 -2
  460. package/js/x-modules/search/components/results-list.vue.js.map +1 -1
  461. package/js/x-modules/search/components/sort-dropdown.vue.js +1 -3
  462. package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
  463. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +10 -3
  464. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
  465. package/js/x-modules/search/store/actions/save-search-response.action.js +2 -1
  466. package/js/x-modules/search/store/actions/save-search-response.action.js.map +1 -1
  467. package/js/x-modules/search/store/emitters.js +1 -0
  468. package/js/x-modules/search/store/emitters.js.map +1 -1
  469. package/js/x-modules/search/store/module.js +9 -3
  470. package/js/x-modules/search/store/module.js.map +1 -1
  471. package/js/x-modules/search/wiring.js +4 -0
  472. package/js/x-modules/search/wiring.js.map +1 -1
  473. package/js/x-modules/search-box/components/clear-search-input.vue.js +1 -2
  474. package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
  475. package/js/x-modules/search-box/components/search-button.vue.js +1 -2
  476. package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
  477. package/js/x-modules/search-box/store/emitters.js +1 -0
  478. package/js/x-modules/search-box/store/emitters.js.map +1 -1
  479. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js +1 -3
  480. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js.map +1 -1
  481. package/js/x-modules/semantic-queries/components/semantic-query.vue.js +1 -4
  482. package/js/x-modules/semantic-queries/components/semantic-query.vue.js.map +1 -1
  483. package/js/x-modules/tagging/store/module.js +5 -1
  484. package/js/x-modules/tagging/store/module.js.map +1 -1
  485. package/js/x-modules/tagging/wiring.js +64 -1
  486. package/js/x-modules/tagging/wiring.js.map +1 -1
  487. package/js/x-modules/url/store/emitters.js +1 -0
  488. package/js/x-modules/url/store/emitters.js.map +1 -1
  489. package/package.json +51 -50
  490. package/related-prompts/index.d.ts +1 -0
  491. package/related-prompts/index.js +10 -0
  492. package/report/x-adapter-platform.api.json +881 -53
  493. package/report/x-components.api.json +16507 -17993
  494. package/report/x-components.api.md +720 -167
  495. package/report/x-types.api.json +496 -0
  496. package/tagging/index.js +1 -1
  497. package/types/adapter/e2e-adapter.d.ts.map +1 -1
  498. package/types/adapter/mocked-responses.d.ts +3 -0
  499. package/types/adapter/mocked-responses.d.ts.map +1 -1
  500. package/types/components/base-dropdown.vue.d.ts +5 -5
  501. package/types/components/base-dropdown.vue.d.ts.map +1 -1
  502. package/types/components/base-grid.vue.d.ts +3 -3
  503. package/types/components/base-slider.vue.d.ts +74 -0
  504. package/types/components/base-slider.vue.d.ts.map +1 -0
  505. package/types/components/base-variable-column-grid.vue.d.ts +3 -3
  506. package/types/components/display-click-provider.vue.d.ts +52 -0
  507. package/types/components/display-click-provider.vue.d.ts.map +1 -0
  508. package/types/components/global-x-bus.vue.d.ts +12 -0
  509. package/types/components/global-x-bus.vue.d.ts.map +1 -1
  510. package/types/components/index.d.ts +3 -0
  511. package/types/components/index.d.ts.map +1 -1
  512. package/types/components/items-list.vue.d.ts +3 -3
  513. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts +5 -5
  514. package/types/components/layouts/single-column-layout.vue.d.ts +3 -3
  515. package/types/components/modals/base-events-modal.vue.d.ts +2 -2
  516. package/types/components/modals/base-id-modal.vue.d.ts +2 -2
  517. package/types/components/modals/base-modal.vue.d.ts +10 -10
  518. package/types/components/modals/base-modal.vue.d.ts.map +1 -1
  519. package/types/components/modals/main-modal.vue.d.ts +2 -2
  520. package/types/components/page-selector.vue.d.ts +125 -0
  521. package/types/components/page-selector.vue.d.ts.map +1 -0
  522. package/types/components/panels/base-header-toggle-panel.vue.d.ts +5 -5
  523. package/types/components/panels/base-id-toggle-panel.vue.d.ts +5 -5
  524. package/types/components/panels/base-tabs-panel.vue.d.ts +8 -8
  525. package/types/components/panels/base-toggle-panel.vue.d.ts +3 -3
  526. package/types/components/result/base-result-add-to-cart.vue.d.ts +2 -0
  527. package/types/components/result/base-result-add-to-cart.vue.d.ts.map +1 -1
  528. package/types/components/result/base-result-image.vue.d.ts +10 -10
  529. package/types/components/result/base-result-image.vue.d.ts.map +1 -1
  530. package/types/components/snippet-callbacks.vue.d.ts +6 -0
  531. package/types/components/snippet-callbacks.vue.d.ts.map +1 -1
  532. package/types/components/suggestions/base-suggestions.vue.d.ts +3 -3
  533. package/types/composables/use-alias-api.d.ts +5 -0
  534. package/types/composables/use-alias-api.d.ts.map +1 -1
  535. package/types/composables/use-store.d.ts +2 -2
  536. package/types/composables/use-store.d.ts.map +1 -1
  537. package/types/directives/index.d.ts +1 -0
  538. package/types/directives/index.d.ts.map +1 -1
  539. package/types/directives/typing.d.ts +30 -0
  540. package/types/directives/typing.d.ts.map +1 -0
  541. package/types/index.d.ts +1 -0
  542. package/types/index.d.ts.map +1 -1
  543. package/types/store/index.d.ts +4 -1
  544. package/types/store/index.d.ts.map +1 -1
  545. package/types/tailwind/plugin-options.d.ts +1 -2
  546. package/types/tailwind/plugin-options.d.ts.map +1 -1
  547. package/types/types/animation-prop.d.ts +6 -2
  548. package/types/types/animation-prop.d.ts.map +1 -1
  549. package/types/types/origin.d.ts +2 -2
  550. package/types/types/origin.d.ts.map +1 -1
  551. package/types/types/page-mode.d.ts +2 -0
  552. package/types/types/page-mode.d.ts.map +1 -0
  553. package/types/views/home/types.d.ts +3 -0
  554. package/types/views/home/types.d.ts.map +1 -1
  555. package/types/wiring/events.types.d.ts +3 -1
  556. package/types/wiring/events.types.d.ts.map +1 -1
  557. package/types/x-installer/x-installer/types.d.ts +2 -2
  558. package/types/x-installer/x-installer/types.d.ts.map +1 -1
  559. package/types/x-installer/x-installer/x-installer.d.ts +4 -4
  560. package/types/x-installer/x-installer/x-installer.d.ts.map +1 -1
  561. package/types/x-modules/empathize/components/empathize.vue.d.ts +5 -5
  562. package/types/x-modules/facets/components/facets/facets.vue.d.ts +3 -3
  563. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +8 -2
  564. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  565. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts +6 -0
  566. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
  567. package/types/x-modules/facets/components/lists/filters-list.vue.d.ts +3 -3
  568. package/types/x-modules/facets/components/lists/selected-filters-list.vue.d.ts +3 -3
  569. package/types/x-modules/history-queries/components/my-history.vue.d.ts +3 -3
  570. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +3 -3
  571. package/types/x-modules/next-queries/components/next-queries-list.vue.d.ts +3 -3
  572. package/types/x-modules/next-queries/index.d.ts +1 -0
  573. package/types/x-modules/next-queries/index.d.ts.map +1 -1
  574. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts +3 -3
  575. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts.map +1 -1
  576. package/types/x-modules/queries-preview/components/query-preview.vue.d.ts.map +1 -1
  577. package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts.map +1 -1
  578. package/types/x-modules/queries-preview/store/module.d.ts.map +1 -1
  579. package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts +4 -2
  580. package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts.map +1 -1
  581. package/types/x-modules/recommendations/components/recommendations.vue.d.ts +3 -3
  582. package/types/x-modules/related-prompts/components/index.d.ts +4 -0
  583. package/types/x-modules/related-prompts/components/index.d.ts.map +1 -0
  584. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts +28 -0
  585. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts.map +1 -0
  586. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts +106 -0
  587. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts.map +1 -0
  588. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts +126 -0
  589. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -0
  590. package/types/x-modules/related-prompts/events.types.d.ts +36 -0
  591. package/types/x-modules/related-prompts/events.types.d.ts.map +1 -0
  592. package/types/x-modules/related-prompts/index.d.ts +6 -0
  593. package/types/x-modules/related-prompts/index.d.ts.map +1 -0
  594. package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts +17 -0
  595. package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts.map +1 -0
  596. package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts +13 -0
  597. package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts.map +1 -0
  598. package/types/x-modules/related-prompts/store/emitters.d.ts +9 -0
  599. package/types/x-modules/related-prompts/store/emitters.d.ts.map +1 -0
  600. package/types/x-modules/related-prompts/store/getters/request.getter.d.ts +13 -0
  601. package/types/x-modules/related-prompts/store/getters/request.getter.d.ts.map +1 -0
  602. package/types/x-modules/related-prompts/store/index.d.ts +7 -0
  603. package/types/x-modules/related-prompts/store/index.d.ts.map +1 -0
  604. package/types/x-modules/related-prompts/store/module.d.ts +8 -0
  605. package/types/x-modules/related-prompts/store/module.d.ts.map +1 -0
  606. package/types/x-modules/related-prompts/store/types.d.ts +108 -0
  607. package/types/x-modules/related-prompts/store/types.d.ts.map +1 -0
  608. package/types/x-modules/related-prompts/types.d.ts +10 -0
  609. package/types/x-modules/related-prompts/types.d.ts.map +1 -0
  610. package/types/x-modules/related-prompts/wiring.d.ts +38 -0
  611. package/types/x-modules/related-prompts/wiring.d.ts.map +1 -0
  612. package/types/x-modules/related-prompts/x-module.d.ts +16 -0
  613. package/types/x-modules/related-prompts/x-module.d.ts.map +1 -0
  614. package/types/x-modules/related-tags/components/related-tags.vue.d.ts +3 -3
  615. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +5 -5
  616. package/types/x-modules/search/components/banners-list.vue.d.ts +3 -3
  617. package/types/x-modules/search/components/partial-results-list.vue.d.ts +3 -3
  618. package/types/x-modules/search/components/promoteds-list.vue.d.ts +3 -3
  619. package/types/x-modules/search/components/results-list.vue.d.ts +3 -3
  620. package/types/x-modules/search/components/sort-dropdown.vue.d.ts +1 -1
  621. package/types/x-modules/search/config.types.d.ts +2 -0
  622. package/types/x-modules/search/config.types.d.ts.map +1 -1
  623. package/types/x-modules/search/events.types.d.ts +4 -0
  624. package/types/x-modules/search/events.types.d.ts.map +1 -1
  625. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
  626. package/types/x-modules/search/store/actions/save-search-response.action.d.ts.map +1 -1
  627. package/types/x-modules/search/store/module.d.ts +2 -0
  628. package/types/x-modules/search/store/module.d.ts.map +1 -1
  629. package/types/x-modules/search/store/types.d.ts +9 -1
  630. package/types/x-modules/search/store/types.d.ts.map +1 -1
  631. package/types/x-modules/search/wiring.d.ts +4 -0
  632. package/types/x-modules/search/wiring.d.ts.map +1 -1
  633. package/types/x-modules/search-box/components/search-input-placeholder.vue.d.ts +3 -3
  634. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  635. package/types/x-modules/tagging/wiring.d.ts +36 -2
  636. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  637. package/types/x-modules/x-modules.types.d.ts +2 -0
  638. package/types/x-modules/x-modules.types.d.ts.map +1 -1
  639. package/docs/API-reference/api/x-components.usestore.md +0 -19
  640. package/docs/assets/features/overview-my-history.svg +0 -279
  641. package/docs/assets/features/overview-product-results-card.svg +0 -128
  642. package/docs/assets/interface/build-search-ui.svg +0 -167
  643. package/docs/assets/interface/experience-search-intro.svg +0 -1
  644. package/docs/assets/interface/integration-guide.svg +0 -1
  645. package/docs/assets/interface/integration-video.png +0 -0
  646. package/docs/assets/interface/x-architecture.svg +0 -1
  647. package/docs/assets/interface/x-empathize.gif +0 -0
  648. package/docs/assets/interface/x-facets.gif +0 -0
  649. package/docs/assets/interface/x-facets.svg +0 -189
  650. package/docs/assets/interface/x-history-queries.gif +0 -0
  651. package/docs/assets/interface/x-id-results.gif +0 -0
  652. package/docs/assets/interface/x-next-queries.gif +0 -0
  653. package/docs/assets/interface/x-popular-searches.gif +0 -0
  654. package/docs/assets/interface/x-query-suggestions.gif +0 -0
  655. package/docs/assets/interface/x-recommendations.gif +0 -0
  656. package/docs/assets/interface/x-recommendations.svg +0 -472
  657. package/docs/assets/interface/x-related-tags.gif +0 -0
  658. package/docs/assets/interface/x-results-layout.svg +0 -259
  659. package/docs/assets/interface/x-search-box-elements.svg +0 -1
  660. package/docs/assets/interface/x-search-box.svg +0 -60
  661. package/docs/build-search-ui/README.md +0 -127
  662. package/docs/build-search-ui/sidebar.js +0 -7
  663. package/docs/build-search-ui/web-archetype-development-guide.md +0 -186
  664. package/docs/build-search-ui/web-archetype-integration-guide.md +0 -458
  665. package/docs/build-search-ui/web-how-to-use-x-components-guide.md +0 -200
  666. package/docs/build-search-ui/web-x-architecture.md +0 -83
  667. package/docs/build-search-ui/web-x-components-development-guide.md +0 -157
  668. package/docs/experience-search-and-discovery/README.md +0 -132
  669. package/docs/experience-search-and-discovery/empathize.md +0 -119
  670. package/docs/experience-search-and-discovery/facets-and-filters.md +0 -154
  671. package/docs/experience-search-and-discovery/history-queries.md +0 -70
  672. package/docs/experience-search-and-discovery/id-results.md +0 -49
  673. package/docs/experience-search-and-discovery/my-history.md +0 -60
  674. package/docs/experience-search-and-discovery/next-queries.md +0 -72
  675. package/docs/experience-search-and-discovery/popular-searches.md +0 -50
  676. package/docs/experience-search-and-discovery/product-results-ui.md +0 -82
  677. package/docs/experience-search-and-discovery/query-suggestions.md +0 -48
  678. package/docs/experience-search-and-discovery/recommendations.md +0 -134
  679. package/docs/experience-search-and-discovery/related-tags.md +0 -66
  680. package/docs/experience-search-and-discovery/search-box.md +0 -99
  681. package/docs/experience-search-and-discovery/serp-ui.md +0 -125
  682. package/docs/experience-search-and-discovery/sidebar.js +0 -17
  683. package/docs/experience-search-and-discovery/web-local-storage.md +0 -30
  684. package/docs/input-status-machine-state.png +0 -0
  685. package/js/composables/use-store.js +0 -15
  686. package/js/composables/use-store.js.map +0 -1
  687. package/js/utils/options-api.js +0 -4
  688. package/js/utils/options-api.js.map +0 -1
  689. package/types/utils/options-api.d.ts +0 -3
  690. package/types/utils/options-api.d.ts.map +0 -1
@@ -0,0 +1,136 @@
1
+ ---
2
+
3
+ title: PageSelector
4
+
5
+ ---
6
+
7
+ # PageSelector
8
+
9
+ Component that renders a pagination control with buttons for navigating between pages. It displays
10
+ the current page, allows selecting other pages, and emits events when a page is selected.
11
+
12
+ ## Props
13
+
14
+ | Name | Description | Type | Default |
15
+ | -------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------- |
16
+ | <code>buttonClasses</code> | CSS classes to customize the prev/next buttons. | <code>(string \| Dictionary<boolean>)[]</code> | <code>() => []</code> |
17
+ | <code>currentPage</code> | The current page number. | <code>number</code> | <code></code> |
18
+ | <code>hiddenPage</code> | The string content of the hidden pages. | <code>string</code> | <code>'...'</code> |
19
+ | <code>itemClasses</code> | CSS classes to customize the page items. | <code>(isSelected: boolean) => string \| Dictionary<boolean> \| (string \| Dictionary<boolean>)[]</code> | <code>() => []</code> |
20
+ | <code>range</code> | The number of pages to show before and after the current page. | <code>number</code> | <code>2</code> |
21
+ | <code>scrollTarget</code> | The class of the scroll container to scroll to top when a page is selected. | <code>string</code> | <code>'main-scroll'</code> |
22
+ | <code>totalPages</code> | The total number of pages. | <code>number</code> | <code></code> |
23
+
24
+ ## Slots
25
+
26
+ | Name | Description | Bindings<br />(name - type - description) |
27
+ | --------------------------------- | ----------- | ----------------------------------------- |
28
+ | <code>previous-page-button</code> | | None |
29
+ | <code>page-button</code> | | <br /> |
30
+ | <code>next-page-button</code> | | None |
31
+
32
+ ## Events
33
+
34
+ This component emits the "UserSelectedAPage" and the UserClickedScrollToTop events by default.
35
+
36
+ ## See it in action
37
+
38
+ Basic example of how the component is rendered.
39
+
40
+ ```vue live
41
+ <template>
42
+ <PageSelector :current-page="page" :total-pages="totalPages" />
43
+ </template>
44
+
45
+ <script>
46
+ import { PageSelector } from '@empathyco/x-components';
47
+
48
+ export default {
49
+ name: 'PageSelectorDemo',
50
+ components: {
51
+ PageSelector
52
+ },
53
+ data() {
54
+ return {
55
+ page: 0,
56
+ totalPages: 10
57
+ };
58
+ }
59
+ };
60
+ </script>
61
+ ```
62
+
63
+ ### Customize the slots
64
+
65
+ This component allows to customise its content using slots.
66
+
67
+ ```vue live
68
+ <template>
69
+ <PageSelector
70
+ :total-pages="totalPages"
71
+ :currentPage="page"
72
+ :item-classes="
73
+ (isSelected: boolean) =>
74
+ isSelected
75
+ ? 'x-button-lead x-text-neutral-10'
76
+ : 'x-text-neutral-90 x-button-outlined'
77
+ "
78
+ :buttonClasses="['x-rounded-md']"
79
+ >
80
+ <template #previous-page-button>
81
+ <span>Back</span>
82
+ </template>
83
+ <template #page-button="{ page, isSelected }">
84
+ <h2 :class="{ 'x-text1': !isSelected }">
85
+ {{ page }}
86
+ </h2>
87
+ </template>
88
+ <template #next-page-button>
89
+ <span>Forward</span>
90
+ </template>
91
+ </PageSelector>
92
+ </template>
93
+
94
+ <script>
95
+ import { PageSelector } from '@empathyco/x-components';
96
+
97
+ export default {
98
+ name: 'PageSelectorDemo',
99
+ components: {
100
+ PageSelector
101
+ },
102
+ data() {
103
+ return {
104
+ page: 2,
105
+ totalPages: 10
106
+ };
107
+ }
108
+ };
109
+ </script>
110
+ ```
111
+
112
+ ### Customize the number of pages to show before and after the current page by changing the range default value.
113
+
114
+ ```vue live
115
+ <template>
116
+ <PageSelector :current-page="page" :total-pages="totalPages" :range="range" />
117
+ </template>
118
+
119
+ <script>
120
+ import { PageSelector } from '@empathyco/x-components';
121
+
122
+ export default {
123
+ name: 'PageSelectorDemo',
124
+ components: {
125
+ PageSelector
126
+ },
127
+ data() {
128
+ return {
129
+ page: 6,
130
+ totalPages: 100,
131
+ range: 4
132
+ };
133
+ }
134
+ };
135
+ </script>
136
+ ```
@@ -19,7 +19,7 @@ differently based on their purpose and this can be achieved using the exposed sl
19
19
  | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ----------------- |
20
20
  | <code>facetsIds</code> | Array of facets ids used to get the selected filters for those facets. | <code>Array<Facet['id']></code> | <code></code> |
21
21
  | <code>alwaysVisible</code> | Flag to render the component even if there are no filters selected. | <code>boolean</code> | <code></code> |
22
- | <code>animation</code> | Animation component that will be used to animate the facets. | <code>animationProp</code> | <code>'ul'</code> |
22
+ | <code>animation</code> | Animation component that will be used to animate the facets. | <code>AnimationProp</code> | <code>'ul'</code> |
23
23
  | <code>renderableFacets</code> | Discriminates the facets rendered by this component. It expects a string containing facets<br />ids, comma separated. This property will include or exclude facets based on its value.<br />The default value is an empty string and the component will render all existing facets. | <code>string</code> | <code></code> |
24
24
 
25
25
  ## Slots
@@ -20,7 +20,7 @@ The property "alwaysVisible" handles if the component is rendered if no filters
20
20
  | -------------------------- | --------------------------------------------------------------------------- | ------------------------------- | ----------------- |
21
21
  | <code>facetsIds</code> | Array of facets ids used to get the selected filters for those facets. | <code>Array<Facet['id']></code> | <code></code> |
22
22
  | <code>alwaysVisible</code> | Flag to render the component even if there are no filters selected. | <code>boolean</code> | <code></code> |
23
- | <code>animation</code> | Animation component that will be used to animate the selected filters list. | <code>animationProp</code> | <code>'ul'</code> |
23
+ | <code>animation</code> | Animation component that will be used to animate the selected filters list. | <code>AnimationProp</code> | <code>'ul'</code> |
24
24
 
25
25
  ## Slots
26
26
 
@@ -0,0 +1,16 @@
1
+ ---
2
+
3
+ title: RelatedPrompt
4
+
5
+ ---
6
+
7
+ # RelatedPrompt
8
+
9
+ This component shows a suggested related prompt.
10
+
11
+ ## Props
12
+
13
+ | Name | Description | Type | Default |
14
+ | -------------------------- | ----------- | -------------------------- | ------------------ |
15
+ | <code>relatedPrompt</code> | | <code>RelatedPrompt</code> | <code></code> |
16
+ | <code>selected</code> | | <code>boolean</code> | <code>false</code> |
@@ -0,0 +1,196 @@
1
+ ---
2
+
3
+ title: RelatedPromptsList
4
+
5
+ ---
6
+
7
+ # RelatedPromptsList
8
+
9
+ Component that inserts groups of related prompts in different positions of the injected search items
10
+ list, based on the provided configuration.
11
+
12
+ ## Props
13
+
14
+ | Name | Description | Type | Default |
15
+ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------- | ---------------------- |
16
+ | <code>animation</code> | Animation component that will be used to animate the related prompts groups. | <code>AnimationProp</code> | <code>'ul'</code> |
17
+ | <code>offset</code> | The first index to insert a group of related prompts at. | <code>number</code> | <code>24</code> |
18
+ | <code>frequency</code> | The items cycle size to keep inserting related prompts groups at. | <code>number</code> | <code>24</code> |
19
+ | <code>maxRelatedPromptsPerGroup</code> | The maximum amount of related prompts to add in a single group. | <code>number</code> | <code>4</code> |
20
+ | <code>maxGroups</code> | The maximum number of groups to insert into the injected list items list. | <code>number</code> | <code>undefined</code> |
21
+ | <code>showOnlyAfterOffset</code> | Determines if a group is added to the injected items list in case the number<br />of items is smaller than the offset. | <code>boolean</code> | <code>false</code> |
22
+
23
+ ## Events
24
+
25
+ This component emits no events.
26
+
27
+ ## See it in action
28
+
29
+ <!-- prettier-ignore-start -->
30
+
31
+ :::warning Backend microservice required To use this component, the <b>QuerySignals</b> microservice
32
+ must be implemented. :::
33
+
34
+ <!-- prettier-ignore-end -->
35
+
36
+ Usually, this component is going to be used together with the `ResultsList` one. Related prompts
37
+ groups will be inserted between the results, guiding users to discover new searches directly from
38
+ the results list.
39
+
40
+ ```vue live
41
+ <template>
42
+ <div>
43
+ <SearchInput />
44
+ <ResultsList>
45
+ <RelatedPromptsList />
46
+ </ResultsList>
47
+ </div>
48
+ </template>
49
+
50
+ <script>
51
+ import { RelatedPromptsList } from '@empathyco/x-components/related-prompts';
52
+ import { ResultsList } from '@empathyco/x-components/search';
53
+ import { SearchInput } from '@empathyco/x-components/search-box';
54
+
55
+ export default {
56
+ name: 'RelatedPromptsListDemo',
57
+ components: {
58
+ RelatedPromptsList,
59
+ ResultsList,
60
+ SearchInput
61
+ }
62
+ };
63
+ </script>
64
+ ```
65
+
66
+ ### Play with the index that related prompts groups are inserted at
67
+
68
+ The component allows to customise where are the related prompts groups inserted. In the following
69
+ example, the first group of related prompts will be inserted at the index `48` (`offset`), and then
70
+ a second group will be inserted at index `120` because of the `frequency` prop configured to `72`.
71
+ Finally, a third group will be inserted at index `192`. Because `maxGroups` is configured to `3`, no
72
+ more groups will be inserted. Each one of this groups will have up to `6` related prompts
73
+ (`maxRelatedPromptsPerGroup`).
74
+
75
+ ```vue live
76
+ <template>
77
+ <div>
78
+ <SearchInput />
79
+ <ResultsList>
80
+ <RelatedPromptsList
81
+ :offset="48"
82
+ :frequency="72"
83
+ :maxRelatedPromptsPerGroup="6"
84
+ :maxGroups="3"
85
+ />
86
+ </ResultsList>
87
+ </div>
88
+ </template>
89
+
90
+ <script>
91
+ import { RelatedPromptsList } from '@empathyco/x-components/related-prompts';
92
+ import { ResultsList } from '@empathyco/x-components/search';
93
+ import { SearchInput } from '@empathyco/x-components/search-box';
94
+
95
+ export default {
96
+ name: 'RelatedPromptsListDemo',
97
+ components: {
98
+ RelatedPromptsList,
99
+ ResultsList,
100
+ SearchInput
101
+ }
102
+ };
103
+ </script>
104
+ ```
105
+
106
+ ### Showing/hiding first related prompts group when no more items
107
+
108
+ By default, the first related prompts group will be inserted when the total number of results is
109
+ smaller than the offset, but this behavior can be deactivated by setting the `showOnlyAfterOffset`
110
+ to `true`.
111
+
112
+ ```vue live
113
+ <template>
114
+ <div>
115
+ <SearchInput />
116
+ <ResultsList>
117
+ <RelatedPromptsList
118
+ :offset="48"
119
+ :frequency="72"
120
+ :maxRelatedPromptsPerGroup="1"
121
+ :showOnlyAfterOffset="true"
122
+ />
123
+ </ResultsList>
124
+ </div>
125
+ </template>
126
+
127
+ <script>
128
+ import { RelatedPromptsList } from '@empathyco/x-components/related-prompts';
129
+ import { ResultsList } from '@empathyco/x-components/search';
130
+ import { SearchInput } from '@empathyco/x-components/search-box';
131
+
132
+ export default {
133
+ name: 'RelatedPromptsListDemo',
134
+ components: {
135
+ RelatedPromptsList,
136
+ ResultsList,
137
+ SearchInput
138
+ }
139
+ };
140
+ </script>
141
+ ```
142
+
143
+ ### Customise the layout of the component
144
+
145
+ This component will render by default the `id` of each search item, both the injected, and for the
146
+ groups of related prompts generated, but the common case is to integrate it with another layout
147
+ component, for example the `BaseGrid`. To do so, you can use the `default` slot
148
+
149
+ ```vue
150
+ <template>
151
+ <div>
152
+ <SearchInput />
153
+ <ResultsList>
154
+ <RelatedPromptsList
155
+ :offset="48"
156
+ :frequency="72"
157
+ :maxRelatedPromptsPerGroup="6"
158
+ :maxGroups="3"
159
+ #default="{ items }"
160
+ >
161
+ <BaseGrid :items="items" :animation="animation">
162
+ <template #related-prompts-group="{ item }">
163
+ <span v-for="const prompt of items.relatedPrompts">
164
+ RelatedPromptsGroup:
165
+ <pre>{{ prompt }}</pre>
166
+ </span>
167
+ </template>
168
+ <template #result="{ item }">
169
+ <span>Result: {{ item.name }}</span>
170
+ </template>
171
+ <template #default="{ item }">
172
+ <span>Default: {{ item }}</span>
173
+ </template>
174
+ </BaseGrid>
175
+ </RelatedPromptsList>
176
+ </ResultsList>
177
+ </div>
178
+ </template>
179
+
180
+ <script>
181
+ import { RelatedPromptsList } from '@empathyco/x-components/related-prompts';
182
+ import { ResultsList } from '@empathyco/x-components/search';
183
+ import { SearchInput } from '@empathyco/x-components/search-box';
184
+ import { BaseGrid } from '@empathyco/x-components';
185
+
186
+ export default {
187
+ name: 'RelatedPromptsListDemo',
188
+ components: {
189
+ RelatedPromptsLis,
190
+ ResultsList,
191
+ BaseGrid,
192
+ SearchInput
193
+ }
194
+ };
195
+ </script>
196
+ ```
@@ -0,0 +1,31 @@
1
+ ---
2
+
3
+ title: RelatedPromptsTagList
4
+
5
+ ---
6
+
7
+ # RelatedPromptsTagList
8
+
9
+ This component shows the list of `RelatedPrompts` components.
10
+
11
+ If the default slot is reimplemented in the consumer, `onSelect` function will be necessary to
12
+ handle the selection of the related prompt and to trigger the stagger-fade-slide animation.
13
+
14
+ ## Props
15
+
16
+ | Name | Description | Type | Default |
17
+ | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ----------------- |
18
+ | <code>buttonClass</code> | The CSS class for the left and right button of the sliding panel. | <code>string</code> | <code></code> |
19
+ | <code>showButtons</code> | The boolean prop to handle the visiblity of sliding pannel buttons. | <code>boolean</code> | <code>true</code> |
20
+ | <code>scrollContainerClass</code> | The CSS class for the wrapper of all the related prompt wrapper elements. | <code>string</code> | <code></code> |
21
+ | <code>tagClass</code> | The CSS class for all the related prompt wrapper elements. | <code>string</code> | <code></code> |
22
+ | <code>tagColors</code> | Array of colors to apply to the related prompts. It will be applied to tag<br />elements cyclically according to their index in the nex way: `tagColors[index % tagColors.length]`. | <code>string[]</code> | <code></code> |
23
+ | <code>animationDurationInMs</code> | The duration of the total animation in milliseconds. | <code>number</code> | <code>700</code> |
24
+
25
+ ## Slots
26
+
27
+ | Name | Description | Bindings<br />(name - type - description) |
28
+ | --------------------------------------- | ------------------------------------------------------------------ | ----------------------------------------- |
29
+ | <code>sliding-panel-left-button</code> | The button to be displayed on the left side of the sliding panel. | None |
30
+ | <code>default</code> | - The slot to render related prompt information. | <br /><br /> |
31
+ | <code>sliding-panel-right-button</code> | The button to be displayed on the right side of the sliding panel. | None |
@@ -17,7 +17,7 @@ result bound.
17
17
 
18
18
  | Name | Description | Type | Default |
19
19
  | ---------------------- | ------------------------------------------------------------- | -------------------------- | ----------------- |
20
- | <code>animation</code> | Animation component that will be used to animate the results. | <code>animationProp</code> | <code>'ul'</code> |
20
+ | <code>animation</code> | Animation component that will be used to animate the results. | <code>AnimationProp</code> | <code>'ul'</code> |
21
21
 
22
22
  ## Events
23
23
 
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './fade-and-slide.vue2.js';
2
- import { openBlock, createBlock, TransitionGroup, withCtx, createCommentVNode, renderSlot } from 'vue';
2
+ import { openBlock, createBlock, TransitionGroup, withCtx, renderSlot } from 'vue';
3
3
  import './fade-and-slide.vue3.js';
4
4
  import _export_sfc from '../../_virtual/_plugin-vue_export-helper.js';
5
5
 
@@ -11,7 +11,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
11
11
  appear: _ctx.appear
12
12
  }, {
13
13
  default: withCtx(() => [
14
- createCommentVNode(" @slot (Required) Transition-group content "),
15
14
  renderSlot(_ctx.$slots, "default")
16
15
  ]),
17
16
  _: 3
@@ -1 +1 @@
1
- {"version":3,"file":"fade-and-slide.vue.js","sources":["../../../../src/components/animations/fade-and-slide.vue"],"sourcesContent":["<template>\n <transition-group class=\"x-fade-and-slide\" :name=\"name\" :tag=\"tag\" :appear=\"appear\">\n <!-- @slot (Required) Transition-group content -->\n <slot />\n </transition-group>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import { useDisableAnimation } from './use-disable-animation';\n\n /**\n * Renders a transition group wrapping the elements passed in the default slot and animating\n * them with a fade and slide animation.\n *\n * @public\n */\n export default defineComponent({\n name: 'FadeAndSlide',\n props: {\n /**\n * HTML Element that the transition-group children will be wrapped in.\n */\n tag: String,\n /**\n * Indicates if the transition must be applied on the initial render of the node.\n */\n appear: {\n type: Boolean,\n default: true\n }\n },\n setup: function () {\n /**\n * The name of the animation.\n */\n const animationName = 'x-fade-and-slide-';\n\n const { name } = useDisableAnimation(animationName);\n\n return { name };\n }\n });\n</script>\n\n<style lang=\"css\">\n .x-fade-and-slide--move,\n .x-fade-and-slide--enter-active,\n .x-fade-and-slide--leave-active {\n transition: opacity 0.2s ease-out, transform 0.3s ease-out;\n }\n\n .x-fade-and-slide--enter-from,\n .x-fade-and-slide--leave-to {\n transform: translate(-20%, 0);\n opacity: 0;\n }\n\n .x-fade-and-slide--leave-active {\n position: absolute;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThe FadeAndSlide component is intended to be used as a prop in animatable components but also works\nas a wrapper of a transition group that can receive the tag it will render to as a prop.\n\nUsed as a prop in an animatable component:\n\n```vue\n<AnimatableComponent :animation=\"FadeAndSlide\" />\n```\n\nUsed as a regular component passing a the tag as prop:\n\n```vue\n<FadeAndSlide tag=\"ul\">\n <li>Element to animate</li>\n <li>Element to animate</li>\n <li>Element to animate</li>\n</FadeAndSlide>\n```\n</docs>\n"],"names":["name","_createBlock","_TransitionGroup","tag","appear","_withCtx","_createCommentVNode","_renderSlot"],"mappings":";;;;;AACyB,SAAA,WAAA,CAAC,IAAkB,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SAAQA,SAAI,EAAA,EAAAC,WAAA,CAAAC,eAAA,EAAA;AAAA,IAAG,KAAKC,EAAAA,kBAAAA;AAAAA,IAAM,MAAM,IAAEC,CAAAA,IAAAA;AAAAA,IAAAA,GAAAA,EAAAA,IAAAA,CAAAA,GAAAA;AAD9E,IAAA,MAAA,EAAA,IAAA,CAAA,MAAA;AAAA,GAAA,EAAA;aAGIC,OAAQ,CAAA,MAAA;AAAA,MAAAC,kBAAA,CAAA,6CAAA,CAAA;AAHZ,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"fade-and-slide.vue.js","sources":["../../../../src/components/animations/fade-and-slide.vue"],"sourcesContent":["<template>\n <transition-group class=\"x-fade-and-slide\" :name=\"name\" :tag=\"tag\" :appear=\"appear\">\n <!-- @slot (Required) Transition-group content -->\n <slot />\n </transition-group>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import { useDisableAnimation } from './use-disable-animation';\n\n /**\n * Renders a transition group wrapping the elements passed in the default slot and animating\n * them with a fade and slide animation.\n *\n * @public\n */\n export default defineComponent({\n name: 'FadeAndSlide',\n props: {\n /**\n * HTML Element that the transition-group children will be wrapped in.\n */\n tag: String,\n /**\n * Indicates if the transition must be applied on the initial render of the node.\n */\n appear: {\n type: Boolean,\n default: true\n }\n },\n setup: function () {\n /**\n * The name of the animation.\n */\n const animationName = 'x-fade-and-slide-';\n\n const { name } = useDisableAnimation(animationName);\n\n return { name };\n }\n });\n</script>\n\n<style lang=\"css\">\n .x-fade-and-slide--move,\n .x-fade-and-slide--enter-active,\n .x-fade-and-slide--leave-active {\n transition: opacity 0.2s ease-out, transform 0.3s ease-out;\n }\n\n .x-fade-and-slide--enter-from,\n .x-fade-and-slide--leave-to {\n transform: translate(-20%, 0);\n opacity: 0;\n }\n\n .x-fade-and-slide--leave-active {\n position: absolute;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThe FadeAndSlide component is intended to be used as a prop in animatable components but also works\nas a wrapper of a transition group that can receive the tag it will render to as a prop.\n\nUsed as a prop in an animatable component:\n\n```vue\n<AnimatableComponent :animation=\"FadeAndSlide\" />\n```\n\nUsed as a regular component passing a the tag as prop:\n\n```vue\n<FadeAndSlide tag=\"ul\">\n <li>Element to animate</li>\n <li>Element to animate</li>\n <li>Element to animate</li>\n</FadeAndSlide>\n```\n</docs>\n"],"names":["name","_createBlock","_TransitionGroup","tag","appear","_renderSlot"],"mappings":";;;;;AACyB,SAAA,WAAA,CAAC,IAAkB,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SAAQA,SAAI,EAAA,EAAAC,WAAA,CAAAC,eAAA,EAAA;AAAA,IAAG,KAAKC,EAAAA,kBAAAA;AAAAA,IAAM,MAAM,IAAEC,CAAAA,IAAAA;AAAAA,IAAAA,GAAAA,EAAAA,IAAAA,CAAAA,GAAAA;AAD9E,IAAA,MAAA,EAAA,IAAA,CAAA,MAAA;AAAA,GAAA,EAAA;;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './base-dropdown.vue2.js';
2
- import { openBlock, createElementBlock, withKeys, withModifiers, normalizeClass, createElementVNode, createCommentVNode, renderSlot, createTextVNode, toDisplayString, createBlock, resolveDynamicComponent, withCtx, withDirectives, Fragment, renderList, vShow } from 'vue';
2
+ import { openBlock, createElementBlock, withKeys, withModifiers, normalizeClass, createElementVNode, renderSlot, createTextVNode, toDisplayString, createBlock, resolveDynamicComponent, withCtx, withDirectives, Fragment, renderList, vShow } from 'vue';
3
3
  import './base-dropdown.vue3.js';
4
4
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.js';
5
5
 
@@ -32,7 +32,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
32
32
  "aria-label": _ctx.ariaLabel,
33
33
  "aria-autocomplete": "none"
34
34
  }, [
35
- createCommentVNode("\n @slot Used to render the contents of the dropdown toggle button. If not provided, it uses\n the item slot as fallback.\n @binding {string|number|Identifiable} item - The item data to render.\n @binding {boolean} isOpen - True if the dropdown is opened, and false if it is closed.\n "),
36
35
  _ctx.hasToggleSlot ? renderSlot(_ctx.$slots, "toggle", {
37
36
  key: 0,
38
37
  isOpen: _ctx.isOpen,
@@ -85,7 +84,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
85
84
  "data-test": "dropdown-item",
86
85
  role: "option"
87
86
  }, [
88
- createCommentVNode("\n @slot (required) Used to render each one of the items content, and as fallback\n for the toggle button content slot if it is not provided.\n @binding {string|number|Identifiable} item - Item to render\n @binding {boolean} isHighlighted - True when the item has the focus.\n @binding {boolean} isSelected - True when the item is selected.\n "),
89
87
  renderSlot(_ctx.$slots, "item", {
90
88
  isHighlighted: index === _ctx.highlightedItemIndex,
91
89
  isSelected: item === _ctx.modelValue,
@@ -1 +1 @@
1
- {"version":3,"file":"base-dropdown.vue.js","sources":["../../../src/components/base-dropdown.vue"],"sourcesContent":["<template>\n <div\n ref=\"rootRef\"\n @keydown=\"updateSearchBuffer\"\n @keydown.down.prevent=\"highlightNextItem\"\n @keydown.up.prevent=\"highlightPreviousItem\"\n :class=\"dropdownCSSClasses\"\n class=\"x-dropdown\"\n >\n <button\n ref=\"toggleButtonRef\"\n @click=\"toggle\"\n @keydown.up.down.prevent.stop=\"open\"\n class=\"x-dropdown__toggle\"\n data-test=\"dropdown-toggle\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n :aria-expanded=\"isOpen.toString()\"\n :aria-controls=\"listId\"\n :aria-label=\"ariaLabel\"\n aria-autocomplete=\"none\"\n >\n <!--\n @slot Used to render the contents of the dropdown toggle button. If not provided, it uses\n the item slot as fallback.\n @binding {string|number|Identifiable} item - The item data to render.\n @binding {boolean} isOpen - True if the dropdown is opened, and false if it is closed.\n -->\n <slot v-if=\"hasToggleSlot\" :isOpen=\"isOpen\" :item=\"modelValue\" name=\"toggle\">\n {{ modelValue }}\n </slot>\n <slot v-else :item=\"modelValue\" name=\"item\">{{ modelValue }}</slot>\n </button>\n\n <component :is=\"animation\">\n <ul\n v-show=\"isOpen\"\n @keydown.end=\"highlightLastItem\"\n @keydown.esc=\"closeAndFocusToggleButton\"\n @keydown.home=\"highlightFirstItem\"\n :id=\"listId\"\n class=\"x-dropdown__items-list\"\n data-test=\"dropdown-list\"\n role=\"listbox\"\n tabindex=\"-1\"\n >\n <li v-for=\"(item, index) in items\" :key=\"item.id || item\" class=\"x-dropdown__list-item\">\n <button\n :ref=\"el => (itemsButtonRefs[index] = el)\"\n @click=\"emitSelectedItemChanged(item)\"\n :aria-selected=\"(item === modelValue).toString()\"\n :class=\"itemsCSSClasses[index]\"\n class=\"x-dropdown__item\"\n data-test=\"dropdown-item\"\n role=\"option\"\n >\n <!--\n @slot (required) Used to render each one of the items content, and as fallback\n for the toggle button content slot if it is not provided.\n @binding {string|number|Identifiable} item - Item to render\n @binding {boolean} isHighlighted - True when the item has the focus.\n @binding {boolean} isSelected - True when the item is selected.\n -->\n <slot\n :isHighlighted=\"index === highlightedItemIndex\"\n :isSelected=\"item === modelValue\"\n :item=\"item\"\n name=\"item\"\n >\n {{ item }}\n </slot>\n </button>\n </li>\n </ul>\n </component>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Identifiable } from '@empathyco/x-types';\n import { computed, defineComponent, nextTick, onBeforeUnmount, PropType, ref, watch } from 'vue';\n import { AnimationProp } from '../types';\n import { debounceFunction, normalizeString, getTargetElement, isInRange } from '../utils';\n import { NoAnimation } from './animations';\n\n type DropdownItem = string | number | Identifiable;\n let dropdownCount = 0;\n\n /**\n * Dropdown component that mimics a Select element behavior, but with the option\n * to customize the toggle button and each item contents.\n */\n export default defineComponent({\n name: 'BaseDropdown',\n props: {\n /** List of items to display.*/\n items: {\n type: Array as PropType<DropdownItem[]>,\n required: true\n },\n /** The selected item. */\n modelValue: {\n type: null as unknown as PropType<DropdownItem | null>,\n validator: (v: any) =>\n typeof v === 'string' || typeof v === 'number' || typeof v === 'object' || v === null,\n required: true\n },\n /** Description of what the dropdown is used for. */\n ariaLabel: String,\n /**\n * Animation component to use for expanding the dropdown. This is a single element animation,\n * so only `<transition>` components are allowed.\n */\n animation: {\n type: AnimationProp,\n default: () => NoAnimation\n },\n /** Time to wait without receiving any keystroke before resetting the items search query. */\n searchTimeoutMs: {\n type: Number,\n default: 1000\n }\n },\n emits: ['update:modelValue'],\n setup(props, { emit, slots }) {\n const rootRef = ref<HTMLElement>();\n /** The button that opens and closes the list of options. */\n const toggleButtonRef = ref<HTMLButtonElement>();\n /** Array containing the dropdown list buttons HTMLElements. */\n const itemsButtonRefs = ref<HTMLButtonElement[]>([]);\n\n /** Property to check whether the dropdown is expanded or closed. */\n const isOpen = ref(false);\n /** Index of the element that has the focus in the list. -1 means no element has focus. */\n const highlightedItemIndex = ref(-1);\n /** String to search for the first element that starts with it. */\n const searchBuffer = ref('');\n\n /** Resets the search buffer after a certain time has passed. */\n let restartResetSearchTimeout: () => void;\n /* Unique ID to identify the dropdown. */\n const listId = `x-dropdown-${dropdownCount++}`;\n\n /**\n * Dynamic CSS classes to add to the dropdown root element.\n *\n * @returns An object containing the CSS classes to add to the dropdown root element.\n */\n const dropdownCSSClasses = computed(() => ({ 'x-dropdown--is-open': isOpen }));\n\n /**\n * Dynamic CSS classes to add to each one of the items.\n *\n * @returns An object containing the CSS classes to add to each item.\n */\n const itemsCSSClasses = computed(() =>\n props.items.map((item, index) => ({\n 'x-dropdown__item--is-selected': props.modelValue === item,\n 'x-dropdown__item--is-highlighted': highlightedItemIndex.value === index\n }))\n );\n\n /* Opens the dropdown. */\n const open = () => (isOpen.value = true);\n /* Closes the dropdown. */\n const close = () => (isOpen.value = false);\n /* Toggles the dropdown. */\n const toggle = () => (isOpen.value = !isOpen.value);\n\n /**\n * Closes the modal and focuses the toggle button.\n */\n function closeAndFocusToggleButton() {\n close();\n toggleButtonRef.value?.focus();\n }\n\n /**\n * Emits the event that the selected item has changed.\n *\n * @param item - The new selected item.\n */\n function emitSelectedItemChanged(item: DropdownItem) {\n emit('update:modelValue', item);\n closeAndFocusToggleButton();\n }\n\n /**\n * Highlights the item after the one that is currently highlighted.\n */\n function highlightNextItem() {\n open();\n highlightedItemIndex.value = (highlightedItemIndex.value + 1) % props.items.length;\n }\n\n /**\n * Highlights the item before the one that is currently highlighted.\n */\n function highlightPreviousItem() {\n const currentIndex = highlightedItemIndex.value;\n open();\n highlightedItemIndex.value = currentIndex > 0 ? currentIndex - 1 : props.items.length - 1;\n }\n\n /**\n * Highlights the first of the provided items.\n */\n function highlightFirstItem() {\n highlightedItemIndex.value = 0;\n }\n\n /**\n * Highlights the last of the provided items.\n */\n function highlightLastItem() {\n highlightedItemIndex.value = props.items.length - 1;\n }\n\n /**\n * Updates the variable that is used to search in the filters.\n *\n * @param event - The event coming from the user typing.\n */\n function updateSearchBuffer(event: KeyboardEvent) {\n if (/^\\w$/.test(event.key)) {\n const key = event.key;\n searchBuffer.value += key;\n restartResetSearchTimeout();\n }\n }\n\n /**\n * Resets the search buffer.\n */\n function resetSearchBuffer() {\n searchBuffer.value = '';\n }\n\n /**\n * Closes the dropdown if the passed event has happened on an element out of the dropdown.\n *\n * @param event - The event to check if it has happened out of the dropdown component.\n */\n function closeIfEventIsOutOfDropdown(event: MouseEvent | TouchEvent | FocusEvent) {\n if (!rootRef.value?.contains(getTargetElement(event))) {\n close();\n }\n }\n\n /**\n * Adds listeners to the document element to detect if the focus has moved out from the\n * dropdown.\n */\n function addDocumentCloseListeners() {\n document.addEventListener('mousedown', closeIfEventIsOutOfDropdown);\n document.addEventListener('touchstart', closeIfEventIsOutOfDropdown);\n document.addEventListener('focusin', closeIfEventIsOutOfDropdown);\n }\n\n /**\n * Removes the listeners of the document element to detect if the focus has moved out from the\n * dropdown.\n */\n function removeDocumentCloseListeners() {\n document.removeEventListener('mousedown', closeIfEventIsOutOfDropdown);\n document.removeEventListener('touchstart', closeIfEventIsOutOfDropdown);\n document.removeEventListener('focusin', closeIfEventIsOutOfDropdown);\n }\n\n /**\n * Highlights the item that matches the search buffer. To do so it checks the list buttons\n * text content. It highlights items following this priority:\n * - If an element is already highlighted, it starts searching from that element.\n * - If no element is found starting from the previously highlighted, it returns the first one.\n * - If no element is found matching the search query it highlights the first element.\n *\n * @param search - The search string to find in the HTML.\n */\n watch(searchBuffer, search => {\n if (search) {\n const normalizedSearch = normalizeString(search);\n const matchingIndices = itemsButtonRefs?.value?.reduce<number[]>(\n (matchingIndices, button, index) => {\n const safeButtonWordCharacters = button.textContent!.replace(/[^\\w]/g, '');\n const normalizedButtonText = normalizeString(safeButtonWordCharacters);\n if (normalizedButtonText.startsWith(normalizedSearch)) {\n matchingIndices.push(index);\n }\n return matchingIndices;\n },\n []\n );\n highlightedItemIndex.value =\n // First matching item starting to search from the current highlighted element\n matchingIndices?.find(index => index >= highlightedItemIndex.value) ??\n // First matching item\n matchingIndices?.[0] ??\n // First item\n 0;\n }\n });\n\n /**\n * Updates the debounced function to reset the search.\n *\n * @param searchTimeoutMs - The new milliseconds that have to pass without typing before\n * resetting the search.\n */\n watch(\n () => props.searchTimeoutMs,\n searchTimeoutMs => {\n restartResetSearchTimeout = debounceFunction(resetSearchBuffer, searchTimeoutMs);\n },\n { immediate: true }\n );\n\n /**\n * Focuses the DOM element which matches the `highlightedItemIndex`.\n *\n * @param highlightedItemIndex - The index of the HTML element to focus.\n */\n watch(\n highlightedItemIndex,\n highlightedItemIndex => {\n nextTick(() => {\n if (itemsButtonRefs && isInRange(highlightedItemIndex, [0, props.items.length - 1])) {\n const newItem = itemsButtonRefs?.value?.[highlightedItemIndex];\n newItem?.focus();\n }\n });\n },\n { immediate: true }\n );\n\n /**\n * When the dropdown is open it sets the focused element to the one that is selected.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n */\n watch(isOpen, isOpen => {\n highlightedItemIndex.value = isOpen\n ? props.modelValue === null\n ? 0\n : props.items.indexOf(props.modelValue)\n : -1;\n });\n\n /**\n * Adds and removes listeners to close the dropdown when it loses the focus.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n */\n watch(isOpen, isOpen => {\n /*\n * Because there is an issue with Firefox in macOS and Safari that doesn't focus the target\n * element of the `mousedown` events, the `focusout` event `relatedTarget` property can't be\n * used to detect whether the user has blurred the dropdown. The hack here is to use\n * document listeners that have the side effect of losing the focus.\n */\n if (isOpen) {\n addDocumentCloseListeners();\n } else {\n removeDocumentCloseListeners();\n }\n });\n\n /**\n * If the dropdown is destroyed before removing the document listeners, it ensures that they\n * are removed too.\n */\n onBeforeUnmount(() => {\n removeDocumentCloseListeners();\n });\n\n return {\n hasToggleSlot: !!slots.toggle,\n closeAndFocusToggleButton,\n dropdownCSSClasses,\n emitSelectedItemChanged,\n highlightFirstItem,\n highlightLastItem,\n highlightNextItem,\n highlightPreviousItem,\n highlightedItemIndex,\n isOpen,\n itemsButtonRefs,\n itemsCSSClasses,\n listId,\n open,\n rootRef,\n toggle,\n toggleButtonRef,\n updateSearchBuffer\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-dropdown {\n position: relative;\n }\n\n .x-dropdown__items-list {\n z-index: 1;\n list-style: none;\n position: absolute;\n padding: 0;\n margin: 0;\n top: calc(100% + var(--x-size-gap-dropdown-default, 0));\n }\n</style>\n\n<docs lang=\"mdx\">\n## Example\n\nThe `Dropdown` component is a simple yet customizable select component. The component needs to work\nthe list of items available to select, which are passed using the `items` prop, and the selected\nitem, which is passed in using the `value` prop.\n\nThe supported items must be an array that can contain unique strings, unique numbers, or objects\nwith a unique `id` property.\n\nThe content of each item can be customized using the `item` slot, which apart from the data of the\nitem, it also receives via prop if the element is selected or highlighted.\n\nThere `toggle` slot can be used to customize the button that opens the dropdown. If this is not\nprovided, the `item` slot will be used for that.\n\n```vue\n<template>\n <BaseDropdown v-model=\"value\" :items=\"items\">\n <template #toggle=\"{ item, isOpen }\">{{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template>\n\n <template #item=\"{ item, isSelected, isHighlighted }\">\n <span v-if=\"isHighlighted\">🟢</span>\n <span v-if=\"isSelected\">✅</span>\n <span>{{ item }}</span>\n </template>\n </BaseDropdown>\n</template>\n\n<script>\n import { BaseDropdown } from '@empathyco/x-components';\n\n export default {\n name: 'DropdownTest',\n components: {\n BaseDropdown\n },\n data() {\n return {\n items: ['a', 2, { id: '3' }],\n value: 'a'\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_withKeys","_withModifiers","dropdownCSSClasses","_normalizeClass","_createElementVNode","listId","ariaLabel","hasToggleSlot","_createCommentVNode","isOpen","_createTextVNode","_toDisplayString","modelValue","_createBlock","_resolveDynamicComponent","_withCtx","_withDirectives","_Fragment","_renderList","itemsButtonRefs","itemsCSSClasses","_renderSlot"],"mappings":";;;;;AAAA,MAAA,UAAA,GAAA,CAAA,eAAA,EAAA,eAAA,EAAA,YAAA,CAAA,CAAA;;;SAEQ,WAAS,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SACZA,SAAO,EAAA,EAAAC,kBAAA;AAAA,IAAA,KAAA;AAAA,IAAA;AAAA,MAAA,GAAA,EAAA,SAAA;;kCAHZ,CAKyB,GAAA,IAAA,KAAA,IAAA,CAAA,kBAAA,IAAA,IAAA,CAAA,kBAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,QAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAC,QAAA,CAAAC,aAAA,CAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,iBAAA,IAAA,IAAA,CAAA,iBAAA,CAAA,GAAA,IAAA,CAAA,EAAA,CAAA,SAAA,CAAA,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;AAEb,oBAAA,IAAA,EAAA,QAAA;AAAA,mBAOA,EAAA;AAAA,oBAAAK,kBAAA,CACkB,2aAA8B,CAAA;AAAA,oBAAAa,UAAA,CACnC,KAAE,MAAST,EAAAA,MAAAA,EAAAA;AAAAA,sBACrB,aAAU,EAAA,KAAA,KAAA,IAAA,CAAA,oBAAA;AAAA,sBAIN,UAAA,EAAA,IAAA,KAAA,IAAA,CAAA,UAAA;AAAA,sBAtEnB,IAAA;AAAA,qBAAA,EAAA,MAAA;;AAAA,wBAAAD,eAAA,CAAA,IAAA,CAAA;AAAA,wBAAA,CAAA;AAAA;AAAA,uBAAA;AAAA,qBAAA,EAAA,IAAA,CAAA;;;;;;AAoCsB,aAAA;AAAA,WAAA,EAAA,EAAA,EAAA,UAAA,CAAA,EAAA;;AApCtB,WAAA,CAAA;AAAA,SAAA,CAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"base-dropdown.vue.js","sources":["../../../src/components/base-dropdown.vue"],"sourcesContent":["<template>\n <div\n ref=\"rootRef\"\n @keydown=\"updateSearchBuffer\"\n @keydown.down.prevent=\"highlightNextItem\"\n @keydown.up.prevent=\"highlightPreviousItem\"\n :class=\"dropdownCSSClasses\"\n class=\"x-dropdown\"\n >\n <button\n ref=\"toggleButtonRef\"\n @click=\"toggle\"\n @keydown.up.down.prevent.stop=\"open\"\n class=\"x-dropdown__toggle\"\n data-test=\"dropdown-toggle\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n :aria-expanded=\"isOpen.toString()\"\n :aria-controls=\"listId\"\n :aria-label=\"ariaLabel\"\n aria-autocomplete=\"none\"\n >\n <!--\n @slot Used to render the contents of the dropdown toggle button. If not provided, it uses\n the item slot as fallback.\n @binding {string|number|Identifiable} item - The item data to render.\n @binding {boolean} isOpen - True if the dropdown is opened, and false if it is closed.\n -->\n <slot v-if=\"hasToggleSlot\" :isOpen=\"isOpen\" :item=\"modelValue\" name=\"toggle\">\n {{ modelValue }}\n </slot>\n <slot v-else :item=\"modelValue\" name=\"item\">{{ modelValue }}</slot>\n </button>\n\n <component :is=\"animation\">\n <ul\n v-show=\"isOpen\"\n @keydown.end=\"highlightLastItem\"\n @keydown.esc=\"closeAndFocusToggleButton\"\n @keydown.home=\"highlightFirstItem\"\n :id=\"listId\"\n class=\"x-dropdown__items-list\"\n data-test=\"dropdown-list\"\n role=\"listbox\"\n tabindex=\"-1\"\n >\n <li v-for=\"(item, index) in items\" :key=\"item.id || item\" class=\"x-dropdown__list-item\">\n <button\n :ref=\"el => (itemsButtonRefs[index] = el)\"\n @click=\"emitSelectedItemChanged(item)\"\n :aria-selected=\"(item === modelValue).toString()\"\n :class=\"itemsCSSClasses[index]\"\n class=\"x-dropdown__item\"\n data-test=\"dropdown-item\"\n role=\"option\"\n >\n <!--\n @slot (required) Used to render each one of the items content, and as fallback\n for the toggle button content slot if it is not provided.\n @binding {string|number|Identifiable} item - Item to render\n @binding {boolean} isHighlighted - True when the item has the focus.\n @binding {boolean} isSelected - True when the item is selected.\n -->\n <slot\n :isHighlighted=\"index === highlightedItemIndex\"\n :isSelected=\"item === modelValue\"\n :item=\"item\"\n name=\"item\"\n >\n {{ item }}\n </slot>\n </button>\n </li>\n </ul>\n </component>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Identifiable } from '@empathyco/x-types';\n import { computed, defineComponent, nextTick, onBeforeUnmount, PropType, ref, watch } from 'vue';\n import { AnimationProp } from '../types';\n import { debounceFunction, normalizeString, getTargetElement } from '../utils';\n import { NoAnimation } from './animations';\n\n type DropdownItem = string | number | Identifiable;\n let dropdownCount = 0;\n\n /**\n * Dropdown component that mimics a Select element behavior, but with the option\n * to customize the toggle button and each item contents.\n */\n export default defineComponent({\n name: 'BaseDropdown',\n props: {\n /** List of items to display.*/\n items: {\n type: Array as PropType<DropdownItem[]>,\n required: true\n },\n /** The selected item. */\n modelValue: {\n type: null as unknown as PropType<DropdownItem | null>,\n validator: (v: any) =>\n typeof v === 'string' || typeof v === 'number' || typeof v === 'object' || v === null,\n required: true\n },\n /** Description of what the dropdown is used for. */\n ariaLabel: String,\n /**\n * Animation component to use for expanding the dropdown. This is a single element animation,\n * so only `<transition>` components are allowed.\n */\n animation: {\n type: AnimationProp,\n default: () => NoAnimation\n },\n /** Time to wait without receiving any keystroke before resetting the items search query. */\n searchTimeoutMs: {\n type: Number,\n default: 1000\n }\n },\n emits: ['update:modelValue'],\n setup(props, { emit, slots }) {\n const rootRef = ref<HTMLElement>();\n /** The button that opens and closes the list of options. */\n const toggleButtonRef = ref<HTMLButtonElement>();\n /** Array containing the dropdown list buttons HTMLElements. */\n const itemsButtonRefs = ref<HTMLButtonElement[]>([]);\n\n /** Property to check whether the dropdown is expanded or closed. */\n const isOpen = ref(false);\n /** Index of the element that has the focus in the list. -1 means no element has focus. */\n const highlightedItemIndex = ref(-1);\n /** String to search for the first element that starts with it. */\n const searchBuffer = ref('');\n\n /** Resets the search buffer after a certain time has passed. */\n let restartResetSearchTimeout: () => void;\n /* Unique ID to identify the dropdown. */\n const listId = `x-dropdown-${dropdownCount++}`;\n\n /**\n * Dynamic CSS classes to add to the dropdown root element.\n *\n * @returns An object containing the CSS classes to add to the dropdown root element.\n */\n const dropdownCSSClasses = computed(() => ({ 'x-dropdown--is-open': isOpen }));\n\n /**\n * Dynamic CSS classes to add to each one of the items.\n *\n * @returns An object containing the CSS classes to add to each item.\n */\n const itemsCSSClasses = computed(() =>\n props.items.map((item, index) => ({\n 'x-dropdown__item--is-selected': props.modelValue === item,\n 'x-dropdown__item--is-highlighted': highlightedItemIndex.value === index\n }))\n );\n\n /* Opens the dropdown. */\n const open = () => (isOpen.value = true);\n /* Closes the dropdown. */\n const close = () => (isOpen.value = false);\n /* Toggles the dropdown. */\n const toggle = () => (isOpen.value = !isOpen.value);\n\n /**\n * Closes the modal and focuses the toggle button.\n */\n function closeAndFocusToggleButton() {\n close();\n toggleButtonRef.value?.focus();\n }\n\n /**\n * Emits the event that the selected item has changed.\n *\n * @param item - The new selected item.\n */\n function emitSelectedItemChanged(item: DropdownItem) {\n emit('update:modelValue', item);\n closeAndFocusToggleButton();\n }\n\n /**\n * Highlights the item after the one that is currently highlighted.\n */\n function highlightNextItem() {\n open();\n highlightedItemIndex.value = (highlightedItemIndex.value + 1) % props.items.length;\n }\n\n /**\n * Highlights the item before the one that is currently highlighted.\n */\n function highlightPreviousItem() {\n const currentIndex = highlightedItemIndex.value;\n open();\n highlightedItemIndex.value = currentIndex > 0 ? currentIndex - 1 : props.items.length - 1;\n }\n\n /**\n * Highlights the first of the provided items.\n */\n function highlightFirstItem() {\n highlightedItemIndex.value = 0;\n }\n\n /**\n * Highlights the last of the provided items.\n */\n function highlightLastItem() {\n highlightedItemIndex.value = props.items.length - 1;\n }\n\n /**\n * Updates the variable that is used to search in the filters.\n *\n * @param event - The event coming from the user typing.\n */\n function updateSearchBuffer(event: KeyboardEvent) {\n if (/^\\w$/.test(event.key)) {\n const key = event.key;\n searchBuffer.value += key;\n restartResetSearchTimeout();\n }\n }\n\n /**\n * Resets the search buffer.\n */\n function resetSearchBuffer() {\n searchBuffer.value = '';\n }\n\n /**\n * Closes the dropdown if the passed event has happened on an element out of the dropdown.\n *\n * @param event - The event to check if it has happened out of the dropdown component.\n */\n function closeIfEventIsOutOfDropdown(event: MouseEvent | TouchEvent | FocusEvent) {\n if (!rootRef.value?.contains(getTargetElement(event))) {\n close();\n }\n }\n\n /**\n * Adds listeners to the document element to detect if the focus has moved out from the\n * dropdown.\n */\n function addDocumentCloseListeners() {\n document.addEventListener('mousedown', closeIfEventIsOutOfDropdown);\n document.addEventListener('touchstart', closeIfEventIsOutOfDropdown);\n document.addEventListener('focusin', closeIfEventIsOutOfDropdown);\n }\n\n /**\n * Removes the listeners of the document element to detect if the focus has moved out from the\n * dropdown.\n */\n function removeDocumentCloseListeners() {\n document.removeEventListener('mousedown', closeIfEventIsOutOfDropdown);\n document.removeEventListener('touchstart', closeIfEventIsOutOfDropdown);\n document.removeEventListener('focusin', closeIfEventIsOutOfDropdown);\n }\n\n /**\n * Highlights the item that matches the search buffer. To do so it checks the list buttons\n * text content. It highlights items following this priority:\n * - If an element is already highlighted, it starts searching from that element.\n * - If no element is found starting from the previously highlighted, it returns the first one.\n * - If no element is found matching the search query it highlights the first element.\n *\n * @param search - The search string to find in the HTML.\n */\n watch(searchBuffer, search => {\n if (search) {\n const normalizedSearch = normalizeString(search);\n const matchingIndices = itemsButtonRefs?.value?.reduce<number[]>(\n (matchingIndices, button, index) => {\n const safeButtonWordCharacters = button.textContent!.replace(/[^\\w]/g, '');\n const normalizedButtonText = normalizeString(safeButtonWordCharacters);\n if (normalizedButtonText.startsWith(normalizedSearch)) {\n matchingIndices.push(index);\n }\n return matchingIndices;\n },\n []\n );\n highlightedItemIndex.value =\n // First matching item starting to search from the current highlighted element\n matchingIndices?.find(index => index >= highlightedItemIndex.value) ??\n // First matching item\n matchingIndices?.[0] ??\n // First item\n 0;\n }\n });\n\n /**\n * Updates the debounced function to reset the search.\n *\n * @param searchTimeoutMs - The new milliseconds that have to pass without typing before\n * resetting the search.\n */\n watch(\n () => props.searchTimeoutMs,\n searchTimeoutMs => {\n restartResetSearchTimeout = debounceFunction(resetSearchBuffer, searchTimeoutMs);\n },\n { immediate: true }\n );\n\n /**\n * Focuses the DOM element which matches the `highlightedItemIndex`.\n *\n * @param highlightedItemIndex - The index of the HTML element to focus.\n */\n watch(\n highlightedItemIndex,\n highlightedItemIndex => {\n nextTick(() => itemsButtonRefs.value[highlightedItemIndex]?.focus());\n },\n { immediate: true }\n );\n\n /**\n * When the dropdown is open it sets the focused element to the one that is selected.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n */\n watch(isOpen, isOpen => {\n highlightedItemIndex.value = isOpen\n ? props.modelValue === null\n ? 0\n : props.items.indexOf(props.modelValue)\n : -1;\n });\n\n /**\n * Adds and removes listeners to close the dropdown when it loses the focus.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n */\n watch(isOpen, isOpen => {\n /*\n * Because there is an issue with Firefox in macOS and Safari that doesn't focus the target\n * element of the `mousedown` events, the `focusout` event `relatedTarget` property can't be\n * used to detect whether the user has blurred the dropdown. The hack here is to use\n * document listeners that have the side effect of losing the focus.\n */\n if (isOpen) {\n addDocumentCloseListeners();\n } else {\n removeDocumentCloseListeners();\n }\n });\n\n /**\n * If the dropdown is destroyed before removing the document listeners, it ensures that they\n * are removed too.\n */\n onBeforeUnmount(() => {\n removeDocumentCloseListeners();\n });\n\n return {\n hasToggleSlot: !!slots.toggle,\n closeAndFocusToggleButton,\n dropdownCSSClasses,\n emitSelectedItemChanged,\n highlightFirstItem,\n highlightLastItem,\n highlightNextItem,\n highlightPreviousItem,\n highlightedItemIndex,\n isOpen,\n itemsButtonRefs,\n itemsCSSClasses,\n listId,\n open,\n rootRef,\n toggle,\n toggleButtonRef,\n updateSearchBuffer\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-dropdown {\n position: relative;\n }\n\n .x-dropdown__items-list {\n z-index: 1;\n list-style: none;\n position: absolute;\n padding: 0;\n margin: 0;\n top: calc(100% + var(--x-size-gap-dropdown-default, 0));\n }\n</style>\n\n<docs lang=\"mdx\">\n## Example\n\nThe `Dropdown` component is a simple yet customizable select component. The component needs to work\nthe list of items available to select, which are passed using the `items` prop, and the selected\nitem, which is passed in using the `value` prop.\n\nThe supported items must be an array that can contain unique strings, unique numbers, or objects\nwith a unique `id` property.\n\nThe content of each item can be customized using the `item` slot, which apart from the data of the\nitem, it also receives via prop if the element is selected or highlighted.\n\nThere `toggle` slot can be used to customize the button that opens the dropdown. If this is not\nprovided, the `item` slot will be used for that.\n\n```vue\n<template>\n <BaseDropdown v-model=\"value\" :items=\"items\">\n <template #toggle=\"{ item, isOpen }\">{{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template>\n\n <template #item=\"{ item, isSelected, isHighlighted }\">\n <span v-if=\"isHighlighted\">🟢</span>\n <span v-if=\"isSelected\">✅</span>\n <span>{{ item }}</span>\n </template>\n </BaseDropdown>\n</template>\n\n<script>\n import { BaseDropdown } from '@empathyco/x-components';\n\n export default {\n name: 'DropdownTest',\n components: {\n BaseDropdown\n },\n data() {\n return {\n items: ['a', 2, { id: '3' }],\n value: 'a'\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_withKeys","_withModifiers","dropdownCSSClasses","_normalizeClass","_createElementVNode","listId","ariaLabel","_renderSlot","isOpen","_createTextVNode","_toDisplayString","modelValue","_createBlock","_resolveDynamicComponent","_withCtx","_withDirectives","_Fragment","_renderList","itemsButtonRefs","itemsCSSClasses"],"mappings":";;;;;AAAA,MAAA,UAAA,GAAA,CAAA,eAAA,EAAA,eAAA,EAAA,YAAA,CAAA,CAAA;;;SAEQ,WAAS,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SACZA,SAAO,EAAA,EAAAC,kBAAA;AAAA,IAAA,KAAA;AAAA,IAAA;AAAA,MAAA,GAAA,EAAA,SAAA;;kCAHZ,CAKyB,GAAA,IAAA,KAAA,IAAA,CAAA,kBAAA,IAAA,IAAA,CAAA,kBAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,QAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAC,QAAA,CAAAC,aAAA,CAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,iBAAA,IAAA,IAAA,CAAA,iBAAA,CAAA,GAAA,IAAA,CAAA,EAAA,CAAA,SAAA,CAAA,CAAA,EAAA,CAAA,MAAA,CAAA,CAAA,CAAA;QACpB,MANL,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAMYC,2BACF,CAAY,GAAA,IAAA,KAAA,IAAA,CAAA,qBAAA,IAAA,IAAA,CAAA,qBAAA,CAAA,GAAA,IAAA,CAAA,EAAA,CAAA,SAAA,CAAA,CAAA,EAAA,CAAA,IAAA,CAAA,CAAA,CAAA;AAAA,OAAA;MAElB,KAuB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A,CAAA;AAAA,wBAAA,CAAA;AAAA;AAAA,uBAAA;AAAA,qBAAA,EAAA,IAAA,CAAA;;;;;;AAoCsB,aAAA;AAAA,WAAA,EAAA,EAAA,EAAA,UAAA,CAAA,EAAA;;AApCtB,WAAA,CAAA;AAAA,SAAA,CAAA;;;;;;;;;;;;;"}
@@ -3,7 +3,6 @@ import { AnimationProp } from '../types/animation-prop.js';
3
3
  import { debounce } from '../utils/debounce.js';
4
4
  import { getTargetElement } from '../utils/html.js';
5
5
  import { normalizeString } from '../utils/normalize.js';
6
- import { isInRange } from '../utils/number.js';
7
6
  import '../utils/storage.js';
8
7
  import './animations/animate-width.vue2.js';
9
8
  import './animations/animate-width.vue3.js';
@@ -230,12 +229,7 @@ var _sfc_main = defineComponent({
230
229
  * @param highlightedItemIndex - The index of the HTML element to focus.
231
230
  */
232
231
  watch(highlightedItemIndex, highlightedItemIndex => {
233
- nextTick(() => {
234
- if (itemsButtonRefs && isInRange(highlightedItemIndex, [0, props.items.length - 1])) {
235
- const newItem = itemsButtonRefs?.value?.[highlightedItemIndex];
236
- newItem?.focus();
237
- }
238
- });
232
+ nextTick(() => itemsButtonRefs.value[highlightedItemIndex]?.focus());
239
233
  }, { immediate: true });
240
234
  /**
241
235
  * When the dropdown is open it sets the focused element to the one that is selected.