@empathyco/x-components 6.0.0-alpha.184 → 6.0.0-alpha.186

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 (635) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/docs/API-reference/api/x-components.aioverview.md +22 -8
  3. package/docs/API-reference/api/x-components.allfilter.md +6 -4
  4. package/docs/API-reference/api/x-components.animatewidth.md +1 -1
  5. package/docs/API-reference/api/x-components.autoprogressbar.md +5 -5
  6. package/docs/API-reference/api/x-components.banner.md +5 -5
  7. package/docs/API-reference/api/x-components.bannerslist.md +5 -5
  8. package/docs/API-reference/api/x-components.baseaddtocart.md +6 -4
  9. package/docs/API-reference/api/x-components.basecolumnpickerdropdown.md +8 -6
  10. package/docs/API-reference/api/x-components.basecolumnpickerlist.md +7 -5
  11. package/docs/API-reference/api/x-components.basecurrency.md +4 -4
  12. package/docs/API-reference/api/x-components.basedropdown.md +12 -12
  13. package/docs/API-reference/api/x-components.baseeventbutton.md +5 -5
  14. package/docs/API-reference/api/x-components.baseeventsmodal.md +10 -8
  15. package/docs/API-reference/api/x-components.baseeventsmodalclose.md +7 -5
  16. package/docs/API-reference/api/x-components.baseeventsmodalopen.md +7 -5
  17. package/docs/API-reference/api/x-components.basegrid.md +9 -7
  18. package/docs/API-reference/api/x-components.baseheadertogglepanel.md +9 -7
  19. package/docs/API-reference/api/x-components.baseidmodal.md +8 -6
  20. package/docs/API-reference/api/x-components.baseidmodalclose.md +4 -4
  21. package/docs/API-reference/api/x-components.baseidmodalopen.md +4 -4
  22. package/docs/API-reference/api/x-components.baseidtogglepanel.md +8 -6
  23. package/docs/API-reference/api/x-components.baseidtogglepanelbutton.md +7 -5
  24. package/docs/API-reference/api/x-components.basekeyboardnavigation.md +6 -6
  25. package/docs/API-reference/api/x-components.basemodal.md +9 -9
  26. package/docs/API-reference/api/x-components.basepricefilterlabel.md +6 -4
  27. package/docs/API-reference/api/x-components.baserating.md +7 -5
  28. package/docs/API-reference/api/x-components.baseratingfilterlabel.md +7 -5
  29. package/docs/API-reference/api/x-components.baseresultcurrentprice.md +6 -4
  30. package/docs/API-reference/api/x-components.baseresultimage.md +9 -9
  31. package/docs/API-reference/api/x-components.baseresultlink.md +5 -5
  32. package/docs/API-reference/api/x-components.baseresultpreviousprice.md +5 -3
  33. package/docs/API-reference/api/x-components.baseresultrating.md +7 -5
  34. package/docs/API-reference/api/x-components.basescroll.md +7 -7
  35. package/docs/API-reference/api/x-components.baseslider.md +7 -7
  36. package/docs/API-reference/api/x-components.basesuggestion.md +8 -6
  37. package/docs/API-reference/api/x-components.basesuggestions.md +5 -5
  38. package/docs/API-reference/api/x-components.baseswitch.md +6 -6
  39. package/docs/API-reference/api/x-components.basetabspanel.md +6 -6
  40. package/docs/API-reference/api/x-components.baseteleport.md +6 -6
  41. package/docs/API-reference/api/x-components.basetogglepanel.md +4 -4
  42. package/docs/API-reference/api/x-components.basevariablecolumngrid.md +7 -5
  43. package/docs/API-reference/api/x-components.changeheight.md +2 -2
  44. package/docs/API-reference/api/x-components.clearfilters.md +7 -5
  45. package/docs/API-reference/api/x-components.clearhistoryqueries.md +3 -1
  46. package/docs/API-reference/api/x-components.clearsearchinput.md +7 -1
  47. package/docs/API-reference/api/x-components.closemainmodal.md +3 -1
  48. package/docs/API-reference/api/x-components.collapseheight.md +5 -5
  49. package/docs/API-reference/api/x-components.collapsewidth.md +5 -5
  50. package/docs/API-reference/api/x-components.crossfade.md +4 -4
  51. package/docs/API-reference/api/x-components.devicedetector.md +9 -5
  52. package/docs/API-reference/api/x-components.displayclickprovider.md +5 -5
  53. package/docs/API-reference/api/x-components.displayemitter.md +4 -4
  54. package/docs/API-reference/api/x-components.editablenumberrangefilter.md +7 -7
  55. package/docs/API-reference/api/x-components.empathize.md +6 -6
  56. package/docs/API-reference/api/x-components.excludefilterswithnoresults.md +4 -4
  57. package/docs/API-reference/api/x-components.experiencecontrols.md +1 -1
  58. package/docs/API-reference/api/x-components.extraparams.md +3 -3
  59. package/docs/API-reference/api/x-components.facets.md +5 -5
  60. package/docs/API-reference/api/x-components.facetsprovider.md +4 -4
  61. package/docs/API-reference/api/x-components.fade.md +4 -4
  62. package/docs/API-reference/api/x-components.fadeandslide.md +5 -5
  63. package/docs/API-reference/api/x-components.fallbackdisclaimer.md +1 -1
  64. package/docs/API-reference/api/x-components.filterslist.md +5 -5
  65. package/docs/API-reference/api/x-components.filterssearch.md +6 -6
  66. package/docs/API-reference/api/x-components.fixedheaderandasideslayout.md +9 -5
  67. package/docs/API-reference/api/x-components.globalxbus.md +3 -3
  68. package/docs/API-reference/api/x-components.hierarchicalfilter.md +8 -5
  69. package/docs/API-reference/api/x-components.highlight_2.md +5 -5
  70. package/docs/API-reference/api/x-components.historyqueries.md +4 -1
  71. package/docs/API-reference/api/x-components.historyqueriesswitch.md +3 -1
  72. package/docs/API-reference/api/x-components.historyquery.md +8 -5
  73. package/docs/API-reference/api/x-components.identifierresult.md +4 -4
  74. package/docs/API-reference/api/x-components.identifierresults.md +5 -5
  75. package/docs/API-reference/api/x-components.itemslist.md +5 -5
  76. package/docs/API-reference/api/x-components.locationprovider.md +4 -4
  77. package/docs/API-reference/api/x-components.mainmodal.md +6 -4
  78. package/docs/API-reference/api/x-components.mainscroll.md +5 -5
  79. package/docs/API-reference/api/x-components.mainscrollitem.md +6 -6
  80. package/docs/API-reference/api/x-components.md +1 -0
  81. package/docs/API-reference/api/x-components.multicolumnmaxwidthlayout.md +9 -5
  82. package/docs/API-reference/api/x-components.myhistory.md +8 -5
  83. package/docs/API-reference/api/x-components.nextqueries.md +8 -5
  84. package/docs/API-reference/api/x-components.nextquerieslist.md +5 -5
  85. package/docs/API-reference/api/x-components.nextquery.md +7 -5
  86. package/docs/API-reference/api/x-components.nextquerypreview.md +4 -4
  87. package/docs/API-reference/api/x-components.noanimation.md +2 -2
  88. package/docs/API-reference/api/x-components.numberrangefilter.md +7 -5
  89. package/docs/API-reference/api/x-components.openmainmodal.md +3 -1
  90. package/docs/API-reference/api/x-components.pageloaderbutton.md +7 -5
  91. package/docs/API-reference/api/x-components.pageselector.md +5 -5
  92. package/docs/API-reference/api/x-components.partialquerybutton.md +5 -5
  93. package/docs/API-reference/api/x-components.partialresultslist.md +5 -5
  94. package/docs/API-reference/api/x-components.popularsearch.md +6 -4
  95. package/docs/API-reference/api/x-components.popularsearches.md +4 -1
  96. package/docs/API-reference/api/x-components.preselectedfilters.md +5 -5
  97. package/docs/API-reference/api/x-components.promoted.md +4 -4
  98. package/docs/API-reference/api/x-components.promotedslist.md +5 -5
  99. package/docs/API-reference/api/x-components.querypreview.md +6 -6
  100. package/docs/API-reference/api/x-components.querypreviewbutton.md +6 -4
  101. package/docs/API-reference/api/x-components.querypreviewlist.md +8 -6
  102. package/docs/API-reference/api/x-components.querysuggestion.md +6 -4
  103. package/docs/API-reference/api/x-components.querysuggestions.md +4 -1
  104. package/docs/API-reference/api/x-components.recommendations.md +5 -5
  105. package/docs/API-reference/api/x-components.redirection.md +6 -6
  106. package/docs/API-reference/api/x-components.relatedprompt.md +9 -4
  107. package/docs/API-reference/api/x-components.relatedpromptslist.md +5 -5
  108. package/docs/API-reference/api/x-components.relatedpromptstaglist.md +11 -7
  109. package/docs/API-reference/api/x-components.relatedtag.md +6 -6
  110. package/docs/API-reference/api/x-components.relatedtags.md +7 -5
  111. package/docs/API-reference/api/x-components.removehistoryquery.md +6 -4
  112. package/docs/API-reference/api/x-components.renderlessextraparams.md +4 -4
  113. package/docs/API-reference/api/x-components.renderlessfilter.md +5 -5
  114. package/docs/API-reference/api/x-components.resultslist.md +6 -6
  115. package/docs/API-reference/api/x-components.resultvariantselector.md +6 -6
  116. package/docs/API-reference/api/x-components.resultvariantsprovider.md +5 -5
  117. package/docs/API-reference/api/x-components.scroll.md +8 -6
  118. package/docs/API-reference/api/x-components.scrolltotop.md +7 -5
  119. package/docs/API-reference/api/x-components.searchbutton.md +2 -2
  120. package/docs/API-reference/api/x-components.searchinput.md +6 -6
  121. package/docs/API-reference/api/x-components.searchinputplaceholder.md +6 -6
  122. package/docs/API-reference/api/x-components.selectedfilters.md +5 -5
  123. package/docs/API-reference/api/x-components.selectedfilterslist.md +7 -5
  124. package/docs/API-reference/api/x-components.semanticqueries.md +4 -1
  125. package/docs/API-reference/api/x-components.semanticquery.md +6 -4
  126. package/docs/API-reference/api/x-components.simplefilter.md +7 -5
  127. package/docs/API-reference/api/x-components.singlecolumnlayout.md +10 -5
  128. package/docs/API-reference/api/x-components.slicedfilters.md +6 -6
  129. package/docs/API-reference/api/x-components.slidingpanel.md +8 -8
  130. package/docs/API-reference/api/x-components.snippetcallbacks.md +3 -1
  131. package/docs/API-reference/api/x-components.snippetconfigextraparams.md +8 -6
  132. package/docs/API-reference/api/x-components.sortdropdown.md +8 -6
  133. package/docs/API-reference/api/x-components.sortedfilters.md +4 -4
  134. package/docs/API-reference/api/x-components.sortlist.md +7 -5
  135. package/docs/API-reference/api/x-components.sortpickerlist.md +7 -5
  136. package/docs/API-reference/api/x-components.spellcheck.md +1 -1
  137. package/docs/API-reference/api/x-components.spellcheckbutton.md +2 -2
  138. package/docs/API-reference/api/x-components.staggeredfadeandslide.md +5 -5
  139. package/docs/API-reference/api/x-components.tagging.md +4 -4
  140. package/docs/API-reference/api/x-components.typinghtmlelement.__timeoutid.md +11 -0
  141. package/docs/API-reference/api/x-components.typinghtmlelement.md +19 -0
  142. package/docs/API-reference/api/x-components.urlhandler.md +5 -1
  143. package/js/components/animations/animate-scale/animate-scale.style.scss.js +1 -1
  144. package/js/components/animations/animate-width.vue.js.map +1 -1
  145. package/js/components/animations/collapse-height.vue.js.map +1 -1
  146. package/js/components/animations/collapse-width.vue.js.map +1 -1
  147. package/js/components/animations/cross-fade.vue.js.map +1 -1
  148. package/js/components/animations/fade-and-slide.vue.js.map +1 -1
  149. package/js/components/animations/fade.vue.js.map +1 -1
  150. package/js/components/animations/staggered-fade-and-slide.vue.js.map +1 -1
  151. package/js/components/auto-progress-bar.vue.js.map +1 -1
  152. package/js/components/base-dropdown.vue.js.map +1 -1
  153. package/js/components/base-grid.vue.js.map +1 -1
  154. package/js/components/base-keyboard-navigation.vue.js.map +1 -1
  155. package/js/components/base-rating.vue.js.map +1 -1
  156. package/js/components/base-rating.vue3.js +1 -1
  157. package/js/components/base-slider.vue.js +16 -18
  158. package/js/components/base-slider.vue.js.map +1 -1
  159. package/js/components/base-switch.vue.js +10 -13
  160. package/js/components/base-switch.vue.js.map +1 -1
  161. package/js/components/base-teleport.vue.js.map +1 -1
  162. package/js/components/base-variable-column-grid.vue.js.map +1 -1
  163. package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
  164. package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
  165. package/js/components/currency/base-currency.vue.js.map +1 -1
  166. package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
  167. package/js/components/highlight.vue.js.map +1 -1
  168. package/js/components/icons/ai-star.vue.js +19 -22
  169. package/js/components/icons/ai-star.vue.js.map +1 -1
  170. package/js/components/icons/arrow-down.vue.js +16 -19
  171. package/js/components/icons/arrow-down.vue.js.map +1 -1
  172. package/js/components/icons/arrow-left.vue.js +16 -19
  173. package/js/components/icons/arrow-left.vue.js.map +1 -1
  174. package/js/components/icons/arrow-right.vue.js +16 -19
  175. package/js/components/icons/arrow-right.vue.js.map +1 -1
  176. package/js/components/icons/arrow-up.vue.js +16 -19
  177. package/js/components/icons/arrow-up.vue.js.map +1 -1
  178. package/js/components/icons/bag.vue.js +16 -19
  179. package/js/components/icons/bag.vue.js.map +1 -1
  180. package/js/components/icons/bar-code.vue.js +8 -10
  181. package/js/components/icons/bar-code.vue.js.map +1 -1
  182. package/js/components/icons/barcode-tiny.vue.js +8 -10
  183. package/js/components/icons/barcode-tiny.vue.js.map +1 -1
  184. package/js/components/icons/cart-filled.vue.js +21 -25
  185. package/js/components/icons/cart-filled.vue.js.map +1 -1
  186. package/js/components/icons/cart.vue.js +16 -19
  187. package/js/components/icons/cart.vue.js.map +1 -1
  188. package/js/components/icons/check-tiny.vue.js +9 -11
  189. package/js/components/icons/check-tiny.vue.js.map +1 -1
  190. package/js/components/icons/check.vue.js +9 -11
  191. package/js/components/icons/check.vue.js.map +1 -1
  192. package/js/components/icons/checkbox-selected-filled.vue.js +20 -23
  193. package/js/components/icons/checkbox-selected-filled.vue.js.map +1 -1
  194. package/js/components/icons/checkbox-selected.vue.js +19 -22
  195. package/js/components/icons/checkbox-selected.vue.js.map +1 -1
  196. package/js/components/icons/checkbox-unselected-filled.vue.js +13 -15
  197. package/js/components/icons/checkbox-unselected-filled.vue.js.map +1 -1
  198. package/js/components/icons/checkbox-unselected.vue.js +12 -14
  199. package/js/components/icons/checkbox-unselected.vue.js.map +1 -1
  200. package/js/components/icons/chevron-down.vue.js +9 -11
  201. package/js/components/icons/chevron-down.vue.js.map +1 -1
  202. package/js/components/icons/chevron-left.vue.js +9 -11
  203. package/js/components/icons/chevron-left.vue.js.map +1 -1
  204. package/js/components/icons/chevron-right.vue.js +9 -11
  205. package/js/components/icons/chevron-right.vue.js.map +1 -1
  206. package/js/components/icons/chevron-tiny-down.vue.js +9 -11
  207. package/js/components/icons/chevron-tiny-down.vue.js.map +1 -1
  208. package/js/components/icons/chevron-tiny-left.vue.js +9 -11
  209. package/js/components/icons/chevron-tiny-left.vue.js.map +1 -1
  210. package/js/components/icons/chevron-tiny-right.vue.js +9 -11
  211. package/js/components/icons/chevron-tiny-right.vue.js.map +1 -1
  212. package/js/components/icons/chevron-tiny-up.vue.js +9 -11
  213. package/js/components/icons/chevron-tiny-up.vue.js.map +1 -1
  214. package/js/components/icons/chevron-up.vue.js +9 -11
  215. package/js/components/icons/chevron-up.vue.js.map +1 -1
  216. package/js/components/icons/corner-arrow-left.vue.js +9 -11
  217. package/js/components/icons/corner-arrow-left.vue.js.map +1 -1
  218. package/js/components/icons/corner-arrow-right.vue.js +9 -11
  219. package/js/components/icons/corner-arrow-right.vue.js.map +1 -1
  220. package/js/components/icons/cross-tiny.vue.js +9 -11
  221. package/js/components/icons/cross-tiny.vue.js.map +1 -1
  222. package/js/components/icons/cross.vue.js +9 -11
  223. package/js/components/icons/cross.vue.js.map +1 -1
  224. package/js/components/icons/curated-check-filled.vue.js +19 -22
  225. package/js/components/icons/curated-check-filled.vue.js.map +1 -1
  226. package/js/components/icons/curated-check-tiny-filled.vue.js +19 -22
  227. package/js/components/icons/curated-check-tiny-filled.vue.js.map +1 -1
  228. package/js/components/icons/curated-check-tiny.vue.js +18 -21
  229. package/js/components/icons/curated-check-tiny.vue.js.map +1 -1
  230. package/js/components/icons/curated-check.vue.js +18 -21
  231. package/js/components/icons/curated-check.vue.js.map +1 -1
  232. package/js/components/icons/diagonal-arrow-left-down.vue.js +9 -11
  233. package/js/components/icons/diagonal-arrow-left-down.vue.js.map +1 -1
  234. package/js/components/icons/diagonal-arrow-left-top.vue.js +9 -11
  235. package/js/components/icons/diagonal-arrow-left-top.vue.js.map +1 -1
  236. package/js/components/icons/diagonal-arrow-right-down.vue.js +9 -11
  237. package/js/components/icons/diagonal-arrow-right-down.vue.js.map +1 -1
  238. package/js/components/icons/diagonal-arrow-right-top.vue.js +9 -11
  239. package/js/components/icons/diagonal-arrow-right-top.vue.js.map +1 -1
  240. package/js/components/icons/filters.vue.js +8 -10
  241. package/js/components/icons/filters.vue.js.map +1 -1
  242. package/js/components/icons/grid-1-col.vue.js +8 -10
  243. package/js/components/icons/grid-1-col.vue.js.map +1 -1
  244. package/js/components/icons/grid-2-col.vue.js +8 -10
  245. package/js/components/icons/grid-2-col.vue.js.map +1 -1
  246. package/js/components/icons/grid-2-rows.vue.js +19 -22
  247. package/js/components/icons/grid-2-rows.vue.js.map +1 -1
  248. package/js/components/icons/grid-4-col.vue.js +8 -10
  249. package/js/components/icons/grid-4-col.vue.js.map +1 -1
  250. package/js/components/icons/heart-filled.vue.js +10 -12
  251. package/js/components/icons/heart-filled.vue.js.map +1 -1
  252. package/js/components/icons/heart.vue.js +9 -11
  253. package/js/components/icons/heart.vue.js.map +1 -1
  254. package/js/components/icons/hide.vue.js +9 -11
  255. package/js/components/icons/hide.vue.js.map +1 -1
  256. package/js/components/icons/history-tiny.vue.js +16 -19
  257. package/js/components/icons/history-tiny.vue.js.map +1 -1
  258. package/js/components/icons/history.vue.js +16 -19
  259. package/js/components/icons/history.vue.js.map +1 -1
  260. package/js/components/icons/light-bulb-off.vue.js +14 -17
  261. package/js/components/icons/light-bulb-off.vue.js.map +1 -1
  262. package/js/components/icons/light-bulb-on.vue.js +20 -24
  263. package/js/components/icons/light-bulb-on.vue.js.map +1 -1
  264. package/js/components/icons/menu.vue.js +9 -11
  265. package/js/components/icons/menu.vue.js.map +1 -1
  266. package/js/components/icons/minus-tiny.vue.js +9 -11
  267. package/js/components/icons/minus-tiny.vue.js.map +1 -1
  268. package/js/components/icons/minus.vue.js +9 -11
  269. package/js/components/icons/minus.vue.js.map +1 -1
  270. package/js/components/icons/plus-tiny.vue.js +9 -11
  271. package/js/components/icons/plus-tiny.vue.js.map +1 -1
  272. package/js/components/icons/plus.vue.js +9 -11
  273. package/js/components/icons/plus.vue.js.map +1 -1
  274. package/js/components/icons/radiobutton-selected.vue.js +3 -5
  275. package/js/components/icons/radiobutton-selected.vue.js.map +1 -1
  276. package/js/components/icons/radiobutton-unselected.vue.js +20 -23
  277. package/js/components/icons/radiobutton-unselected.vue.js.map +1 -1
  278. package/js/components/icons/search-tiny.vue.js +9 -11
  279. package/js/components/icons/search-tiny.vue.js.map +1 -1
  280. package/js/components/icons/search.vue.js +9 -11
  281. package/js/components/icons/search.vue.js.map +1 -1
  282. package/js/components/icons/settings.vue.js +3 -5
  283. package/js/components/icons/settings.vue.js.map +1 -1
  284. package/js/components/icons/show.vue.js +18 -21
  285. package/js/components/icons/show.vue.js.map +1 -1
  286. package/js/components/icons/sort-az.vue.js +31 -36
  287. package/js/components/icons/sort-az.vue.js.map +1 -1
  288. package/js/components/icons/sort-price-down.vue.js +3 -5
  289. package/js/components/icons/sort-price-down.vue.js.map +1 -1
  290. package/js/components/icons/sort-price-up.vue.js +3 -5
  291. package/js/components/icons/sort-price-up.vue.js.map +1 -1
  292. package/js/components/icons/sort-relevancy.vue.js +23 -27
  293. package/js/components/icons/sort-relevancy.vue.js.map +1 -1
  294. package/js/components/icons/sort-za.vue.js +31 -36
  295. package/js/components/icons/sort-za.vue.js.map +1 -1
  296. package/js/components/icons/spinner.vue.js +3 -5
  297. package/js/components/icons/spinner.vue.js.map +1 -1
  298. package/js/components/icons/star-filled.vue.js +23 -26
  299. package/js/components/icons/star-filled.vue.js.map +1 -1
  300. package/js/components/icons/star.vue.js +11 -13
  301. package/js/components/icons/star.vue.js.map +1 -1
  302. package/js/components/icons/tag-filled.vue.js +17 -20
  303. package/js/components/icons/tag-filled.vue.js.map +1 -1
  304. package/js/components/icons/tag.vue.js +16 -19
  305. package/js/components/icons/tag.vue.js.map +1 -1
  306. package/js/components/icons/trash-open.vue.js +3 -5
  307. package/js/components/icons/trash-open.vue.js.map +1 -1
  308. package/js/components/icons/trash.vue.js +3 -5
  309. package/js/components/icons/trash.vue.js.map +1 -1
  310. package/js/components/icons/trending-tiny.vue.js +16 -19
  311. package/js/components/icons/trending-tiny.vue.js.map +1 -1
  312. package/js/components/icons/trending.vue.js +16 -19
  313. package/js/components/icons/trending.vue.js.map +1 -1
  314. package/js/components/icons/user-filled.vue.js +13 -16
  315. package/js/components/icons/user-filled.vue.js.map +1 -1
  316. package/js/components/icons/user.vue.js +9 -11
  317. package/js/components/icons/user.vue.js.map +1 -1
  318. package/js/components/items-list.vue.js.map +1 -1
  319. package/js/components/layouts/fixed-header-and-asides-layout.vue.js.map +1 -1
  320. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  321. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  322. package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
  323. package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
  324. package/js/components/modals/base-events-modal.vue.js.map +1 -1
  325. package/js/components/modals/base-id-modal.vue.js.map +1 -1
  326. package/js/components/modals/base-modal.vue.js.map +1 -1
  327. package/js/components/modals/close-main-modal.vue.js.map +1 -1
  328. package/js/components/modals/main-modal.vue.js.map +1 -1
  329. package/js/components/modals/open-main-modal.vue.js.map +1 -1
  330. package/js/components/page-loader-button.vue.js +5 -1
  331. package/js/components/page-loader-button.vue.js.map +1 -1
  332. package/js/components/page-selector.vue.js +10 -2
  333. package/js/components/page-selector.vue.js.map +1 -1
  334. package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
  335. package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
  336. package/js/components/panels/base-id-toggle-panel.vue.js.map +1 -1
  337. package/js/components/panels/base-tabs-panel.vue.js.map +1 -1
  338. package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
  339. package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
  340. package/js/components/result/base-result-current-price.vue.js.map +1 -1
  341. package/js/components/result/base-result-fallback-image.vue.js +15 -18
  342. package/js/components/result/base-result-fallback-image.vue.js.map +1 -1
  343. package/js/components/result/base-result-image.vue.js.map +1 -1
  344. package/js/components/result/base-result-link.vue.js.map +1 -1
  345. package/js/components/result/base-result-placeholder-image.vue.js +14 -17
  346. package/js/components/result/base-result-placeholder-image.vue.js.map +1 -1
  347. package/js/components/result/base-result-previous-price.vue.js.map +1 -1
  348. package/js/components/result/base-result-rating.vue.js.map +1 -1
  349. package/js/components/result/result-variant-selector.vue.js.map +1 -1
  350. package/js/components/sliding-panel.vue.js +10 -2
  351. package/js/components/sliding-panel.vue.js.map +1 -1
  352. package/js/components/sliding-panel.vue3.js +1 -1
  353. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  354. package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
  355. package/js/composables/use-on-display.js +1 -1
  356. package/js/composables/use-on-display.js.map +1 -1
  357. package/js/directives/infinite-scroll.js +1 -1
  358. package/js/directives/infinite-scroll.js.map +1 -1
  359. package/js/directives/typing.js.map +1 -1
  360. package/js/x-modules/ai/components/ai-overview.vue.js +25 -26
  361. package/js/x-modules/ai/components/ai-overview.vue.js.map +1 -1
  362. package/js/x-modules/device/components/device-detector.vue.js.map +1 -1
  363. package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
  364. package/js/x-modules/facets/components/clear-filters.vue.js.map +1 -1
  365. package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
  366. package/js/x-modules/facets/components/filters/all-filter.vue.js +5 -1
  367. package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
  368. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +10 -2
  369. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
  370. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +3 -3
  371. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
  372. package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
  373. package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
  374. package/js/x-modules/facets/components/lists/filters-list.vue.js.map +1 -1
  375. package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
  376. package/js/x-modules/facets/components/lists/filters-search.vue3.js +1 -1
  377. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
  378. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +20 -4
  379. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  380. package/js/x-modules/history-queries/components/clear-history-queries.vue.js +5 -1
  381. package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
  382. package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
  383. package/js/x-modules/history-queries/components/history-query.vue.js +5 -1
  384. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  385. package/js/x-modules/history-queries/components/my-history.vue.js +3 -3
  386. package/js/x-modules/history-queries/components/my-history.vue.js.map +1 -1
  387. package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
  388. package/js/x-modules/identifier-results/components/identifier-result.vue.js.map +1 -1
  389. package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
  390. package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
  391. package/js/x-modules/next-queries/components/next-query-preview.vue.js.map +1 -1
  392. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  393. package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
  394. package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
  395. package/js/x-modules/queries-preview/components/query-preview-button.vue.js.map +1 -1
  396. package/js/x-modules/queries-preview/components/query-preview-list.vue.js.map +1 -1
  397. package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
  398. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
  399. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
  400. package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
  401. package/js/x-modules/related-prompts/components/related-prompt.vue.js.map +1 -1
  402. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js.map +1 -1
  403. package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
  404. package/js/x-modules/related-tags/components/related-tags.vue.js +3 -3
  405. package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
  406. package/js/x-modules/scroll/components/main-scroll-item.vue.js.map +1 -1
  407. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
  408. package/js/x-modules/scroll/components/scroll.vue.js.map +1 -1
  409. package/js/x-modules/search/components/banner.vue.js.map +1 -1
  410. package/js/x-modules/search/components/fallback-disclaimer.vue.js.map +1 -1
  411. package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
  412. package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
  413. package/js/x-modules/search/components/promoted.vue.js.map +1 -1
  414. package/js/x-modules/search/components/redirection.vue.js.map +1 -1
  415. package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
  416. package/js/x-modules/search/components/sort-list.vue.js.map +1 -1
  417. package/js/x-modules/search/components/sort-picker-list.vue.js.map +1 -1
  418. package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
  419. package/js/x-modules/search/components/spellcheck.vue.js.map +1 -1
  420. package/js/x-modules/search-box/components/clear-search-input.vue.js +5 -1
  421. package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
  422. package/js/x-modules/search-box/components/search-button.vue.js +7 -8
  423. package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
  424. package/js/x-modules/search-box/components/search-input-placeholder.vue.js.map +1 -1
  425. package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
  426. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js +3 -3
  427. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js.map +1 -1
  428. package/js/x-modules/semantic-queries/components/semantic-query.vue.js.map +1 -1
  429. package/package.json +11 -11
  430. package/report/x-components.api.json +6216 -1603
  431. package/report/x-components.api.md +819 -647
  432. package/types/components/animations/animate-width.vue.d.ts +1 -1
  433. package/types/components/animations/change-height.vue.d.ts +2 -2
  434. package/types/components/animations/collapse-height.vue.d.ts +5 -5
  435. package/types/components/animations/collapse-width.vue.d.ts +5 -5
  436. package/types/components/animations/cross-fade.vue.d.ts +4 -4
  437. package/types/components/animations/fade-and-slide.vue.d.ts +5 -5
  438. package/types/components/animations/fade.vue.d.ts +4 -4
  439. package/types/components/animations/no-animation.vue.d.ts +2 -2
  440. package/types/components/animations/staggered-fade-and-slide.vue.d.ts +5 -5
  441. package/types/components/animations/staggered-fade-and-slide.vue.d.ts.map +1 -1
  442. package/types/components/auto-progress-bar.vue.d.ts +5 -5
  443. package/types/components/base-dropdown.vue.d.ts +12 -12
  444. package/types/components/base-event-button.vue.d.ts +5 -5
  445. package/types/components/base-grid.vue.d.ts +9 -7
  446. package/types/components/base-grid.vue.d.ts.map +1 -1
  447. package/types/components/base-keyboard-navigation.vue.d.ts +6 -6
  448. package/types/components/base-rating.vue.d.ts +7 -5
  449. package/types/components/base-rating.vue.d.ts.map +1 -1
  450. package/types/components/base-slider.vue.d.ts +7 -7
  451. package/types/components/base-switch.vue.d.ts +6 -6
  452. package/types/components/base-teleport.vue.d.ts +6 -6
  453. package/types/components/base-variable-column-grid.vue.d.ts +7 -5
  454. package/types/components/base-variable-column-grid.vue.d.ts.map +1 -1
  455. package/types/components/column-picker/base-column-picker-dropdown.vue.d.ts +8 -6
  456. package/types/components/column-picker/base-column-picker-dropdown.vue.d.ts.map +1 -1
  457. package/types/components/column-picker/base-column-picker-list.vue.d.ts +7 -5
  458. package/types/components/column-picker/base-column-picker-list.vue.d.ts.map +1 -1
  459. package/types/components/currency/base-currency.vue.d.ts +4 -4
  460. package/types/components/display-click-provider.vue.d.ts +5 -5
  461. package/types/components/display-emitter.vue.d.ts +4 -4
  462. package/types/components/filters/labels/base-price-filter-label.vue.d.ts +6 -4
  463. package/types/components/filters/labels/base-price-filter-label.vue.d.ts.map +1 -1
  464. package/types/components/filters/labels/base-rating-filter-label.vue.d.ts +7 -5
  465. package/types/components/filters/labels/base-rating-filter-label.vue.d.ts.map +1 -1
  466. package/types/components/global-x-bus.vue.d.ts +3 -3
  467. package/types/components/highlight.vue.d.ts +5 -5
  468. package/types/components/items-list.vue.d.ts +5 -5
  469. package/types/components/layouts/fixed-header-and-asides-layout.vue.d.ts +9 -5
  470. package/types/components/layouts/fixed-header-and-asides-layout.vue.d.ts.map +1 -1
  471. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts +9 -5
  472. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts.map +1 -1
  473. package/types/components/layouts/single-column-layout.vue.d.ts +10 -5
  474. package/types/components/layouts/single-column-layout.vue.d.ts.map +1 -1
  475. package/types/components/location-provider.vue.d.ts +4 -4
  476. package/types/components/modals/base-events-modal-close.vue.d.ts +7 -5
  477. package/types/components/modals/base-events-modal-close.vue.d.ts.map +1 -1
  478. package/types/components/modals/base-events-modal-open.vue.d.ts +7 -5
  479. package/types/components/modals/base-events-modal-open.vue.d.ts.map +1 -1
  480. package/types/components/modals/base-events-modal.vue.d.ts +10 -8
  481. package/types/components/modals/base-events-modal.vue.d.ts.map +1 -1
  482. package/types/components/modals/base-id-modal-close.vue.d.ts +4 -4
  483. package/types/components/modals/base-id-modal-open.vue.d.ts +4 -4
  484. package/types/components/modals/base-id-modal.vue.d.ts +8 -6
  485. package/types/components/modals/base-id-modal.vue.d.ts.map +1 -1
  486. package/types/components/modals/base-modal.vue.d.ts +9 -9
  487. package/types/components/modals/close-main-modal.vue.d.ts +3 -1
  488. package/types/components/modals/close-main-modal.vue.d.ts.map +1 -1
  489. package/types/components/modals/main-modal.vue.d.ts +6 -4
  490. package/types/components/modals/main-modal.vue.d.ts.map +1 -1
  491. package/types/components/modals/open-main-modal.vue.d.ts +3 -1
  492. package/types/components/modals/open-main-modal.vue.d.ts.map +1 -1
  493. package/types/components/page-loader-button.vue.d.ts +7 -5
  494. package/types/components/page-loader-button.vue.d.ts.map +1 -1
  495. package/types/components/page-selector.vue.d.ts +5 -5
  496. package/types/components/panels/base-header-toggle-panel.vue.d.ts +9 -7
  497. package/types/components/panels/base-header-toggle-panel.vue.d.ts.map +1 -1
  498. package/types/components/panels/base-id-toggle-panel-button.vue.d.ts +7 -5
  499. package/types/components/panels/base-id-toggle-panel-button.vue.d.ts.map +1 -1
  500. package/types/components/panels/base-id-toggle-panel.vue.d.ts +8 -6
  501. package/types/components/panels/base-id-toggle-panel.vue.d.ts.map +1 -1
  502. package/types/components/panels/base-tabs-panel.vue.d.ts +6 -6
  503. package/types/components/panels/base-toggle-panel.vue.d.ts +4 -4
  504. package/types/components/result/base-result-add-to-cart.vue.d.ts +6 -4
  505. package/types/components/result/base-result-add-to-cart.vue.d.ts.map +1 -1
  506. package/types/components/result/base-result-current-price.vue.d.ts +6 -4
  507. package/types/components/result/base-result-current-price.vue.d.ts.map +1 -1
  508. package/types/components/result/base-result-image.vue.d.ts +9 -9
  509. package/types/components/result/base-result-link.vue.d.ts +5 -5
  510. package/types/components/result/base-result-previous-price.vue.d.ts +5 -3
  511. package/types/components/result/base-result-previous-price.vue.d.ts.map +1 -1
  512. package/types/components/result/base-result-rating.vue.d.ts +7 -5
  513. package/types/components/result/base-result-rating.vue.d.ts.map +1 -1
  514. package/types/components/result/result-variant-selector.vue.d.ts +6 -6
  515. package/types/components/result/result-variants-provider.vue.d.ts +5 -5
  516. package/types/components/scroll/base-scroll.vue.d.ts +7 -7
  517. package/types/components/sliding-panel.vue.d.ts +8 -8
  518. package/types/components/snippet-callbacks.vue.d.ts +3 -1
  519. package/types/components/snippet-callbacks.vue.d.ts.map +1 -1
  520. package/types/components/suggestions/base-suggestion.vue.d.ts +8 -6
  521. package/types/components/suggestions/base-suggestion.vue.d.ts.map +1 -1
  522. package/types/components/suggestions/base-suggestions.vue.d.ts +5 -5
  523. package/types/directives/infinite-scroll.d.ts.map +1 -1
  524. package/types/directives/typing.d.ts +1 -2
  525. package/types/directives/typing.d.ts.map +1 -1
  526. package/types/x-modules/ai/components/ai-overview.vue.d.ts +22 -8
  527. package/types/x-modules/ai/components/ai-overview.vue.d.ts.map +1 -1
  528. package/types/x-modules/device/components/device-detector.vue.d.ts +9 -5
  529. package/types/x-modules/device/components/device-detector.vue.d.ts.map +1 -1
  530. package/types/x-modules/empathize/components/empathize.vue.d.ts +6 -6
  531. package/types/x-modules/experience-controls/components/experience-controls.vue.d.ts +1 -1
  532. package/types/x-modules/extra-params/components/extra-params.vue.d.ts +3 -3
  533. package/types/x-modules/extra-params/components/renderless-extra-param.vue.d.ts +4 -4
  534. package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts +8 -6
  535. package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts.map +1 -1
  536. package/types/x-modules/facets/components/clear-filters.vue.d.ts +7 -5
  537. package/types/x-modules/facets/components/clear-filters.vue.d.ts.map +1 -1
  538. package/types/x-modules/facets/components/facets/facets-provider.vue.d.ts +4 -4
  539. package/types/x-modules/facets/components/facets/facets.vue.d.ts +5 -5
  540. package/types/x-modules/facets/components/filters/all-filter.vue.d.ts +6 -4
  541. package/types/x-modules/facets/components/filters/all-filter.vue.d.ts.map +1 -1
  542. package/types/x-modules/facets/components/filters/editable-number-range-filter.vue.d.ts +7 -7
  543. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +8 -5
  544. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  545. package/types/x-modules/facets/components/filters/number-range-filter.vue.d.ts +7 -5
  546. package/types/x-modules/facets/components/filters/number-range-filter.vue.d.ts.map +1 -1
  547. package/types/x-modules/facets/components/filters/renderless-filter.vue.d.ts +5 -5
  548. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts +7 -5
  549. package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
  550. package/types/x-modules/facets/components/lists/exclude-filters-with-no-results.vue.d.ts +4 -4
  551. package/types/x-modules/facets/components/lists/filters-list.vue.d.ts +5 -5
  552. package/types/x-modules/facets/components/lists/filters-search.vue.d.ts +6 -6
  553. package/types/x-modules/facets/components/lists/selected-filters-list.vue.d.ts +7 -5
  554. package/types/x-modules/facets/components/lists/selected-filters-list.vue.d.ts.map +1 -1
  555. package/types/x-modules/facets/components/lists/selected-filters.vue.d.ts +5 -5
  556. package/types/x-modules/facets/components/lists/sliced-filters.vue.d.ts +6 -6
  557. package/types/x-modules/facets/components/lists/sorted-filters.vue.d.ts +4 -4
  558. package/types/x-modules/facets/components/preselected-filters.vue.d.ts +5 -5
  559. package/types/x-modules/history-queries/components/clear-history-queries.vue.d.ts +3 -1
  560. package/types/x-modules/history-queries/components/clear-history-queries.vue.d.ts.map +1 -1
  561. package/types/x-modules/history-queries/components/history-queries-switch.vue.d.ts +3 -1
  562. package/types/x-modules/history-queries/components/history-queries-switch.vue.d.ts.map +1 -1
  563. package/types/x-modules/history-queries/components/history-queries.vue.d.ts +4 -1
  564. package/types/x-modules/history-queries/components/history-queries.vue.d.ts.map +1 -1
  565. package/types/x-modules/history-queries/components/history-query.vue.d.ts +8 -5
  566. package/types/x-modules/history-queries/components/history-query.vue.d.ts.map +1 -1
  567. package/types/x-modules/history-queries/components/my-history.vue.d.ts +8 -5
  568. package/types/x-modules/history-queries/components/my-history.vue.d.ts.map +1 -1
  569. package/types/x-modules/history-queries/components/remove-history-query.vue.d.ts +6 -4
  570. package/types/x-modules/history-queries/components/remove-history-query.vue.d.ts.map +1 -1
  571. package/types/x-modules/identifier-results/components/identifier-result.vue.d.ts +4 -4
  572. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +5 -5
  573. package/types/x-modules/next-queries/components/next-queries-list.vue.d.ts +5 -5
  574. package/types/x-modules/next-queries/components/next-queries.vue.d.ts +8 -5
  575. package/types/x-modules/next-queries/components/next-queries.vue.d.ts.map +1 -1
  576. package/types/x-modules/next-queries/components/next-query-preview.vue.d.ts +4 -4
  577. package/types/x-modules/next-queries/components/next-query.vue.d.ts +7 -5
  578. package/types/x-modules/next-queries/components/next-query.vue.d.ts.map +1 -1
  579. package/types/x-modules/popular-searches/components/popular-search.vue.d.ts +6 -4
  580. package/types/x-modules/popular-searches/components/popular-search.vue.d.ts.map +1 -1
  581. package/types/x-modules/popular-searches/components/popular-searches.vue.d.ts +4 -1
  582. package/types/x-modules/popular-searches/components/popular-searches.vue.d.ts.map +1 -1
  583. package/types/x-modules/queries-preview/components/query-preview-button.vue.d.ts +6 -4
  584. package/types/x-modules/queries-preview/components/query-preview-button.vue.d.ts.map +1 -1
  585. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts +8 -6
  586. package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts.map +1 -1
  587. package/types/x-modules/queries-preview/components/query-preview.vue.d.ts +6 -6
  588. package/types/x-modules/query-suggestions/components/query-suggestion.vue.d.ts +6 -4
  589. package/types/x-modules/query-suggestions/components/query-suggestion.vue.d.ts.map +1 -1
  590. package/types/x-modules/query-suggestions/components/query-suggestions.vue.d.ts +4 -1
  591. package/types/x-modules/query-suggestions/components/query-suggestions.vue.d.ts.map +1 -1
  592. package/types/x-modules/recommendations/components/recommendations.vue.d.ts +5 -5
  593. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts +9 -4
  594. package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts.map +1 -1
  595. package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts +5 -5
  596. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts +11 -7
  597. package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -1
  598. package/types/x-modules/related-tags/components/related-tag.vue.d.ts +6 -6
  599. package/types/x-modules/related-tags/components/related-tags.vue.d.ts +7 -5
  600. package/types/x-modules/related-tags/components/related-tags.vue.d.ts.map +1 -1
  601. package/types/x-modules/scroll/components/main-scroll-item.vue.d.ts +6 -6
  602. package/types/x-modules/scroll/components/main-scroll.vue.d.ts +5 -5
  603. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +7 -5
  604. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts.map +1 -1
  605. package/types/x-modules/scroll/components/scroll.vue.d.ts +8 -6
  606. package/types/x-modules/scroll/components/scroll.vue.d.ts.map +1 -1
  607. package/types/x-modules/search/components/banner.vue.d.ts +5 -5
  608. package/types/x-modules/search/components/banners-list.vue.d.ts +5 -5
  609. package/types/x-modules/search/components/fallback-disclaimer.vue.d.ts +1 -1
  610. package/types/x-modules/search/components/partial-query-button.vue.d.ts +5 -5
  611. package/types/x-modules/search/components/partial-results-list.vue.d.ts +5 -5
  612. package/types/x-modules/search/components/promoted.vue.d.ts +4 -4
  613. package/types/x-modules/search/components/promoteds-list.vue.d.ts +5 -5
  614. package/types/x-modules/search/components/redirection.vue.d.ts +6 -6
  615. package/types/x-modules/search/components/results-list.vue.d.ts +6 -6
  616. package/types/x-modules/search/components/sort-dropdown.vue.d.ts +8 -6
  617. package/types/x-modules/search/components/sort-dropdown.vue.d.ts.map +1 -1
  618. package/types/x-modules/search/components/sort-list.vue.d.ts +7 -5
  619. package/types/x-modules/search/components/sort-list.vue.d.ts.map +1 -1
  620. package/types/x-modules/search/components/sort-picker-list.vue.d.ts +7 -5
  621. package/types/x-modules/search/components/sort-picker-list.vue.d.ts.map +1 -1
  622. package/types/x-modules/search/components/spellcheck-button.vue.d.ts +2 -2
  623. package/types/x-modules/search/components/spellcheck.vue.d.ts +1 -1
  624. package/types/x-modules/search-box/components/clear-search-input.vue.d.ts +7 -1
  625. package/types/x-modules/search-box/components/clear-search-input.vue.d.ts.map +1 -1
  626. package/types/x-modules/search-box/components/search-button.vue.d.ts +2 -2
  627. package/types/x-modules/search-box/components/search-input-placeholder.vue.d.ts +6 -6
  628. package/types/x-modules/search-box/components/search-input.vue.d.ts +6 -6
  629. package/types/x-modules/semantic-queries/components/semantic-queries.vue.d.ts +4 -1
  630. package/types/x-modules/semantic-queries/components/semantic-queries.vue.d.ts.map +1 -1
  631. package/types/x-modules/semantic-queries/components/semantic-query.vue.d.ts +6 -4
  632. package/types/x-modules/semantic-queries/components/semantic-query.vue.d.ts.map +1 -1
  633. package/types/x-modules/tagging/components/tagging.vue.d.ts +4 -4
  634. package/types/x-modules/url/components/url-handler.vue.d.ts +5 -1
  635. package/types/x-modules/url/components/url-handler.vue.d.ts.map +1 -1
