@empathyco/x-components 6.0.0-alpha.5 → 6.0.0-alpha.50

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 (755) hide show
  1. package/CHANGELOG.md +439 -0
  2. package/core/index.js +8 -1
  3. package/core/index.js.map +1 -1
  4. package/design-system/deprecated-full-theme.css +425 -425
  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 +22 -0
  22. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.nextqueries.md +11 -0
  23. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.toolingdisplay.md +11 -0
  24. package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.toolingdisplayclick.md +11 -0
  25. package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.catalog.md +6 -0
  26. package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.md +1 -1
  27. package/docs/API-reference/api/x-adapter-platform.relatedpromptschema.md +13 -0
  28. package/docs/API-reference/api/x-adapter-platform.relatedpromptsendpointadapter.md +13 -0
  29. package/docs/API-reference/api/x-adapter-platform.relatedpromptsrequestmapper.md +13 -0
  30. package/docs/API-reference/api/x-adapter-platform.relatedpromptsrequestschema.md +13 -0
  31. package/docs/API-reference/api/x-adapter-platform.relatedpromptsresponsemapper.md +13 -0
  32. package/docs/API-reference/api/x-adapter-platform.relatedpromptsresponseschema.md +13 -0
  33. package/docs/API-reference/api/x-components.animationprop.md +6 -1
  34. package/docs/API-reference/api/x-components.bannerslist.md +3 -3
  35. package/docs/API-reference/api/x-components.baseaddtocart.md +1 -0
  36. package/docs/API-reference/api/x-components.basedropdown.md +5 -5
  37. package/docs/API-reference/api/x-components.baseeventsmodal.md +2 -2
  38. package/docs/API-reference/api/x-components.basegrid.md +3 -3
  39. package/docs/API-reference/api/x-components.baseheadertogglepanel.md +5 -5
  40. package/docs/API-reference/api/x-components.baseidmodal.md +2 -2
  41. package/docs/API-reference/api/x-components.baseidtogglepanel.md +5 -5
  42. package/docs/API-reference/api/x-components.basemodal.md +10 -10
  43. package/docs/API-reference/api/x-components.baseresultimage.md +9 -9
  44. package/docs/API-reference/api/x-components.baseslider.md +70 -0
  45. package/docs/API-reference/api/x-components.basesuggestions.md +3 -3
  46. package/docs/API-reference/api/x-components.basetabspanel.md +8 -8
  47. package/docs/API-reference/api/x-components.basetogglepanel.md +3 -3
  48. package/docs/API-reference/api/x-components.basevariablecolumngrid.md +3 -3
  49. package/docs/API-reference/api/x-components.cancelfetchandsaverelatedprompts.md +13 -0
  50. package/docs/API-reference/api/x-components.configmutations.config.md +11 -0
  51. package/docs/API-reference/api/x-components.configmutations.md +29 -0
  52. package/docs/API-reference/api/x-components.configmutations.mergeconfig.md +24 -0
  53. package/docs/API-reference/api/x-components.configmutations.setconfig.md +24 -0
  54. package/docs/API-reference/api/x-components.createrelatedtagsquerygetter.md +26 -0
  55. package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.getrelatedtags.md +13 -0
  56. package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.md +20 -0
  57. package/docs/API-reference/api/x-components.createtrackrelatedprompttoolingdisplayclickwire.md +19 -0
  58. package/docs/API-reference/api/x-components.createtracktoolingadd2cartwire.md +19 -0
  59. package/docs/API-reference/api/x-components.createtracktoolingdisplaywire.md +19 -0
  60. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice._constructor_.md → x-components.defaultexternaltaggingservice._constructor_.md} +3 -3
  61. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.add_to_cart_id_key.md +13 -0
  62. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.instance.md +13 -0
  63. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.localstorageservice.md +11 -0
  64. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.md +43 -0
  65. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.movetosessionstorage.md → x-components.defaultexternaltaggingservice.movetosessionstorage.md} +2 -2
  66. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.result_clicked_id_key.md +13 -0
  67. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.sessionstorageservice.md +11 -0
  68. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagekey.md +11 -0
  69. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagettlms.md +11 -0
  70. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.store.md → x-components.defaultexternaltaggingservice.store.md} +2 -2
  71. package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storeaddtocart.md +24 -0
  72. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.storeresultclicked.md → x-components.defaultexternaltaggingservice.storeresultclicked.md} +3 -3
  73. package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.trackaddtocart.md → x-components.defaultexternaltaggingservice.trackaddtocart.md} +3 -3
  74. package/docs/API-reference/api/x-components.displayclickprovider.md +66 -0
  75. package/docs/API-reference/api/x-components.empathize.md +6 -6
  76. package/docs/API-reference/api/x-components.empathizemutations.md +1 -1
  77. package/docs/API-reference/api/x-components.externaltaggingservice.md +23 -0
  78. package/docs/API-reference/api/{x-components.pdpaddtocartservice.movetosessionstorage.md → x-components.externaltaggingservice.movetosessionstorage.md} +2 -2
  79. package/docs/API-reference/api/x-components.externaltaggingservice.storeaddtocart.md +24 -0
  80. package/docs/API-reference/api/{x-components.pdpaddtocartservice.storeresultclicked.md → x-components.externaltaggingservice.storeresultclicked.md} +3 -3
  81. package/docs/API-reference/api/{x-components.pdpaddtocartservice.trackaddtocart.md → x-components.externaltaggingservice.trackaddtocart.md} +3 -3
  82. package/docs/API-reference/api/x-components.facets.md +3 -3
  83. package/docs/API-reference/api/x-components.facetsmutations.md +1 -1
  84. package/docs/API-reference/api/x-components.featurelocation.md +1 -1
  85. package/docs/API-reference/api/x-components.fetchandsaverelatedprompts.md +13 -0
  86. package/docs/API-reference/api/x-components.fetchrelatedprompts.md +13 -0
  87. package/docs/API-reference/api/x-components.filterslist.md +3 -3
  88. package/docs/API-reference/api/x-components.globalxbus.md +12 -0
  89. package/docs/API-reference/api/x-components.hierarchicalfilter.md +8 -2
  90. package/docs/API-reference/api/x-components.historyqueriesmutations.md +1 -1
  91. package/docs/API-reference/api/x-components.historyqueriesstate.md +1 -1
  92. package/docs/API-reference/api/x-components.identifierresults.md +3 -3
  93. package/docs/API-reference/api/x-components.identifierresultsmutations.md +1 -1
  94. package/docs/API-reference/api/x-components.identifierresultsstate.md +1 -1
  95. package/docs/API-reference/api/x-components.installxoptions.domelement.md +1 -1
  96. package/docs/API-reference/api/x-components.installxoptions.installextraplugins.md +2 -2
  97. package/docs/API-reference/api/x-components.installxoptions.md +1 -1
  98. package/docs/API-reference/api/x-components.itemslist.md +3 -3
  99. package/docs/API-reference/api/x-components.mainmodal.md +2 -2
  100. package/docs/API-reference/api/x-components.md +38 -3
  101. package/docs/API-reference/api/x-components.mergeconfig.md +27 -0
  102. package/docs/API-reference/api/x-components.multicolumnmaxwidthlayout.md +5 -5
  103. package/docs/API-reference/api/x-components.myhistory.md +3 -3
  104. package/docs/API-reference/api/x-components.nextqueriesgroup.md +22 -0
  105. package/docs/API-reference/api/x-components.nextqueriesgroup.modelname.md +11 -0
  106. package/docs/API-reference/api/x-components.nextqueriesgroup.nextqueries.md +11 -0
  107. package/docs/API-reference/api/x-components.nextquerieslist.md +3 -3
  108. package/docs/API-reference/api/x-components.nextqueriesmutations.md +1 -1
  109. package/docs/API-reference/api/x-components.nextqueriesstate.md +1 -1
  110. package/docs/API-reference/api/x-components.pageselector.md +80 -0
  111. package/docs/API-reference/api/x-components.partialresultslist.md +3 -3
  112. package/docs/API-reference/api/x-components.popularsearchesmutations.md +1 -1
  113. package/docs/API-reference/api/x-components.promotedslist.md +3 -3
  114. package/docs/API-reference/api/x-components.queriespreviewmutations.md +1 -1
  115. package/docs/API-reference/api/x-components.queryfeature.md +1 -1
  116. package/docs/API-reference/api/x-components.querymutations.md +20 -0
  117. package/docs/API-reference/api/x-components.querymutations.setquery.md +24 -0
  118. package/docs/API-reference/api/x-components.querypreviewlist.md +3 -3
  119. package/docs/API-reference/api/x-components.querystate.md +20 -0
  120. package/docs/API-reference/api/x-components.querystate.query.md +13 -0
  121. package/docs/API-reference/api/x-components.querysuggestionsmutations.md +1 -1
  122. package/docs/API-reference/api/x-components.querysuggestionsstate.md +1 -1
  123. package/docs/API-reference/api/x-components.recommendations.md +3 -3
  124. package/docs/API-reference/api/x-components.recommendationsmutations.md +1 -1
  125. package/docs/API-reference/api/x-components.relatedprompt.md +33 -0
  126. package/docs/API-reference/api/x-components.relatedpromptrequest.md +13 -0
  127. package/docs/API-reference/api/x-components.relatedpromptsactioncontext.md +15 -0
  128. package/docs/API-reference/api/x-components.relatedpromptsactions.cancelfetchandsaverelatedprompts.md +17 -0
  129. package/docs/API-reference/api/x-components.relatedpromptsactions.fetchandsaverelatedprompts.md +24 -0
  130. package/docs/API-reference/api/x-components.relatedpromptsactions.fetchrelatedprompts.md +24 -0
  131. package/docs/API-reference/api/x-components.relatedpromptsactions.md +22 -0
  132. package/docs/API-reference/api/x-components.relatedpromptsgetters.md +20 -0
  133. package/docs/API-reference/api/x-components.relatedpromptsgetters.request.md +13 -0
  134. package/docs/API-reference/api/x-components.relatedpromptslist.md +72 -0
  135. package/docs/API-reference/api/x-components.relatedpromptsmutations.md +26 -0
  136. package/docs/API-reference/api/x-components.relatedpromptsmutations.resetrelatedpromptsstate.md +17 -0
  137. package/docs/API-reference/api/x-components.relatedpromptsmutations.resetselectedprompt.md +17 -0
  138. package/docs/API-reference/api/x-components.relatedpromptsmutations.setparams.md +24 -0
  139. package/docs/API-reference/api/x-components.relatedpromptsmutations.setrelatedpromptsproducts.md +24 -0
  140. package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedprompt.md +24 -0
  141. package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedquery.md +24 -0
  142. package/docs/API-reference/api/x-components.relatedpromptsstate.md +24 -0
  143. package/docs/API-reference/api/x-components.relatedpromptsstate.params.md +13 -0
  144. package/docs/API-reference/api/x-components.relatedpromptsstate.relatedprompts.md +13 -0
  145. package/docs/API-reference/api/x-components.relatedpromptsstate.selectedprompt.md +13 -0
  146. package/docs/API-reference/api/x-components.relatedpromptsstate.selectedquery.md +13 -0
  147. package/docs/API-reference/api/x-components.relatedpromptstaglist.md +73 -0
  148. package/docs/API-reference/api/x-components.relatedpromptsxevents.md +24 -0
  149. package/docs/API-reference/api/x-components.relatedpromptsxevents.relatedpromptsrequestupdated.md +13 -0
  150. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptadd2cart.md +13 -0
  151. package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptresult.md +13 -0
  152. package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedprompt.md +13 -0
  153. package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedpromptquery.md +13 -0
  154. package/docs/API-reference/api/x-components.relatedpromptsxmodule.md +13 -0
  155. package/docs/API-reference/api/x-components.relatedpromptsxstoremodule.md +15 -0
  156. package/docs/API-reference/api/x-components.relatedtags.md +3 -3
  157. package/docs/API-reference/api/x-components.relatedtagsmutations.md +1 -1
  158. package/docs/API-reference/api/x-components.relatedtagsstate.md +1 -1
  159. package/docs/API-reference/api/x-components.resultslist.md +3 -3
  160. package/docs/API-reference/api/x-components.scrolltotop.md +5 -5
  161. package/docs/API-reference/api/x-components.searchboxmutations.md +1 -1
  162. package/docs/API-reference/api/x-components.searchboxstate.md +1 -1
  163. package/docs/API-reference/api/x-components.searchconfig.md +1 -0
  164. package/docs/API-reference/api/x-components.searchconfig.pagemode.md +11 -0
  165. package/docs/API-reference/api/x-components.searchinputplaceholder.md +3 -3
  166. package/docs/API-reference/api/x-components.searchmutations.md +2 -1
  167. package/docs/API-reference/api/x-components.searchmutations.setstats.md +24 -0
  168. package/docs/API-reference/api/x-components.searchstate.md +2 -1
  169. package/docs/API-reference/api/x-components.searchstate.stats.md +13 -0
  170. package/docs/API-reference/api/x-components.searchxevents.md +1 -0
  171. package/docs/API-reference/api/x-components.searchxevents.userselectedapage.md +13 -0
  172. package/docs/API-reference/api/x-components.selectedfilterslist.md +3 -3
  173. package/docs/API-reference/api/x-components.semanticqueriesmutations.md +1 -1
  174. package/docs/API-reference/api/x-components.semanticqueriesstate.md +1 -1
  175. package/docs/API-reference/api/x-components.setconfig.md +27 -0
  176. package/docs/API-reference/api/x-components.setquery.md +25 -0
  177. package/docs/API-reference/api/x-components.simplefilter.md +6 -0
  178. package/docs/API-reference/api/x-components.singlecolumnlayout.md +3 -3
  179. package/docs/API-reference/api/x-components.snippetcallbacks.md +6 -0
  180. package/docs/API-reference/api/x-components.sortdropdown.md +1 -1
  181. package/docs/API-reference/api/x-components.tagging.md +6 -6
  182. package/docs/API-reference/api/x-components.taggingconfig.md +2 -2
  183. package/docs/API-reference/api/{x-components.taggingconfig.clickedresultstoragekey.md → x-components.taggingconfig.storagekey.md} +3 -3
  184. package/docs/API-reference/api/x-components.taggingconfig.storagettlms.md +13 -0
  185. package/docs/API-reference/api/x-components.taggingmutations.md +1 -1
  186. package/docs/API-reference/api/x-components.taggingxevents.md +1 -1
  187. package/docs/API-reference/api/x-components.taggingxevents.resulturltrackingenabled.md +1 -1
  188. package/docs/API-reference/api/x-components.trackrelatedprompttoolingdisplayclickwire.md +13 -0
  189. package/docs/API-reference/api/x-components.tracktoolingadd2cartwire.md +13 -0
  190. package/docs/API-reference/api/x-components.tracktoolingdisplayclickedwire.md +13 -0
  191. package/docs/API-reference/api/x-components.typing.md +13 -0
  192. package/docs/API-reference/api/x-components.typingoptions.md +22 -0
  193. package/docs/API-reference/api/x-components.typingoptions.speed.md +13 -0
  194. package/docs/API-reference/api/x-components.typingoptions.targetattr.md +18 -0
  195. package/docs/API-reference/api/x-components.typingoptions.text.md +13 -0
  196. package/docs/API-reference/api/x-components.urlmutations.md +1 -1
  197. package/docs/API-reference/api/x-components.urlstate.md +1 -1
  198. package/docs/API-reference/api/x-components.usealiasapi.md +1 -0
  199. package/docs/API-reference/api/x-components.usealiasapi.pricestats.md +16 -0
  200. package/docs/API-reference/api/x-components.xeventstypes.md +3 -3
  201. package/docs/API-reference/api/x-components.xmodulestree.md +1 -0
  202. package/docs/API-reference/api/x-components.xmodulestree.relatedprompts.md +11 -0
  203. package/docs/API-reference/api/x-types.md +5 -0
  204. package/docs/API-reference/api/x-types.relatedprompt.md +26 -0
  205. package/docs/API-reference/api/x-types.relatedprompt.nextqueries.md +13 -0
  206. package/docs/API-reference/api/x-types.relatedprompt.relatedpromptnextqueries.md +13 -0
  207. package/docs/API-reference/api/x-types.relatedprompt.suggestiontext.md +13 -0
  208. package/docs/API-reference/api/x-types.relatedprompt.tagging.md +17 -0
  209. package/docs/API-reference/api/x-types.relatedprompt.toolingdisplaytagging.md +13 -0
  210. package/docs/API-reference/api/x-types.relatedprompt.type.md +13 -0
  211. package/docs/API-reference/api/x-types.relatedpromptnextquery.md +23 -0
  212. package/docs/API-reference/api/x-types.relatedpromptnextquery.query.md +13 -0
  213. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayadd2carttagging.md +13 -0
  214. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayclicktagging.md +13 -0
  215. package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplaytagging.md +13 -0
  216. package/docs/API-reference/api/x-types.relatedpromptsrequest.md +15 -0
  217. package/docs/API-reference/api/x-types.relatedpromptsresponse.md +20 -0
  218. package/docs/API-reference/api/x-types.relatedpromptsresponse.relatedprompts.md +11 -0
  219. package/docs/API-reference/api/x-types.searchresponse.md +1 -0
  220. package/docs/API-reference/api/x-types.searchresponse.stats.md +11 -0
  221. package/docs/API-reference/api/x-types.stats.md +22 -0
  222. package/docs/API-reference/api/x-types.stats.price.md +14 -0
  223. package/docs/API-reference/api/x-types.xcomponentsadapter.md +1 -0
  224. package/docs/API-reference/api/x-types.xcomponentsadapter.relatedprompts.md +11 -0
  225. package/docs/API-reference/components/common/result/x-components.base-result-image.md +2 -2
  226. package/docs/API-reference/components/common/x-components.base-slider.md +189 -0
  227. package/docs/API-reference/components/common/x-components.display-click-provider.md +17 -0
  228. package/docs/API-reference/components/common/x-components.items-list.md +1 -1
  229. package/docs/API-reference/components/common/x-components.page-selector.md +136 -0
  230. package/docs/API-reference/components/facets/x-components.facets/facets.md +1 -1
  231. package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +1 -1
  232. package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +22 -0
  233. package/docs/API-reference/components/related-prompts/x-components.related-prompts-list.md +196 -0
  234. package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +32 -0
  235. package/docs/API-reference/components/search/x-components.results-list.md +1 -1
  236. package/docs/API-reference/components/tagging/x-components.tagging.md +15 -16
  237. package/js/components/animations/fade-and-slide.vue.js +1 -2
  238. package/js/components/animations/fade-and-slide.vue.js.map +1 -1
  239. package/js/components/base-dropdown.vue.js +1 -3
  240. package/js/components/base-dropdown.vue.js.map +1 -1
  241. package/js/components/base-dropdown.vue2.js +1 -7
  242. package/js/components/base-dropdown.vue2.js.map +1 -1
  243. package/js/components/base-event-button.vue.js +1 -2
  244. package/js/components/base-event-button.vue.js.map +1 -1
  245. package/js/components/base-grid.vue.js +11 -18
  246. package/js/components/base-grid.vue.js.map +1 -1
  247. package/js/components/base-grid.vue2.js.map +1 -1
  248. package/js/components/base-grid.vue3.js +1 -1
  249. package/js/components/base-keyboard-navigation.vue.js +1 -2
  250. package/js/components/base-keyboard-navigation.vue.js.map +1 -1
  251. package/js/components/base-rating.vue.js +1 -3
  252. package/js/components/base-rating.vue.js.map +1 -1
  253. package/js/components/base-slider.vue.js +65 -0
  254. package/js/components/base-slider.vue.js.map +1 -0
  255. package/js/components/base-slider.vue2.js +109 -0
  256. package/js/components/base-slider.vue2.js.map +1 -0
  257. package/js/components/base-slider.vue3.js +7 -0
  258. package/js/components/base-slider.vue3.js.map +1 -0
  259. package/js/components/base-variable-column-grid.vue.js +1 -2
  260. package/js/components/base-variable-column-grid.vue.js.map +1 -1
  261. package/js/components/column-picker/base-column-picker-dropdown.vue.js +1 -3
  262. package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
  263. package/js/components/column-picker/base-column-picker-list.vue.js +1 -3
  264. package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
  265. package/js/components/display-click-provider.vue.js +74 -0
  266. package/js/components/display-click-provider.vue.js.map +1 -0
  267. package/js/components/display-click-provider.vue2.js +6 -0
  268. package/js/components/display-click-provider.vue2.js.map +1 -0
  269. package/js/components/filters/labels/base-rating-filter-label.vue.js +1 -3
  270. package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
  271. package/js/components/icons/cross-tiny.vue.js +2 -2
  272. package/js/components/icons/plus.vue.js +2 -2
  273. package/js/components/items-list.vue.js +1 -2
  274. package/js/components/items-list.vue.js.map +1 -1
  275. package/js/components/items-list.vue2.js +2 -2
  276. package/js/components/items-list.vue2.js.map +1 -1
  277. package/js/components/layouts/fixed-header-and-asides-layout.vue.js +1 -7
  278. package/js/components/layouts/fixed-header-and-asides-layout.vue.js.map +1 -1
  279. package/js/components/layouts/multi-column-max-width-layout.vue.js +1 -9
  280. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  281. package/js/components/layouts/single-column-layout.vue.js +1 -9
  282. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  283. package/js/components/modals/base-events-modal-close.vue.js +1 -2
  284. package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
  285. package/js/components/modals/base-events-modal-open.vue.js +1 -2
  286. package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
  287. package/js/components/modals/base-id-modal-close.vue.js +1 -2
  288. package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
  289. package/js/components/modals/base-id-modal-open.vue.js +1 -2
  290. package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
  291. package/js/components/modals/base-modal.vue.js +1 -2
  292. package/js/components/modals/base-modal.vue.js.map +1 -1
  293. package/js/components/modals/base-modal.vue2.js +13 -6
  294. package/js/components/modals/base-modal.vue2.js.map +1 -1
  295. package/js/components/page-loader-button.vue.js +8 -10
  296. package/js/components/page-loader-button.vue.js.map +1 -1
  297. package/js/components/page-loader-button.vue2.js.map +1 -1
  298. package/js/components/page-loader-button.vue3.js +7 -0
  299. package/js/components/page-loader-button.vue3.js.map +1 -0
  300. package/js/components/page-selector.vue.js +78 -0
  301. package/js/components/page-selector.vue.js.map +1 -0
  302. package/js/components/page-selector.vue2.js +128 -0
  303. package/js/components/page-selector.vue2.js.map +1 -0
  304. package/js/components/page-selector.vue3.js +7 -0
  305. package/js/components/page-selector.vue3.js.map +1 -0
  306. package/js/components/panels/base-header-toggle-panel.vue.js +1 -5
  307. package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
  308. package/js/components/panels/base-id-toggle-panel-button.vue.js +1 -2
  309. package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
  310. package/js/components/panels/base-id-toggle-panel.vue.js +1 -2
  311. package/js/components/panels/base-id-toggle-panel.vue.js.map +1 -1
  312. package/js/components/panels/base-tabs-panel.vue.js +1 -4
  313. package/js/components/panels/base-tabs-panel.vue.js.map +1 -1
  314. package/js/components/panels/base-toggle-panel.vue.js +1 -2
  315. package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
  316. package/js/components/result/base-result-add-to-cart.vue.js +3 -3
  317. package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
  318. package/js/components/result/base-result-add-to-cart.vue2.js +19 -5
  319. package/js/components/result/base-result-add-to-cart.vue2.js.map +1 -1
  320. package/js/components/result/base-result-current-price.vue.js +1 -2
  321. package/js/components/result/base-result-current-price.vue.js.map +1 -1
  322. package/js/components/result/base-result-image.vue.js +39 -59
  323. package/js/components/result/base-result-image.vue.js.map +1 -1
  324. package/js/components/result/base-result-image.vue2.js +5 -5
  325. package/js/components/result/base-result-image.vue2.js.map +1 -1
  326. package/js/components/result/base-result-link.vue.js +1 -2
  327. package/js/components/result/base-result-link.vue.js.map +1 -1
  328. package/js/components/result/base-result-previous-price.vue.js +1 -2
  329. package/js/components/result/base-result-previous-price.vue.js.map +1 -1
  330. package/js/components/result/base-result-rating.vue.js +1 -4
  331. package/js/components/result/base-result-rating.vue.js.map +1 -1
  332. package/js/components/result/result-variant-selector.vue.js +1 -3
  333. package/js/components/result/result-variant-selector.vue.js.map +1 -1
  334. package/js/components/sliding-panel.vue.js +3 -6
  335. package/js/components/sliding-panel.vue.js.map +1 -1
  336. package/js/components/suggestions/base-suggestion.vue.js +1 -2
  337. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  338. package/js/components/suggestions/base-suggestions.vue.js +1 -2
  339. package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
  340. package/js/composables/use-alias-api.js +4 -1
  341. package/js/composables/use-alias-api.js.map +1 -1
  342. package/js/composables/use-getter.js +1 -1
  343. package/js/composables/use-state.js +1 -1
  344. package/js/directives/typing.js +58 -0
  345. package/js/directives/typing.js.map +1 -0
  346. package/js/index.js +20 -3
  347. package/js/index.js.map +1 -1
  348. package/js/types/animation-prop.js +5 -0
  349. package/js/types/animation-prop.js.map +1 -1
  350. package/js/x-installer/x-installer/x-installer.js +3 -3
  351. package/js/x-installer/x-installer/x-installer.js.map +1 -1
  352. package/js/x-modules/device/store/emitters.js +1 -0
  353. package/js/x-modules/device/store/emitters.js.map +1 -1
  354. package/js/x-modules/empathize/components/empathize.vue.js +1 -2
  355. package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
  356. package/js/x-modules/empathize/components/empathize.vue2.js +8 -3
  357. package/js/x-modules/empathize/components/empathize.vue2.js.map +1 -1
  358. package/js/x-modules/empathize/store/emitters.js +1 -0
  359. package/js/x-modules/empathize/store/emitters.js.map +1 -1
  360. package/js/x-modules/experience-controls/store/emitters.js +1 -0
  361. package/js/x-modules/experience-controls/store/emitters.js.map +1 -1
  362. package/js/x-modules/extra-params/components/extra-params.vue.js +1 -1
  363. package/js/x-modules/extra-params/components/extra-params.vue.js.map +1 -1
  364. package/js/x-modules/extra-params/store/emitters.js +1 -0
  365. package/js/x-modules/extra-params/store/emitters.js.map +1 -1
  366. package/js/x-modules/facets/components/facets/facets.vue.js +20 -33
  367. package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
  368. package/js/x-modules/facets/components/facets/facets.vue2.js +2 -2
  369. package/js/x-modules/facets/components/facets/facets.vue2.js.map +1 -1
  370. package/js/x-modules/facets/components/filters/all-filter.vue.js +1 -2
  371. package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
  372. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +1 -6
  373. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
  374. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +1 -3
  375. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
  376. package/js/x-modules/facets/components/filters/number-range-filter.vue.js +1 -3
  377. package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
  378. package/js/x-modules/facets/components/filters/simple-filter.vue.js +1 -3
  379. package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
  380. package/js/x-modules/facets/components/lists/filters-list.vue.js +1 -2
  381. package/js/x-modules/facets/components/lists/filters-list.vue.js.map +1 -1
  382. package/js/x-modules/facets/components/lists/filters-search.vue.js +1 -3
  383. package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
  384. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +11 -18
  385. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
  386. package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js +2 -2
  387. package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js.map +1 -1
  388. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +1 -4
  389. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  390. package/js/x-modules/history-queries/components/clear-history-queries.vue.js +1 -2
  391. package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
  392. package/js/x-modules/history-queries/components/history-queries.vue.js +1 -10
  393. package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
  394. package/js/x-modules/history-queries/components/history-query.vue.js +1 -6
  395. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  396. package/js/x-modules/history-queries/components/my-history.vue.js +1 -4
  397. package/js/x-modules/history-queries/components/my-history.vue.js.map +1 -1
  398. package/js/x-modules/history-queries/components/remove-history-query.vue.js +1 -2
  399. package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
  400. package/js/x-modules/history-queries/store/emitters.js +1 -0
  401. package/js/x-modules/history-queries/store/emitters.js.map +1 -1
  402. package/js/x-modules/identifier-results/components/identifier-results.vue.js +1 -2
  403. package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
  404. package/js/x-modules/identifier-results/store/emitters.js +1 -0
  405. package/js/x-modules/identifier-results/store/emitters.js.map +1 -1
  406. package/js/x-modules/next-queries/components/next-queries.vue.js +1 -7
  407. package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
  408. package/js/x-modules/next-queries/components/next-query-preview.vue.js +1 -3
  409. package/js/x-modules/next-queries/components/next-query-preview.vue.js.map +1 -1
  410. package/js/x-modules/next-queries/components/next-query.vue.js +1 -4
  411. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  412. package/js/x-modules/next-queries/store/emitters.js +1 -0
  413. package/js/x-modules/next-queries/store/emitters.js.map +1 -1
  414. package/js/x-modules/popular-searches/components/popular-search.vue.js +1 -4
  415. package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
  416. package/js/x-modules/popular-searches/components/popular-searches.vue.js +1 -7
  417. package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
  418. package/js/x-modules/queries-preview/components/query-preview-button.vue.js +1 -2
  419. package/js/x-modules/queries-preview/components/query-preview-button.vue.js.map +1 -1
  420. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js +6 -0
  421. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js.map +1 -1
  422. package/js/x-modules/queries-preview/components/query-preview-list.vue.js.map +1 -1
  423. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js +15 -2
  424. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js.map +1 -1
  425. package/js/x-modules/queries-preview/components/query-preview.vue.js +1 -2
  426. package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
  427. package/js/x-modules/queries-preview/components/query-preview.vue2.js +7 -1
  428. package/js/x-modules/queries-preview/components/query-preview.vue2.js.map +1 -1
  429. package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js +2 -1
  430. package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js.map +1 -1
  431. package/js/x-modules/queries-preview/store/emitters.js +1 -0
  432. package/js/x-modules/queries-preview/store/emitters.js.map +1 -1
  433. package/js/x-modules/queries-preview/store/module.js +1 -1
  434. package/js/x-modules/queries-preview/store/module.js.map +1 -1
  435. package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js +6 -4
  436. package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js.map +1 -1
  437. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +1 -4
  438. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
  439. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +1 -7
  440. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
  441. package/js/x-modules/query-suggestions/store/emitters.js +1 -0
  442. package/js/x-modules/query-suggestions/store/emitters.js.map +1 -1
  443. package/js/x-modules/recommendations/components/recommendations.vue.js +1 -2
  444. package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
  445. package/js/x-modules/recommendations/store/emitters.js +1 -0
  446. package/js/x-modules/recommendations/store/emitters.js.map +1 -1
  447. package/js/x-modules/related-prompts/components/related-prompt.vue.js +26 -0
  448. package/js/x-modules/related-prompts/components/related-prompt.vue.js.map +1 -0
  449. package/js/x-modules/related-prompts/components/related-prompt.vue2.js +31 -0
  450. package/js/x-modules/related-prompts/components/related-prompt.vue2.js.map +1 -0
  451. package/js/x-modules/related-prompts/components/related-prompt.vue3.js +7 -0
  452. package/js/x-modules/related-prompts/components/related-prompt.vue3.js.map +1 -0
  453. package/js/x-modules/related-prompts/components/related-prompts-list.vue.js +154 -0
  454. package/js/x-modules/related-prompts/components/related-prompts-list.vue.js.map +1 -0
  455. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js +6 -0
  456. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js.map +1 -0
  457. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js +95 -0
  458. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js.map +1 -0
  459. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js +224 -0
  460. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js.map +1 -0
  461. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js +7 -0
  462. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js.map +1 -0
  463. package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js +29 -0
  464. package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js.map +1 -0
  465. package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js +20 -0
  466. package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js.map +1 -0
  467. package/js/x-modules/related-prompts/store/emitters.js +15 -0
  468. package/js/x-modules/related-prompts/store/emitters.js.map +1 -0
  469. package/js/x-modules/related-prompts/store/getters/request.getter.js +16 -0
  470. package/js/x-modules/related-prompts/store/getters/request.getter.js.map +1 -0
  471. package/js/x-modules/related-prompts/store/module.js +61 -0
  472. package/js/x-modules/related-prompts/store/module.js.map +1 -0
  473. package/js/x-modules/related-prompts/wiring.js +99 -0
  474. package/js/x-modules/related-prompts/wiring.js.map +1 -0
  475. package/js/x-modules/related-prompts/x-module.js +21 -0
  476. package/js/x-modules/related-prompts/x-module.js.map +1 -0
  477. package/js/x-modules/related-tags/components/related-tag.vue.js +1 -2
  478. package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
  479. package/js/x-modules/related-tags/components/related-tags.vue.js +1 -4
  480. package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
  481. package/js/x-modules/related-tags/store/emitters.js +1 -0
  482. package/js/x-modules/related-tags/store/emitters.js.map +1 -1
  483. package/js/x-modules/scroll/components/scroll-to-top.vue.js +1 -2
  484. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
  485. package/js/x-modules/scroll/components/scroll-to-top.vue2.js +6 -0
  486. package/js/x-modules/scroll/components/scroll-to-top.vue2.js.map +1 -1
  487. package/js/x-modules/scroll/store/emitters.js +1 -0
  488. package/js/x-modules/scroll/store/emitters.js.map +1 -1
  489. package/js/x-modules/search/components/partial-results-list.vue.js +1 -2
  490. package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
  491. package/js/x-modules/search/components/results-list.vue.js +2 -2
  492. package/js/x-modules/search/components/results-list.vue.js.map +1 -1
  493. package/js/x-modules/search/components/sort-dropdown.vue.js +1 -3
  494. package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
  495. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +10 -3
  496. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
  497. package/js/x-modules/search/store/actions/save-search-response.action.js +3 -1
  498. package/js/x-modules/search/store/actions/save-search-response.action.js.map +1 -1
  499. package/js/x-modules/search/store/emitters.js +1 -0
  500. package/js/x-modules/search/store/emitters.js.map +1 -1
  501. package/js/x-modules/search/store/module.js +9 -3
  502. package/js/x-modules/search/store/module.js.map +1 -1
  503. package/js/x-modules/search/wiring.js +4 -0
  504. package/js/x-modules/search/wiring.js.map +1 -1
  505. package/js/x-modules/search-box/components/clear-search-input.vue.js +1 -2
  506. package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
  507. package/js/x-modules/search-box/components/search-button.vue.js +1 -2
  508. package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
  509. package/js/x-modules/search-box/store/emitters.js +1 -0
  510. package/js/x-modules/search-box/store/emitters.js.map +1 -1
  511. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js +1 -3
  512. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js.map +1 -1
  513. package/js/x-modules/semantic-queries/components/semantic-query.vue.js +1 -4
  514. package/js/x-modules/semantic-queries/components/semantic-query.vue.js.map +1 -1
  515. package/js/x-modules/tagging/components/tagging.vue.js +8 -7
  516. package/js/x-modules/tagging/components/tagging.vue.js.map +1 -1
  517. package/js/x-modules/tagging/service/{pdp-add-to-cart.service.js → external-tagging.service.js} +56 -25
  518. package/js/x-modules/tagging/service/external-tagging.service.js.map +1 -0
  519. package/js/x-modules/tagging/store/emitters.js +1 -1
  520. package/js/x-modules/tagging/store/emitters.js.map +1 -1
  521. package/js/x-modules/tagging/store/module.js +7 -3
  522. package/js/x-modules/tagging/store/module.js.map +1 -1
  523. package/js/x-modules/tagging/wiring.js +105 -8
  524. package/js/x-modules/tagging/wiring.js.map +1 -1
  525. package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
  526. package/js/x-modules/url/components/url-handler.vue2.js +2 -1
  527. package/js/x-modules/url/components/url-handler.vue2.js.map +1 -1
  528. package/js/x-modules/url/store/emitters.js +1 -0
  529. package/js/x-modules/url/store/emitters.js.map +1 -1
  530. package/package.json +50 -49
  531. package/related-prompts/index.d.ts +1 -0
  532. package/related-prompts/index.js +10 -0
  533. package/report/x-adapter-platform.api.json +936 -81
  534. package/report/x-components.api.json +16156 -17343
  535. package/report/x-components.api.md +794 -209
  536. package/report/x-types.api.json +577 -0
  537. package/tagging/index.js +2 -2
  538. package/types/adapter/e2e-adapter.d.ts.map +1 -1
  539. package/types/adapter/mocked-responses.d.ts +3 -0
  540. package/types/adapter/mocked-responses.d.ts.map +1 -1
  541. package/types/components/base-dropdown.vue.d.ts +5 -5
  542. package/types/components/base-dropdown.vue.d.ts.map +1 -1
  543. package/types/components/base-grid.vue.d.ts +3 -3
  544. package/types/components/base-slider.vue.d.ts +74 -0
  545. package/types/components/base-slider.vue.d.ts.map +1 -0
  546. package/types/components/base-variable-column-grid.vue.d.ts +3 -3
  547. package/types/components/display-click-provider.vue.d.ts +61 -0
  548. package/types/components/display-click-provider.vue.d.ts.map +1 -0
  549. package/types/components/global-x-bus.vue.d.ts +12 -0
  550. package/types/components/global-x-bus.vue.d.ts.map +1 -1
  551. package/types/components/index.d.ts +3 -0
  552. package/types/components/index.d.ts.map +1 -1
  553. package/types/components/items-list.vue.d.ts +3 -3
  554. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts +5 -5
  555. package/types/components/layouts/single-column-layout.vue.d.ts +3 -3
  556. package/types/components/modals/base-events-modal.vue.d.ts +2 -2
  557. package/types/components/modals/base-id-modal.vue.d.ts +2 -2
  558. package/types/components/modals/base-modal.vue.d.ts +10 -10
  559. package/types/components/modals/base-modal.vue.d.ts.map +1 -1
  560. package/types/components/modals/main-modal.vue.d.ts +2 -2
  561. package/types/components/page-selector.vue.d.ts +125 -0
  562. package/types/components/page-selector.vue.d.ts.map +1 -0
  563. package/types/components/panels/base-header-toggle-panel.vue.d.ts +5 -5
  564. package/types/components/panels/base-id-toggle-panel.vue.d.ts +5 -5
  565. package/types/components/panels/base-tabs-panel.vue.d.ts +8 -8
  566. package/types/components/panels/base-toggle-panel.vue.d.ts +3 -3
  567. package/types/components/result/base-result-add-to-cart.vue.d.ts +2 -0
  568. package/types/components/result/base-result-add-to-cart.vue.d.ts.map +1 -1
  569. package/types/components/result/base-result-image.vue.d.ts +10 -10
  570. package/types/components/result/base-result-image.vue.d.ts.map +1 -1
  571. package/types/components/snippet-callbacks.vue.d.ts +6 -0
  572. package/types/components/snippet-callbacks.vue.d.ts.map +1 -1
  573. package/types/components/suggestions/base-suggestions.vue.d.ts +3 -3
  574. package/types/composables/use-alias-api.d.ts +5 -0
  575. package/types/composables/use-alias-api.d.ts.map +1 -1
  576. package/types/composables/use-store.d.ts +2 -2
  577. package/types/composables/use-store.d.ts.map +1 -1
  578. package/types/directives/index.d.ts +1 -0
  579. package/types/directives/index.d.ts.map +1 -1
  580. package/types/directives/typing.d.ts +35 -0
  581. package/types/directives/typing.d.ts.map +1 -0
  582. package/types/index.d.ts +1 -0
  583. package/types/index.d.ts.map +1 -1
  584. package/types/store/index.d.ts +4 -1
  585. package/types/store/index.d.ts.map +1 -1
  586. package/types/tailwind/plugin-options.d.ts +1 -2
  587. package/types/tailwind/plugin-options.d.ts.map +1 -1
  588. package/types/types/animation-prop.d.ts +6 -2
  589. package/types/types/animation-prop.d.ts.map +1 -1
  590. package/types/types/origin.d.ts +2 -2
  591. package/types/types/origin.d.ts.map +1 -1
  592. package/types/types/page-mode.d.ts +2 -0
  593. package/types/types/page-mode.d.ts.map +1 -0
  594. package/types/views/home/types.d.ts +3 -0
  595. package/types/views/home/types.d.ts.map +1 -1
  596. package/types/wiring/events.types.d.ts +3 -1
  597. package/types/wiring/events.types.d.ts.map +1 -1
  598. package/types/x-installer/x-installer/types.d.ts +2 -2
  599. package/types/x-installer/x-installer/types.d.ts.map +1 -1
  600. package/types/x-installer/x-installer/x-installer.d.ts +4 -4
  601. package/types/x-installer/x-installer/x-installer.d.ts.map +1 -1
  602. package/types/x-modules/empathize/components/empathize.vue.d.ts +6 -6
  603. package/types/x-modules/empathize/components/empathize.vue.d.ts.map +1 -1
  604. package/types/x-modules/facets/components/facets/facets.vue.d.ts +3 -3
  605. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +8 -2
  606. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  607. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts +6 -0
  608. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
  609. package/types/x-modules/facets/components/lists/filters-list.vue.d.ts +3 -3
  610. package/types/x-modules/facets/components/lists/selected-filters-list.vue.d.ts +3 -3
  611. package/types/x-modules/history-queries/components/my-history.vue.d.ts +3 -3
  612. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +3 -3
  613. package/types/x-modules/next-queries/components/next-queries-list.vue.d.ts +3 -3
  614. package/types/x-modules/next-queries/index.d.ts +1 -0
  615. package/types/x-modules/next-queries/index.d.ts.map +1 -1
  616. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts +3 -3
  617. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts.map +1 -1
  618. package/types/x-modules/queries-preview/components/query-preview.vue.d.ts.map +1 -1
  619. package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts.map +1 -1
  620. package/types/x-modules/queries-preview/store/module.d.ts.map +1 -1
  621. package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts +4 -2
  622. package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts.map +1 -1
  623. package/types/x-modules/recommendations/components/recommendations.vue.d.ts +3 -3
  624. package/types/x-modules/related-prompts/components/index.d.ts +4 -0
  625. package/types/x-modules/related-prompts/components/index.d.ts.map +1 -0
  626. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts +28 -0
  627. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts.map +1 -0
  628. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts +106 -0
  629. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts.map +1 -0
  630. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts +132 -0
  631. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -0
  632. package/types/x-modules/related-prompts/events.types.d.ts +36 -0
  633. package/types/x-modules/related-prompts/events.types.d.ts.map +1 -0
  634. package/types/x-modules/related-prompts/index.d.ts +6 -0
  635. package/types/x-modules/related-prompts/index.d.ts.map +1 -0
  636. package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts +17 -0
  637. package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts.map +1 -0
  638. package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts +13 -0
  639. package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts.map +1 -0
  640. package/types/x-modules/related-prompts/store/emitters.d.ts +9 -0
  641. package/types/x-modules/related-prompts/store/emitters.d.ts.map +1 -0
  642. package/types/x-modules/related-prompts/store/getters/request.getter.d.ts +13 -0
  643. package/types/x-modules/related-prompts/store/getters/request.getter.d.ts.map +1 -0
  644. package/types/x-modules/related-prompts/store/index.d.ts +7 -0
  645. package/types/x-modules/related-prompts/store/index.d.ts.map +1 -0
  646. package/types/x-modules/related-prompts/store/module.d.ts +8 -0
  647. package/types/x-modules/related-prompts/store/module.d.ts.map +1 -0
  648. package/types/x-modules/related-prompts/store/types.d.ts +108 -0
  649. package/types/x-modules/related-prompts/store/types.d.ts.map +1 -0
  650. package/types/x-modules/related-prompts/types.d.ts +10 -0
  651. package/types/x-modules/related-prompts/types.d.ts.map +1 -0
  652. package/types/x-modules/related-prompts/wiring.d.ts +38 -0
  653. package/types/x-modules/related-prompts/wiring.d.ts.map +1 -0
  654. package/types/x-modules/related-prompts/x-module.d.ts +16 -0
  655. package/types/x-modules/related-prompts/x-module.d.ts.map +1 -0
  656. package/types/x-modules/related-tags/components/related-tags.vue.d.ts +3 -3
  657. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +5 -5
  658. package/types/x-modules/search/components/banners-list.vue.d.ts +3 -3
  659. package/types/x-modules/search/components/partial-results-list.vue.d.ts +3 -3
  660. package/types/x-modules/search/components/promoteds-list.vue.d.ts +3 -3
  661. package/types/x-modules/search/components/results-list.vue.d.ts +3 -3
  662. package/types/x-modules/search/components/sort-dropdown.vue.d.ts +1 -1
  663. package/types/x-modules/search/config.types.d.ts +2 -0
  664. package/types/x-modules/search/config.types.d.ts.map +1 -1
  665. package/types/x-modules/search/events.types.d.ts +4 -0
  666. package/types/x-modules/search/events.types.d.ts.map +1 -1
  667. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
  668. package/types/x-modules/search/store/actions/save-search-response.action.d.ts.map +1 -1
  669. package/types/x-modules/search/store/module.d.ts +2 -0
  670. package/types/x-modules/search/store/module.d.ts.map +1 -1
  671. package/types/x-modules/search/store/types.d.ts +9 -1
  672. package/types/x-modules/search/store/types.d.ts.map +1 -1
  673. package/types/x-modules/search/wiring.d.ts +4 -0
  674. package/types/x-modules/search/wiring.d.ts.map +1 -1
  675. package/types/x-modules/search-box/components/search-input-placeholder.vue.d.ts +3 -3
  676. package/types/x-modules/tagging/components/tagging.vue.d.ts +14 -12
  677. package/types/x-modules/tagging/components/tagging.vue.d.ts.map +1 -1
  678. package/types/x-modules/tagging/config.types.d.ts +3 -3
  679. package/types/x-modules/tagging/config.types.d.ts.map +1 -1
  680. package/types/x-modules/tagging/events.types.d.ts +2 -2
  681. package/types/x-modules/tagging/service/{pdp-add-to-cart.service.d.ts → external-tagging.service.d.ts} +31 -13
  682. package/types/x-modules/tagging/service/external-tagging.service.d.ts.map +1 -0
  683. package/types/x-modules/tagging/service/index.d.ts +1 -1
  684. package/types/x-modules/tagging/service/index.d.ts.map +1 -1
  685. package/types/x-modules/tagging/service/types.d.ts +13 -4
  686. package/types/x-modules/tagging/service/types.d.ts.map +1 -1
  687. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  688. package/types/x-modules/tagging/wiring.d.ts +54 -2
  689. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  690. package/types/x-modules/url/components/url-handler.vue.d.ts.map +1 -1
  691. package/types/x-modules/x-modules.types.d.ts +2 -0
  692. package/types/x-modules/x-modules.types.d.ts.map +1 -1
  693. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragekey.md +0 -11
  694. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragettlms.md +0 -11
  695. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.instance.md +0 -13
  696. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.localstorageservice.md +0 -11
  697. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.md +0 -41
  698. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.result_clicked_id_key.md +0 -13
  699. package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.sessionstorageservice.md +0 -11
  700. package/docs/API-reference/api/x-components.pdpaddtocartservice.md +0 -22
  701. package/docs/API-reference/api/x-components.taggingconfig.clickedresultstoragettlms.md +0 -13
  702. package/docs/API-reference/api/x-components.usestore.md +0 -19
  703. package/docs/assets/features/overview-my-history.svg +0 -279
  704. package/docs/assets/features/overview-product-results-card.svg +0 -128
  705. package/docs/assets/interface/build-search-ui.svg +0 -167
  706. package/docs/assets/interface/experience-search-intro.svg +0 -1
  707. package/docs/assets/interface/integration-guide.svg +0 -1
  708. package/docs/assets/interface/integration-video.png +0 -0
  709. package/docs/assets/interface/x-architecture.svg +0 -1
  710. package/docs/assets/interface/x-empathize.gif +0 -0
  711. package/docs/assets/interface/x-facets.gif +0 -0
  712. package/docs/assets/interface/x-facets.svg +0 -189
  713. package/docs/assets/interface/x-history-queries.gif +0 -0
  714. package/docs/assets/interface/x-id-results.gif +0 -0
  715. package/docs/assets/interface/x-next-queries.gif +0 -0
  716. package/docs/assets/interface/x-popular-searches.gif +0 -0
  717. package/docs/assets/interface/x-query-suggestions.gif +0 -0
  718. package/docs/assets/interface/x-recommendations.gif +0 -0
  719. package/docs/assets/interface/x-recommendations.svg +0 -472
  720. package/docs/assets/interface/x-related-tags.gif +0 -0
  721. package/docs/assets/interface/x-results-layout.svg +0 -259
  722. package/docs/assets/interface/x-search-box-elements.svg +0 -1
  723. package/docs/assets/interface/x-search-box.svg +0 -60
  724. package/docs/build-search-ui/README.md +0 -127
  725. package/docs/build-search-ui/sidebar.js +0 -7
  726. package/docs/build-search-ui/web-archetype-development-guide.md +0 -186
  727. package/docs/build-search-ui/web-archetype-integration-guide.md +0 -458
  728. package/docs/build-search-ui/web-how-to-use-x-components-guide.md +0 -200
  729. package/docs/build-search-ui/web-x-architecture.md +0 -83
  730. package/docs/build-search-ui/web-x-components-development-guide.md +0 -157
  731. package/docs/experience-search-and-discovery/README.md +0 -132
  732. package/docs/experience-search-and-discovery/empathize.md +0 -119
  733. package/docs/experience-search-and-discovery/facets-and-filters.md +0 -154
  734. package/docs/experience-search-and-discovery/history-queries.md +0 -70
  735. package/docs/experience-search-and-discovery/id-results.md +0 -49
  736. package/docs/experience-search-and-discovery/my-history.md +0 -60
  737. package/docs/experience-search-and-discovery/next-queries.md +0 -72
  738. package/docs/experience-search-and-discovery/popular-searches.md +0 -50
  739. package/docs/experience-search-and-discovery/product-results-ui.md +0 -82
  740. package/docs/experience-search-and-discovery/query-suggestions.md +0 -48
  741. package/docs/experience-search-and-discovery/recommendations.md +0 -134
  742. package/docs/experience-search-and-discovery/related-tags.md +0 -66
  743. package/docs/experience-search-and-discovery/search-box.md +0 -99
  744. package/docs/experience-search-and-discovery/serp-ui.md +0 -125
  745. package/docs/experience-search-and-discovery/sidebar.js +0 -17
  746. package/docs/experience-search-and-discovery/web-local-storage.md +0 -30
  747. package/docs/input-status-machine-state.png +0 -0
  748. package/js/composables/use-store.js +0 -15
  749. package/js/composables/use-store.js.map +0 -1
  750. package/js/utils/options-api.js +0 -4
  751. package/js/utils/options-api.js.map +0 -1
  752. package/js/x-modules/tagging/service/pdp-add-to-cart.service.js.map +0 -1
  753. package/types/utils/options-api.d.ts +0 -3
  754. package/types/utils/options-api.d.ts.map +0 -1
  755. package/types/x-modules/tagging/service/pdp-add-to-cart.service.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"base-event-button.vue.js","sources":["../../../src/components/base-event-button.vue"],"sourcesContent":["<template>\n <button ref=\"rootRef\" @click=\"emitEvents\" data-test=\"event-button\">\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </button>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType, ref } from 'vue';\n import { use$x } from '../composables/use-$x';\n import { XEvent, XEventsTypes } from '../wiring/events.types';\n import { WireMetadata } from '../wiring/index';\n\n /**\n * Component to be reused that renders a `<button>` with the logic of emitting events to the bus\n * on click. The events are passed as an object to prop {@link XEvent}.\n * The keys are the event name and the values are the payload of each event. All events are\n * emitted with its respective payload. If any event doesn't need payload a `undefined` must be\n * passed as value.\n *\n * @public\n */\n export default defineComponent({\n name: 'BaseEventButton',\n props: {\n /** An object where the keys are the {@link XEvent} and the values are the payload. */\n events: {\n type: Object as PropType<Partial<XEventsTypes>>,\n required: true\n },\n /**\n * The metadata property for the request on each query preview.\n *\n * @public\n */\n metadata: {\n type: Object as PropType<Omit<WireMetadata, 'moduleName'>>\n }\n },\n setup(props) {\n const $x = use$x();\n\n const rootRef = ref<HTMLButtonElement>();\n\n /**\n * Emits `events` prop to the X bus with the payload given by it.\n */\n function emitEvents() {\n Object.entries(props.events).forEach(([event, payload]) =>\n $x.emit(event as XEvent, payload, { target: rootRef.value, ...props.metadata })\n );\n }\n\n return {\n emitEvents,\n rootRef\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThe event prop is required. It will render a <button></button> that emits the event passed as prop\nwith the value as payload on click:\n\n```vue\n<BaseEventButton :events=\"{ myEvent: payload }\" />\n```\n\nIf the event doesn't need payload then `undefined` must be passed:\n\n```vue\n<BaseEventButton :events=\"{ myEvent: undefined }\" />\n```\n\nIt can emit multiple events at the same time:\n\n```vue\n<BaseEventButton :events=\"{ myFirstEvent: payload1, mySecondEvent: payload2 }\" />\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_createCommentVNode"],"mappings":";;;;SACc,WAAS,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SAAEA,SAAK,EAAA,EAAAC,kBAAA;AAAA,IAAA,QAAA;AAAA,IAAE;AAAA,MAAY,GAAA,EAAA,SAAA;AAAA,MAAA,OAAA,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,UAAA,IAAA,IAAA,CAAA,UAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AACxC,MAAA,WAAA,EAAA,cAAA;AAAA,KAAA;AACA,IAAA;AAAA,MAAAC,kBAAA,CAAA,gEAAA,CAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"base-event-button.vue.js","sources":["../../../src/components/base-event-button.vue"],"sourcesContent":["<template>\n <button ref=\"rootRef\" @click=\"emitEvents\" data-test=\"event-button\">\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </button>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType, ref } from 'vue';\n import { use$x } from '../composables/use-$x';\n import { XEvent, XEventsTypes } from '../wiring/events.types';\n import { WireMetadata } from '../wiring/index';\n\n /**\n * Component to be reused that renders a `<button>` with the logic of emitting events to the bus\n * on click. The events are passed as an object to prop {@link XEvent}.\n * The keys are the event name and the values are the payload of each event. All events are\n * emitted with its respective payload. If any event doesn't need payload a `undefined` must be\n * passed as value.\n *\n * @public\n */\n export default defineComponent({\n name: 'BaseEventButton',\n props: {\n /** An object where the keys are the {@link XEvent} and the values are the payload. */\n events: {\n type: Object as PropType<Partial<XEventsTypes>>,\n required: true\n },\n /**\n * The metadata property for the request on each query preview.\n *\n * @public\n */\n metadata: {\n type: Object as PropType<Omit<WireMetadata, 'moduleName'>>\n }\n },\n setup(props) {\n const $x = use$x();\n\n const rootRef = ref<HTMLButtonElement>();\n\n /**\n * Emits `events` prop to the X bus with the payload given by it.\n */\n function emitEvents() {\n Object.entries(props.events).forEach(([event, payload]) =>\n $x.emit(event as XEvent, payload, { target: rootRef.value, ...props.metadata })\n );\n }\n\n return {\n emitEvents,\n rootRef\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThe event prop is required. It will render a <button></button> that emits the event passed as prop\nwith the value as payload on click:\n\n```vue\n<BaseEventButton :events=\"{ myEvent: payload }\" />\n```\n\nIf the event doesn't need payload then `undefined` must be passed:\n\n```vue\n<BaseEventButton :events=\"{ myEvent: undefined }\" />\n```\n\nIt can emit multiple events at the same time:\n\n```vue\n<BaseEventButton :events=\"{ myFirstEvent: payload1, mySecondEvent: payload2 }\" />\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;SACc,WAAS,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SAAEA,SAAK,EAAA,EAAAC,kBAAA;AAAA,IAAA,QAAA;AAAA,IAAE;AAAA,MAAY,GAAA,EAAA,SAAA;AAAA,MAAA,OAAA,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,UAAA,IAAA,IAAA,CAAA,UAAA,CAAA,GAAA,IAAA,CAAA,CAAA;MAExC,WAAQ,EAAA,cAAA;AAAA,KAAA;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './base-grid.vue2.js';
