@empathyco/x-components 7.2.3 → 7.2.4

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 (572) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/core/index.js +3 -3
  3. package/js/components/animations/{animate-clip-path2.vue.js → animate-clip-path.vue2.js} +1 -1
  4. package/js/components/animations/animate-clip-path.vue2.js.map +1 -0
  5. package/js/components/animations/animate-clip-path.vue3.js +7 -0
  6. package/js/components/animations/animate-clip-path.vue3.js.map +1 -0
  7. package/js/components/animations/{animate-scale2.vue.js → animate-scale.vue2.js} +1 -1
  8. package/js/components/animations/animate-scale.vue2.js.map +1 -0
  9. package/js/components/animations/{animate-scale3.vue.js → animate-scale.vue3.js} +2 -2
  10. package/js/components/animations/animate-scale.vue3.js.map +1 -0
  11. package/js/components/animations/{animate-translate2.vue.js → animate-translate.vue2.js} +1 -1
  12. package/js/components/animations/animate-translate.vue2.js.map +1 -0
  13. package/js/components/animations/animate-translate.vue3.js +7 -0
  14. package/js/components/animations/animate-translate.vue3.js.map +1 -0
  15. package/js/components/animations/animate-width.vue.js +2 -2
  16. package/js/components/animations/{animate-width2.vue.js → animate-width.vue2.js} +1 -1
  17. package/js/components/animations/{animate-width2.vue.js.map → animate-width.vue2.js.map} +1 -1
  18. package/js/components/animations/{animate-width3.vue.js → animate-width.vue3.js} +1 -1
  19. package/js/components/animations/animate-width.vue3.js.map +1 -0
  20. package/js/components/animations/change-height.vue.js +2 -2
  21. package/js/components/animations/{change-height2.vue.js → change-height.vue2.js} +1 -1
  22. package/js/components/animations/{change-height2.vue.js.map → change-height.vue2.js.map} +1 -1
  23. package/js/components/animations/{change-height3.vue.js → change-height.vue3.js} +1 -1
  24. package/js/components/animations/change-height.vue3.js.map +1 -0
  25. package/js/components/animations/collapse-height.vue.js +2 -2
  26. package/js/components/animations/{collapse-height2.vue.js → collapse-height.vue2.js} +1 -1
  27. package/js/components/animations/{collapse-height2.vue.js.map → collapse-height.vue2.js.map} +1 -1
  28. package/js/components/animations/{collapse-height3.vue.js → collapse-height.vue3.js} +1 -1
  29. package/js/components/animations/collapse-height.vue3.js.map +1 -0
  30. package/js/components/animations/collapse-width.vue.js +2 -2
  31. package/js/components/animations/{collapse-width2.vue.js → collapse-width.vue2.js} +1 -1
  32. package/js/components/animations/{collapse-width2.vue.js.map → collapse-width.vue2.js.map} +1 -1
  33. package/js/components/animations/{collapse-width3.vue.js → collapse-width.vue3.js} +1 -1
  34. package/js/components/animations/collapse-width.vue3.js.map +1 -0
  35. package/js/components/animations/cross-fade.vue.js +2 -2
  36. package/js/components/animations/{cross-fade2.vue.js → cross-fade.vue2.js} +1 -1
  37. package/js/components/animations/{cross-fade2.vue.js.map → cross-fade.vue2.js.map} +1 -1
  38. package/js/components/animations/{cross-fade3.vue.js → cross-fade.vue3.js} +1 -1
  39. package/js/components/animations/cross-fade.vue3.js.map +1 -0
  40. package/js/components/animations/fade-and-slide.vue.js +2 -2
  41. package/js/components/animations/{fade-and-slide2.vue.js → fade-and-slide.vue2.js} +1 -1
  42. package/js/components/animations/{fade-and-slide2.vue.js.map → fade-and-slide.vue2.js.map} +1 -1
  43. package/js/components/animations/{fade-and-slide3.vue.js → fade-and-slide.vue3.js} +1 -1
  44. package/js/components/animations/fade-and-slide.vue3.js.map +1 -0
  45. package/js/components/animations/fade.vue.js +2 -2
  46. package/js/components/animations/{fade2.vue.js → fade.vue2.js} +1 -1
  47. package/js/components/animations/{fade2.vue.js.map → fade.vue2.js.map} +1 -1
  48. package/js/components/animations/{fade3.vue.js → fade.vue3.js} +1 -1
  49. package/js/components/animations/fade.vue3.js.map +1 -0
  50. package/js/components/animations/{no-animation2.vue.js → no-animation.vue2.js} +1 -1
  51. package/js/components/animations/no-animation.vue2.js.map +1 -0
  52. package/js/components/animations/staggered-fade-and-slide.vue.js +2 -2
  53. package/js/components/animations/{staggered-fade-and-slide2.vue.js → staggered-fade-and-slide.vue2.js} +1 -1
  54. package/js/components/animations/{staggered-fade-and-slide2.vue.js.map → staggered-fade-and-slide.vue2.js.map} +1 -1
  55. package/js/components/animations/{staggered-fade-and-slide3.vue.js → staggered-fade-and-slide.vue3.js} +1 -1
  56. package/js/components/animations/staggered-fade-and-slide.vue3.js.map +1 -0
  57. package/js/components/auto-progress-bar.vue.js +2 -2
  58. package/js/components/{auto-progress-bar2.vue.js → auto-progress-bar.vue2.js} +1 -1
  59. package/js/components/{auto-progress-bar2.vue.js.map → auto-progress-bar.vue2.js.map} +1 -1
  60. package/js/components/{auto-progress-bar3.vue.js → auto-progress-bar.vue3.js} +1 -1
  61. package/js/components/auto-progress-bar.vue3.js.map +1 -0
  62. package/js/components/base-dropdown.vue.js +2 -2
  63. package/js/components/{base-dropdown2.vue.js → base-dropdown.vue2.js} +20 -20
  64. package/js/components/{base-dropdown2.vue.js.map → base-dropdown.vue2.js.map} +1 -1
  65. package/js/components/{base-dropdown3.vue.js → base-dropdown.vue3.js} +1 -1
  66. package/js/components/base-dropdown.vue3.js.map +1 -0
  67. package/js/components/base-event-button.vue.js +1 -1
  68. package/js/components/{base-event-button2.vue.js → base-event-button.vue2.js} +1 -1
  69. package/js/components/{base-event-button2.vue.js.map → base-event-button.vue2.js.map} +1 -1
  70. package/js/components/base-grid.vue.js +2 -2
  71. package/js/components/{base-grid2.vue.js → base-grid.vue2.js} +1 -1
  72. package/js/components/{base-grid2.vue.js.map → base-grid.vue2.js.map} +1 -1
  73. package/js/components/{base-grid3.vue.js → base-grid.vue3.js} +1 -1
  74. package/js/components/base-grid.vue3.js.map +1 -0
  75. package/js/components/base-keyboard-navigation.vue.js +1 -1
  76. package/js/components/{base-keyboard-navigation2.vue.js → base-keyboard-navigation.vue2.js} +1 -1
  77. package/js/components/{base-keyboard-navigation2.vue.js.map → base-keyboard-navigation.vue2.js.map} +1 -1
  78. package/js/components/base-rating.vue.js +2 -2
  79. package/js/components/{base-rating2.vue.js → base-rating.vue2.js} +1 -1
  80. package/js/components/{base-rating2.vue.js.map → base-rating.vue2.js.map} +1 -1
  81. package/js/components/{base-rating3.vue.js → base-rating.vue3.js} +1 -1
  82. package/js/components/base-rating.vue3.js.map +1 -0
  83. package/js/components/base-slider.vue.js +2 -2
  84. package/js/components/{base-slider2.vue.js → base-slider.vue2.js} +1 -1
  85. package/js/components/{base-slider2.vue.js.map → base-slider.vue2.js.map} +1 -1
  86. package/js/components/{base-slider3.vue.js → base-slider.vue3.js} +1 -1
  87. package/js/components/base-slider.vue3.js.map +1 -0
  88. package/js/components/base-switch.vue.js +2 -2
  89. package/js/components/{base-switch2.vue.js → base-switch.vue2.js} +1 -1
  90. package/js/components/{base-switch2.vue.js.map → base-switch.vue2.js.map} +1 -1
  91. package/js/components/{base-switch3.vue.js → base-switch.vue3.js} +1 -1
  92. package/js/components/base-switch.vue3.js.map +1 -0
  93. package/js/components/base-teleport.vue.js +1 -1
  94. package/js/components/{base-teleport2.vue.js → base-teleport.vue2.js} +1 -1
  95. package/js/components/{base-teleport2.vue.js.map → base-teleport.vue2.js.map} +1 -1
  96. package/js/components/base-variable-column-grid.vue.js +1 -1
  97. package/js/components/{base-variable-column-grid2.vue.js → base-variable-column-grid.vue2.js} +1 -1
  98. package/js/components/{base-variable-column-grid2.vue.js.map → base-variable-column-grid.vue2.js.map} +1 -1
  99. package/js/components/column-picker/base-column-picker-dropdown.vue.js +1 -1
  100. package/js/components/column-picker/{base-column-picker-dropdown2.vue.js → base-column-picker-dropdown.vue2.js} +1 -1
  101. package/js/components/column-picker/{base-column-picker-dropdown2.vue.js.map → base-column-picker-dropdown.vue2.js.map} +1 -1
  102. package/js/components/column-picker/base-column-picker-list.vue.js +1 -1
  103. package/js/components/column-picker/{base-column-picker-list2.vue.js → base-column-picker-list.vue2.js} +1 -1
  104. package/js/components/column-picker/{base-column-picker-list2.vue.js.map → base-column-picker-list.vue2.js.map} +1 -1
  105. package/js/components/currency/base-currency.vue.js +1 -1
  106. package/js/components/currency/{base-currency2.vue.js → base-currency.vue2.js} +1 -1
  107. package/js/components/currency/{base-currency2.vue.js.map → base-currency.vue2.js.map} +1 -1
  108. package/js/components/{display-click-provider2.vue.js → display-click-provider.vue2.js} +1 -1
  109. package/js/components/display-click-provider.vue2.js.map +1 -0
  110. package/js/components/{display-emitter2.vue.js → display-emitter.vue2.js} +1 -1
  111. package/js/components/display-emitter.vue2.js.map +1 -0
  112. package/js/components/filters/labels/{base-price-filter-label2.vue.js → base-price-filter-label.vue2.js} +1 -1
  113. package/js/components/filters/labels/base-price-filter-label.vue2.js.map +1 -0
  114. package/js/components/filters/labels/base-rating-filter-label.vue.js +1 -1
  115. package/js/components/filters/labels/{base-rating-filter-label2.vue.js → base-rating-filter-label.vue2.js} +1 -1
  116. package/js/components/filters/labels/{base-rating-filter-label2.vue.js.map → base-rating-filter-label.vue2.js.map} +1 -1
  117. package/js/components/{global-x-bus2.vue.js → global-x-bus.vue2.js} +1 -1
  118. package/js/components/global-x-bus.vue2.js.map +1 -0
  119. package/js/components/highlight.vue.js +1 -1
  120. package/js/components/{highlight2.vue.js → highlight.vue2.js} +1 -1
  121. package/js/components/{highlight2.vue.js.map → highlight.vue2.js.map} +1 -1
  122. package/js/components/items-list.vue.js +1 -1
  123. package/js/components/{items-list2.vue.js → items-list.vue2.js} +1 -1
  124. package/js/components/{items-list2.vue.js.map → items-list.vue2.js.map} +1 -1
  125. package/js/components/{location-provider2.vue.js → location-provider.vue2.js} +1 -1
  126. package/js/components/location-provider.vue2.js.map +1 -0
  127. package/js/components/message.vue.js +17 -17
  128. package/js/components/{message2.vue.js → message.vue2.js} +1 -1
  129. package/js/components/message.vue2.js.map +1 -0
  130. package/js/components/modals/base-events-modal-close.vue.js +1 -1
  131. package/js/components/modals/{base-events-modal-close2.vue.js → base-events-modal-close.vue2.js} +1 -1
  132. package/js/components/modals/{base-events-modal-close2.vue.js.map → base-events-modal-close.vue2.js.map} +1 -1
  133. package/js/components/modals/base-events-modal-open.vue.js +1 -1
  134. package/js/components/modals/{base-events-modal-open2.vue.js → base-events-modal-open.vue2.js} +1 -1
  135. package/js/components/modals/{base-events-modal-open2.vue.js.map → base-events-modal-open.vue2.js.map} +1 -1
  136. package/js/components/modals/base-events-modal.vue.js +1 -1
  137. package/js/components/modals/{base-events-modal2.vue.js → base-events-modal.vue2.js} +1 -1
  138. package/js/components/modals/{base-events-modal2.vue.js.map → base-events-modal.vue2.js.map} +1 -1
  139. package/js/components/modals/base-id-modal-close.vue.js +1 -1
  140. package/js/components/modals/{base-id-modal-close2.vue.js → base-id-modal-close.vue2.js} +1 -1
  141. package/js/components/modals/{base-id-modal-close2.vue.js.map → base-id-modal-close.vue2.js.map} +1 -1
  142. package/js/components/modals/base-id-modal-open.vue.js +1 -1
  143. package/js/components/modals/{base-id-modal-open2.vue.js → base-id-modal-open.vue2.js} +1 -1
  144. package/js/components/modals/{base-id-modal-open2.vue.js.map → base-id-modal-open.vue2.js.map} +1 -1
  145. package/js/components/modals/base-id-modal.vue.js +1 -1
  146. package/js/components/modals/{base-id-modal2.vue.js → base-id-modal.vue2.js} +1 -1
  147. package/js/components/modals/{base-id-modal2.vue.js.map → base-id-modal.vue2.js.map} +1 -1
  148. package/js/components/modals/base-modal.vue.js +2 -2
  149. package/js/components/modals/{base-modal2.vue.js → base-modal.vue2.js} +18 -18
  150. package/js/components/modals/{base-modal2.vue.js.map → base-modal.vue2.js.map} +1 -1
  151. package/js/components/modals/{base-modal3.vue.js → base-modal.vue3.js} +1 -1
  152. package/js/components/modals/base-modal.vue3.js.map +1 -0
  153. package/js/components/modals/close-main-modal.vue.js +1 -1
  154. package/js/components/modals/{close-main-modal2.vue.js → close-main-modal.vue2.js} +1 -1
  155. package/js/components/modals/{close-main-modal2.vue.js.map → close-main-modal.vue2.js.map} +1 -1
  156. package/js/components/modals/main-modal.vue.js +1 -1
  157. package/js/components/modals/{main-modal2.vue.js → main-modal.vue2.js} +1 -1
  158. package/js/components/modals/{main-modal2.vue.js.map → main-modal.vue2.js.map} +1 -1
  159. package/js/components/modals/open-main-modal.vue.js +1 -1
  160. package/js/components/modals/{open-main-modal2.vue.js → open-main-modal.vue2.js} +1 -1
  161. package/js/components/modals/{open-main-modal2.vue.js.map → open-main-modal.vue2.js.map} +1 -1
  162. package/js/components/page-loader-button.vue.js +2 -2
  163. package/js/components/{page-loader-button2.vue.js → page-loader-button.vue2.js} +1 -1
  164. package/js/components/{page-loader-button2.vue.js.map → page-loader-button.vue2.js.map} +1 -1
  165. package/js/components/{page-loader-button3.vue.js → page-loader-button.vue3.js} +1 -1
  166. package/js/components/page-loader-button.vue3.js.map +1 -0
  167. package/js/components/page-selector.vue.js +2 -2
  168. package/js/components/{page-selector2.vue.js → page-selector.vue2.js} +1 -1
  169. package/js/components/{page-selector2.vue.js.map → page-selector.vue2.js.map} +1 -1
  170. package/js/components/{page-selector3.vue.js → page-selector.vue3.js} +1 -1
  171. package/js/components/page-selector.vue3.js.map +1 -0
  172. package/js/components/panels/base-header-toggle-panel.vue.js +2 -2
  173. package/js/components/panels/{base-header-toggle-panel2.vue.js → base-header-toggle-panel.vue2.js} +20 -20
  174. package/js/components/panels/{base-header-toggle-panel2.vue.js.map → base-header-toggle-panel.vue2.js.map} +1 -1
  175. package/js/components/panels/{base-header-toggle-panel3.vue.js → base-header-toggle-panel.vue3.js} +1 -1
  176. package/js/components/panels/base-header-toggle-panel.vue3.js.map +1 -0
  177. package/js/components/panels/base-id-toggle-panel-button.vue.js +1 -1
  178. package/js/components/panels/{base-id-toggle-panel-button2.vue.js → base-id-toggle-panel-button.vue2.js} +1 -1
  179. package/js/components/panels/{base-id-toggle-panel-button2.vue.js.map → base-id-toggle-panel-button.vue2.js.map} +1 -1
  180. package/js/components/panels/base-id-toggle-panel.vue.js +1 -1
  181. package/js/components/panels/{base-id-toggle-panel2.vue.js → base-id-toggle-panel.vue2.js} +20 -20
  182. package/js/components/panels/{base-id-toggle-panel2.vue.js.map → base-id-toggle-panel.vue2.js.map} +1 -1
  183. package/js/components/panels/base-tabs-panel.vue.js +2 -2
  184. package/js/components/panels/{base-tabs-panel2.vue.js → base-tabs-panel.vue2.js} +20 -20
  185. package/js/components/panels/{base-tabs-panel2.vue.js.map → base-tabs-panel.vue2.js.map} +1 -1
  186. package/js/components/panels/{base-tabs-panel3.vue.js → base-tabs-panel.vue3.js} +1 -1
  187. package/js/components/panels/base-tabs-panel.vue3.js.map +1 -0
  188. package/js/components/panels/base-toggle-panel.vue.js +1 -1
  189. package/js/components/panels/{base-toggle-panel2.vue.js → base-toggle-panel.vue2.js} +1 -1
  190. package/js/components/panels/{base-toggle-panel2.vue.js.map → base-toggle-panel.vue2.js.map} +1 -1
  191. package/js/components/result/base-result-add-to-cart.vue.js +1 -1
  192. package/js/components/result/{base-result-add-to-cart2.vue.js → base-result-add-to-cart.vue2.js} +1 -1
  193. package/js/components/result/{base-result-add-to-cart2.vue.js.map → base-result-add-to-cart.vue2.js.map} +1 -1
  194. package/js/components/result/base-result-current-price.vue.js +1 -1
  195. package/js/components/result/{base-result-current-price2.vue.js → base-result-current-price.vue2.js} +1 -1
  196. package/js/components/result/{base-result-current-price2.vue.js.map → base-result-current-price.vue2.js.map} +1 -1
  197. package/js/components/result/base-result-image.vue.js +2 -2
  198. package/js/components/result/{base-result-image2.vue.js → base-result-image.vue2.js} +20 -20
  199. package/js/components/result/{base-result-image2.vue.js.map → base-result-image.vue2.js.map} +1 -1
  200. package/js/components/result/{base-result-image3.vue.js → base-result-image.vue3.js} +1 -1
  201. package/js/components/result/base-result-image.vue3.js.map +1 -0
  202. package/js/components/result/base-result-link.vue.js +2 -2
  203. package/js/components/result/{base-result-link2.vue.js → base-result-link.vue2.js} +1 -1
  204. package/js/components/result/{base-result-link2.vue.js.map → base-result-link.vue2.js.map} +1 -1
  205. package/js/components/result/{base-result-link3.vue.js → base-result-link.vue3.js} +1 -1
  206. package/js/components/result/base-result-link.vue3.js.map +1 -0
  207. package/js/components/result/base-result-previous-price.vue.js +1 -1
  208. package/js/components/result/{base-result-previous-price2.vue.js → base-result-previous-price.vue2.js} +1 -1
  209. package/js/components/result/{base-result-previous-price2.vue.js.map → base-result-previous-price.vue2.js.map} +1 -1
  210. package/js/components/result/base-result-rating.vue.js +2 -2
  211. package/js/components/result/{base-result-rating2.vue.js → base-result-rating.vue2.js} +1 -1
  212. package/js/components/result/{base-result-rating2.vue.js.map → base-result-rating.vue2.js.map} +1 -1
  213. package/js/components/result/{base-result-rating3.vue.js → base-result-rating.vue3.js} +1 -1
  214. package/js/components/result/base-result-rating.vue3.js.map +1 -0
  215. package/js/components/result/result-variant-selector.vue.js +2 -2
  216. package/js/components/result/{result-variant-selector2.vue.js → result-variant-selector.vue2.js} +1 -1
  217. package/js/components/result/{result-variant-selector2.vue.js.map → result-variant-selector.vue2.js.map} +1 -1
  218. package/js/components/result/{result-variant-selector3.vue.js → result-variant-selector.vue3.js} +1 -1
  219. package/js/components/result/result-variant-selector.vue3.js.map +1 -0
  220. package/js/components/result/{result-variants-provider2.vue.js → result-variants-provider.vue2.js} +1 -1
  221. package/js/components/result/result-variants-provider.vue2.js.map +1 -0
  222. package/js/components/scroll/base-scroll.vue.js +1 -1
  223. package/js/components/scroll/{base-scroll2.vue.js → base-scroll.vue2.js} +1 -1
  224. package/js/components/scroll/{base-scroll2.vue.js.map → base-scroll.vue2.js.map} +1 -1
  225. package/js/components/sliding-panel.vue.js +2 -2
  226. package/js/components/{sliding-panel2.vue.js → sliding-panel.vue2.js} +1 -1
  227. package/js/components/{sliding-panel2.vue.js.map → sliding-panel.vue2.js.map} +1 -1
  228. package/js/components/{sliding-panel3.vue.js → sliding-panel.vue3.js} +1 -1
  229. package/js/components/sliding-panel.vue3.js.map +1 -0
  230. package/js/components/snippet-callbacks.vue.js +1 -1
  231. package/js/components/{snippet-callbacks2.vue.js → snippet-callbacks.vue2.js} +1 -1
  232. package/js/components/{snippet-callbacks2.vue.js.map → snippet-callbacks.vue2.js.map} +1 -1
  233. package/js/components/suggestions/base-suggestion.vue.js +1 -1
  234. package/js/components/suggestions/{base-suggestion2.vue.js → base-suggestion.vue2.js} +1 -1
  235. package/js/components/suggestions/{base-suggestion2.vue.js.map → base-suggestion.vue2.js.map} +1 -1
  236. package/js/components/suggestions/base-suggestions.vue.js +2 -2
  237. package/js/components/suggestions/{base-suggestions2.vue.js → base-suggestions.vue2.js} +1 -1
  238. package/js/components/suggestions/{base-suggestions2.vue.js.map → base-suggestions.vue2.js.map} +1 -1
  239. package/js/components/suggestions/{base-suggestions3.vue.js → base-suggestions.vue3.js} +1 -1
  240. package/js/components/suggestions/base-suggestions.vue3.js.map +1 -0
  241. package/js/index.js +3 -3
  242. package/js/x-modules/ai/components/ai-carousel.vue.js +2 -2
  243. package/js/x-modules/ai/components/{ai-carousel2.vue.js → ai-carousel.vue2.js} +75 -75
  244. package/js/x-modules/ai/components/{ai-carousel2.vue.js.map → ai-carousel.vue2.js.map} +1 -1
  245. package/js/x-modules/ai/components/{ai-carousel3.vue.js → ai-carousel.vue3.js} +1 -1
  246. package/js/x-modules/ai/components/ai-carousel.vue3.js.map +1 -0
  247. package/js/x-modules/ai/components/ai-grouped-carousel.vue.js +1 -1
  248. package/js/x-modules/ai/components/ai-grouped-carousel.vue2.js +123 -0
  249. package/js/x-modules/ai/components/{ai-grouped-carousel2.vue.js.map → ai-grouped-carousel.vue2.js.map} +1 -1
  250. package/js/x-modules/device/components/device-detector.vue.js +1 -1
  251. package/js/x-modules/device/components/{device-detector2.vue.js → device-detector.vue2.js} +1 -1
  252. package/js/x-modules/device/components/{device-detector2.vue.js.map → device-detector.vue2.js.map} +1 -1
  253. package/js/x-modules/empathize/components/empathize.vue.js +1 -1
  254. package/js/x-modules/empathize/components/{empathize2.vue.js → empathize.vue2.js} +82 -82
  255. package/js/x-modules/empathize/components/{empathize2.vue.js.map → empathize.vue2.js.map} +1 -1
  256. package/js/x-modules/experience-controls/components/{experience-controls2.vue.js → experience-controls.vue2.js} +1 -1
  257. package/js/x-modules/experience-controls/components/experience-controls.vue2.js.map +1 -0
  258. package/js/x-modules/extra-params/components/{extra-params2.vue.js → extra-params.vue2.js} +1 -1
  259. package/js/x-modules/extra-params/components/extra-params.vue2.js.map +1 -0
  260. package/js/x-modules/extra-params/components/{renderless-extra-param2.vue.js → renderless-extra-param.vue2.js} +1 -1
  261. package/js/x-modules/extra-params/components/renderless-extra-param.vue2.js.map +1 -0
  262. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue.js +1 -1
  263. package/js/x-modules/extra-params/components/{snippet-config-extra-params2.vue.js → snippet-config-extra-params.vue2.js} +1 -1
  264. package/js/x-modules/extra-params/components/{snippet-config-extra-params2.vue.js.map → snippet-config-extra-params.vue2.js.map} +1 -1
  265. package/js/x-modules/facets/components/clear-filters.vue.js +1 -1
  266. package/js/x-modules/facets/components/{clear-filters2.vue.js → clear-filters.vue2.js} +1 -1
  267. package/js/x-modules/facets/components/{clear-filters2.vue.js.map → clear-filters.vue2.js.map} +1 -1
  268. package/js/x-modules/facets/components/facets/facets-provider.vue.js +2 -2
  269. package/js/x-modules/facets/components/facets/{facets-provider2.vue.js → facets-provider.vue2.js} +1 -1
  270. package/js/x-modules/facets/components/facets/{facets-provider2.vue.js.map → facets-provider.vue2.js.map} +1 -1
  271. package/js/x-modules/facets/components/facets/{facets-provider3.vue.js → facets-provider.vue3.js} +1 -1
  272. package/js/x-modules/facets/components/facets/facets-provider.vue3.js.map +1 -0
  273. package/js/x-modules/facets/components/facets/facets.vue.js +2 -2
  274. package/js/x-modules/facets/components/facets/{facets2.vue.js → facets.vue2.js} +1 -1
  275. package/js/x-modules/facets/components/facets/{facets2.vue.js.map → facets.vue2.js.map} +1 -1
  276. package/js/x-modules/facets/components/facets/{facets3.vue.js → facets.vue3.js} +1 -1
  277. package/js/x-modules/{extra-params/components/extra-params2.vue.js.map → facets/components/facets/facets.vue3.js.map} +1 -1
  278. package/js/x-modules/facets/components/filters/all-filter.vue.js +1 -1
  279. package/js/x-modules/facets/components/filters/{all-filter2.vue.js → all-filter.vue2.js} +1 -1
  280. package/js/x-modules/facets/components/filters/{all-filter2.vue.js.map → all-filter.vue2.js.map} +1 -1
  281. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +2 -2
  282. package/js/x-modules/facets/components/filters/{editable-number-range-filter2.vue.js → editable-number-range-filter.vue2.js} +1 -1
  283. package/js/x-modules/facets/components/filters/{editable-number-range-filter2.vue.js.map → editable-number-range-filter.vue2.js.map} +1 -1
  284. package/js/x-modules/facets/components/filters/{editable-number-range-filter3.vue.js → editable-number-range-filter.vue3.js} +1 -1
  285. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue3.js.map +1 -0
  286. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +1 -1
  287. package/js/x-modules/facets/components/filters/{hierarchical-filter2.vue.js → hierarchical-filter.vue2.js} +1 -1
  288. package/js/x-modules/facets/components/filters/{hierarchical-filter2.vue.js.map → hierarchical-filter.vue2.js.map} +1 -1
  289. package/js/x-modules/facets/components/filters/number-range-filter.vue.js +1 -1
  290. package/js/x-modules/facets/components/filters/{number-range-filter2.vue.js → number-range-filter.vue2.js} +1 -1
  291. package/js/x-modules/facets/components/filters/{number-range-filter2.vue.js.map → number-range-filter.vue2.js.map} +1 -1
  292. package/js/x-modules/facets/components/filters/{renderless-filter2.vue.js → renderless-filter.vue2.js} +1 -1
  293. package/js/x-modules/facets/components/filters/renderless-filter.vue2.js.map +1 -0
  294. package/js/x-modules/facets/components/filters/simple-filter.vue.js +1 -1
  295. package/js/x-modules/facets/components/filters/{simple-filter2.vue.js → simple-filter.vue2.js} +1 -1
  296. package/js/x-modules/facets/components/filters/{simple-filter2.vue.js.map → simple-filter.vue2.js.map} +1 -1
  297. package/js/x-modules/facets/components/lists/{exclude-filters-with-no-results2.vue.js → exclude-filters-with-no-results.vue2.js} +1 -1
  298. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue2.js.map +1 -0
  299. package/js/x-modules/facets/components/lists/filters-list.vue.js +2 -2
  300. package/js/x-modules/facets/components/lists/{filters-list2.vue.js → filters-list.vue2.js} +1 -1
  301. package/js/x-modules/facets/components/lists/{filters-list2.vue.js.map → filters-list.vue2.js.map} +1 -1
  302. package/js/x-modules/facets/components/lists/{filters-list3.vue.js → filters-list.vue3.js} +1 -1
  303. package/js/x-modules/facets/components/lists/filters-list.vue3.js.map +1 -0
  304. package/js/x-modules/facets/components/lists/filters-search.vue.js +2 -2
  305. package/js/x-modules/facets/components/lists/{filters-search2.vue.js → filters-search.vue2.js} +1 -1
  306. package/js/x-modules/facets/components/lists/{filters-search2.vue.js.map → filters-search.vue2.js.map} +1 -1
  307. package/js/x-modules/facets/components/lists/{filters-search3.vue.js → filters-search.vue3.js} +1 -1
  308. package/js/x-modules/facets/components/lists/filters-search.vue3.js.map +1 -0
  309. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +1 -1
  310. package/js/x-modules/facets/components/lists/{selected-filters-list2.vue.js → selected-filters-list.vue2.js} +1 -1
  311. package/js/x-modules/facets/components/lists/{selected-filters-list2.vue.js.map → selected-filters-list.vue2.js.map} +1 -1
  312. package/js/x-modules/facets/components/lists/{selected-filters2.vue.js → selected-filters.vue2.js} +1 -1
  313. package/js/x-modules/facets/components/lists/selected-filters.vue2.js.map +1 -0
  314. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +1 -1
  315. package/js/x-modules/facets/components/lists/{sliced-filters2.vue.js → sliced-filters.vue2.js} +1 -1
  316. package/js/x-modules/facets/components/lists/{sliced-filters2.vue.js.map → sliced-filters.vue2.js.map} +1 -1
  317. package/js/x-modules/facets/components/lists/{sorted-filters2.vue.js → sorted-filters.vue2.js} +1 -1
  318. package/js/x-modules/facets/components/lists/sorted-filters.vue2.js.map +1 -0
  319. package/js/x-modules/facets/components/{preselected-filters2.vue.js → preselected-filters.vue2.js} +1 -1
  320. package/js/x-modules/facets/components/preselected-filters.vue2.js.map +1 -0
  321. package/js/x-modules/history-queries/components/clear-history-queries.vue.js +1 -1
  322. package/js/x-modules/history-queries/components/{clear-history-queries2.vue.js → clear-history-queries.vue2.js} +1 -1
  323. package/js/x-modules/history-queries/components/{clear-history-queries2.vue.js.map → clear-history-queries.vue2.js.map} +1 -1
  324. package/js/x-modules/history-queries/components/history-queries-switch.vue.js +1 -1
  325. package/js/x-modules/history-queries/components/{history-queries-switch2.vue.js → history-queries-switch.vue2.js} +1 -1
  326. package/js/x-modules/history-queries/components/{history-queries-switch2.vue.js.map → history-queries-switch.vue2.js.map} +1 -1
  327. package/js/x-modules/history-queries/components/history-queries.vue.js +1 -1
  328. package/js/x-modules/history-queries/components/{history-queries2.vue.js → history-queries.vue2.js} +1 -1
  329. package/js/x-modules/history-queries/components/{history-queries2.vue.js.map → history-queries.vue2.js.map} +1 -1
  330. package/js/x-modules/history-queries/components/history-query.vue.js +1 -1
  331. package/js/x-modules/history-queries/components/{history-query2.vue.js → history-query.vue2.js} +1 -1
  332. package/js/x-modules/history-queries/components/{history-query2.vue.js.map → history-query.vue2.js.map} +1 -1
  333. package/js/x-modules/history-queries/components/my-history.vue.js +2 -2
  334. package/js/x-modules/history-queries/components/{my-history2.vue.js → my-history.vue2.js} +1 -1
  335. package/js/x-modules/history-queries/components/{my-history2.vue.js.map → my-history.vue2.js.map} +1 -1
  336. package/js/x-modules/history-queries/components/{my-history3.vue.js → my-history.vue3.js} +1 -1
  337. package/js/x-modules/history-queries/components/my-history.vue3.js.map +1 -0
  338. package/js/x-modules/history-queries/components/remove-history-query.vue.js +1 -1
  339. package/js/x-modules/history-queries/components/{remove-history-query2.vue.js → remove-history-query.vue2.js} +1 -1
  340. package/js/x-modules/history-queries/components/{remove-history-query2.vue.js.map → remove-history-query.vue2.js.map} +1 -1
  341. package/js/x-modules/identifier-results/components/identifier-result.vue.js +1 -1
  342. package/js/x-modules/identifier-results/components/{identifier-result2.vue.js → identifier-result.vue2.js} +1 -1
  343. package/js/x-modules/identifier-results/components/{identifier-result2.vue.js.map → identifier-result.vue2.js.map} +1 -1
  344. package/js/x-modules/identifier-results/components/identifier-results.vue.js +2 -2
  345. package/js/x-modules/identifier-results/components/{identifier-results2.vue.js → identifier-results.vue2.js} +1 -1
  346. package/js/x-modules/identifier-results/components/{identifier-results2.vue.js.map → identifier-results.vue2.js.map} +1 -1
  347. package/js/x-modules/identifier-results/components/{identifier-results3.vue.js → identifier-results.vue3.js} +1 -1
  348. package/js/x-modules/identifier-results/components/identifier-results.vue3.js.map +1 -0
  349. package/js/x-modules/next-queries/components/{next-queries-list2.vue.js → next-queries-list.vue2.js} +1 -1
  350. package/js/x-modules/next-queries/components/next-queries-list.vue2.js.map +1 -0
  351. package/js/x-modules/next-queries/components/next-queries.vue.js +1 -1
  352. package/js/x-modules/next-queries/components/{next-queries2.vue.js → next-queries.vue2.js} +1 -1
  353. package/js/x-modules/next-queries/components/{next-queries2.vue.js.map → next-queries.vue2.js.map} +1 -1
  354. package/js/x-modules/next-queries/components/next-query-preview.vue.js +1 -1
  355. package/js/x-modules/next-queries/components/{next-query-preview2.vue.js → next-query-preview.vue2.js} +1 -1
  356. package/js/x-modules/next-queries/components/{next-query-preview2.vue.js.map → next-query-preview.vue2.js.map} +1 -1
  357. package/js/x-modules/next-queries/components/next-query.vue.js +1 -1
  358. package/js/x-modules/next-queries/components/{next-query2.vue.js → next-query.vue2.js} +1 -1
  359. package/js/x-modules/next-queries/components/{next-query2.vue.js.map → next-query.vue2.js.map} +1 -1
  360. package/js/x-modules/popular-searches/components/popular-search.vue.js +1 -1
  361. package/js/x-modules/popular-searches/components/{popular-search2.vue.js → popular-search.vue2.js} +1 -1
  362. package/js/x-modules/popular-searches/components/{popular-search2.vue.js.map → popular-search.vue2.js.map} +1 -1
  363. package/js/x-modules/popular-searches/components/popular-searches.vue.js +1 -1
  364. package/js/x-modules/popular-searches/components/{popular-searches2.vue.js → popular-searches.vue2.js} +1 -1
  365. package/js/x-modules/popular-searches/components/{popular-searches2.vue.js.map → popular-searches.vue2.js.map} +1 -1
  366. package/js/x-modules/queries-preview/components/query-preview-button.vue.js +1 -1
  367. package/js/x-modules/queries-preview/components/query-preview-button.vue2.js +165 -0
  368. package/js/x-modules/queries-preview/components/{query-preview-button2.vue.js.map → query-preview-button.vue2.js.map} +1 -1
  369. package/js/x-modules/queries-preview/components/query-preview-list.vue.js +2 -2
  370. package/js/x-modules/queries-preview/components/{query-preview-list2.vue.js → query-preview-list.vue2.js} +1 -1
  371. package/js/x-modules/queries-preview/components/{query-preview-list2.vue.js.map → query-preview-list.vue2.js.map} +1 -1
  372. package/js/x-modules/queries-preview/components/{query-preview-list3.vue.js → query-preview-list.vue3.js} +1 -1
  373. package/js/x-modules/queries-preview/components/query-preview-list.vue3.js.map +1 -0
  374. package/js/x-modules/queries-preview/components/query-preview.vue.js +1 -1
  375. package/js/x-modules/queries-preview/components/{query-preview2.vue.js → query-preview.vue2.js} +82 -82
  376. package/js/x-modules/queries-preview/components/{query-preview2.vue.js.map → query-preview.vue2.js.map} +1 -1
  377. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +1 -1
  378. package/js/x-modules/query-suggestions/components/{query-suggestion2.vue.js → query-suggestion.vue2.js} +1 -1
  379. package/js/x-modules/query-suggestions/components/{query-suggestion2.vue.js.map → query-suggestion.vue2.js.map} +1 -1
  380. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +1 -1
  381. package/js/x-modules/query-suggestions/components/{query-suggestions2.vue.js → query-suggestions.vue2.js} +1 -1
  382. package/js/x-modules/query-suggestions/components/{query-suggestions2.vue.js.map → query-suggestions.vue2.js.map} +1 -1
  383. package/js/x-modules/recommendations/components/recommendations.vue.js +2 -2
  384. package/js/x-modules/recommendations/components/{recommendations2.vue.js → recommendations.vue2.js} +1 -1
  385. package/js/x-modules/recommendations/components/{recommendations2.vue.js.map → recommendations.vue2.js.map} +1 -1
  386. package/js/x-modules/recommendations/components/{recommendations3.vue.js → recommendations.vue3.js} +1 -1
  387. package/js/x-modules/recommendations/components/recommendations.vue3.js.map +1 -0
  388. package/js/x-modules/related-prompts/components/related-prompt.vue.js +2 -2
  389. package/js/x-modules/related-prompts/components/{related-prompt2.vue.js → related-prompt.vue2.js} +1 -1
  390. package/js/x-modules/related-prompts/components/{related-prompt2.vue.js.map → related-prompt.vue2.js.map} +1 -1
  391. package/js/x-modules/related-prompts/components/{related-prompt3.vue.js → related-prompt.vue3.js} +1 -1
  392. package/js/x-modules/related-prompts/components/related-prompt.vue3.js.map +1 -0
  393. package/js/x-modules/related-prompts/components/{related-prompts-list2.vue.js → related-prompts-list.vue2.js} +1 -1
  394. package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js.map +1 -0
  395. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js +2 -2
  396. package/js/x-modules/related-prompts/components/{related-prompts-tag-list2.vue.js → related-prompts-tag-list.vue2.js} +1 -1
  397. package/js/x-modules/related-prompts/components/{related-prompts-tag-list2.vue.js.map → related-prompts-tag-list.vue2.js.map} +1 -1
  398. package/js/x-modules/related-prompts/components/{related-prompts-tag-list3.vue.js → related-prompts-tag-list.vue3.js} +1 -1
  399. package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js.map +1 -0
  400. package/js/x-modules/related-tags/components/related-tag.vue.js +1 -1
  401. package/js/x-modules/related-tags/components/{related-tag2.vue.js → related-tag.vue2.js} +1 -1
  402. package/js/x-modules/related-tags/components/{related-tag2.vue.js.map → related-tag.vue2.js.map} +1 -1
  403. package/js/x-modules/related-tags/components/related-tags.vue.js +2 -2
  404. package/js/x-modules/related-tags/components/{related-tags2.vue.js → related-tags.vue2.js} +1 -1
  405. package/js/x-modules/related-tags/components/{related-tags2.vue.js.map → related-tags.vue2.js.map} +1 -1
  406. package/js/x-modules/related-tags/components/{related-tags3.vue.js → related-tags.vue3.js} +1 -1
  407. package/js/x-modules/related-tags/components/related-tags.vue3.js.map +1 -0
  408. package/js/x-modules/scroll/components/main-scroll-item.vue.js +1 -1
  409. package/js/x-modules/scroll/components/{main-scroll-item2.vue.js → main-scroll-item.vue2.js} +1 -1
  410. package/js/x-modules/scroll/components/{main-scroll-item2.vue.js.map → main-scroll-item.vue2.js.map} +1 -1
  411. package/js/x-modules/scroll/components/{main-scroll2.vue.js → main-scroll.vue2.js} +1 -1
  412. package/js/x-modules/scroll/components/main-scroll.vue2.js.map +1 -0
  413. package/js/x-modules/scroll/components/scroll-to-top.vue.js +1 -1
  414. package/js/x-modules/scroll/components/{scroll-to-top2.vue.js → scroll-to-top.vue2.js} +81 -81
  415. package/js/x-modules/scroll/components/{scroll-to-top2.vue.js.map → scroll-to-top.vue2.js.map} +1 -1
  416. package/js/x-modules/scroll/components/scroll.vue.js +1 -1
  417. package/js/x-modules/scroll/components/{scroll2.vue.js → scroll.vue2.js} +1 -1
  418. package/js/x-modules/scroll/components/{scroll2.vue.js.map → scroll.vue2.js.map} +1 -1
  419. package/js/x-modules/search/components/banner.vue.js +2 -2
  420. package/js/x-modules/search/components/{banner2.vue.js → banner.vue2.js} +1 -1
  421. package/js/x-modules/search/components/{banner2.vue.js.map → banner.vue2.js.map} +1 -1
  422. package/js/x-modules/search/components/{banner3.vue.js → banner.vue3.js} +1 -1
  423. package/js/x-modules/search/components/banner.vue3.js.map +1 -0
  424. package/js/x-modules/search/components/{banners-list2.vue.js → banners-list.vue2.js} +1 -1
  425. package/js/x-modules/search/components/banners-list.vue2.js.map +1 -0
  426. package/js/x-modules/search/components/fallback-disclaimer.vue.js +1 -1
  427. package/js/x-modules/search/components/{fallback-disclaimer2.vue.js → fallback-disclaimer.vue2.js} +1 -1
  428. package/js/x-modules/search/components/{fallback-disclaimer2.vue.js.map → fallback-disclaimer.vue2.js.map} +1 -1
  429. package/js/x-modules/search/components/partial-query-button.vue.js +1 -1
  430. package/js/x-modules/search/components/{partial-query-button2.vue.js → partial-query-button.vue2.js} +1 -1
  431. package/js/x-modules/search/components/{partial-query-button2.vue.js.map → partial-query-button.vue2.js.map} +1 -1
  432. package/js/x-modules/search/components/partial-results-list.vue.js +2 -2
  433. package/js/x-modules/search/components/{partial-results-list2.vue.js → partial-results-list.vue2.js} +1 -1
  434. package/js/x-modules/search/components/{partial-results-list2.vue.js.map → partial-results-list.vue2.js.map} +1 -1
  435. package/js/x-modules/search/components/{partial-results-list3.vue.js → partial-results-list.vue3.js} +1 -1
  436. package/js/x-modules/search/components/partial-results-list.vue3.js.map +1 -0
  437. package/js/x-modules/search/components/promoted.vue.js +2 -2
  438. package/js/x-modules/search/components/{promoted2.vue.js → promoted.vue2.js} +1 -1
  439. package/js/x-modules/search/components/{promoted2.vue.js.map → promoted.vue2.js.map} +1 -1
  440. package/js/x-modules/search/components/{promoted3.vue.js → promoted.vue3.js} +1 -1
  441. package/js/x-modules/search/components/promoted.vue3.js.map +1 -0
  442. package/js/x-modules/search/components/{promoteds-list2.vue.js → promoteds-list.vue2.js} +1 -1
  443. package/js/x-modules/search/components/promoteds-list.vue2.js.map +1 -0
  444. package/js/x-modules/search/components/redirection.vue.js +1 -1
  445. package/js/x-modules/search/components/{redirection2.vue.js → redirection.vue2.js} +1 -1
  446. package/js/x-modules/search/components/{redirection2.vue.js.map → redirection.vue2.js.map} +1 -1
  447. package/js/x-modules/search/components/{results-list2.vue.js → results-list.vue2.js} +1 -1
  448. package/js/x-modules/search/components/results-list.vue2.js.map +1 -0
  449. package/js/x-modules/search/components/sort-dropdown.vue.js +1 -1
  450. package/js/x-modules/search/components/{sort-dropdown2.vue.js → sort-dropdown.vue2.js} +1 -1
  451. package/js/x-modules/search/components/{sort-dropdown2.vue.js.map → sort-dropdown.vue2.js.map} +1 -1
  452. package/js/x-modules/search/components/sort-list.vue.js +2 -2
  453. package/js/x-modules/search/components/{sort-list2.vue.js → sort-list.vue2.js} +1 -1
  454. package/js/x-modules/search/components/{sort-list2.vue.js.map → sort-list.vue2.js.map} +1 -1
  455. package/js/x-modules/search/components/{sort-list3.vue.js → sort-list.vue3.js} +1 -1
  456. package/js/x-modules/search/components/sort-list.vue3.js.map +1 -0
  457. package/js/x-modules/search/components/sort-picker-list.vue.js +1 -1
  458. package/js/x-modules/search/components/{sort-picker-list2.vue.js → sort-picker-list.vue2.js} +1 -1
  459. package/js/x-modules/search/components/{sort-picker-list2.vue.js.map → sort-picker-list.vue2.js.map} +1 -1
  460. package/js/x-modules/search/components/spellcheck-button.vue.js +1 -1
  461. package/js/x-modules/search/components/{spellcheck-button2.vue.js → spellcheck-button.vue2.js} +1 -1
  462. package/js/x-modules/search/components/{spellcheck-button2.vue.js.map → spellcheck-button.vue2.js.map} +1 -1
  463. package/js/x-modules/search/components/spellcheck.vue.js +1 -1
  464. package/js/x-modules/search/components/{spellcheck2.vue.js → spellcheck.vue2.js} +1 -1
  465. package/js/x-modules/search/components/{spellcheck2.vue.js.map → spellcheck.vue2.js.map} +1 -1
  466. package/js/x-modules/search-box/components/clear-search-input.vue.js +1 -1
  467. package/js/x-modules/search-box/components/{clear-search-input2.vue.js → clear-search-input.vue2.js} +1 -1
  468. package/js/x-modules/search-box/components/{clear-search-input2.vue.js.map → clear-search-input.vue2.js.map} +1 -1
  469. package/js/x-modules/search-box/components/search-button.vue.js +1 -1
  470. package/js/x-modules/search-box/components/{search-button2.vue.js → search-button.vue2.js} +1 -1
  471. package/js/x-modules/search-box/components/{search-button2.vue.js.map → search-button.vue2.js.map} +1 -1
  472. package/js/x-modules/search-box/components/search-input-placeholder.vue.js +3 -3
  473. package/js/x-modules/search-box/components/{search-input-placeholder2.vue.js → search-input-placeholder.vue2.js} +2 -2
  474. package/js/x-modules/search-box/components/{search-input-placeholder2.vue.js.map → search-input-placeholder.vue2.js.map} +1 -1
  475. package/js/x-modules/search-box/components/{search-input-placeholder3.vue.js → search-input-placeholder.vue3.js} +1 -1
  476. package/js/x-modules/search-box/components/search-input-placeholder.vue3.js.map +1 -0
  477. package/js/x-modules/search-box/components/{search-input-placeholder4.vue.js → search-input-placeholder.vue4.js} +1 -1
  478. package/js/x-modules/search-box/components/search-input-placeholder.vue4.js.map +1 -0
  479. package/js/x-modules/search-box/components/search-input.vue.js +2 -2
  480. package/js/x-modules/search-box/components/{search-input2.vue.js → search-input.vue2.js} +1 -1
  481. package/js/x-modules/search-box/components/{search-input2.vue.js.map → search-input.vue2.js.map} +1 -1
  482. package/js/x-modules/search-box/components/{search-input3.vue.js → search-input.vue3.js} +1 -1
  483. package/js/x-modules/search-box/components/search-input.vue3.js.map +1 -0
  484. package/js/x-modules/semantic-queries/components/semantic-queries.vue.js +1 -1
  485. package/js/x-modules/semantic-queries/components/{semantic-queries2.vue.js → semantic-queries.vue2.js} +1 -1
  486. package/js/x-modules/semantic-queries/components/{semantic-queries2.vue.js.map → semantic-queries.vue2.js.map} +1 -1
  487. package/js/x-modules/semantic-queries/components/semantic-query.vue.js +1 -1
  488. package/js/x-modules/semantic-queries/components/{semantic-query2.vue.js → semantic-query.vue2.js} +1 -1
  489. package/js/x-modules/semantic-queries/components/{semantic-query2.vue.js.map → semantic-query.vue2.js.map} +1 -1
  490. package/js/x-modules/tagging/components/{tagging2.vue.js → tagging.vue2.js} +1 -1
  491. package/js/x-modules/tagging/components/tagging.vue2.js.map +1 -0
  492. package/js/x-modules/url/components/url-handler.vue.js +1 -1
  493. package/js/x-modules/url/components/{url-handler2.vue.js → url-handler.vue2.js} +1 -1
  494. package/js/x-modules/url/components/{url-handler2.vue.js.map → url-handler.vue2.js.map} +1 -1
  495. package/package.json +3 -3
  496. package/js/components/animations/animate-clip-path2.vue.js.map +0 -1
  497. package/js/components/animations/animate-clip-path3.vue.js +0 -7
  498. package/js/components/animations/animate-clip-path3.vue.js.map +0 -1
  499. package/js/components/animations/animate-scale2.vue.js.map +0 -1
  500. package/js/components/animations/animate-scale3.vue.js.map +0 -1
  501. package/js/components/animations/animate-translate2.vue.js.map +0 -1
  502. package/js/components/animations/animate-translate3.vue.js +0 -7
  503. package/js/components/animations/animate-translate3.vue.js.map +0 -1
  504. package/js/components/animations/animate-width3.vue.js.map +0 -1
  505. package/js/components/animations/change-height3.vue.js.map +0 -1
  506. package/js/components/animations/collapse-height3.vue.js.map +0 -1
  507. package/js/components/animations/collapse-width3.vue.js.map +0 -1
  508. package/js/components/animations/cross-fade3.vue.js.map +0 -1
  509. package/js/components/animations/fade-and-slide3.vue.js.map +0 -1
  510. package/js/components/animations/fade3.vue.js.map +0 -1
  511. package/js/components/animations/no-animation2.vue.js.map +0 -1
  512. package/js/components/animations/staggered-fade-and-slide3.vue.js.map +0 -1
  513. package/js/components/auto-progress-bar3.vue.js.map +0 -1
  514. package/js/components/base-dropdown3.vue.js.map +0 -1
  515. package/js/components/base-grid3.vue.js.map +0 -1
  516. package/js/components/base-rating3.vue.js.map +0 -1
  517. package/js/components/base-slider3.vue.js.map +0 -1
  518. package/js/components/base-switch3.vue.js.map +0 -1
  519. package/js/components/display-click-provider2.vue.js.map +0 -1
  520. package/js/components/display-emitter2.vue.js.map +0 -1
  521. package/js/components/filters/labels/base-price-filter-label2.vue.js.map +0 -1
  522. package/js/components/global-x-bus2.vue.js.map +0 -1
  523. package/js/components/location-provider2.vue.js.map +0 -1
  524. package/js/components/message2.vue.js.map +0 -1
  525. package/js/components/modals/base-modal3.vue.js.map +0 -1
  526. package/js/components/page-loader-button3.vue.js.map +0 -1
  527. package/js/components/page-selector3.vue.js.map +0 -1
  528. package/js/components/panels/base-header-toggle-panel3.vue.js.map +0 -1
  529. package/js/components/panels/base-tabs-panel3.vue.js.map +0 -1
  530. package/js/components/result/base-result-image3.vue.js.map +0 -1
  531. package/js/components/result/base-result-link3.vue.js.map +0 -1
  532. package/js/components/result/base-result-rating3.vue.js.map +0 -1
  533. package/js/components/result/result-variant-selector3.vue.js.map +0 -1
  534. package/js/components/result/result-variants-provider2.vue.js.map +0 -1
  535. package/js/components/sliding-panel3.vue.js.map +0 -1
  536. package/js/components/suggestions/base-suggestions3.vue.js.map +0 -1
  537. package/js/x-modules/ai/components/ai-carousel3.vue.js.map +0 -1
  538. package/js/x-modules/ai/components/ai-grouped-carousel2.vue.js +0 -123
  539. package/js/x-modules/experience-controls/components/experience-controls2.vue.js.map +0 -1
  540. package/js/x-modules/extra-params/components/renderless-extra-param2.vue.js.map +0 -1
  541. package/js/x-modules/facets/components/facets/facets-provider3.vue.js.map +0 -1
  542. package/js/x-modules/facets/components/facets/facets3.vue.js.map +0 -1
  543. package/js/x-modules/facets/components/filters/editable-number-range-filter3.vue.js.map +0 -1
  544. package/js/x-modules/facets/components/filters/renderless-filter2.vue.js.map +0 -1
  545. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results2.vue.js.map +0 -1
  546. package/js/x-modules/facets/components/lists/filters-list3.vue.js.map +0 -1
  547. package/js/x-modules/facets/components/lists/filters-search3.vue.js.map +0 -1
  548. package/js/x-modules/facets/components/lists/selected-filters2.vue.js.map +0 -1
  549. package/js/x-modules/facets/components/lists/sorted-filters2.vue.js.map +0 -1
  550. package/js/x-modules/facets/components/preselected-filters2.vue.js.map +0 -1
  551. package/js/x-modules/history-queries/components/my-history3.vue.js.map +0 -1
  552. package/js/x-modules/identifier-results/components/identifier-results3.vue.js.map +0 -1
  553. package/js/x-modules/next-queries/components/next-queries-list2.vue.js.map +0 -1
  554. package/js/x-modules/queries-preview/components/query-preview-button2.vue.js +0 -165
  555. package/js/x-modules/queries-preview/components/query-preview-list3.vue.js.map +0 -1
  556. package/js/x-modules/recommendations/components/recommendations3.vue.js.map +0 -1
  557. package/js/x-modules/related-prompts/components/related-prompt3.vue.js.map +0 -1
  558. package/js/x-modules/related-prompts/components/related-prompts-list2.vue.js.map +0 -1
  559. package/js/x-modules/related-prompts/components/related-prompts-tag-list3.vue.js.map +0 -1
  560. package/js/x-modules/related-tags/components/related-tags3.vue.js.map +0 -1
  561. package/js/x-modules/scroll/components/main-scroll2.vue.js.map +0 -1
  562. package/js/x-modules/search/components/banner3.vue.js.map +0 -1
  563. package/js/x-modules/search/components/banners-list2.vue.js.map +0 -1
  564. package/js/x-modules/search/components/partial-results-list3.vue.js.map +0 -1
  565. package/js/x-modules/search/components/promoted3.vue.js.map +0 -1
  566. package/js/x-modules/search/components/promoteds-list2.vue.js.map +0 -1
  567. package/js/x-modules/search/components/results-list2.vue.js.map +0 -1
  568. package/js/x-modules/search/components/sort-list3.vue.js.map +0 -1
  569. package/js/x-modules/search-box/components/search-input-placeholder3.vue.js.map +0 -1
  570. package/js/x-modules/search-box/components/search-input-placeholder4.vue.js.map +0 -1
  571. package/js/x-modules/search-box/components/search-input3.vue.js.map +0 -1
  572. package/js/x-modules/tagging/components/tagging2.vue.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import _sfc_main from './device-detector2.vue.js';
