@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
@@ -1 +1 @@
1
- {"version":3,"file":"base-suggestions.vue.js","sources":["../../../../src/components/suggestions/base-suggestions.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" v-if=\"suggestions.length\" tag=\"ul\" class=\"x-suggestions\">\n <li\n v-for=\"(suggestion, index) in suggestionsToRender\"\n :key=\"suggestionsKeys[index]\"\n class=\"x-suggestions__item\"\n :class=\"suggestionItemClass\"\n data-test=\"suggestion-item\"\n >\n <!--\n @slot (Required) List item content\n @binding {Suggestion} suggestion - Suggestion data\n @binding {number} index - Suggestion index\n @binding {Filter | undefined} filter - Suggestion's filter\n -->\n <slot v-bind=\"{ suggestion, index, filter: getSuggestionFilter(suggestion) }\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\nimport type { Facet, Suggestion } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { computed, defineComponent } from 'vue'\nimport { AnimationProp } from '../../types'\nimport { isArrayEmpty } from '../../utils/array'\n\n/**\n * Paints a list of suggestions passed in by prop. Requires a component for a single suggestion\n * in the default slot for working.\n *\n * @public\n */\nexport default defineComponent({\n name: 'BaseSuggestions',\n props: {\n /**\n * The list of suggestions to render.\n *\n * @public\n */\n suggestions: {\n type: Array as PropType<Suggestion[]>,\n required: true,\n },\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul',\n },\n /**\n * Number of suggestions to be rendered.\n *\n * @public\n */\n maxItemsToRender: Number,\n /**\n * Boolean value to indicate if the facets should be rendered.\n *\n * @public\n */\n showFacets: {\n type: Boolean,\n default: false,\n },\n /**\n * When `showFacets` property of `BaseSuggestions` component is true, it indicates if the suggestion without\n * filter should be rendered.\n *\n * @public\n */\n showPlainSuggestion: {\n type: Boolean,\n default: false,\n },\n /** Class inherited by content element. */\n suggestionItemClass: String,\n },\n setup(props) {\n /**\n * Creates a suggestion for each one of the filter inside each facet.\n *\n * @param suggestion - Suggestion to expand.\n * @returns A list of suggestions, each one with a single filter.\n *\n * @internal\n */\n const expandSuggestionFilters = (suggestion: Suggestion): Suggestion[] => {\n return (\n suggestion.facets?.flatMap(facet =>\n facet.filters.map(filter => ({\n ...suggestion,\n facets: [{ ...facet, filters: [filter] }],\n })),\n ) ?? []\n )\n }\n\n /**\n * Creates a list of suggestions to render based on the configuration of this component.\n *\n * @returns - The list of suggestions to be rendered by this component.\n *\n * @internal\n */\n const suggestionsToRender = computed(() =>\n props.suggestions\n .flatMap(suggestion =>\n props.showFacets && suggestion.facets?.length\n ? props.showPlainSuggestion\n ? [{ ...suggestion, facets: [] }, ...expandSuggestionFilters(suggestion)]\n : expandSuggestionFilters(suggestion)\n : { ...suggestion, facets: [] },\n )\n .slice(0, props.maxItemsToRender),\n )\n\n /**\n * Generates a string from the given facet.\n *\n * @param facet - The facet to reduce to a string.\n * @returns - A string representing the facet.\n * @internal\n */\n const getFacetKey = (facet: Facet) => facet.filters.map(filter => filter.id).join('&')\n\n /**\n * Generates a string from the given facets.\n *\n * @param facets - The list of facets to reduce to a string.\n * @returns - A string representing the list of facets.\n * @internal\n */\n const getFacetsKey = (facets: Facet[]) => facets.map(getFacetKey).join('&')\n\n /**\n * An array with the unique keys for each suggestion. Required by the `v-for` loop.\n *\n * @returns An array with the unique keys of the suggestions.\n * @internal\n */\n const suggestionsKeys = computed(() =>\n suggestionsToRender.value.map(suggestion =>\n isArrayEmpty(suggestion.facets)\n ? suggestion.query\n : `${suggestion.query}-in-${getFacetsKey(suggestion.facets)}`,\n ),\n )\n\n /**\n * Returns the filter contained by the suggestion.\n *\n * @param suggestion - Suggestion containing the filter.\n * @returns The suggestion filter.\n * @internal\n */\n const getSuggestionFilter = (suggestion: Suggestion) => suggestion.facets?.[0]?.filters[0]\n\n return { suggestionsToRender, suggestionsKeys, getSuggestionFilter }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-suggestions {\n list-style-type: none;\n}\n\n.x-suggestions,\n.x-suggestions__item {\n display: flex;\n flex-flow: column nowrap;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nFor this component to work, you will need to set a list of suggestions as prop, and also to\nimplement the component for single suggestion, which handles the click event. In the following\nexample, the suggestions are retrieved from a property called `suggestions`, and the implementation\nof the suggestion component is a simple `button`, that calls the `emitSuggestionSelected` method\nwhen clicked.\n\n```vue\n<BaseSuggestions :suggestions=\"suggestions\">\n <template #default=\"{ suggestion }\">\n <button @click=\"emitSuggestionSelected($event, suggestion)\">\n {{ suggestion.query }}\n </button>\n </template>\n</BaseSuggestions>\n```\n\nFollowing the previous example, the component options object could be something like this:\n\n```js\nexport default {\n computed: {\n ...mapGetters(['x', 'querySuggestions'], { suggestions: 'suggestions' }),\n },\n methods: {\n emitSuggestionSelected(event, suggestion) {\n this.$x.emit('UserAcceptedAQuery', suggestion.query, { target: event.target })\n this.$x.emit('UserSelectedAQuerySuggestion', suggestion, { target: event.target })\n },\n },\n}\n```\n\n### Play with props\n\nIn this example, the suggestions has been limited to render a maximum of 3 items. _Type \"puzzle\" or\nanother toy in the input field to try it out!_\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" :maxItemsToRender=\"3\" />\n</template>\n\n<script>\nimport { BaseSuggestions } from '@empathyco/x-components'\n\nexport default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions,\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch',\n },\n ],\n }\n },\n}\n</script>\n```\n\nIn this example, the filters of the suggestion will be rendered along with the query.\n\nThe `showPlainSuggestion` prop can be used to indicate if the suggestion without filter must be\nrendered along with the suggestion with filters.\n\nThis will render:\n\n- Chips //If `showPlainSuggestion` is true\n- Chips EXAMPLE\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" showFacets showPlainSuggestion />\n</template>\n\n<script>\nimport { BaseSuggestions } from '@empathyco/x-components'\n\nexport default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions,\n },\n data() {\n return {\n suggestions: [\n {\n facets: [\n {\n id: 'exampleFacet',\n label: 'exampleFacet',\n modelName: 'SimpleFacet',\n filters: [\n {\n facetId: 'exampleFacet',\n id: '{!tag=exampleFacet}exampleFacet_60361120_64009600:\"EXAMPLE\"',\n label: 'EXAMPLE',\n selected: false,\n totalResults: 10,\n modelName: 'SimpleFilter',\n },\n ],\n },\n ],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch',\n },\n ],\n }\n },\n}\n</script>\n```\n\nIn this example, the `contentClass` prop can be used to add classes to the suggestion item.\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" suggestionItemClass=\"x-custom-class\" />\n</template>\n\n<script>\nimport { BaseSuggestions } from '@empathyco/x-components'\n\nexport default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions,\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch',\n },\n ],\n }\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_withCtx","_createElementBlock","_Fragment","_renderList","_normalizeClass","_renderSlot","_mergeProps","_createCommentVNode"],"mappings":";;;;;;SACmC,IAAY,CAAA,WAAA,CAAA,MAAA,IAAAA,SAAA,EAAA,EAA7CC,WAgBY,CAAAC,uBAAA,CAhBI,IAAS,CAAA,SAAA,CAAA,EAAA;AAAA,IAD3B,GAAA,EAAA,CAAA;AAAA,IACuD,GAAI,EAAA,IAAA;AAAA,IAAK,KAAM,EAAA,eAAA;AAAA,GAAA,EAAA;AADtE,IAAA,OAAA,EAAAC,OAAA,CAGM,MAAkD;AAAA,OADpDH,SAAA,CAAA,IAAA,CAAA,EAAAI,kBAAA;AAAA,QAcKC,QAAA;AAAA,QAAA,IAAA;AAAA,QAhBTC,UAGoC,CAAA,IAAA,CAAA,mBAAA,EAHpC,CAGc,UAAA,EAAY,KAAK,KAAA;AAD3B,UAAA,OAAAN,SAAA,EAAA,EAAAI,kBAAA;AAAA,YAcK,IAAA;AAAA,YAAA;AAAA,cAZF,GAAA,EAAK,qBAAgB,KAAK,CAAA;AAAA,cAC3B,KAAA,EALNG,cAKY,CAAA,CAAA,qBAAA,EACE,IAAmB,CAAA,mBAAA,CAAA,CAAA;AAAA,cAC3B,WAAU,EAAA,iBAAA;AAAA,aAAA;;cAQVC,UAAgF,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAhFC,WAAgF,EAftF,OAAA,EAAA,IAAA,EAAA,EAAA,EAesB,YAAY,KAAK,EAAA,MAAA,EAAU,yBAAoB,UAAU,CAAA,EAAA,CAAA,EAAA,KAAA,CAAA,EAAA,IAAA,CAAA;AAAA,aAAA;;;;;;;;;AAf/E,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"base-suggestions.vue.js","sources":["../../../../src/components/suggestions/base-suggestions.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" v-if=\"suggestions.length\" tag=\"ul\" class=\"x-suggestions\">\n <li\n v-for=\"(suggestion, index) in suggestionsToRender\"\n :key=\"suggestionsKeys[index]\"\n class=\"x-suggestions__item\"\n :class=\"suggestionItemClass\"\n data-test=\"suggestion-item\"\n >\n <!--\n @slot (Required) List item content\n @binding {Suggestion} suggestion - Suggestion data\n @binding {number} index - Suggestion index\n @binding {Filter | undefined} filter - Suggestion's filter\n -->\n <slot v-bind=\"{ suggestion, index, filter: getSuggestionFilter(suggestion) }\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\nimport type { Facet, Suggestion } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { computed, defineComponent } from 'vue'\nimport { AnimationProp } from '../../types'\nimport { isArrayEmpty } from '../../utils/array'\n\n/**\n * Paints a list of suggestions passed in by prop. Requires a component for a single suggestion\n * in the default slot for working.\n *\n * @public\n */\nexport default defineComponent({\n name: 'BaseSuggestions',\n props: {\n /**\n * The list of suggestions to render.\n *\n * @public\n */\n suggestions: {\n type: Array as PropType<Suggestion[]>,\n required: true,\n },\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul',\n },\n /**\n * Number of suggestions to be rendered.\n *\n * @public\n */\n maxItemsToRender: Number,\n /**\n * Boolean value to indicate if the facets should be rendered.\n *\n * @public\n */\n showFacets: {\n type: Boolean,\n default: false,\n },\n /**\n * When `showFacets` property of `BaseSuggestions` component is true, it indicates if the suggestion without\n * filter should be rendered.\n *\n * @public\n */\n showPlainSuggestion: {\n type: Boolean,\n default: false,\n },\n /** Class inherited by content element. */\n suggestionItemClass: String,\n },\n setup(props) {\n /**\n * Creates a suggestion for each one of the filter inside each facet.\n *\n * @param suggestion - Suggestion to expand.\n * @returns A list of suggestions, each one with a single filter.\n *\n * @internal\n */\n const expandSuggestionFilters = (suggestion: Suggestion): Suggestion[] => {\n return (\n suggestion.facets?.flatMap(facet =>\n facet.filters.map(filter => ({\n ...suggestion,\n facets: [{ ...facet, filters: [filter] }],\n })),\n ) ?? []\n )\n }\n\n /**\n * Creates a list of suggestions to render based on the configuration of this component.\n *\n * @returns - The list of suggestions to be rendered by this component.\n *\n * @internal\n */\n const suggestionsToRender = computed(() =>\n props.suggestions\n .flatMap(suggestion =>\n props.showFacets && suggestion.facets?.length\n ? props.showPlainSuggestion\n ? [{ ...suggestion, facets: [] }, ...expandSuggestionFilters(suggestion)]\n : expandSuggestionFilters(suggestion)\n : { ...suggestion, facets: [] },\n )\n .slice(0, props.maxItemsToRender),\n )\n\n /**\n * Generates a string from the given facet.\n *\n * @param facet - The facet to reduce to a string.\n * @returns - A string representing the facet.\n * @internal\n */\n const getFacetKey = (facet: Facet) => facet.filters.map(filter => filter.id).join('&')\n\n /**\n * Generates a string from the given facets.\n *\n * @param facets - The list of facets to reduce to a string.\n * @returns - A string representing the list of facets.\n * @internal\n */\n const getFacetsKey = (facets: Facet[]) => facets.map(getFacetKey).join('&')\n\n /**\n * An array with the unique keys for each suggestion. Required by the `v-for` loop.\n *\n * @returns An array with the unique keys of the suggestions.\n * @internal\n */\n const suggestionsKeys = computed(() =>\n suggestionsToRender.value.map(suggestion =>\n isArrayEmpty(suggestion.facets)\n ? suggestion.query\n : `${suggestion.query}-in-${getFacetsKey(suggestion.facets)}`,\n ),\n )\n\n /**\n * Returns the filter contained by the suggestion.\n *\n * @param suggestion - Suggestion containing the filter.\n * @returns The suggestion filter.\n * @internal\n */\n const getSuggestionFilter = (suggestion: Suggestion) => suggestion.facets?.[0]?.filters[0]\n\n return { suggestionsToRender, suggestionsKeys, getSuggestionFilter }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-suggestions {\n list-style-type: none;\n}\n\n.x-suggestions,\n.x-suggestions__item {\n display: flex;\n flex-flow: column nowrap;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nFor this component to work, you will need to set a list of suggestions as prop, and also to\nimplement the component for single suggestion, which handles the click event. In the following\nexample, the suggestions are retrieved from a property called `suggestions`, and the implementation\nof the suggestion component is a simple `button`, that calls the `emitSuggestionSelected` method\nwhen clicked.\n\n```vue\n<BaseSuggestions :suggestions=\"suggestions\">\n <template #default=\"{ suggestion }\">\n <button @click=\"emitSuggestionSelected($event, suggestion)\">\n {{ suggestion.query }}\n </button>\n </template>\n</BaseSuggestions>\n```\n\nFollowing the previous example, the component options object could be something like this:\n\n```js\nexport default {\n computed: {\n ...mapGetters(['x', 'querySuggestions'], { suggestions: 'suggestions' }),\n },\n methods: {\n emitSuggestionSelected(event, suggestion) {\n this.$x.emit('UserAcceptedAQuery', suggestion.query, { target: event.target })\n this.$x.emit('UserSelectedAQuerySuggestion', suggestion, { target: event.target })\n },\n },\n}\n```\n\n### Play with props\n\nIn this example, the suggestions has been limited to render a maximum of 3 items. _Type \"puzzle\" or\nanother toy in the input field to try it out!_\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" :maxItemsToRender=\"3\" />\n</template>\n\n<script>\nimport { BaseSuggestions } from '@empathyco/x-components'\n\nexport default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions,\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch',\n },\n ],\n }\n },\n}\n</script>\n```\n\nIn this example, the filters of the suggestion will be rendered along with the query.\n\nThe `showPlainSuggestion` prop can be used to indicate if the suggestion without filter must be\nrendered along with the suggestion with filters.\n\nThis will render:\n\n- Chips //If `showPlainSuggestion` is true\n- Chips EXAMPLE\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" showFacets showPlainSuggestion />\n</template>\n\n<script>\nimport { BaseSuggestions } from '@empathyco/x-components'\n\nexport default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions,\n },\n data() {\n return {\n suggestions: [\n {\n facets: [\n {\n id: 'exampleFacet',\n label: 'exampleFacet',\n modelName: 'SimpleFacet',\n filters: [\n {\n facetId: 'exampleFacet',\n id: '{!tag=exampleFacet}exampleFacet_60361120_64009600:\"EXAMPLE\"',\n label: 'EXAMPLE',\n selected: false,\n totalResults: 10,\n modelName: 'SimpleFilter',\n },\n ],\n },\n ],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch',\n },\n ],\n }\n },\n}\n</script>\n```\n\nIn this example, the `contentClass` prop can be used to add classes to the suggestion item.\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" suggestionItemClass=\"x-custom-class\" />\n</template>\n\n<script>\nimport { BaseSuggestions } from '@empathyco/x-components'\n\nexport default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions,\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch',\n },\n ],\n }\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","_normalizeClass","_renderSlot","_mergeProps"],"mappings":";;;;;;SACmC,IAAY,CAAA,WAAA,CAAA,MAAA,IAAAA,SAAA,EAAA,EAA7CC,WAgBY,CAAAC,uBAAA,CAhBI,IAAS,CAAA,SAAA,CAAA,EAAA;AAAA,IAAA,GAAA,EAAA,CAAA;IAA4B,GAAI,EAAA,IAAA;AAAA,IAAK,KAAM,EAAA,eAAA;AAAA,GAAA,EAAA;qBAEhE,MAAkD;AAAA,OADpDF,SAAA,CAAA,IAAA,CAAA,EAAAG,kBAAA;AAAA,QAcKC,QAAA;AAAA,QAAA,IAAA;AAAA,QAb2BC,UAAA,CAAA,IAAA,CAAA,mBAAA,EAAmB,CAAzC,UAAA,EAAY,KAAK,KAAA;AAD3B,UAAA,OAAAL,SAAA,EAAA,EAAAG,kBAAA;AAAA,YAcK,IAAA;AAAA,YAAA;AAAA,cAZF,GAAA,EAAK,qBAAgB,KAAK,CAAA;AAAA,cAC3B,KAAA,EAAKG,cAAC,CAAA,CAAA,qBAAA,EACE,IAAmB,CAAA,mBAAA,CAAA,CAAA;AAAA,cAC3B,WAAU,EAAA,iBAAA;AAAA,aAAA;;AAQV,cAAAC,UAAA,CAAgF,wBAAhFC,UAAgF,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAA,EAAhE,YAAY,KAAK,EAAA,MAAA,EAAU,yBAAoB,UAAU,CAAA,EAAA,CAAA,EAAA,KAAA,CAAA,EAAA,IAAA,CAAA;AAAA,aAAA;;;;;;;;;;;;;;;;;"}
@@ -13,7 +13,7 @@ import { useXBus } from './use-x-bus.js';
13
13
  * @public
14
14
  */
15
15
  function useOnDisplay({ element, callback, triggerOnce = true, }) {
16
- const isElementVisible = useElementVisibility(element);
16
+ const isElementVisible = useElementVisibility(element, { threshold: 0.1 });
17
17
  const unwatchDisplay = watch(isElementVisible, newValue => {
18
18
  if (newValue) {
19
19
  callback();
@@ -1 +1 @@
1
- {"version":3,"file":"use-on-display.js","sources":["../../../src/composables/use-on-display.ts"],"sourcesContent":["import type { TaggingRequest } from '@empathyco/x-types'\nimport type { Ref, WatchStopHandle } from 'vue'\nimport type { WireMetadata } from '../wiring'\nimport { useElementVisibility } from '@vueuse/core'\nimport { watch } from 'vue'\nimport { useXBus } from './use-x-bus'\n\n/**\n * Composable that triggers a callback whenever the provided element appears in the viewport.\n * It can trigger the first time only or every time the element appears in the viewport.\n *\n * @param options - The options to customize the behavior of the composable. The element that\n * will be watched, the callback to trigger and if the callback should be triggered only once\n * or every time the element appears in the viewport, true by default.\n * @returns If the element is currently visible in the viewport or not and the watcher stop handle.\n * @public\n */\nexport function useOnDisplay({\n element,\n callback,\n triggerOnce = true,\n}: UseOnDisplayOptions): UseOnDisplayReturn {\n const isElementVisible = useElementVisibility(element)\n\n const unwatchDisplay = watch(isElementVisible, newValue => {\n if (newValue) {\n callback()\n if (triggerOnce) {\n unwatchDisplay()\n }\n }\n })\n\n return {\n isElementVisible,\n unwatchDisplay,\n }\n}\n\n/**\n * Composable that emits a `TrackableElementDisplayed` event whenever the provided element\n * appears in the viewport for the first time.\n *\n * @param options - The options to customize the behavior of the composable. The element that\n * will be watched and the tagging request to emit.\n * @returns If the element is currently visible in the viewport or not and the watcher stop handle.\n * @public\n */\nexport function useEmitDisplayEvent({\n element,\n taggingRequest,\n eventMetadata = {},\n}: UseEmitDisplayEventOptions): UseOnDisplayReturn {\n const bus = useXBus()\n\n const { isElementVisible, unwatchDisplay } = useOnDisplay({\n element,\n callback: () => {\n void bus.emit(\n 'TrackableElementDisplayed',\n { tagging: { display: taggingRequest } },\n eventMetadata,\n )\n },\n })\n\n return {\n isElementVisible,\n unwatchDisplay,\n }\n}\n\n/**\n * Options for the {@link useOnDisplay} composable.\n */\ninterface UseOnDisplayOptions {\n element: HTMLElement | Ref<HTMLElement | null>\n callback: () => void\n triggerOnce?: boolean\n}\n\n/**\n * Return type of the {@link useOnDisplay} composable.\n */\ninterface UseOnDisplayReturn {\n isElementVisible: Ref<boolean>\n unwatchDisplay: WatchStopHandle\n}\n\n/**\n * Options for the {@link useEmitDisplayEvent} composable.\n */\ninterface UseEmitDisplayEventOptions {\n element: UseOnDisplayOptions['element']\n taggingRequest: TaggingRequest\n eventMetadata?: Omit<WireMetadata, 'moduleName' | 'origin' | 'location'>\n}\n"],"names":[],"mappings":";;;;AAOA;;;;;;;;;AASG;AACG,SAAU,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,WAAW,GAAG,IAAI,GACE,EAAA;AACpB,IAAA,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;IAEtD,MAAM,cAAc,GAAG,KAAK,CAAC,gBAAgB,EAAE,QAAQ,IAAG;QACxD,IAAI,QAAQ,EAAE;AACZ,YAAA,QAAQ,EAAE,CAAA;YACV,IAAI,WAAW,EAAE;AACf,gBAAA,cAAc,EAAE,CAAA;aACjB;SACF;AACH,KAAC,CAAC,CAAA;IAEF,OAAO;QACL,gBAAgB;QAChB,cAAc;KACf,CAAA;AACH,CAAC;AAED;;;;;;;;AAQG;AACG,SAAU,mBAAmB,CAAC,EAClC,OAAO,EACP,cAAc,EACd,aAAa,GAAG,EAAE,GACS,EAAA;AAC3B,IAAA,MAAM,GAAG,GAAG,OAAO,EAAE,CAAA;AAErB,IAAA,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAAG,YAAY,CAAC;QACxD,OAAO;QACP,QAAQ,EAAE,MAAK;AACb,YAAA,KAAK,GAAG,CAAC,IAAI,CACX,2BAA2B,EAC3B,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EACxC,aAAa,CACd,CAAA;SACF;AACF,KAAA,CAAC,CAAA;IAEF,OAAO;QACL,gBAAgB;QAChB,cAAc;KACf,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"use-on-display.js","sources":["../../../src/composables/use-on-display.ts"],"sourcesContent":["import type { TaggingRequest } from '@empathyco/x-types'\nimport type { Ref, WatchStopHandle } from 'vue'\nimport type { WireMetadata } from '../wiring'\nimport { useElementVisibility } from '@vueuse/core'\nimport { watch } from 'vue'\nimport { useXBus } from './use-x-bus'\n\n/**\n * Composable that triggers a callback whenever the provided element appears in the viewport.\n * It can trigger the first time only or every time the element appears in the viewport.\n *\n * @param options - The options to customize the behavior of the composable. The element that\n * will be watched, the callback to trigger and if the callback should be triggered only once\n * or every time the element appears in the viewport, true by default.\n * @returns If the element is currently visible in the viewport or not and the watcher stop handle.\n * @public\n */\nexport function useOnDisplay({\n element,\n callback,\n triggerOnce = true,\n}: UseOnDisplayOptions): UseOnDisplayReturn {\n const isElementVisible = useElementVisibility(element, { threshold: 0.1 })\n\n const unwatchDisplay = watch(isElementVisible, newValue => {\n if (newValue) {\n callback()\n if (triggerOnce) {\n unwatchDisplay()\n }\n }\n })\n\n return {\n isElementVisible,\n unwatchDisplay,\n }\n}\n\n/**\n * Composable that emits a `TrackableElementDisplayed` event whenever the provided element\n * appears in the viewport for the first time.\n *\n * @param options - The options to customize the behavior of the composable. The element that\n * will be watched and the tagging request to emit.\n * @returns If the element is currently visible in the viewport or not and the watcher stop handle.\n * @public\n */\nexport function useEmitDisplayEvent({\n element,\n taggingRequest,\n eventMetadata = {},\n}: UseEmitDisplayEventOptions): UseOnDisplayReturn {\n const bus = useXBus()\n\n const { isElementVisible, unwatchDisplay } = useOnDisplay({\n element,\n callback: () => {\n void bus.emit(\n 'TrackableElementDisplayed',\n { tagging: { display: taggingRequest } },\n eventMetadata,\n )\n },\n })\n\n return {\n isElementVisible,\n unwatchDisplay,\n }\n}\n\n/**\n * Options for the {@link useOnDisplay} composable.\n */\ninterface UseOnDisplayOptions {\n element: HTMLElement | Ref<HTMLElement | null>\n callback: () => void\n triggerOnce?: boolean\n}\n\n/**\n * Return type of the {@link useOnDisplay} composable.\n */\ninterface UseOnDisplayReturn {\n isElementVisible: Ref<boolean>\n unwatchDisplay: WatchStopHandle\n}\n\n/**\n * Options for the {@link useEmitDisplayEvent} composable.\n */\ninterface UseEmitDisplayEventOptions {\n element: UseOnDisplayOptions['element']\n taggingRequest: TaggingRequest\n eventMetadata?: Omit<WireMetadata, 'moduleName' | 'origin' | 'location'>\n}\n"],"names":[],"mappings":";;;;AAOA;;;;;;;;;AASG;AACG,SAAU,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,WAAW,GAAG,IAAI,GACE,EAAA;AACpB,IAAA,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAA;IAE1E,MAAM,cAAc,GAAG,KAAK,CAAC,gBAAgB,EAAE,QAAQ,IAAG;QACxD,IAAI,QAAQ,EAAE;AACZ,YAAA,QAAQ,EAAE,CAAA;YACV,IAAI,WAAW,EAAE;AACf,gBAAA,cAAc,EAAE,CAAA;aACjB;SACF;AACH,KAAC,CAAC,CAAA;IAEF,OAAO;QACL,gBAAgB;QAChB,cAAc;KACf,CAAA;AACH,CAAC;AAED;;;;;;;;AAQG;AACG,SAAU,mBAAmB,CAAC,EAClC,OAAO,EACP,cAAc,EACd,aAAa,GAAG,EAAE,GACS,EAAA;AAC3B,IAAA,MAAM,GAAG,GAAG,OAAO,EAAE,CAAA;AAErB,IAAA,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAAG,YAAY,CAAC;QACxD,OAAO;QACP,QAAQ,EAAE,MAAK;AACb,YAAA,KAAK,GAAG,CAAC,IAAI,CACX,2BAA2B,EAC3B,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EACxC,aAAa,CACd,CAAA;SACF;AACF,KAAA,CAAC,CAAA;IAEF,OAAO;QACL,gBAAgB;QAChB,cAAc;KACf,CAAA;AACH;;;;"}
@@ -78,7 +78,7 @@ function getRoot(element, id) {
78
78
  * @public
79
79
  */
80
80
  const infiniteScroll = {
81
- mounted(element, { arg: id = VIEWPORT_ID, value: { margin = 200 } = {} }) {
81
+ mounted(element, { arg: id = VIEWPORT_ID, value: { margin = 200 } = {}, }) {
82
82
  /*
83
83
  * This hack allows the root element to always contain the observed element.
84
84
  * Not overpass the top margin more than 1700000 because it doesn't work in Android chrome
@@ -1 +1 @@
1
- {"version":3,"file":"infinite-scroll.js","sources":["../../../src/directives/infinite-scroll.ts"],"sourcesContent":["import type { Directive } from 'vue'\nimport { XPlugin } from '../plugins'\n\nconst VIEWPORT_ID = 'viewport'\n\n/**\n * A record which contains {@link IntersectionObserver} objects indexed by the ID of the scrollable\n * container.\n */\nconst state: Record<string, IntersectionObserver> = {}\n\n/**\n * Retrieves the root element for the provided ID.\n *\n * @param element - Target element where directive is set.\n * @param id - String identifier.\n * @returns HTMLElement or null.\n */\nfunction getRoot(element: HTMLElement, id: string): HTMLElement | null {\n switch (id) {\n case 'html':\n return null\n case 'body':\n return document.body\n case VIEWPORT_ID:\n return null\n default:\n return element.closest(`#${id}`)!\n }\n}\n\n/**\n * Custom Vue directive for infinite scroll.\n *\n * This directive uses the IntersectionObserver API to handle the intersection between the\n * children and the scrollable container. The content of the children moves up on scroll and when it\n * reaches the end, the IntersectionObserver triggers that both elements are intersecting.\n *\n * How it works.\n *\n * As a summary, if the scroll reaches the end, `UserReachedResultsListEnd` event is emitted to the\n * xBus. If you provide a margin in the directive options, this function is triggered when the\n * scroll reaches the end minus that amount of pixels. A default margin of 200px is set.\n *\n * Usage.\n *\n * The directive has to be set in the target element. It can receive an argument which will be used\n * to determine the scrollable container. Possible values:\n * `html`: will set the <html> as the scrollable container.\n * `body`: will set the <body> as the scrollable container.\n * ID: will set the DOM element with the provided id as the scrollable container.\n *\n * If no argument is provided the scrollable container fallbacks to the viewport.\n *\n * @example How to use it.\n *\n * ```html\n * <ResultsList v-infinite-scroll:html>\n * ```\n *\n * ```html\n * <ResultsList v-infinite-scroll:body>\n * ```\n *\n * ```html\n * <BaseScroll id='scroll-test'>\n * <ResultsList v-infinite-scroll:scroll-test>\n * </BaseScroll>\n * ```\n *\n * ```html\n * <ResultsList v-infinite-scroll=\"{ margin: 40 }\">\n * ```\n *\n * @public\n */\nexport const infiniteScroll: Directive<HTMLElement, { margin: number }> = {\n mounted(element, { arg: id = VIEWPORT_ID, value: { margin = 200 } = {} }) {\n /*\n * This hack allows the root element to always contain the observed element.\n * Not overpass the top margin more than 1700000 because it doesn't work in Android chrome\n */\n const rootMargin = `1000000% 0px ${margin}px 0px`\n const root = getRoot(element, id)\n const xBus = XPlugin.bus\n\n state[id] = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n void xBus.emit('UserReachedResultsListEnd', undefined)\n }\n },\n {\n threshold: 0.99,\n rootMargin,\n root,\n },\n )\n\n state[id].observe(element)\n },\n unmounted(_, { arg: id = VIEWPORT_ID }) {\n if (state[id]) {\n state[id].disconnect()\n delete state[id]\n }\n },\n}\n"],"names":[],"mappings":";;;;;;;;;AAGA,MAAM,WAAW,GAAG,UAAU,CAAA;AAE9B;;;AAGG;AACH,MAAM,KAAK,GAAyC,EAAE,CAAA;AAEtD;;;;;;AAMG;AACH,SAAS,OAAO,CAAC,OAAoB,EAAE,EAAU,EAAA;IAC/C,QAAQ,EAAE;AACR,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,IAAI,CAAA;AACb,QAAA,KAAK,MAAM;YACT,OAAO,QAAQ,CAAC,IAAI,CAAA;AACtB,QAAA,KAAK,WAAW;AACd,YAAA,OAAO,IAAI,CAAA;AACb,QAAA;YACE,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA,CAAE,CAAE,CAAA;KACpC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CG;AACU,MAAA,cAAc,GAA+C;AACxE,IAAA,OAAO,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,WAAW,EAAE,KAAK,EAAE,EAAE,MAAM,GAAG,GAAG,EAAE,GAAG,EAAE,EAAE,EAAA;AACtE;;;AAGG;AACH,QAAA,MAAM,UAAU,GAAG,CAAgB,aAAA,EAAA,MAAM,QAAQ,CAAA;QACjD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;AACjC,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAA;AAExB,QAAA,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,oBAAoB,CAClC,CAAC,CAAC,KAAK,CAAC,KAAI;AACV,YAAA,IAAI,KAAK,CAAC,cAAc,EAAE;gBACxB,KAAK,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,SAAS,CAAC,CAAA;aACvD;AACH,SAAC,EACD;AACE,YAAA,SAAS,EAAE,IAAI;YACf,UAAU;YACV,IAAI;AACL,SAAA,CACF,CAAA;QAED,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;KAC3B;IACD,SAAS,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,WAAW,EAAE,EAAA;AACpC,QAAA,IAAI,KAAK,CAAC,EAAE,CAAC,EAAE;AACb,YAAA,KAAK,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,CAAA;AACtB,YAAA,OAAO,KAAK,CAAC,EAAE,CAAC,CAAA;SACjB;KACF;;;;;"}
1
+ {"version":3,"file":"infinite-scroll.js","sources":["../../../src/directives/infinite-scroll.ts"],"sourcesContent":["import type { Directive } from 'vue'\nimport { XPlugin } from '../plugins'\n\nconst VIEWPORT_ID = 'viewport'\n\n/**\n * A record which contains {@link IntersectionObserver} objects indexed by the ID of the scrollable\n * container.\n */\nconst state: Record<string, IntersectionObserver> = {}\n\n/**\n * Retrieves the root element for the provided ID.\n *\n * @param element - Target element where directive is set.\n * @param id - String identifier.\n * @returns HTMLElement or null.\n */\nfunction getRoot(element: HTMLElement, id: string): HTMLElement | null {\n switch (id) {\n case 'html':\n return null\n case 'body':\n return document.body\n case VIEWPORT_ID:\n return null\n default:\n return element.closest(`#${id}`)!\n }\n}\n\n/**\n * Custom Vue directive for infinite scroll.\n *\n * This directive uses the IntersectionObserver API to handle the intersection between the\n * children and the scrollable container. The content of the children moves up on scroll and when it\n * reaches the end, the IntersectionObserver triggers that both elements are intersecting.\n *\n * How it works.\n *\n * As a summary, if the scroll reaches the end, `UserReachedResultsListEnd` event is emitted to the\n * xBus. If you provide a margin in the directive options, this function is triggered when the\n * scroll reaches the end minus that amount of pixels. A default margin of 200px is set.\n *\n * Usage.\n *\n * The directive has to be set in the target element. It can receive an argument which will be used\n * to determine the scrollable container. Possible values:\n * `html`: will set the <html> as the scrollable container.\n * `body`: will set the <body> as the scrollable container.\n * ID: will set the DOM element with the provided id as the scrollable container.\n *\n * If no argument is provided the scrollable container fallbacks to the viewport.\n *\n * @example How to use it.\n *\n * ```html\n * <ResultsList v-infinite-scroll:html>\n * ```\n *\n * ```html\n * <ResultsList v-infinite-scroll:body>\n * ```\n *\n * ```html\n * <BaseScroll id='scroll-test'>\n * <ResultsList v-infinite-scroll:scroll-test>\n * </BaseScroll>\n * ```\n *\n * ```html\n * <ResultsList v-infinite-scroll=\"{ margin: 40 }\">\n * ```\n *\n * @public\n */\nexport const infiniteScroll: Directive<HTMLElement, { margin: number }> = {\n mounted(\n element,\n {\n arg: id = VIEWPORT_ID,\n value: { margin = 200 } = {},\n }: { arg?: string; value?: { margin?: number } },\n ) {\n /*\n * This hack allows the root element to always contain the observed element.\n * Not overpass the top margin more than 1700000 because it doesn't work in Android chrome\n */\n const rootMargin = `1000000% 0px ${margin}px 0px`\n const root = getRoot(element, id)\n const xBus = XPlugin.bus\n\n state[id] = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n void xBus.emit('UserReachedResultsListEnd', undefined)\n }\n },\n {\n threshold: 0.99,\n rootMargin,\n root,\n },\n )\n\n state[id].observe(element)\n },\n unmounted(_, { arg: id = VIEWPORT_ID }: { arg?: string }) {\n if (state[id]) {\n state[id].disconnect()\n delete state[id]\n }\n },\n}\n"],"names":[],"mappings":";;;;;;;;;AAGA,MAAM,WAAW,GAAG,UAAU,CAAA;AAE9B;;;AAGG;AACH,MAAM,KAAK,GAAyC,EAAE,CAAA;AAEtD;;;;;;AAMG;AACH,SAAS,OAAO,CAAC,OAAoB,EAAE,EAAU,EAAA;IAC/C,QAAQ,EAAE;AACR,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,IAAI,CAAA;AACb,QAAA,KAAK,MAAM;YACT,OAAO,QAAQ,CAAC,IAAI,CAAA;AACtB,QAAA,KAAK,W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/directives/typing.ts"],"sourcesContent":["import type { Directive } from 'vue'\n\n/**\n * TypingOptions interface.\n *\n * @public\n */\nexport interface TypingOptions {\n /**\n * The text (plain or html) that will be typed into the target element.\n */\n text: string\n /**\n * The typing speed in milliseconds per character.\n *\n */\n speed?: number\n /**\n * The attribute of the HTML element where the typed text will be placed.\n * If not specified, the text will be set as content (innerHTML).\n *\n * @example 'placeholder'\n */\n targetAttr?: string\n}\n\ninterface TypingHTMLElement extends HTMLElement {\n __timeoutId?: number\n}\n\n/**\n * Typing directive.\n *\n * @public\n */\nexport const typing: Directive<TypingHTMLElement, TypingOptions> = {\n mounted(el, binding) {\n execute(el, binding.value)\n },\n\n updated(el, binding) {\n if (binding.value.text !== binding.oldValue?.text) {\n clearTimeout(el.__timeoutId)\n execute(el, binding.value)\n }\n },\n\n unmounted(el) {\n clearTimeout(el.__timeoutId)\n },\n}\n\n/**\n * Execute a typing animation in an HTML element.\n *\n * @param el - The HTML element where the typing animation will be displayed.\n * @param options - Options for the behavior of the animation.\n */\nfunction execute(el: TypingHTMLElement, options: TypingOptions) {\n const { text, speed = 1, targetAttr = '' } = options\n\n if (!text) {\n console.error('v-typing: \"text\" is required.')\n return\n }\n\n let index = 0\n\n const updateContent = (value: string) => {\n if (targetAttr) {\n el.setAttribute(targetAttr, value)\n } else {\n el.innerHTML = value\n }\n }\n\n const type = () => {\n if (index < text.length) {\n updateContent(text.slice(0, index + 1))\n index++\n el.__timeoutId = setTimeout(type, speed) as unknown as number\n } else {\n updateContent(text)\n clearTimeout(el.__timeoutId)\n el.__timeoutId = undefined\n }\n }\n\n type()\n}\n"],"names":[],"mappings":"AA8BA;;;;AAIG;AACU,MAAA,MAAM,GAAgD;IACjE,OAAO,CAAC,EAAE,EAAE,OAAO,EAAA;AACjB,QAAA,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;KAC3B;IAED,OAAO,CAAC,EAAE,EAAE,OAAO,EAAA;AACjB,QAAA,IAAI,OAAO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CAAC,WAAW,GAAG,SAAS,CAAA;SAC3B;AACH,KAAC,CAAA;AAED,IAAA,IAAI,EAAE,CAAA;AACR;;;;"}
1
+ {"version":3,"file":"typing.js","sources":["../../../src/directives/typing.ts"],"sourcesContent":["import type { Directive } from 'vue'\n\n/**\n * TypingOptions interface.\n *\n * @public\n */\nexport interface TypingOptions {\n /**\n * The text (plain or html) that will be typed into the target element.\n */\n text: string\n /**\n * The typing speed in milliseconds per character.\n *\n */\n speed?: number\n /**\n * The attribute of the HTML element where the typed text will be placed.\n * If not specified, the text will be set as content (innerHTML).\n *\n * @example 'placeholder'\n */\n targetAttr?: string\n}\n\nexport interface TypingHTMLElement extends HTMLElement {\n __timeoutId?: number\n}\n\n/**\n * Typing directive.\n *\n * @public\n */\nexport const typing: Directive<TypingHTMLElement, TypingOptions> = {\n mounted(el, binding) {\n execute(el, binding.value)\n },\n\n updated(el, binding) {\n if (binding.value.text !== binding.oldValue?.text) {\n clearTimeout(el.__timeoutId)\n execute(el, binding.value)\n }\n },\n\n unmounted(el) {\n clearTimeout(el.__timeoutId)\n },\n}\n\n/**\n * Execute a typing animation in an HTML element.\n *\n * @param el - The HTML element where the typing animation will be displayed.\n * @param options - Options for the behavior of the animation.\n */\nfunction execute(el: TypingHTMLElement, options: TypingOptions) {\n const { text, speed = 1, targetAttr = '' } = options\n\n if (!text) {\n console.error('v-typing: \"text\" is required.')\n return\n }\n\n let index = 0\n\n const updateContent = (value: string) => {\n if (targetAttr) {\n el.setAttribute(targetAttr, value)\n } else {\n el.innerHTML = value\n }\n }\n\n const type = () => {\n if (index < text.length) {\n updateContent(text.slice(0, index + 1))\n index++\n el.__timeoutId = setTimeout(type, speed) as unknown as number\n } else {\n updateContent(text)\n clearTimeout(el.__timeoutId)\n el.__timeoutId = undefined\n }\n }\n\n type()\n}\n"],"names":[],"mappings":"AA8BA;;;;AAIG;AACU,MAAA,MAAM,GAAgD;IACjE,OAAO,CAAC,EAAE,EAAE,OAAO,EAAA;AACjB,QA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,CAAA;SAC9D;aAAM;YACL,aAAa,CAAC,IAAI,CAAC,CAAA;AACnB,YAAA,YAAY,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;AAC5B,YAAA,EAAE,CAAC,WAAW,GAAG,SAAS,CAAA;SAC3B;AACH,KAAC,CAAA;AAED,IAAA,IAAI,EAAE,CAAA;AACR;;;;"}
@@ -15,39 +15,32 @@ const _hoisted_3 = {
15
15
  class: "x-ai-overview-title-loading",
16
16
  "data-test": "ai-overview-title-loading"
17
17
  };
18
- const _hoisted_4 = /* @__PURE__ */ createElementVNode(
19
- "span",
20
- { class: "x-ai-overview-title-loading-indicator" },
21
- null,
22
- -1
23
- /* HOISTED */
24
- );
25
- const _hoisted_5 = {
18
+ const _hoisted_4 = {
26
19
  class: "x-ai-overview-title-loading-text",
27
20
  "data-test": "ai-overview-title-loading-text"
28
21
  };
29
- const _hoisted_6 = {
22
+ const _hoisted_5 = {
30
23
  class: "x-ai-overview-title",
31
24
  "data-test": "ai-overview-title"
32
25
  };
33
- const _hoisted_7 = { class: "x-ai-overview-content-wrapper" };
34
- const _hoisted_8 = {
26
+ const _hoisted_6 = { class: "x-ai-overview-content-wrapper" };
27
+ const _hoisted_7 = {
35
28
  key: 0,
36
29
  class: "x-ai-overview-content-title",
37
30
  "data-test": "ai-overview-content-title"
38
31
  };
39
- const _hoisted_9 = ["innerHTML"];
40
- const _hoisted_10 = {
32
+ const _hoisted_8 = ["innerHTML"];
33
+ const _hoisted_9 = {
41
34
  key: 1,
42
35
  class: "x-ai-overview-suggestions",
43
36
  "data-test": "ai-overview-suggestions-container"
44
37
  };
45
- const _hoisted_11 = { class: "x-ai-overview-suggestion-results" };
46
- const _hoisted_12 = {
38
+ const _hoisted_10 = { class: "x-ai-overview-suggestion-results" };
39
+ const _hoisted_11 = {
47
40
  class: "x-ai-overview-gradient",
48
41
  "data-test": "ai-overview-gradient"
49
42
  };
50
- const _hoisted_13 = { class: "x-ai-overview-toggle-wrapper" };
43
+ const _hoisted_12 = { class: "x-ai-overview-toggle-wrapper" };
51
44
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
52
45
  const _component_AIStarIcon = resolveComponent("AIStarIcon");
53
46
  const _component_DisplayEmitter = resolveComponent("DisplayEmitter");
@@ -70,8 +63,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
70
63
  createVNode(_component_Fade, { mode: "out-in" }, {
71
64
  default: withCtx(() => [
72
65
  _ctx.suggestionsLoading ? (openBlock(), createElementBlock("span", _hoisted_3, [
73
- _hoisted_4,
74
- createElementVNode("span", _hoisted_5, [
66
+ _cache[2] || (_cache[2] = createElementVNode(
67
+ "span",
68
+ { class: "x-ai-overview-title-loading-indicator" },
69
+ null,
70
+ -1
71
+ /* CACHED */
72
+ )),
73
+ createElementVNode("span", _hoisted_4, [
75
74
  renderSlot(_ctx.$slots, "title-loading", {}, () => [
76
75
  createTextVNode(
77
76
  toDisplayString(_ctx.titleLoading),
@@ -91,7 +90,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
91
90
  "data-test": "ai-overview-display-emitter"
92
91
  }, {
93
92
  default: withCtx(() => [
94
- createElementVNode("span", _hoisted_6, [
93
+ createElementVNode("span", _hoisted_5, [
95
94
  createVNode(_component_AIStarIcon, { class: "x-ai-overview-title-icon" }),
96
95
  createTextVNode(
97
96
  toDisplayString(!!_ctx.title ? _ctx.title : _ctx.suggestionText),
@@ -109,10 +108,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
109
108
  }),
110
109
  createVNode(_component_ChangeHeight, null, {
111
110
  default: withCtx(() => [
112
- createElementVNode("div", _hoisted_7, [
111
+ createElementVNode("div", _hoisted_6, [
113
112
  _ctx.title ? (openBlock(), createElementBlock(
114
113
  "span",
115
- _hoisted_8,
114
+ _hoisted_7,
116
115
  toDisplayString(_ctx.suggestionText),
117
116
  1
118
117
  /* TEXT */
@@ -121,7 +120,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
121
120
  class: normalizeClass(_ctx.contentClasses),
122
121
  "data-test": "ai-overview-content",
123
122
  innerHTML: _ctx.parsedResponseText
124
- }, null, 10, _hoisted_9)
123
+ }, null, 10, _hoisted_8)
125
124
  ])
126
125
  ]),
127
126
  _: 1
@@ -144,7 +143,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
144
143
  key: 0,
145
144
  class: "x-ai-overview-suggestions-loading",
146
145
  "data-test": "ai-overview-suggestions-loading"
147
- })) : (openBlock(), createElementBlock("div", _hoisted_10, [
146
+ })) : (openBlock(), createElementBlock("div", _hoisted_9, [
148
147
  (openBlock(true), createElementBlock(
149
148
  Fragment,
150
149
  null,
@@ -208,7 +207,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
208
207
  renderSlot(_ctx.$slots, "sliding-panels-right-button")
209
208
  ]),
210
209
  default: withCtx(() => [
211
- createElementVNode("ul", _hoisted_11, [
210
+ createElementVNode("ul", _hoisted_10, [
212
211
  (openBlock(true), createElementBlock(
213
212
  Fragment,
214
213
  null,
@@ -279,14 +278,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
279
278
  }, [
280
279
  withDirectives(createElementVNode(
281
280
  "div",
282
- _hoisted_12,
281
+ _hoisted_11,
283
282
  null,
284
283
  512
285
284
  /* NEED_PATCH */
286
285
  ), [
287
286
  [vShow, !_ctx.expanded]
288
287
  ]),
289
- createElementVNode("div", _hoisted_13, [
288
+ createElementVNode("div", _hoisted_12, [
290
289
  createElementVNode("button", {
291
290
  class: "x-ai-overview-toggle-btn",
292
291
  "data-test": "ai-overview-toggle-button",
@@ -1 +1 @@
1
- {"version":3,"file":"ai-overview.vue.js","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue"],"sourcesContent":["<template>\n <CollapseHeight>\n <div\n v-if=\"!isNoResults\"\n ref=\"aiOverviewRef\"\n class=\"x-ai-overview\"\n data-test=\"ai-overview-wrapper\"\n >\n <div class=\"x-ai-overview-main\">\n <Fade mode=\"out-in\">\n <span\n v-if=\"suggestionsLoading\"\n class=\"x-ai-overview-title-loading\"\n data-test=\"ai-overview-title-loading\"\n >\n <span class=\"x-ai-overview-title-loading-indicator\" />\n <span\n class=\"x-ai-overview-title-loading-text\"\n data-test=\"ai-overview-title-loading-text\"\n >\n <slot name=\"title-loading\">\n {{ titleLoading }}\n </slot>\n </span>\n </span>\n <DisplayEmitter\n v-else\n :payload=\"tagging?.toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'overview',\n displayOriginalQuery: query || 'overview-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-overview-display-emitter\"\n >\n <span class=\"x-ai-overview-title\" data-test=\"ai-overview-title\">\n <AIStarIcon class=\"x-ai-overview-title-icon\" />{{ !!title ? title : suggestionText }}\n </span>\n </DisplayEmitter>\n </Fade>\n <ChangeHeight>\n <div class=\"x-ai-overview-content-wrapper\">\n <span\n v-if=\"title\"\n class=\"x-ai-overview-content-title\"\n data-test=\"ai-overview-content-title\"\n >{{ suggestionText }}\n </span>\n <div\n :class=\"contentClasses\"\n data-test=\"ai-overview-content\"\n v-html=\"parsedResponseText\"\n />\n </div>\n </ChangeHeight>\n <slot name=\"extra-content\" />\n </div>\n <CollapseHeight\n :style=\"{\n '--x-collapse-height-transition-duration': `${300 * suggestionsSearch.length}ms`,\n }\"\n data-test=\"ai-overview-collapse-height-suggestions\"\n >\n <div v-show=\"expanded\">\n <SpinnerIcon\n v-if=\"!suggestionsSearch.length\"\n class=\"x-ai-overview-suggestions-loading\"\n data-test=\"ai-overview-suggestions-loading\"\n />\n <div\n v-else\n class=\"x-ai-overview-suggestions\"\n data-test=\"ai-overview-suggestions-container\"\n >\n <DisplayEmitter\n v-for=\"(\n { query: suggestionQuery, results: queriesResults }, suggestionIndex\n ) in suggestionsSearch\"\n :key=\"suggestionQuery\"\n :payload=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplay ?? emptyTaggingRequest\n \"\n :event-metadata=\"{\n feature: 'overview',\n displayOriginalQuery: query || 'overview-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-overview-query-display-emitter\"\n >\n <div\n class=\"x-ai-overview-suggestion\"\n data-test=\"ai-overview-suggestion\"\n :class=\"{\n 'x-ai-overview-result-animation': shouldAnimateSuggestion,\n }\"\n :style=\"{ animationDelay: `${suggestionIndex * 300}ms` }\"\n >\n <BaseEventButton\n class=\"x-ai-overview-suggestion-query-btn\"\n :events=\"{ UserAcceptedAQuery: suggestionQuery }\"\n >\n {{ suggestionQuery }}\n <ArrowRightIcon class=\"x-ai-overview-suggestion-query-btn-icon\" />\n </BaseEventButton>\n\n <DisplayClickProvider\n :tooling-display-tagging=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplayClick\n \"\n :tooling-add2-cart-tagging=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplayAdd2Cart\n \"\n result-feature=\"overview\"\n >\n <slot name=\"sliding-panel\" :results=\"queriesResults\">\n <SlidingPanel\n :class=\"slidingPanelsClasses\"\n :scroll-container-class=\"slidingPanelContainersClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <ul class=\"x-ai-overview-suggestion-results\">\n <li\n v-for=\"(result, resultIndex) in queriesResults\"\n :key=\"result.id\"\n data-test=\"ai-overview-suggestion-result\"\n :class=\"{\n 'x-ai-overview-result-animation': shouldAnimateSuggestion,\n }\"\n :style=\"{\n animationDelay: `${suggestionIndex * 300 + resultIndex * 300}ms`,\n }\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </ul>\n </SlidingPanel>\n </slot>\n </DisplayClickProvider>\n </div>\n </DisplayEmitter>\n <slot name=\"suggestions-extra-content\" />\n </div>\n </div>\n </CollapseHeight>\n\n <Fade>\n <div\n v-if=\"queries.length\"\n class=\"x-cursor-pointer\"\n data-test=\"ai-overview-toggle-button-wrapper\"\n @click=\"emitAndSetExpand(!expanded)\"\n >\n <div v-show=\"!expanded\" class=\"x-ai-overview-gradient\" data-test=\"ai-overview-gradient\" />\n <div class=\"x-ai-overview-toggle-wrapper\">\n <button\n class=\"x-ai-overview-toggle-btn\"\n data-test=\"ai-overview-toggle-button\"\n @click.stop=\"emitAndSetExpand(!expanded)\"\n >\n {{ buttonText }}\n <ChevronDownIcon\n class=\"x-ai-overview-toggle-btn-icon\"\n :class=\"{ 'x-ai-overview-toggle-btn-icon-expanded': expanded }\"\n />\n </button>\n </div>\n </div>\n </Fade>\n </div>\n </CollapseHeight>\n</template>\n\n<script lang=\"ts\">\nimport type { TaggingRequest } from '@empathyco/x-types'\nimport { marked } from 'marked'\nimport { computed, defineComponent, onMounted, ref, watch } from 'vue'\nimport {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n DisplayClickProvider,\n Fade,\n SlidingPanel,\n SpinnerIcon,\n} from '../../../components'\nimport DisplayEmitter from '../../../components/display-emitter.vue'\nimport { use$x, useGetter, useState } from '../../../composables'\nimport { typing } from '../../../directives'\nimport { aiXModule } from '../x-module'\n\nexport default defineComponent({\n directives: {\n typing,\n },\n xModule: aiXModule.name,\n components: {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChevronDownIcon,\n CollapseHeight,\n ChangeHeight,\n Fade,\n SlidingPanel,\n SpinnerIcon,\n DisplayEmitter,\n DisplayClickProvider,\n },\n props: {\n /* The text displayed when the question ended loading */\n title: {\n type: String,\n },\n /* The text displayed when the question is loading. */\n titleLoading: {\n type: String,\n default: 'Generating with Empathy AI',\n },\n /* The text displayed on the toggle button when collapsed. */\n expandText: {\n type: String,\n default: 'Show more',\n },\n /* The text displayed on the toggle button when expanded. */\n collapseText: {\n type: String,\n default: 'Show less',\n },\n /* Auto expand the AI Overview when there are queries in AI and no-results in search. */\n autoExpandInSearchNoResults: {\n type: Boolean,\n default: true,\n },\n /* The classes added to the parsed response text container. */\n contentClasses: {\n type: String,\n },\n /* The classes added to each sliding panel for each query. */\n slidingPanelsClasses: {\n type: String,\n },\n /* The classes added to each sliding panel container of each query. */\n slidingPanelContainersClasses: {\n type: String,\n },\n /* The classes added to each sliding panel button of each query. */\n slidingPanelButtonsClasses: {\n type: String,\n },\n },\n setup(props) {\n const $x = use$x()\n const { query } = useGetter('ai')\n const {\n suggestionText,\n responseText,\n suggestionsSearch,\n suggestionsLoading,\n tagging,\n isNoResults,\n queries,\n } = useState('ai')\n\n const emptyTaggingRequest: TaggingRequest = { url: '', params: {} }\n\n const aiOverviewRef = ref<HTMLDivElement | null>(null)\n const expanded = ref(false)\n const shouldAnimateSuggestion = ref(true)\n const parsedResponseText = computed(() => marked.parse(responseText.value))\n\n const buttonText = computed(() => (expanded.value ? props.collapseText : props.expandText))\n\n function emitAndSetExpand(isExpanded: boolean) {\n $x.emit('UserClickedAiOverviewExpandButton', expanded.value, {\n suggestionText: suggestionText.value,\n toolingDisplayClick: tagging.value?.toolingDisplayClick,\n })\n\n expanded.value = isExpanded\n if (!expanded.value) {\n aiOverviewRef.value?.scrollIntoView({ behavior: 'smooth' })\n shouldAnimateSuggestion.value = false\n }\n }\n\n /* Expand AIOverview programmatically when the `autoExpandInSearchNoResults` prop is active,\n the request for suggestions has ended; there are queries in AI and no-results in search. */\n watch([suggestionsLoading, () => $x.noResults], () => {\n if (\n props.autoExpandInSearchNoResults &&\n !suggestionsLoading.value &&\n queries.value.length &&\n $x.noResults\n ) {\n emitAndSetExpand(true)\n }\n })\n\n $x.on('AiSuggestionsRequestUpdated', false).subscribe(() => {\n expanded.value = false\n shouldAnimateSuggestion.value = true\n })\n\n onMounted(() => {\n $x.emit('AiOverviewMounted', undefined, { feature: 'overview' })\n })\n\n return {\n aiOverviewRef,\n buttonText,\n emptyTaggingRequest,\n expanded,\n parsedResponseText,\n suggestionsLoading,\n suggestionsSearch,\n suggestionText,\n emitAndSetExpand,\n shouldAnimateSuggestion,\n query,\n tagging,\n isNoResults,\n queries,\n }\n },\n})\n</script>\n\n<style lang=\"css\">\n.x-ai-overview {\n --color: var(--x-ai-overview-color, #bbc9cf);\n --color-lighter: var(--x-ai-overview-color-lighter, color-mix(in srgb, var(--color) 25%, white));\n\n position: relative;\n border-radius: 1.5rem;\n background-color: var(--color-lighter);\n}\n\n.x-ai-overview-main {\n padding: 1rem;\n max-width: var(--x-ai-overview-main-max-width, none);\n margin: 0 auto;\n}\n\n.x-ai-overview-title {\n display: flex;\n font-size: 0.875rem;\n font-weight: 700;\n gap: 0.25rem;\n align-items: center;\n margin-bottom: 0.5rem;\n}\n\n.x-ai-overview-title-loading {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n margin-bottom: 0.5rem;\n}\n\n.x-ai-overview-title-loading-indicator {\n width: 0.75rem;\n height: 0.75rem;\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n border-radius: 9999px;\n background-color: var(--color);\n}\n\n.x-ai-overview-title-loading-text {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n font-size: 0.75rem;\n}\n\n.x-ai-overview-title-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n color: var(--color);\n flex-shrink: 0;\n}\n\n.x-ai-overview-content-wrapper {\n display: flex;\n flex-direction: column;\n text-align: left;\n line-height: 1.25rem;\n}\n\n.x-ai-overview-content-title {\n font-weight: 500;\n margin-bottom: 8px;\n}\n\n.x-ai-overview-gradient {\n border-radius: 1.5rem;\n cursor: pointer;\n content: none;\n position: absolute;\n width: 100%;\n height: 100%;\n bottom: 0;\n background-image: linear-gradient(to bottom, transparent 0%, var(--color-lighter) 100%);\n}\n\n.x-ai-overview-toggle-wrapper {\n display: flex;\n position: relative;\n}\n\n.x-ai-overview-toggle-btn {\n border-color: var(--button-color-50, #283034);\n background-color: #ffffff;\n color: var(--button-color-50, #283034);\n border-radius: 9999px;\n width: 100%;\n margin: auto;\n padding-right: 1rem;\n padding-left: 1rem;\n display: flex;\n justify-content: center;\n align-items: center;\n border-style: solid;\n border-width: 1px;\n font-weight: 700;\n min-height: 2.5rem;\n gap: 0.5rem;\n font-size: 0.875rem;\n}\n\n.x-ai-overview-toggle-btn:hover {\n border-color: var(--button-color-50, #283034);\n background-color: var(--button-color-50, #283034);\n color: #ffffff;\n}\n\n@media (min-width: 640px) {\n .x-ai-overview-toggle-btn {\n transition-property: all;\n transition-duration: 500ms;\n transform: translateY(50%);\n width: var(--expand-button-width, 200px);\n }\n}\n\n.x-ai-overview-toggle-btn-icon {\n transform: rotate(0deg);\n height: 1rem;\n aspect-ratio: 1 / 1;\n transition-property: all;\n transition-duration: 300ms;\n}\n\n.x-ai-overview-toggle-btn-icon-expanded {\n transform: rotate(180deg);\n}\n\n.x-ai-overview-suggestion-query-btn {\n border-color: transparent;\n background-color: transparent;\n margin-left: 1rem;\n margin-right: 1rem;\n font-weight: 700;\n width: fit-content;\n display: flex;\n align-items: center;\n gap: 1rem;\n}\n\n.x-ai-overview-suggestion-query-btn-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n}\n\n.x-ai-overview-suggestions {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n padding-bottom: 1rem;\n}\n\n.x-ai-overview-suggestions-loading {\n width: 2.5rem;\n height: 2.5rem;\n margin: auto;\n animation: x-spin 1s linear infinite;\n}\n\n.x-ai-overview-suggestion {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.x-ai-overview-suggestion-results {\n display: flex;\n gap: 1rem;\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n@keyframes x-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n</style>\n"],"names":["_createElementVNode","_createBlock","_openBlock","_createElementBlock","_createVNode","_renderSlot","_createTextVNode","_toDisplayString","_withCtx","_createCommentVNode","_normalizeClass","_normalizeStyle","_withDirectives","_Fragment","_renderList","_vShow","_withModifiers"],"mappings":";;;;;;AAAA,EAAA,GAAA,EAAA,CAAA;AAAA,EAIM,GAAI,EAAA,eAAA;AAAA,EACJ,KAAM,EAAA,eAAA;AAAA,EACN,WAAU,EAAA,qBAAA;;AAEL,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,oBAAoB,EAAA,CAAA;;AARrC,EAAA,GAAA,EAAA,CAAA;AAAA,EAYY,KAAM,EAAA,6BAAA;AAAA,EACN,WAAU,EAAA,2BAAA;;AAEV,MAAA,UAAA,mBAAAA,kBAAA;AAAA,EAAsD,MAAA;AAAA,EAAA,EAAhD,OAAM,uCAAuC,EAAA;AAAA,EAAA,IAAA;AAAA,EAAA,CAAA,CAAA;AAAA;AAAA,CAAA,CAAA;;EAEjD,KAAM,EAAA,kCAAA;AAAA,EACN,WAAU,EAAA,gCAAA;;;EAiBN,KAAM,EAAA,qBAAA;AAAA,EAAsB,WAAU,EAAA,mBAAA;;AAMzC,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,+BAA+B,EAAA,CAAA;;AAzCpD,EAAA,GAAA,EAAA,CAAA;AAAA,EA4Cc,KAAM,EAAA,6BAAA;AAAA,EACN,WAAU,EAAA,2BAAA;;AA7CxB,MAAA,UAAA,GAAA,CAAA,WAAA,CAAA,CAAA;;AAAA,EAAA,GAAA,EAAA,CAAA;AAAA,EAuEY,KAAM,EAAA,2BAAA;AAAA,EACN,WAAU,EAAA,mCAAA;;AA0DI,MAAA,WAAA,GAAA,EAAA,KAAA,EAAM,kCAAkC,EAAA,CAAA;;EAiChC,KAAM,EAAA,wBAAA;AAAA,EAAyB,WAAU,EAAA,sBAAA;;AAC5D,MAAA,WAAA,GAAA,EAAA,KAAA,EAAM,8BAA8B,EAAA,CAAA;;;;;;;;;;;;;sBAnKjDC,WAmLiB,CAAA,yBAAA,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;AAAA,kBAXJA,kBAUS,CAAA,QAAA,EAAA;AAAA,oBATP,KAAM,EAAA,0BAAA;AAAA,oBACN,WAAU,EAAA,2BAAA;AAAA,oBACT,OAAK,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAxKpBgB,aAwK2B,CAAA,CAAA,MAAA,KAAA,IAAA,CAAA,gBAAA,CAAgB,CAAE,IAAQ,CAAA,QAAA,CAAA,EAAA,CAAA,MAAA,CAAA,CAAA,CAAA;AAAA,mBAAA,EAAA;AAxKrD,oBAAAV,eAAA;AAAA,sBAAAC,eAAA,CA0KiB,eAAU,CAAG,GAAA,GAAA;AAAA,sBAChB,CAAA;AAAA;AAAA,qBAAA;AAAA,oBAGEH,WAAA,CAAA,0BAAA,EAAA;AAAA,sBAFA,KA5KhB,EAAAM,cAAA,CAAA,CA4KsB,+BAA+B,EAAA,EAAA,wCAAA,EACe,IAAQ,CAAA,QAAA,EAAA,CAAA,CAAA;AAAA,qBAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,OAAA,CAAA,CAAA;;;AA7K5E,eAAA,CAAA,IAAAD,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,aAAA,CAAA;AAAA,YAAA,CAAA,EAAA,CAAA;AAAA;AAAA,WAAA,CAAA;;;;AAAA,OAAA,IAAAA,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,KAAA,CAAA;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"ai-overview.vue.js","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue"],"sourcesContent":["<template>\n <CollapseHeight>\n <div\n v-if=\"!isNoResults\"\n ref=\"aiOverviewRef\"\n class=\"x-ai-overview\"\n data-test=\"ai-overview-wrapper\"\n >\n <div class=\"x-ai-overview-main\">\n <Fade mode=\"out-in\">\n <span\n v-if=\"suggestionsLoading\"\n class=\"x-ai-overview-title-loading\"\n data-test=\"ai-overview-title-loading\"\n >\n <span class=\"x-ai-overview-title-loading-indicator\" />\n <span\n class=\"x-ai-overview-title-loading-text\"\n data-test=\"ai-overview-title-loading-text\"\n >\n <slot name=\"title-loading\">\n {{ titleLoading }}\n </slot>\n </span>\n </span>\n <DisplayEmitter\n v-else\n :payload=\"tagging?.toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'overview',\n displayOriginalQuery: query || 'overview-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-overview-display-emitter\"\n >\n <span class=\"x-ai-overview-title\" data-test=\"ai-overview-title\">\n <AIStarIcon class=\"x-ai-overview-title-icon\" />{{ !!title ? title : suggestionText }}\n </span>\n </DisplayEmitter>\n </Fade>\n <ChangeHeight>\n <div class=\"x-ai-overview-content-wrapper\">\n <span\n v-if=\"title\"\n class=\"x-ai-overview-content-title\"\n data-test=\"ai-overview-content-title\"\n >{{ suggestionText }}\n </span>\n <div\n :class=\"contentClasses\"\n data-test=\"ai-overview-content\"\n v-html=\"parsedResponseText\"\n />\n </div>\n </ChangeHeight>\n <slot name=\"extra-content\" />\n </div>\n <CollapseHeight\n :style=\"{\n '--x-collapse-height-transition-duration': `${300 * suggestionsSearch.length}ms`,\n }\"\n data-test=\"ai-overview-collapse-height-suggestions\"\n >\n <div v-show=\"expanded\">\n <SpinnerIcon\n v-if=\"!suggestionsSearch.length\"\n class=\"x-ai-overview-suggestions-loading\"\n data-test=\"ai-overview-suggestions-loading\"\n />\n <div\n v-else\n class=\"x-ai-overview-suggestions\"\n data-test=\"ai-overview-suggestions-container\"\n >\n <DisplayEmitter\n v-for=\"(\n { query: suggestionQuery, results: queriesResults }, suggestionIndex\n ) in suggestionsSearch\"\n :key=\"suggestionQuery\"\n :payload=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplay ?? emptyTaggingRequest\n \"\n :event-metadata=\"{\n feature: 'overview',\n displayOriginalQuery: query || 'overview-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-overview-query-display-emitter\"\n >\n <div\n class=\"x-ai-overview-suggestion\"\n data-test=\"ai-overview-suggestion\"\n :class=\"{\n 'x-ai-overview-result-animation': shouldAnimateSuggestion,\n }\"\n :style=\"{ animationDelay: `${suggestionIndex * 300}ms` }\"\n >\n <BaseEventButton\n class=\"x-ai-overview-suggestion-query-btn\"\n :events=\"{ UserAcceptedAQuery: suggestionQuery }\"\n >\n {{ suggestionQuery }}\n <ArrowRightIcon class=\"x-ai-overview-suggestion-query-btn-icon\" />\n </BaseEventButton>\n\n <DisplayClickProvider\n :tooling-display-tagging=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplayClick\n \"\n :tooling-add2-cart-tagging=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplayAdd2Cart\n \"\n result-feature=\"overview\"\n >\n <slot name=\"sliding-panel\" :results=\"queriesResults\">\n <SlidingPanel\n :class=\"slidingPanelsClasses\"\n :scroll-container-class=\"slidingPanelContainersClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <ul class=\"x-ai-overview-suggestion-results\">\n <li\n v-for=\"(result, resultIndex) in queriesResults\"\n :key=\"result.id\"\n data-test=\"ai-overview-suggestion-result\"\n :class=\"{\n 'x-ai-overview-result-animation': shouldAnimateSuggestion,\n }\"\n :style=\"{\n animationDelay: `${suggestionIndex * 300 + resultIndex * 300}ms`,\n }\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </ul>\n </SlidingPanel>\n </slot>\n </DisplayClickProvider>\n </div>\n </DisplayEmitter>\n <slot name=\"suggestions-extra-content\" />\n </div>\n </div>\n </CollapseHeight>\n\n <Fade>\n <div\n v-if=\"queries.length\"\n class=\"x-cursor-pointer\"\n data-test=\"ai-overview-toggle-button-wrapper\"\n @click=\"emitAndSetExpand(!expanded)\"\n >\n <div v-show=\"!expanded\" class=\"x-ai-overview-gradient\" data-test=\"ai-overview-gradient\" />\n <div class=\"x-ai-overview-toggle-wrapper\">\n <button\n class=\"x-ai-overview-toggle-btn\"\n data-test=\"ai-overview-toggle-button\"\n @click.stop=\"emitAndSetExpand(!expanded)\"\n >\n {{ buttonText }}\n <ChevronDownIcon\n class=\"x-ai-overview-toggle-btn-icon\"\n :class=\"{ 'x-ai-overview-toggle-btn-icon-expanded': expanded }\"\n />\n </button>\n </div>\n </div>\n </Fade>\n </div>\n </CollapseHeight>\n</template>\n\n<script lang=\"ts\">\nimport type { TaggingRequest } from '@empathyco/x-types'\nimport { marked } from 'marked'\nimport { computed, defineComponent, onMounted, ref, watch } from 'vue'\nimport {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n DisplayClickProvider,\n Fade,\n SlidingPanel,\n SpinnerIcon,\n} from '../../../components'\nimport DisplayEmitter from '../../../components/display-emitter.vue'\nimport { use$x, useGetter, useState } from '../../../composables'\nimport { typing } from '../../../directives'\nimport { aiXModule } from '../x-module'\n\nexport default defineComponent({\n directives: {\n typing,\n },\n xModule: aiXModule.name,\n components: {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChevronDownIcon,\n CollapseHeight,\n ChangeHeight,\n Fade,\n SlidingPanel,\n SpinnerIcon,\n DisplayEmitter,\n DisplayClickProvider,\n },\n props: {\n /* The text displayed when the question ended loading */\n title: {\n type: String,\n },\n /* The text displayed when the question is loading. */\n titleLoading: {\n type: String,\n default: 'Generating with Empathy AI',\n },\n /* The text displayed on the toggle button when collapsed. */\n expandText: {\n type: String,\n default: 'Show more',\n },\n /* The text displayed on the toggle button when expanded. */\n collapseText: {\n type: String,\n default: 'Show less',\n },\n /* Auto expand the AI Overview when there are queries in AI and no-results in search. */\n autoExpandInSearchNoResults: {\n type: Boolean,\n default: true,\n },\n /* The classes added to the parsed response text container. */\n contentClasses: {\n type: String,\n },\n /* The classes added to each sliding panel for each query. */\n slidingPanelsClasses: {\n type: String,\n },\n /* The classes added to each sliding panel container of each query. */\n slidingPanelContainersClasses: {\n type: String,\n },\n /* The classes added to each sliding panel button of each query. */\n slidingPanelButtonsClasses: {\n type: String,\n },\n },\n setup(props) {\n const $x = use$x()\n const { query } = useGetter('ai')\n const {\n suggestionText,\n responseText,\n suggestionsSearch,\n suggestionsLoading,\n tagging,\n isNoResults,\n queries,\n } = useState('ai')\n\n const emptyTaggingRequest: TaggingRequest = { url: '', params: {} }\n\n const aiOverviewRef = ref<HTMLDivElement | null>(null)\n const expanded = ref(false)\n const shouldAnimateSuggestion = ref(true)\n const parsedResponseText = computed(() => marked.parse(responseText.value))\n\n const buttonText = computed(() => (expanded.value ? props.collapseText : props.expandText))\n\n function emitAndSetExpand(isExpanded: boolean) {\n $x.emit('UserClickedAiOverviewExpandButton', expanded.value, {\n suggestionText: suggestionText.value,\n toolingDisplayClick: tagging.value?.toolingDisplayClick,\n })\n\n expanded.value = isExpanded\n if (!expanded.value) {\n aiOverviewRef.value?.scrollIntoView({ behavior: 'smooth' })\n shouldAnimateSuggestion.value = false\n }\n }\n\n /* Expand AIOverview programmatically when the `autoExpandInSearchNoResults` prop is active,\n the request for suggestions has ended; there are queries in AI and no-results in search. */\n watch([suggestionsLoading, () => $x.noResults], () => {\n if (\n props.autoExpandInSearchNoResults &&\n !suggestionsLoading.value &&\n queries.value.length &&\n $x.noResults\n ) {\n emitAndSetExpand(true)\n }\n })\n\n $x.on('AiSuggestionsRequestUpdated', false).subscribe(() => {\n expanded.value = false\n shouldAnimateSuggestion.value = true\n })\n\n onMounted(() => {\n $x.emit('AiOverviewMounted', undefined, { feature: 'overview' })\n })\n\n return {\n aiOverviewRef,\n buttonText,\n emptyTaggingRequest,\n expanded,\n parsedResponseText,\n suggestionsLoading,\n suggestionsSearch,\n suggestionText,\n emitAndSetExpand,\n shouldAnimateSuggestion,\n query,\n tagging,\n isNoResults,\n queries,\n }\n },\n})\n</script>\n\n<style lang=\"css\">\n.x-ai-overview {\n --color: var(--x-ai-overview-color, #bbc9cf);\n --color-lighter: var(--x-ai-overview-color-lighter, color-mix(in srgb, var(--color) 25%, white));\n\n position: relative;\n border-radius: 1.5rem;\n background-color: var(--color-lighter);\n}\n\n.x-ai-overview-main {\n padding: 1rem;\n max-width: var(--x-ai-overview-main-max-width, none);\n margin: 0 auto;\n}\n\n.x-ai-overview-title {\n display: flex;\n font-size: 0.875rem;\n font-weight: 700;\n gap: 0.25rem;\n align-items: center;\n margin-bottom: 0.5rem;\n}\n\n.x-ai-overview-title-loading {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n margin-bottom: 0.5rem;\n}\n\n.x-ai-overview-title-loading-indicator {\n width: 0.75rem;\n height: 0.75rem;\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n border-radius: 9999px;\n background-color: var(--color);\n}\n\n.x-ai-overview-title-loading-text {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n font-size: 0.75rem;\n}\n\n.x-ai-overview-title-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n color: var(--color);\n flex-shrink: 0;\n}\n\n.x-ai-overview-content-wrapper {\n display: flex;\n flex-direction: column;\n text-align: left;\n line-height: 1.25rem;\n}\n\n.x-ai-overview-content-title {\n font-weight: 500;\n margin-bottom: 8px;\n}\n\n.x-ai-overview-gradient {\n border-radius: 1.5rem;\n cursor: pointer;\n content: none;\n position: absolute;\n width: 100%;\n height: 100%;\n bottom: 0;\n background-image: linear-gradient(to bottom, transparent 0%, var(--color-lighter) 100%);\n}\n\n.x-ai-overview-toggle-wrapper {\n display: flex;\n position: relative;\n}\n\n.x-ai-overview-toggle-btn {\n border-color: var(--button-color-50, #283034);\n background-color: #ffffff;\n color: var(--button-color-50, #283034);\n border-radius: 9999px;\n width: 100%;\n margin: auto;\n padding-right: 1rem;\n padding-left: 1rem;\n display: flex;\n justify-content: center;\n align-items: center;\n border-style: solid;\n border-width: 1px;\n font-weight: 700;\n min-height: 2.5rem;\n gap: 0.5rem;\n font-size: 0.875rem;\n}\n\n.x-ai-overview-toggle-btn:hover {\n border-color: var(--button-color-50, #283034);\n background-color: var(--button-color-50, #283034);\n color: #ffffff;\n}\n\n@media (min-width: 640px) {\n .x-ai-overview-toggle-btn {\n transition-property: all;\n transition-duration: 500ms;\n transform: translateY(50%);\n width: var(--expand-button-width, 200px);\n }\n}\n\n.x-ai-overview-toggle-btn-icon {\n transform: rotate(0deg);\n height: 1rem;\n aspect-ratio: 1 / 1;\n transition-property: all;\n transition-duration: 300ms;\n}\n\n.x-ai-overview-toggle-btn-icon-expanded {\n transform: rotate(180deg);\n}\n\n.x-ai-overview-suggestion-query-btn {\n border-color: transparent;\n background-color: transparent;\n margin-left: 1rem;\n margin-right: 1rem;\n font-weight: 700;\n width: fit-content;\n display: flex;\n align-items: center;\n gap: 1rem;\n}\n\n.x-ai-overview-suggestion-query-btn-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n}\n\n.x-ai-overview-suggestions {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n padding-bottom: 1rem;\n}\n\n.x-ai-overview-suggestions-loading {\n width: 2.5rem;\n height: 2.5rem;\n margin: auto;\n animation: x-spin 1s linear infinite;\n}\n\n.x-ai-overview-suggestion {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.x-ai-overview-suggestion-results {\n display: flex;\n gap: 1rem;\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n@keyframes x-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n</style>\n"],"names":["_createBlock","_withCtx","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_renderSlot","_createTextVNode","_toDisplayString","_createComm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AX,kBAAA,CAYM,OAZN,WAYM,EAAA;AAAA,kBAXJA,kBAUS,CAAA,QAAA,EAAA;AAAA,oBATP,KAAM,EAAA,0BAAA;AAAA,oBACN,WAAU,EAAA,2BAAA;AAAA,oBACT,OAAK,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAY,aAAA,CAAA,CAAA,MAAA,KAAO,IAAgB,CAAA,gBAAA,CAAA,CAAE,IAAQ,CAAA,QAAA,CAAA,EAAA,CAAA,MAAA,CAAA,CAAA,CAAA;AAAA,mBAAA,EAAA;;AAEpC,sBAAAR,eAAA,CAAA,IAAA,CAAA,UAAU,CAAG,GAAA,GAAA;AAAA,sBAChB,CAAA;AAAA;AAAA,qBAAA;AAAA,oBAGEH,WAAA,CAAA,0BAAA,EAAA;AAAA,sBAFA,KAAK,EAAAK,cAAA,CAAA,CAAC,+BAA+B,EAAA,EAAA,wCAAA,EACe,IAAQ,CAAA,QAAA,EAAA,CAAA,CAAA;AAAA,qBAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,OAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"device-detector.vue.js","sources":["../../../../../src/x-modules/device/components/device-detector.vue"],"sourcesContent":["<template>\n <GlobalEvents v-if=\"!force\" target=\"window\" @resize=\"throttledStoreWindowWidth\" />\n</template>\n\n<script lang=\"ts\">\nimport type { PropType, Ref } from 'vue'\nimport { computed, defineComponent, onMounted, ref, watch } from 'vue'\nimport { GlobalEvents } from 'vue-global-events'\nimport { useXBus } from '../../../composables/use-x-bus'\nimport { throttle } from '../../../utils/throttle'\nimport { deviceXModule } from '../x-module'\n\n/** Alias just to improve code readiness. */\ntype Device = string\n/** Alias just to improve code readiness. */\ntype MaxWidth = number\n\n/**\n * This component helps to detect or setting a device, that can be used later to create\n * different layouts optimized for different devices. This detected device is available under\n * the {@link XComponentAliasAPI.device} property.\n *\n * @public\n */\nexport default defineComponent({\n name: 'DeviceDetector',\n xModule: deviceXModule.name,\n components: { GlobalEvents },\n props: {\n /**\n * Record of the device name, that can be whatever you want `xs`, `mobile`, `big`... And\n * the max width in pixels for that device.\n *\n * @public\n */\n breakpoints: {\n type: Object as PropType<Record<Device, MaxWidth>>,\n default: () => ({}),\n },\n /**\n * Forces a device, ignoring the breakpoints prop.\n *\n * @public\n */\n force: String as PropType<Device>,\n\n /**\n * Time in milliseconds to throttle the resize events used to detect the device.\n *\n * @public\n */\n throttleMs: {\n type: Number,\n default: 100,\n },\n },\n setup(props) {\n const xBus = useXBus()\n\n /**\n * The width in pixels of the window where the app is being rendered.\n *\n * @internal\n */\n const windowWidthPx: Ref<number | null> = ref(null)\n\n /**\n * Stores the window width in {@link DeviceDetector.windowWidthPx}.\n *\n * @internal\n */\n const storeWindowWidth = (): void => {\n windowWidthPx.value = window.innerWidth\n }\n\n /**\n * Throttled version of {@link DeviceDetector.storeWindowWidth} function.\n *\n * @internal\n */\n let throttledStoreWindowWidth = storeWindowWidth\n\n /**\n * List of each of the entries of the breakpoints sorted from the smallest to the biggest\n * max width.\n *\n * @returns A list of the breakpoints sorted by its max width in ascending order.\n *\n * @internal\n */\n const sortedBreakpoints = computed((): [Device, MaxWidth][] =>\n Object.entries(props.breakpoints).sort(([, aWidth], [, bWidth]) => aWidth - bWidth),\n )\n\n /**\n * The device detected by this component, or the value provided in {@link DeviceDetector.force}\n * prop.\n *\n * @returns The detected device, or the value provided in {@link DeviceDetector.force}\n * prop.\n *\n * @internal\n */\n const detectedDevice = computed((): string | null => {\n if (props.force) {\n return props.force\n } else if (windowWidthPx.value === null) {\n return null\n } else {\n return (\n sortedBreakpoints.value.find(([, width]) => windowWidthPx.value! <= width)?.[0] ?? null\n )\n }\n })\n\n watch(\n detectedDevice,\n device => {\n xBus.emit('DeviceProvided', device)\n },\n { immediate: true },\n )\n\n /**\n * Updates {@link DeviceDetector.throttledStoreWindowWidth} with the throttle time at\n * {@link DeviceDetector.throttleMs}.\n *\n * @param throttleMs - The new duration in milliseconds for the throttle.\n *\n * @internal\n */\n watch(\n () => props.throttleMs,\n throttleMs => {\n throttledStoreWindowWidth = throttle(storeWindowWidth, throttleMs)\n },\n { immediate: true },\n )\n\n /**\n * Initialises the store window width.\n *\n * @remarks This is done this way to ensure SSR compatibility.\n *\n * @internal\n */\n onMounted(() => {\n storeWindowWidth()\n })\n\n return {\n throttledStoreWindowWidth,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`DeviceProvided`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n## See it in action\n\nThis component renders no element to the DOM, but serves as way to safely detect or set the device\nname given an object containing all the possible breakpoints.\n\n_Try resizing the browser window!_\n\n```vue live\n<template>\n <div>\n <DeviceDetector :breakpoints=\"breakpoints\" />\n {{ $x.device }}\n </div>\n</template>\n\n<script>\nimport { DeviceDetector } from '@empathyco/x-components/device'\n\nexport default {\n name: 'DeviceDemo',\n components: {\n DeviceDetector,\n },\n data() {\n return {\n breakpoints: {\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\n },\n }\n },\n}\n</script>\n```\n\n### Play with props\n\nIn this example, the `DeviceDetector` has been forced to always detect the `mobile` device. No\nmatter what the window width is.\n\n_Try resizing the window to check that it never changes_\n\n```vue live\n<template>\n <div>\n <DeviceDetector force=\"mobile\" :breakpoints=\"breakpoints\" />\n {{ $x.device }}\n </div>\n</template>\n\n<script>\nimport { DeviceDetector } from '@empathyco/x-components/device'\n\nexport default {\n name: 'DeviceDemo',\n components: {\n DeviceDetector,\n },\n data() {\n return {\n breakpoints: {\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\n },\n }\n },\n}\n</script>\n```\n\n### Play with events\n\nIn this example, the `DeviceDetector` will emit a `DeviceProvided` event, with the new device as the\npayload. This device is stored in a data variable and then displayed.\n\n_Try resizing the browser window!_\n\n```vue live\n<template>\n <div>\n <DeviceDetector :breakpoints=\"breakpoints\" @DeviceProvided=\"storeDevice\" />\n {{ device }}\n </div>\n</template>\n\n<script>\nimport { DeviceDetector } from '@empathyco/x-components/device'\n\nexport default {\n name: 'DeviceDemo',\n components: {\n DeviceDetector,\n },\n data() {\n return {\n device: 'unknown',\n breakpoints: {\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\n },\n }\n },\n methods: {\n storeDevice(device) {\n this.device = device\n },\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_createCommentVNode"],"mappings":";;;;;;AACuB,EAAA,OAAA,CAAA,IAAA,CAAA,KAAA,IAAAA,SAAA,EAAA,EAArBC,WAAkF,CAAA,uBAAA,EAAA;AAAA,IADpF,GAAA,EAAA,CAAA;AAAA,IAC8B,MAAO,EAAA,QAAA;AAAA,IAAU,QAAQ,EAAA,IAAA,CAAA,yBAAA;AAAA,GADvD,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"device-detector.vue.js","sources":["../../../../../src/x-modules/device/components/device-detector.vue"],"sourcesContent":["<template>\n <GlobalEvents v-if=\"!force\" target=\"window\" @resize=\"throttledStoreWindowWidth\" />\n</template>\n\n<script lang=\"ts\">\nimport type { PropType, Ref } from 'vue'\nimport { computed, defineComponent, onMounted, ref, watch } from 'vue'\nimport { GlobalEvents } from 'vue-global-events'\nimport { useXBus } from '../../../composables/use-x-bus'\nimport { throttle } from '../../../utils/throttle'\nimport { deviceXModule } from '../x-module'\n\n/** Alias just to improve code readiness. */\ntype Device = string\n/** Alias just to improve code readiness. */\ntype MaxWidth = number\n\n/**\n * This component helps to detect or setting a device, that can be used later to create\n * different layouts optimized for different devices. This detected device is available under\n * the {@link XComponentAliasAPI.device} property.\n *\n * @public\n */\nexport default defineComponent({\n name: 'DeviceDetector',\n xModule: deviceXModule.name,\n components: { GlobalEvents },\n props: {\n /**\n * Record of the device name, that can be whatever you want `xs`, `mobile`, `big`... And\n * the max width in pixels for that device.\n *\n * @public\n */\n breakpoints: {\n type: Object as PropType<Record<Device, MaxWidth>>,\n default: () => ({}),\n },\n /**\n * Forces a device, ignoring the breakpoints prop.\n *\n * @public\n */\n force: String as PropType<Device>,\n\n /**\n * Time in milliseconds to throttle the resize events used to detect the device.\n *\n * @public\n */\n throttleMs: {\n type: Number,\n default: 100,\n },\n },\n setup(props) {\n const xBus = useXBus()\n\n /**\n * The width in pixels of the window where the app is being rendered.\n *\n * @internal\n */\n const windowWidthPx: Ref<number | null> = ref(null)\n\n /**\n * Stores the window width in {@link DeviceDetector.windowWidthPx}.\n *\n * @internal\n */\n const storeWindowWidth = (): void => {\n windowWidthPx.value = window.innerWidth\n }\n\n /**\n * Throttled version of {@link DeviceDetector.storeWindowWidth} function.\n *\n * @internal\n */\n let throttledStoreWindowWidth = storeWindowWidth\n\n /**\n * List of each of the entries of the breakpoints sorted from the smallest to the biggest\n * max width.\n *\n * @returns A list of the breakpoints sorted by its max width in ascending order.\n *\n * @internal\n */\n const sortedBreakpoints = computed((): [Device, MaxWidth][] =>\n Object.entries(props.breakpoints).sort(([, aWidth], [, bWidth]) => aWidth - bWidth),\n )\n\n /**\n * The device detected by this component, or the value provided in {@link DeviceDetector.force}\n * prop.\n *\n * @returns The detected device, or the value provided in {@link DeviceDetector.force}\n * prop.\n *\n * @internal\n */\n const detectedDevice = computed((): string | null => {\n if (props.force) {\n return props.force\n } else if (windowWidthPx.value === null) {\n return null\n } else {\n return (\n sortedBreakpoints.value.find(([, width]) => windowWidthPx.value! <= width)?.[0] ?? null\n )\n }\n })\n\n watch(\n detectedDevice,\n device => {\n xBus.emit('DeviceProvided', device)\n },\n { immediate: true },\n )\n\n /**\n * Updates {@link DeviceDetector.throttledStoreWindowWidth} with the throttle time at\n * {@link DeviceDetector.throttleMs}.\n *\n * @param throttleMs - The new duration in milliseconds for the throttle.\n *\n * @internal\n */\n watch(\n () => props.throttleMs,\n throttleMs => {\n throttledStoreWindowWidth = throttle(storeWindowWidth, throttleMs)\n },\n { immediate: true },\n )\n\n /**\n * Initialises the store window width.\n *\n * @remarks This is done this way to ensure SSR compatibility.\n *\n * @internal\n */\n onMounted(() => {\n storeWindowWidth()\n })\n\n return {\n throttledStoreWindowWidth,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`DeviceProvided`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n## See it in action\n\nThis component renders no element to the DOM, but serves as way to safely detect or set the device\nname given an object containing all the possible breakpoints.\n\n_Try resizing the browser window!_\n\n```vue live\n<template>\n <div>\n <DeviceDetector :breakpoints=\"breakpoints\" />\n {{ $x.device }}\n </div>\n</template>\n\n<script>\nimport { DeviceDetector } from '@empathyco/x-components/device'\n\nexport default {\n name: 'DeviceDemo',\n components: {\n DeviceDetector,\n },\n data() {\n return {\n breakpoints: {\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\n },\n }\n },\n}\n</script>\n```\n\n### Play with props\n\nIn this example, the `DeviceDetector` has been forced to always detect the `mobile` device. No\nmatter what the window width is.\n\n_Try resizing the window to check that it never changes_\n\n```vue live\n<template>\n <div>\n <DeviceDetector force=\"mobile\" :breakpoints=\"breakpoints\" />\n {{ $x.device }}\n </div>\n</template>\n\n<script>\nimport { DeviceDetector } from '@empathyco/x-components/device'\n\nexport default {\n name: 'DeviceDemo',\n components: {\n DeviceDetector,\n },\n data() {\n return {\n breakpoints: {\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\n },\n }\n },\n}\n</script>\n```\n\n### Play with events\n\nIn this example, the `DeviceDetector` will emit a `DeviceProvided` event, with the new device as the\npayload. This device is stored in a data variable and then displayed.\n\n_Try resizing the browser window!_\n\n```vue live\n<template>\n <div>\n <DeviceDetector :breakpoints=\"breakpoints\" @DeviceProvided=\"storeDevice\" />\n {{ device }}\n </div>\n</template>\n\n<script>\nimport { DeviceDetector } from '@empathyco/x-components/device'\n\nexport default {\n name: 'DeviceDemo',\n components: {\n DeviceDetector,\n },\n data() {\n return {\n device: 'unknown',\n breakpoints: {\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\n },\n }\n },\n methods: {\n storeDevice(device) {\n this.device = device\n },\n },\n}\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_createCommentVNode"],"mappings":";;;;;;AACuB,EAAA,OAAA,CAAA,IAAA,CAAA,KAAA,IAAAA,SAAA,EAAA,EAArBC,WAAkF,CAAA,uBAAA,EAAA;AAAA,IAAA,GAAA,EAAA,CAAA;IAAtD,MAAO,EAAA,QAAA;AAAA,IAAU,QAAQ,EAAA,IAAA,CAAA,yBAAA;AAAA,GAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"empathize.vue.js","sources":["../../../../../src/x-modules/empathize/components/empathize.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <div\n v-show=\"isOpenAndHasContent\"\n ref=\"empathizeRef\"\n class=\"x-empathize\"\n data-test=\"empathize\"\n @mousedown.prevent\n @focusin=\"open\"\n @focusout=\"close\"\n >\n <!-- @slot (Required) Modal container content -->\n <slot />\n </div>\n </component>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType, WatchStopHandle } from 'vue'\nimport type { XEvent } from '../../../wiring'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport { NoAnimation } from '../../../components'\nimport { use$x, useDebounce } from '../../../composables'\nimport { AnimationProp } from '../../../types'\nimport { getActiveElement } from '../../../utils'\nimport { empathizeXModule } from '../x-module'\n\n/**\n * Component containing the empathize. It has a required slot to define its content.\n *\n * @public\n */\nexport default defineComponent({\n name: 'Empathize',\n xModule: empathizeXModule.name,\n props: {\n /** Array of {@link XEvent} to open the empathize. */\n eventsToOpenEmpathize: {\n type: Array as PropType<XEvent[]>,\n default: () => ['UserFocusedSearchBox', 'UserIsTypingAQuery', 'UserClickedSearchBox'],\n },\n /** Array of {@link XEvent} to close the empathize. */\n eventsToCloseEmpathize: {\n type: Array as PropType<XEvent[]>,\n default: () => [\n 'UserClosedEmpathize',\n 'UserSelectedASuggestion',\n 'UserPressedEnterKey',\n 'UserBlurredSearchBox',\n ],\n },\n /** Animation component that will be used to animate the empathize. */\n animation: {\n type: AnimationProp,\n default: () => NoAnimation,\n },\n /** Whether the empathize has content or not. As it is only known in the client, it is a prop. */\n hasContent: {\n type: Boolean,\n default: true,\n },\n /** Fallback flag to trigger a search and close the empathize when has no-content. */\n searchAndCloseOnNoContent: {\n type: Boolean,\n default: false,\n },\n /** Debounce time in milliseconds to search and close the empathize when has no-content. */\n searchAndCloseDebounceInMs: {\n type: Number,\n default: 1000,\n },\n },\n setup(props) {\n const $x = use$x()\n\n const empathizeRef = ref<HTMLDivElement | null>(null)\n const isOpen = ref(false)\n const isOpenAndHasContent = computed(() => isOpen.value && props.hasContent)\n\n /** Emit 'EmpathizeOpened' or 'EmpathizeClosed' event when computed changes. */\n watch(isOpenAndHasContent, () => {\n const empathizeEvent = isOpenAndHasContent.value ? 'EmpathizeOpened' : 'EmpathizeClosed'\n $x.emit(empathizeEvent, undefined, { target: empathizeRef.value })\n })\n\n /** Debounce function to change the state `isOpen` to the new value. */\n const changeOpenDebounced = useDebounce((newOpen: boolean) => (isOpen.value = newOpen), 0)\n\n /**\n * Open empathize. This function will be executed on any event in\n * {@link Empathize.eventsToOpenEmpathize} and on DOM event `focusin` on the Empathize root\n * element.\n */\n function open() {\n changeOpenDebounced(true)\n }\n\n /**\n * Close empathize. This function will be executed on any event in\n * {@link Empathize.eventsToCloseEmpathize} and on DOM event `focusout` on the Empathize root\n * element.\n */\n function close() {\n const activeElement = getActiveElement()\n if (!empathizeRef.value?.contains(activeElement)) {\n changeOpenDebounced(false)\n }\n }\n\n /** Events subscriptions to open and close empathize. */\n props.eventsToOpenEmpathize.forEach(event => $x.on(event, false).subscribe(open))\n props.eventsToCloseEmpathize.forEach(event => $x.on(event, false).subscribe(close))\n\n let unwatchSearchBoxQuery: WatchStopHandle = () => {}\n\n /** Debounced function to unwatch the search-box query and also search and close empathize. */\n const searchAndCloseDebounced = useDebounce(async () => {\n if (isOpen.value) {\n unwatchSearchBoxQuery()\n await $x.emit('UserAcceptedAQuery', $x.query.searchBox)\n close()\n }\n }, props.searchAndCloseDebounceInMs)\n\n /**\n * Watcher triggered when `hasContent` change and the `searchAndCloseOnNoContent` flag is active\n * with the following casuistics:\n * 1. Empathize has content: unwatch the search-box query and cancel debounced search&close.\n * 2. Empathize has NO content: create a watcher for the search-box query. It is to debounce the\n * search fallback when the user types in the search-box during debounced time.\n */\n watch(\n () => props.hasContent,\n () => {\n if (props.searchAndCloseOnNoContent) {\n if (props.hasContent) {\n unwatchSearchBoxQuery()\n searchAndCloseDebounced.cancel()\n } else {\n unwatchSearchBoxQuery = watch(() => $x.query.searchBox, searchAndCloseDebounced, {\n immediate: true,\n })\n }\n }\n },\n )\n\n return { empathizeRef, isOpenAndHasContent, open, close }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`EmpathizeOpened`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after receiving an event to change the state `isOpen` to `true` and `hasContent` to `true`.\n The event payload is undefined and can have a metadata with the module and the element that emitted it.\n- [`EmpathizeClosed`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after receiving an event to change the state `isOpen` to `false` and `hasContent` to `true`.\n The event payload is undefined and can have a metadata with the module and the element that emitted it.\n\n## Examples\n\nThis component will listen to the configured events in `eventsToOpenEmpathize` and\n`eventsToCloseEmpathize` props and open/close itself accordingly. By default, those props values\nare:\n\n- Open: `UserFocusedSearchBox`, `UserIsTypingAQuery`, `UserClickedSearchBox`\n- Close: `UserClosedEmpathize`, `UserSelectedASuggestion`, `UserPressedEnter` and 'UserBlurredSearchBox`\n\n### Basic examples\n\nThe component rendering the query suggestions, popular searches and history queries with keyboard\nnavigation.\n\n```vue\n<Empathize>\n <template #default>\n <BaseKeyboardNavigation>\n <QuerySuggestions/>\n <PopularSearches/>\n <HistoryQueries/>\n </BaseKeyboardNavigation>\n </template>\n</Empathize>\n```\n\nDefining custom values for the events to open and close the Empathize. For example opening it when\nthe search box loses the focus and closing it when the search box receives the focus:\n\n```vue\n<Empathize\n :eventsToOpenEmpathize=\"['UserBlurredSearchBox']\"\n :eventsToCloseEmpathize=\"['UserFocusedSearchBox']\"\n>\n <template #default>\n Please, type a query in the Search Box.\n </template>\n</Empathize>\n```\n\nAn animation can be used for the opening and closing using the `animation` prop. The animation, must\nbe a Component with a `Transition` with a slot inside:\n\n```vue\n<Empathize :animation=\"collapseFromTop\">\n <template #default>\n <PopularSearches/>\n </template>\n</Empathize>\n```\n\n### Advance examples\n\nThe component rendering the query suggestions, popular searches and history queries with keyboard\nnavigation. It also configures `searchAndCloseOnNoContent` to trigger a search and close the empathize\nwhen has no-content as fallback behaviour. To do that, `hasContent` prop must be reactive to know\nif the empathize has content or not.\nIt also configures `searchAndCloseDebounceInMs` to 500ms as debounce time to search and close the\nempathize when has no-content.\n\n```vue\n<Empathize\n :animation=\"empathizeAnimation\"\n :events-to-close-empathize=\"empathizeCloseEvents\"\n :has-content=\"showEmpathize\"\n :search-and-close-debounce-in-ms=\"500\"\n search-and-close-on-no-content\n>\n <BaseKeyboardNavigation>\n <QuerySuggestions/>\n <PopularSearches/>\n <HistoryQueries/>\n </BaseKeyboardNavigation>\n</Empathize>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_withDirectives","_createElementVNode","_withModifiers","_renderSlot"],"mappings":";;;;;AACE,EAAA,OAAAA,SAAA,EAAA,EAAAC,WAAA,CAaYC,wBAbI,IAAS,CAAA,SAAA,CAAA,EAAA,IAAA,EAAA;AAAA,IAD3B,iBAEI,MAWM;AAAA,MAXNC,cAAA,CAAAC,kBAAA;AAAA,QAWM,KAAA;AAAA,QAAA;AAAA,UATJ,GAAI,EAAA,cAAA;AAAA,UACJ,KAAM,EAAA,aAAA;AAAA,UACN,WAAU,EAAA,WAAA;AAAA,UACT,WAAA,EAAS,0BAPhBC,aAOM,CAAA,MAAA;AAAA,WAAkB,EAAA,CAAA,SAAA,CAAA,CAAA,CAAA;AAAA,UACjB,WAAO,MAAE,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,IAAA,IAAA,IAAA,CAAA,IAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,UACT,YAAQ,MAAE,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,KAAA,IAAA,IAAA,CAAA,KAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,SAAA;;UAGXC,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,SAAA;;;;gBATA,IAAmB,CAAA,mBAAA,CAAA;AAAA,OAAA,CAAA;;AAHjC,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"empathize.vue.js","sources":["../../../../../src/x-modules/empathize/components/empathize.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <div\n v-show=\"isOpenAndHasContent\"\n ref=\"empathizeRef\"\n class=\"x-empathize\"\n data-test=\"empathize\"\n @mousedown.prevent\n @focusin=\"open\"\n @focusout=\"close\"\n >\n <!-- @slot (Required) Modal container content -->\n <slot />\n </div>\n </component>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType, WatchStopHandle } from 'vue'\nimport type { XEvent } from '../../../wiring'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport { NoAnimation } from '../../../components'\nimport { use$x, useDebounce } from '../../../composables'\nimport { AnimationProp } from '../../../types'\nimport { getActiveElement } from '../../../utils'\nimport { empathizeXModule } from '../x-module'\n\n/**\n * Component containing the empathize. It has a required slot to define its content.\n *\n * @public\n */\nexport default defineComponent({\n name: 'Empathize',\n xModule: empathizeXModule.name,\n props: {\n /** Array of {@link XEvent} to open the empathize. */\n eventsToOpenEmpathize: {\n type: Array as PropType<XEvent[]>,\n default: () => ['UserFocusedSearchBox', 'UserIsTypingAQuery', 'UserClickedSearchBox'],\n },\n /** Array of {@link XEvent} to close the empathize. */\n eventsToCloseEmpathize: {\n type: Array as PropType<XEvent[]>,\n default: () => [\n 'UserClosedEmpathize',\n 'UserSelectedASuggestion',\n 'UserPressedEnterKey',\n 'UserBlurredSearchBox',\n ],\n },\n /** Animation component that will be used to animate the empathize. */\n animation: {\n type: AnimationProp,\n default: () => NoAnimation,\n },\n /** Whether the empathize has content or not. As it is only known in the client, it is a prop. */\n hasContent: {\n type: Boolean,\n default: true,\n },\n /** Fallback flag to trigger a search and close the empathize when has no-content. */\n searchAndCloseOnNoContent: {\n type: Boolean,\n default: false,\n },\n /** Debounce time in milliseconds to search and close the empathize when has no-content. */\n searchAndCloseDebounceInMs: {\n type: Number,\n default: 1000,\n },\n },\n setup(props) {\n const $x = use$x()\n\n const empathizeRef = ref<HTMLDivElement | null>(null)\n const isOpen = ref(false)\n const isOpenAndHasContent = computed(() => isOpen.value && props.hasContent)\n\n /** Emit 'EmpathizeOpened' or 'EmpathizeClosed' event when computed changes. */\n watch(isOpenAndHasContent, () => {\n const empathizeEvent = isOpenAndHasContent.value ? 'EmpathizeOpened' : 'EmpathizeClosed'\n $x.emit(empathizeEvent, undefined, { target: empathizeRef.value })\n })\n\n /** Debounce function to change the state `isOpen` to the new value. */\n const changeOpenDebounced = useDebounce((newOpen: boolean) => (isOpen.value = newOpen), 0)\n\n /**\n * Open empathize. This function will be executed on any event in\n * {@link Empathize.eventsToOpenEmpathize} and on DOM event `focusin` on the Empathize root\n * element.\n */\n function open() {\n changeOpenDebounced(true)\n }\n\n /**\n * Close empathize. This function will be executed on any event in\n * {@link Empathize.eventsToCloseEmpathize} and on DOM event `focusout` on the Empathize root\n * element.\n */\n function close() {\n const activeElement = getActiveElement()\n if (!empathizeRef.value?.contains(activeElement)) {\n changeOpenDebounced(false)\n }\n }\n\n /** Events subscriptions to open and close empathize. */\n props.eventsToOpenEmpathize.forEach(event => $x.on(event, false).subscribe(open))\n props.eventsToCloseEmpathize.forEach(event => $x.on(event, false).subscribe(close))\n\n let unwatchSearchBoxQuery: WatchStopHandle = () => {}\n\n /** Debounced function to unwatch the search-box query and also search and close empathize. */\n const searchAndCloseDebounced = useDebounce(async () => {\n if (isOpen.value) {\n unwatchSearchBoxQuery()\n await $x.emit('UserAcceptedAQuery', $x.query.searchBox)\n close()\n }\n }, props.searchAndCloseDebounceInMs)\n\n /**\n * Watcher triggered when `hasContent` change and the `searchAndCloseOnNoContent` flag is active\n * with the following casuistics:\n * 1. Empathize has content: unwatch the search-box query and cancel debounced search&close.\n * 2. Empathize has NO content: create a watcher for the search-box query. It is to debounce the\n * search fallback when the user types in the search-box during debounced time.\n */\n watch(\n () => props.hasContent,\n () => {\n if (props.searchAndCloseOnNoContent) {\n if (props.hasContent) {\n unwatchSearchBoxQuery()\n searchAndCloseDebounced.cancel()\n } else {\n unwatchSearchBoxQuery = watch(() => $x.query.searchBox, searchAndCloseDebounced, {\n immediate: true,\n })\n }\n }\n },\n )\n\n return { empathizeRef, isOpenAndHasContent, open, close }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`EmpathizeOpened`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after receiving an event to change the state `isOpen` to `true` and `hasContent` to `true`.\n The event payload is undefined and can have a metadata with the module and the element that emitted it.\n- [`EmpathizeClosed`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after receiving an event to change the state `isOpen` to `false` and `hasContent` to `true`.\n The event payload is undefined and can have a metadata with the module and the element that emitted it.\n\n## Examples\n\nThis component will listen to the configured events in `eventsToOpenEmpathize` and\n`eventsToCloseEmpathize` props and open/close itself accordingly. By default, those props values\nare:\n\n- Open: `UserFocusedSearchBox`, `UserIsTypingAQuery`, `UserClickedSearchBox`\n- Close: `UserClosedEmpathize`, `UserSelectedASuggestion`, `UserPressedEnter` and 'UserBlurredSearchBox`\n\n### Basic examples\n\nThe component rendering the query suggestions, popular searches and history queries with keyboard\nnavigation.\n\n```vue\n<Empathize>\n <template #default>\n <BaseKeyboardNavigation>\n <QuerySuggestions/>\n <PopularSearches/>\n <HistoryQueries/>\n </BaseKeyboardNavigation>\n </template>\n</Empathize>\n```\n\nDefining custom values for the events to open and close the Empathize. For example opening it when\nthe search box loses the focus and closing it when the search box receives the focus:\n\n```vue\n<Empathize\n :eventsToOpenEmpathize=\"['UserBlurredSearchBox']\"\n :eventsToCloseEmpathize=\"['UserFocusedSearchBox']\"\n>\n <template #default>\n Please, type a query in the Search Box.\n </template>\n</Empathize>\n```\n\nAn animation can be used for the opening and closing using the `animation` prop. The animation, must\nbe a Component with a `Transition` with a slot inside:\n\n```vue\n<Empathize :animation=\"collapseFromTop\">\n <template #default>\n <PopularSearches/>\n </template>\n</Empathize>\n```\n\n### Advance examples\n\nThe component rendering the query suggestions, popular searches and history queries with keyboard\nnavigation. It also configures `searchAndCloseOnNoContent` to trigger a search and close the empathize\nwhen has no-content as fallback behaviour. To do that, `hasContent` prop must be reactive to know\nif the empathize has content or not.\nIt also configures `searchAndCloseDebounceInMs` to 500ms as debounce time to search and close the\nempathize when has no-content.\n\n```vue\n<Empathize\n :animation=\"empathizeAnimation\"\n :events-to-close-empathize=\"empathizeCloseEvents\"\n :has-content=\"showEmpathize\"\n :search-and-close-debounce-in-ms=\"500\"\n search-and-close-on-no-content\n>\n <BaseKeyboardNavigation>\n <QuerySuggestions/>\n <PopularSearches/>\n <HistoryQueries/>\n </BaseKeyboardNavigation>\n</Empathize>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_withCtx","_withDirectives","_createElementVNode","_withModifiers","_renderSlot"],"mappings":";;;;;AACE,EAAA,OAAAA,SAAA,EAAA,EAAAC,WAAA,CAaYC,wBAbI,IAAS,CAAA,SAAA,CAAA,EAAA,IAAA,EAAA;AAAA,IAAA,OAAA,EAAAC,OAAA,CACvB,MAWM;AAAA,MAXNC,cAAA,CAAAC,kBAAA;AAAA,QAWM,KAAA;AAAA,QAAA;AAAA,UATJ,GAAI,EAAA,cAAA;AAAA,UACJ,KAAM,EAAA,aAAA;AAAA,UACN,WAAU,EAAA,WAAA;AAAA,UACT,aAAS,MAAV,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAC,aAAA,CAAA,MAAA;AAAA,WAAkB,EAAA,CAAA,SAAA,CAAA,CAAA,CAAA;AAAA,UACjB,WAAO,MAAE,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,IAAA,IAAA,IAAA,CAAA,IAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,UACT,YAAQ,MAAE,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,KAAA,IAAA,IAAA,CAAA,KAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,SAAA;;UAGXC,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,SAAA;;;;gBATA,IAAmB,CAAA,mBAAA,CAAA;AAAA,OAAA,CAAA;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"clear-filters.vue.js","sources":["../../../../../src/x-modules/facets/components/clear-filters.vue"],"sourcesContent":["<template>\n <BaseEventButton\n v-if=\"isVisible\"\n class=\"x-clear-filters x-button\"\n data-test=\"clear-filters\"\n :disabled=\"!hasSelectedFilters\"\n :events=\"events\"\n :class=\"cssClasses\"\n >\n <slot :selected-filters=\"selectedFilters\">Clear Filters ({{ selectedFilters.length }})</slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\nimport type { Facet } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\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 { useFacets } from '../composables/use-facets'\nimport { facetsXModule } from '../x-module'\n\n/**\n * Renders a simple button, emitting the needed events when clicked.\n *\n * @public\n */\nexport default defineComponent({\n name: 'ClearFilters',\n xModule: facetsXModule.name,\n components: { BaseEventButton },\n props: {\n /** Array of facets ids used to get the selected filters for those facets. */\n facetsIds: Array as PropType<Array<Facet['id']>>,\n /** Flag to render the component even if there are no filters selected. */\n alwaysVisible: Boolean,\n },\n setup(props) {\n const { selectedFilters, hasSelectedFilters, isVisible } = useFacets(props)\n\n /**\n * The events that will be emitted when the button clear filters is clicked.\n *\n * @returns The events to be emitted when the button clear filters is clicked.\n */\n const events = computed<Partial<XEventsTypes>>(() => ({\n UserClickedClearAllFilters: props.facetsIds,\n }))\n\n /**\n * Dynamic CSS classes to apply to the component.\n *\n * @returns The dynamic CSS classes to apply to the component.\n */\n const cssClasses = computed<VueCSSClasses>(() => ({\n 'x-clear-filters--has-not-selected-filters': !hasSelectedFilters.value,\n 'x-clear-filters--has-selected-filters': hasSelectedFilters.value,\n }))\n\n return {\n selectedFilters,\n hasSelectedFilters,\n isVisible,\n events,\n cssClasses,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserClickedClearAllFilters`](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 to clear a certain facets filter. The event\n payload is the id of the facets that are going to be cleared.\n- [`UserClickedClearAllFilters`](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 undefined.\n\n## Examples\n\nThis component renders a button, which on clicked emits the `UserClickedClearAllFilters` or\n`UserClickedClearAllFilters` event.\n\n### Basic usage\n\n```vue\n<ClearFilters />\n```\n\n### Customizing its contents\n\nIn this example, show the custom message in button.\n\n```vue\n<ClearFilters v-slot=\"{ selectedFilters }\">\n Delete {{ selectedFilters.length }} selected\n</ClearFilters>\n```\n\nIn this example, show the custom message in button with always visible a true and list of facets\nids.\n\n```vue\n<ClearFilters v-slot=\"{ selectedFilters }\" :alwaysVisible=\"true\" :facetsIds=\"facetsIds\">\n Delete {{ selectedFilters.length }} selected\n</ClearFilters>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_normalizeClass","_withCtx","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode"],"mappings":";;;;;;AAEU,EAAA,OAAA,IAAA,CAAA,SAAA,IAAAA,SAAA,EAAA,EADRC,WASkB,CAAA,0BAAA,EAAA;AAAA,IAVpB,GAAA,EAAA,CAAA;AAAA,IAGI,KAAA,EAHJC,cAGU,CAAA,CAAA,0BAAA,EAIE,IAAU,CAAA,UAAA,CAAA,CAAA;AAAA,IAHlB,WAAU,EAAA,eAAA;AAAA,IACT,UAAQ,CAAG,IAAA,CAAA,kBAAA;AAAA,IACX,MAAQ,EAAA,IAAA,CAAA,MAAA;AAAA,GAAA,EAAA;AANb,IAAA,OAAA,EAAAC,OAAA,CASI,MAA6F;AAAA,MAA7FC,UAA6F,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAtF,eAAkB,EAAA,IAAA,CAAA,eAAA,IAAzB,MAA6F;AAAA,QATjGC,eAAA;AAAA,UAS8C,iBAAe,GAAAC,eAAA,CAAG,IAAgB,CAAA,eAAA,CAAA,MAAM,CAAG,GAAA,GAAA;AAAA,UAAC,CAAA;AAAA;AAAA,SAAA;AAAA,OAAA,CAAA;;AAT1F,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,EAAA,CAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,OAAA,CAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"clear-filters.vue.js","sources":["../../../../../src/x-modules/facets/components/clear-filters.vue"],"sourcesContent":["<template>\n <BaseEventButton\n v-if=\"isVisible\"\n class=\"x-clear-filters x-button\"\n data-test=\"clear-filters\"\n :disabled=\"!hasSelectedFilters\"\n :events=\"events\"\n :class=\"cssClasses\"\n >\n <slot :selected-filters=\"selectedFilters\">Clear Filters ({{ selectedFilters.length }})</slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\nimport type { Facet } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\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 { useFacets } from '../composables/use-facets'\nimport { facetsXModule } from '../x-module'\n\n/**\n * Renders a simple button, emitting the needed events when clicked.\n *\n * @public\n */\nexport default defineComponent({\n name: 'ClearFilters',\n xModule: facetsXModule.name,\n components: { BaseEventButton },\n props: {\n /** Array of facets ids used to get the selected filters for those facets. */\n facetsIds: Array as PropType<Array<Facet['id']>>,\n /** Flag to render the component even if there are no filters selected. */\n alwaysVisible: Boolean,\n },\n setup(props) {\n const { selectedFilters, hasSelectedFilters, isVisible } = useFacets(props)\n\n /**\n * The events that will be emitted when the button clear filters is clicked.\n *\n * @returns The events to be emitted when the button clear filters is clicked.\n */\n const events = computed<Partial<XEventsTypes>>(() => ({\n UserClickedClearAllFilters: props.facetsIds,\n }))\n\n /**\n * Dynamic CSS classes to apply to the component.\n *\n * @returns The dynamic CSS classes to apply to the component.\n */\n const cssClasses = computed<VueCSSClasses>(() => ({\n 'x-clear-filters--has-not-selected-filters': !hasSelectedFilters.value,\n 'x-clear-filters--has-selected-filters': hasSelectedFilters.value,\n }))\n\n return {\n selectedFilters,\n hasSelectedFilters,\n isVisible,\n events,\n cssClasses,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserClickedClearAllFilters`](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 to clear a certain facets filter. The event\n payload is the id of the facets that are going to be cleared.\n- [`UserClickedClearAllFilters`](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 undefined.\n\n## Examples\n\nThis component renders a button, which on clicked emits the `UserClickedClearAllFilters` or\n`UserClickedClearAllFilters` event.\n\n### Basic usage\n\n```vue\n<ClearFilters />\n```\n\n### Customizing its contents\n\nIn this example, show the custom message in button.\n\n```vue\n<ClearFilters v-slot=\"{ selectedFilters }\">\n Delete {{ selectedFilters.length }} selected\n</ClearFilters>\n```\n\nIn this example, show the custom message in button with always visible a true and list of facets\nids.\n\n```vue\n<ClearFilters v-slot=\"{ selectedFilters }\" :alwaysVisible=\"true\" :facetsIds=\"facetsIds\">\n Delete {{ selectedFilters.length }} selected\n</ClearFilters>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_normalizeClass","_renderSlot","_createTextVNode","_toDisplayString"],"mappings":";;;;;;AAEU,EAAA,OAAA,IAAA,CAAA,SAAA,IAAAA,SAAA,EAAA,EADRC,WASkB,CAAA,0BAAA,EAAA;AAAA,IAAA,GAAA,EAAA,CAAA;IAPhB,KAAK,EAAAC,cAAA,CAAA,CAAC,4BAIE,IAAU,CAAA,UAAA,CAAA,CAAA;AAAA,IAHlB,WAAU,EAAA,eAAA;AAAA,IACT,UAAQ,CAAG,IAAA,CAAA,kBAAA;AAAA,IACX,MAAQ,EAAA,IAAA,CAAA,MAAA;AAAA,GAAA,EAAA;qBAGT,MAA6F;AAAA,MAA7FC,UAA6F,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAAtF,eAAkB,EAAA,IAAA,CAAA,eAAA,IAAzB,MAA6F;AAAA,QAAAC,eAAA;UAAnD,iBAAe,GAAAC,eAAA,CAAG,IAAgB,CAAA,eAAA,CAAA,MAAM,CAAG,GAAA,GAAA;AAAA,UAAC,CAAA;AAAA;AAAA,SAAA;AAAA,OAAA,CAAA;;;;;;;;;;"}