2
- import { openBlock, createBlock, resolveDynamicComponent, normalizeStyle, normalizeClass, withCtx, createElementBlock, Fragment, renderList, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from 'vue';
2
+ import { openBlock, createBlock, resolveDynamicComponent, normalizeStyle, normalizeClass, withCtx, createElementBlock, Fragment, renderList, renderSlot, createTextVNode, toDisplayString } from 'vue';
3
3
  import './base-grid.vue3.js';
4
4
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.js';
5
5
 
@@ -23,26 +23,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
23
23
  class: normalizeClass([cssClass, "x-base-grid__item"])
24
24
  },
25
25
  [
26
- createCommentVNode("\n @slot Customized item rendering. Specifying a slot with the item's modelName will result in\n the item using that slot composition to render.\n @binding {item} item - Item to render\n "),
27
26
  _ctx.slots[slotName] ? renderSlot(_ctx.$slots, slotName, {
28
27
  key: 0,
29
28
  item
30
- }, void 0, true) : (openBlock(), createElementBlock(
31
- Fragment,
32
- { key: 1 },
33
- [
34
- createCommentVNode("\n @slot (required) Default item rendering. This slot will be used by default for rendering\n the item without an specific slot implementation.\n @binding {item} item - Item to render\n "),
35
- renderSlot(_ctx.$slots, "default", { item }, () => [
36
- createTextVNode(
37
- toDisplayString(item.name || item.modelName || item.id || item),
38
- 1
39
- /* TEXT */
40
- )
41
- ], true)
42
- ],
43
- 2112
44
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
45
- ))
29
+ }, void 0, true) : renderSlot(_ctx.$slots, "default", {
30
+ key: 1,
31
+ item
32
+ }, () => [
33
+ createTextVNode(
34
+ toDisplayString(item.name || item.modelName || item.id || item),
35
+ 1
36
+ /* TEXT */
37
+ )
38
+ ], true)
46
39
  ],