1
+ import _sfc_main from './device-detector.vue2.js';
2
2
  import { resolveComponent, openBlock, createBlock, createCommentVNode } from 'vue';
3
3
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
4
4
 
@@ -124,4 +124,4 @@ var _sfc_main = defineComponent({
124
124
  });
125
125
 
126
126
  export { _sfc_main as default };
127
- //# sourceMappingURL=device-detector2.vue.js.map
127
+ //# sourceMappingURL=device-detector.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"device-detector2.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 setup>\nimport { reactive } from 'vue'\nimport { DeviceDetector } from '@empathyco/x-components/device'\nimport { use$x } from '../../../composables/use-$x'\n\nconst x = use$x()\nconst breakpoints = reactive({\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\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 setup>\nimport { reactive } from 'vue'\nimport { DeviceDetector } from '@empathyco/x-components/device'\nimport { use$x } from '../../../composables/use-$x'\n\nconst x = use$x()\nconst breakpoints = reactive({\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\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 ref 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 setup>\nimport { DeviceDetector } from '@empathyco/x-components/device'\nimport { reactive, ref } from 'vue'\nconst device = ref('unknown')\nconst breakpoints = reactive({\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\n})\nfunction storeDevice(newDevice) {\n device.value = newDevice\n}\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;AAiBA;;;;;;AAME;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,aAAa,CAAC,IAAI;IAC3B,UAAU,EAAE,EAAE,YAAW,EAAG;AAC5B,IAAA,KAAK,EAAE;AACL;;;;;AAKE;AACF,QAAA,WAAW,EAAE;AACX,YAAA,IAAI,EAAE,MAA4C;AAClD,YAAA,OAAO,EAAE,OAAO,EAAE,CAAC;AACpB,SAAA;AACD;;;;AAIE;AACF,QAAA,KAAK,EAAE,MAA0B;AAEjC;;;;AAIE;AACF,QAAA,UAAU,EAAE;AACV,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,GAAG;AACb,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,IAAG,GAAI,OAAO,EAAC;AAErB;;;;AAIE;AACF,QAAA,MAAM,aAAa,GAAuB,GAAG,CAAC,IAAI,CAAA;AAElD;;;;AAIE;QACF,MAAM,gBAAe,GAAI,MAAU;AACjC,YAAA,aAAa,CAAC,KAAI,GAAI,MAAM,CAAC,UAAS;AACxC,QAAA,CAAA;AAEA;;;;AAIE;QACF,IAAI,4BAA4B,gBAAe;AAE/C;;;;;;;AAOE;AACF,QAAA,MAAM,iBAAgB,GAAI,QAAQ,CAAC,MACjC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,MAAK,GAAI,MAAM,CAAC,CACrF;AAEA;;;;;;;;AAQE;AACF,QAAA,MAAM,cAAa,GAAI,QAAQ,CAAC,MAAmB;AACjD,YAAA,IAAI,KAAK,CAAC,KAAK,EAAE;gBACf,OAAO,KAAK,CAAC,KAAI;YACnB;AAAO,iBAAA,IAAI,aAAa,CAAC,KAAI,KAAM,IAAI,EAAE;AACvC,gBAAA,OAAO,IAAG;YACZ;iBAAO;AACL,gBAAA,QACE,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,aAAa,CAAC,KAAK,IAAK,KAAK,CAAC,GAAG,CAAC,CAAA,IAAK,IAAG;YAE1F;AACF,QAAA,CAAC,CAAA;AAED,QAAA,KAAK,CACH,cAAc,EACd,MAAK,IAAG;AACN,YAAA,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAA;AACpC,QAAA,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CACrB;AAEA;;;;;;;AAOE;QACF,KAAK,CACH,MAAM,KAAK,CAAC,UAAU,EACtB,UAAS,IAAG;AACV,YAAA,yBAAwB,GAAI,QAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAA;AACnE,QAAA,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CACrB;AAEA;;;;;;AAME;QACF,SAAS,CAAC,MAAI;AACZ,YAAA,gBAAgB,EAAC;AACnB,QAAA,CAAC,CAAA;QAED,OAAO;YACL,yBAAyB;SAC3B;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"device-detector.vue2.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 setup>\nimport { reactive } from 'vue'\nimport { DeviceDetector } from '@empathyco/x-components/device'\nimport { use$x } from '../../../composables/use-$x'\n\nconst x = use$x()\nconst breakpoints = reactive({\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\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 setup>\nimport { reactive } from 'vue'\nimport { DeviceDetector } from '@empathyco/x-components/device'\nimport { use$x } from '../../../composables/use-$x'\n\nconst x = use$x()\nconst breakpoints = reactive({\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\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 ref 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 setup>\nimport { DeviceDetector } from '@empathyco/x-components/device'\nimport { reactive, ref } from 'vue'\nconst device = ref('unknown')\nconst breakpoints = reactive({\n mobile: 600,\n tablet: 900,\n desktop: Number.POSITIVE_INFINITY,\n})\nfunction storeDevice(newDevice) {\n device.value = newDevice\n}\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;AAiBA;;;;;;AAME;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,aAAa,CAAC,IAAI;IAC3B,UAAU,EAAE,EAAE,YAAW,EAAG;AAC5B,IAAA,KAAK,EAAE;AACL;;;;;AAKE;AACF,QAAA,WAAW,EAAE;AACX,YAAA,IAAI,EAAE,MAA4C;AAClD,YAAA,OAAO,EAAE,OAAO,EAAE,CAAC;AACpB,SAAA;AACD;;;;AAIE;AACF,QAAA,KAAK,EAAE,MAA0B;AAEjC;;;;AAIE;AACF,QAAA,UAAU,EAAE;AACV,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,GAAG;AACb,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,IAAG,GAAI,OAAO,EAAC;AAErB;;;;AAIE;AACF,QAAA,MAAM,aAAa,GAAuB,GAAG,CAAC,IAAI,CAAA;AAElD;;;;AAIE;QACF,MAAM,gBAAe,GAAI,MAAU;AACjC,YAAA,aAAa,CAAC,KAAI,GAAI,MAAM,CAAC,UAAS;AACxC,QAAA,CAAA;AAEA;;;;AAIE;QACF,IAAI,4BAA4B,gBAAe;AAE/C;;;;;;;AAOE;AACF,QAAA,MAAM,iBAAgB,GAAI,QAAQ,CAAC,MACjC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,MAAK,GAAI,MAAM,CAAC,CACrF;AAEA;;;;;;;;AAQE;AACF,QAAA,MAAM,cAAa,GAAI,QAAQ,CAAC,MAAmB;AACjD,YAAA,IAAI,KAAK,CAAC,KAAK,EAAE;gBACf,OAAO,KAAK,CAAC,KAAI;YACnB;AAAO,iBAAA,IAAI,aAAa,CAAC,KAAI,KAAM,IAAI,EAAE;AACvC,gBAAA,OAAO,IAAG;YACZ;iBAAO;AACL,gBAAA,QACE,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,aAAa,CAAC,KAAK,IAAK,KAAK,CAAC,GAAG,CAAC,CAAA,IAAK,IAAG;YAE1F;AACF,QAAA,CAAC,CAAA;AAED,QAAA,KAAK,CACH,cAAc,EACd,MAAK,IAAG;AACN,YAAA,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAA;AACpC,QAAA,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CACrB;AAEA;;;;;;;AAOE;QACF,KAAK,CACH,MAAM,KAAK,CAAC,UAAU,EACtB,UAAS,IAAG;AACV,YAAA,yBAAwB,GAAI,QAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAA;AACnE,QAAA,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CACrB;AAEA;;;;;;AAME;QACF,SAAS,CAAC,MAAI;AACZ,YAAA,gBAAgB,EAAC;AACnB,QAAA,CAAC,CAAA;QAED,OAAO;YACL,yBAAyB;SAC3B;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
@@ -1,4 +1,4 @@
1
- import _sfc_main from './empathize2.vue.js';
1
+ import _sfc_main from './empathize.vue2.js';
2
2
  import { openBlock, createBlock, resolveDynamicComponent, withCtx, withDirectives, createElementVNode, withModifiers, renderSlot, vShow } from 'vue';