@@ -27,7 +27,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
27
27
  },
28
28
  [
29
29
  renderSlot(_ctx.$slots, "show-more", { difference: _ctx.difference }, () => [
30
- createTextVNode(" Show "),
30
+ _cache[2] || (_cache[2] = createTextVNode(
31
+ " Show ",
32
+ -1
33
+ /* CACHED */
34
+ )),
31
35
  createElementVNode(
32
36
  "span",
33
37
  _hoisted_1,
@@ -35,7 +39,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
35
39
  1
36
40
  /* TEXT */
37
41
  ),
38
- createTextVNode(" more filters ")
42
+ _cache[3] || (_cache[3] = createTextVNode(
43
+ " more filters ",
44
+ -1
45
+ /* CACHED */
46
+ ))
39
47
  ])
40
48
  ],
41
49
  2
@@ -50,7 +58,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
50
58
  },
51
59
  [
52
60
  renderSlot(_ctx.$slots, "show-less", { difference: _ctx.difference }, () => [
53
- createTextVNode(" Show "),
61
+ _cache[4] || (_cache[4] = createTextVNode(
62
+ " Show ",
63
+ -1
64
+ /* CACHED */
65
+ )),
54
66
  createElementVNode(
55
67
  "span",
56
68
  _hoisted_2,
@@ -58,7 +70,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
58
70
  1
59
71
  /* TEXT */
60
72
  ),
61
- createTextVNode(" less filters ")
73
+ _cache[5] || (_cache[5] = createTextVNode(
74
+ " less filters ",
75
+ -1
76
+ /* CACHED */
77
+ ))
62
78
  ])
63
79
  ],
64
80
  2