47
40
  2
48
41
  /* CLASS */
@@ -1 +1 @@
1
- {"version":3,"file":"base-grid.vue.js","sources":["../../../src/components/base-grid.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n ref=\"gridEl\"\n :style=\"style\"\n class=\"x-base-grid\"\n :class=\"cssClasses\"\n tag=\"ul\"\n data-test=\"grid\"\n >\n <li\n v-for=\"{ item, cssClass, slotName } in gridItems\"\n :key=\"item.id\"\n :class=\"cssClass\"\n class=\"x-base-grid__item\"\n >\n <!--\n @slot Customized item rendering. Specifying a slot with the item's modelName will result in\n the item using that slot composition to render.\n @binding {item} item - Item to render\n -->\n <slot v-if=\"slots[slotName]\" :name=\"slotName\" :item=\"item\" />\n <!--\n @slot (required) Default item rendering. This slot will be used by default for rendering\n the item without an specific slot implementation.\n @binding {item} item - Item to render\n -->\n <slot v-else :item=\"item\">{{ item.name || item.modelName || item.id || item }}</slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n defineComponent,\n inject,\n onBeforeUnmount,\n onMounted,\n PropType,\n Ref,\n ref,\n watch\n } from 'vue';\n import {\n MaybeComputedElementRef,\n useResizeObserver,\n UseResizeObserverReturn\n } from '@vueuse/core';\n import { toKebabCase } from '../utils/string';\n import { ListItem, VueCSSClasses } from '../utils/types';\n import { AnimationProp } from '../types/animation-prop';\n import { useXBus } from '../composables/use-x-bus';\n import { LIST_ITEMS_KEY } from './decorators/injection.consts';\n\n /**\n * The type returned by the gridItems function. Basically it's a list of items with its CSS\n * classes and a slotName.\n */\n interface GridItem {\n slotName: string;\n item: ListItem;\n cssClass: VueCSSClasses;\n }\n\n /**\n * Grid component that is able to render different items based on their modelName value. In order\n * to achieve this, it exposes a scopedSlot for each different modelName. In case the items used\n * do not have modelName property, the default slot is used instead. It has a required property:\n * the `items` to render; and an optional one: the number `columns` the grid is divided in. If the\n * number of columns is not specified, the grid automatically fills the rows with as many columns\n * as it can fit.\n *\n * @public\n */\n export default defineComponent({\n name: 'BaseGrid',\n props: {\n /** Animation component that will be used to animate the base grid. */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n /**\n * Number of columns the grid is divided into. By default, its value is 0, setting the grid\n * columns mode to auto-fill.\n */\n columns: {\n type: Number,\n default: 0\n },\n /**\n * The list of items to be rendered.\n *\n * @remarks The items must have an ID property.\n */\n items: {\n type: Array as PropType<ListItem[]>\n }\n },\n setup(props, { slots }) {\n type ElementRef = {\n $el: HTMLElement;\n };\n\n const xBus = useXBus();\n\n /** It injects {@link ListItem} provided by an ancestor. */\n const injectedListItems = inject<Ref<ListItem[]>>(LIST_ITEMS_KEY as string);\n const gridEl = ref<ElementRef | HTMLElement>();\n let renderedColumnsNumber = ref(0);\n\n /**\n * Emits the {@link XEventsTypes.RenderedColumnsNumberChanged}\n * event whenever the number of columns rendered inside the grid changes.\n */\n watch(\n renderedColumnsNumber,\n () => xBus.emit('RenderedColumnsNumberChanged', renderedColumnsNumber.value),\n { immediate: false }\n );\n\n /**\n * It returns the items passed as props or the injected ones.\n *\n * @returns List of grid items.\n */\n const computedItems = computed<ListItem[] | void>(() => {\n return (\n props.items ??\n injectedListItems?.value ??\n //TODO: add here logger\n //eslint-disable-next-line no-console\n console.warn('It is necessary to pass a prop or inject the list of filters')\n );\n });\n\n /**\n * CSS class based on the column property value so items inside the grid can fill different\n * amount of columns or rows based on how many columns the grid is divided into.\n *\n * @returns CSS class with the column property value.\n */\n const cssClasses = computed(() => `x-base-grid--cols-${props.columns || 'auto'}`);\n\n /**\n * CSSStyleDeclaration object specifying the number of columns the grid is divided into based on\n * the column property value.\n *\n * @returns A CSSStyleDeclaration to use as the style attribute.\n */\n const style = computed<Partial<CSSStyleDeclaration>>(() => ({\n gridTemplateColumns: props.columns\n ? `repeat(${props.columns}, minmax(0, 1fr))`\n : 'repeat(auto-fill, minmax(var(--x-size-min-width-grid-item, 150px), 1fr))'\n }));\n\n /**\n * Maps the item to an object containing: the `item`, its `CSS class` and its slot name.\n *\n * @returns An array of objects containing the item and its CSS class.\n */\n const gridItems = computed<GridItem[]>(() =>\n (computedItems.value as ListItem[]).map(item => {\n const slotName = toKebabCase(item.modelName);\n return {\n slotName,\n item,\n cssClass: `x-base-grid__${slotName}`\n };\n })\n );\n\n /**\n * Checks if a given value is an `ElementRef` object.\n *\n * @param value - The value to check.\n * @returns `true` if the value is an `ElementRef` object, `false` otherwise.\n */\n const isElementRef = (value: any): value is ElementRef => {\n return value && value.$el instanceof HTMLElement;\n };\n\n /** Updates the number of columns rendered inside the grid. */\n function updateRenderedColumnsNumber() {\n const { gridTemplateColumns } = getComputedStyle(\n isElementRef(gridEl.value) ? gridEl.value.$el : (gridEl.value as Element)\n );\n renderedColumnsNumber.value = gridTemplateColumns.split(' ').length;\n }\n\n /** Initialises the rendered columns number and sets a ResizeObserver to keep it updated. */\n let resizeObserver: UseResizeObserverReturn;\n onMounted(() => {\n resizeObserver = useResizeObserver(\n gridEl as MaybeComputedElementRef,\n updateRenderedColumnsNumber\n );\n });\n onBeforeUnmount(() => resizeObserver?.stop());\n\n return {\n gridItems,\n cssClasses,\n style,\n gridEl,\n slots\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-base-grid {\n display: grid;\n grid-auto-flow: dense;\n list-style: none;\n align-items: stretch;\n }\n\n .x-base-grid__banner,\n .x-base-grid__next-queries-group {\n grid-column-start: 1;\n grid-column-end: -1;\n }\n\n .x-base-grid__item {\n display: flex;\n flex-flow: column nowrap;\n }\n\n .x-base-grid__item > * {\n flex-grow: 1;\n }\n\n .x-base-grid--cols-auto .x-base-grid__item {\n min-width: var(--x-size-min-width-grid-item);\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component renders a list of elements in different slots depending on their modelName. In order\nto achieve this, it exposes a scopedSlot for each different modelName. In case the items used do not\nhave modelName property, the default slot is used instead. It has a required property, the `items`\nto render, and an optional one, the number of `columns` the grid is divided in. If the number of\ncolumns is not specified, the grid automatically fills the rows with as many columns as it can fit.\n\n### Basic example\n\nIt renders a list of items using the default slot:\n\n```vue\n<template>\n <BaseGrid :items=\"items\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n\n### Configuring the number of columns\n\nIt renders a grid with 12 columns instead of 6, which is the default value:\n\n```vue\n<template>\n <BaseGrid :items=\"items\" :columns=\"12\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n\n### Rendering usage\n\nConfiguring the number of columns.\n\nIt renders a list of items using the different scopedSlots created by the item's modelName. For\nexample, if you want to use this component as the search grid, you pass the search results (results,\nbanners, promoted, next queries...etc) as items. Each of these results have a different modelName\nand are rendered in different slots.\n\n```vue\n<template>\n <BaseGrid :animation=\"animation\" :items=\"items\">\n <template #banner=\"{ item }\">\n <span class=\"banner\">\n {{ `${item.title} banner` }}\n </span>\n </template>\n <template #next-queries=\"{ item }\">\n <span>\n {{ `${item.totalResults} next queries` }}\n </span>\n </template>\n <template #promoted=\"{ item }\">\n <span class=\"promoted\">\n {{ `${item.title} promoted` }}\n </span>\n </template>\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n {{ item.name }}\n </BaseResultLink>\n </template>\n </BaseGrid>\n</template>\n```\n\n### Customizing the items width\n\nThe `--x-size-min-width-grid-item` variable can be used to customize the min width of the grid\nitems.\n\n```vue\n<template>\n <BaseGrid :items=\"items\" style=\"--x-size-min-width-grid-item: 150px\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_normalizeStyle","_normalizeClass","_createElementBlock","_Fragment","_renderList","slots","_renderSlot","_createCommentVNode"],"mappings":";;;;;SAGQ,WAAQ,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;AACN,EAAA,OAAAA,SAAA,EAAO,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA;AAAA,IACb,GAAK,EAAA,QAAA;AAAA,IAEL,OAAIC,cAAI,CAAA,IAAA,CAAA,KAAA,CAAA;AAAA,IACR,KAAgB,EAAAC,cAAA,CAAA,CAAA,aAAA,EAAA,IAAA,CAAA,UAAA,CAAA,CAAA;AAAA,IAAA,GAAA,EAAA,IAAA;AARpB,IAAA,WAAA,EAAA,MAAA;AAAA,GAAA,EAAA;;iBAYY,IAAO,CAAA,EAAAC,kBAAA;AAAA,QAAAC,QAAA;AAAA,QAAA,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA;iBACPP,SAbZ,EAAA,EAAAK,kBAAA;AAAA,YAcY,IAAA;AAAA,YAAA;AAAA,cAAA,GAAA,EAAA,IAAA,CAAA,EAAA;AAEN,cAAA,KAAA,EAAAD,cAAA,CAAA,CAAA,QAAA,EAAA,mBAAA,CAAA,CAAA;AAAA,aAAA;AAKYI,YAAAA;AAAAA,cAAAA,kBAAAA,CAAiD,2NAAjB,CAAA;AAAA,cAAA,IAAA,CArBlD,KAqB+D,CAAA,QAAA,CAAA,GAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,QAAA,EAAA;AAAA,gBAAA,GAAA,EAAA,CAAA;;AACzD,eAAA,EAAA,KAAA,CAAA,EAAA,IAAA,CAAA,IAAAT,SAAA,EAKqF,EAAAK,kBAAA;AAAA,gBAAAC,QAAA;AAAA,gBAAjE,OAAI,CAA6D,EAAA;AAAA,gBAAA;AAAA,kBAAAI,kBAAA,CA3B3F,0NA2BiF,CAAA;AAAA,kBAAAD,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAA,IAAA,EAAA,EAAA,MAAA;;;;;;;;;;;;;;;AA3BjF,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"base-grid.vue.js","sources":["../../../src/components/base-grid.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n ref=\"gridEl\"\n :style=\"style\"\n class=\"x-base-grid\"\n :class=\"cssClasses\"\n tag=\"ul\"\n data-test=\"grid\"\n >\n <li\n v-for=\"{ item, cssClass, slotName } in gridItems\"\n :key=\"item.id\"\n :class=\"cssClass\"\n class=\"x-base-grid__item\"\n >\n <!--\n @slot Customized item rendering. Specifying a slot with the item's modelName will result in\n the item using that slot composition to render.\n @binding {item} item - Item to render\n -->\n <slot v-if=\"slots[slotName]\" :name=\"slotName\" :item=\"item\" />\n <!--\n @slot (required) Default item rendering. This slot will be used by default for rendering\n the item without an specific slot implementation.\n @binding {item} item - Item to render\n -->\n <slot v-else :item=\"item\">{{ item.name || item.modelName || item.id || item }}</slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n defineComponent,\n inject,\n onBeforeUnmount,\n onMounted,\n PropType,\n Ref,\n ref,\n watch\n } from 'vue';\n import {\n MaybeComputedElementRef,\n useResizeObserver,\n UseResizeObserverReturn\n } from '@vueuse/core';\n import { toKebabCase } from '../utils/string';\n import { ListItem, VueCSSClasses } from '../utils/types';\n import { AnimationProp } from '../types/animation-prop';\n import { useXBus } from '../composables/use-x-bus';\n import { LIST_ITEMS_KEY } from './decorators/injection.consts';\n\n /**\n * The type returned by the gridItems function. Basically it's a list of items with its CSS\n * classes and a slotName.\n */\n interface GridItem {\n slotName: string;\n item: ListItem;\n cssClass: VueCSSClasses;\n }\n\n /**\n * Grid component that is able to render different items based on their modelName value. In order\n * to achieve this, it exposes a scopedSlot for each different modelName. In case the items used\n * do not have modelName property, the default slot is used instead. It has a required property:\n * the `items` to render; and an optional one: the number `columns` the grid is divided in. If the\n * number of columns is not specified, the grid automatically fills the rows with as many columns\n * as it can fit.\n *\n * @public\n */\n export default defineComponent({\n name: 'BaseGrid',\n props: {\n /** Animation component that will be used to animate the base grid. */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n /**\n * Number of columns the grid is divided into. By default, its value is 0, setting the grid\n * columns mode to auto-fill.\n */\n columns: {\n type: Number,\n default: 0\n },\n /**\n * The list of items to be rendered.\n *\n * @remarks The items must have an ID property.\n */\n items: {\n type: Array as PropType<ListItem[]>\n }\n },\n setup(props, { slots }) {\n type ElementRef = {\n $el: HTMLElement;\n };\n\n const xBus = useXBus();\n\n /** It injects {@link ListItem} provided by an ancestor. */\n const injectedListItems = inject<Ref<ListItem[]>>(LIST_ITEMS_KEY as string);\n const gridEl = ref<ElementRef | HTMLElement>();\n let renderedColumnsNumber = ref(0);\n\n /**\n * Emits the {@link XEventsTypes.RenderedColumnsNumberChanged}\n * event whenever the number of columns rendered inside the grid changes.\n */\n watch(\n renderedColumnsNumber,\n () => xBus.emit('RenderedColumnsNumberChanged', renderedColumnsNumber.value),\n { immediate: false }\n );\n\n /**\n * It returns the items passed as props or the injected ones.\n *\n * @returns List of grid items.\n */\n const computedItems = computed<ListItem[] | void>(() => {\n return (\n props.items ??\n injectedListItems?.value ??\n //TODO: add here logger\n //eslint-disable-next-line no-console\n console.warn('It is necessary to pass a prop or inject the list of filters')\n );\n });\n\n /**\n * CSS class based on the column property value so items inside the grid can fill different\n * amount of columns or rows based on how many columns the grid is divided into.\n *\n * @returns CSS class with the column property value.\n */\n const cssClasses = computed(() => `x-base-grid--cols-${props.columns || 'auto'}`);\n\n /**\n * CSSStyleDeclaration object specifying the number of columns the grid is divided into based on\n * the column property value.\n *\n * @returns A CSSStyleDeclaration to use as the style attribute.\n */\n const style = computed<Partial<CSSStyleDeclaration>>(() => ({\n gridTemplateColumns: props.columns\n ? `repeat(${props.columns}, minmax(0, 1fr))`\n : 'repeat(auto-fill, minmax(var(--x-size-min-width-grid-item, 150px), 1fr))'\n }));\n\n /**\n * Maps the item to an object containing: the `item`, its `CSS class` and its slot name.\n *\n * @returns An array of objects containing the item and its CSS class.\n */\n const gridItems = computed<GridItem[]>(() =>\n (computedItems.value as ListItem[]).map(item => {\n const slotName = toKebabCase(item.modelName);\n return {\n slotName,\n item,\n cssClass: `x-base-grid__${slotName}`\n };\n })\n );\n\n /**\n * Checks if a given value is an `ElementRef` object.\n *\n * @param value - The value to check.\n * @returns `true` if the value is an `ElementRef` object, `false` otherwise.\n */\n const isElementRef = (value: any): value is ElementRef => {\n return value && value.$el instanceof HTMLElement;\n };\n\n /** Updates the number of columns rendered inside the grid. */\n function updateRenderedColumnsNumber() {\n const { gridTemplateColumns } = getComputedStyle(\n isElementRef(gridEl.value) ? gridEl.value.$el : (gridEl.value as Element)\n );\n renderedColumnsNumber.value = gridTemplateColumns.split(' ').length;\n }\n\n /** Initialises the rendered columns number and sets a ResizeObserver to keep it updated. */\n let resizeObserver: UseResizeObserverReturn;\n onMounted(() => {\n resizeObserver = useResizeObserver(\n gridEl as MaybeComputedElementRef,\n updateRenderedColumnsNumber\n );\n });\n onBeforeUnmount(() => resizeObserver?.stop());\n\n return {\n gridItems,\n cssClasses,\n style,\n gridEl,\n slots\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-base-grid {\n display: grid;\n grid-auto-flow: dense;\n list-style: none;\n align-items: stretch;\n }\n\n .x-base-grid__banner,\n .x-base-grid__next-queries-group,\n .x-base-grid__related-prompts-group {\n grid-column-start: 1;\n grid-column-end: -1;\n }\n\n .x-base-grid__item {\n display: flex;\n flex-flow: column nowrap;\n }\n\n .x-base-grid__item > * {\n flex-grow: 1;\n }\n\n .x-base-grid--cols-auto .x-base-grid__item {\n min-width: var(--x-size-min-width-grid-item);\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component renders a list of elements in different slots depending on their modelName. In order\nto achieve this, it exposes a scopedSlot for each different modelName. In case the items used do not\nhave modelName property, the default slot is used instead. It has a required property, the `items`\nto render, and an optional one, the number of `columns` the grid is divided in. If the number of\ncolumns is not specified, the grid automatically fills the rows with as many columns as it can fit.\n\n### Basic example\n\nIt renders a list of items using the default slot:\n\n```vue\n<template>\n <BaseGrid :items=\"items\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n\n### Configuring the number of columns\n\nIt renders a grid with 12 columns instead of 6, which is the default value:\n\n```vue\n<template>\n <BaseGrid :items=\"items\" :columns=\"12\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n\n### Rendering usage\n\nConfiguring the number of columns.\n\nIt renders a list of items using the different scopedSlots created by the item's modelName. For\nexample, if you want to use this component as the search grid, you pass the search results (results,\nbanners, promoted, next queries...etc) as items. Each of these results have a different modelName\nand are rendered in different slots.\n\n```vue\n<template>\n <BaseGrid :animation=\"animation\" :items=\"items\">\n <template #banner=\"{ item }\">\n <span class=\"banner\">\n {{ `${item.title} banner` }}\n </span>\n </template>\n <template #next-queries=\"{ item }\">\n <span>\n {{ `${item.totalResults} next queries` }}\n </span>\n </template>\n <template #promoted=\"{ item }\">\n <span class=\"promoted\">\n {{ `${item.title} promoted` }}\n </span>\n </template>\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n {{ item.name }}\n </BaseResultLink>\n </template>\n </BaseGrid>\n</template>\n```\n\n### Customizing the items width\n\nThe `--x-size-min-width-grid-item` variable can be used to customize the min width of the grid\nitems.\n\n```vue\n<template>\n <BaseGrid :items=\"items\" style=\"--x-size-min-width-grid-item: 150px\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_normalizeStyle","_normalizeClass","_createElementBlock","_Fragment","_renderList","slots","_renderSlot"],"mappings":";;;;;SAGQ,WAAQ,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;AACN,EAAA,OAAAA,SAAA,EAAO,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA;AAAA,IACb,GAAK,EAAA,QAAA;AAAA,IAEL,OAAIC,cAAI,CAAA,IAAA,CAAA,KAAA,CAAA;AAAA,IACR,KAAgB,EAAAC,cAAA,CAAA,CAAA,aAAA,EAAA,IAAA,CAAA,UAAA,CAAA,CAAA;AAAA,IAAA,GAAA,EAAA,IAAA;AARpB,IAAA,WAAA,EAAA,MAAA;AAAA,GAAA,EAAA;;iBAYY,IAAO,CAAA,EAAAC,kBAAA;AAAA,QAAAC,QAAA;AAAA,QAAA,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA;iBACPP,SAbZ,EAAA,EAAAK,kBAAA;AAAA,YAcY,IAAA;AAAA,YAAA;AAAA,cAAA,GAAA,EAAA,IAAA,CAAA,EAAA;qBAOMG,cAAc,CAAA,CAAA,QAAA,EAAA,mBAAA,CAAA,CAAA;AAAA,aAAA;;mBArBhC,KAqB+D,CAAA,QAAA,CAAA,GAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,QAAA,EAAA;AAAA,gBAAA,GAAA,EAAA,CAAA;AAMzD,gBAAA,IAAA;AAAA,eAAA,EA3BN,KA2B8B,CAAA,EAAA,IAAA,CAAA,GAAAA,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA;AAAA,gBAA6D,GAAA,EAAA,CAAA;AAAA,gBA3B3F,IAAA;AAAA,eAAA,EAAA,MAAA;;;;;;;;;;;AAAA,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"base-grid.vue2.js","sources":["../../../src/components/base-grid.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n ref=\"gridEl\"\n :style=\"style\"\n class=\"x-base-grid\"\n :class=\"cssClasses\"\n tag=\"ul\"\n data-test=\"grid\"\n >\n <li\n v-for=\"{ item, cssClass, slotName } in gridItems\"\n :key=\"item.id\"\n :class=\"cssClass\"\n class=\"x-base-grid__item\"\n >\n <!--\n @slot Customized item rendering. Specifying a slot with the item's modelName will result in\n the item using that slot composition to render.\n @binding {item} item - Item to render\n -->\n <slot v-if=\"slots[slotName]\" :name=\"slotName\" :item=\"item\" />\n <!--\n @slot (required) Default item rendering. This slot will be used by default for rendering\n the item without an specific slot implementation.\n @binding {item} item - Item to render\n -->\n <slot v-else :item=\"item\">{{ item.name || item.modelName || item.id || item }}</slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n defineComponent,\n inject,\n onBeforeUnmount,\n onMounted,\n PropType,\n Ref,\n ref,\n watch\n } from 'vue';\n import {\n MaybeComputedElementRef,\n useResizeObserver,\n UseResizeObserverReturn\n } from '@vueuse/core';\n import { toKebabCase } from '../utils/string';\n import { ListItem, VueCSSClasses } from '../utils/types';\n import { AnimationProp } from '../types/animation-prop';\n import { useXBus } from '../composables/use-x-bus';\n import { LIST_ITEMS_KEY } from './decorators/injection.consts';\n\n /**\n * The type returned by the gridItems function. Basically it's a list of items with its CSS\n * classes and a slotName.\n */\n interface GridItem {\n slotName: string;\n item: ListItem;\n cssClass: VueCSSClasses;\n }\n\n /**\n * Grid component that is able to render different items based on their modelName value. In order\n * to achieve this, it exposes a scopedSlot for each different modelName. In case the items used\n * do not have modelName property, the default slot is used instead. It has a required property:\n * the `items` to render; and an optional one: the number `columns` the grid is divided in. If the\n * number of columns is not specified, the grid automatically fills the rows with as many columns\n * as it can fit.\n *\n * @public\n */\n export default defineComponent({\n name: 'BaseGrid',\n props: {\n /** Animation component that will be used to animate the base grid. */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n /**\n * Number of columns the grid is divided into. By default, its value is 0, setting the grid\n * columns mode to auto-fill.\n */\n columns: {\n type: Number,\n default: 0\n },\n /**\n * The list of items to be rendered.\n *\n * @remarks The items must have an ID property.\n */\n items: {\n type: Array as PropType<ListItem[]>\n }\n },\n setup(props, { slots }) {\n type ElementRef = {\n $el: HTMLElement;\n };\n\n const xBus = useXBus();\n\n /** It injects {@link ListItem} provided by an ancestor. */\n const injectedListItems = inject<Ref<ListItem[]>>(LIST_ITEMS_KEY as string);\n const gridEl = ref<ElementRef | HTMLElement>();\n let renderedColumnsNumber = ref(0);\n\n /**\n * Emits the {@link XEventsTypes.RenderedColumnsNumberChanged}\n * event whenever the number of columns rendered inside the grid changes.\n */\n watch(\n renderedColumnsNumber,\n () => xBus.emit('RenderedColumnsNumberChanged', renderedColumnsNumber.value),\n { immediate: false }\n );\n\n /**\n * It returns the items passed as props or the injected ones.\n *\n * @returns List of grid items.\n */\n const computedItems = computed<ListItem[] | void>(() => {\n return (\n props.items ??\n injectedListItems?.value ??\n //TODO: add here logger\n //eslint-disable-next-line no-console\n console.warn('It is necessary to pass a prop or inject the list of filters')\n );\n });\n\n /**\n * CSS class based on the column property value so items inside the grid can fill different\n * amount of columns or rows based on how many columns the grid is divided into.\n *\n * @returns CSS class with the column property value.\n */\n const cssClasses = computed(() => `x-base-grid--cols-${props.columns || 'auto'}`);\n\n /**\n * CSSStyleDeclaration object specifying the number of columns the grid is divided into based on\n * the column property value.\n *\n * @returns A CSSStyleDeclaration to use as the style attribute.\n */\n const style = computed<Partial<CSSStyleDeclaration>>(() => ({\n gridTemplateColumns: props.columns\n ? `repeat(${props.columns}, minmax(0, 1fr))`\n : 'repeat(auto-fill, minmax(var(--x-size-min-width-grid-item, 150px), 1fr))'\n }));\n\n /**\n * Maps the item to an object containing: the `item`, its `CSS class` and its slot name.\n *\n * @returns An array of objects containing the item and its CSS class.\n */\n const gridItems = computed<GridItem[]>(() =>\n (computedItems.value as ListItem[]).map(item => {\n const slotName = toKebabCase(item.modelName);\n return {\n slotName,\n item,\n cssClass: `x-base-grid__${slotName}`\n };\n })\n );\n\n /**\n * Checks if a given value is an `ElementRef` object.\n *\n * @param value - The value to check.\n * @returns `true` if the value is an `ElementRef` object, `false` otherwise.\n */\n const isElementRef = (value: any): value is ElementRef => {\n return value && value.$el instanceof HTMLElement;\n };\n\n /** Updates the number of columns rendered inside the grid. */\n function updateRenderedColumnsNumber() {\n const { gridTemplateColumns } = getComputedStyle(\n isElementRef(gridEl.value) ? gridEl.value.$el : (gridEl.value as Element)\n );\n renderedColumnsNumber.value = gridTemplateColumns.split(' ').length;\n }\n\n /** Initialises the rendered columns number and sets a ResizeObserver to keep it updated. */\n let resizeObserver: UseResizeObserverReturn;\n onMounted(() => {\n resizeObserver = useResizeObserver(\n gridEl as MaybeComputedElementRef,\n updateRenderedColumnsNumber\n );\n });\n onBeforeUnmount(() => resizeObserver?.stop());\n\n return {\n gridItems,\n cssClasses,\n style,\n gridEl,\n slots\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-base-grid {\n display: grid;\n grid-auto-flow: dense;\n list-style: none;\n align-items: stretch;\n }\n\n .x-base-grid__banner,\n .x-base-grid__next-queries-group {\n grid-column-start: 1;\n grid-column-end: -1;\n }\n\n .x-base-grid__item {\n display: flex;\n flex-flow: column nowrap;\n }\n\n .x-base-grid__item > * {\n flex-grow: 1;\n }\n\n .x-base-grid--cols-auto .x-base-grid__item {\n min-width: var(--x-size-min-width-grid-item);\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component renders a list of elements in different slots depending on their modelName. In order\nto achieve this, it exposes a scopedSlot for each different modelName. In case the items used do not\nhave modelName property, the default slot is used instead. It has a required property, the `items`\nto render, and an optional one, the number of `columns` the grid is divided in. If the number of\ncolumns is not specified, the grid automatically fills the rows with as many columns as it can fit.\n\n### Basic example\n\nIt renders a list of items using the default slot:\n\n```vue\n<template>\n <BaseGrid :items=\"items\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n\n### Configuring the number of columns\n\nIt renders a grid with 12 columns instead of 6, which is the default value:\n\n```vue\n<template>\n <BaseGrid :items=\"items\" :columns=\"12\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n\n### Rendering usage\n\nConfiguring the number of columns.\n\nIt renders a list of items using the different scopedSlots created by the item's modelName. For\nexample, if you want to use this component as the search grid, you pass the search results (results,\nbanners, promoted, next queries...etc) as items. Each of these results have a different modelName\nand are rendered in different slots.\n\n```vue\n<template>\n <BaseGrid :animation=\"animation\" :items=\"items\">\n <template #banner=\"{ item }\">\n <span class=\"banner\">\n {{ `${item.title} banner` }}\n </span>\n </template>\n <template #next-queries=\"{ item }\">\n <span>\n {{ `${item.totalResults} next queries` }}\n </span>\n </template>\n <template #promoted=\"{ item }\">\n <span class=\"promoted\">\n {{ `${item.title} promoted` }}\n </span>\n </template>\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n {{ item.name }}\n </BaseResultLink>\n </template>\n </BaseGrid>\n</template>\n```\n\n### Customizing the items width\n\nThe `--x-size-min-width-grid-item` variable can be used to customize the min width of the grid\nitems.\n\n```vue\n<template>\n <BaseGrid :items=\"items\" style=\"--x-size-min-width-grid-item: 150px\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n</docs>\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"base-grid.vue2.js","sources":["../../../src/components/base-grid.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n ref=\"gridEl\"\n :style=\"style\"\n class=\"x-base-grid\"\n :class=\"cssClasses\"\n tag=\"ul\"\n data-test=\"grid\"\n >\n <li\n v-for=\"{ item, cssClass, slotName } in gridItems\"\n :key=\"item.id\"\n :class=\"cssClass\"\n class=\"x-base-grid__item\"\n >\n <!--\n @slot Customized item rendering. Specifying a slot with the item's modelName will result in\n the item using that slot composition to render.\n @binding {item} item - Item to render\n -->\n <slot v-if=\"slots[slotName]\" :name=\"slotName\" :item=\"item\" />\n <!--\n @slot (required) Default item rendering. This slot will be used by default for rendering\n the item without an specific slot implementation.\n @binding {item} item - Item to render\n -->\n <slot v-else :item=\"item\">{{ item.name || item.modelName || item.id || item }}</slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import {\n computed,\n defineComponent,\n inject,\n onBeforeUnmount,\n onMounted,\n PropType,\n Ref,\n ref,\n watch\n } from 'vue';\n import {\n MaybeComputedElementRef,\n useResizeObserver,\n UseResizeObserverReturn\n } from '@vueuse/core';\n import { toKebabCase } from '../utils/string';\n import { ListItem, VueCSSClasses } from '../utils/types';\n import { AnimationProp } from '../types/animation-prop';\n import { useXBus } from '../composables/use-x-bus';\n import { LIST_ITEMS_KEY } from './decorators/injection.consts';\n\n /**\n * The type returned by the gridItems function. Basically it's a list of items with its CSS\n * classes and a slotName.\n */\n interface GridItem {\n slotName: string;\n item: ListItem;\n cssClass: VueCSSClasses;\n }\n\n /**\n * Grid component that is able to render different items based on their modelName value. In order\n * to achieve this, it exposes a scopedSlot for each different modelName. In case the items used\n * do not have modelName property, the default slot is used instead. It has a required property:\n * the `items` to render; and an optional one: the number `columns` the grid is divided in. If the\n * number of columns is not specified, the grid automatically fills the rows with as many columns\n * as it can fit.\n *\n * @public\n */\n export default defineComponent({\n name: 'BaseGrid',\n props: {\n /** Animation component that will be used to animate the base grid. */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n /**\n * Number of columns the grid is divided into. By default, its value is 0, setting the grid\n * columns mode to auto-fill.\n */\n columns: {\n type: Number,\n default: 0\n },\n /**\n * The list of items to be rendered.\n *\n * @remarks The items must have an ID property.\n */\n items: {\n type: Array as PropType<ListItem[]>\n }\n },\n setup(props, { slots }) {\n type ElementRef = {\n $el: HTMLElement;\n };\n\n const xBus = useXBus();\n\n /** It injects {@link ListItem} provided by an ancestor. */\n const injectedListItems = inject<Ref<ListItem[]>>(LIST_ITEMS_KEY as string);\n const gridEl = ref<ElementRef | HTMLElement>();\n let renderedColumnsNumber = ref(0);\n\n /**\n * Emits the {@link XEventsTypes.RenderedColumnsNumberChanged}\n * event whenever the number of columns rendered inside the grid changes.\n */\n watch(\n renderedColumnsNumber,\n () => xBus.emit('RenderedColumnsNumberChanged', renderedColumnsNumber.value),\n { immediate: false }\n );\n\n /**\n * It returns the items passed as props or the injected ones.\n *\n * @returns List of grid items.\n */\n const computedItems = computed<ListItem[] | void>(() => {\n return (\n props.items ??\n injectedListItems?.value ??\n //TODO: add here logger\n //eslint-disable-next-line no-console\n console.warn('It is necessary to pass a prop or inject the list of filters')\n );\n });\n\n /**\n * CSS class based on the column property value so items inside the grid can fill different\n * amount of columns or rows based on how many columns the grid is divided into.\n *\n * @returns CSS class with the column property value.\n */\n const cssClasses = computed(() => `x-base-grid--cols-${props.columns || 'auto'}`);\n\n /**\n * CSSStyleDeclaration object specifying the number of columns the grid is divided into based on\n * the column property value.\n *\n * @returns A CSSStyleDeclaration to use as the style attribute.\n */\n const style = computed<Partial<CSSStyleDeclaration>>(() => ({\n gridTemplateColumns: props.columns\n ? `repeat(${props.columns}, minmax(0, 1fr))`\n : 'repeat(auto-fill, minmax(var(--x-size-min-width-grid-item, 150px), 1fr))'\n }));\n\n /**\n * Maps the item to an object containing: the `item`, its `CSS class` and its slot name.\n *\n * @returns An array of objects containing the item and its CSS class.\n */\n const gridItems = computed<GridItem[]>(() =>\n (computedItems.value as ListItem[]).map(item => {\n const slotName = toKebabCase(item.modelName);\n return {\n slotName,\n item,\n cssClass: `x-base-grid__${slotName}`\n };\n })\n );\n\n /**\n * Checks if a given value is an `ElementRef` object.\n *\n * @param value - The value to check.\n * @returns `true` if the value is an `ElementRef` object, `false` otherwise.\n */\n const isElementRef = (value: any): value is ElementRef => {\n return value && value.$el instanceof HTMLElement;\n };\n\n /** Updates the number of columns rendered inside the grid. */\n function updateRenderedColumnsNumber() {\n const { gridTemplateColumns } = getComputedStyle(\n isElementRef(gridEl.value) ? gridEl.value.$el : (gridEl.value as Element)\n );\n renderedColumnsNumber.value = gridTemplateColumns.split(' ').length;\n }\n\n /** Initialises the rendered columns number and sets a ResizeObserver to keep it updated. */\n let resizeObserver: UseResizeObserverReturn;\n onMounted(() => {\n resizeObserver = useResizeObserver(\n gridEl as MaybeComputedElementRef,\n updateRenderedColumnsNumber\n );\n });\n onBeforeUnmount(() => resizeObserver?.stop());\n\n return {\n gridItems,\n cssClasses,\n style,\n gridEl,\n slots\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-base-grid {\n display: grid;\n grid-auto-flow: dense;\n list-style: none;\n align-items: stretch;\n }\n\n .x-base-grid__banner,\n .x-base-grid__next-queries-group,\n .x-base-grid__related-prompts-group {\n grid-column-start: 1;\n grid-column-end: -1;\n }\n\n .x-base-grid__item {\n display: flex;\n flex-flow: column nowrap;\n }\n\n .x-base-grid__item > * {\n flex-grow: 1;\n }\n\n .x-base-grid--cols-auto .x-base-grid__item {\n min-width: var(--x-size-min-width-grid-item);\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component renders a list of elements in different slots depending on their modelName. In order\nto achieve this, it exposes a scopedSlot for each different modelName. In case the items used do not\nhave modelName property, the default slot is used instead. It has a required property, the `items`\nto render, and an optional one, the number of `columns` the grid is divided in. If the number of\ncolumns is not specified, the grid automatically fills the rows with as many columns as it can fit.\n\n### Basic example\n\nIt renders a list of items using the default slot:\n\n```vue\n<template>\n <BaseGrid :items=\"items\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n\n### Configuring the number of columns\n\nIt renders a grid with 12 columns instead of 6, which is the default value:\n\n```vue\n<template>\n <BaseGrid :items=\"items\" :columns=\"12\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n\n### Rendering usage\n\nConfiguring the number of columns.\n\nIt renders a list of items using the different scopedSlots created by the item's modelName. For\nexample, if you want to use this component as the search grid, you pass the search results (results,\nbanners, promoted, next queries...etc) as items. Each of these results have a different modelName\nand are rendered in different slots.\n\n```vue\n<template>\n <BaseGrid :animation=\"animation\" :items=\"items\">\n <template #banner=\"{ item }\">\n <span class=\"banner\">\n {{ `${item.title} banner` }}\n </span>\n </template>\n <template #next-queries=\"{ item }\">\n <span>\n {{ `${item.totalResults} next queries` }}\n </span>\n </template>\n <template #promoted=\"{ item }\">\n <span class=\"promoted\">\n {{ `${item.title} promoted` }}\n </span>\n </template>\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n {{ item.name }}\n </BaseResultLink>\n </template>\n </BaseGrid>\n</template>\n```\n\n### Customizing the items width\n\nThe `--x-size-min-width-grid-item` variable can be used to customize the min width of the grid\nitems.\n\n```vue\n<template>\n <BaseGrid :items=\"items\" style=\"--x-size-min-width-grid-item: 150px\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n</docs>\n"],"names":[],"mappings":"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"}
@@ -1,6 +1,6 @@
1
1
  import injectCss from '../../tools/inject-css.js';