3
3
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
4
4
 
@@ -1,95 +1,95 @@
1
1
  import { defineComponent, ref, computed, watch } from 'vue';
2
- import '../../../components/animations/animate-clip-path2.vue.js';
3
- import '../../../components/animations/animate-scale2.vue.js';
4
- import '../../../components/animations/animate-translate2.vue.js';
5
- import '../../../components/animations/animate-width2.vue.js';
6
- import '../../../components/animations/animate-width3.vue.js';
7
- import '../../../components/animations/change-height2.vue.js';
8
- import '../../../components/animations/change-height3.vue.js';
9
- import '../../../components/animations/collapse-height2.vue.js';
10
- import '../../../components/animations/collapse-height3.vue.js';
11
- import '../../../components/animations/collapse-width2.vue.js';
12
- import '../../../components/animations/collapse-width3.vue.js';
13
- import '../../../components/animations/cross-fade2.vue.js';
14
- import '../../../components/animations/cross-fade3.vue.js';
15
- import '../../../components/animations/fade-and-slide2.vue.js';
16
- import '../../../components/animations/fade-and-slide3.vue.js';
17
- import '../../../components/animations/fade2.vue.js';
18
- import '../../../components/animations/fade3.vue.js';
2
+ import '../../../components/animations/animate-clip-path.vue2.js';
3
+ import '../../../components/animations/animate-scale.vue2.js';
4
+ import '../../../components/animations/animate-translate.vue2.js';
5
+ import '../../../components/animations/animate-width.vue2.js';
6
+ import '../../../components/animations/animate-width.vue3.js';
7
+ import '../../../components/animations/change-height.vue2.js';
8
+ import '../../../components/animations/change-height.vue3.js';
9
+ import '../../../components/animations/collapse-height.vue2.js';
10
+ import '../../../components/animations/collapse-height.vue3.js';
11
+ import '../../../components/animations/collapse-width.vue2.js';
12
+ import '../../../components/animations/collapse-width.vue3.js';
13
+ import '../../../components/animations/cross-fade.vue2.js';
14
+ import '../../../components/animations/cross-fade.vue3.js';
15
+ import '../../../components/animations/fade-and-slide.vue2.js';
16
+ import '../../../components/animations/fade-and-slide.vue3.js';
17
+ import '../../../components/animations/fade.vue2.js';
18
+ import '../../../components/animations/fade.vue3.js';
19
19
  import _sfc_main$1 from '../../../components/animations/no-animation.vue.js';