@@ -1 +1 @@
1
- {"version":3,"file":"sliced-filters.vue.js","sources":["../../../../../../src/x-modules/facets/components/lists/sliced-filters.vue"],"sourcesContent":["<template>\n <div class=\"x-sliced-filters\" :class=\"cssClasses\" data-test=\"filters-show-more\">\n <!--\n @slot (Required) Sliced filters content.\n @binding {Filter[]} slicedFilters - Sliced filters..\n -->\n <slot :sliced-filters=\"slicedFilters\" />\n <template v-if=\"showButton\">\n <button\n v-if=\"showMoreFilters\"\n class=\"x-facet-filter x-sliced-filters__button x-sliced-filters__button--show-more\"\n :class=\"buttonClass\"\n data-test=\"sliced-filters-show-more-button\"\n @click=\"toggleShowMoreFilters\"\n >\n <!--\n @slot Button show more filters.\n @binding {number} difference - The difference between the filters and max to show.\n -->\n <slot name=\"show-more\" :difference=\"difference\">\n Show\n <span data-test=\"show-more-amount\">{{ difference }}</span>\n more filters\n </slot>\n </button>\n <button\n v-else\n class=\"x-facet-filter x-sliced-filters__button x-sliced-filters__button--show-less\"\n :class=\"buttonClass\"\n data-test=\"sliced-filters-show-less-button\"\n @click=\"toggleShowMoreFilters\"\n >\n <!--\n @slot Button show less filters.\n @binding {number} difference - The difference between the filters and max to show.\n -->\n <slot name=\"show-less\" :difference=\"difference\">\n Show\n <span data-test=\"show-less-amount\">{{ difference }}</span>\n less filters\n </slot>\n </button>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Filter } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { VueCSSClasses } from '../../../../utils'\nimport { computed, defineComponent, provide, ref } from 'vue'\nimport { useFiltersInjection } from '../../composables/use-filters-injection'\nimport { facetsXModule } from '../../x-module'\n\n/**\n * Component that slices a list of filters and returns them using the default scoped slot,\n * allowing the user to show the full list of them or slicing them again using the\n * show more/less buttons.\n *\n * @public\n */\nexport default defineComponent({\n name: 'SlicedFilters',\n xModule: facetsXModule.name,\n props: {\n /**\n * The list of filters to be rendered as slots.\n *\n * @public\n */\n filters: Array as PropType<Filter[]>,\n /**\n * This prop is used in the `HierarchicalFilter` component and only in that case. It is necessary\n * to make the `renderedFilters` to return only the filters of each level of the hierarchy.\n */\n parentId: {\n type: String as PropType<Filter['id']>,\n required: false,\n },\n /** The maximum number of filters to show. */\n max: {\n type: Number,\n required: true,\n },\n buttonClass: String,\n },\n emits: ['click:show-less', 'click:show-more'],\n setup(props, { emit }) {\n /** For showing the remaining filters. */\n const showMoreFilters = ref(true)\n\n const renderedFilters = useFiltersInjection(props)\n\n /**\n * Show the buttons template when length filters is greater than property max.\n *\n * @returns Boolean if length filters is greater than property max.\n * @internal\n */\n const showButton = computed(() => renderedFilters.value.length > props.max)\n\n /**\n * Sliced the array of filters depends on click button show more.\n *\n * @returns Array of sliced filters or all filters.\n * @internal\n */\n const slicedFilters = computed((): Filter[] => {\n return showMoreFilters.value\n ? renderedFilters.value.slice(0, props.max)\n : renderedFilters.value\n })\n provide('filters', slicedFilters)\n\n /**\n * The difference between length filters and max to show.\n *\n * @returns Number of remaining filters to show.\n * @internal\n */\n const difference = computed(() => renderedFilters.value.length - props.max)\n\n /**\n * Show or hide the remaining filters. It also emits a Vue event based on the clicked button.\n *\n * @param event - The click event.\n *\n * @internal\n */\n const toggleShowMoreFilters = (event: MouseEvent): void => {\n showMoreFilters.value = !showMoreFilters.value\n emit(showMoreFilters.value ? 'click:show-less' : 'click:show-more', event)\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The classes to be added to the component.\n * @internal\n */\n const cssClasses = computed((): VueCSSClasses => {\n return {\n 'x-sliced-filters--is-sliced': showButton.value,\n }\n })\n\n return {\n cssClasses,\n toggleShowMoreFilters,\n showButton,\n difference,\n slicedFilters,\n showMoreFilters,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Example\n\nThe sliced filters component, takes a list of filters, and the maximum number of filters to render\nas prop. Then, it slices the list of filters using the `max` prop, and returns this new filters list\nusing the default scoped slot.\n\nThe user can click the show more button if he wants to see the full list of filters, or the show\nless button when he wants to reset the filters. This buttons text or icons can be configured via\nslot too. They receive a `difference` prop which can be useful for writing friendlier messages.\n\nThis component is usually integrated with the `Facets` and `Filters` component. It is useful when\nthere are lots of available filters for a single facet, helping to improve the app performance, as\nless nodes are rendered.\n\n### Important\n\nThe component has two ways of receive the filters list, it can be injected by another component or\nbe send it as a prop. If the component doesnt have a parent component that receive and exposed a\nfilters list to their children, it is mandatory to send it as prop.\n\n### Basic usage\n\n```vue\n<template>\n <Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"4\">\n <template #default=\"{ slicedFilters }\">\n <Filters :items=\"slicedFilters\" v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\" />\n </Filters>\n </template>\n <template #show-more=\"{ difference }\">\n Show\n <span data-test=\"show-more-amount\">{{ difference }}</span>\n more filters\n </template>\n <template #show-less=\"{ difference }\">\n Show\n <span data-test=\"show-less-amount\">{{ difference }}</span>\n less filters\n </template>\n </SlicedFilters>\n </Facets>\n</template>\n<script>\nimport { BaseShowMoreFilters } from '@empathyco/x-components'\nimport { Facets, SimpleFilter, Filters } from '@empathyco/x-components'\n\nexport default {\n components: {\n Facets,\n BaseShowMoreFilters,\n Filters,\n SimpleFilter,\n },\n}\n</script>\n```\n\n> **Using injection**: It can receive the filters list by injection. It only works if it has a\n> parent component that receives and exposes the filters list. Using the injection, It is not\n> necessary to send the prop to the child components, it has to be send it in the parent component ,\n> the rest of components will inject this list.\n\n```vue\n<Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"4\">\n <Filters v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\"/>\n </Filters>\n <template #show-more=\"{ difference }\">Show {{ difference }} more filters</template>\n <template #show-less=\"{ difference }\">Show {{ difference }} less filters</template>\n </SlicedFilters>\n</Facets>\n```\n\n### Customizing the items with classes\n\nThe `buttonClass` prop can be used to add classes to the show more/less buttons.\n\n```vue live\n<Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"4\" buttonClass=\"x-facet-filter-lg\">\n <Filters v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\"/>\n </Filters>\n <template #show-more=\"{ difference }\">Show {{ difference }} more filters</template>\n <template #show-less=\"{ difference }\">Show {{ difference }} less filters</template>\n </SlicedFilters>\n</Facets>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_Fragment","_createTextVNode","_createElementVNode","_toDisplayString","_createCommentVNode"],"mappings":";;;;AAqBgB,MAAA,UAAA,GAAA,EAAA,WAAA,EAAU,kBAAkB,EAAA,CAAA;AAiB5B,MAAA,UAAA,GAAA,EAAA,WAAA,EAAU,kBAAkB,EAAA,CAAA;;AArC1C,EAAA,OAAAA,SAAA,EAAA,EAAAC,kBAAA;AAAA,IA0CM,KAAA;AAAA,IAAA;AAAA,MA1CD,KAAA,EADPC,cACa,CAAA,CAAA,kBAAA,EAA2B,IAAU,CAAA,UAAA,CAAA,CAAA;AAAA,MAAE,WAAU,EAAA,mBAAA;AAAA,KAAA;;MAK1DC,UAAwC,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAjC,eAAgB,IAAa,CAAA,aAAA,EAAA,CAAA;AAAA,MACpB,IAAhB,CAAA,UAAA,IAAAH,SAAA,EAAA,EAAAC,kBAAA;AAAA,QAmCWG,QAAA;AAAA,QA1Cf,EAAA,GAAA,EAAA,CAAA,EAAA;AAAA,QAAA;AAAA,UASc,IADR,CAAA,eAAA,IAAAJ,SAAA,EAAA,EAAAC,kBAAA;AAAA,YAgBS,QAAA;AAAA,YAAA;AAAA,cAxBf,GAAA,EAAA,CAAA;AAAA,cAUQ,KAAA,EAVRC,cAUc,CAAA,CAAA,6EAAA,EACE,IAAW,CAAA,WAAA,CAAA,CAAA;AAAA,cACnB,WAAU,EAAA,iCAAA;AAAA,cACT,SAAK,MAAE,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,qBAAA,IAAA,IAAA,CAAA,qBAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,aAAA;;AAMR,cAAAC,UAAA,CAIO,IAJiB,CAAA,MAAA,EAAA,WAAA,EAAA,EAAA,UAAA,EAAY,IAAU,CAAA,UAAA,EAAA,EAA9C,MAIO;AAAA,gBAvBfE,gBAmBwD,QAE9C,CAAA;AAAA,gBAAAC,kBAAA;AAAA,kBAA0D,MAAA;AAAA,kBAA1D,UAAA;AAAA,kBAA0DC,gBAApB,IAAU,CAAA,UAAA,CAAA;AAAA,kBAAA,CAAA;AAAA;AAAA,iBAAA;AAAA,gBArB1DF,gBAqBoE,gBAE5D,CAAA;AAAA,eAAA,CAAA;;;;AAEF,WAAA,KAAAL,SAAA,EAAA,EAAAC,kBAAA;AAAA,YAgBS,QAAA;AAAA,YAAA;AAAA,cAzCf,GAAA,EAAA,CAAA;AAAA,cA2BQ,KAAA,EA3BRC,cA2Bc,CAAA,CAAA,6EAAA,EACE,IAAW,CAAA,WAAA,CAAA,CAAA;AAAA,cACnB,WAAU,EAAA,iCAAA;AAAA,cACT,SAAK,MAAE,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,qBAAA,IAAA,IAAA,CAAA,qBAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,aAAA;;AAMR,cAAAC,UAAA,CAIO,IAJiB,CAAA,MAAA,EAAA,WAAA,EAAA,EAAA,UAAA,EAAY,IAAU,CAAA,UAAA,EAAA,EAA9C,MAIO;AAAA,gBAxCfE,gBAoCwD,QAE9C,CAAA;AAAA,gBAAAC,kBAAA;AAAA,kBAA0D,MAAA;AAAA,kBAA1D,UAAA;AAAA,kBAA0DC,gBAApB,IAAU,CAAA,UAAA,CAAA;AAAA,kBAAA,CAAA;AAAA;AAAA,iBAAA;AAAA,gBAtC1DF,gBAsCoE,gBAE5D,CAAA;AAAA,eAAA,CAAA;;;;;;;;AAxCR,OAAA,IAAAG,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,KAAA;;;;;;;;;"}
1
+ {"version":3,"file":"sliced-filters.vue.js","sources":["../../../../../../src/x-modules/facets/components/lists/sliced-filters.vue"],"sourcesContent":["<template>\n <div class=\"x-sliced-filters\" :class=\"cssClasses\" data-test=\"filters-show-more\">\n <!--\n @slot (Required) Sliced filters content.\n @binding {Filter[]} slicedFilters - Sliced filters..\n -->\n <slot :sliced-filters=\"slicedFilters\" />\n <template v-if=\"showButton\">\n <button\n v-if=\"showMoreFilters\"\n class=\"x-facet-filter x-sliced-filters__button x-sliced-filters__button--show-more\"\n :class=\"buttonClass\"\n data-test=\"sliced-filters-show-more-button\"\n @click=\"toggleShowMoreFilters\"\n >\n <!--\n @slot Button show more filters.\n @binding {number} difference - The difference between the filters and max to show.\n -->\n <slot name=\"show-more\" :difference=\"difference\">\n Show\n <span data-test=\"show-more-amount\">{{ difference }}</span>\n more filters\n </slot>\n </button>\n <button\n v-else\n class=\"x-facet-filter x-sliced-filters__button x-sliced-filters__button--show-less\"\n :class=\"buttonClass\"\n data-test=\"sliced-filters-show-less-button\"\n @click=\"toggleShowMoreFilters\"\n >\n <!--\n @slot Button show less filters.\n @binding {number} difference - The difference between the filters and max to show.\n -->\n <slot name=\"show-less\" :difference=\"difference\">\n Show\n <span data-test=\"show-less-amount\">{{ difference }}</span>\n less filters\n </slot>\n </button>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Filter } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { VueCSSClasses } from '../../../../utils'\nimport { computed, defineComponent, provide, ref } from 'vue'\nimport { useFiltersInjection } from '../../composables/use-filters-injection'\nimport { facetsXModule } from '../../x-module'\n\n/**\n * Component that slices a list of filters and returns them using the default scoped slot,\n * allowing the user to show the full list of them or slicing them again using the\n * show more/less buttons.\n *\n * @public\n */\nexport default defineComponent({\n name: 'SlicedFilters',\n xModule: facetsXModule.name,\n props: {\n /**\n * The list of filters to be rendered as slots.\n *\n * @public\n */\n filters: Array as PropType<Filter[]>,\n /**\n * This prop is used in the `HierarchicalFilter` component and only in that case. It is necessary\n * to make the `renderedFilters` to return only the filters of each level of the hierarchy.\n */\n parentId: {\n type: String as PropType<Filter['id']>,\n required: false,\n },\n /** The maximum number of filters to show. */\n max: {\n type: Number,\n required: true,\n },\n buttonClass: String,\n },\n emits: ['click:show-less', 'click:show-more'],\n setup(props, { emit }) {\n /** For showing the remaining filters. */\n const showMoreFilters = ref(true)\n\n const renderedFilters = useFiltersInjection(props)\n\n /**\n * Show the buttons template when length filters is greater than property max.\n *\n * @returns Boolean if length filters is greater than property max.\n * @internal\n */\n const showButton = computed(() => renderedFilters.value.length > props.max)\n\n /**\n * Sliced the array of filters depends on click button show more.\n *\n * @returns Array of sliced filters or all filters.\n * @internal\n */\n const slicedFilters = computed((): Filter[] => {\n return showMoreFilters.value\n ? renderedFilters.value.slice(0, props.max)\n : renderedFilters.value\n })\n provide('filters', slicedFilters)\n\n /**\n * The difference between length filters and max to show.\n *\n * @returns Number of remaining filters to show.\n * @internal\n */\n const difference = computed(() => renderedFilters.value.length - props.max)\n\n /**\n * Show or hide the remaining filters. It also emits a Vue event based on the clicked button.\n *\n * @param event - The click event.\n *\n * @internal\n */\n const toggleShowMoreFilters = (event: MouseEvent): void => {\n showMoreFilters.value = !showMoreFilters.value\n emit(showMoreFilters.value ? 'click:show-less' : 'click:show-more', event)\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The classes to be added to the component.\n * @internal\n */\n const cssClasses = computed((): VueCSSClasses => {\n return {\n 'x-sliced-filters--is-sliced': showButton.value,\n }\n })\n\n return {\n cssClasses,\n toggleShowMoreFilters,\n showButton,\n difference,\n slicedFilters,\n showMoreFilters,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Example\n\nThe sliced filters component, takes a list of filters, and the maximum number of filters to render\nas prop. Then, it slices the list of filters using the `max` prop, and returns this new filters list\nusing the default scoped slot.\n\nThe user can click the show more button if he wants to see the full list of filters, or the show\nless button when he wants to reset the filters. This buttons text or icons can be configured via\nslot too. They receive a `difference` prop which can be useful for writing friendlier messages.\n\nThis component is usually integrated with the `Facets` and `Filters` component. It is useful when\nthere are lots of available filters for a single facet, helping to improve the app performance, as\nless nodes are rendered.\n\n### Important\n\nThe component has two ways of receive the filters list, it can be injected by another component or\nbe send it as a prop. If the component doesnt have a parent component that receive and exposed a\nfilters list to their children, it is mandatory to send it as prop.\n\n### Basic usage\n\n```vue\n<template>\n <Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"4\">\n <template #default=\"{ slicedFilters }\">\n <Filters :items=\"slicedFilters\" v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\" />\n </Filters>\n </template>\n <template #show-more=\"{ difference }\">\n Show\n <span data-test=\"show-more-amount\">{{ difference }}</span>\n more filters\n </template>\n <template #show-less=\"{ difference }\">\n Show\n <span data-test=\"show-less-amount\">{{ difference }}</span>\n less filters\n </template>\n </SlicedFilters>\n </Facets>\n</template>\n<script>\nimport { BaseShowMoreFilters } from '@empathyco/x-components'\nimport { Facets, SimpleFilter, Filters } from '@empathyco/x-components'\n\nexport default {\n components: {\n Facets,\n BaseShowMoreFilters,\n Filters,\n SimpleFilter,\n },\n}\n</script>\n```\n\n> **Using injection**: It can receive the filters list by injection. It only works if it has a\n> parent component that receives and exposes the filters list. Using the injection, It is not\n> necessary to send the prop to the child components, it has to be send it in the parent component ,\n> the rest of components will inject this list.\n\n```vue\n<Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"4\">\n <Filters v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\"/>\n </Filters>\n <template #show-more=\"{ difference }\">Show {{ difference }} more filters</template>\n <template #show-less=\"{ difference }\">Show {{ difference }} less filters</template>\n </SlicedFilters>\n</Facets>\n```\n\n### Customizing the items with classes\n\nThe `buttonClass` prop can be used to add classes to the show more/less buttons.\n\n```vue live\n<Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"4\" buttonClass=\"x-facet-filter-lg\">\n <Filters v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\"/>\n </Filters>\n <template #show-more=\"{ difference }\">Show {{ difference }} more filters</template>\n <template #show-less=\"{ difference }\">Show {{ difference }} less filters</template>\n </SlicedFilters>\n</Facets>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_Fragment","_createTextVNode","_createElementVNode","_toDisplayString"],"mappings":";;;;AAqBgB,MAAA,UAAA,GAAA,EAAA,WAAA,EAAU,kBAAkB,EAAA,CAAA;AAiB5B,MAAA,UAAA,GAAA,EAAA,WAAA,EAAU,kBAAkB,EAAA,CAAA;;AArC1C,EAAA,OAAAA,SAAA,EAAA,EAAAC,kBAAA;AAAA,IA0CM,KAAA;AAAA,IAAA;AAAA,MA1CD,KAAA,EAAKC,cAAC,CAAA,CAAA,kBAAA,EAA2B,IAAU,CAAA,UAAA,CAAA,CAAA;AAAA,MAAE,WAAU,EAAA,mBAAA;AAAA,KAAA;;MAK1DC,UAAwC,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAjC,eAAgB,IAAa,CAAA,aAAA,EAAA,CAAA;AAAA,MACpB,IAAhB,CAAA,UAAA,IAAAH,SAAA,EAAA,EAAAC,kBAAA;AAAA,QAmCWG,QAAA;AAAA,QAAA,EAAA,GAAA,EAAA,CAAA,EAAA;AAAA,QAAA;AAAA,UAjCD,IADR,CAAA,eAAA,IAAAJ,SAAA,EAAA,EAAAC,kBAAA;AAAA,YAgBS,QAAA;AAAA,YAAA;AAAA,cAAA,GAAA,EAAA,CAAA;cAdP,KAAK,EAAAC,cAAA,CAAA,CAAC,+EACE,IAAW,CAAA,WAAA,CAAA,CAAA;AAAA,cACnB,WAAU,EAAA,iCAAA;AAAA,cACT,SAAK,MAAE,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,qBAAA,IAAA,IAAA,CAAA,qBAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,aAAA;;AAMR,cAAAC,UAAA,CAIO,IAJiB,CAAA,MAAA,EAAA,WAAA,EAAA,EAAA,UAAA,EAAY,IAAU,CAAA,UAAA,EAAA,EAA9C,MAIO;AAAA,gBAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAE,eAAA;AAJyC,kBAAA,QAAA;AAAA,kBAE9C,CAAA,CAAA;AAAA;AAAA,iBAAA,CAAA;AAAA,gBAAAC,kBAAA;AAAA,kBAA0D,MAAA;AAAA,kBAA1D,UAAA;AAAA,kBAA0DC,gBAApB,IAAU,CAAA,UAAA,CAAA;AAAA,kBAAA,CAAA;AAAA;AAAA,iBAAA;AAAA,gBAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAF,eAAA;AAAU,kBAAA,gBAAA;AAAA,kBAE5D,CAAA,CAAA;AAAA;AAAA,iBAAA,CAAA;AAAA,eAAA,CAAA;;;;AAEF,WAAA,KAAAL,SAAA,EAAA,EAAAC,kBAAA;AAAA,YAgBS,QAAA;AAAA,YAAA;AAAA,cAAA,GAAA,EAAA,CAAA;cAdP,KAAK,EAAAC,cAAA,CAAA,CAAC,+EACE,IAAW,CAAA,WAAA,CAAA,CAAA;AAAA,cACnB,WAAU,EAAA,iCAAA;AAAA,cACT,SAAK,MAAE,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,qBAAA,IAAA,IAAA,CAAA,qBAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,aAAA;;AAMR,cAAAC,UAAA,CAIO,IAJiB,CAAA,MAAA,EAAA,WAAA,EAAA,EAAA,UAAA,EAAY,IAAU,CAAA,UAAA,EAAA,EAA9C,MAIO;AAAA,gBAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAE,eAAA;AAJyC,kBAAA,QAAA;AAAA,kBAE9C,CAAA,CAAA;AAAA;AAAA,iBAAA,CAAA;AAAA,gBAAAC,kBAAA;AAAA,kBAA0D,MAAA;AAAA,kBAA1D,UAAA;AAAA,kBAA0DC,gBAApB,IAAU,CAAA,UAAA,CAAA;AAAA,kBAAA,CAAA;AAAA;AAAA,iBAAA;AAAA,gBAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAF,eAAA;AAAU,kBAAA,gBAAA;AAAA,kBAE5D,CAAA,CAAA;AAAA;AAAA,iBAAA,CAAA;AAAA,eAAA,CAAA;;;;;;;;;;;;;;;;;;"}
@@ -13,7 +13,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
13
13
  }, {
14
14
  default: withCtx(() => [
15
15
  renderSlot(_ctx.$slots, "default", {}, () => [
16
- createTextVNode("✕")
16
+ _cache[0] || (_cache[0] = createTextVNode(
17
+ "✕",
18
+ -1
19
+ /* CACHED */
20
+ ))
17
21
  ])
18
22
  ]),
19
23
  _: 3
@@ -1 +1 @@
1
- {"version":3,"file":"clear-history-queries.vue.js","sources":["../../../../../src/x-modules/history-queries/components/clear-history-queries.vue"],"sourcesContent":["<template>\n <BaseEventButton\n class=\"x-clear-history-queries x-button\"\n :class=\"dynamicClasses\"\n :disabled=\"isHistoryQueriesEmpty\"\n :events=\"clearHistoryQueriesEvents\"\n data-test=\"clear-history-queries\"\n aria-label=\"Clear all\"\n >\n <!-- @slot (Required) Button content with a message, an icon or both -->\n <slot>✕</slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\nimport type { VueCSSClasses } from '../../../utils/types'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent } from 'vue'\nimport BaseEventButton from '../../../components/base-event-button.vue'\nimport { useState } from '../../../composables/use-state'\nimport { historyQueriesXModule } from '../x-module'\n\n/**\n * A button that when is pressed, emits the\n * {@link HistoryQueriesXEvents.UserPressedClearHistoryQueries} event, expressing the user\n * intention to clear the whole history of queries.\n *\n * @public\n */\nexport default defineComponent({\n name: 'ClearHistoryQueries',\n xModule: historyQueriesXModule.name,\n components: {\n BaseEventButton,\n },\n setup() {\n /**\n * The whole history queries.\n *\n * @internal\n */\n const { historyQueries } = useState('historyQueries')\n\n /**\n * Returns if the array of history queries is empty.\n *\n * @returns `true` if the {@link historyQueries} array is empty, `false` otherwise.\n * @internal\n */\n const isHistoryQueriesEmpty = computed(() => historyQueries.value.length === 0)\n\n /**\n * Dynamic CSS classes to add to the root element of this component.\n *\n * @returns A booleans dictionary where each key is the class name to add, and the boolean value\n * tells if it should be added or not.\n * @internal\n */\n const dynamicClasses = computed(\n (): VueCSSClasses => ({\n 'x-clear-history-queries--is-empty': isHistoryQueriesEmpty.value,\n }),\n )\n\n /**\n * The list of events that are going to be emitted when the button is pressed.\n *\n * @internal\n */\n const clearHistoryQueriesEvents: Partial<XEventsTypes> = {\n UserPressedClearHistoryQueries: undefined,\n }\n\n return {\n dynamicClasses,\n clearHistoryQueriesEvents,\n isHistoryQueriesEmpty,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserPressedClearHistoryQueries`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button.\n\n## Examples\n\n### Basic example\n\nThe component exposes a single default slot, where you can add icons or text.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <ClearHistoryQueries>Clear history queries</ClearHistoryQueries>\n <HistoryQueries :animation=\"'FadeAndSlide'\" :maxItemsToRender=\"10\" />\n </div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries, ClearHistoryQueries } from '@empathyco/x-components/history-queries'\nimport { FadeAndSlide } from '@empathyco/x-components'\n\n// Registering the animation as a global component\nVue.component('FadeAndSlide', FadeAndSlide)\nexport default {\n name: 'ClearHistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n ClearHistoryQueries,\n },\n}\n</script>\n```\n</docs>\n"],"names":["_createBlock","_normalizeClass","_withCtx","_renderSlot","_createTextVNode"],"mappings":";;;;;;sBACEA,WAUkB,CAAA,0BAAA,EAAA;AAAA,IAThB,KAAA,EAFJC,cAEU,CAAA,CAAA,kCAAA,EACE,IAAc,CAAA,cAAA,CAAA,CAAA;AAAA,IACrB,QAAU,EAAA,IAAA,CAAA,qBAAA;AAAA,IACV,MAAQ,EAAA,IAAA,CAAA,yBAAA;AAAA,IACT,WAAU,EAAA,uBAAA;AAAA,IACV,YAAW,EAAA,WAAA;AAAA,GAAA,EAAA;AAPf,IAAA,OAAA,EAAAC,OAAA,CAUI,MAAc;AAAA,MAAdC,UAAA,CAAc,4BAAd,MAAc;AAAA,QAVlBC,gBAUU,GAAC,CAAA;AAAA,OAAA,CAAA;;AAVX,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,EAAA,CAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,QAAA,CAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"clear-history-queries.vue.js","sources":["../../../../../src/x-modules/history-queries/components/clear-history-queries.vue"],"sourcesContent":["<template>\n <BaseEventButton\n class=\"x-clear-history-queries x-button\"\n :class=\"dynamicClasses\"\n :disabled=\"isHistoryQueriesEmpty\"\n :events=\"clearHistoryQueriesEvents\"\n data-test=\"clear-history-queries\"\n aria-label=\"Clear all\"\n >\n <!-- @slot (Required) Button content with a message, an icon or both -->\n <slot>✕</slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\nimport type { VueCSSClasses } from '../../../utils/types'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent } from 'vue'\nimport BaseEventButton from '../../../components/base-event-button.vue'\nimport { useState } from '../../../composables/use-state'\nimport { historyQueriesXModule } from '../x-module'\n\n/**\n * A button that when is pressed, emits the\n * {@link HistoryQueriesXEvents.UserPressedClearHistoryQueries} event, expressing the user\n * intention to clear the whole history of queries.\n *\n * @public\n */\nexport default defineComponent({\n name: 'ClearHistoryQueries',\n xModule: historyQueriesXModule.name,\n components: {\n BaseEventButton,\n },\n setup() {\n /**\n * The whole history queries.\n *\n * @internal\n */\n const { historyQueries } = useState('historyQueries')\n\n /**\n * Returns if the array of history queries is empty.\n *\n * @returns `true` if the {@link historyQueries} array is empty, `false` otherwise.\n * @internal\n */\n const isHistoryQueriesEmpty = computed(() => historyQueries.value.length === 0)\n\n /**\n * Dynamic CSS classes to add to the root element of this component.\n *\n * @returns A booleans dictionary where each key is the class name to add, and the boolean value\n * tells if it should be added or not.\n * @internal\n */\n const dynamicClasses = computed(\n (): VueCSSClasses => ({\n 'x-clear-history-queries--is-empty': isHistoryQueriesEmpty.value,\n }),\n )\n\n /**\n * The list of events that are going to be emitted when the button is pressed.\n *\n * @internal\n */\n const clearHistoryQueriesEvents: Partial<XEventsTypes> = {\n UserPressedClearHistoryQueries: undefined,\n }\n\n return {\n dynamicClasses,\n clearHistoryQueriesEvents,\n isHistoryQueriesEmpty,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserPressedClearHistoryQueries`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button.\n\n## Examples\n\n### Basic example\n\nThe component exposes a single default slot, where you can add icons or text.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <ClearHistoryQueries>Clear history queries</ClearHistoryQueries>\n <HistoryQueries :animation=\"'FadeAndSlide'\" :maxItemsToRender=\"10\" />\n </div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries, ClearHistoryQueries } from '@empathyco/x-components/history-queries'\nimport { FadeAndSlide } from '@empathyco/x-components'\n\n// Registering the animation as a global component\nVue.component('FadeAndSlide', FadeAndSlide)\nexport default {\n name: 'ClearHistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n ClearHistoryQueries,\n },\n}\n</script>\n```\n</docs>\n"],"names":["_createBlock","_normalizeClass","_renderSlot","_createTextVNode"],"mappings":";;;;;;sBACEA,WAUkB,CAAA,0BAAA,EAAA;AAAA,IAThB,KAAA,EAAKC,cAAC,CAAA,CAAA,kCAAA,EACE,IAAc,CAAA,cAAA,CAAA,CAAA;AAAA,IACrB,QAAU,EAAA,IAAA,CAAA,qBAAA;AAAA,IACV,MAAQ,EAAA,IAAA,CAAA,yBAAA;AAAA,IACT,WAAU,EAAA,uBAAA;AAAA,IACV,YAAW,EAAA,WAAA;AAAA,GAAA,EAAA;qBAGX,MAAc;AAAA,MAAdC,UAAA,CAAc,4BAAd,MAAc;AAAA,QAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAC,eAAA;AAAR,UAAA,GAAA;AAAA,UAAC,CAAA,CAAA;AAAA;AAAA,SAAA,CAAA;AAAA,OAAA,CAAA;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"history-queries.vue.js","sources":["../../../../../src/x-modules/history-queries/components/history-queries.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"historyQueriesWithResults\"\n class=\"x-history-queries\"\n data-test=\"history-queries\"\n >\n <template #default=\"baseScope\">\n <!-- eslint-disable max-len -->\n <!--\n @slot History Query item\n @binding {Object} v-bind - History Query suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - History Query suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - History Query suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion\" v-bind=\"{ ...baseScope }\">\n <HistoryQuery\n :suggestion=\"baseScope.suggestion\"\n data-test=\"history-query-item\"\n class=\"x-history-queries__item\"\n suggestion-class=\"x-suggestion\"\n >\n <template #default=\"historyQueryScope\">\n <!-- eslint-disable max-len -->\n <!--\n @slot History Query content\n @binding {Object} v-bind - History Query suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - History Query suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - History Query suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion-content\" v-bind=\"{ ...baseScope, ...historyQueryScope }\" />\n </template>\n <template #remove-button-content=\"removeHistoryQueryScope\">\n <!-- eslint-disable max-len -->\n <!--\n @slot History Query remove button content\n @binding {Object} v-bind - History Query suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - History Query suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - History Query suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot\n name=\"suggestion-remove-content\"\n v-bind=\"{ ...baseScope, ...removeHistoryQueryScope }\"\n />\n </template>\n </HistoryQuery>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport BaseSuggestions from '../../../components/suggestions/base-suggestions.vue'\nimport { useGetter } from '../../../composables/use-getter'\nimport { historyQueriesXModule } from '../x-module'\nimport HistoryQuery from './history-query.vue'\n\n/**\n * This component renders a list of suggestions coming from the user queries history.\n * Allows the user to select one of them, emitting the needed events. A history query is just\n * another type of suggestion that contains a query that the user has made in the past.\n *\n * @public\n */\nexport default defineComponent({\n name: 'HistoryQueries',\n xModule: historyQueriesXModule.name,\n components: {\n BaseSuggestions,\n HistoryQuery,\n },\n setup() {\n /**\n * The filtered list of history queries.\n *\n * @internal\n */\n const { historyQueriesWithResults } = useGetter('historyQueries')\n\n return {\n historyQueriesWithResults,\n }\n },\n})\n</script>\n\n<!--eslint-disable max-len -->\n<docs lang=\"mdx\">\n## Inherited props\n\nThis component inherits the [`BaseSuggestions`](../base-components/x-components.base-suggestions.md)\nprops.\n\n| Name | Description | Type | Default |\n| ------------------ | ----------------------------------------------------------------- | -------- | ------- |\n| `animation` | Animation component that will be used to animate the suggestions. | `Vue` | `\"ul\"` |\n| `maxItemsToRender` | Number of popular searches to be rendered. | `number` | |\n\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\nHere you have a basic example of how the HistoryQueries is rendered.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries />\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n },\n}\n</script>\n```\n\n### Play with props\n\nIn this example, the history queries have been limited to render a maximum of 10 queries (by default\nit is 5).\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries :maxItemsToRender=\"10\" />\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n },\n}\n</script>\n```\n\n### Play with the animation\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries :animation=\"'FadeAndSlide'\" />\n </div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries } from '@empathyco/x-components/history-queries'\nimport { FadeAndSlide } from '@empathyco/x-components'\n\n// Registering the animation as a global component\nVue.component('FadeAndSlide', FadeAndSlide)\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n },\n}\n</script>\n```\n\n### Play with suggestion slot\n\nIn this example, the [`HistoryQuery`](./x-components.history-query.md) component is passed in the\n`suggestion` slot (although any other component could potentially be passed).\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries #suggestion=\"{ suggestion }\">\n <HistoryQuery :suggestion=\"suggestion\" />\n </HistoryQueries>\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries, HistoryQuery } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n HistoryQuery,\n },\n}\n</script>\n```\n\n### Play with suggestion-content slot\n\nTo continue the previous example, the [`HistoryQuery`](./x-components.history-query.md) component is\npassed in the `suggestion-content` slot, but in addition, an HTML span tag for the text are also\npassed.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries #suggestion-content=\"{ suggestion }\">\n <span>{{ suggestion.query }}</span>\n </HistoryQueries>\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n },\n}\n</script>\n```\n\n### Play with suggestion-content-remove slot\n\nTo continue the previous example, the [`HistoryQuery`](./x-components.history-query.md) component is\npassed in the `suggestion-content` slot, but in addition, a cross icon is also passed to change the\nicon to remove the history query.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries #suggestion-remove-content=\"{ suggestion }\">\n <CrossIcon />\n </HistoryQueries>\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries } from '@empathyco/x-components/history-queries'\nimport { CrossIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n CrossIcon,\n },\n}\n</script>\n```\n</docs>\n"],"names":["_createBlock","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_createVNode"],"mappings":";;;;;;;sBACEA,WA2CkB,CAAA,0BAAA,EAAA;AAAA,IA1Cf,WAAa,EAAA,IAAA,CAAA,yBAAA;AAAA,IACd,KAAM,EAAA,mBAAA;AAAA,IACN,WAAU,EAAA,iBAAA;AAAA,GAAA,EAAA;IAEC,OAAO,EAAAC,OAAA,CAOhB,CA6BO,SApCoB,KAAA;AAAA,MAO3BC,UA6BO,CAAA,IAAA,CAAA,MAAA,EAAA,YAAA,EA1CbC,cAa2C,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,MAArC,MA6BO;AAAA,QA5BLC,WA2Be,CAAA,uBAAA,EAAA;AAAA,UA1BZ,YAAY,SAAU,CAAA,UAAA;AAAA,UACvB,WAAU,EAAA,oBAAA;AAAA,UACV,KAAM,EAAA,yBAAA;AAAA,UACN,kBAAiB,EAAA,cAAA;AAAA,SAAA,EAAA;UAEN,OAAO,EAAAJ,OAAA,CAOhB,CAAkF,iBAP/C,KAAA;AAAA,YAOnCC,UAAkF,CAAA,IAAA,CAAA,MAAA,EAAA,oBAAA,EA3B9FC,cA2ByD,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAS,GAAK,iBAAiB,EAAA,CAAA,CAAA,CAAA;AAAA,WAAA,CAAA;UAEnE,uBAAqB,EAAAH,OAAA,CAO9B,CAGE,uBAVqD,KAAA;AAAA,YAOvDC,UAGE,CAAA,IAAA,CAAA,MAAA,EAAA,2BAAA,EAvCdC,cAsC2B,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAS,GAAK,uBAAuB,EAAA,CAAA,CAAA,CAAA;AAAA,WAAA,CAAA;AAtChE,UAAA,CAAA,EAAA,CAAA;AAAA;AAAA,SAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,CAAA;;;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,EAAA,CAAA,EAAA,CAAA,aAAA,CAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"history-queries.vue.js","sources":["../../../../../src/x-modules/history-queries/components/history-queries.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"historyQueriesWithResults\"\n class=\"x-history-queries\"\n data-test=\"history-queries\"\n >\n <template #default=\"baseScope\">\n <!-- eslint-disable max-len -->\n <!--\n @slot History Query item\n @binding {Object} v-bind - History Query suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - History Query suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - History Query suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion\" v-bind=\"{ ...baseScope }\">\n <HistoryQuery\n :suggestion=\"baseScope.suggestion\"\n data-test=\"history-query-item\"\n class=\"x-history-queries__item\"\n suggestion-class=\"x-suggestion\"\n >\n <template #default=\"historyQueryScope\">\n <!-- eslint-disable max-len -->\n <!--\n @slot History Query content\n @binding {Object} v-bind - History Query suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - History Query suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - History Query suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion-content\" v-bind=\"{ ...baseScope, ...historyQueryScope }\" />\n </template>\n <template #remove-button-content=\"removeHistoryQueryScope\">\n <!-- eslint-disable max-len -->\n <!--\n @slot History Query remove button content\n @binding {Object} v-bind - History Query suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - History Query suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - History Query suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot\n name=\"suggestion-remove-content\"\n v-bind=\"{ ...baseScope, ...removeHistoryQueryScope }\"\n />\n </template>\n </HistoryQuery>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport BaseSuggestions from '../../../components/suggestions/base-suggestions.vue'\nimport { useGetter } from '../../../composables/use-getter'\nimport { historyQueriesXModule } from '../x-module'\nimport HistoryQuery from './history-query.vue'\n\n/**\n * This component renders a list of suggestions coming from the user queries history.\n * Allows the user to select one of them, emitting the needed events. A history query is just\n * another type of suggestion that contains a query that the user has made in the past.\n *\n * @public\n */\nexport default defineComponent({\n name: 'HistoryQueries',\n xModule: historyQueriesXModule.name,\n components: {\n BaseSuggestions,\n HistoryQuery,\n },\n setup() {\n /**\n * The filtered list of history queries.\n *\n * @internal\n */\n const { historyQueriesWithResults } = useGetter('historyQueries')\n\n return {\n historyQueriesWithResults,\n }\n },\n})\n</script>\n\n<!--eslint-disable max-len -->\n<docs lang=\"mdx\">\n## Inherited props\n\nThis component inherits the [`BaseSuggestions`](../base-components/x-components.base-suggestions.md)\nprops.\n\n| Name | Description | Type | Default |\n| ------------------ | ----------------------------------------------------------------- | -------- | ------- |\n| `animation` | Animation component that will be used to animate the suggestions. | `Vue` | `\"ul\"` |\n| `maxItemsToRender` | Number of popular searches to be rendered. | `number` | |\n\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\nHere you have a basic example of how the HistoryQueries is rendered.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries />\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n },\n}\n</script>\n```\n\n### Play with props\n\nIn this example, the history queries have been limited to render a maximum of 10 queries (by default\nit is 5).\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries :maxItemsToRender=\"10\" />\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n },\n}\n</script>\n```\n\n### Play with the animation\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries :animation=\"'FadeAndSlide'\" />\n </div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries } from '@empathyco/x-components/history-queries'\nimport { FadeAndSlide } from '@empathyco/x-components'\n\n// Registering the animation as a global component\nVue.component('FadeAndSlide', FadeAndSlide)\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n },\n}\n</script>\n```\n\n### Play with suggestion slot\n\nIn this example, the [`HistoryQuery`](./x-components.history-query.md) component is passed in the\n`suggestion` slot (although any other component could potentially be passed).\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries #suggestion=\"{ suggestion }\">\n <HistoryQuery :suggestion=\"suggestion\" />\n </HistoryQueries>\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries, HistoryQuery } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n HistoryQuery,\n },\n}\n</script>\n```\n\n### Play with suggestion-content slot\n\nTo continue the previous example, the [`HistoryQuery`](./x-components.history-query.md) component is\npassed in the `suggestion-content` slot, but in addition, an HTML span tag for the text are also\npassed.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries #suggestion-content=\"{ suggestion }\">\n <span>{{ suggestion.query }}</span>\n </HistoryQueries>\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n },\n}\n</script>\n```\n\n### Play with suggestion-content-remove slot\n\nTo continue the previous example, the [`HistoryQuery`](./x-components.history-query.md) component is\npassed in the `suggestion-content` slot, but in addition, a cross icon is also passed to change the\nicon to remove the history query.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <HistoryQueries #suggestion-remove-content=\"{ suggestion }\">\n <CrossIcon />\n </HistoryQueries>\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { HistoryQueries } from '@empathyco/x-components/history-queries'\nimport { CrossIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'HistoryQueriesDemo',\n components: {\n SearchInput,\n HistoryQueries,\n CrossIcon,\n },\n}\n</script>\n```\n</docs>\n"],"names":["_createBlock","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_createVNode"],"mappings":";;;;;;;sBACEA,WA2CkB,CAAA,0BAAA,EAAA;AAAA,IA1Cf,WAAa,EAAA,IAAA,CAAA,yBAAA;AAAA,IACd,KAAM,EAAA,mBAAA;AAAA,IACN,WAAU,EAAA,iBAAA;AAAA,GAAA,EAAA;IAEC,OAAO,EAAAC,OAAA,CAOhB,CA6BO,SApCoB,KAAA;AAAA,MAO3BC,UA6BO,CAAA,IAAA,CAAA,MAAA,EAAA,YAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GA7B8B,SAAS,EAAA,CAAA,CAAA,EAA9C,MA6BO;AAAA,QA5BLC,WA2Be,CAAA,uBAAA,EAAA;AAAA,UA1BZ,YAAY,SAAU,CAAA,UAAA;AAAA,UACvB,WAAU,EAAA,oBAAA;AAAA,UACV,KAAM,EAAA,yBAAA;AAAA,UACN,kBAAiB,EAAA,cAAA;AAAA,SAAA,EAAA;UAEN,OAAO,EAAAJ,OAAA,CAOhB,CAAkF,iBAP/C,KAAA;AAAA,YAOnCC,UAAkF,CAAA,IAAA,CAAA,MAAA,EAAA,oBAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAArC,SAAS,EAAA,GAAK,iBAAiB,EAAA,CAAA,CAAA,CAAA;AAAA,WAAA,CAAA;UAEnE,uBAAqB,EAAAH,OAAA,CAO9B,CAGE,uBAVqD,KAAA;AAAA,YAOvDC,UAGE,CAAA,IAAA,CAAA,MAAA,EAAA,2BAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GADa,SAAS,EAAA,GAAK,uBAAuB,EAAA,CAAA,CAAA,CAAA;AAAA,WAAA,CAAA;;;;;;;;;;;;;;"}
@@ -27,7 +27,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
27
27
  }, {
28
28
  default: withCtx(() => [
29
29
  renderSlot(_ctx.$slots, "remove-button-content", normalizeProps(guardReactiveProps({ suggestion: _ctx.suggestion })), () => [
30
- createTextVNode("✕")
30
+ _cache[1] || (_cache[1] = createTextVNode(
31
+ "✕",
32
+ -1
33
+ /* CACHED */
34
+ ))
31
35
  ])
32
36
  ]),
33
37
  _: 3
@@ -1 +1 @@
1
- {"version":3,"file":"history-query.vue.js","sources":["../../../../../src/x-modules/history-queries/components/history-query.vue"],"sourcesContent":["<template>\n <div class=\"x-history-query x-suggestion-group\">\n <!--\n Click on the History Query suggestion\n @event click\n @property {Suggestion} suggestion - History Query suggestion data\n @property {MouseEvent} event - The original mouse event\n -->\n <BaseSuggestion\n v-slot=\"baseScope\"\n class=\"x-history-query__suggestion\"\n :class=\"suggestionClass\"\n v-bind=\"{ suggestion, suggestionSelectedEvents, query }\"\n data-test=\"history-query\"\n feature=\"history_query\"\n @click=\"$emit('click', suggestion, $event)\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot History Query content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter or undefined</code> - Suggestion's filter\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope }\" />\n </BaseSuggestion>\n <RemoveHistoryQuery\n class=\"x-history-query__remove x-suggestion-group-button\"\n :class=\"removeButtonClass\"\n :history-query=\"suggestion\"\n data-test=\"remove-history-query\"\n >\n <!--\n @slot History Query remove button content\n @binding {Suggestion} suggestion - History Query suggestion data\n -->\n <slot name=\"remove-button-content\" v-bind=\"{ suggestion }\">✕</slot>\n </RemoveHistoryQuery>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { HistoryQuery as HistoryQueryModel } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent } from 'vue'\nimport BaseSuggestion from '../../../components/suggestions/base-suggestion.vue'\nimport { useGetter } from '../../../composables/use-getter'\nimport { historyQueriesXModule } from '../x-module'\nimport RemoveHistoryQuery from './remove-history-query.vue'\n\n/**\n * This component renders a history query suggestion combining two buttons: one for selecting this\n * suggestion as the search query, and another one to remove this query suggestion from the\n * history queries.\n *\n * @public\n */\nexport default defineComponent({\n name: 'HistoryQuery',\n xModule: historyQueriesXModule.name,\n components: { RemoveHistoryQuery, BaseSuggestion },\n props: {\n /**\n * The history query suggestion to render.\n *\n * @public\n */\n suggestion: {\n type: Object as PropType<HistoryQueryModel>,\n required: true,\n },\n /** Class inherited by content element. */\n removeButtonClass: String,\n /** Class inherited by content element. */\n suggestionClass: String,\n },\n emits: ['click'],\n setup(props) {\n /**\n * The normalized query of the history-queries module.\n *\n * @internal\n */\n const query = useGetter('historyQueries').normalizedQuery\n\n /**\n * The list of events that are going to be emitted when the suggestion button is pressed.\n *\n * @internal\n * @returns The {@link XEvent} to emit.\n */\n const suggestionSelectedEvents = computed(\n (): Partial<XEventsTypes> => ({\n UserSelectedAHistoryQuery: props.suggestion,\n }),\n )\n\n return {\n query,\n suggestionSelectedEvents,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserSelectedAHistoryQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the history query\n data.\n\n## Examples\n\n### Basic usage\n\nThis component only requires a prop called `suggestion`\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\" />\n</template>\n\n<script>\nimport { HistoryQuery } from '@empathyco/x-components/history-queries'\nexport default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery,\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Customizing slots content\n\nSuggestion and remove buttons contents can be customized.\n\nThe default slot allows you to replace the content of the suggestion button. It has two properties,\nthe suggestion itself, and a `string` of HTML with the matched query.\n\nThe other slot is called `remove-button-content`, and allows you to set the content of the button\nthat serves to remove this query from the history. This slot only has one property, the suggestion.\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <HistoryIcon />\n <Highlight highlight=\"tro\" :text=\"suggestion.query\" />\n </template>\n\n <template #remove-button-content=\"{ suggestion }\">\n <CrossIcon />\n </template>\n </HistoryQuery>\n</template>\n\n<script>\nimport { HistoryQuery } from '@empathyco/x-components/history-queries'\nimport { HistoryIcon, CrossIcon, Highlight } from '@empathyco/x-components'\n\nexport default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery,\n HistoryIcon,\n CrossIcon,\n Highlight,\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Customizing the content with classes\n\nThe `suggestionClass` prop can be used to add classes to the history query suggestion.\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\" suggestionClass=\"x-custom-class\" />\n</template>\n\n<script>\nimport { HistoryQuery } from '@empathyco/x-components/history-queries'\nexport default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery,\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\nThe `removeButtonClass` prop can be used to add classes to the remove history query.\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\" removeButtonClass=\"x-custom-class\" />\n</template>\n\n<script>\nimport { HistoryQuery } from '@empathyco/x-components/history-queries'\nexport default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery,\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_createVNode","_mergeProps","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_normalizeClass","_createTextVNode"],"mappings":";;;;AACO,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,oCAAoC,EAAA,CAAA;;;;AAA/C,EAAA,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAoCM,OApCN,UAoCM,EAAA;AAAA,IA7BJC,WAAA,CAgBiB,2BAhBjBC,UAgBiB,CAAA;AAAA,MAdf,KAAA,EAAK,CAAC,6BAAA,EACE,IAAe,CAAA,eAAA,CAAA;AAAA,KAAA,EAAA,EAAA,UAAA,EACb,IAAU,CAAA,UAAA,EAAA,wBAAA,EAAE,IAAwB,CAAA,wBAAA,EAAA,KAAA,EAAE,IAAK,CAAA,KAAA,EAAA,EAAA;AAAA,MACrD,WAAU,EAAA,eAAA;AAAA,MACV,OAAQ,EAAA,eAAA;AAAA,MACP,OAAK,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,MAAA,KAAE,IAAK,CAAA,KAAA,CAAA,OAAA,EAAU,iBAAY,MAAM,CAAA,CAAA;AAAA,KAAA,CAAA,EAAA;AAf/C,MAAA,OAAA,EAAAC,OAAA,CAuBM,CAAkC,SAdjB,KAAA;AAAA,QAcjBC,UAAA,CAAkC,IAvBxC,CAAA,MAAA,EAAA,SAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAuByB,SAAS,EAAA,CAAA,CAAA,CAAA;AAAA,OAAA,CAAA;AAvBlC,MAAA,CAAA,EAAA,CAAA;AAAA;AAAA,KAAA,EAAA,EAAA,EAAA,CAAA,OAAA,CAAA,CAAA;IAyBIL,WAWqB,CAAA,6BAAA,EAAA;AAAA,MAVnB,KAAA,EA1BNM,cA0BY,CAAA,CAAA,mDAAA,EACE,IAAiB,CAAA,iBAAA,CAAA,CAAA;AAAA,MACxB,eAAe,EAAA,IAAA,CAAA,UAAA;AAAA,MAChB,WAAU,EAAA,sBAAA;AAAA,KAAA,EAAA;AA7BhB,MAAA,OAAA,EAAAJ,OAAA,CAmCM,MAAmE;AAAA,QAAnEC,UAAmE,CAAA,IAAA,CAAA,MAAA,EAAA,uBAAA,EAnCzEC,cAmCmD,CAAAC,kBAAA,CAAA,EAAA,UAAA,EAAA,IAAA,CAAA,UAAA,MAA7C,MAAmE;AAAA,UAnCzEE,gBAmCiE,GAAC,CAAA;AAAA,SAAA,CAAA;;AAnClE,MAAA,CAAA,EAAA,CAAA;AAAA;AAAA,KAAA,EAAA,CAAA,EAAA,CAAA,OAAA,EAAA,eAAA,CAAA,CAAA;;;;;;;"}
1
+ {"version":3,"file":"history-query.vue.js","sources":["../../../../../src/x-modules/history-queries/components/history-query.vue"],"sourcesContent":["<template>\n <div class=\"x-history-query x-suggestion-group\">\n <!--\n Click on the History Query suggestion\n @event click\n @property {Suggestion} suggestion - History Query suggestion data\n @property {MouseEvent} event - The original mouse event\n -->\n <BaseSuggestion\n v-slot=\"baseScope\"\n class=\"x-history-query__suggestion\"\n :class=\"suggestionClass\"\n v-bind=\"{ suggestion, suggestionSelectedEvents, query }\"\n data-test=\"history-query\"\n feature=\"history_query\"\n @click=\"$emit('click', suggestion, $event)\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot History Query content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter or undefined</code> - Suggestion's filter\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope }\" />\n </BaseSuggestion>\n <RemoveHistoryQuery\n class=\"x-history-query__remove x-suggestion-group-button\"\n :class=\"removeButtonClass\"\n :history-query=\"suggestion\"\n data-test=\"remove-history-query\"\n >\n <!--\n @slot History Query remove button content\n @binding {Suggestion} suggestion - History Query suggestion data\n -->\n <slot name=\"remove-button-content\" v-bind=\"{ suggestion }\">✕</slot>\n </RemoveHistoryQuery>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { HistoryQuery as HistoryQueryModel } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent } from 'vue'\nimport BaseSuggestion from '../../../components/suggestions/base-suggestion.vue'\nimport { useGetter } from '../../../composables/use-getter'\nimport { historyQueriesXModule } from '../x-module'\nimport RemoveHistoryQuery from './remove-history-query.vue'\n\n/**\n * This component renders a history query suggestion combining two buttons: one for selecting this\n * suggestion as the search query, and another one to remove this query suggestion from the\n * history queries.\n *\n * @public\n */\nexport default defineComponent({\n name: 'HistoryQuery',\n xModule: historyQueriesXModule.name,\n components: { RemoveHistoryQuery, BaseSuggestion },\n props: {\n /**\n * The history query suggestion to render.\n *\n * @public\n */\n suggestion: {\n type: Object as PropType<HistoryQueryModel>,\n required: true,\n },\n /** Class inherited by content element. */\n removeButtonClass: String,\n /** Class inherited by content element. */\n suggestionClass: String,\n },\n emits: ['click'],\n setup(props) {\n /**\n * The normalized query of the history-queries module.\n *\n * @internal\n */\n const query = useGetter('historyQueries').normalizedQuery\n\n /**\n * The list of events that are going to be emitted when the suggestion button is pressed.\n *\n * @internal\n * @returns The {@link XEvent} to emit.\n */\n const suggestionSelectedEvents = computed(\n (): Partial<XEventsTypes> => ({\n UserSelectedAHistoryQuery: props.suggestion,\n }),\n )\n\n return {\n query,\n suggestionSelectedEvents,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserSelectedAHistoryQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the history query\n data.\n\n## Examples\n\n### Basic usage\n\nThis component only requires a prop called `suggestion`\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\" />\n</template>\n\n<script>\nimport { HistoryQuery } from '@empathyco/x-components/history-queries'\nexport default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery,\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Customizing slots content\n\nSuggestion and remove buttons contents can be customized.\n\nThe default slot allows you to replace the content of the suggestion button. It has two properties,\nthe suggestion itself, and a `string` of HTML with the matched query.\n\nThe other slot is called `remove-button-content`, and allows you to set the content of the button\nthat serves to remove this query from the history. This slot only has one property, the suggestion.\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <HistoryIcon />\n <Highlight highlight=\"tro\" :text=\"suggestion.query\" />\n </template>\n\n <template #remove-button-content=\"{ suggestion }\">\n <CrossIcon />\n </template>\n </HistoryQuery>\n</template>\n\n<script>\nimport { HistoryQuery } from '@empathyco/x-components/history-queries'\nimport { HistoryIcon, CrossIcon, Highlight } from '@empathyco/x-components'\n\nexport default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery,\n HistoryIcon,\n CrossIcon,\n Highlight,\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Customizing the content with classes\n\nThe `suggestionClass` prop can be used to add classes to the history query suggestion.\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\" suggestionClass=\"x-custom-class\" />\n</template>\n\n<script>\nimport { HistoryQuery } from '@empathyco/x-components/history-queries'\nexport default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery,\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\nThe `removeButtonClass` prop can be used to add classes to the remove history query.\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\" removeButtonClass=\"x-custom-class\" />\n</template>\n\n<script>\nimport { HistoryQuery } from '@empathyco/x-components/history-queries'\nexport default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery,\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_createVNode","_mergeProps","_withCtx","_renderSlot","_normalizeClass","_normalizeProps","_guardReactiveProps","_createTextVNode"],"mappings":";;;;AACO,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,oCAAoC,EAAA,CAAA;;;;AAA/C,EAAA,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAoCM,OApCN,UAoCM,EAAA;AAAA,IA7BJC,WAAA,CAgBiB,2BAhBjBC,UAgBiB,CAAA;AAAA,MAdf,KAAA,EAAK,CAAC,6BAAA,EACE,IAAe,CAAA,eAAA,CAAA;AAAA,KAAA,EAAA,EAAA,UAAA,EACb,IAAU,CAAA,UAAA,EAAA,wBAAA,EAAE,IAAwB,CAAA,wBAAA,EAAA,KAAA,EAAE,IAAK,CAAA,KAAA,EAAA,EAAA;AAAA,MACrD,WAAU,EAAA,eAAA;AAAA,MACV,OAAQ,EAAA,eAAA;AAAA,MACP,OAAK,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,MAAA,KAAE,IAAK,CAAA,KAAA,CAAA,OAAA,EAAU,iBAAY,MAAM,CAAA,CAAA;AAAA,KAAA,CAAA,EAAA;AAQzC,MAAA,OAAA,EAAAC,OAAA,CAAA,CAAkC,SAdjB,KAAA;AAAA,QAcjBC,UAAA,CAAkC,+DAAf,SAAS,EAAA,CAAA,CAAA,CAAA;AAAA,OAAA,CAAA;;;;IAE9BH,WAWqB,CAAA,6BAAA,EAAA;AAAA,MAVnB,KAAA,EAAKI,cAAC,CAAA,CAAA,mDAAA,EACE,IAAiB,CAAA,iBAAA,CAAA,CAAA;AAAA,MACxB,eAAe,EAAA,IAAA,CAAA,UAAA;AAAA,MAChB,WAAU,EAAA,sBAAA;AAAA,KAAA,EAAA;uBAMV,MAAmE;AAAA,QAAnED,UAAmE,CAAA,IAAA,CAAA,MAAA,EAAA,uBAAA,EAAAE,cAAA,CAAAC,kBAAA,CAAA,EAAA,UAAA,EAAtB,IAAU,CAAA,UAAA,EAAA,CAAA,CAAA,EAAvD,MAAmE;AAAA,UAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAC,eAAA;AAAR,YAAA,GAAA;AAAA,YAAC,CAAA,CAAA;AAAA;AAAA,WAAA,CAAA;AAAA,SAAA,CAAA;;;;;;;;;;;"}
@@ -64,9 +64,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
64
64
  }, 1032, ["suggestion"])