2
2
 
3
- var css = ".x-base-grid[data-v-070eaadb]{align-items:stretch;display:grid;grid-auto-flow:dense;list-style:none}.x-base-grid__banner[data-v-070eaadb],.x-base-grid__next-queries-group[data-v-070eaadb]{grid-column-end:-1;grid-column-start:1}.x-base-grid__item[data-v-070eaadb]{display:flex;flex-flow:column nowrap}.x-base-grid__item[data-v-070eaadb]>*{flex-grow:1}.x-base-grid--cols-auto .x-base-grid__item[data-v-070eaadb]{min-width:var(--x-size-min-width-grid-item)}";
3
+ var css = ".x-base-grid[data-v-070eaadb]{align-items:stretch;display:grid;grid-auto-flow:dense;list-style:none}.x-base-grid__banner[data-v-070eaadb],.x-base-grid__next-queries-group[data-v-070eaadb],.x-base-grid__related-prompts-group[data-v-070eaadb]{grid-column-end:-1;grid-column-start:1}.x-base-grid__item[data-v-070eaadb]{display:flex;flex-flow:column nowrap}.x-base-grid__item[data-v-070eaadb]>*{flex-grow:1}.x-base-grid--cols-auto .x-base-grid__item[data-v-070eaadb]{min-width:var(--x-size-min-width-grid-item)}";
4
4
  injectCss(css);