20
- import '../../../components/animations/staggered-fade-and-slide2.vue.js';
21
- import '../../../components/animations/staggered-fade-and-slide3.vue.js';
22
- import '../../../components/auto-progress-bar2.vue.js';
23
- import '../../../components/auto-progress-bar3.vue.js';
24
- import '../../../components/base-dropdown2.vue.js';
25
- import '../../../components/base-dropdown3.vue.js';
26
- import '../../../components/base-event-button2.vue.js';
27
- import '../../../components/base-grid2.vue.js';
28
- import '../../../components/base-grid3.vue.js';
29
- import '../../../components/base-keyboard-navigation2.vue.js';
30
- import '../../../components/base-rating2.vue.js';
31
- import '../../../components/base-rating3.vue.js';
32
- import '../../../components/base-slider2.vue.js';
33
- import '../../../components/base-slider3.vue.js';
34
- import '../../../components/base-switch2.vue.js';
35
- import '../../../components/base-switch3.vue.js';
36
- import '../../../components/base-teleport2.vue.js';
37
- import '../../../components/base-variable-column-grid2.vue.js';
38
- import '../../../components/column-picker/base-column-picker-dropdown2.vue.js';
39
- import '../../../components/column-picker/base-column-picker-list2.vue.js';
40
- import '../../../components/currency/base-currency2.vue.js';
20
+ import '../../../components/animations/staggered-fade-and-slide.vue2.js';
21
+ import '../../../components/animations/staggered-fade-and-slide.vue3.js';
22
+ import '../../../components/auto-progress-bar.vue2.js';
23
+ import '../../../components/auto-progress-bar.vue3.js';
24
+ import '../../../components/base-dropdown.vue2.js';
25
+ import '../../../components/base-dropdown.vue3.js';
26
+ import '../../../components/base-event-button.vue2.js';
27
+ import '../../../components/base-grid.vue2.js';
28
+ import '../../../components/base-grid.vue3.js';
29
+ import '../../../components/base-keyboard-navigation.vue2.js';
30
+ import '../../../components/base-rating.vue2.js';
31
+ import '../../../components/base-rating.vue3.js';
32
+ import '../../../components/base-slider.vue2.js';
33
+ import '../../../components/base-slider.vue3.js';
34
+ import '../../../components/base-switch.vue2.js';
35
+ import '../../../components/base-switch.vue3.js';
36
+ import '../../../components/base-teleport.vue2.js';
37
+ import '../../../components/base-variable-column-grid.vue2.js';
38
+ import '../../../components/column-picker/base-column-picker-dropdown.vue2.js';
39
+ import '../../../components/column-picker/base-column-picker-list.vue2.js';
40
+ import '../../../components/currency/base-currency.vue2.js';
41
41
  import '../../../components/display-click-provider.vue.js';