65
65
  ], true)
66
66
  ]),
67
- _: 2
68
- /* DYNAMIC */
69
- }, 1032, ["suggestions", "class", "animation"])
67
+ _: 3
68
+ /* FORWARDED */
69
+ }, 8, ["suggestions", "class", "animation"])
70
70
  ]);
71
71
  }),
72
72
  128
@@ -1 +1 @@
1
- {"version":3,"file":"my-history.vue.js","sources":["../../../../../src/x-modules/history-queries/components/my-history.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" v-if=\"hasHistoryQueries\" class=\"x-my-history\" tag=\"ul\">\n <li\n v-for=\"(queries, date) in groupByDate\"\n :key=\"date\"\n class=\"x-my-history-item\"\n data-test=\"my-history-item\"\n >\n <slot name=\"date\" :date=\"date\">\n <span class=\"x-my-history-item__date\" data-test=\"my-history-date\">{{ date }}</span>\n </slot>\n <BaseSuggestions\n :suggestions=\"queries\"\n class=\"x-my-history-queries\"\n :class=\"queriesListClass\"\n data-test=\"my-history-queries\"\n :animation=\"animation\"\n >\n <template #default=\"{ suggestion, index }\">\n <!--\n @slot History Query item\n @binding {Suggestion} suggestion - History Query suggestion data\n @binding {number} index - History Query suggestion index\n @binding {() => string} formatTime - Callback to format time to `hh:mm [PM/AM]`\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, index, formatTime }\">\n <HistoryQuery\n :suggestion=\"suggestion\"\n data-test=\"history-query-item\"\n class=\"x-history-queries__item x-suggestion\"\n >\n <template #default>\n <!--\n @slot History Query content\n @binding {Suggestion} suggestion - History Query suggestion data\n @binding {number} index - History Query suggestion index\n @binding {() => string} formatTime - Callback to format time to `hh:mm [PM/AM]`\n -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, index, formatTime }\">\n {{ suggestion.query }} - {{ formatTime(suggestion.timestamp) }}\n </slot>\n </template>\n <template #remove-button-content>\n <!--\n @slot History Query remove button content\n @binding {Suggestion} suggestion - History Query suggestion data\n @binding {number} index - History Query suggestion index\n -->\n <slot name=\"suggestion-remove-content\" v-bind=\"{ suggestion, index }\" />\n </template>\n </HistoryQuery>\n </slot>\n </template>\n </BaseSuggestions>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\nimport type { HistoryQuery as HistoryQueryType } from '@empathyco/x-types'\nimport type { Dictionary } from '@empathyco/x-utils'\nimport type { SnippetConfig } from '../../../x-installer/api/api.types'\nimport { computed, defineComponent, inject } from 'vue'\nimport BaseSuggestions from '../../../components/suggestions/base-suggestions.vue'\nimport { useState } from '../../../composables/use-state'\nimport { AnimationProp } from '../../../types/index'\nimport { groupItemsBy, isArrayEmpty } from '../../../utils/array'\nimport { historyQueriesXModule } from '../x-module'\nimport HistoryQuery from './history-query.vue'\n\n/**\n * The component renders the full history of user searched queries grouped by the day\n * they were performed.\n *\n * @remarks\n *\n * Allows the user to select one of them, emitting the needed events.\n * A history query is just another type of suggestion that contains a query that the user has\n * made in the past.\n * @public\n */\nexport default defineComponent({\n name: 'MyHistory',\n xModule: historyQueriesXModule.name,\n components: {\n HistoryQuery,\n BaseSuggestions,\n },\n props: {\n /**\n * Animation component that will be used to animate the suggestions.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul',\n },\n /**\n * The current locale.\n *\n * @public\n */\n locale: {\n type: String,\n default: 'en',\n },\n /** Class inherited by content element. */\n queriesListClass: String,\n },\n setup(props) {\n /**\n * The list of history queries.\n *\n * @internal\n */\n const { historyQueries } = useState('historyQueries')\n\n /**\n * The provided {@link SnippetConfig}.\n *\n * @internal\n */\n const snippetConfig = inject<SnippetConfig | undefined>('snippetConfig')\n\n /**\n * The locale that it is going to be used. It can be the one send it by the snippet config or\n * the one pass it using the prop.\n *\n * @returns The locale to be used.\n * @internal\n */\n const usedLocale = computed(() => snippetConfig?.lang ?? props.locale)\n\n /**\n * Returns a record of history queries grouped by date.\n *\n * @example\n * ```typescript\n * const historyQueriesGrouped = {\n * 'Monday, January 10th, 2022' : [{\n * query: 'lego',\n * modelName: 'HistoryQuery',\n * timestamp: 121312312\n * }],\n * 'Tuesday, January 11th, 2022' : [{\n * query: 'barbie',\n * modelName: 'HistoryQuery',\n * timestamp: 15221212\n * }]\n * }\n * ```\n * @returns The history queries grouped by date.\n * @internal\n */\n const groupByDate = computed((): Dictionary<HistoryQueryType[]> => {\n return groupItemsBy(historyQueries.value as HistoryQueryType[], current => {\n return new Date(current.timestamp).toLocaleDateString(usedLocale.value, {\n day: 'numeric',\n weekday: 'long',\n month: 'long',\n year: 'numeric',\n })\n })\n })\n\n /**\n * Formats a timestamp into `hh:mm [PM/AM]` format.\n *\n * @example\n * ```typescript\n * // locale 'es'\n * console.log(formatTime(Date.now()) // '16:54'.\n *\n * // locale 'en'\n * console.log(formatTime(Date.now()) // '16:54 PM'.\n * ```\n * @param timestamp - The timestamp to format.\n * @returns The formatted time.\n * @internal\n */\n const formatTime = (timestamp: number) =>\n new Date(timestamp).toLocaleTimeString(usedLocale.value, {\n hour: '2-digit',\n minute: '2-digit',\n })\n\n /**\n * The `hasHistoryQueries` computed property is a flag representing if there are history queries\n * stored.\n *\n * @returns True if there are history queries; false otherwise.\n * @internal\n */\n const hasHistoryQueries = computed(\n () => !isArrayEmpty(historyQueries.value as HistoryQueryType[]),\n )\n\n return {\n hasHistoryQueries,\n groupByDate,\n historyQueries,\n formatTime,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-my-history {\n display: flex;\n flex-flow: column nowrap;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\nHere you have a basic example of how the MyHistory is rendered.\n\n```vue\n<template>\n <MyHistory />\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n}\n</script>\n```\n\n### Play with props\n\nIn this example, the my history has been configured to use the 'es' locale.\n\n```vue\n<template>\n <MyHistory :locale=\"es\" />\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n}\n</script>\n```\n\n### Play with the animation\n\n```vue\n<template>\n <MyHistory :animation=\"fadeAndSlide\" />\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\nimport { FadeAndSlide } from '@empathyco/x-components'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n data() {\n return {\n fadeAndSlide: FadeAndSlide,\n }\n },\n}\n</script>\n```\n\n### Play with suggestion slot\n\nIn this example, the [`HistoryQuery`](./x-components.history-query.md) component is passed in the\n`suggestion` slot (although any other component could potentially be passed).\n\n```vue\n<template>\n <MyHistory #suggestion=\"{ suggestion }\">\n <HistoryQuery :suggestion=\"suggestion\"></HistoryQuery>\n </MyHistory>\n</template>\n\n<script>\nimport { MyHistory, HistoryQuery } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n HistoryQuery,\n },\n}\n</script>\n```\n\n### Play with suggestion-content slot\n\nTo continue the previous example, the [`HistoryQuery`](./x-components.history-query.md) component is\npassed in the `suggestion-content` slot, but in addition, an HTML span tag for the text are also\npassed.\n\n```vue\n<template>\n <MyHistory #suggestion-content=\"{ suggestion }\">\n <span>{{ suggestion.query }}</span>\n </MyHistory>\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n}\n</script>\n```\n\n### Play with suggestion-content slot\n\nIn this example, an HTML span tag for the date are passed.\n\n```vue\n<template>\n <MyHistory #date=\"{ date }\">\n <span>{{ date }}</span>\n </MyHistory>\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n}\n</script>\n```\n\n### Play with suggestion-content-remove slot\n\nTo continue the previous example, the [`HistoryQuery`](./x-components.history-query.md) component is\npassed in the `suggestion-content` slot, but in addition, a cross icon is also passed to change the\nicon to remove the history query.\n\n```vue\n<template>\n <MyHistory #suggestion-content-remove=\"{ suggestion }\">\n <CrossIcon />\n </MyHistory>\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\nimport { CrossIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n CrossIcon,\n },\n}\n</script>\n```\n\n### Customizing the items with classes\n\nThe `queriesListClass` prop can be used to add classes to the suggestions list.\n\n```vue live\n<template>\n <MyHistory #date=\"{ date }\" queriesListClass=\"x-gap-16\" />\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_withCtx","_createElementBlock","_Fragment","_renderList","_renderSlot","_createElementVNode","_toDisplayString","_createVNode","_normalizeClass","_mergeProps","_createTextVNode","_createCommentVNode"],"mappings":";;;;;;EASc,KAAM,EAAA,yBAAA;AAAA,EAA0B,WAAU,EAAA,iBAAA;;;;;SARrB,IAAjC,CAAA,iBAAA,IAAAA,SAAA,EAAA,EAAAC,WAAA,CAsDYC,wBAtDI,IAAS,CAAA,SAAA,CAAA,EAAA;AAAA,IAD3B,GAAA,EAAA,CAAA;AAAA,IACsD,KAAM,EAAA,cAAA;AAAA,IAAe,GAAI,EAAA,IAAA;AAAA,GAAA,EAAA;AAD/E,IAAA,OAAA,EAAAC,OAAA,CAGM,MAAsC;AAAA,OADxCH,SAAA,CAAA,IAAA,CAAA,EAAAI,kBAAA;AAAA,QAoDKC,QAAA;AAAA,QAAA,IAAA;AAAA,QAtDTC,UAGgC,CAAA,IAAA,CAAA,WAAA,EAHhC,CAGc,OAAA,EAAS,IAAI,KAAA;8BADvBF,kBAoDK,CAAA,IAAA,EAAA;AAAA,YAlDF,GAAK,EAAA,IAAA;AAAA,YACN,KAAM,EAAA,mBAAA;AAAA,YACN,WAAU,EAAA,iBAAA;AAAA,WAAA,EAAA;YAEVG,UAEO,CAAA,IAAA,CAAA,MAAA,EAAA,MAAA,EAAA,EAFY,IAAU,EAAA,EAA7B,MAEO;AAAA,cADLC,kBAAA;AAAA,gBAAmF,MAAA;AAAA,gBAAnF,UAAA;AAAA,gBAAmFC,gBAAd,IAAI,CAAA;AAAA,gBAAA,CAAA;AAAA;AAAA,eAAA;AAAA,aAAA,EAAA,IAAA,CAAA;YAE3EC,WA0CkB,CAAA,0BAAA,EAAA;AAAA,cAzCf,WAAa,EAAA,OAAA;AAAA,cACd,KAAA,EAbRC,cAac,CAAA,CAAA,sBAAA,EACE,IAAgB,CAAA,gBAAA,CAAA,CAAA;AAAA,cACxB,WAAU,EAAA,oBAAA;AAAA,cACT,SAAW,EAAA,IAAA,CAAA,SAAA;AAAA,aAAA,EAAA;AAED,cAAA,OAAA,EAAOR,OAOhB,CAAA,CA0BO,EAjCa,UAAA,EAAY,KAAK,EAAA,KAAA;AAAA,gBAOrCI,UAAA,CA0BO,IA1BP,CAAA,MAAA,EAAA,YAAA,EAAAK,UAAA,CA0BO,EAnDjB,OAAA,EAAA,IAAA,EAAA,EAAA,EAyB4C,YAAY,KAAK,EAAA,UAAA,EAAE,IAAU,CAAA,UAAA,EAAA,CAAA,EAA/D,MA0BO;AAAA,kBAzBLF,WAwBe,CAAA,uBAAA,EAAA;AAAA,oBAvBZ,UAAA;AAAA,oBACD,WAAU,EAAA,oBAAA;AAAA,oBACV,KAAM,EAAA,sCAAA;AAAA,mBAAA,EAAA;AAEK,oBAAA,OAAA,EAAOP,QAOhB,MAEO;AAAA,sBAFPI,UAAA,CAEO,IAFP,CAAA,MAAA,EAAA,oBAAA,EAAAK,UAAA,CAEO,EAxCvB,OAAA,EAAA,IAAA,EAAA,EAAA,EAsC0D,YAAY,KAAK,EAAA,UAAA,EAAE,IAAU,CAAA,UAAA,EAAA,CAAA,EAAvE,MAEO;AAAA,wBAxCvBC,eAAA;AAAA,0BAAAJ,eAAA,CAuCqB,WAAW,KAAK,CAAA,GAAG,QAAGA,eAAG,CAAA,IAAA,CAAA,UAAA,CAAW,WAAW,SAAS,CAAA,CAAA;AAAA,0BAAA,CAAA;AAAA;AAAA,yBAAA;AAAA,uBAAA,EAAA,IAAA,CAAA;;AAGpD,oBAAA,uBAAA,EAAqBN,QAM9B,MAAwE;AAAA,sBAAxEI,WAAwE,IAAxE,CAAA,MAAA,EAAA,2BAAA,EAAAK,UAAA,CAAwE,EAhDxF,OAAA,EAAA,IAAA,EAAA,EAAA,EAgDiE,YAAY,KAAK,EAAA,CAAA,EAAA,KAAA,CAAA,EAAA,IAAA,CAAA;AAAA,qBAAA,CAAA;AAhDlF,oBAAA,CAAA,EAAA,CAAA;AAAA;AAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,CAAA;;;AAAA,cAAA,CAAA,EAAA,CAAA;AAAA;AAAA,aAAA,EAAA,IAAA,EAAA,CAAA,aAAA,EAAA,OAAA,EAAA,WAAA,CAAA,CAAA;;;;;;;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,CAAA,IAAAE,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"my-history.vue.js","sources":["../../../../../src/x-modules/history-queries/components/my-history.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" v-if=\"hasHistoryQueries\" class=\"x-my-history\" tag=\"ul\">\n <li\n v-for=\"(queries, date) in groupByDate\"\n :key=\"date\"\n class=\"x-my-history-item\"\n data-test=\"my-history-item\"\n >\n <slot name=\"date\" :date=\"date\">\n <span class=\"x-my-history-item__date\" data-test=\"my-history-date\">{{ date }}</span>\n </slot>\n <BaseSuggestions\n :suggestions=\"queries\"\n class=\"x-my-history-queries\"\n :class=\"queriesListClass\"\n data-test=\"my-history-queries\"\n :animation=\"animation\"\n >\n <template #default=\"{ suggestion, index }\">\n <!--\n @slot History Query item\n @binding {Suggestion} suggestion - History Query suggestion data\n @binding {number} index - History Query suggestion index\n @binding {() => string} formatTime - Callback to format time to `hh:mm [PM/AM]`\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, index, formatTime }\">\n <HistoryQuery\n :suggestion=\"suggestion\"\n data-test=\"history-query-item\"\n class=\"x-history-queries__item x-suggestion\"\n >\n <template #default>\n <!--\n @slot History Query content\n @binding {Suggestion} suggestion - History Query suggestion data\n @binding {number} index - History Query suggestion index\n @binding {() => string} formatTime - Callback to format time to `hh:mm [PM/AM]`\n -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, index, formatTime }\">\n {{ suggestion.query }} - {{ formatTime(suggestion.timestamp) }}\n </slot>\n </template>\n <template #remove-button-content>\n <!--\n @slot History Query remove button content\n @binding {Suggestion} suggestion - History Query suggestion data\n @binding {number} index - History Query suggestion index\n -->\n <slot name=\"suggestion-remove-content\" v-bind=\"{ suggestion, index }\" />\n </template>\n </HistoryQuery>\n </slot>\n </template>\n </BaseSuggestions>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\nimport type { HistoryQuery as HistoryQueryType } from '@empathyco/x-types'\nimport type { Dictionary } from '@empathyco/x-utils'\nimport type { SnippetConfig } from '../../../x-installer/api/api.types'\nimport { computed, defineComponent, inject } from 'vue'\nimport BaseSuggestions from '../../../components/suggestions/base-suggestions.vue'\nimport { useState } from '../../../composables/use-state'\nimport { AnimationProp } from '../../../types/index'\nimport { groupItemsBy, isArrayEmpty } from '../../../utils/array'\nimport { historyQueriesXModule } from '../x-module'\nimport HistoryQuery from './history-query.vue'\n\n/**\n * The component renders the full history of user searched queries grouped by the day\n * they were performed.\n *\n * @remarks\n *\n * Allows the user to select one of them, emitting the needed events.\n * A history query is just another type of suggestion that contains a query that the user has\n * made in the past.\n * @public\n */\nexport default defineComponent({\n name: 'MyHistory',\n xModule: historyQueriesXModule.name,\n components: {\n HistoryQuery,\n BaseSuggestions,\n },\n props: {\n /**\n * Animation component that will be used to animate the suggestions.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul',\n },\n /**\n * The current locale.\n *\n * @public\n */\n locale: {\n type: String,\n default: 'en',\n },\n /** Class inherited by content element. */\n queriesListClass: String,\n },\n setup(props) {\n /**\n * The list of history queries.\n *\n * @internal\n */\n const { historyQueries } = useState('historyQueries')\n\n /**\n * The provided {@link SnippetConfig}.\n *\n * @internal\n */\n const snippetConfig = inject<SnippetConfig | undefined>('snippetConfig')\n\n /**\n * The locale that it is going to be used. It can be the one send it by the snippet config or\n * the one pass it using the prop.\n *\n * @returns The locale to be used.\n * @internal\n */\n const usedLocale = computed(() => snippetConfig?.lang ?? props.locale)\n\n /**\n * Returns a record of history queries grouped by date.\n *\n * @example\n * ```typescript\n * const historyQueriesGrouped = {\n * 'Monday, January 10th, 2022' : [{\n * query: 'lego',\n * modelName: 'HistoryQuery',\n * timestamp: 121312312\n * }],\n * 'Tuesday, January 11th, 2022' : [{\n * query: 'barbie',\n * modelName: 'HistoryQuery',\n * timestamp: 15221212\n * }]\n * }\n * ```\n * @returns The history queries grouped by date.\n * @internal\n */\n const groupByDate = computed((): Dictionary<HistoryQueryType[]> => {\n return groupItemsBy(historyQueries.value as HistoryQueryType[], current => {\n return new Date(current.timestamp).toLocaleDateString(usedLocale.value, {\n day: 'numeric',\n weekday: 'long',\n month: 'long',\n year: 'numeric',\n })\n })\n })\n\n /**\n * Formats a timestamp into `hh:mm [PM/AM]` format.\n *\n * @example\n * ```typescript\n * // locale 'es'\n * console.log(formatTime(Date.now()) // '16:54'.\n *\n * // locale 'en'\n * console.log(formatTime(Date.now()) // '16:54 PM'.\n * ```\n * @param timestamp - The timestamp to format.\n * @returns The formatted time.\n * @internal\n */\n const formatTime = (timestamp: number) =>\n new Date(timestamp).toLocaleTimeString(usedLocale.value, {\n hour: '2-digit',\n minute: '2-digit',\n })\n\n /**\n * The `hasHistoryQueries` computed property is a flag representing if there are history queries\n * stored.\n *\n * @returns True if there are history queries; false otherwise.\n * @internal\n */\n const hasHistoryQueries = computed(\n () => !isArrayEmpty(historyQueries.value as HistoryQueryType[]),\n )\n\n return {\n hasHistoryQueries,\n groupByDate,\n historyQueries,\n formatTime,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-my-history {\n display: flex;\n flex-flow: column nowrap;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\nHere you have a basic example of how the MyHistory is rendered.\n\n```vue\n<template>\n <MyHistory />\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n}\n</script>\n```\n\n### Play with props\n\nIn this example, the my history has been configured to use the 'es' locale.\n\n```vue\n<template>\n <MyHistory :locale=\"es\" />\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n}\n</script>\n```\n\n### Play with the animation\n\n```vue\n<template>\n <MyHistory :animation=\"fadeAndSlide\" />\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\nimport { FadeAndSlide } from '@empathyco/x-components'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n data() {\n return {\n fadeAndSlide: FadeAndSlide,\n }\n },\n}\n</script>\n```\n\n### Play with suggestion slot\n\nIn this example, the [`HistoryQuery`](./x-components.history-query.md) component is passed in the\n`suggestion` slot (although any other component could potentially be passed).\n\n```vue\n<template>\n <MyHistory #suggestion=\"{ suggestion }\">\n <HistoryQuery :suggestion=\"suggestion\"></HistoryQuery>\n </MyHistory>\n</template>\n\n<script>\nimport { MyHistory, HistoryQuery } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n HistoryQuery,\n },\n}\n</script>\n```\n\n### Play with suggestion-content slot\n\nTo continue the previous example, the [`HistoryQuery`](./x-components.history-query.md) component is\npassed in the `suggestion-content` slot, but in addition, an HTML span tag for the text are also\npassed.\n\n```vue\n<template>\n <MyHistory #suggestion-content=\"{ suggestion }\">\n <span>{{ suggestion.query }}</span>\n </MyHistory>\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n}\n</script>\n```\n\n### Play with suggestion-content slot\n\nIn this example, an HTML span tag for the date are passed.\n\n```vue\n<template>\n <MyHistory #date=\"{ date }\">\n <span>{{ date }}</span>\n </MyHistory>\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n}\n</script>\n```\n\n### Play with suggestion-content-remove slot\n\nTo continue the previous example, the [`HistoryQuery`](./x-components.history-query.md) component is\npassed in the `suggestion-content` slot, but in addition, a cross icon is also passed to change the\nicon to remove the history query.\n\n```vue\n<template>\n <MyHistory #suggestion-content-remove=\"{ suggestion }\">\n <CrossIcon />\n </MyHistory>\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\nimport { CrossIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n CrossIcon,\n },\n}\n</script>\n```\n\n### Customizing the items with classes\n\nThe `queriesListClass` prop can be used to add classes to the suggestions list.\n\n```vue live\n<template>\n <MyHistory #date=\"{ date }\" queriesListClass=\"x-gap-16\" />\n</template>\n\n<script>\nimport { MyHistory } from '@empathyco/x-components/history-queries'\n\nexport default {\n name: 'MyHistoryDemo',\n components: {\n MyHistory,\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","_renderSlot","_createElementVNode","_toDisplayString","_createVNode","_normalizeClass","_withCtx","_mergeProps","_createTextVNode"],"mappings":";;;;;;EASc,KAAM,EAAA,yBAAA;AAAA,EAA0B,WAAU,EAAA,iBAAA;;;;;SARrB,IAAjC,CAAA,iBAAA,IAAAA,SAAA,EAAA,EAAAC,WAAA,CAsDYC,wBAtDI,IAAS,CAAA,SAAA,CAAA,EAAA;AAAA,IAAA,GAAA,EAAA,CAAA;IAA2B,KAAM,EAAA,cAAA;AAAA,IAAe,GAAI,EAAA,IAAA;AAAA,GAAA,EAAA;qBAEzE,MAAsC;AAAA,OADxCF,SAAA,CAAA,IAAA,CAAA,EAAAG,kBAAA;AAAA,QAoDKC,QAAA;AAAA,QAAA,IAAA;AAAA,QAnDuBC,UAAA,CAAA,IAAA,CAAA,WAAA,EAAW,CAA7B,OAAA,EAAS,IAAI,KAAA;8BADvBF,kBAoDK,CAAA,IAAA,EAAA;AAAA,YAlDF,GAAK,EAAA,IAAA;AAAA,YACN,KAAM,EAAA,mBAAA;AAAA,YACN,WAAU,EAAA,iBAAA;AAAA,WAAA,EAAA;YAEVG,UAEO,CAAA,IAAA,CAAA,MAAA,EAAA,MAAA,EAAA,EAFY,IAAU,EAAA,EAA7B,MAEO;AAAA,cADLC,kBAAA;AAAA,gBAAmF,MAAA;AAAA,gBAAnF,UAAA;AAAA,gBAAmFC,gBAAd,IAAI,CAAA;AAAA,gBAAA,CAAA;AAAA;AAAA,eAAA;AAAA,aAAA,EAAA,IAAA,CAAA;YAE3EC,WA0CkB,CAAA,0BAAA,EAAA;AAAA,cAzCf,WAAa,EAAA,OAAA;AAAA,cACd,KAAA,EAAKC,cAAC,CAAA,CAAA,sBAAA,EACE,IAAgB,CAAA,gBAAA,CAAA,CAAA;AAAA,cACxB,WAAU,EAAA,oBAAA;AAAA,cACT,SAAW,EAAA,IAAA,CAAA,SAAA;AAAA,aAAA,EAAA;AAED,cAAA,OAAA,EAAOC,OAOhB,CAAA,CA0BO,EAjCa,UAAA,EAAY,KAAK,EAAA,KAAA;AAAA,gBAOrCL,UAAA,CA0BO,2BA1BPM,UA0BO,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAA,EA1B2B,YAAY,KAAK,EAAA,UAAA,EAAE,IAAU,CAAA,UAAA,EAAA,CAAA,EAA/D,MA0BO;AAAA,kBAzBLH,WAwBe,CAAA,uBAAA,EAAA;AAAA,oBAvBZ,UAAA;AAAA,oBACD,WAAU,EAAA,oBAAA;AAAA,oBACV,KAAM,EAAA,sCAAA;AAAA,mBAAA,EAAA;AAEK,oBAAA,OAAA,EAAOE,QAOhB,MAEO;AAAA,sBAFPL,UAAA,CAEO,mCAFPM,UAEO,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAA,EAFmC,YAAY,KAAK,EAAA,UAAA,EAAE,IAAU,CAAA,UAAA,EAAA,CAAA,EAAvE,MAEO;AAAA,wBAAAC,eAAA;AADF,0BAAAL,eAAA,CAAA,UAAA,CAAW,KAAK,CAAG,GAAA,KAAA,GAAGA,eAAG,CAAA,IAAA,CAAA,UAAA,CAAW,WAAW,SAAS,CAAA,CAAA;AAAA,0BAAA,CAAA;AAAA;AAAA,yBAAA;AAAA,uBAAA,EAAA,IAAA,CAAA;;AAGpD,oBAAA,uBAAA,EAAqBG,QAM9B,MAAwE;AAAA,sBAAxEL,UAAwE,CAAA,IAAA,CAAA,MAAA,EAAA,2BAAA,EAAxEM,UAAwE,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAA,EAAvB,YAAY,KAAK,EAAA,CAAA,EAAA,KAAA,CAAA,EAAA,IAAA,CAAA;AAAA,qBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"remove-history-query.vue.js","sources":["../../../../../src/x-modules/history-queries/components/remove-history-query.vue"],"sourcesContent":["<template>\n <BaseEventButton\n class=\"x-remove-history-query\"\n :events=\"removeHistoryQueryEvent\"\n aria-label=\"remove\"\n >\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\nimport type { HistoryQuery } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent } from 'vue'\nimport BaseEventButton from '../../../components/base-event-button.vue'\nimport { historyQueriesXModule } from '../x-module'\n\n/**\n * Button that when it is pressed emits the\n * {@link HistoryQueriesXEvents.UserPressedRemoveHistoryQuery} event, expressing the user\n * intention to remove a query in the history.\n *\n * @public\n */\nexport default defineComponent({\n name: 'RemoveHistoryQuery',\n xModule: historyQueriesXModule.name,\n components: {\n BaseEventButton,\n },\n props: {\n /**\n * The historyQuery that will be removed when clicking the clear button.\n *\n * @public\n */\n historyQuery: {\n type: Object as PropType<HistoryQuery>,\n required: true,\n },\n },\n setup(props) {\n /**\n * The event handler that will be triggered when clicking on the clear history query button.\n *\n * @remarks\n * {@link HistoryQueriesXEvents.UserPressedRemoveHistoryQuery}: historyQuery\n *\n * @returns The {@link XEvent} to emit.\n * @public\n */\n const removeHistoryQueryEvent = computed(\n (): Partial<XEventsTypes> => ({ UserPressedRemoveHistoryQuery: props.historyQuery }),\n )\n\n return {\n removeHistoryQueryEvent,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserPressedRemoveHistoryQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the history query\n data.\n\n## Examples\n\n### Basic Example\n\nYou can customize the content that this component renders. To do so, simply use the default slot.\n\n```vue\n<RemoveHistoryQuery :historyQuery=\"historyQuery\">\n <img class=\"x-history-query__icon\" src=\"./my-awesome-clear-icon.svg\"/>\n</RemoveHistoryQuery>\n```\n</docs>\n"],"names":["_createBlock","_withCtx","_renderSlot"],"mappings":";;;;;;sBACEA,WAOkB,CAAA,0BAAA,EAAA;AAAA,IANhB,KAAM,EAAA,wBAAA;AAAA,IACL,MAAQ,EAAA,IAAA,CAAA,uBAAA;AAAA,IACT,YAAW,EAAA,QAAA;AAAA,GAAA,EAAA;AAJf,IAAA,OAAA,EAAAC,OAAA,CAOI,MAAQ;AAAA,MAARC,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,KAAA,CAAA;AAPZ,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,EAAA,CAAA,EAAA,CAAA,QAAA,CAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"remove-history-query.vue.js","sources":["../../../../../src/x-modules/history-queries/components/remove-history-query.vue"],"sourcesContent":["<template>\n <BaseEventButton\n class=\"x-remove-history-query\"\n :events=\"removeHistoryQueryEvent\"\n aria-label=\"remove\"\n >\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\nimport type { HistoryQuery } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent } from 'vue'\nimport BaseEventButton from '../../../components/base-event-button.vue'\nimport { historyQueriesXModule } from '../x-module'\n\n/**\n * Button that when it is pressed emits the\n * {@link HistoryQueriesXEvents.UserPressedRemoveHistoryQuery} event, expressing the user\n * intention to remove a query in the history.\n *\n * @public\n */\nexport default defineComponent({\n name: 'RemoveHistoryQuery',\n xModule: historyQueriesXModule.name,\n components: {\n BaseEventButton,\n },\n props: {\n /**\n * The historyQuery that will be removed when clicking the clear button.\n *\n * @public\n */\n historyQuery: {\n type: Object as PropType<HistoryQuery>,\n required: true,\n },\n },\n setup(props) {\n /**\n * The event handler that will be triggered when clicking on the clear history query button.\n *\n * @remarks\n * {@link HistoryQueriesXEvents.UserPressedRemoveHistoryQuery}: historyQuery\n *\n * @returns The {@link XEvent} to emit.\n * @public\n */\n const removeHistoryQueryEvent = computed(\n (): Partial<XEventsTypes> => ({ UserPressedRemoveHistoryQuery: props.historyQuery }),\n )\n\n return {\n removeHistoryQueryEvent,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserPressedRemoveHistoryQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the history query\n data.\n\n## Examples\n\n### Basic Example\n\nYou can customize the content that this component renders. To do so, simply use the default slot.\n\n```vue\n<RemoveHistoryQuery :historyQuery=\"historyQuery\">\n <img class=\"x-history-query__icon\" src=\"./my-awesome-clear-icon.svg\"/>\n</RemoveHistoryQuery>\n```\n</docs>\n"],"names":["_createBlock","_renderSlot"],"mappings":";;;;;;sBACEA,WAOkB,CAAA,0BAAA,EAAA;AAAA,IANhB,KAAM,EAAA,wBAAA;AAAA,IACL,MAAQ,EAAA,IAAA,CAAA,uBAAA;AAAA,IACT,YAAW,EAAA,QAAA;AAAA,GAAA,EAAA;qBAGX,MAAQ;AAAA,MAARC,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"identifier-result.vue.js","sources":["../../../../../src/x-modules/identifier-results/components/identifier-result.vue"],"sourcesContent":["<template>\n <span\n v-if=\"query\"\n class=\"x-identifier-result\"\n data-test=\"identifier-result\"\n v-html=\"highlightedQueryHTML\"\n ></span>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { computed, defineComponent } from 'vue'\nimport { useGetter } from '../../../composables/use-getter'\nimport { useState } from '../../../composables/use-state'\nimport { identifierResultsXModule } from '../x-module'\n\n/**\n * This component renders an identifier result value and highlights its matching part with the\n * query from the state. Receives as prop the {@link @empathyco/x-types#Result} data.\n *\n * @public\n */\nexport default defineComponent({\n name: 'IdentifierResult',\n xModule: identifierResultsXModule.name,\n props: {\n /**\n * (Required) The {@link @empathyco/x-types#Result} information.\n *\n * @public\n */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n },\n setup(props) {\n /**\n * Query from the module state.\n *\n * @public\n */\n const { query } = useState('identifierResults')\n\n /**\n * The RegExp with the current query from the state adding the separatorChars after each\n * matching character.\n *\n * @public\n */\n const identifierHighlightRegexp = useGetter('identifierResults').identifierHighlightRegexp\n\n /**\n * Highlights the matching part of the identifier result with the query from the state.\n *\n * @returns String - The identifier result s query with the matching part inside a `<span>` tag.\n * @public\n */\n const highlightedQueryHTML = computed(() => {\n const identifierValue = props.result.identifier?.value ?? ''\n if (identifierValue && identifierHighlightRegexp.value) {\n return identifierValue.replace(\n identifierHighlightRegexp.value,\n '<span class=\"x-identifier-result__matching-part\">$1</span>',\n )\n }\n return identifierValue\n })\n\n return {\n query,\n highlightedQueryHTML,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component renders an identifier result value and highlights its matching part with the query\nfrom the state. Receives as prop the result data\n\n### Basic usage:\n\n```vue\n<IdentifierResult v-bind=\"{ result }\" />\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_createCommentVNode"],"mappings":";;;;AAAA,MAAA,UAAA,GAAA,CAAA,WAAA,CAAA,CAAA;;AAEU,EAAA,OAAA,IAAA,CAAA,KAAA,IAAAA,SAAA,EAAA,EADRC,kBAKQ,CAAA,MAAA,EAAA;AAAA,IANV,GAAA,EAAA,CAAA;AAAA,IAGI,KAAM,EAAA,qBAAA;AAAA,IACN,WAAU,EAAA,mBAAA;AAAA,IACV,SAAQ,EAAA,IAAA,CAAA,oBAAA;AAAA,GALZ,EAAA,IAAA,EAAA,CAAA,EAAA,UAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"identifier-result.vue.js","sources":["../../../../../src/x-modules/identifier-results/components/identifier-result.vue"],"sourcesContent":["<template>\n <span\n v-if=\"query\"\n class=\"x-identifier-result\"\n data-test=\"identifier-result\"\n v-html=\"highlightedQueryHTML\"\n ></span>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { computed, defineComponent } from 'vue'\nimport { useGetter } from '../../../composables/use-getter'\nimport { useState } from '../../../composables/use-state'\nimport { identifierResultsXModule } from '../x-module'\n\n/**\n * This component renders an identifier result value and highlights its matching part with the\n * query from the state. Receives as prop the {@link @empathyco/x-types#Result} data.\n *\n * @public\n */\nexport default defineComponent({\n name: 'IdentifierResult',\n xModule: identifierResultsXModule.name,\n props: {\n /**\n * (Required) The {@link @empathyco/x-types#Result} information.\n *\n * @public\n */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n },\n setup(props) {\n /**\n * Query from the module state.\n *\n * @public\n */\n const { query } = useState('identifierResults')\n\n /**\n * The RegExp with the current query from the state adding the separatorChars after each\n * matching character.\n *\n * @public\n */\n const identifierHighlightRegexp = useGetter('identifierResults').identifierHighlightRegexp\n\n /**\n * Highlights the matching part of the identifier result with the query from the state.\n *\n * @returns String - The identifier result s query with the matching part inside a `<span>` tag.\n * @public\n */\n const highlightedQueryHTML = computed(() => {\n const identifierValue = props.result.identifier?.value ?? ''\n if (identifierValue && identifierHighlightRegexp.value) {\n return identifierValue.replace(\n identifierHighlightRegexp.value,\n '<span class=\"x-identifier-result__matching-part\">$1</span>',\n )\n }\n return identifierValue\n })\n\n return {\n query,\n highlightedQueryHTML,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component renders an identifier result value and highlights its matching part with the query\nfrom the state. Receives as prop the result data\n\n### Basic usage:\n\n```vue\n<IdentifierResult v-bind=\"{ result }\" />\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_createCommentVNode"],"mappings":";;;;;;AAEU,EAAA,OAAA,IAAA,CAAA,KAAA,IAAAA,SAAA,EAAA,EADRC,kBAKQ,CAAA,MAAA,EAAA;AAAA,IAAA,GAAA,EAAA,CAAA;IAHN,KAAM,EAAA,qBAAA;AAAA,IACN,WAAU,EAAA,mBAAA;AAAA,IACV,SAAQ,EAAA,IAAA,CAAA,oBAAA;AAAA,GAAA,EAAA,IAAA,EAAA,CAAA,EAAA,UAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"identifier-results.vue.js","sources":["../../../../../src/x-modules/identifier-results/components/identifier-results.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" v-if=\"identifierResults.length\" tag=\"ul\" class=\"x-identifier-results\">\n <li\n v-for=\"identifierResult in identifierResultsToRender\"\n :key=\"identifierResult.id\"\n class=\"x-identifier-results__item\"\n data-test=\"identifier-results-item\"\n >\n <!--\n @slot (Required) Identifier results item content\n @binding {Result} identifierResult - Identifier Result data\n -->\n <slot :identifier-result=\"identifierResult\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropsWithType } from '../../../utils/types'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent, provide } from 'vue'\nimport { useState } from '../../../composables/use-state'\nimport { AnimationProp } from '../../../types/animation-prop'\nimport { identifierResultsXModule } from '../x-module'\n\n/**\n * Paints the list of identifier results stored in the state. Each identifier result should be\n * represented by a {@link IdentifierResult} component besides any\n * other component.\n *\n * @public\n */\nexport default defineComponent({\n name: 'IdentifierResults',\n xModule: identifierResultsXModule.name,\n props: {\n /**\n * Animation component that will be used to animate the identifier results.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul',\n },\n /**\n * Number of identifier results to render.\n *\n * @public\n */\n maxItemsToRender: Number,\n },\n setup(props) {\n /**\n * The module's list of identifier results.\n *\n * @public\n */\n const { identifierResults } = useState('identifierResults')\n\n /**\n * The additional events to be emitted by the mandatory {@link BaseResultLink} component.\n *\n * @public\n */\n provide<PropsWithType<XEventsTypes, Result>[]>('resultClickExtraEvents', [\n 'UserClickedAIdentifierResult',\n ])\n\n /**\n * Slices the identifier results from the state.\n *\n * @returns - The list of identifier results sliced by the number of items to render.\n *\n * @internal\n */\n const identifierResultsToRender = computed(() =>\n (identifierResults.value as Result[]).slice(0, props.maxItemsToRender),\n )\n\n return {\n identifierResults,\n identifierResultsToRender,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-identifier-results {\n display: flex;\n flex-flow: column nowrap;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Play with slot\n\nA IdentifierResult **must** be used inside the IdentifierResults component. In the example below the\nBaseResultLink is used as a wrapper and its default slot is filled with the IdentifierResult\ncomponent.\n\n```vue\n<IdentifierResults :animation=\"fadeAndSlide\">\n <template #default=\"{ identifierResult }\">\n <BaseResultLink :result=\"identifierResult\">\n <template #default=\"{ result }\">\n <IdentifierResult :result=\"result\"/>\n </template>\n </BaseResultLink>\n </template>\n</IdentifierResults>\n```\n\n### Play with props\n\nIn this example, the identifier results have been limited to render a maximum of 3 items.\n\n```vue\n<template>\n <IdentifierResults #default=\"{ identifierResult }\" :maxItemsToRender=\"3\">\n <IdentifierResult :result=\"identifierResult\" />\n </IdentifierResults>\n</template>\n\n<script>\nimport { IdentifierResults, IdentifierResult } from '@empathyco/x-components'\n\nexport default {\n name: 'IdentifierResultsDemo',\n components: {\n IdentifierResults,\n IdentifierResult,\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_withCtx","_createElementBlock","_Fragment","_renderList","_renderSlot","_createCommentVNode"],"mappings":";;;;;;SACmC,IAAkB,CAAA,iBAAA,CAAA,MAAA,IAAAA,SAAA,EAAA,EAAnDC,WAaY,CAAAC,uBAAA,CAbI,IAAS,CAAA,SAAA,CAAA,EAAA;AAAA,IAD3B,GAAA,EAAA,CAAA;AAAA,IAC6D,GAAI,EAAA,IAAA;AAAA,IAAK,KAAM,EAAA,sBAAA;AAAA,GAAA,EAAA;AAD5E,IAAA,OAAA,EAAAC,OAAA,CAGM,MAAqD;AAAA,OADvDH,SAAA,CAAA,IAAA,CAAA,EAAAI,kBAAA;AAAA,QAWKC,QAAA;AAAA,QAAA,IAAA;AAAA,QAbTC,UAAA,CAGiC,IAHjC,CAAA,yBAAA,EAAA,CAGa,gBAAgB,KAAA;8BADzBF,kBAWK,CAAA,IAAA,EAAA;AAAA,YATF,KAAK,gBAAiB,CAAA,EAAA;AAAA,YACvB,KAAM,EAAA,4BAAA;AAAA,YACN,WAAU,EAAA,yBAAA;AAAA,WAAA,EAAA;AAMV,YAAAG,UAAA,CAA8C,0BAAvC,gBAAmC,EAAA,EAAA,KAAA,CAAA,EAAA,IAAA,CAAA;AAAA,WAAA,CAAA,CAAA;;;;;;AAZhD,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"identifier-results.vue.js","sources":["../../../../../src/x-modules/identifier-results/components/identifier-results.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" v-if=\"identifierResults.length\" tag=\"ul\" class=\"x-identifier-results\">\n <li\n v-for=\"identifierResult in identifierResultsToRender\"\n :key=\"identifierResult.id\"\n class=\"x-identifier-results__item\"\n data-test=\"identifier-results-item\"\n >\n <!--\n @slot (Required) Identifier results item content\n @binding {Result} identifierResult - Identifier Result data\n -->\n <slot :identifier-result=\"identifierResult\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropsWithType } from '../../../utils/types'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent, provide } from 'vue'\nimport { useState } from '../../../composables/use-state'\nimport { AnimationProp } from '../../../types/animation-prop'\nimport { identifierResultsXModule } from '../x-module'\n\n/**\n * Paints the list of identifier results stored in the state. Each identifier result should be\n * represented by a {@link IdentifierResult} component besides any\n * other component.\n *\n * @public\n */\nexport default defineComponent({\n name: 'IdentifierResults',\n xModule: identifierResultsXModule.name,\n props: {\n /**\n * Animation component that will be used to animate the identifier results.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul',\n },\n /**\n * Number of identifier results to render.\n *\n * @public\n */\n maxItemsToRender: Number,\n },\n setup(props) {\n /**\n * The module's list of identifier results.\n *\n * @public\n */\n const { identifierResults } = useState('identifierResults')\n\n /**\n * The additional events to be emitted by the mandatory {@link BaseResultLink} component.\n *\n * @public\n */\n provide<PropsWithType<XEventsTypes, Result>[]>('resultClickExtraEvents', [\n 'UserClickedAIdentifierResult',\n ])\n\n /**\n * Slices the identifier results from the state.\n *\n * @returns - The list of identifier results sliced by the number of items to render.\n *\n * @internal\n */\n const identifierResultsToRender = computed(() =>\n (identifierResults.value as Result[]).slice(0, props.maxItemsToRender),\n )\n\n return {\n identifierResults,\n identifierResultsToRender,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-identifier-results {\n display: flex;\n flex-flow: column nowrap;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Play with slot\n\nA IdentifierResult **must** be used inside the IdentifierResults component. In the example below the\nBaseResultLink is used as a wrapper and its default slot is filled with the IdentifierResult\ncomponent.\n\n```vue\n<IdentifierResults :animation=\"fadeAndSlide\">\n <template #default=\"{ identifierResult }\">\n <BaseResultLink :result=\"identifierResult\">\n <template #default=\"{ result }\">\n <IdentifierResult :result=\"result\"/>\n </template>\n </BaseResultLink>\n </template>\n</IdentifierResults>\n```\n\n### Play with props\n\nIn this example, the identifier results have been limited to render a maximum of 3 items.\n\n```vue\n<template>\n <IdentifierResults #default=\"{ identifierResult }\" :maxItemsToRender=\"3\">\n <IdentifierResult :result=\"identifierResult\" />\n </IdentifierResults>\n</template>\n\n<script>\nimport { IdentifierResults, IdentifierResult } from '@empathyco/x-components'\n\nexport default {\n name: 'IdentifierResultsDemo',\n components: {\n IdentifierResults,\n IdentifierResult,\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","_renderSlot"],"mappings":";;;;;;SACmC,IAAkB,CAAA,iBAAA,CAAA,MAAA,IAAAA,SAAA,EAAA,EAAnDC,WAaY,CAAAC,uBAAA,CAbI,IAAS,CAAA,SAAA,CAAA,EAAA;AAAA,IAAA,GAAA,EAAA,CAAA;IAAkC,GAAI,EAAA,IAAA;AAAA,IAAK,KAAM,EAAA,sBAAA;AAAA,GAAA,EAAA;qBAEtE,MAAqD;AAAA,OADvDF,SAAA,CAAA,IAAA,CAAA,EAAAG,kBAAA;AAAA,QAWKC,QAAA;AAAA,QAAA,IAAA;AAAA,QAVwBC,UAAA,CAAA,IAAA,CAAA,yBAAA,EAAyB,CAA7C,gBAAgB,KAAA;8BADzBF,kBAWK,CAAA,IAAA,EAAA;AAAA,YATF,KAAK,gBAAiB,CAAA,EAAA;AAAA,YACvB,KAAM,EAAA,4BAAA;AAAA,YACN,WAAU,EAAA,yBAAA;AAAA,WAAA,EAAA;AAMV,YAAAG,UAAA,CAA8C,0BAAvC,gBAAmC,EAAA,EAAA,KAAA,CAAA,EAAA,IAAA,CAAA;AAAA,WAAA,CAAA,CAAA;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"next-queries.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"renderedNextQueries\"\n data-test=\"next-queries\"\n class=\"x-next-queries\"\n >\n <template #default=\"baseScope\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Next Query item\n @binding {Object} v-bind - Next Query suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - Next Query suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - Next Query suggestion index\n @binding {boolean} highlightCurated - True if the curated NQs should be highlighted\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion\" v-bind=\"{ ...baseScope, highlightCurated }\">\n <NextQuery\n v-slot=\"nextQueryScope\"\n :suggestion=\"baseScope.suggestion\"\n :highlight-curated=\"highlightCurated\"\n class=\"x-next-queries__suggestion x-suggestion\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Next Query content\n @binding {Object} v-bind - Next Query suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - Next Query suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - Next Query suggestion index\n @binding {boolean} shouldHighlightCurated - True if the curated NQ should be highlighted\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion-content\" v-bind=\"{ ...baseScope, ...nextQueryScope }\" />\n </NextQuery>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\nimport type { NextQuery as NextQueryModel } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { computed, defineComponent } from 'vue'\nimport BaseSuggestions from '../../../components/suggestions/base-suggestions.vue'\nimport { useGetter } from '../../../composables/use-getter'\nimport { nextQueriesXModule } from '../x-module'\nimport NextQuery from './next-query.vue'\n\n/**\n * Simple next-queries component that renders a list of\n * [`BaseSuggestions`](./x-components.base-suggestions.md),\n * allowing the user to select one of them, and emitting the needed events. A next query is a\n * suggestion for a new search, related to your previous query. I.e. If people normally search\n * for `shirts`, and then `trousers`, `trousers` would be a next query of `shirts`.\n *\n * @public\n */\nexport default defineComponent({\n name: 'NextQueries',\n xModule: nextQueriesXModule.name,\n components: {\n NextQuery,\n BaseSuggestions,\n },\n props: {\n /**\n * Flag to indicate if the curated next queries should be displayed different.\n *\n * @public\n */\n highlightCurated: {\n type: Boolean,\n default: false,\n },\n /**\n * NextQueries list to be used instead of state NextQueries.\n *\n * @public\n */\n suggestions: Array as PropType<NextQueryModel[]>,\n },\n setup(props) {\n /**\n * The list of next queries from the state.\n *\n * @internal\n */\n const stateNextQueries = useGetter('nextQueries').nextQueries\n\n /**.\n * The list of next queries finally rendered\n *\n * @internal\n */\n const renderedNextQueries = computed(() => props.suggestions ?? stateNextQueries.value)\n\n return { renderedNextQueries }\n },\n})\n</script>\n\n<!--eslint-disable max-len -->\n<docs lang=\"mdx\">\n## Inherited props\n\nThis component inherits the [`BaseSuggestions`](../base-components/x-components.base-suggestions.md)\nprops.\n\n| Name | Description | Type | Default |\n| ------------------ | ----------------------------------------------------------------- | -------- | ------- |\n| `animation` | Animation component that will be used to animate the suggestions. | `Vue` | `\"ul\"` |\n| `maxItemsToRender` | Number of popular searches to be rendered. | `number` | |\n\n## Examples\n\n### Basic example\n\nYou don't need to pass any props, or slots. Simply add the component, and when it has any next\nqueries it will show them\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries />\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { NextQueries } from '@empathyco/x-components/next-queries'\n\nexport default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n },\n}\n</script>\n```\n\nThe component has three optional props. `animation` to render the component with an animation,\n`maxItemsToRender` to limit the number of next queries will be rendered (by default it is 5) and\n`highlightCurated` to indicate if the curated Next Queries inside the list should be highlighted.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries :animation=\"'FadeAndSlide'\" :maxItemsToRender=\"10\" :highlightCurated=\"true\" />\n </div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { NextQueries } from '@empathyco/x-components/next-queries'\nimport { FadeAndSlide } from '@empathyco/x-components'\n\n// Registering the animation as a global component\nVue.component('FadeAndSlide', FadeAndSlide)\nexport default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n },\n}\n</script>\n```\n\n### Overriding Next Queries' Content\n\nYou can use your custom implementation of the Next Query's content. In the example below, instead of\nusing the default Next Query's content, an icon is added, as well as a span with the query of the\nNext Query suggestion.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries>\n <template #suggestion-content=\"{ suggestion }\">\n <TrendingIcon />\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n </NextQueries>\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { NextQueries } from '@empathyco/x-components/next-queries'\nimport { TrendingIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n TrendingIcon,\n },\n}\n</script>\n```\n\n### Adding a custom next query component\n\nYou can use your custom implementation of a next query component. To work correctly, it should use\nthe `emitNextQuerySelected` function when the next query is selected. In the example below, instead\nof using the default `button` tag for a next query, an icon is added, and the text of the next query\nis wrapped in a `span`\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries>\n <template #suggestion=\"{ suggestion }\">\n <NextQuery :suggestion=\"suggestion\" class=\"x-next-queries__suggestion\">\n <template #default=\"{ suggestion }\">\n <TrendingIcon />\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n </NextQuery>\n <button>Custom Behaviour</button>\n </template>\n </NextQueries>\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { NextQueries, NextQuery } from '@empathyco/x-components/next-queries'\nimport { TrendingIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n NextQuery,\n TrendingIcon,\n },\n}\n</script>\n```\n</docs>\n"],"names":["_createBlock","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_createVNode"],"mappings":";;;;;;;sBACEA,WA+BkB,CAAA,0BAAA,EAAA;AAAA,IA9Bf,WAAa,EAAA,IAAA,CAAA,mBAAA;AAAA,IACd,WAAU,EAAA,cAAA;AAAA,IACV,KAAM,EAAA,gBAAA;AAAA,GAAA,EAAA;IAEK,OAAO,EAAAC,OAAA,CAQhB,CAgBO,SAxBoB,KAAA;AAAA,MAQ3BC,WAgBO,IA9Bb,CAAA,MAAA,EAAA,YAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAc2C,WAAS,gBAAE,EAAA,IAAA,CAAA,gBAAA,MAAhD,MAgBO;AAAA,QAfLC,WAcY,CAAA,oBAAA,EAAA;AAAA,UAZT,YAAY,SAAU,CAAA,UAAA;AAAA,UACtB,mBAAmB,EAAA,IAAA,CAAA,gBAAA;AAAA,UACpB,KAAM,EAAA,yCAAA;AAAA,SAAA,EAAA;AAnBhB,UAAA,OAAA,EAAAJ,OAAA,CA4BU,CAA+E,cAZzD,KAAA;AAAA,YAYtBC,UAA+E,CAAA,IAAA,CAAA,MAAA,EAAA,oBAAA,EA5BzFC,cA4BuD,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAS,GAAK,cAAc,EAAA,CAAA,CAAA,CAAA;AAAA,WAAA,CAAA;AA5BnF,UAAA,CAAA,EAAA,CAAA;AAAA;AAAA,SAAA,EAAA,IAAA,EAAA,CAAA,YAAA,EAAA,mBAAA,CAAA,CAAA;;;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,EAAA,CAAA,EAAA,CAAA,aAAA,CAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"next-queries.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"renderedNextQueries\"\n data-test=\"next-queries\"\n class=\"x-next-queries\"\n >\n <template #default=\"baseScope\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Next Query item\n @binding {Object} v-bind - Next Query suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - Next Query suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - Next Query suggestion index\n @binding {boolean} highlightCurated - True if the curated NQs should be highlighted\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion\" v-bind=\"{ ...baseScope, highlightCurated }\">\n <NextQuery\n v-slot=\"nextQueryScope\"\n :suggestion=\"baseScope.suggestion\"\n :highlight-curated=\"highlightCurated\"\n class=\"x-next-queries__suggestion x-suggestion\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Next Query content\n @binding {Object} v-bind - Next Query suggestion attributes:<br />&nbsp;&nbsp;- **suggestion** <code>Suggestion</code> - Next Query suggestion data<br />&nbsp;&nbsp;- **index** <code>number</code> - Next Query suggestion index\n @binding {boolean} shouldHighlightCurated - True if the curated NQ should be highlighted\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion-content\" v-bind=\"{ ...baseScope, ...nextQueryScope }\" />\n </NextQuery>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\nimport type { NextQuery as NextQueryModel } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { computed, defineComponent } from 'vue'\nimport BaseSuggestions from '../../../components/suggestions/base-suggestions.vue'\nimport { useGetter } from '../../../composables/use-getter'\nimport { nextQueriesXModule } from '../x-module'\nimport NextQuery from './next-query.vue'\n\n/**\n * Simple next-queries component that renders a list of\n * [`BaseSuggestions`](./x-components.base-suggestions.md),\n * allowing the user to select one of them, and emitting the needed events. A next query is a\n * suggestion for a new search, related to your previous query. I.e. If people normally search\n * for `shirts`, and then `trousers`, `trousers` would be a next query of `shirts`.\n *\n * @public\n */\nexport default defineComponent({\n name: 'NextQueries',\n xModule: nextQueriesXModule.name,\n components: {\n NextQuery,\n BaseSuggestions,\n },\n props: {\n /**\n * Flag to indicate if the curated next queries should be displayed different.\n *\n * @public\n */\n highlightCurated: {\n type: Boolean,\n default: false,\n },\n /**\n * NextQueries list to be used instead of state NextQueries.\n *\n * @public\n */\n suggestions: Array as PropType<NextQueryModel[]>,\n },\n setup(props) {\n /**\n * The list of next queries from the state.\n *\n * @internal\n */\n const stateNextQueries = useGetter('nextQueries').nextQueries\n\n /**.\n * The list of next queries finally rendered\n *\n * @internal\n */\n const renderedNextQueries = computed(() => props.suggestions ?? stateNextQueries.value)\n\n return { renderedNextQueries }\n },\n})\n</script>\n\n<!--eslint-disable max-len -->\n<docs lang=\"mdx\">\n## Inherited props\n\nThis component inherits the [`BaseSuggestions`](../base-components/x-components.base-suggestions.md)\nprops.\n\n| Name | Description | Type | Default |\n| ------------------ | ----------------------------------------------------------------- | -------- | ------- |\n| `animation` | Animation component that will be used to animate the suggestions. | `Vue` | `\"ul\"` |\n| `maxItemsToRender` | Number of popular searches to be rendered. | `number` | |\n\n## Examples\n\n### Basic example\n\nYou don't need to pass any props, or slots. Simply add the component, and when it has any next\nqueries it will show them\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries />\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { NextQueries } from '@empathyco/x-components/next-queries'\n\nexport default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n },\n}\n</script>\n```\n\nThe component has three optional props. `animation` to render the component with an animation,\n`maxItemsToRender` to limit the number of next queries will be rendered (by default it is 5) and\n`highlightCurated` to indicate if the curated Next Queries inside the list should be highlighted.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries :animation=\"'FadeAndSlide'\" :maxItemsToRender=\"10\" :highlightCurated=\"true\" />\n </div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { NextQueries } from '@empathyco/x-components/next-queries'\nimport { FadeAndSlide } from '@empathyco/x-components'\n\n// Registering the animation as a global component\nVue.component('FadeAndSlide', FadeAndSlide)\nexport default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n },\n}\n</script>\n```\n\n### Overriding Next Queries' Content\n\nYou can use your custom implementation of the Next Query's content. In the example below, instead of\nusing the default Next Query's content, an icon is added, as well as a span with the query of the\nNext Query suggestion.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries>\n <template #suggestion-content=\"{ suggestion }\">\n <TrendingIcon />\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n </NextQueries>\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { NextQueries } from '@empathyco/x-components/next-queries'\nimport { TrendingIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n TrendingIcon,\n },\n}\n</script>\n```\n\n### Adding a custom next query component\n\nYou can use your custom implementation of a next query component. To work correctly, it should use\nthe `emitNextQuerySelected` function when the next query is selected. In the example below, instead\nof using the default `button` tag for a next query, an icon is added, and the text of the next query\nis wrapped in a `span`\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries>\n <template #suggestion=\"{ suggestion }\">\n <NextQuery :suggestion=\"suggestion\" class=\"x-next-queries__suggestion\">\n <template #default=\"{ suggestion }\">\n <TrendingIcon />\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n </NextQuery>\n <button>Custom Behaviour</button>\n </template>\n </NextQueries>\n </div>\n</template>\n\n<script>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { NextQueries, NextQuery } from '@empathyco/x-components/next-queries'\nimport { TrendingIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n NextQuery,\n TrendingIcon,\n },\n}\n</script>\n```\n</docs>\n"],"names":["_createBlock","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_createVNode"],"mappings":";;;;;;;sBACEA,WA+BkB,CAAA,0BAAA,EAAA;AAAA,IA9Bf,WAAa,EAAA,IAAA,CAAA,mBAAA;AAAA,IACd,WAAU,EAAA,cAAA;AAAA,IACV,KAAM,EAAA,gBAAA;AAAA,GAAA,EAAA;IAEK,OAAO,EAAAC,OAAA,CAQhB,CAgBO,SAxBoB,KAAA;AAAA,MAQ3BC,WAgBO,IAhB8B,CAAA,MAAA,EAAA,YAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAS,gBAAE,EAAA,IAAA,CAAA,gBAAA,MAAhD,MAgBO;AAAA,QAfLC,WAcY,CAAA,oBAAA,EAAA;AAAA,UAZT,YAAY,SAAU,CAAA,UAAA;AAAA,UACtB,mBAAmB,EAAA,IAAA,CAAA,gBAAA;AAAA,UACpB,KAAM,EAAA,yCAAA;AAAA,SAAA,EAAA;AASN,UAAA,OAAA,EAAAJ,OAAA,CAAA,CAA+E,cAZzD,KAAA;AAAA,YAYtBC,UAA+E,CAAA,IAAA,CAAA,MAAA,EAAA,oBAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAAlC,SAAS,EAAA,GAAK,cAAc,EAAA,CAAA,CAAA,CAAA;AAAA,WAAA,CAAA;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"next-query-preview.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-query-preview.vue"],"sourcesContent":["<template>\n <ul v-if=\"suggestionResults\" data-test=\"next-query-preview\" class=\"x-next-query-preview\">\n <!--\n @slot Next Query Preview default slot.\n @binding {NextQuery} suggestion - Next Query suggestion data\n @binding {Result[]} results - The results preview of the next query\n @binding {number} totalResults - The total results of the search request\n -->\n <slot\n :suggestion=\"suggestion\"\n :results=\"suggestionResults.items\"\n :total-results=\"suggestionResults.totalResults\"\n >\n <li\n v-for=\"result in suggestionResults.items\"\n :key=\"result.id\"\n class=\"x-next-query-preview__item\"\n data-test=\"next-query-preview-item\"\n >\n <!--\n @slot Next Query Preview result slot.\n @binding {Result} result - A Next Query Preview result\n -->\n <slot name=\"result\" :result=\"result\">\n <span data-test=\"result-name\">{{ result.name }}</span>\n </slot>\n </li>\n </slot>\n </ul>\n</template>\n\n<script lang=\"ts\">\nimport type { NextQuery, PreviewResults } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { computed, defineComponent, onMounted } from 'vue'\nimport { use$x } from '../../../composables/use-$x'\nimport { useState } from '../../../composables/use-state'\nimport { nextQueriesXModule } from '../x-module'\n\n/**\n * Retrieves a preview of the results of a next query and exposes them in the default slot,\n * along with the next query and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\nexport default defineComponent({\n name: 'NextQueryPreview',\n xModule: nextQueriesXModule.name,\n props: {\n /**\n * The next query to retrieve the results preview.\n *\n * @public\n */\n suggestion: {\n type: Object as PropType<NextQuery>,\n required: true,\n },\n /**\n * Number of suggestion results to be rendered.\n *\n * @public\n */\n maxItemsToRender: Number,\n },\n setup(props) {\n const $x = use$x()\n /**\n * The results preview of the next queries mounted.\n * It is a dictionary, indexed by the next query query.\n */\n const { resultsPreview } = useState('nextQueries')\n\n /**\n * The component emits the NextQueryPreviewMountedHook event to retrieve the results preview\n * of the next query.\n */\n onMounted(() => $x.emit('NextQueryPreviewMountedHook', props.suggestion.query))\n\n /**\n * Gets from the state the results preview of the next query.\n *\n * @returns The results preview of the actual next query.\n */\n const suggestionResults = computed((): PreviewResults | undefined => {\n const previewResults = resultsPreview.value[props.suggestion.query] as PreviewResults\n\n return previewResults\n ? {\n ...previewResults,\n items: previewResults.items.slice(0, props.maxItemsToRender),\n }\n : undefined\n })\n\n return { suggestionResults }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the\n[`NextQueryPreviewMountedHook`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\nwhen it is mounted.\n\n## See it in action\n\nHere you have a basic example of how the NextQueryPreview is rendered. Keep in mind that this\ncomponent is intended to be used overriding its default slot. By default it will only render the\nnames of the results.\n\n```vue live\n<template>\n <NextQueryPreview :suggestion=\"suggestion\" />\n</template>\n\n<script>\nimport { NextQueryPreview } from '@empathyco/x-components/next-queries'\n\nexport default {\n name: 'NextQueryPreviewDemo',\n components: {\n NextQueryPreview,\n },\n data() {\n return {\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <NextQueryPreview :suggestion=\"suggestion\" #default=\"{ totalResults, results }\">\n <p>Total results: {{ totalResults }}</p>\n <SlidingPanel :resetOnContentChange=\"false\">\n <article\n v-for=\"result in results\"\n :key=\"result.id\"\n class=\"x-result\"\n style=\"max-width: 300px; overflow: hidden\"\n >\n <BaseResultLink :result=\"result\">\n <BaseResultImage :result=\"result\" class=\"x-result__picture\" />\n </BaseResultLink>\n <div class=\"x-result__description\">\n <BaseResultLink :result=\"result\">\n <h1 class=\"x-title3\">{{ result.name }}</h1>\n </BaseResultLink>\n </div>\n </article>\n </SlidingPanel>\n </NextQueryPreview>\n</template>\n\n<script>\nimport { NextQueryPreview } from '@empathyco/x-components/next-queries'\nimport { SlidingPanel, BaseResultLink, BaseResultImage } from '@empathyco/x-components'\n\nexport default {\n name: 'NextQueryPreviewDemoOverridingSlot',\n components: {\n NextQueryPreview,\n SlidingPanel,\n BaseResultLink,\n BaseResultImage,\n },\n data() {\n return {\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <NextQueryPreview :suggestion=\"suggestion\" #result=\"{ result }\">\n <span>{{ result.id }}</span>\n <span>{{ result.name }}</span>\n </NextQueryPreview>\n</template>\n\n<script>\nimport { NextQueryPreview } from '@empathyco/x-components/next-queries'\n\nexport default {\n name: 'NextQueryPreviewDemoOverridingResultSlot',\n components: {\n NextQueryPreview,\n },\n data() {\n return {\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Play with props\n\nIn this example, the suggestions has been limited to render a maximum of 4 items.\n\n```vue\n<template>\n <NextQueryPreview\n :maxItemsToRender=\"maxItemsToRender\"\n :suggestion=\"suggestion\"\n #default=\"{ results }\"\n >\n <BaseGrid #default=\"{ item }\" :items=\"results\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n </BaseResultLink>\n </BaseGrid>\n </NextQueryPreview>\n</template>\n\n<script>\nimport { BaseGrid, BaseResultImage, BaseResultLink } from '@empathyco/x-components'\nimport { NextQueryPreview } from '@empathyco/x-components/next-queries'\n\nexport default {\n name: 'NextQueryPreviewDemo',\n components: {\n BaseGrid,\n BaseResultImage,\n BaseResultLink,\n NextQueryPreview,\n },\n data() {\n return {\n maxItemsToRender: 4,\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_renderSlot","_Fragment","_renderList","_createElementVNode","_toDisplayString","_createCommentVNode"],"mappings":";;;;;AAAA,EAAA,GAAA,EAAA,CAAA;AAAA,EAC+B,WAAU,EAAA,oBAAA;AAAA,EAAqB,KAAM,EAAA,sBAAA;;AAuBpD,MAAA,UAAA,GAAA,EAAA,WAAA,EAAU,aAAa,EAAA,CAAA;;SAvB3B,IAAV,CAAA,iBAAA,IAAAA,SAAA,EAAA,EAAAC,kBAAA,CA2BK,MA3BL,UA2BK,EAAA;AAAA,IApBHC,UAmBO,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA;AAAA,MAlBJ,UAAY,EAAA,IAAA,CAAA,UAAA;AAAA,MACZ,SAAS,IAAkB,CAAA,iBAAA,CAAA,KAAA;AAAA,MAC3B,cAAe,IAAkB,CAAA,iBAAA,CAAA,YAAA;AAAA,KAAA,EAHpC,MAmBO;AAAA,OAdLF,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA;AAAA,QAaKE,QAAA;AAAA,QAAA,IAAA;AAAA,QA1BXC,UAcyB,CAAA,IAAA,CAAA,iBAAA,CAAkB,KAd3C,EAAA,CAce,MAAM,KAAA;8BADfH,kBAaK,CAAA,IAAA,EAAA;AAAA,YAXF,KAAK,MAAO,CAAA,EAAA;AAAA,YACb,KAAM,EAAA,4BAAA;AAAA,YACN,WAAU,EAAA,yBAAA;AAAA,WAAA,EAAA;YAMVC,UAEO,CAAA,IAAA,CAAA,MAAA,EAAA,QAAA,EAAA,EAFc,MAAc,EAAA,EAAnC,MAEO;AAAA,cADLG,kBAAA;AAAA,gBAAsD,MAAA;AAAA,gBAAtD,UAAA;AAAA,gBAAsDC,eAAA,CAArB,OAAO,IAAI,CAAA;AAAA,gBAAA,CAAA;AAAA;AAAA,eAAA;AAAA,aAAA,CAAA;;;;;;;AAxBtD,GAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"next-query-preview.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-query-preview.vue"],"sourcesContent":["<template>\n <ul v-if=\"suggestionResults\" data-test=\"next-query-preview\" class=\"x-next-query-preview\">\n <!--\n @slot Next Query Preview default slot.\n @binding {NextQuery} suggestion - Next Query suggestion data\n @binding {Result[]} results - The results preview of the next query\n @binding {number} totalResults - The total results of the search request\n -->\n <slot\n :suggestion=\"suggestion\"\n :results=\"suggestionResults.items\"\n :total-results=\"suggestionResults.totalResults\"\n >\n <li\n v-for=\"result in suggestionResults.items\"\n :key=\"result.id\"\n class=\"x-next-query-preview__item\"\n data-test=\"next-query-preview-item\"\n >\n <!--\n @slot Next Query Preview result slot.\n @binding {Result} result - A Next Query Preview result\n -->\n <slot name=\"result\" :result=\"result\">\n <span data-test=\"result-name\">{{ result.name }}</span>\n </slot>\n </li>\n </slot>\n </ul>\n</template>\n\n<script lang=\"ts\">\nimport type { NextQuery, PreviewResults } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { computed, defineComponent, onMounted } from 'vue'\nimport { use$x } from '../../../composables/use-$x'\nimport { useState } from '../../../composables/use-state'\nimport { nextQueriesXModule } from '../x-module'\n\n/**\n * Retrieves a preview of the results of a next query and exposes them in the default slot,\n * along with the next query and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\nexport default defineComponent({\n name: 'NextQueryPreview',\n xModule: nextQueriesXModule.name,\n props: {\n /**\n * The next query to retrieve the results preview.\n *\n * @public\n */\n suggestion: {\n type: Object as PropType<NextQuery>,\n required: true,\n },\n /**\n * Number of suggestion results to be rendered.\n *\n * @public\n */\n maxItemsToRender: Number,\n },\n setup(props) {\n const $x = use$x()\n /**\n * The results preview of the next queries mounted.\n * It is a dictionary, indexed by the next query query.\n */\n const { resultsPreview } = useState('nextQueries')\n\n /**\n * The component emits the NextQueryPreviewMountedHook event to retrieve the results preview\n * of the next query.\n */\n onMounted(() => $x.emit('NextQueryPreviewMountedHook', props.suggestion.query))\n\n /**\n * Gets from the state the results preview of the next query.\n *\n * @returns The results preview of the actual next query.\n */\n const suggestionResults = computed((): PreviewResults | undefined => {\n const previewResults = resultsPreview.value[props.suggestion.query] as PreviewResults\n\n return previewResults\n ? {\n ...previewResults,\n items: previewResults.items.slice(0, props.maxItemsToRender),\n }\n : undefined\n })\n\n return { suggestionResults }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the\n[`NextQueryPreviewMountedHook`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\nwhen it is mounted.\n\n## See it in action\n\nHere you have a basic example of how the NextQueryPreview is rendered. Keep in mind that this\ncomponent is intended to be used overriding its default slot. By default it will only render the\nnames of the results.\n\n```vue live\n<template>\n <NextQueryPreview :suggestion=\"suggestion\" />\n</template>\n\n<script>\nimport { NextQueryPreview } from '@empathyco/x-components/next-queries'\n\nexport default {\n name: 'NextQueryPreviewDemo',\n components: {\n NextQueryPreview,\n },\n data() {\n return {\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <NextQueryPreview :suggestion=\"suggestion\" #default=\"{ totalResults, results }\">\n <p>Total results: {{ totalResults }}</p>\n <SlidingPanel :resetOnContentChange=\"false\">\n <article\n v-for=\"result in results\"\n :key=\"result.id\"\n class=\"x-result\"\n style=\"max-width: 300px; overflow: hidden\"\n >\n <BaseResultLink :result=\"result\">\n <BaseResultImage :result=\"result\" class=\"x-result__picture\" />\n </BaseResultLink>\n <div class=\"x-result__description\">\n <BaseResultLink :result=\"result\">\n <h1 class=\"x-title3\">{{ result.name }}</h1>\n </BaseResultLink>\n </div>\n </article>\n </SlidingPanel>\n </NextQueryPreview>\n</template>\n\n<script>\nimport { NextQueryPreview } from '@empathyco/x-components/next-queries'\nimport { SlidingPanel, BaseResultLink, BaseResultImage } from '@empathyco/x-components'\n\nexport default {\n name: 'NextQueryPreviewDemoOverridingSlot',\n components: {\n NextQueryPreview,\n SlidingPanel,\n BaseResultLink,\n BaseResultImage,\n },\n data() {\n return {\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <NextQueryPreview :suggestion=\"suggestion\" #result=\"{ result }\">\n <span>{{ result.id }}</span>\n <span>{{ result.name }}</span>\n </NextQueryPreview>\n</template>\n\n<script>\nimport { NextQueryPreview } from '@empathyco/x-components/next-queries'\n\nexport default {\n name: 'NextQueryPreviewDemoOverridingResultSlot',\n components: {\n NextQueryPreview,\n },\n data() {\n return {\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Play with props\n\nIn this example, the suggestions has been limited to render a maximum of 4 items.\n\n```vue\n<template>\n <NextQueryPreview\n :maxItemsToRender=\"maxItemsToRender\"\n :suggestion=\"suggestion\"\n #default=\"{ results }\"\n >\n <BaseGrid #default=\"{ item }\" :items=\"results\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n </BaseResultLink>\n </BaseGrid>\n </NextQueryPreview>\n</template>\n\n<script>\nimport { BaseGrid, BaseResultImage, BaseResultLink } from '@empathyco/x-components'\nimport { NextQueryPreview } from '@empathyco/x-components/next-queries'\n\nexport default {\n name: 'NextQueryPreviewDemo',\n components: {\n BaseGrid,\n BaseResultImage,\n BaseResultLink,\n NextQueryPreview,\n },\n data() {\n return {\n maxItemsToRender: 4,\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_renderSlot","_Fragment","_renderList","_createElementVNode","_toDisplayString"],"mappings":";;;;;;EAC+B,WAAU,EAAA,oBAAA;AAAA,EAAqB,KAAM,EAAA,sBAAA;;AAuBpD,MAAA,UAAA,GAAA,EAAA,WAAA,EAAU,aAAa,EAAA,CAAA;;SAvB3B,IAAV,CAAA,iBAAA,IAAAA,SAAA,EAAA,EAAAC,kBAAA,CA2BK,MA3BL,UA2BK,EAAA;AAAA,IApBHC,UAmBO,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA;AAAA,MAlBJ,UAAY,EAAA,IAAA,CAAA,UAAA;AAAA,MACZ,SAAS,IAAkB,CAAA,iBAAA,CAAA,KAAA;AAAA,MAC3B,cAAe,IAAkB,CAAA,iBAAA,CAAA,YAAA;AAAA,KAAA,EAHpC,MAmBO;AAAA,OAdLF,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA;AAAA,QAaKE,QAAA;AAAA,QAAA,IAAA;AAAA,QAZcC,UAAA,CAAA,IAAA,CAAA,iBAAA,CAAkB,KAAK,EAAA,CAAjC,MAAM,KAAA;8BADfH,kBAaK,CAAA,IAAA,EAAA;AAAA,YAXF,KAAK,MAAO,CAAA,EAAA;AAAA,YACb,KAAM,EAAA,4BAAA;AAAA,YACN,WAAU,EAAA,yBAAA;AAAA,WAAA,EAAA;YAMVC,UAEO,CAAA,IAAA,CAAA,MAAA,EAAA,QAAA,EAAA,EAFc,MAAc,EAAA,EAAnC,MAEO;AAAA,cADLG,kBAAA;AAAA,gBAAsD,MAAA;AAAA,gBAAtD,UAAA;AAAA,gBAAsDC,eAAA,CAArB,OAAO,IAAI,CAAA;AAAA,gBAAA,CAAA;AAAA;AAAA,eAAA;AAAA,aAAA,CAAA;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"next-query.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-query.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n v-slot=\"baseScope\"\n class=\"x-next-query\"\n :suggestion=\"suggestion\"\n :suggestion-selected-events=\"events\"\n data-test=\"next-query\"\n feature=\"next_query\"\n :class=\"{ 'x-next-query--is-curated': shouldHighlightCurated }\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Next Query content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter \\| undefined</code> - Suggestion's filter\n @binding {boolean} shouldHighlightCurated - True if the curated NQ should be highlighted\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope, shouldHighlightCurated }\" />\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\nimport type { NextQuery as NextQueryModel } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent } from 'vue'\nimport BaseSuggestion from '../../../components/suggestions/base-suggestion.vue'\nimport { nextQueriesXModule } from '../x-module'\n\n/**\n * Renders a next query item which receives the suggestion that will be rendered as a prop. It\n * exposes a default slot to change the next query content. If the slot is not overridden,\n * it will render the suggestion query by default.\n *\n * @public\n */\nexport default defineComponent({\n name: 'NextQuery',\n xModule: nextQueriesXModule.name,\n components: { BaseSuggestion },\n props: {\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n suggestion: {\n type: Object as PropType<NextQueryModel>,\n required: true,\n },\n /**\n * Indicates if the curated next query should be highlighted.\n *\n * @public\n */\n highlightCurated: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n /**\n * Events list which are going to be emitted when a next query is selected.\n *\n * @returns The {@link XEvent} to emit.\n * @public\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserSelectedANextQuery: props.suggestion }),\n )\n\n /**\n * Checks if the next query is curated and if it should be highlighted.\n *\n * @returns True if the next query is curated and should be highlighted.\n *\n * @internal\n */\n const shouldHighlightCurated = computed(\n () => props.highlightCurated && (props.suggestion.isCurated ?? false),\n )\n\n return {\n events,\n shouldHighlightCurated,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Dynamic Classes\n\n`NextQuery` uses the following dynamic CSS classes so you can style it when is:\n\n- Curated: `x-next-query--is-curated`.\n\n## Events\n\nA list of events that the component will emit:\n\n- [`UserSelectedANextQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the next query data.\n\n## Examples\n\nThis components expects just a suggestion as a prop to be rendered. It has a slot to override the\ncontent. By default, it renders the suggestion query of the next query. It also has an optional\nprop, `highlightCurated`, to indicate if the curated Next Queries should be differentiated with a\nCSS class.\n\n### Basic Usage\n\nUsing default slot:\n\n```vue live\n<template>\n <NextQuery :suggestion=\"suggestion\" />\n</template>\n\n<script>\nimport { NextQuery } from '@empathyco/x-components/next-queries'\n\nexport default {\n name: 'NextQueryDemo',\n components: {\n NextQuery,\n },\n data() {\n return {\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Overriding default slot.\n\nThe default slot allows you to replace the content of the suggestion button.\n\n```vue live\n<template>\n <NextQuery :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <TrendingIcon />\n <span class=\"x-next-query__query\" :aria-label=\"suggestion.query\">{{ suggestion.query }}</span>\n </template>\n </NextQuery>\n</template>\n\n<script>\nimport { NextQuery } from '@empathyco/x-components/next-queries'\nimport { TrendingIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'NextQueryDemo',\n components: {\n NextQuery,\n TrendingIcon,\n },\n data() {\n return {\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n</docs>\n"],"names":["_createBlock","_normalizeClass","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps"],"mappings":";;;;;;sBACEA,WAiBiB,CAAA,yBAAA,EAAA;AAAA,IAff,KAHJ,EAAAC,cAAA,CAAA,CAGU,cAAc,EAAA,EAAA,0BAAA,EAKkB,IAAsB,CAAA,sBAAA,EAAA,CAAA,CAAA;AAAA,IAJ3D,UAAY,EAAA,IAAA,CAAA,UAAA;AAAA,IACZ,4BAA4B,EAAA,IAAA,CAAA,MAAA;AAAA,IAC7B,WAAU,EAAA,YAAA;AAAA,IACV,OAAQ,EAAA,YAAA;AAAA,GAAA,EAAA;AAPZ,IAAA,OAAA,EAAAC,OAAA,CAiBI,CAA0D,SAfzC,KAAA;AAAA,MAejBC,UAA0D,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAjB9DC,cAiBuB,CAAAC,kBAAA,CAAA,EAAA,GAAA,SAAA,EAAS,wBAAE,IAAsB,CAAA,sBAAA,EAAA,CAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAjBxD,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,EAAA,CAAA,EAAA,CAAA,YAAA,EAAA,4BAAA,EAAA,OAAA,CAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"next-query.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-query.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n v-slot=\"baseScope\"\n class=\"x-next-query\"\n :suggestion=\"suggestion\"\n :suggestion-selected-events=\"events\"\n data-test=\"next-query\"\n feature=\"next_query\"\n :class=\"{ 'x-next-query--is-curated': shouldHighlightCurated }\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Next Query content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter \\| undefined</code> - Suggestion's filter\n @binding {boolean} shouldHighlightCurated - True if the curated NQ should be highlighted\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope, shouldHighlightCurated }\" />\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\nimport type { NextQuery as NextQueryModel } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent } from 'vue'\nimport BaseSuggestion from '../../../components/suggestions/base-suggestion.vue'\nimport { nextQueriesXModule } from '../x-module'\n\n/**\n * Renders a next query item which receives the suggestion that will be rendered as a prop. It\n * exposes a default slot to change the next query content. If the slot is not overridden,\n * it will render the suggestion query by default.\n *\n * @public\n */\nexport default defineComponent({\n name: 'NextQuery',\n xModule: nextQueriesXModule.name,\n components: { BaseSuggestion },\n props: {\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n suggestion: {\n type: Object as PropType<NextQueryModel>,\n required: true,\n },\n /**\n * Indicates if the curated next query should be highlighted.\n *\n * @public\n */\n highlightCurated: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n /**\n * Events list which are going to be emitted when a next query is selected.\n *\n * @returns The {@link XEvent} to emit.\n * @public\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserSelectedANextQuery: props.suggestion }),\n )\n\n /**\n * Checks if the next query is curated and if it should be highlighted.\n *\n * @returns True if the next query is curated and should be highlighted.\n *\n * @internal\n */\n const shouldHighlightCurated = computed(\n () => props.highlightCurated && (props.suggestion.isCurated ?? false),\n )\n\n return {\n events,\n shouldHighlightCurated,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Dynamic Classes\n\n`NextQuery` uses the following dynamic CSS classes so you can style it when is:\n\n- Curated: `x-next-query--is-curated`.\n\n## Events\n\nA list of events that the component will emit:\n\n- [`UserSelectedANextQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the next query data.\n\n## Examples\n\nThis components expects just a suggestion as a prop to be rendered. It has a slot to override the\ncontent. By default, it renders the suggestion query of the next query. It also has an optional\nprop, `highlightCurated`, to indicate if the curated Next Queries should be differentiated with a\nCSS class.\n\n### Basic Usage\n\nUsing default slot:\n\n```vue live\n<template>\n <NextQuery :suggestion=\"suggestion\" />\n</template>\n\n<script>\nimport { NextQuery } from '@empathyco/x-components/next-queries'\n\nexport default {\n name: 'NextQueryDemo',\n components: {\n NextQuery,\n },\n data() {\n return {\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Overriding default slot.\n\nThe default slot allows you to replace the content of the suggestion button.\n\n```vue live\n<template>\n <NextQuery :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <TrendingIcon />\n <span class=\"x-next-query__query\" :aria-label=\"suggestion.query\">{{ suggestion.query }}</span>\n </template>\n </NextQuery>\n</template>\n\n<script>\nimport { NextQuery } from '@empathyco/x-components/next-queries'\nimport { TrendingIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'NextQueryDemo',\n components: {\n NextQuery,\n TrendingIcon,\n },\n data() {\n return {\n suggestion: {\n modelName: 'NextQuery',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n</docs>\n"],"names":["_createBlock","_normalizeClass","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps"],"mappings":";;;;;;sBACEA,WAiBiB,CAAA,yBAAA,EAAA;AAAA,IAff,KAAK,EAAAC,cAAA,CAAA,CAAC,cAAc,EAAA,EAAA,0BAAA,EAKkB,IAAsB,CAAA,sBAAA,EAAA,CAAA,CAAA;AAAA,IAJ3D,UAAY,EAAA,IAAA,CAAA,UAAA;AAAA,IACZ,4BAA4B,EAAA,IAAA,CAAA,MAAA;AAAA,IAC7B,WAAU,EAAA,YAAA;AAAA,IACV,OAAQ,EAAA,YAAA;AAAA,GAAA,EAAA;AAUR,IAAA,OAAA,EAAAC,OAAA,CAAA,CAA0D,SAfzC,KAAA;AAAA,MAejBC,UAA0D,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAAvC,SAAS,EAAA,sBAAA,EAAE,IAAsB,CAAA,sBAAA,EAAA,CAAA,CAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"popular-search.vue.js","sources":["../../../../../src/x-modules/popular-searches/components/popular-search.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n v-slot=\"baseScope\"\n class=\"x-popular-search\"\n :suggestion=\"suggestion\"\n :suggestion-selected-events=\"events\"\n data-test=\"popular-search\"\n feature=\"popular_search\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Popular Search content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter \\| undefined</code> - Suggestion's filter\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope }\" />\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\nimport type { Suggestion } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent } from 'vue'\nimport BaseSuggestion from '../../../components/suggestions/base-suggestion.vue'\nimport { popularSearchesXModule } from '../x-module'\n\n/**\n * Renders a popular search item which receives the suggestion that will be rendered as a prop. It\n * exposes a default slot to change the popular search content. If the slot is not overridden,\n * it will render the suggestion query by default.\n *\n * @public\n */\nexport default defineComponent({\n name: 'PopularSearch',\n xModule: popularSearchesXModule.name,\n components: { BaseSuggestion },\n props: {\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n suggestion: {\n type: Object as PropType<Suggestion>,\n required: true,\n },\n },\n setup(props) {\n /**\n * Events list which are going to be emitted when a popular search is selected.\n *\n * @returns The {@link XEvent} to emit.\n * @public\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserSelectedAPopularSearch: props.suggestion }),\n )\n\n return { events }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserSelectedAPopularSearch`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the popular search\n data.\n\n## Examples\n\nThis components expects just a suggestion as a prop to be rendered. It has a slot to override the\ncontent. By default, it renders the suggestion query of the popular search.\n\n### Basic Usage\n\n```vue live\n<template>\n <PopularSearch :suggestion=\"suggestion\" />\n</template>\n\n<script>\nimport { PopularSearch } from '@empathyco/x-components/popular-searches'\nexport default {\n name: 'PopularSearchDemo',\n components: {\n PopularSearch,\n },\n data() {\n return {\n suggestion: {\n modelName: 'PopularSearch',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Custom Usage\n\n```vue live\n<template>\n <PopularSearch :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <TrendingIcon />\n <span :aria-label=\"suggestion.query\">{{ suggestion.query }}</span>\n </template>\n </PopularSearch>\n</template>\n\n<script>\nimport { PopularSearch } from '@empathyco/x-components/popular-searches'\nimport { TrendingIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'PopularSearchDemo',\n components: {\n PopularSearch,\n TrendingIcon,\n },\n data() {\n return {\n suggestion: {\n modelName: 'PopularSearch',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n</docs>\n"],"names":["_createBlock","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps"],"mappings":";;;;;;sBACEA,WAeiB,CAAA,yBAAA,EAAA;AAAA,IAbf,KAAM,EAAA,kBAAA;AAAA,IACL,UAAY,EAAA,IAAA,CAAA,UAAA;AAAA,IACZ,4BAA4B,EAAA,IAAA,CAAA,MAAA;AAAA,IAC7B,WAAU,EAAA,gBAAA;AAAA,IACV,OAAQ,EAAA,gBAAA;AAAA,GAAA,EAAA;AAPZ,IAAA,OAAA,EAAAC,OAAA,CAeI,CAAkC,SAbjB,KAAA;AAAA,MAajBC,UAAA,CAAkC,IAftC,CAAA,MAAA,EAAA,SAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,GAeuB,SAAS,EAAA,CAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAfhC,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,EAAA,CAAA,EAAA,CAAA,YAAA,EAAA,4BAAA,CAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"popular-search.vue.js","sources":["../../../../../src/x-modules/popular-searches/components/popular-search.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n v-slot=\"baseScope\"\n class=\"x-popular-search\"\n :suggestion=\"suggestion\"\n :suggestion-selected-events=\"events\"\n data-test=\"popular-search\"\n feature=\"popular_search\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot Popular Search content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter \\| undefined</code> - Suggestion's filter\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope }\" />\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\nimport type { Suggestion } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport type { XEventsTypes } from '../../../wiring/events.types'\nimport { computed, defineComponent } from 'vue'\nimport BaseSuggestion from '../../../components/suggestions/base-suggestion.vue'\nimport { popularSearchesXModule } from '../x-module'\n\n/**\n * Renders a popular search item which receives the suggestion that will be rendered as a prop. It\n * exposes a default slot to change the popular search content. If the slot is not overridden,\n * it will render the suggestion query by default.\n *\n * @public\n */\nexport default defineComponent({\n name: 'PopularSearch',\n xModule: popularSearchesXModule.name,\n components: { BaseSuggestion },\n props: {\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n suggestion: {\n type: Object as PropType<Suggestion>,\n required: true,\n },\n },\n setup(props) {\n /**\n * Events list which are going to be emitted when a popular search is selected.\n *\n * @returns The {@link XEvent} to emit.\n * @public\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserSelectedAPopularSearch: props.suggestion }),\n )\n\n return { events }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserSelectedAPopularSearch`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the popular search\n data.\n\n## Examples\n\nThis components expects just a suggestion as a prop to be rendered. It has a slot to override the\ncontent. By default, it renders the suggestion query of the popular search.\n\n### Basic Usage\n\n```vue live\n<template>\n <PopularSearch :suggestion=\"suggestion\" />\n</template>\n\n<script>\nimport { PopularSearch } from '@empathyco/x-components/popular-searches'\nexport default {\n name: 'PopularSearchDemo',\n components: {\n PopularSearch,\n },\n data() {\n return {\n suggestion: {\n modelName: 'PopularSearch',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n\n### Custom Usage\n\n```vue live\n<template>\n <PopularSearch :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <TrendingIcon />\n <span :aria-label=\"suggestion.query\">{{ suggestion.query }}</span>\n </template>\n </PopularSearch>\n</template>\n\n<script>\nimport { PopularSearch } from '@empathyco/x-components/popular-searches'\nimport { TrendingIcon } from '@empathyco/x-components'\n\nexport default {\n name: 'PopularSearchDemo',\n components: {\n PopularSearch,\n TrendingIcon,\n },\n data() {\n return {\n suggestion: {\n modelName: 'PopularSearch',\n query: 'tshirt',\n facets: [],\n },\n }\n },\n}\n</script>\n```\n</docs>\n"],"names":["_createBlock","_withCtx","_renderSlot"],"mappings":";;;;;;sBACEA,WAeiB,CAAA,yBAAA,EAAA;AAAA,IAbf,KAAM,EAAA,kBAAA;AAAA,IACL,UAAY,EAAA,IAAA,CAAA,UAAA;AAAA,IACZ,4BAA4B,EAAA,IAAA,CAAA,MAAA;AAAA,IAC7B,WAAU,EAAA,gBAAA;AAAA,IACV,OAAQ,EAAA,gBAAA;AAAA,GAAA,EAAA;AAQR,IAAA,OAAA,EAAAC,OAAA,CAAA,CAAkC,SAbjB,KAAA;AAAA,MAajBC,UAAA,CAAkC,+DAAf,SAAS,EAAA,CAAA,CAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}