5
5
 
6
6
  export { css, css as default };
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './base-keyboard-navigation.vue2.js';
2
- import { openBlock, createElementBlock, withKeys, withModifiers, createCommentVNode, renderSlot } from 'vue';
2
+ import { openBlock, createElementBlock, withKeys, withModifiers, renderSlot } from 'vue';
3
3
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.js';
4
4
 
5
5
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -12,7 +12,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
12
12
  "data-test": "keyboard-navigation"
13
13
  },
14
14
  [
15
- createCommentVNode(" @slot (Required) Container content "),
16
15
  renderSlot(_ctx.$slots, "default")
17
16
  ],
18
17
  544
@@ -1 +1 @@
1
- {"version":3,"file":"base-keyboard-navigation.vue.js","sources":["../../../src/components/base-keyboard-navigation.vue"],"sourcesContent":["<template>\n <div\n ref=\"el\"\n @keydown.up.down.right.left.prevent=\"focusNextNavigableElement\"\n class=\"x-keyboard-navigation\"\n data-test=\"keyboard-navigation\"\n >\n <!-- @slot (Required) Container content -->\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { PropType, computed, defineComponent, onMounted, ref } from 'vue';\n // eslint-disable-next-line max-len\n import { DirectionalFocusNavigationService } from '../services/directional-focus-navigation.service';\n import { SpatialNavigation } from '../services/services.types';\n import { ArrowKey, EventsForDirectionLimit, TakeNavigationControl } from '../utils/types';\n import { XEventsOf } from '../wiring/events.types';\n import { WireMetadata } from '../wiring/wiring.types';\n import { useXBus } from '../composables';\n\n /**\n * Base component to handle keyboard navigation for elements inside it. It has a required slot to\n * include the navigable elements.\n *\n * @remarks\n * The component can be customized through props: an array of navigationHijacker objects, which\n * contains: the xEvent to listen to, the moduleName in charge of emitting the event and to which\n * direction it should react to; to take control of the navigation and eventsForDirectionLimit, to\n * emit an xEvent when reaching the navigation limit in any direction.\n *\n * @public\n */\n export default defineComponent({\n name: 'BaseKeyboardNavigation',\n props: {\n /**\n * An array of {@link TakeNavigationControl} objects defining when to\n * take control of the keyboard navigation.\n */\n navigationHijacker: {\n type: Array as PropType<TakeNavigationControl[]>,\n default: () => [\n { xEvent: 'UserPressedArrowKey', moduleName: 'searchBox', direction: 'ArrowDown' }\n ]\n },\n /**\n * An {@link EventsForDirectionLimit} to emit when the user is already at the furthest element\n * in a direction and tries to keep going on the same direction.\n */\n eventsForDirectionLimit: {\n type: Object as PropType<Partial<EventsForDirectionLimit>>,\n default: () => ({ ArrowUp: 'UserReachedEmpathizeTop' })\n }\n },\n setup: function (props) {\n const el = ref<HTMLElement>();\n const xBus = useXBus();\n\n /**\n * The {@link SpatialNavigation} service to use.\n */\n let navigationService!: SpatialNavigation;\n\n /**\n * The element to focus.\n */\n let elementToFocus: HTMLElement | undefined;\n\n /**\n * Get the navigation hijacker events.\n *\n * @remarks\n * If the same {@link XEvent} is defined multiple times it is only inserted once.\n *\n * @returns The events to hijack the navigation.\n */\n const navigationHijackerEvents = computed((): XEventsOf<ArrowKey>[] => {\n const eventsSet = props.navigationHijacker.map(({ xEvent }) => xEvent);\n return Array.from(new Set(eventsSet));\n });\n\n onMounted(() => {\n // TODO Replace this with injection\n navigationService = new DirectionalFocusNavigationService(el.value!);\n });\n\n /**\n * Checks if the component has to take control of the keyboard navigation.\n *\n * @param eventPayload - The {@link ArrowKey}.\n * @param metadata - The {@link WireMetadata}.\n *\n * @returns Whether the component needs to take control of the keyboard navigation or not.\n * @internal\n */\n function hasToTakeNavigationControl(eventPayload: ArrowKey, metadata: WireMetadata): boolean {\n return props.navigationHijacker.some(\n ({ moduleName, direction }) =>\n moduleName === metadata.moduleName && direction === eventPayload\n );\n }\n\n /**\n * Focus the next navigable element returned by the navigation service.\n *\n * @param direction - The navigation direction.\n * @internal\n */\n function focusNextNavigableElement(direction: ArrowKey | KeyboardEvent): void {\n const dir = typeof direction === 'object' ? (direction.key as ArrowKey) : direction;\n const nextElementToFocus = navigationService?.navigateTo(dir);\n\n if (elementToFocus !== nextElementToFocus) {\n elementToFocus = nextElementToFocus;\n elementToFocus.focus();\n } else {\n emitDirectionalLimitReached(dir);\n elementToFocus = undefined;\n }\n }\n\n /**\n * Emit the {@link XEvent} associated to the navigation's direction when reaching its limit.\n *\n * @param direction - The navigation direction.\n * @internal\n */\n function emitDirectionalLimitReached(direction: ArrowKey): void {\n const xEvent = props.eventsForDirectionLimit?.[direction];\n if (xEvent) {\n xBus.emit(xEvent, undefined, { target: elementToFocus });\n }\n }\n\n /**\n * Trigger navigation if this component is in control of it.\n *\n * @param eventPayload - The {@link @empathyco/x-bus#SubjectPayload.eventPayload}.\n * @param metadata - The {@link @empathyco/x-bus#SubjectPayload.metadata}.\n * @public\n */\n navigationHijackerEvents.value.forEach(event => {\n xBus.on(event, true).subscribe(({ eventPayload, metadata }) => {\n if (hasToTakeNavigationControl(eventPayload, metadata)) {\n focusNextNavigableElement(eventPayload);\n }\n });\n });\n\n return { el, focusNextNavigableElement };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nAn event that the component will emit:\n\n- [`UserReachedEmpathizeTop`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event emitted by default when the container reaches its top navigation, but more events can be\n emitted for each direction using the `eventsForDirectionLimit` prop.\n\n## Examples\n\nThis component has a slot to inject other components inside it. The component expects a required\nprop, navigationHijacker, which is an array of objects containing: the xEvent to listen to, the\nmoduleName in charge of emitting the event and to which direction it should react to; to take\ncontrol of the navigation. It has another prop, optional in this case, to emit an xEvent when\nreaching the navigation limit in any direction.\n\n### Basic Usage\n\n```vue\n<KeyboardNavigation>\n <QuerySuggestions/>\n</KeyboardNavigation>\n```\n\n### Defining multiple conditions to take navigation's control\n\n```vue\n<KeyboardNavigation\n :navigationHijacker=\"[\n {\n xEvent: 'UserPressedArrowKey',\n moduleName: 'searchBox',\n direction: 'ArrowDown'\n },\n {\n xEvent: 'UserPressedArrowKey',\n moduleName: 'facets',\n direction: 'ArrowRight'\n }\n ]\"\n>\n <QuerySuggestions/>\n</KeyboardNavigation>\n```\n\n### Defining events to emit when reaching a navigation limit\n\n```vue\n<KeyboardNavigation\n :navigationHijacker=\"[\n {\n xEvent: 'UserPressedArrowKey',\n moduleName: 'searchBox',\n direction: 'ArrowDown'\n }\n ]\"\n :eventsForDirectionLimit=\"{\n ArrowUp: 'UserReachedEmpathizeTop'\n }\"\n>\n <QuerySuggestions/>\n</KeyboardNavigation>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_withKeys","_withModifiers","_createCommentVNode"],"mappings":";;;;SAEQ,WAAI,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SACPA,SAAO,EAAA,EAAAC,kBAAA;AAAA,IAHZ,KAAA;AAAA,IAAA;AAAA,MAII,GAAK,EAAA,IAAA;AAAA,MACL,SAAA,EAAS,OAAC,CAAqB,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAC,QAAA,CAAAC,aAAA,CAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,yBAAA,IAAA,IAAA,CAAA,yBAAA,CAAA,GAAA,IAAA,CAAA,EAAA,CAAA,SAAA,CAAA,CAAA,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA,CAAA,CAAA;AAAA,MAAA,KAAA,EAAA,uBAAA;AAE/B,MAAA,WAAA,EAAA,qBAAA;AAAA,KAAA;AACA,IAAA;AAAA,MAAAC,kBAAA,CAAA,sCAAA,CAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"base-keyboard-navigation.vue.js","sources":["../../../src/components/base-keyboard-navigation.vue"],"sourcesContent":["<template>\n <div\n ref=\"el\"\n @keydown.up.down.right.left.prevent=\"focusNextNavigableElement\"\n class=\"x-keyboard-navigation\"\n data-test=\"keyboard-navigation\"\n >\n <!-- @slot (Required) Container content -->\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { PropType, computed, defineComponent, onMounted, ref } from 'vue';\n // eslint-disable-next-line max-len\n import { DirectionalFocusNavigationService } from '../services/directional-focus-navigation.service';\n import { SpatialNavigation } from '../services/services.types';\n import { ArrowKey, EventsForDirectionLimit, TakeNavigationControl } from '../utils/types';\n import { XEventsOf } from '../wiring/events.types';\n import { WireMetadata } from '../wiring/wiring.types';\n import { useXBus } from '../composables';\n\n /**\n * Base component to handle keyboard navigation for elements inside it. It has a required slot to\n * include the navigable elements.\n *\n * @remarks\n * The component can be customized through props: an array of navigationHijacker objects, which\n * contains: the xEvent to listen to, the moduleName in charge of emitting the event and to which\n * direction it should react to; to take control of the navigation and eventsForDirectionLimit, to\n * emit an xEvent when reaching the navigation limit in any direction.\n *\n * @public\n */\n export default defineComponent({\n name: 'BaseKeyboardNavigation',\n props: {\n /**\n * An array of {@link TakeNavigationControl} objects defining when to\n * take control of the keyboard navigation.\n */\n navigationHijacker: {\n type: Array as PropType<TakeNavigationControl[]>,\n default: () => [\n { xEvent: 'UserPressedArrowKey', moduleName: 'searchBox', direction: 'ArrowDown' }\n ]\n },\n /**\n * An {@link EventsForDirectionLimit} to emit when the user is already at the furthest element\n * in a direction and tries to keep going on the same direction.\n */\n eventsForDirectionLimit: {\n type: Object as PropType<Partial<EventsForDirectionLimit>>,\n default: () => ({ ArrowUp: 'UserReachedEmpathizeTop' })\n }\n },\n setup: function (props) {\n const el = ref<HTMLElement>();\n const xBus = useXBus();\n\n /**\n * The {@link SpatialNavigation} service to use.\n */\n let navigationService!: SpatialNavigation;\n\n /**\n * The element to focus.\n */\n let elementToFocus: HTMLElement | undefined;\n\n /**\n * Get the navigation hijacker events.\n *\n * @remarks\n * If the same {@link XEvent} is defined multiple times it is only inserted once.\n *\n * @returns The events to hijack the navigation.\n */\n const navigationHijackerEvents = computed((): XEventsOf<ArrowKey>[] => {\n const eventsSet = props.navigationHijacker.map(({ xEvent }) => xEvent);\n return Array.from(new Set(eventsSet));\n });\n\n onMounted(() => {\n // TODO Replace this with injection\n navigationService = new DirectionalFocusNavigationService(el.value!);\n });\n\n /**\n * Checks if the component has to take control of the keyboard navigation.\n *\n * @param eventPayload - The {@link ArrowKey}.\n * @param metadata - The {@link WireMetadata}.\n *\n * @returns Whether the component needs to take control of the keyboard navigation or not.\n * @internal\n */\n function hasToTakeNavigationControl(eventPayload: ArrowKey, metadata: WireMetadata): boolean {\n return props.navigationHijacker.some(\n ({ moduleName, direction }) =>\n moduleName === metadata.moduleName && direction === eventPayload\n );\n }\n\n /**\n * Focus the next navigable element returned by the navigation service.\n *\n * @param direction - The navigation direction.\n * @internal\n */\n function focusNextNavigableElement(direction: ArrowKey | KeyboardEvent): void {\n const dir = typeof direction === 'object' ? (direction.key as ArrowKey) : direction;\n const nextElementToFocus = navigationService?.navigateTo(dir);\n\n if (elementToFocus !== nextElementToFocus) {\n elementToFocus = nextElementToFocus;\n elementToFocus.focus();\n } else {\n emitDirectionalLimitReached(dir);\n elementToFocus = undefined;\n }\n }\n\n /**\n * Emit the {@link XEvent} associated to the navigation's direction when reaching its limit.\n *\n * @param direction - The navigation direction.\n * @internal\n */\n function emitDirectionalLimitReached(direction: ArrowKey): void {\n const xEvent = props.eventsForDirectionLimit?.[direction];\n if (xEvent) {\n xBus.emit(xEvent, undefined, { target: elementToFocus });\n }\n }\n\n /**\n * Trigger navigation if this component is in control of it.\n *\n * @param eventPayload - The {@link @empathyco/x-bus#SubjectPayload.eventPayload}.\n * @param metadata - The {@link @empathyco/x-bus#SubjectPayload.metadata}.\n * @public\n */\n navigationHijackerEvents.value.forEach(event => {\n xBus.on(event, true).subscribe(({ eventPayload, metadata }) => {\n if (hasToTakeNavigationControl(eventPayload, metadata)) {\n focusNextNavigableElement(eventPayload);\n }\n });\n });\n\n return { el, focusNextNavigableElement };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nAn event that the component will emit:\n\n- [`UserReachedEmpathizeTop`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event emitted by default when the container reaches its top navigation, but more events can be\n emitted for each direction using the `eventsForDirectionLimit` prop.\n\n## Examples\n\nThis component has a slot to inject other components inside it. The component expects a required\nprop, navigationHijacker, which is an array of objects containing: the xEvent to listen to, the\nmoduleName in charge of emitting the event and to which direction it should react to; to take\ncontrol of the navigation. It has another prop, optional in this case, to emit an xEvent when\nreaching the navigation limit in any direction.\n\n### Basic Usage\n\n```vue\n<KeyboardNavigation>\n <QuerySuggestions/>\n</KeyboardNavigation>\n```\n\n### Defining multiple conditions to take navigation's control\n\n```vue\n<KeyboardNavigation\n :navigationHijacker=\"[\n {\n xEvent: 'UserPressedArrowKey',\n moduleName: 'searchBox',\n direction: 'ArrowDown'\n },\n {\n xEvent: 'UserPressedArrowKey',\n moduleName: 'facets',\n direction: 'ArrowRight'\n }\n ]\"\n>\n <QuerySuggestions/>\n</KeyboardNavigation>\n```\n\n### Defining events to emit when reaching a navigation limit\n\n```vue\n<KeyboardNavigation\n :navigationHijacker=\"[\n {\n xEvent: 'UserPressedArrowKey',\n moduleName: 'searchBox',\n direction: 'ArrowDown'\n }\n ]\"\n :eventsForDirectionLimit=\"{\n ArrowUp: 'UserReachedEmpathizeTop'\n }\"\n>\n <QuerySuggestions/>\n</KeyboardNavigation>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_withKeys","_withModifiers"],"mappings":";;;;SAEQ,WAAI,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SACPA,SAAO,EAAA,EAAAC,kBAAA;AAAA,IAHZ,KAAA;AAAA,IAAA;AAAA,MAII,GAAK,EAAA,IAAA;AAAA,MACL,SAAA,EAAS,OAAC,CAAqB,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAC,QAAA,CAAAC,aAAA,CAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,yBAAA,IAAA,IAAA,CAAA,yBAAA,CAAA,GAAA,IAAA,CAAA,EAAA,CAAA,SAAA,CAAA,CAAA,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA,CAAA,CAAA;AAAA,MAAA,KAAA,EAAA,uBAAA;MAG/B,WAAQ,EAAA,qBAAA;AAAA,KAAA;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './base-rating.vue2.js';
2
- import { resolveComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, Fragment, renderList, renderSlot, createBlock, normalizeStyle } from 'vue';
2
+ import { resolveComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, renderSlot, createBlock, normalizeStyle } from 'vue';
3
3
  import './base-rating.vue3.js';