42
42
  import '../../../components/display-emitter.vue.js';
43
43
  import '../../../components/filters/labels/base-price-filter-label.vue.js';
44
- import '../../../components/filters/labels/base-rating-filter-label2.vue.js';
44
+ import '../../../components/filters/labels/base-rating-filter-label.vue2.js';
45
45
  import '../../../components/global-x-bus.vue.js';
46
- import '../../../components/highlight2.vue.js';
47
- import '../../../components/items-list2.vue.js';
46
+ import '../../../components/highlight.vue2.js';
47
+ import '../../../components/items-list.vue2.js';
48
48
  import '../../../components/location-provider.vue.js';
49
49
  import { AnimationProp } from '../../../types/animation-prop.js';
50
- import '../../../components/modals/base-events-modal-close2.vue.js';
51
- import '../../../components/modals/base-events-modal-open2.vue.js';
52
- import '../../../components/modals/base-events-modal2.vue.js';
53
- import '../../../components/modals/base-id-modal-close2.vue.js';
54
- import '../../../components/modals/base-id-modal-open2.vue.js';
55
- import '../../../components/modals/base-id-modal2.vue.js';
56
- import '../../../components/modals/base-modal2.vue.js';
57
- import '../../../components/modals/base-modal3.vue.js';
58
- import '../../../components/modals/close-main-modal2.vue.js';
59
- import '../../../components/modals/main-modal2.vue.js';
60
- import '../../../components/modals/open-main-modal2.vue.js';
61
- import '../../../components/page-loader-button2.vue.js';
62
- import '../../../components/page-loader-button3.vue.js';
63
- import '../../../components/page-selector2.vue.js';
64
- import '../../../components/page-selector3.vue.js';
65
- import '../../../components/panels/base-header-toggle-panel2.vue.js';
66
- import '../../../components/panels/base-header-toggle-panel3.vue.js';
67
- import '../../../components/panels/base-id-toggle-panel-button2.vue.js';
68
- import '../../../components/panels/base-id-toggle-panel2.vue.js';
69
- import '../../../components/panels/base-tabs-panel2.vue.js';
70
- import '../../../components/panels/base-tabs-panel3.vue.js';
71
- import '../../../components/panels/base-toggle-panel2.vue.js';
72
- import '../../../components/result/base-result-add-to-cart2.vue.js';
73
- import '../../../components/result/base-result-current-price2.vue.js';
74
- import '../../../components/result/base-result-image2.vue.js';
75
- import '../../../components/result/base-result-image3.vue.js';
76
- import '../../../components/result/base-result-link2.vue.js';
77
- import '../../../components/result/base-result-link3.vue.js';
78
- import '../../../components/result/base-result-previous-price2.vue.js';
79
- import '../../../components/result/base-result-rating2.vue.js';
80
- import '../../../components/result/base-result-rating3.vue.js';
81
- import '../../../components/result/result-variant-selector2.vue.js';
82
- import '../../../components/result/result-variant-selector3.vue.js';
50
+ import '../../../components/modals/base-events-modal-close.vue2.js';
51
+ import '../../../components/modals/base-events-modal-open.vue2.js';
52
+ import '../../../components/modals/base-events-modal.vue2.js';
53
+ import '../../../components/modals/base-id-modal-close.vue2.js';
54
+ import '../../../components/modals/base-id-modal-open.vue2.js';
55
+ import '../../../components/modals/base-id-modal.vue2.js';
56
+ import '../../../components/modals/base-modal.vue2.js';
57
+ import '../../../components/modals/base-modal.vue3.js';
58
+ import '../../../components/modals/close-main-modal.vue2.js';
59
+ import '../../../components/modals/main-modal.vue2.js';
60
+ import '../../../components/modals/open-main-modal.vue2.js';
61
+ import '../../../components/page-loader-button.vue2.js';
62
+ import '../../../components/page-loader-button.vue3.js';
63
+ import '../../../components/page-selector.vue2.js';
64
+ import '../../../components/page-selector.vue3.js';
65
+ import '../../../components/panels/base-header-toggle-panel.vue2.js';
66
+ import '../../../components/panels/base-header-toggle-panel.vue3.js';
67
+ import '../../../components/panels/base-id-toggle-panel-button.vue2.js';
68
+ import '../../../components/panels/base-id-toggle-panel.vue2.js';
69
+ import '../../../components/panels/base-tabs-panel.vue2.js';
70
+ import '../../../components/panels/base-tabs-panel.vue3.js';
71
+ import '../../../components/panels/base-toggle-panel.vue2.js';
72
+ import '../../../components/result/base-result-add-to-cart.vue2.js';
73
+ import '../../../components/result/base-result-current-price.vue2.js';
74
+ import '../../../components/result/base-result-image.vue2.js';
75
+ import '../../../components/result/base-result-image.vue3.js';
76
+ import '../../../components/result/base-result-link.vue2.js';
77
+ import '../../../components/result/base-result-link.vue3.js';
78
+ import '../../../components/result/base-result-previous-price.vue2.js';
79
+ import '../../../components/result/base-result-rating.vue2.js';
80
+ import '../../../components/result/base-result-rating.vue3.js';
81
+ import '../../../components/result/result-variant-selector.vue2.js';
82
+ import '../../../components/result/result-variant-selector.vue3.js';
83
83
  import '../../../components/result/result-variants-provider.vue.js';
84
- import '../../../components/scroll/base-scroll2.vue.js';
84
+ import '../../../components/scroll/base-scroll.vue2.js';
85
85
  import '@empathyco/x-utils';
86
86
  import { use$x } from '../../../composables/use-_x.js';
87
- import '../../../components/sliding-panel2.vue.js';
88
- import '../../../components/sliding-panel3.vue.js';
89
- import '../../../components/snippet-callbacks2.vue.js';
90
- import '../../../components/suggestions/base-suggestion2.vue.js';
91
- import '../../../components/suggestions/base-suggestions2.vue.js';
92
- import '../../../components/suggestions/base-suggestions3.vue.js';
87
+ import '../../../components/sliding-panel.vue2.js';
88
+ import '../../../components/sliding-panel.vue3.js';
89
+ import '../../../components/snippet-callbacks.vue2.js';
90
+ import '../../../components/suggestions/base-suggestion.vue2.js';
91
+ import '../../../components/suggestions/base-suggestions.vue2.js';
92
+ import '../../../components/suggestions/base-suggestions.vue3.js';
93
93
  import '../../../composables/create-use-device.js';
94
94
  import 'vuex';
95
95
  import '../../../plugins/x-bus.js';
@@ -214,4 +214,4 @@ var _sfc_main = defineComponent({
214
214
  });
215
215
 
216
216
  export { _sfc_main as default };