4
4
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.js';
5
5
 
@@ -17,7 +17,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
17
17
  "data-test": "rating"
18
18
  }, [
19
19
  createElementVNode("div", _hoisted_2, [
20
- createCommentVNode("\n @slot The content to render as empty icon\n "),
21
20
  (openBlock(true), createElementBlock(
22
21
  Fragment,
23
22
  null,
@@ -41,7 +40,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
41
40
  "data-test": "rating-filled"
42
41
  },
43
42
  [
44
- createCommentVNode("\n @slot The content to render as filled icon\n "),
45
43
  (openBlock(true), createElementBlock(
46
44
  Fragment,
47
45
  null,
@@ -1 +1 @@
1
- {"version":3,"file":"base-rating.vue.js","sources":["../../../src/components/base-rating.vue"],"sourcesContent":["<template>\n <span class=\"x-rating\" role=\"img\" :aria-label=\"ariaLabel\" data-test=\"rating\">\n <div class=\"x-rating--empty\" data-test=\"rating-empty\">\n <!--\n @slot The content to render as empty icon\n -->\n <slot v-for=\"i in max\" name=\"empty-icon\">\n <DefaultIcon :key=\"i\" class=\"x-rating__default-icon x-rating__default-icon--empty\" />\n </slot>\n </div>\n <div\n class=\"x-rating--filled\"\n :style=\"{ width: calculateFilledWrapperWidth }\"\n data-test=\"rating-filled\"\n >\n <!--\n @slot The content to render as filled icon\n -->\n <slot v-for=\"i in max\" name=\"filled-icon\">\n <DefaultIcon :key=\"i\" class=\"x-rating__default-icon x-rating__default-icon--filled\" />\n </slot>\n </div>\n </span>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import StarIcon from './icons/star.vue';\n\n /**\n * Rating component. This component renders a set of elements filled based on the value passed as\n * prop.\n *\n * @public\n */\n export default defineComponent({\n name: 'BaseRating',\n components: {\n DefaultIcon: StarIcon\n },\n props: {\n /**\n * Numeric value used to calculates the width of the filled elements.\n *\n * @public\n */\n value: {\n type: Number,\n required: true\n },\n /**\n * Maximum number of elements to paint.\n *\n * @public\n */\n max: {\n type: Number,\n default: 5\n }\n },\n setup(props) {\n /**\n * Calculates the width of the filled elements wrapper.\n *\n * @returns The % of the wrapper width.\n *\n * @internal\n */\n const calculateFilledWrapperWidth = computed(() => {\n return props.value < 0 ? '0%' : `${(props.value * 100) / props.max}%`;\n });\n\n /**\n * Creates the aria label for accessibility purpose.\n *\n * @returns The aria label.\n *\n * @internal\n */\n const ariaLabel = computed(() => {\n return `${props.value}/${props.max}`;\n });\n\n return {\n calculateFilledWrapperWidth,\n ariaLabel\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-rating {\n position: relative;\n display: inline-block;\n max-width: fit-content;\n }\n\n .x-rating--empty {\n overflow: hidden;\n display: flex;\n flex-flow: row nowrap;\n white-space: nowrap;\n }\n\n .x-rating--filled {\n display: flex;\n flex-flow: row nowrap;\n white-space: nowrap;\n position: absolute;\n overflow: hidden;\n top: 0;\n left: 0;\n height: 100%;\n }\n\n .x-rating__default-icon {\n fill: currentColor;\n stroke: currentColor;\n }\n\n .x-rating__default-icon--empty {\n fill: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component receives a `value` as prop and renders a set of elements, which will be filled based\non this value.\n\n### Basic usage\n\n```vue\n<BaseRating :value=\"5.23\" />\n```\n\n### Customizing its contents\n\n```vue\n<BaseRating :value=\"7.15\" :max=\"10\">\n <template #filled-icon>\n <TestIcon/>\n </template>\n <template #empty-icon>\n <TestIcon/>\n </template>\n</BaseRating>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createElementBlock","_createElementVNode","_createCommentVNode","_Fragment","_renderList","_renderSlot","_createBlock","_normalizeStyle"],"mappings":";;;;;AAES,MAAA,UAAA,GAAM,CAAiB,YAAA,CAAA,CAAA;MAAC,UAAU,GAAA;AAAA,EAAA,KAAA,EAAA,iBAAA;;;;iCADzCA,gBAqBO,CAAA,aAAA,CAAA,CAAA;SArBqBC,SAAK,EAAA,EAAAC,kBAAA,CAAA,MAAA,EAAA;AAAA,IAAE,KAAA,EAAA,UAAA;AAAA,IAAuB,IAAA,EAAA,KAAA;AAAA,IAAA,YAAA,EAAA,IAAA,CAAA,SAAA;AACxD,IAAA,WAAA,EAAA,QAAA;AAAA,GAAA,EAAA;AAIE,IAAAC,kBAAA,CAAA,KAAA,EAAA,UAAA,EAAA;AAAA,MAEOC,kBAAA,CAAA,6DAAA,CAAA;AAAA,OADLH,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA;AAAA,QAAqFG,QAAA;AAAA,QAAA,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,GAAA,EAAA,CAAA,CAAA,KAAA;iBAApEC,UAAG,CAAA,IAAA,CAAA,MAAA,EAAA,YAAA,EAAA,EAAA,EAAA,MAAA;AAAA,aAAQN,SAAA,EAAA,EAAAO,WAAA,CAAA,sBAAA,EAAA;AAAA,cAAA,GAAA,EAAA,CAAA;;;;AAGhC,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAWM;AAAA,KAAA,CAAA;;AArBV,MAAA,KAAA;AAAA,MAAA;AAAA,QAaM,KAAA,EAAA,kBAAA;AAAA,QAAA,KAAA,EAAAC,cAAA,CAAA,EAAA,KAAA,EAAA,IAAA,CAAA,2BAAA,EAAA,CAAA;AAEA,QAAA,WAAA,EAAA,eAAA;AAAA,OAAA;;2BAGA,8DAEO,CAAA;AAAA,SADLR,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA;AAAA,UAAsFG,QAAA;AAAA,UAAA,IAAA;AAAA,UAAAC,UAAA,CAAA,IAAA,CAAA,GAAA,EAAA,CAAA,CAAA,KAAA;mBAArEC,UAAG,CAAA,IAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,EAAA,MAAA;AAAA,eAAQN,SAAA,EAAA,EAAAO,WAAA,CAAA,sBAAA,EAAA;AAAA,gBAAA,GAAA,EAAA,CAAA;;;;;;;AAnBpC,SAAA;AAAA,OAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"base-rating.vue.js","sources":["../../../src/components/base-rating.vue"],"sourcesContent":["<template>\n <span class=\"x-rating\" role=\"img\" :aria-label=\"ariaLabel\" data-test=\"rating\">\n <div class=\"x-rating--empty\" data-test=\"rating-empty\">\n <!--\n @slot The content to render as empty icon\n -->\n <slot v-for=\"i in max\" name=\"empty-icon\">\n <DefaultIcon :key=\"i\" class=\"x-rating__default-icon x-rating__default-icon--empty\" />\n </slot>\n </div>\n <div\n class=\"x-rating--filled\"\n :style=\"{ width: calculateFilledWrapperWidth }\"\n data-test=\"rating-filled\"\n >\n <!--\n @slot The content to render as filled icon\n -->\n <slot v-for=\"i in max\" name=\"filled-icon\">\n <DefaultIcon :key=\"i\" class=\"x-rating__default-icon x-rating__default-icon--filled\" />\n </slot>\n </div>\n </span>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import StarIcon from './icons/star.vue';\n\n /**\n * Rating component. This component renders a set of elements filled based on the value passed as\n * prop.\n *\n * @public\n */\n export default defineComponent({\n name: 'BaseRating',\n components: {\n DefaultIcon: StarIcon\n },\n props: {\n /**\n * Numeric value used to calculates the width of the filled elements.\n *\n * @public\n */\n value: {\n type: Number,\n required: true\n },\n /**\n * Maximum number of elements to paint.\n *\n * @public\n */\n max: {\n type: Number,\n default: 5\n }\n },\n setup(props) {\n /**\n * Calculates the width of the filled elements wrapper.\n *\n * @returns The % of the wrapper width.\n *\n * @internal\n */\n const calculateFilledWrapperWidth = computed(() => {\n return props.value < 0 ? '0%' : `${(props.value * 100) / props.max}%`;\n });\n\n /**\n * Creates the aria label for accessibility purpose.\n *\n * @returns The aria label.\n *\n * @internal\n */\n const ariaLabel = computed(() => {\n return `${props.value}/${props.max}`;\n });\n\n return {\n calculateFilledWrapperWidth,\n ariaLabel\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-rating {\n position: relative;\n display: inline-block;\n max-width: fit-content;\n }\n\n .x-rating--empty {\n overflow: hidden;\n display: flex;\n flex-flow: row nowrap;\n white-space: nowrap;\n }\n\n .x-rating--filled {\n display: flex;\n flex-flow: row nowrap;\n white-space: nowrap;\n position: absolute;\n overflow: hidden;\n top: 0;\n left: 0;\n height: 100%;\n }\n\n .x-rating__default-icon {\n fill: currentColor;\n stroke: currentColor;\n }\n\n .x-rating__default-icon--empty {\n fill: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component receives a `value` as prop and renders a set of elements, which will be filled based\non this value.\n\n### Basic usage\n\n```vue\n<BaseRating :value=\"5.23\" />\n```\n\n### Customizing its contents\n\n```vue\n<BaseRating :value=\"7.15\" :max=\"10\">\n <template #filled-icon>\n <TestIcon/>\n </template>\n <template #empty-icon>\n <TestIcon/>\n </template>\n</BaseRating>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createElementBlock","_Fragment","_renderList","_renderSlot","_createBlock","_normalizeStyle"],"mappings":";;;;;AAES,MAAA,UAAA,GAAM,CAAiB,YAAA,CAAA,CAAA;MAAC,UAAU,GAAA;AAAA,EAAA,KAAA,EAAA,iBAAA;;;;iCADzCA,gBAqBO,CAAA,aAAA,CAAA,CAAA;SArBqBC,SAAK,EAAA,EAAAC,kBAAA,CAAA,MAAA,EAAA;AAAA,IAAE,KAAA,EAAA,UAAA;AAAA,IAAuB,IAAA,EAAA,KAAA;AAAA,IAAA,YAAA,EAAA,IAAA,CAAA,SAAA;AACxD,IAAA,WAAA,EAAA,QAAA;AAAA,GAAA,EAAA;uBAIE,KAEO,EAAA,UAAA,EAAA;AAAA,OADLD,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA;AAAA,QAAqFC,QAAA;AAAA,QAAA,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,GAAA,EAAA,CAAA,CAAA,KAAA;iBAApEC,UAAG,CAAA,IAAA,CAAA,MAAA,EAAA,YAAA,EAAA,EAAA,EAAA,MAAA;AAAA,aAAQJ,SAAA,EAAA,EAAAK,WAAA,CAAA,sBAAA,EAAA;AAAA,cAAA,GAAA,EAAA,CAAA;;;;AAGhC,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAWM;AAAA,KAAA,CAAA;;AArBV,MAAA,KAAA;AAAA,MAAA;AAAA,QAaM,KAAA,EAAA,kBAAA;AAAA,QAAA,KAAA,EAAAC,cAAA,CAAA,EAAA,KAAA,EAAA,IAAA,CAAA,2BAAA,EAAA,CAAA;;;;AAME,SAAAN,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA;AAAA,UAAsFC,QAAA;AAAA,UAAA,IAAA;AAAA,UAAAC,UAAA,CAAA,IAAA,CAAA,GAAA,EAAA,CAAA,CAAA,KAAA;mBAArEC,UAAG,CAAA,IAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,EAAA,MAAA;AAAA,eAAQJ,SAAA,EAAA,EAAAK,WAAA,CAAA,sBAAA,EAAA;AAAA,gBAAA,GAAA,EAAA,CAAA;;;;;;;AAnBpC,SAAA;AAAA,OAAA;;;;;;;;;;"}
@@ -0,0 +1,65 @@
1
+ import _sfc_main from './base-slider.vue2.js';
2
+ import { openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot, toDisplayString } from 'vue';
3
+ import './base-slider.vue3.js';
4
+ import _export_sfc from '../_virtual/_plugin-vue_export-helper.js';
5
+
6
+ const _hoisted_1 = { class: "x-base-slider" };
7
+ const _hoisted_2 = { class: "x-base-slider__selected" };
8
+ const _hoisted_3 = { class: "x-base-slider__selected-min" };
9
+ const _hoisted_4 = /* @__PURE__ */ createElementVNode(
10
+ "span",
11
+ null,
12
+ "min value",
13
+ -1
14
+ /* HOISTED */
15
+ );
16
+ const _hoisted_5 = { class: "x-base-slider__selected-max" };
17
+ const _hoisted_6 = /* @__PURE__ */ createElementVNode(
18
+ "span",
19
+ null,
20
+ "max value",
21
+ -1
22
+ /* HOISTED */
23
+ );
24
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
25
+ return openBlock(), createElementBlock("div", _hoisted_1, [
26
+ createElementVNode(
27
+ "div",
28
+ {
29
+ ref: "slider",
30
+ class: normalizeClass(["x-base-slider__nouislider"].concat(`${_ctx.contentClass}`))
31
+ },
32
+ null,
33
+ 2
34
+ /* CLASS */
35
+ ),
36
+ createElementVNode("div", _hoisted_2, [
37
+ renderSlot(_ctx.$slots, "default", { rangeSelected: _ctx.rangeSelected }, () => [
38
+ createElementVNode("p", _hoisted_3, [
39
+ _hoisted_4,
40
+ createElementVNode(
41
+ "span",
42
+ null,
43
+ toDisplayString(_ctx.rangeSelected[0]),
44
+ 1
45
+ /* TEXT */
46
+ )
47
+ ]),
48
+ createElementVNode("p", _hoisted_5, [
49
+ _hoisted_6,
50
+ createElementVNode(
51
+ "span",
52
+ null,
53
+ toDisplayString(_ctx.rangeSelected[1]),
54
+ 1
55
+ /* TEXT */
56
+ )
57
+ ])
58
+ ])
59
+ ])
60
+ ]);
61
+ }
62
+ var baseSlider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
63
+
64
+ export { baseSlider as default };
65
+ //# sourceMappingURL=base-slider.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-slider.vue.js","sources":["../../../src/components/base-slider.vue"],"sourcesContent":["<template>\n <div class=\"x-base-slider\">\n <div ref=\"slider\" :class=\"['x-base-slider__nouislider'].concat(`${contentClass}`)\" />\n <div class=\"x-base-slider__selected\">\n <!--\n @slot Default selected range rendering. This slot will be used by default for rendering\n the selected range without an specific slot implementation.\n @binding {number[]} rangeSelected - The selected range values. Min position 0, Max position 1.\n -->\n <slot :rangeSelected=\"rangeSelected\">\n <p class=\"x-base-slider__selected-min\">\n <span>min value</span>\n <span>\n {{ rangeSelected[0] }}\n </span>\n </p>\n <p class=\"x-base-slider__selected-max\">\n <span>max value</span>\n <span>\n {{ rangeSelected[1] }}\n </span>\n </p>\n </slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\">\n import { API, create } from 'nouislider';\n import { computed, defineComponent, onMounted, onUnmounted, PropType, ref, watch } from 'vue';\n\n /**\n * This component implements a range slider and prints the selected values.\n * It receives a threshold prop to set the limits and uses v-model to get and set\n * the selected values.\n *\n * It makes use of the nouslider library @see https://refreshless.com/nouislider/\n * for the slider implementation.\n *\n */\n export default defineComponent({\n name: 'BaseSlider',\n props: {\n /** The threshold prop sets the limits for the slider. */\n threshold: {\n type: Object as PropType<{ min: number; max: number }>,\n default: () => ({ min: 0, max: Number.MAX_SAFE_INTEGER })\n },\n /** The modelValue prop sets the initial values for the slider. */\n modelValue: {\n type: Object as PropType<{ min: number; max: number }>,\n required: true\n },\n /** Class to be able to customize slider styles. */\n contentClass: {\n type: String,\n default: ''\n }\n },\n /**\n * The component emits an event with the selected values whenever\n * the user changes the slider.\n */\n emits: ['update:modelValue'],\n setup(props, { emit }) {\n /** The nouislider instance. */\n let sliderInstance: API;\n /** The nouislider element reference. */\n const slider = ref<HTMLElement>();\n\n /** The selected min value. */\n const minSelected = ref(props.modelValue?.min ?? props.threshold.min);\n /** The selected max value. */\n const maxSelected = ref(props.modelValue?.max ?? props.threshold.max);\n\n /** The selected range as an array. */\n const rangeSelected = computed(() => [minSelected.value, maxSelected.value]);\n /** The range for the nouislider. */\n const slideRange = computed(() => ({ min: props.threshold.min, max: props.threshold.max }));\n\n onMounted(() => {\n // Create the slider instance\n sliderInstance = create(slider.value!, {\n start: rangeSelected.value,\n range: slideRange.value,\n step: 1,\n connect: true,\n margin: 1\n });\n\n // Update the selected values when the slider update its values\n sliderInstance.on('update', ([min, max]) => {\n minSelected.value = Number(min);\n maxSelected.value = Number(max);\n });\n\n // Emits the selected values when the slider values change\n sliderInstance.on('change', () =>\n emit('update:modelValue', { min: minSelected.value, max: maxSelected.value })\n );\n });\n\n onUnmounted(() => {\n // Waiting to finish the collapse animation before destroying it\n setTimeout(sliderInstance.destroy.bind(sliderInstance), 600);\n });\n\n /**\n * Watch the threshold prop to update the slider state and emit the selected values.\n */\n watch(\n () => props.threshold,\n ({ min, max }) => {\n sliderInstance.updateOptions({ range: slideRange.value, start: [min, max] }, false);\n emit('update:modelValue', { min, max });\n }\n );\n\n /**\n * Watch the modelValue prop to update the slider state.\n *\n * @remarks It only update the values if the values are corrects. It means,\n * values within the threshold limits and not equal to the current values.\n *\n * @returns Undefined.\n */\n watch([() => props.modelValue.min, () => props.modelValue.max], ([min, max]) => {\n // Check if the values are the same\n if (min === minSelected.value && max === maxSelected.value) {\n return;\n }\n\n // Validate the values\n const minValidated = min < props.threshold.min ? props.threshold.min : min;\n const maxValidated = max > props.threshold.max ? props.threshold.max : max;\n\n // Update the nouislider values\n sliderInstance.set([minValidated, maxValidated]);\n\n // Emit the selected values\n if (minValidated !== min || maxValidated !== max) {\n emit('update:modelValue', { min: minValidated, max: maxValidated });\n }\n });\n\n return {\n slider,\n rangeSelected\n };\n }\n });\n</script>\n<style lang=\"css\">\n @import 'nouislider/dist/nouislider.css';\n /** Customize nouislider styles: https://refreshless.com/nouislider/examples/#section-styling */\n\n .x-base-slider {\n gap: 16px;\n }\n\n .x-base-slider,\n .x-base-slider__selected-min,\n .x-base-slider__selected-max {\n display: flex;\n flex-flow: column nowrap;\n }\n\n .x-base-slider__selected {\n display: inline-flex;\n }\n\n .x-base-slider__selected-min,\n .x-base-slider__selected-max {\n flex: 50%;\n }\n\n .x-base-slider__nouislider {\n margin: 16px 0;\n padding: 0 16px;\n }\n\n .x-base-slider__nouislider .noUi-handle {\n box-shadow: none;\n }\n\n .x-base-slider__nouislider .noUi-handle:before,\n .x-base-slider__nouislider .noUi-handle:after {\n content: none;\n }\n</style>\n<docs lang=\"mdx\">\n## Examples\n\nThis component renders a slider and the selected values. The component needs the threshold for the\nslider, although is not required (If not passed, fallback is min: 0, max: Number.MAX_SAFE_INTEGER ),\nwhich are passed using the `threshold` prop and the selected range, which is passed in using the\nv-model.\n\n### Default usage\n\nIt is required to send the value prop which holds the selected values.\n\n```vue live\n<template>\n <BaseSlider v-model=\"selectedRange\" />\n</template>\n\n<script>\n import { BaseSlider } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSliderDemo',\n components: {\n BaseSlider\n },\n setup() {\n const selectedRange = ref({ min: 0, max: 1000 });\n\n return {\n selectedRange\n };\n }\n };\n</script>\n```\n\n#### With threshold\n\n```vue live\n<template>\n <BaseSlider v-model=\"selectedRange\" :threshold=\"threshold\" />\n</template>\n\n<script>\n import { BaseSlider } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSliderDemo',\n components: {\n BaseSliderDemo\n },\n setup() {\n const threshold = ref({ min: 0, max: 1000 });\n const selectedRange = ref(threshold.value);\n\n return {\n selectedRange,\n threshold\n };\n }\n };\n</script>\n```\n\n### Customized usage\n\n#### Overriding the slots\n\nIt is possible to override the default slot to customize the layout for the selected values.\n\n```vue live\n<template>\n <BaseSlider v-model=\"selectedRange\" :threshold=\"threshold\" v-slot=\"{ rangeSelected }\">\n <p class=\"x-base-slider__selected-min\">\n <span>min value</span>\n <span>\n {{ rangeSelected[0] }}\n </span>\n </p>\n <p class=\"x-base-slider__selected-max\">\n <span>max value</span>\n <span>\n {{ rangeSelected[1] }}\n </span>\n </p>\n </BaseSlider>\n</template>\n\n<script>\n import { BaseSlider } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSliderDemo',\n components: {\n BaseSliderDemo\n },\n setup() {\n const threshold = ref({ min: 0, max: 1000 });\n const selectedRange = ref(threshold.value);\n\n return {\n selectedRange,\n threshold\n };\n }\n };\n</script>\n```\n\nIt is also possible to add inputs to complement the slider and allow to change the selected values\nmanually.\n\n```vue live\n<template>\n <BaseSlider v-model=\"selectedRange\" :threshold=\"threshold\">\n <input\n @change=\"selectedRange.min = $event.target?.valueAsNumber || 0\"\n class=\"x-input\"\n name=\"min\"\n type=\"number\"\n :value=\"selectedRange.min\"\n :aria-label=\"'min'\"\n />\n\n <input\n @change=\"selectedRange.max = $event.target?.valueAsNumber || 1000000\"\n style=\"display: block\"\n class=\"x-input\"\n name=\"max\"\n type=\"number\"\n :value=\"selectedRange.max\"\n :aria-label=\"'max'\"\n />\n </BaseSlider>\n</template>\n\n<script>\n import { BaseSlider } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSliderDemo',\n components: {\n BaseSliderDemo\n },\n setup() {\n const threshold = ref({ min: 0, max: 1000 });\n const selectedRange = ref(threshold.value);\n\n return {\n selectedRange,\n threshold\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_createElementVNode","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_toDisplayString"],"mappings":";;;;;qBAUW,KAAM,EAAA,eAAA,EAAA,CAAA;AACe,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,yBAAA,EAAA,CAAA;AAKrB,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,6BAA6B,EAAA,CAAA;AACpC,MAAA,UAAA,mBAAAA,kBAAA;AAAA,EAAsB,MAAA;AAAA,EAAA,IAAA;AAAA,EAAhB,WAAA;AAAA,EAAS,CAAA,CAAA;AAAA;AAAA,CAAA,CAAA;;;;;;;;;SAfrB,WAAqF,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SAA7EC,SAAS,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA,UAAA,EAAA;AAAA,IAAAF,kBAAA;AAFrB,MAAA,KAAA;AAAA,MAAA;AAAA,QAAA,GAAA,EAAA,QAAA;QAGI,KAoBM,EAAAG,cAAA,CAAA,CAAA,2BAAA,CAAA,CAAA,MAAA,CAAA,CAAA,EAAA,IAAA,CAAA,YAAA,CAAA,CAAA,CAAA,CAAA;AAAA,OAAA;AAdJ,MAAA,IAAA;AAAA,MAAA,CAAA;AAAA;AAAA,KAaO;AAAA,IAAAH,kBAAA,CAZL,KAKI,EAAA,UAAA,EAAA;AAAA,MAAAI,UAAA,CAJF,IAAsB,CAAA,MAAA,EAAA,SAAA,EAAA,EAAA,aAAA,EAAA,IAAA,CAAA,aAAA,EAAA,EAAA,MAAA;AAAA,QAAAJ,kBAAA,CACtB,GAEO,EAAA,UAAA,EAAA;AAAA,UAAA,UAAA;AAET,UAAAA,kBAAA;AAAA,YAKI,MAAA;AAAA,YALJ,IAAA;AAAA,YAKIK,eAAA,CAAA,IAAA,CAAA,aAAA,CAAA,CAAA,CAAA,CAAA;AAAA,YAAA,CAAA;AAAA;AAAA,WAAA;AAAA,SAAA,CAAA;2BAHF,GAEO,EAAA,UAAA,EAAA;AAAA,UAAA,UAAA;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,109 @@
1
+ import { create } from 'nouislider';
2
+ import { defineComponent, ref, computed, onMounted, onUnmounted, watch } from 'vue';
3
+
4
+ /**
5
+ * This component implements a range slider and prints the selected values.
6
+ * It receives a threshold prop to set the limits and uses v-model to get and set
7
+ * the selected values.
8
+ *
9
+ * It makes use of the nouslider library @see https://refreshless.com/nouislider/
10
+ * for the slider implementation.
11
+ *
12
+ */
13
+ var _sfc_main = defineComponent({
14
+ name: 'BaseSlider',
15
+ props: {
16
+ /** The threshold prop sets the limits for the slider. */
17
+ threshold: {
18
+ type: Object,
19
+ default: () => ({ min: 0, max: Number.MAX_SAFE_INTEGER })
20
+ },
21
+ /** The modelValue prop sets the initial values for the slider. */
22
+ modelValue: {
23
+ type: Object,
24
+ required: true
25
+ },
26
+ /** Class to be able to customize slider styles. */
27
+ contentClass: {
28
+ type: String,
29
+ default: ''
30
+ }
31
+ },
32
+ /**
33
+ * The component emits an event with the selected values whenever
34
+ * the user changes the slider.
35
+ */
36
+ emits: ['update:modelValue'],
37
+ setup(props, { emit }) {
38
+ /** The nouislider instance. */
39
+ let sliderInstance;
40
+ /** The nouislider element reference. */
41
+ const slider = ref();
42
+ /** The selected min value. */
43
+ const minSelected = ref(props.modelValue?.min ?? props.threshold.min);
44
+ /** The selected max value. */
45
+ const maxSelected = ref(props.modelValue?.max ?? props.threshold.max);
46
+ /** The selected range as an array. */
47
+ const rangeSelected = computed(() => [minSelected.value, maxSelected.value]);
48
+ /** The range for the nouislider. */
49
+ const slideRange = computed(() => ({ min: props.threshold.min, max: props.threshold.max }));
50
+ onMounted(() => {
51
+ // Create the slider instance
52
+ sliderInstance = create(slider.value, {
53
+ start: rangeSelected.value,
54
+ range: slideRange.value,
55
+ step: 1,
56
+ connect: true,
57
+ margin: 1
58
+ });
59
+ // Update the selected values when the slider update its values
60
+ sliderInstance.on('update', ([min, max]) => {
61
+ minSelected.value = Number(min);
62
+ maxSelected.value = Number(max);
63
+ });
64
+ // Emits the selected values when the slider values change
65
+ sliderInstance.on('change', () => emit('update:modelValue', { min: minSelected.value, max: maxSelected.value }));
66
+ });
67
+ onUnmounted(() => {
68
+ // Waiting to finish the collapse animation before destroying it
69
+ setTimeout(sliderInstance.destroy.bind(sliderInstance), 600);
70
+ });
71
+ /**
72
+ * Watch the threshold prop to update the slider state and emit the selected values.
73
+ */
74
+ watch(() => props.threshold, ({ min, max }) => {
75
+ sliderInstance.updateOptions({ range: slideRange.value, start: [min, max] }, false);
76
+ emit('update:modelValue', { min, max });
77
+ });
78
+ /**
79
+ * Watch the modelValue prop to update the slider state.
80
+ *
81
+ * @remarks It only update the values if the values are corrects. It means,
82
+ * values within the threshold limits and not equal to the current values.
83
+ *
84
+ * @returns Undefined.
85
+ */
86
+ watch([() => props.modelValue.min, () => props.modelValue.max], ([min, max]) => {
87
+ // Check if the values are the same
88
+ if (min === minSelected.value && max === maxSelected.value) {
89
+ return;
90
+ }
91
+ // Validate the values
92
+ const minValidated = min < props.threshold.min ? props.threshold.min : min;
93
+ const maxValidated = max > props.threshold.max ? props.threshold.max : max;
94
+ // Update the nouislider values
95
+ sliderInstance.set([minValidated, maxValidated]);
96
+ // Emit the selected values
97
+ if (minValidated !== min || maxValidated !== max) {
98
+ emit('update:modelValue', { min: minValidated, max: maxValidated });
99
+ }
100
+ });
101
+ return {
102
+ slider,
103
+ rangeSelected
104
+ };
105
+ }
106
+ });
107
+
108
+ export { _sfc_main as default };
109
+ //# sourceMappingURL=base-slider.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-slider.vue2.js","sources":["../../../src/components/base-slider.vue"],"sourcesContent":["<template>\n <div class=\"x-base-slider\">\n <div ref=\"slider\" :class=\"['x-base-slider__nouislider'].concat(`${contentClass}`)\" />\n <div class=\"x-base-slider__selected\">\n <!--\n @slot Default selected range rendering. This slot will be used by default for rendering\n the selected range without an specific slot implementation.\n @binding {number[]} rangeSelected - The selected range values. Min position 0, Max position 1.\n -->\n <slot :rangeSelected=\"rangeSelected\">\n <p class=\"x-base-slider__selected-min\">\n <span>min value</span>\n <span>\n {{ rangeSelected[0] }}\n </span>\n </p>\n <p class=\"x-base-slider__selected-max\">\n <span>max value</span>\n <span>\n {{ rangeSelected[1] }}\n </span>\n </p>\n </slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\">\n import { API, create } from 'nouislider';\n import { computed, defineComponent, onMounted, onUnmounted, PropType, ref, watch } from 'vue';\n\n /**\n * This component implements a range slider and prints the selected values.\n * It receives a threshold prop to set the limits and uses v-model to get and set\n * the selected values.\n *\n * It makes use of the nouslider library @see https://refreshless.com/nouislider/\n * for the slider implementation.\n *\n */\n export default defineComponent({\n name: 'BaseSlider',\n props: {\n /** The threshold prop sets the limits for the slider. */\n threshold: {\n type: Object as PropType<{ min: number; max: number }>,\n default: () => ({ min: 0, max: Number.MAX_SAFE_INTEGER })\n },\n /** The modelValue prop sets the initial values for the slider. */\n modelValue: {\n type: Object as PropType<{ min: number; max: number }>,\n required: true\n },\n /** Class to be able to customize slider styles. */\n contentClass: {\n type: String,\n default: ''\n }\n },\n /**\n * The component emits an event with the selected values whenever\n * the user changes the slider.\n */\n emits: ['update:modelValue'],\n setup(props, { emit }) {\n /** The nouislider instance. */\n let sliderInstance: API;\n /** The nouislider element reference. */\n const slider = ref<HTMLElement>();\n\n /** The selected min value. */\n const minSelected = ref(props.modelValue?.min ?? props.threshold.min);\n /** The selected max value. */\n const maxSelected = ref(props.modelValue?.max ?? props.threshold.max);\n\n /** The selected range as an array. */\n const rangeSelected = computed(() => [minSelected.value, maxSelected.value]);\n /** The range for the nouislider. */\n const slideRange = computed(() => ({ min: props.threshold.min, max: props.threshold.max }));\n\n onMounted(() => {\n // Create the slider instance\n sliderInstance = create(slider.value!, {\n start: rangeSelected.value,\n range: slideRange.value,\n step: 1,\n connect: true,\n margin: 1\n });\n\n // Update the selected values when the slider update its values\n sliderInstance.on('update', ([min, max]) => {\n minSelected.value = Number(min);\n maxSelected.value = Number(max);\n });\n\n // Emits the selected values when the slider values change\n sliderInstance.on('change', () =>\n emit('update:modelValue', { min: minSelected.value, max: maxSelected.value })\n );\n });\n\n onUnmounted(() => {\n // Waiting to finish the collapse animation before destroying it\n setTimeout(sliderInstance.destroy.bind(sliderInstance), 600);\n });\n\n /**\n * Watch the threshold prop to update the slider state and emit the selected values.\n */\n watch(\n () => props.threshold,\n ({ min, max }) => {\n sliderInstance.updateOptions({ range: slideRange.value, start: [min, max] }, false);\n emit('update:modelValue', { min, max });\n }\n );\n\n /**\n * Watch the modelValue prop to update the slider state.\n *\n * @remarks It only update the values if the values are corrects. It means,\n * values within the threshold limits and not equal to the current values.\n *\n * @returns Undefined.\n */\n watch([() => props.modelValue.min, () => props.modelValue.max], ([min, max]) => {\n // Check if the values are the same\n if (min === minSelected.value && max === maxSelected.value) {\n return;\n }\n\n // Validate the values\n const minValidated = min < props.threshold.min ? props.threshold.min : min;\n const maxValidated = max > props.threshold.max ? props.threshold.max : max;\n\n // Update the nouislider values\n sliderInstance.set([minValidated, maxValidated]);\n\n // Emit the selected values\n if (minValidated !== min || maxValidated !== max) {\n emit('update:modelValue', { min: minValidated, max: maxValidated });\n }\n });\n\n return {\n slider,\n rangeSelected\n };\n }\n });\n</script>\n<style lang=\"css\">\n @import 'nouislider/dist/nouislider.css';\n /** Customize nouislider styles: https://refreshless.com/nouislider/examples/#section-styling */\n\n .x-base-slider {\n gap: 16px;\n }\n\n .x-base-slider,\n .x-base-slider__selected-min,\n .x-base-slider__selected-max {\n display: flex;\n flex-flow: column nowrap;\n }\n\n .x-base-slider__selected {\n display: inline-flex;\n }\n\n .x-base-slider__selected-min,\n .x-base-slider__selected-max {\n flex: 50%;\n }\n\n .x-base-slider__nouislider {\n margin: 16px 0;\n padding: 0 16px;\n }\n\n .x-base-slider__nouislider .noUi-handle {\n box-shadow: none;\n }\n\n .x-base-slider__nouislider .noUi-handle:before,\n .x-base-slider__nouislider .noUi-handle:after {\n content: none;\n }\n</style>\n<docs lang=\"mdx\">\n## Examples\n\nThis component renders a slider and the selected values. The component needs the threshold for the\nslider, although is not required (If not passed, fallback is min: 0, max: Number.MAX_SAFE_INTEGER ),\nwhich are passed using the `threshold` prop and the selected range, which is passed in using the\nv-model.\n\n### Default usage\n\nIt is required to send the value prop which holds the selected values.\n\n```vue live\n<template>\n <BaseSlider v-model=\"selectedRange\" />\n</template>\n\n<script>\n import { BaseSlider } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSliderDemo',\n components: {\n BaseSlider\n },\n setup() {\n const selectedRange = ref({ min: 0, max: 1000 });\n\n return {\n selectedRange\n };\n }\n };\n</script>\n```\n\n#### With threshold\n\n```vue live\n<template>\n <BaseSlider v-model=\"selectedRange\" :threshold=\"threshold\" />\n</template>\n\n<script>\n import { BaseSlider } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSliderDemo',\n components: {\n BaseSliderDemo\n },\n setup() {\n const threshold = ref({ min: 0, max: 1000 });\n const selectedRange = ref(threshold.value);\n\n return {\n selectedRange,\n threshold\n };\n }\n };\n</script>\n```\n\n### Customized usage\n\n#### Overriding the slots\n\nIt is possible to override the default slot to customize the layout for the selected values.\n\n```vue live\n<template>\n <BaseSlider v-model=\"selectedRange\" :threshold=\"threshold\" v-slot=\"{ rangeSelected }\">\n <p class=\"x-base-slider__selected-min\">\n <span>min value</span>\n <span>\n {{ rangeSelected[0] }}\n </span>\n </p>\n <p class=\"x-base-slider__selected-max\">\n <span>max value</span>\n <span>\n {{ rangeSelected[1] }}\n </span>\n </p>\n </BaseSlider>\n</template>\n\n<script>\n import { BaseSlider } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSliderDemo',\n components: {\n BaseSliderDemo\n },\n setup() {\n const threshold = ref({ min: 0, max: 1000 });\n const selectedRange = ref(threshold.value);\n\n return {\n selectedRange,\n threshold\n };\n }\n };\n</script>\n```\n\nIt is also possible to add inputs to complement the slider and allow to change the selected values\nmanually.\n\n```vue live\n<template>\n <BaseSlider v-model=\"selectedRange\" :threshold=\"threshold\">\n <input\n @change=\"selectedRange.min = $event.target?.valueAsNumber || 0\"\n class=\"x-input\"\n name=\"min\"\n type=\"number\"\n :value=\"selectedRange.min\"\n :aria-label=\"'min'\"\n />\n\n <input\n @change=\"selectedRange.max = $event.target?.valueAsNumber || 1000000\"\n style=\"display: block\"\n class=\"x-input\"\n name=\"max\"\n type=\"number\"\n :value=\"selectedRange.max\"\n :aria-label=\"'max'\"\n />\n </BaseSlider>\n</template>\n\n<script>\n import { BaseSlider } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSliderDemo',\n components: {\n BaseSliderDemo\n },\n setup() {\n const threshold = ref({ min: 0, max: 1000 });\n const selectedRange = ref(threshold.value);\n\n return {\n selectedRange,\n threshold\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,7 @@
1
+ import injectCss from '../../tools/inject-css.js';
2
+
3
+ var css = ".noUi-target,.noUi-target *{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box;touch-action:none;-webkit-user-select:none;user-select:none}.noUi-target{position:relative}.noUi-base,.noUi-connects{height:100%;position:relative;width:100%;z-index:1}.noUi-connects{overflow:hidden;z-index:0}.noUi-connect,.noUi-origin{height:100%;position:absolute;right:0;top:0;-ms-transform-origin:0 0;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform-style:preserve-3d;transform-style:flat;width:100%;will-change:transform;z-index:1}.noUi-txt-dir-rtl.noUi-horizontal .noUi-origin{left:0;right:auto}.noUi-vertical .noUi-origin{top:-100%;width:0}.noUi-horizontal .noUi-origin{height:0}.noUi-handle{backface-visibility:hidden;position:absolute}.noUi-touch-area{height:100%;width:100%}.noUi-state-tap .noUi-connect,.noUi-state-tap .noUi-origin{transition:transform .3s}.noUi-state-drag *{cursor:inherit!important}.noUi-horizontal{height:18px}.noUi-horizontal .noUi-handle{height:28px;right:-17px;top:-6px;width:34px}.noUi-vertical{width:18px}.noUi-vertical .noUi-handle{bottom:-17px;height:34px;right:-6px;width:28px}.noUi-txt-dir-rtl.noUi-horizontal .noUi-handle{left:-17px;right:auto}.noUi-target{background:#fafafa;border:1px solid #d3d3d3;border-radius:4px;box-shadow:inset 0 1px 1px #f0f0f0,0 3px 6px -5px #bbb}.noUi-connects{border-radius:3px}.noUi-connect{background:#3fb8af}.noUi-draggable{cursor:ew-resize}.noUi-vertical .noUi-draggable{cursor:ns-resize}.noUi-handle{background:#fff;border:1px solid #d9d9d9;border-radius:3px;box-shadow:inset 0 0 1px #fff,inset 0 1px 7px #ebebeb,0 3px 6px -3px #bbb;cursor:default}.noUi-active{box-shadow:inset 0 0 1px #fff,inset 0 1px 7px #ddd,0 3px 6px -3px #bbb}.noUi-handle:after,.noUi-handle:before{background:#e8e7e6;content:\"\";display:block;height:14px;left:14px;position:absolute;top:6px;width:1px}.noUi-handle:after{left:17px}.noUi-vertical .noUi-handle:after,.noUi-vertical .noUi-handle:before{height:1px;left:6px;top:14px;width:14px}.noUi-vertical .noUi-handle:after{top:17px}[disabled] .noUi-connect{background:#b8b8b8}[disabled] .noUi-handle,[disabled].noUi-handle,[disabled].noUi-target{cursor:not-allowed}.noUi-pips,.noUi-pips *{box-sizing:border-box}.noUi-pips{color:#999;position:absolute}.noUi-value{position:absolute;text-align:center;white-space:nowrap}.noUi-value-sub{color:#ccc;font-size:10px}.noUi-marker{background:#ccc;position:absolute}.noUi-marker-large,.noUi-marker-sub{background:#aaa}.noUi-pips-horizontal{height:80px;left:0;padding:10px 0;top:100%;width:100%}.noUi-value-horizontal{transform:translate(-50%,50%)}.noUi-rtl .noUi-value-horizontal{transform:translate(50%,50%)}.noUi-marker-horizontal.noUi-marker{height:5px;margin-left:-1px;width:2px}.noUi-marker-horizontal.noUi-marker-sub{height:10px}.noUi-marker-horizontal.noUi-marker-large{height:15px}.noUi-pips-vertical{height:100%;left:100%;padding:0 10px;top:0}.noUi-value-vertical{padding-left:25px;transform:translateY(-50%)}.noUi-rtl .noUi-value-vertical{transform:translateY(50%)}.noUi-marker-vertical.noUi-marker{height:2px;margin-top:-1px;width:5px}.noUi-marker-vertical.noUi-marker-sub{width:10px}.noUi-marker-vertical.noUi-marker-large{width:15px}.noUi-tooltip{background:#fff;border:1px solid #d9d9d9;border-radius:3px;color:#000;display:block;padding:5px;position:absolute;text-align:center;white-space:nowrap}.noUi-horizontal .noUi-tooltip{bottom:120%;left:50%;transform:translate(-50%)}.noUi-vertical .noUi-tooltip{right:120%;top:50%;transform:translateY(-50%)}.noUi-horizontal .noUi-origin>.noUi-tooltip{bottom:10px;left:auto;transform:translate(50%)}.noUi-vertical .noUi-origin>.noUi-tooltip{right:28px;top:auto;transform:translateY(-18px)}.x-base-slider{gap:16px}.x-base-slider,.x-base-slider__selected-max,.x-base-slider__selected-min{display:flex;flex-flow:column nowrap}.x-base-slider__selected{display:inline-flex}.x-base-slider__selected-max,.x-base-slider__selected-min{flex:50%}.x-base-slider__nouislider{margin:16px 0;padding:0 16px}.x-base-slider__nouislider .noUi-handle{box-shadow:none}.x-base-slider__nouislider .noUi-handle:after,.x-base-slider__nouislider .noUi-handle:before{content:none}";
4
+ injectCss(css);
5
+
6
+ export { css, css as default };
7
+ //# sourceMappingURL=base-slider.vue3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-slider.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from './base-variable-column-grid.vue2.js';
2
- import { resolveComponent, openBlock, createBlock, createSlots, renderList, withCtx, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
2
+ import { resolveComponent, openBlock, createBlock, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
3
3
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.js';
4
4
 
5
5
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -16,7 +16,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
16
16
  return {
17
17
  name,
18
18
  fn: withCtx(({ item }) => [
19
- createCommentVNode("\n @slot Customized item rendering. The slot name can either be default or the item's model\n name.\n @binding {GridItem} item - Item to render.\n "),
20
19
  renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps({ item })))
21
20
  ])
22
21
  };