217
- //# sourceMappingURL=empathize2.vue.js.map
217
+ //# sourceMappingURL=empathize.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"empathize2.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`, `UserPressedEnterKey`, `UserBlurredSearchBox`\n\n### Basic example\n\nThe component rendering the query suggestions, popular searches and history queries with keyboard\nnavigation.\n\n```vue\n<template>\n <Empathize>\n <BaseKeyboardNavigation>\n <QuerySuggestions />\n <PopularSearches />\n <HistoryQueries />\n </BaseKeyboardNavigation>\n </Empathize>\n</template>\n\n<script setup>\nimport Empathize from '@empathyco/x-components/js/x-modules/empathize/components/empathize.vue'\nimport BaseKeyboardNavigation from '@empathyco/x-components/js/components/base-keyboard-navigation.vue'\nimport QuerySuggestions from '@empathyco/x-components/js/x-modules/query-suggestions/components/query-suggestions.vue'\nimport PopularSearches from '@empathyco/x-components/js/x-modules/popular-searches/components/popular-searches.vue'\nimport HistoryQueries from '@empathyco/x-components/js/x-modules/history-queries/components/history-queries.vue'\n</script>\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<template>\n <Empathize\n :events-to-open-empathize=\"['UserBlurredSearchBox']\"\n :events-to-close-empathize=\"['UserFocusedSearchBox']\"\n >\n Please, type a query in the Search Box.\n </Empathize>\n</template>\n\n<script setup>\nimport Empathize from '@empathyco/x-components/js/x-modules/empathize/components/empathize.vue'\n</script>\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` and a slot inside:\n\n```vue\n<template>\n <Empathize :animation=\"collapseFromTop\">\n <PopularSearches />\n </Empathize>\n</template>\n\n<script setup>\nimport Empathize from '@empathyco/x-components/js/x-modules/empathize/components/empathize.vue'\nimport PopularSearches from '@empathyco/x-components/js/x-modules/popular-searches/components/popular-searches.vue'\nimport CollapseFromTop from './collapseFromTop.vue'\nconst animation = CollapseFromTop\n</script>\n```\n\n### Advanced example\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 it has no content as fallback behaviour. To do that, `hasContent` prop must be reactive to know\nif the empathize has content or not. It also configures `searchAndCloseDebounceInMs` to 500ms as debounce time to search and close the empathize when it has no content.\n\n```vue\n<template>\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</template>\n\n<script setup>\nimport Empathize from '@empathyco/x-components/js/x-modules/empathize/components/empathize.vue'\nimport BaseKeyboardNavigation from '@empathyco/x-components/js/components/base-keyboard-navigation.vue'\nimport QuerySuggestions from '@empathyco/x-components/js/x-modules/query-suggestions/components/query-suggestions.vue'\nimport PopularSearches from '@empathyco/x-components/js/x-modules/popular-searches/components/popular-searches.vue'\nimport HistoryQueries from '@empathyco/x-components/js/x-modules/history-queries/components/history-queries.vue'\nimport CollapseFromTop from './collapseFromTop.vue'\nimport { ref } from 'vue'\nconst empathizeAnimation = CollapseFromTop\nconst empathizeCloseEvents = ['UserClosedEmpathize', 'UserSelectedASuggestion']\nconst showEmpathize = ref(true)\n</script>\n```\n</docs>\n"],"names":["NoAnimation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;AAIE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,gBAAgB,CAAC,IAAI;AAC9B,IAAA,KAAK,EAAE;;AAEL,QAAA,qBAAqB,EAAE;AACrB,YAAA,IAAI,EAAE,KAA2B;YACjC,OAAO,EAAE,MAAM,CAAC,sBAAsB,EAAE,oBAAoB,EAAE,sBAAsB,CAAC;AACtF,SAAA;;AAED,QAAA,sBAAsB,EAAE;AACtB,YAAA,IAAI,EAAE,KAA2B;YACjC,OAAO,EAAE,MAAM;gBACb,qBAAqB;gBACrB,yBAAyB;gBACzB,qBAAqB;gBACrB,sBAAsB;AACvB,aAAA;AACF,SAAA;;AAED,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,OAAO,EAAE,MAAMA,WAAW;AAC3B,SAAA;;AAED,QAAA,UAAU,EAAE;AACV,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;;AAED,QAAA,yBAAyB,EAAE;AACzB,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,KAAK;AACf,SAAA;;AAED,QAAA,0BAA0B,EAAE;AAC1B,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,EAAC,GAAI,KAAK,EAAC;AAEjB,QAAA,MAAM,YAAW,GAAI,GAAG,CAAwB,IAAI,CAAA;AACpD,QAAA,MAAM,SAAS,GAAG,CAAC,KAAK,CAAA;AACxB,QAAA,MAAM,mBAAkB,GAAI,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAI,IAAK,KAAK,CAAC,UAAU,CAAA;;AAG3E,QAAA,KAAK,CAAC,mBAAmB,EAAE,MAAI;AAC7B,YAAA,MAAM,cAAa,GAAI,mBAAmB,CAAC,KAAI,GAAI,oBAAoB,iBAAgB;AACvF,YAAA,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,KAAI,EAAG,CAAA;AACnE,QAAA,CAAC,CAAA;;AAGD,QAAA,MAAM,mBAAkB,GAAI,WAAW,CAAC,CAAC,OAAgB,MAAM,MAAM,CAAC,KAAI,GAAI,OAAO,CAAC,EAAE,CAAC,CAAA;AAEzF;;;;AAIE;AACF,QAAA,SAAS,IAAI,GAAA;YACX,mBAAmB,CAAC,IAAI,CAAA;QAC1B;AAEA;;;;AAIE;AACF,QAAA,SAAS,KAAK,GAAA;AACZ,YAAA,MAAM,aAAY,GAAI,gBAAgB,EAAC;YACvC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE;gBAChD,mBAAmB,CAAC,KAAK,CAAA;YAC3B;QACF;;QAGA,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;QAChF,KAAK,CAAC,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAElF,QAAA,IAAI,qBAAqB,GAAoB,QAAO,CAAA;;AAGpD,QAAA,MAAM,uBAAsB,GAAI,WAAW,CAAC,YAAU;AACpD,YAAA,IAAI,MAAM,CAAC,KAAK,EAAE;AAChB,gBAAA,qBAAqB,EAAC;AACtB,gBAAA,MAAM,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAA;AACtD,gBAAA,KAAK,EAAC;YACR;AACF,QAAA,CAAC,EAAE,KAAK,CAAC,0BAA0B,CAAA;AAEnC;;;;;;AAME;QACF,KAAK,CACH,MAAM,KAAK,CAAC,UAAU,EACtB,MAAI;AACF,YAAA,IAAI,KAAK,CAAC,yBAAyB,EAAE;AACnC,gBAAA,IAAI,KAAK,CAAC,UAAU,EAAE;AACpB,oBAAA,qBAAqB,EAAC;oBACtB,uBAAuB,CAAC,MAAM,EAAC;gBACjC;qBAAO;AACL,oBAAA,qBAAoB,GAAI,KAAK,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,uBAAuB,EAAE;AAC/E,wBAAA,SAAS,EAAE,IAAI;AAChB,qBAAA,CAAA;gBACH;YACF;AACF,QAAA,CAAC,CACH;QAEA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,IAAI,EAAE,KAAI,EAAE;IAC1D,CAAC;AACF,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"empathize.vue2.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`, `UserPressedEnterKey`, `UserBlurredSearchBox`\n\n### Basic example\n\nThe component rendering the query suggestions, popular searches and history queries with keyboard\nnavigation.\n\n```vue\n<template>\n <Empathize>\n <BaseKeyboardNavigation>\n <QuerySuggestions />\n <PopularSearches />\n <HistoryQueries />\n </BaseKeyboardNavigation>\n </Empathize>\n</template>\n\n<script setup>\nimport Empathize from '@empathyco/x-components/js/x-modules/empathize/components/empathize.vue'\nimport BaseKeyboardNavigation from '@empathyco/x-components/js/components/base-keyboard-navigation.vue'\nimport QuerySuggestions from '@empathyco/x-components/js/x-modules/query-suggestions/components/query-suggestions.vue'\nimport PopularSearches from '@empathyco/x-components/js/x-modules/popular-searches/components/popular-searches.vue'\nimport HistoryQueries from '@empathyco/x-components/js/x-modules/history-queries/components/history-queries.vue'\n</script>\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<template>\n <Empathize\n :events-to-open-empathize=\"['UserBlurredSearchBox']\"\n :events-to-close-empathize=\"['UserFocusedSearchBox']\"\n >\n Please, type a query in the Search Box.\n </Empathize>\n</template>\n\n<script setup>\nimport Empathize from '@empathyco/x-components/js/x-modules/empathize/components/empathize.vue'\n</script>\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` and a slot inside:\n\n```vue\n<template>\n <Empathize :animation=\"collapseFromTop\">\n <PopularSearches />\n </Empathize>\n</template>\n\n<script setup>\nimport Empathize from '@empathyco/x-components/js/x-modules/empathize/components/empathize.vue'\nimport PopularSearches from '@empathyco/x-components/js/x-modules/popular-searches/components/popular-searches.vue'\nimport CollapseFromTop from './collapseFromTop.vue'\nconst animation = CollapseFromTop\n</script>\n```\n\n### Advanced example\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 it has no content as fallback behaviour. To do that, `hasContent` prop must be reactive to know\nif the empathize has content or not. It also configures `searchAndCloseDebounceInMs` to 500ms as debounce time to search and close the empathize when it has no content.\n\n```vue\n<template>\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</template>\n\n<script setup>\nimport Empathize from '@empathyco/x-components/js/x-modules/empathize/components/empathize.vue'\nimport BaseKeyboardNavigation from '@empathyco/x-components/js/components/base-keyboard-navigation.vue'\nimport QuerySuggestions from '@empathyco/x-components/js/x-modules/query-suggestions/components/query-suggestions.vue'\nimport PopularSearches from '@empathyco/x-components/js/x-modules/popular-searches/components/popular-searches.vue'\nimport HistoryQueries from '@empathyco/x-components/js/x-modules/history-queries/components/history-queries.vue'\nimport CollapseFromTop from './collapseFromTop.vue'\nimport { ref } from 'vue'\nconst empathizeAnimation = CollapseFromTop\nconst empathizeCloseEvents = ['UserClosedEmpathize', 'UserSelectedASuggestion']\nconst showEmpathize = ref(true)\n</script>\n```\n</docs>\n"],"names":["NoAnimation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;AAIE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,gBAAgB,CAAC,IAAI;AAC9B,IAAA,KAAK,EAAE;;AAEL,QAAA,qBAAqB,EAAE;AACrB,YAAA,IAAI,EAAE,KAA2B;YACjC,OAAO,EAAE,MAAM,CAAC,sBAAsB,EAAE,oBAAoB,EAAE,sBAAsB,CAAC;AACtF,SAAA;;AAED,QAAA,sBAAsB,EAAE;AACtB,YAAA,IAAI,EAAE,KAA2B;YACjC,OAAO,EAAE,MAAM;gBACb,qBAAqB;gBACrB,yBAAyB;gBACzB,qBAAqB;gBACrB,sBAAsB;AACvB,aAAA;AACF,SAAA;;AAED,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,OAAO,EAAE,MAAMA,WAAW;AAC3B,SAAA;;AAED,QAAA,UAAU,EAAE;AACV,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;;AAED,QAAA,yBAAyB,EAAE;AACzB,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,KAAK;AACf,SAAA;;AAED,QAAA,0BAA0B,EAAE;AAC1B,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,EAAC,GAAI,KAAK,EAAC;AAEjB,QAAA,MAAM,YAAW,GAAI,GAAG,CAAwB,IAAI,CAAA;AACpD,QAAA,MAAM,SAAS,GAAG,CAAC,KAAK,CAAA;AACxB,QAAA,MAAM,mBAAkB,GAAI,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAI,IAAK,KAAK,CAAC,UAAU,CAAA;;AAG3E,QAAA,KAAK,CAAC,mBAAmB,EAAE,MAAI;AAC7B,YAAA,MAAM,cAAa,GAAI,mBAAmB,CAAC,KAAI,GAAI,oBAAoB,iBAAgB;AACvF,YAAA,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,KAAI,EAAG,CAAA;AACnE,QAAA,CAAC,CAAA;;AAGD,QAAA,MAAM,mBAAkB,GAAI,WAAW,CAAC,CAAC,OAAgB,MAAM,MAAM,CAAC,KAAI,GAAI,OAAO,CAAC,EAAE,CAAC,CAAA;AAEzF;;;;AAIE;AACF,QAAA,SAAS,IAAI,GAAA;YACX,mBAAmB,CAAC,IAAI,CAAA;QAC1B;AAEA;;;;AAIE;AACF,QAAA,SAAS,KAAK,GAAA;AACZ,YAAA,MAAM,aAAY,GAAI,gBAAgB,EAAC;YACvC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE;gBAChD,mBAAmB,CAAC,KAAK,CAAA;YAC3B;QACF;;QAGA,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;QAChF,KAAK,CAAC,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAElF,QAAA,IAAI,qBAAqB,GAAoB,QAAO,CAAA;;AAGpD,QAAA,MAAM,uBAAsB,GAAI,WAAW,CAAC,YAAU;AACpD,YAAA,IAAI,MAAM,CAAC,KAAK,EAAE;AAChB,gBAAA,qBAAqB,EAAC;AACtB,gBAAA,MAAM,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAA;AACtD,gBAAA,KAAK,EAAC;YACR;AACF,QAAA,CAAC,EAAE,KAAK,CAAC,0BAA0B,CAAA;AAEnC;;;;;;AAME;QACF,KAAK,CACH,MAAM,KAAK,CAAC,UAAU,EACtB,MAAI;AACF,YAAA,IAAI,KAAK,CAAC,yBAAyB,EAAE;AACnC,gBAAA,IAAI,KAAK,CAAC,UAAU,EAAE;AACpB,oBAAA,qBAAqB,EAAC;oBACtB,uBAAuB,CAAC,MAAM,EAAC;gBACjC;qBAAO;AACL,oBAAA,qBAAoB,GAAI,KAAK,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,uBAAuB,EAAE;AAC/E,wBAAA,SAAS,EAAE,IAAI;AAChB,qBAAA,CAAA;gBACH;YACF;AACF,QAAA,CAAC,CACH;QAEA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,IAAI,EAAE,KAAI,EAAE;IAC1D,CAAC;AACF,CAAA,CAAA;;;;"}
@@ -3,4 +3,4 @@ import _sfc_main from './experience-controls.vue.js';
3
3
 
4
4
 
5
5
  export { _sfc_main as default };
6
- //# sourceMappingURL=experience-controls2.vue.js.map
6
+ //# sourceMappingURL=experience-controls.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"experience-controls.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -3,4 +3,4 @@ import _sfc_main from './extra-params.vue.js';
3
3
 
4
4
 
5
5
  export { _sfc_main as default };
6
- //# sourceMappingURL=extra-params2.vue.js.map
6
+ //# sourceMappingURL=extra-params.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extra-params.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -3,4 +3,4 @@ import _sfc_main from './renderless-extra-param.vue.js';
3
3
 
4
4
 
5
5
  export { _sfc_main as default };
6
- //# sourceMappingURL=renderless-extra-param2.vue.js.map
6
+ //# sourceMappingURL=renderless-extra-param.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderless-extra-param.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,4 +1,4 @@
1
- import _sfc_main from './snippet-config-extra-params2.vue.js';
1
+ import _sfc_main from './snippet-config-extra-params.vue2.js';
2
2
  import { resolveComponent, openBlock, createBlock } from 'vue';
3
3
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
4
4
 
@@ -47,4 +47,4 @@ var _sfc_main = defineComponent({
47
47
  });
48
48
 
49
49
  export { _sfc_main as default };
50
- //# sourceMappingURL=snippet-config-extra-params2.vue.js.map
50
+ //# sourceMappingURL=snippet-config-extra-params.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"snippet-config-extra-params2.vue.js","sources":["../../../../../src/x-modules/extra-params/components/snippet-config-extra-params.vue"],"sourcesContent":["<template>\n <ExtraParams :values=\"extraParams\" />\n</template>\n\n<script lang=\"ts\">\nimport type { Dictionary } from '@empathyco/x-utils'\nimport type { PropType } from 'vue'\nimport type { SnippetConfig } from '../../../x-installer/api/api.types'\nimport { forEach } from '@empathyco/x-utils'\nimport { defineComponent, inject, ref, watch } from 'vue'\nimport { extraParamsXModule } from '../x-module'\nimport ExtraParams from './extra-params.vue'\n\nexport default defineComponent({\n name: 'SnippetConfigExtraParams',\n xModule: extraParamsXModule.name,\n components: {\n ExtraParams,\n },\n props: {\n values: {\n type: Object as PropType<Dictionary<unknown>>,\n },\n excludedExtraParams: {\n type: Array as PropType<Array<keyof SnippetConfig>>,\n default: (): Array<keyof SnippetConfig> => [\n 'callbacks',\n 'productId',\n 'uiLang',\n 'consent',\n 'documentDirection',\n 'filters',\n 'isSpa',\n 'queriesPreview',\n ],\n },\n },\n setup(props) {\n const snippetConfig = inject('snippetConfig') as SnippetConfig\n const extraParams = ref<Record<string, any>>({})\n\n watch(\n [() => snippetConfig, () => props.values],\n () => {\n forEach({ ...props.values, ...snippetConfig }, (name, value) => {\n if (!props.excludedExtraParams.includes(name) && extraParams.value[name] !== value) {\n extraParams.value = { ...extraParams.value, [name]: value }\n }\n })\n },\n {\n deep: true,\n immediate: true,\n },\n )\n\n return {\n extraParams,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\n_See how the snippet config is injected and passed to the SnippetConfigExtraParams component._\n\n```vue\n<template>\n <Provider>\n <SnippetConfigExtraParams />\n </Provider>\n</template>\n\n<script setup>\nimport { SnippetConfigExtraParams } from '@empathyco/x-components/extra-params'\nimport { defineComponent, provide } from 'vue'\n\nconst Provider = defineComponent({\n setup(_, { slots }) {\n provide('snippetConfig', {\n instance: 'demo',\n lang: 'es',\n warehouse: 1234,\n })\n return () => slots.default?.()\n },\n})\n</script>\n```\n</docs>\n"],"names":["ExtraParams"],"mappings":";;;;;AAaA,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,0BAA0B;IAChC,OAAO,EAAE,kBAAkB,CAAC,IAAI;AAChC,IAAA,UAAU,EAAE;qBACVA,WAAW;AACZ,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAAuC;AAC9C,SAAA;AACD,QAAA,mBAAmB,EAAE;AACnB,YAAA,IAAI,EAAE,KAA6C;YACnD,OAAO,EAAE,MAAkC;gBACzC,WAAW;gBACX,WAAW;gBACX,QAAQ;gBACR,SAAS;gBACT,mBAAmB;gBACnB,SAAS;gBACT,OAAO;gBACP,gBAAgB;AACjB,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,aAAY,GAAI,MAAM,CAAC,eAAe,CAAiB;AAC7D,QAAA,MAAM,cAAc,GAAG,CAAsB,EAAE,CAAA;AAE/C,QAAA,KAAK,CACH,CAAC,MAAM,aAAa,EAAE,MAAM,KAAK,CAAC,MAAM,CAAC,EACzC,MAAI;AACF,YAAA,OAAO,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,GAAG,aAAY,EAAG,EAAE,CAAC,IAAI,EAAE,KAAK,KAAG;AAC5D,gBAAA,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAA,IAAK,WAAW,CAAC,KAAK,CAAC,IAAI,CAAA,KAAM,KAAK,EAAE;AAClF,oBAAA,WAAW,CAAC,KAAI,GAAI,EAAE,GAAG,WAAW,CAAC,KAAK,EAAE,CAAC,IAAI,GAAG,KAAI,EAAE;gBAC5D;AACF,YAAA,CAAC,CAAA;AACH,QAAA,CAAC,EACD;AACE,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,SAAS,EAAE,IAAI;AAChB,SAAA,CACH;QAEA,OAAO;YACL,WAAW;SACb;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"snippet-config-extra-params.vue2.js","sources":["../../../../../src/x-modules/extra-params/components/snippet-config-extra-params.vue"],"sourcesContent":["<template>\n <ExtraParams :values=\"extraParams\" />\n</template>\n\n<script lang=\"ts\">\nimport type { Dictionary } from '@empathyco/x-utils'\nimport type { PropType } from 'vue'\nimport type { SnippetConfig } from '../../../x-installer/api/api.types'\nimport { forEach } from '@empathyco/x-utils'\nimport { defineComponent, inject, ref, watch } from 'vue'\nimport { extraParamsXModule } from '../x-module'\nimport ExtraParams from './extra-params.vue'\n\nexport default defineComponent({\n name: 'SnippetConfigExtraParams',\n xModule: extraParamsXModule.name,\n components: {\n ExtraParams,\n },\n props: {\n values: {\n type: Object as PropType<Dictionary<unknown>>,\n },\n excludedExtraParams: {\n type: Array as PropType<Array<keyof SnippetConfig>>,\n default: (): Array<keyof SnippetConfig> => [\n 'callbacks',\n 'productId',\n 'uiLang',\n 'consent',\n 'documentDirection',\n 'filters',\n 'isSpa',\n 'queriesPreview',\n ],\n },\n },\n setup(props) {\n const snippetConfig = inject('snippetConfig') as SnippetConfig\n const extraParams = ref<Record<string, any>>({})\n\n watch(\n [() => snippetConfig, () => props.values],\n () => {\n forEach({ ...props.values, ...snippetConfig }, (name, value) => {\n if (!props.excludedExtraParams.includes(name) && extraParams.value[name] !== value) {\n extraParams.value = { ...extraParams.value, [name]: value }\n }\n })\n },\n {\n deep: true,\n immediate: true,\n },\n )\n\n return {\n extraParams,\n }\n },\n})\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\n_See how the snippet config is injected and passed to the SnippetConfigExtraParams component._\n\n```vue\n<template>\n <Provider>\n <SnippetConfigExtraParams />\n </Provider>\n</template>\n\n<script setup>\nimport { SnippetConfigExtraParams } from '@empathyco/x-components/extra-params'\nimport { defineComponent, provide } from 'vue'\n\nconst Provider = defineComponent({\n setup(_, { slots }) {\n provide('snippetConfig', {\n instance: 'demo',\n lang: 'es',\n warehouse: 1234,\n })\n return () => slots.default?.()\n },\n})\n</script>\n```\n</docs>\n"],"names":["ExtraParams"],"mappings":";;;;;AAaA,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,0BAA0B;IAChC,OAAO,EAAE,kBAAkB,CAAC,IAAI;AAChC,IAAA,UAAU,EAAE;qBACVA,WAAW;AACZ,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAAuC;AAC9C,SAAA;AACD,QAAA,mBAAmB,EAAE;AACnB,YAAA,IAAI,EAAE,KAA6C;YACnD,OAAO,EAAE,MAAkC;gBACzC,WAAW;gBACX,WAAW;gBACX,QAAQ;gBACR,SAAS;gBACT,mBAAmB;gBACnB,SAAS;gBACT,OAAO;gBACP,gBAAgB;AACjB,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,aAAY,GAAI,MAAM,CAAC,eAAe,CAAiB;AAC7D,QAAA,MAAM,cAAc,GAAG,CAAsB,EAAE,CAAA;AAE/C,QAAA,KAAK,CACH,CAAC,MAAM,aAAa,EAAE,MAAM,KAAK,CAAC,MAAM,CAAC,EACzC,MAAI;AACF,YAAA,OAAO,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,GAAG,aAAY,EAAG,EAAE,CAAC,IAAI,EAAE,KAAK,KAAG;AAC5D,gBAAA,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAA,IAAK,WAAW,CAAC,KAAK,CAAC,IAAI,CAAA,KAAM,KAAK,EAAE;AAClF,oBAAA,WAAW,CAAC,KAAI,GAAI,EAAE,GAAG,WAAW,CAAC,KAAK,EAAE,CAAC,IAAI,GAAG,KAAI,EAAE;gBAC5D;AACF,YAAA,CAAC,CAAA;AACH,QAAA,CAAC,EACD;AACE,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,SAAS,EAAE,IAAI;AAChB,SAAA,CACH;QAEA,OAAO;YACL,WAAW;SACb;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
@@ -1,4 +1,4 @@
1
- import _sfc_main from './clear-filters2.vue.js';
1
+ import _sfc_main from './clear-filters.vue2.js';
2
2
  import { resolveComponent, openBlock, createBlock, normalizeClass, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
3
3
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
4
4
 
@@ -48,4 +48,4 @@ var _sfc_main = defineComponent({
48
48
  });
49
49
 
50
50
  export { _sfc_main as default };
51
- //# sourceMappingURL=clear-filters2.vue.js.map
51
+ //# sourceMappingURL=clear-filters.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clear-filters2.vue.js","sources":["../../../../../src/x-modules/facets/components/clear-filters.vue"],"sourcesContent":["<template>\n <BaseEventButton\n v-if=\"isVisible\"\n class=\"x-clear-filters xds: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<template>\n <ClearFilters />\n</template>\n\n<script setup>\nimport { ClearFilters } from '@empathyco/x-components/facets'\n</script>\n```\n\n### Customizing its contents\n\nIn this example, show the custom message in button.\n\n```vue\n<template>\n <ClearFilters v-slot=\"{ selectedFilters }\">\n Delete {{ selectedFilters.length }} selected\n </ClearFilters>\n</template>\n\n<script setup>\nimport { ClearFilters } from '@empathyco/x-components/facets'\n</script>\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<template>\n <ClearFilters v-slot=\"{ selectedFilters }\" :alwaysVisible=\"true\" :facetsIds=\"facetsIds\">\n Delete {{ selectedFilters.length }} selected\n </ClearFilters>\n</template>\n\n<script setup>\nimport { ClearFilters } from '@empathyco/x-components/facets'\nimport { ref } from 'vue'\n\nconst facetsIds = ref(['brand_facet', 'gender_facet'])\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;AAuBA;;;;AAIE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,aAAa,CAAC,IAAI;IAC3B,UAAU,EAAE,EAAE,eAAc,EAAG;AAC/B,IAAA,KAAK,EAAE;;AAEL,QAAA,SAAS,EAAE,KAAqC;;AAEhD,QAAA,aAAa,EAAE,OAAO;AACvB,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,EAAE,eAAe,EAAE,kBAAkB,EAAE,SAAQ,EAAE,GAAI,SAAS,CAAC,KAAK,CAAA;AAE1E;;;;AAIE;AACF,QAAA,MAAM,MAAK,GAAI,QAAQ,CAAwB,OAAO;YACpD,0BAA0B,EAAE,KAAK,CAAC,SAAS;AAC5C,SAAA,CAAC,CAAA;AAEF;;;;AAIE;AACF,QAAA,MAAM,UAAS,GAAI,QAAQ,CAAgB,OAAO;AAChD,YAAA,2CAA2C,EAAE,CAAC,kBAAkB,CAAC,KAAK;YACtE,uCAAuC,EAAE,kBAAkB,CAAC,KAAK;AAClE,SAAA,CAAC,CAAA;QAEF,OAAO;YACL,eAAe;YACf,kBAAkB;YAClB,SAAS;YACT,MAAM;YACN,UAAU;SACZ;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"clear-filters.vue2.js","sources":["../../../../../src/x-modules/facets/components/clear-filters.vue"],"sourcesContent":["<template>\n <BaseEventButton\n v-if=\"isVisible\"\n class=\"x-clear-filters xds: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<template>\n <ClearFilters />\n</template>\n\n<script setup>\nimport { ClearFilters } from '@empathyco/x-components/facets'\n</script>\n```\n\n### Customizing its contents\n\nIn this example, show the custom message in button.\n\n```vue\n<template>\n <ClearFilters v-slot=\"{ selectedFilters }\">\n Delete {{ selectedFilters.length }} selected\n </ClearFilters>\n</template>\n\n<script setup>\nimport { ClearFilters } from '@empathyco/x-components/facets'\n</script>\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<template>\n <ClearFilters v-slot=\"{ selectedFilters }\" :alwaysVisible=\"true\" :facetsIds=\"facetsIds\">\n Delete {{ selectedFilters.length }} selected\n </ClearFilters>\n</template>\n\n<script setup>\nimport { ClearFilters } from '@empathyco/x-components/facets'\nimport { ref } from 'vue'\n\nconst facetsIds = ref(['brand_facet', 'gender_facet'])\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;AAuBA;;;;AAIE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,aAAa,CAAC,IAAI;IAC3B,UAAU,EAAE,EAAE,eAAc,EAAG;AAC/B,IAAA,KAAK,EAAE;;AAEL,QAAA,SAAS,EAAE,KAAqC;;AAEhD,QAAA,aAAa,EAAE,OAAO;AACvB,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,EAAE,eAAe,EAAE,kBAAkB,EAAE,SAAQ,EAAE,GAAI,SAAS,CAAC,KAAK,CAAA;AAE1E;;;;AAIE;AACF,QAAA,MAAM,MAAK,GAAI,QAAQ,CAAwB,OAAO;YACpD,0BAA0B,EAAE,KAAK,CAAC,SAAS;AAC5C,SAAA,CAAC,CAAA;AAEF;;;;AAIE;AACF,QAAA,MAAM,UAAS,GAAI,QAAQ,CAAgB,OAAO;AAChD,YAAA,2CAA2C,EAAE,CAAC,kBAAkB,CAAC,KAAK;YACtE,uCAAuC,EAAE,kBAAkB,CAAC,KAAK;AAClE,SAAA,CAAC,CAAA;QAEF,OAAO;YACL,eAAe;YACf,kBAAkB;YAClB,SAAS;YACT,MAAM;YACN,UAAU;SACZ;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
@@ -1,5 +1,5 @@
1
- import _sfc_main from './facets-provider2.vue.js';
2
- import './facets-provider3.vue.js';
1
+ import _sfc_main from './facets-provider.vue2.js';
2
+ import './facets-provider.vue3.js';
3
3
  import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.js';
4
4
 
5
5
  var facetsProvider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-67bd3b28"]]);
@@ -100,4 +100,4 @@ var _sfc_main = defineComponent({
100
100
  });
101
101
 
102
102
  export { _sfc_main as default };
103
- //# sourceMappingURL=facets-provider2.vue.js.map
103
+ //# sourceMappingURL=facets-provider.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"facets-provider2.vue.js","sources":["../../../../../../src/x-modules/facets/components/facets/facets-provider.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Facet, Filter } from '@empathyco/x-types'\nimport type { PropType, Ref } from 'vue'\nimport type { GroupId } from '../../store/types'\nimport { isHierarchicalFacet } from '@empathyco/x-types'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport { use$x } from '../../../../composables/use-$x'\nimport { clone } from '../../../../utils'\nimport { areFiltersDifferent } from '../../../../utils/filters'\nimport { flatHierarchicalFilters } from '../../utils'\nimport { facetsXModule } from '../../x-module'\n\n/**\n * This component allows to provide facets by prop, to add them to the state of the\n * `Facets X-Module`. These facets will be added to the `Facets X-Module` state together with\n * the facets emitted by the `Search X-Module` through the {@link SearchXEvents.FacetsChanged}\n * event.\n *\n * @public\n */\nexport default defineComponent({\n name: 'FacetsProvider',\n xModule: facetsXModule.name,\n props: {\n /**\n * An facet group identifier to distinguish the provided facets from other facets like the\n * `Search X-Module` facets.\n *\n * @public\n */\n groupId: {\n type: String as PropType<GroupId>,\n default: 'provided-facets',\n },\n /**\n * The facets to provide to the `Facets X-Module` state. They have to include the\n * {@link @empathyco/x-types#Filter}.\n *\n * @internal\n */\n facets: {\n type: Array as PropType<Facet[]>,\n required: true,\n },\n },\n setup(props) {\n const $x = use$x()\n\n /**\n * Temporarily stores the selected filters from the {@link FacetsProvider.facets} prop.\n * This is necessary to handle the {@link FacetsXEvents.UserChangedSelectedFilters} event.\n *\n * @internal\n */\n const selectedFilters: Ref<Filter[] | null> = ref(null)\n\n /**\n * A computed property to group the facets and the groupId. This is used by the watcher.\n *\n * @returns The FacetGroup with the facets and the group id.\n *\n * @internal\n */\n const facetsGroup = computed(() => ({ id: props.groupId, facets: props.facets }))\n\n /**\n * Emits the {@link FacetsXEvents.UserChangedSelectedFilters} event when the user changes\n * the selected filters.\n *\n * @param selectedFilters - The new list of selected filters.\n * @internal\n */\n $x.on('SelectedFiltersChanged', false).subscribe((selectedFiltersParams: Filter[]) => {\n if (\n selectedFilters.value === null ||\n areFiltersDifferent(selectedFilters.value, selectedFiltersParams)\n ) {\n $x.emit('UserChangedSelectedFilters', selectedFiltersParams)\n }\n selectedFilters.value = null\n })\n\n /**\n * Extracts the selected filters from the facets and stores them in the\n * {@link FacetsProvider.selectedFilters} property.\n *\n * @param facets - The facets from whom extract the selected filters.\n * @internal\n */\n const extractSelectedFilters = (facets: Facet[]) => {\n selectedFilters.value = facets\n .flatMap(facet =>\n isHierarchicalFacet(facet) ? flatHierarchicalFilters(facet.filters) : facet.filters,\n )\n .filter(filter => filter.selected)\n }\n\n /**\n * Emits the {@link FacetsXEvents.FacetsGroupProvided} event with the\n * {@link FacetsProvider.facetsGroup} as payload. It also extracts and saves the selected\n * filters.\n */\n watch(\n () => facetsGroup.value,\n () => {\n if (facetsGroup.value.facets) {\n const facetsGroupClone = clone(facetsGroup.value)\n $x.emit('FacetsGroupProvided', facetsGroupClone)\n extractSelectedFilters(props.facets)\n }\n },\n { immediate: true },\n )\n\n return () => ''\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-facets-list {\n list-style-type: none;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserChangedSelectedFilters`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user performed an action that changed the selected filters. The\n payload is the new list of selected filters.\n- [`FacetsGroupProvided`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after updating the facets prop with a new list of facets. The payload\n contains a Facets Group with the facets and the group id.\n\n## Example\n\nThis component allows to provide facets by prop, to add them to the state of the `Facets X-Module`.\nThese facets will be added to the `Facets X-Module` state together with the facets emitted by the\n`Search X-Module` through the `SearchXEvents.FacetsChanged` event.\n\n```vue\n<template>\n <FacetsProvider :facets=\"myFacets\" />\n</template>\n\n<script setup>\nimport { FacetsProvider } from '@empathyco/x-components/facets'\nimport { ref } from 'vue'\n\nconst myFacets = ref([\n {\n modelName: 'SimpleFacet',\n id: 'color-facet',\n label: 'Color',\n filters: [\n {\n modelName: 'SimpleFilter',\n id: 'color:red',\n facetId: 'color-facet',\n label: 'Red',\n selected: false,\n value: 'color:red',\n totalResults: 10,\n },\n {\n modelName: 'SimpleFilter',\n id: 'color:blue',\n facetId: 'color-facet',\n label: 'Blue',\n selected: false,\n value: 'color:blue',\n totalResults: 10,\n },\n ],\n },\n])\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;;;;AAYA;;;;;;;AAOE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,aAAa,CAAC,IAAI;AAC3B,IAAA,KAAK,EAAE;AACL;;;;;AAKE;AACF,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,MAA2B;AACjC,YAAA,OAAO,EAAE,iBAAiB;AAC3B,SAAA;AACD;;;;;AAKE;AACF,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,KAA0B;AAChC,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,EAAC,GAAI,KAAK,EAAC;AAEjB;;;;;AAKE;AACF,QAAA,MAAM,eAAe,GAAyB,GAAG,CAAC,IAAI,CAAA;AAEtD;;;;;;AAME;QACF,MAAM,WAAU,GAAI,QAAQ,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,MAAK,EAAG,CAAC,CAAA;AAEhF;;;;;;AAME;AACF,QAAA,EAAE,CAAC,EAAE,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,qBAA+B,KAAG;AAClF,YAAA,IACE,eAAe,CAAC,KAAI,KAAM,IAAG;gBAC7B,mBAAmB,CAAC,eAAe,CAAC,KAAK,EAAE,qBAAqB,CAAA,EAChE;AACA,gBAAA,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,qBAAqB,CAAA;YAC7D;AACA,YAAA,eAAe,CAAC,KAAI,GAAI,IAAG;AAC7B,QAAA,CAAC,CAAA;AAED;;;;;;AAME;AACF,QAAA,MAAM,yBAAyB,CAAC,MAAe,KAAG;YAChD,eAAe,CAAC,KAAI,GAAI;iBACrB,OAAO,CAAC,SACP,mBAAmB,CAAC,KAAK,CAAA,GAAI,uBAAuB,CAAC,KAAK,CAAC,OAAO,CAAA,GAAI,KAAK,CAAC,OAAO;iBAEpF,MAAM,CAAC,MAAK,IAAK,MAAM,CAAC,QAAQ,CAAA;AACrC,QAAA,CAAA;AAEA;;;;AAIE;QACF,KAAK,CACH,MAAM,WAAW,CAAC,KAAK,EACvB,MAAI;AACF,YAAA,IAAI,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE;gBAC5B,MAAM,gBAAe,GAAI,KAAK,CAAC,WAAW,CAAC,KAAK,CAAA;AAChD,gBAAA,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE,gBAAgB,CAAA;AAC/C,gBAAA,sBAAsB,CAAC,KAAK,CAAC,MAAM,CAAA;YACrC;AACF,QAAA,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CACrB;AAEA,QAAA,OAAO,MAAM,EAAC;IAChB,CAAC;AACF,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"facets-provider.vue2.js","sources":["../../../../../../src/x-modules/facets/components/facets/facets-provider.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Facet, Filter } from '@empathyco/x-types'\nimport type { PropType, Ref } from 'vue'\nimport type { GroupId } from '../../store/types'\nimport { isHierarchicalFacet } from '@empathyco/x-types'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport { use$x } from '../../../../composables/use-$x'\nimport { clone } from '../../../../utils'\nimport { areFiltersDifferent } from '../../../../utils/filters'\nimport { flatHierarchicalFilters } from '../../utils'\nimport { facetsXModule } from '../../x-module'\n\n/**\n * This component allows to provide facets by prop, to add them to the state of the\n * `Facets X-Module`. These facets will be added to the `Facets X-Module` state together with\n * the facets emitted by the `Search X-Module` through the {@link SearchXEvents.FacetsChanged}\n * event.\n *\n * @public\n */\nexport default defineComponent({\n name: 'FacetsProvider',\n xModule: facetsXModule.name,\n props: {\n /**\n * An facet group identifier to distinguish the provided facets from other facets like the\n * `Search X-Module` facets.\n *\n * @public\n */\n groupId: {\n type: String as PropType<GroupId>,\n default: 'provided-facets',\n },\n /**\n * The facets to provide to the `Facets X-Module` state. They have to include the\n * {@link @empathyco/x-types#Filter}.\n *\n * @internal\n */\n facets: {\n type: Array as PropType<Facet[]>,\n required: true,\n },\n },\n setup(props) {\n const $x = use$x()\n\n /**\n * Temporarily stores the selected filters from the {@link FacetsProvider.facets} prop.\n * This is necessary to handle the {@link FacetsXEvents.UserChangedSelectedFilters} event.\n *\n * @internal\n */\n const selectedFilters: Ref<Filter[] | null> = ref(null)\n\n /**\n * A computed property to group the facets and the groupId. This is used by the watcher.\n *\n * @returns The FacetGroup with the facets and the group id.\n *\n * @internal\n */\n const facetsGroup = computed(() => ({ id: props.groupId, facets: props.facets }))\n\n /**\n * Emits the {@link FacetsXEvents.UserChangedSelectedFilters} event when the user changes\n * the selected filters.\n *\n * @param selectedFilters - The new list of selected filters.\n * @internal\n */\n $x.on('SelectedFiltersChanged', false).subscribe((selectedFiltersParams: Filter[]) => {\n if (\n selectedFilters.value === null ||\n areFiltersDifferent(selectedFilters.value, selectedFiltersParams)\n ) {\n $x.emit('UserChangedSelectedFilters', selectedFiltersParams)\n }\n selectedFilters.value = null\n })\n\n /**\n * Extracts the selected filters from the facets and stores them in the\n * {@link FacetsProvider.selectedFilters} property.\n *\n * @param facets - The facets from whom extract the selected filters.\n * @internal\n */\n const extractSelectedFilters = (facets: Facet[]) => {\n selectedFilters.value = facets\n .flatMap(facet =>\n isHierarchicalFacet(facet) ? flatHierarchicalFilters(facet.filters) : facet.filters,\n )\n .filter(filter => filter.selected)\n }\n\n /**\n * Emits the {@link FacetsXEvents.FacetsGroupProvided} event with the\n * {@link FacetsProvider.facetsGroup} as payload. It also extracts and saves the selected\n * filters.\n */\n watch(\n () => facetsGroup.value,\n () => {\n if (facetsGroup.value.facets) {\n const facetsGroupClone = clone(facetsGroup.value)\n $x.emit('FacetsGroupProvided', facetsGroupClone)\n extractSelectedFilters(props.facets)\n }\n },\n { immediate: true },\n )\n\n return () => ''\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-facets-list {\n list-style-type: none;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserChangedSelectedFilters`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user performed an action that changed the selected filters. The\n payload is the new list of selected filters.\n- [`FacetsGroupProvided`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after updating the facets prop with a new list of facets. The payload\n contains a Facets Group with the facets and the group id.\n\n## Example\n\nThis component allows to provide facets by prop, to add them to the state of the `Facets X-Module`.\nThese facets will be added to the `Facets X-Module` state together with the facets emitted by the\n`Search X-Module` through the `SearchXEvents.FacetsChanged` event.\n\n```vue\n<template>\n <FacetsProvider :facets=\"myFacets\" />\n</template>\n\n<script setup>\nimport { FacetsProvider } from '@empathyco/x-components/facets'\nimport { ref } from 'vue'\n\nconst myFacets = ref([\n {\n modelName: 'SimpleFacet',\n id: 'color-facet',\n label: 'Color',\n filters: [\n {\n modelName: 'SimpleFilter',\n id: 'color:red',\n facetId: 'color-facet',\n label: 'Red',\n selected: false,\n value: 'color:red',\n totalResults: 10,\n },\n {\n modelName: 'SimpleFilter',\n id: 'color:blue',\n facetId: 'color-facet',\n label: 'Blue',\n selected: false,\n value: 'color:blue',\n totalResults: 10,\n },\n ],\n },\n])\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;;;;AAYA;;;;;;;AAOE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,aAAa,CAAC,IAAI;AAC3B,IAAA,KAAK,EAAE;AACL;;;;;AAKE;AACF,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,MAA2B;AACjC,YAAA,OAAO,EAAE,iBAAiB;AAC3B,SAAA;AACD;;;;;AAKE;AACF,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,KAA0B;AAChC,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,EAAC,GAAI,KAAK,EAAC;AAEjB;;;;;AAKE;AACF,QAAA,MAAM,eAAe,GAAyB,GAAG,CAAC,IAAI,CAAA;AAEtD;;;;;;AAME;QACF,MAAM,WAAU,GAAI,QAAQ,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,MAAK,EAAG,CAAC,CAAA;AAEhF;;;;;;AAME;AACF,QAAA,EAAE,CAAC,EAAE,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,qBAA+B,KAAG;AAClF,YAAA,IACE,eAAe,CAAC,KAAI,KAAM,IAAG;gBAC7B,mBAAmB,CAAC,eAAe,CAAC,KAAK,EAAE,qBAAqB,CAAA,EAChE;AACA,gBAAA,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,qBAAqB,CAAA;YAC7D;AACA,YAAA,eAAe,CAAC,KAAI,GAAI,IAAG;AAC7B,QAAA,CAAC,CAAA;AAED;;;;;;AAME;AACF,QAAA,MAAM,yBAAyB,CAAC,MAAe,KAAG;YAChD,eAAe,CAAC,KAAI,GAAI;iBACrB,OAAO,CAAC,SACP,mBAAmB,CAAC,KAAK,CAAA,GAAI,uBAAuB,CAAC,KAAK,CAAC,OAAO,CAAA,GAAI,KAAK,CAAC,OAAO;iBAEpF,MAAM,CAAC,MAAK,IAAK,MAAM,CAAC,QAAQ,CAAA;AACrC,QAAA,CAAA;AAEA;;;;AAIE;QACF,KAAK,CACH,MAAM,WAAW,CAAC,KAAK,EACvB,MAAI;AACF,YAAA,IAAI,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE;gBAC5B,MAAM,gBAAe,GAAI,KAAK,CAAC,WAAW,CAAC,KAAK,CAAA;AAChD,gBAAA,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE,gBAAgB,CAAA;AAC/C,gBAAA,sBAAsB,CAAC,KAAK,CAAC,MAAM,CAAA;YACrC;AACF,QAAA,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CACrB;AAEA,QAAA,OAAO,MAAM,EAAC;IAChB,CAAC;AACF,CAAA,CAAA;;;;"}
@@ -4,4 +4,4 @@ var css = ".x-facets-list[data-v-67bd3b28]{list-style-type:none}";
4
4
  injectCss(css);
5
5
 
6
6
  export { css };
7
- //# sourceMappingURL=facets-provider3.vue.js.map
7
+ //# sourceMappingURL=facets-provider.vue3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"facets-provider.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,6 +1,6 @@
1
- import _sfc_main from './facets2.vue.js';
1
+ import _sfc_main from './facets.vue2.js';
2
2
  import { openBlock, createBlock, resolveDynamicComponent, withCtx, createElementBlock, Fragment, renderList, renderSlot, mergeProps, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
3
- import './facets3.vue.js';
3
+ import './facets.vue3.js';
4
4
  import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.js';
5
5
 
6
6
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -132,4 +132,4 @@ var _sfc_main = defineComponent({
132
132
  });
133
133
 
134
134
  export { _sfc_main as default };
135
- //# sourceMappingURL=facets2.vue.js.map
135
+ //# sourceMappingURL=facets.vue2.js.map