@empathyco/x-components 3.0.0-alpha.29 → 3.0.0-alpha.32

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 (856) hide show
  1. package/CHANGELOG.md +140 -0
  2. package/core/index.js +9 -8
  3. package/core/index.js.map +1 -1
  4. package/design-system/default-theme.css +6 -1
  5. package/design-system/full-theme.css +6 -1
  6. package/design-system/list-default.css +3 -0
  7. package/design-system/suggestion-default.css +3 -1
  8. package/docs/API-reference/api/x-adapter.empathybannermapper._constructor_.md +2 -2
  9. package/docs/API-reference/api/x-adapter.empathypromotedmapper._constructor_.md +2 -2
  10. package/docs/API-reference/api/x-adapter.empathyredirectionmapper._constructor_.md +2 -2
  11. package/docs/API-reference/api/x-adapter.empathyresultmapper._constructor_.md +2 -2
  12. package/docs/API-reference/api/x-adapter.empathytaggingmapper.map.md +3 -3
  13. package/docs/API-reference/api/x-adapter.empathytaggingmapper.md +2 -2
  14. package/docs/API-reference/api/x-adapter.searchresponse.md +1 -1
  15. package/docs/API-reference/api/x-adapter.searchresponse.querytagging.md +1 -1
  16. package/docs/API-reference/api/x-adapter.trackableshowresponse.md +1 -1
  17. package/docs/API-reference/api/x-adapter.trackableshowresponse.showtagging.md +1 -1
  18. package/docs/API-reference/api/x-components.baseresultlink.md +0 -11
  19. package/docs/API-reference/api/x-components.basescroll.md +0 -12
  20. package/docs/API-reference/api/x-components.basesuggestion.emitevents.md +17 -0
  21. package/docs/API-reference/api/x-components.basesuggestion.feature.md +13 -0
  22. package/docs/API-reference/api/x-components.basesuggestion.md +8 -1
  23. package/docs/API-reference/api/x-components.clearpendingscrolltowire.md +13 -0
  24. package/docs/API-reference/api/x-components.defaultsessionservice._constructor_.md +21 -0
  25. package/docs/API-reference/api/x-components.defaultsessionservice.clearsessionid.md +17 -0
  26. package/docs/API-reference/api/x-components.defaultsessionservice.getsessionid.md +19 -0
  27. package/docs/API-reference/api/x-components.defaultsessionservice.instance.md +13 -0
  28. package/docs/API-reference/api/x-components.defaultsessionservice.md +37 -0
  29. package/docs/API-reference/api/x-components.defaultsessionservice.session_id_key.md +13 -0
  30. package/docs/API-reference/api/x-components.defaultsessionservice.storageservice.md +11 -0
  31. package/docs/API-reference/api/x-components.defaultsessionservice.ttlms.md +11 -0
  32. package/docs/API-reference/api/x-components.featurelocation.md +22 -0
  33. package/docs/API-reference/api/{x-components.basemainscroll.mounted.md → x-components.globalxbus.created.md} +3 -3
  34. package/docs/API-reference/api/x-components.globalxbus.md +21 -0
  35. package/docs/API-reference/api/x-components.identifierresults.md +1 -0
  36. package/docs/API-reference/api/x-components.identifierresults.resultclickextraevents.md +13 -0
  37. package/docs/API-reference/api/x-components.identifierresultsactions.md +1 -1
  38. package/docs/API-reference/api/x-components.identifierresultsactions.saveorigin.md +24 -0
  39. package/docs/API-reference/api/x-components.identifierresultsmutations.md +2 -0
  40. package/docs/API-reference/api/x-components.identifierresultsmutations.setorigin.md +24 -0
  41. package/docs/API-reference/api/x-components.identifierresultsmutations.setparams.md +24 -0
  42. package/docs/API-reference/api/x-components.identifierresultsstate.md +2 -0
  43. package/docs/API-reference/api/x-components.identifierresultsstate.origin.md +13 -0
  44. package/docs/API-reference/api/x-components.identifierresultsstate.params.md +13 -0
  45. package/docs/API-reference/api/x-components.locationprovider.location.md +13 -0
  46. package/docs/API-reference/api/x-components.locationprovider.md +21 -0
  47. package/docs/API-reference/api/x-components.mainscroll.margin.md +13 -0
  48. package/docs/API-reference/api/x-components.mainscroll.md +33 -0
  49. package/docs/API-reference/api/x-components.mainscroll.mounted.md +17 -0
  50. package/docs/API-reference/api/x-components.mainscroll.restorescrolltimeoutms.md +13 -0
  51. package/docs/API-reference/api/x-components.mainscroll.threshold.md +13 -0
  52. package/docs/API-reference/api/x-components.mainscroll.usewindow.md +13 -0
  53. package/docs/API-reference/api/x-components.mainscroll.visibleelementsobserver.md +13 -0
  54. package/docs/API-reference/api/x-components.mainscrollitem._el.md +13 -0
  55. package/docs/API-reference/api/x-components.mainscrollitem.item.md +13 -0
  56. package/docs/API-reference/api/x-components.mainscrollitem.md +29 -0
  57. package/docs/API-reference/api/x-components.mainscrollitem.observeitem.md +25 -0
  58. package/docs/API-reference/api/x-components.mainscrollitem.tag.md +13 -0
  59. package/docs/API-reference/api/x-components.md +47 -6
  60. package/docs/API-reference/api/{x-components.partialquerybutton.events.md → x-components.partialquerybutton.emitevents.md} +8 -4
  61. package/docs/API-reference/api/x-components.partialquerybutton.md +6 -1
  62. package/docs/API-reference/api/x-components.queryfeature.md +13 -0
  63. package/docs/API-reference/api/x-components.queryorigin.md +4 -2
  64. package/docs/API-reference/api/x-components.queryorigininit.md +15 -0
  65. package/docs/API-reference/api/x-components.relatedtag.emitevents.md +17 -0
  66. package/docs/API-reference/api/x-components.relatedtag.md +6 -0
  67. package/docs/API-reference/api/x-components.resultfeature.md +13 -0
  68. package/docs/API-reference/api/x-components.resultorigin.md +15 -0
  69. package/docs/API-reference/api/x-components.saveidentifierresultsoriginwire.md +13 -0
  70. package/docs/API-reference/api/x-components.saveorigin.md +13 -0
  71. package/docs/API-reference/api/{x-components.setorigin.md → x-components.saveoriginwire.md} +3 -3
  72. package/docs/API-reference/api/{x-components.baseidscroll.distancetobottom.md → x-components.scroll.distancetobottom.md} +2 -2
  73. package/docs/API-reference/api/{x-components.baseidscroll.id.md → x-components.scroll.id.md} +2 -2
  74. package/docs/API-reference/api/x-components.scroll.md +23 -0
  75. package/docs/API-reference/api/{x-components.baseidscroll.throttlems.md → x-components.scroll.throttlems.md} +2 -2
  76. package/docs/API-reference/api/x-components.scrollactions.md +13 -0
  77. package/docs/API-reference/api/x-components.scrollcomponentstate.direction.md +13 -0
  78. package/docs/API-reference/api/x-components.scrollcomponentstate.hasalmostreachedend.md +13 -0
  79. package/docs/API-reference/api/x-components.scrollcomponentstate.hasreachedend.md +13 -0
  80. package/docs/API-reference/api/x-components.scrollcomponentstate.hasreachedstart.md +13 -0
  81. package/docs/API-reference/api/x-components.scrollcomponentstate.md +24 -0
  82. package/docs/API-reference/api/x-components.scrollcomponentstate.position.md +13 -0
  83. package/docs/API-reference/api/x-components.scrollgetters.md +13 -0
  84. package/docs/API-reference/api/x-components.scrollmixin._el.md +13 -0
  85. package/docs/API-reference/api/x-components.scrollmixin.firstelementthresholdpx.md +13 -0
  86. package/docs/API-reference/api/x-components.scrollmixin.md +3 -0
  87. package/docs/API-reference/api/x-components.scrollmixin.resetonchange.md +13 -0
  88. package/docs/API-reference/api/x-components.scrollmutations.md +21 -0
  89. package/docs/API-reference/api/x-components.scrollmutations.setpendingscrollto.md +24 -0
  90. package/docs/API-reference/api/x-components.scrollmutations.setscrollcomponentstate.md +24 -0
  91. package/docs/API-reference/api/x-components.scrollstate.data.md +13 -0
  92. package/docs/API-reference/api/x-components.scrollstate.md +21 -0
  93. package/docs/API-reference/api/x-components.scrollstate.pendingscrollto.md +13 -0
  94. package/docs/API-reference/api/x-components.scrollstatepayload.md +21 -0
  95. package/docs/API-reference/api/x-components.scrollstatepayload.newstate.md +13 -0
  96. package/docs/API-reference/api/{x-components.basescrolltotop.animation.md → x-components.scrolltotop.animation.md} +2 -2
  97. package/docs/API-reference/api/x-components.scrolltotop.md +23 -0
  98. package/docs/API-reference/api/{x-components.basescrolltotop.scrollid.md → x-components.scrolltotop.scrollid.md} +3 -3
  99. package/docs/API-reference/api/{x-components.basescrolltotop.thresholdpx.md → x-components.scrolltotop.thresholdpx.md} +2 -2
  100. package/docs/API-reference/api/x-components.scrollvisibilityobserver.md +21 -0
  101. package/docs/API-reference/api/x-components.scrollvisibilityobserver.observe.md +24 -0
  102. package/docs/API-reference/api/x-components.scrollvisibilityobserver.unobserve.md +24 -0
  103. package/docs/API-reference/api/x-components.scrollxevents.md +27 -0
  104. package/docs/API-reference/api/x-components.scrollxevents.scrollrestorefailed.md +13 -0
  105. package/docs/API-reference/api/x-components.scrollxevents.scrollrestoresucceeded.md +13 -0
  106. package/docs/API-reference/api/x-components.scrollxevents.useralmostreachedscrollend.md +13 -0
  107. package/docs/API-reference/api/{x-components.xeventstypes.userchangedscrolldirection.md → x-components.scrollxevents.userchangedscrolldirection.md} +2 -2
  108. package/docs/API-reference/api/x-components.scrollxevents.userreachedscrollend.md +13 -0
  109. package/docs/API-reference/api/x-components.scrollxevents.userreachedscrollstart.md +13 -0
  110. package/docs/API-reference/api/{x-components.xeventstypes.userscrolled.md → x-components.scrollxevents.userscrolled.md} +2 -2
  111. package/docs/API-reference/api/x-components.scrollxevents.userscrolledtoelement.md +13 -0
  112. package/docs/API-reference/api/x-components.scrollxmodule.md +13 -0
  113. package/docs/API-reference/api/x-components.scrollxstoremodule.md +15 -0
  114. package/docs/API-reference/api/x-components.searchactions.md +1 -0
  115. package/docs/API-reference/api/x-components.searchactions.saveorigin.md +24 -0
  116. package/docs/API-reference/api/{x-components.searchbutton.events.md → x-components.searchbutton.emitevents.md} +9 -3
  117. package/docs/API-reference/api/x-components.searchbutton.md +6 -1
  118. package/docs/API-reference/api/x-components.searchmutations.md +1 -0
  119. package/docs/API-reference/api/x-components.searchmutations.setorigin.md +2 -2
  120. package/docs/API-reference/api/x-components.searchmutations.setquerytagging.md +24 -0
  121. package/docs/API-reference/api/x-components.searchstate.md +1 -0
  122. package/docs/API-reference/api/x-components.searchstate.querytagging.md +13 -0
  123. package/docs/API-reference/api/x-components.searchxevents.md +1 -0
  124. package/docs/API-reference/api/x-components.searchxevents.searchtaggingchanged.md +13 -0
  125. package/docs/API-reference/api/x-components.sessionservice.clearsessionid.md +17 -0
  126. package/docs/API-reference/api/x-components.sessionservice.getsessionid.md +23 -0
  127. package/docs/API-reference/api/x-components.sessionservice.md +21 -0
  128. package/docs/API-reference/api/x-components.setconsent.md +13 -0
  129. package/docs/API-reference/api/x-components.setidentifierresultsextraparams.md +13 -0
  130. package/docs/API-reference/api/x-components.setpendingscrolltowire.md +13 -0
  131. package/docs/API-reference/api/x-components.setquerytaggingdebounce.md +13 -0
  132. package/docs/API-reference/api/x-components.setscrolldirectionwire.md +13 -0
  133. package/docs/API-reference/api/x-components.setscrollhasalmostreachedendwire.md +13 -0
  134. package/docs/API-reference/api/x-components.setscrollhasreachedendwire.md +13 -0
  135. package/docs/API-reference/api/x-components.setscrollhasreachedstartwire.md +13 -0
  136. package/docs/API-reference/api/x-components.setscrollpositionwire.md +13 -0
  137. package/docs/API-reference/api/x-components.setsessionduration.md +13 -0
  138. package/docs/API-reference/api/x-components.seturlscroll.md +13 -0
  139. package/docs/API-reference/api/x-components.snippetcallbacks.md +15 -0
  140. package/docs/API-reference/api/x-components.snippetconfig.callbacks.md +13 -0
  141. package/docs/API-reference/api/x-components.snippetconfig.md +1 -0
  142. package/docs/API-reference/api/{x-components.spellcheckbutton.events.md → x-components.spellcheckbutton.emitevents.md} +8 -4
  143. package/docs/API-reference/api/x-components.spellcheckbutton.md +6 -1
  144. package/docs/API-reference/api/x-components.tagging.activeconsent.md +18 -0
  145. package/docs/API-reference/api/x-components.tagging.consent.md +13 -0
  146. package/docs/API-reference/api/x-components.tagging.md +28 -0
  147. package/docs/API-reference/api/{x-components.basemainscroll.render.md → x-components.tagging.render.md} +2 -2
  148. package/docs/API-reference/api/x-components.taggingactions.md +7 -0
  149. package/docs/API-reference/api/x-components.taggingactions.track.md +24 -0
  150. package/docs/API-reference/api/x-components.taggingconfig.md +8 -0
  151. package/docs/API-reference/api/x-components.taggingconfig.querytaggingdebouncems.md +13 -0
  152. package/docs/API-reference/api/x-components.taggingconfig.sessionttlms.md +13 -0
  153. package/docs/API-reference/api/x-components.taggingmutations.md +9 -0
  154. package/docs/API-reference/api/x-components.taggingmutations.setconsent.md +24 -0
  155. package/docs/API-reference/api/x-components.taggingmutations.setquerytaggingdebounce.md +24 -0
  156. package/docs/API-reference/api/x-components.taggingmutations.setsessionduration.md +24 -0
  157. package/docs/API-reference/api/x-components.taggingstate.config.md +13 -0
  158. package/docs/API-reference/api/x-components.taggingstate.consent.md +13 -0
  159. package/docs/API-reference/api/x-components.taggingstate.md +8 -0
  160. package/docs/API-reference/api/x-components.taggingxevents.consentchanged.md +13 -0
  161. package/docs/API-reference/api/x-components.taggingxevents.consentprovided.md +13 -0
  162. package/docs/API-reference/api/x-components.taggingxevents.md +10 -0
  163. package/docs/API-reference/api/x-components.taggingxevents.querytaggingdebounceprovided.md +13 -0
  164. package/docs/API-reference/api/x-components.taggingxevents.sessiondurationprovided.md +13 -0
  165. package/docs/API-reference/api/x-components.track.md +13 -0
  166. package/docs/API-reference/api/x-components.trackwire.md +13 -0
  167. package/docs/API-reference/api/x-components.urlmutations.md +1 -0
  168. package/docs/API-reference/api/x-components.urlmutations.setscroll.md +24 -0
  169. package/docs/API-reference/api/x-components.urlparams.md +1 -1
  170. package/docs/API-reference/api/x-components.urlparams.scroll.md +1 -1
  171. package/docs/API-reference/api/{x-components.basemainscroll.beforedestroy.md → x-components.windowscroll.beforedestroy.md} +4 -2
  172. package/docs/API-reference/api/{x-components.basemainscroll.id.md → x-components.windowscroll.id.md} +2 -2
  173. package/docs/API-reference/api/x-components.windowscroll.md +30 -0
  174. package/docs/API-reference/api/{x-components.basescroll.mounted.md → x-components.windowscroll.mounted.md} +2 -2
  175. package/docs/API-reference/api/{x-components.baseresultlink.mounted.md → x-components.windowscroll.render.md} +3 -3
  176. package/docs/API-reference/api/x-components.windowscroll.scrollableelement.md +13 -0
  177. package/docs/API-reference/api/x-components.wiremetadata.feature.md +13 -0
  178. package/docs/API-reference/api/x-components.wiremetadata.location.md +13 -0
  179. package/docs/API-reference/api/x-components.wiremetadata.md +2 -1
  180. package/docs/API-reference/api/x-components.xcomponentbusapi.emit_1.md +2 -2
  181. package/docs/API-reference/api/x-components.xeventlisteners.md +17 -0
  182. package/docs/API-reference/api/x-components.xeventstypes.md +4 -8
  183. package/docs/API-reference/api/x-components.xeventstypes.snippetcallbackexecuted.md +16 -0
  184. package/docs/API-reference/api/x-components.xmodulestree.md +1 -0
  185. package/docs/API-reference/api/x-components.xmodulestree.scroll.md +11 -0
  186. package/docs/API-reference/api/x-types.banner.md +2 -3
  187. package/docs/API-reference/api/x-types.identifiable.id.md +1 -1
  188. package/docs/API-reference/api/x-types.identifiable.md +2 -2
  189. package/docs/API-reference/api/x-types.md +5 -2
  190. package/docs/API-reference/api/x-types.promoted.md +2 -3
  191. package/docs/API-reference/api/x-types.redirection.md +2 -3
  192. package/docs/API-reference/api/x-types.result.md +2 -3
  193. package/docs/API-reference/api/x-types.taggable.md +20 -0
  194. package/docs/API-reference/api/x-types.taggable.tagging.md +13 -0
  195. package/docs/API-reference/api/{x-types.banner.tagging.md → x-types.taggableschema.md} +4 -6
  196. package/docs/API-reference/api/x-types.tagging.add2cart.md +13 -0
  197. package/docs/API-reference/api/x-types.tagging.checkout.md +13 -0
  198. package/docs/API-reference/api/{x-types.promoted.tagging.md → x-types.tagging.click.md} +4 -6
  199. package/docs/API-reference/api/x-types.tagging.md +6 -3
  200. package/docs/API-reference/api/x-types.tagging.query.md +13 -0
  201. package/docs/API-reference/api/x-types.tagging.wishlist.md +13 -0
  202. package/docs/API-reference/api/x-types.tagginginfo.md +21 -0
  203. package/docs/API-reference/api/{x-types.tagging.params.md → x-types.tagginginfo.params.md} +3 -3
  204. package/docs/API-reference/api/{x-types.tagging.url.md → x-types.tagginginfo.url.md} +2 -2
  205. package/docs/API-reference/api/x-types.tagginginfoschema.md +13 -0
  206. package/docs/API-reference/components/common/result/x-components.base-result-link.md +2 -3
  207. package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +9 -9
  208. package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +9 -8
  209. package/docs/API-reference/components/common/x-components.global-x-bus.md +51 -0
  210. package/docs/API-reference/components/common/x-components.location-provider.md +54 -0
  211. package/docs/API-reference/components/common/x-components.snippet-callbacks.md +37 -0
  212. package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +10 -6
  213. package/docs/API-reference/components/scroll/x-components.main-scroll-item.md +84 -0
  214. package/docs/API-reference/components/scroll/x-components.main-scroll.md +175 -0
  215. package/docs/API-reference/components/{common/scroll/x-components.base-scroll-to-top.md → scroll/x-components.scroll-to-top.md} +11 -14
  216. package/docs/API-reference/components/scroll/x-components.scroll.md +168 -0
  217. package/docs/API-reference/components/scroll/x-components.window-scroll.md +158 -0
  218. package/docs/API-reference/components/tagging/x-components.tagging.md +88 -0
  219. package/docs/build-search-ui/README.md +113 -0
  220. package/docs/build-search-ui/web-archetype-integration-guide.md +183 -0
  221. package/docs/build-search-ui/web-use-x-components-guide.md +170 -0
  222. package/docs/build-search-ui/web-x-components-integration-guide.md +197 -0
  223. package/docs/build-search-ui/x-architecture/README.md +133 -0
  224. package/docs/sidebar.json +1 -1
  225. package/identifier-results/index.js +2 -1
  226. package/js/components/animations/animate-width.vue.js +1 -1
  227. package/js/components/animations/collapse-from-top.vue.js +1 -1
  228. package/js/components/animations/collapse-height.vue.js +3 -3
  229. package/js/components/animations/collapse-width.vue.js +3 -3
  230. package/js/components/animations/cross-fade.vue.js +1 -1
  231. package/js/components/animations/fade-and-slide.vue.js +2 -2
  232. package/js/components/animations/staggered-fade-and-slide.vue.js +2 -2
  233. package/js/components/animations/translate-from-left.vue.js +1 -1
  234. package/js/components/animations/translate-from-right.vue.js +1 -1
  235. package/js/components/auto-progress-bar.vue.js +4 -5
  236. package/js/components/auto-progress-bar.vue.js.map +1 -1
  237. package/js/components/base-dropdown.vue.js +33 -45
  238. package/js/components/base-dropdown.vue.js.map +1 -1
  239. package/js/components/base-event-button.vue.js +1 -1
  240. package/js/components/base-grid.vue.js +7 -9
  241. package/js/components/base-grid.vue.js.map +1 -1
  242. package/js/components/base-keyboard-navigation.vue.js +7 -10
  243. package/js/components/base-keyboard-navigation.vue.js.map +1 -1
  244. package/js/components/base-rating.vue.js +19 -20
  245. package/js/components/base-rating.vue.js.map +1 -1
  246. package/js/components/base-variable-column-grid.vue.js +6 -7
  247. package/js/components/base-variable-column-grid.vue.js.map +1 -1
  248. package/js/components/column-picker/base-column-picker-dropdown.vue.js +11 -14
  249. package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
  250. package/js/components/column-picker/base-column-picker-list.vue.js +9 -11
  251. package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
  252. package/js/components/currency/base-currency.vue.js +2 -3
  253. package/js/components/currency/base-currency.vue.js.map +1 -1
  254. package/js/components/filters/labels/base-rating-filter-label.vue.js +7 -8
  255. package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
  256. package/js/components/{scroll/base-main-scroll.vue.js → global-x-bus.vue.js} +2 -2
  257. package/js/components/global-x-bus.vue.js.map +1 -0
  258. package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js +46 -0
  259. package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js.map +1 -0
  260. package/js/components/icons/arrow.vue.js +4 -6
  261. package/js/components/icons/arrow.vue.js.map +1 -1
  262. package/js/components/icons/bag.vue.js +8 -12
  263. package/js/components/icons/bag.vue.js.map +1 -1
  264. package/js/components/icons/bar-code.vue.js +6 -9
  265. package/js/components/icons/bar-code.vue.js.map +1 -1
  266. package/js/components/icons/barcode-tiny.vue.js +6 -9
  267. package/js/components/icons/barcode-tiny.vue.js.map +1 -1
  268. package/js/components/icons/cart.vue.js +10 -13
  269. package/js/components/icons/cart.vue.js.map +1 -1
  270. package/js/components/icons/check-tiny.vue.js +4 -6
  271. package/js/components/icons/check-tiny.vue.js.map +1 -1
  272. package/js/components/icons/check.vue.js +4 -6
  273. package/js/components/icons/check.vue.js.map +1 -1
  274. package/js/components/icons/checkbox-card-selected.vue.js +5 -7
  275. package/js/components/icons/checkbox-card-selected.vue.js.map +1 -1
  276. package/js/components/icons/checkbox-card-unselected.vue.js +5 -7
  277. package/js/components/icons/checkbox-card-unselected.vue.js.map +1 -1
  278. package/js/components/icons/checkbox-selected.vue.js +5 -7
  279. package/js/components/icons/checkbox-selected.vue.js.map +1 -1
  280. package/js/components/icons/checkbox-unselected.vue.js +6 -6
  281. package/js/components/icons/chevron-down.vue.js +6 -8
  282. package/js/components/icons/chevron-down.vue.js.map +1 -1
  283. package/js/components/icons/chevron-left.vue.js +6 -8
  284. package/js/components/icons/chevron-left.vue.js.map +1 -1
  285. package/js/components/icons/chevron-right.vue.js +4 -6
  286. package/js/components/icons/chevron-right.vue.js.map +1 -1
  287. package/js/components/icons/chevron-tiny-down.vue.js +6 -8
  288. package/js/components/icons/chevron-tiny-down.vue.js.map +1 -1
  289. package/js/components/icons/chevron-tiny-left.vue.js +6 -8
  290. package/js/components/icons/chevron-tiny-left.vue.js.map +1 -1
  291. package/js/components/icons/chevron-tiny-right.vue.js +6 -8
  292. package/js/components/icons/chevron-tiny-right.vue.js.map +1 -1
  293. package/js/components/icons/chevron-tiny-up.vue.js +6 -8
  294. package/js/components/icons/chevron-tiny-up.vue.js.map +1 -1
  295. package/js/components/icons/chevron-up.vue.js +6 -8
  296. package/js/components/icons/chevron-up.vue.js.map +1 -1
  297. package/js/components/icons/cross-tiny.vue.js +4 -6
  298. package/js/components/icons/cross-tiny.vue.js.map +1 -1
  299. package/js/components/icons/cross.vue.js +4 -6
  300. package/js/components/icons/cross.vue.js.map +1 -1
  301. package/js/components/icons/filters.vue.js +10 -15
  302. package/js/components/icons/filters.vue.js.map +1 -1
  303. package/js/components/icons/grid-1-col.vue.js +6 -9
  304. package/js/components/icons/grid-1-col.vue.js.map +1 -1
  305. package/js/components/icons/grid-2-col.vue.js +8 -10
  306. package/js/components/icons/grid-2-col.vue.js.map +1 -1
  307. package/js/components/icons/hide.vue.js +10 -15
  308. package/js/components/icons/hide.vue.js.map +1 -1
  309. package/js/components/icons/history-tiny.vue.js +9 -12
  310. package/js/components/icons/history-tiny.vue.js.map +1 -1
  311. package/js/components/icons/history.vue.js +9 -12
  312. package/js/components/icons/history.vue.js.map +1 -1
  313. package/js/components/icons/menu.vue.js +6 -8
  314. package/js/components/icons/menu.vue.js.map +1 -1
  315. package/js/components/icons/minus-tiny.vue.js +4 -6
  316. package/js/components/icons/minus-tiny.vue.js.map +1 -1
  317. package/js/components/icons/minus.vue.js +4 -6
  318. package/js/components/icons/minus.vue.js.map +1 -1
  319. package/js/components/icons/nq-1.vue.js +4 -6
  320. package/js/components/icons/nq-1.vue.js.map +1 -1
  321. package/js/components/icons/nq-2.vue.js +4 -6
  322. package/js/components/icons/nq-2.vue.js.map +1 -1
  323. package/js/components/icons/nq-3.vue.js +6 -8
  324. package/js/components/icons/nq-3.vue.js.map +1 -1
  325. package/js/components/icons/nq-4.vue.js +9 -12
  326. package/js/components/icons/nq-4.vue.js.map +1 -1
  327. package/js/components/icons/plus.vue.js +4 -6
  328. package/js/components/icons/plus.vue.js.map +1 -1
  329. package/js/components/icons/search-tiny.vue.js +6 -9
  330. package/js/components/icons/search-tiny.vue.js.map +1 -1
  331. package/js/components/icons/search.vue.js +6 -8
  332. package/js/components/icons/search.vue.js.map +1 -1
  333. package/js/components/icons/show.vue.js +7 -10
  334. package/js/components/icons/show.vue.js.map +1 -1
  335. package/js/components/icons/star.vue.js +6 -9
  336. package/js/components/icons/star.vue.js.map +1 -1
  337. package/js/components/icons/trash-open.vue.js +12 -15
  338. package/js/components/icons/trash-open.vue.js.map +1 -1
  339. package/js/components/icons/trash.vue.js +8 -11
  340. package/js/components/icons/trash.vue.js.map +1 -1
  341. package/js/components/icons/trending-tiny.vue.js +8 -10
  342. package/js/components/icons/trending-tiny.vue.js.map +1 -1
  343. package/js/components/icons/trending.vue.js +8 -10
  344. package/js/components/icons/trending.vue.js.map +1 -1
  345. package/js/components/icons/user.vue.js +6 -9
  346. package/js/components/icons/user.vue.js.map +1 -1
  347. package/js/components/items-list.vue.js +6 -7
  348. package/js/components/items-list.vue.js.map +1 -1
  349. package/js/components/layouts/multi-column-max-width-layout.vue.js +82 -109
  350. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  351. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue=script.js +3 -2
  352. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue=script.js.map +1 -1
  353. package/js/components/layouts/single-column-layout.vue.js +51 -73
  354. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  355. package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js +3 -2
  356. package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js.map +1 -1
  357. package/js/components/location-provider.vue.js +39 -0
  358. package/js/components/location-provider.vue.js.map +1 -0
  359. package/js/components/location-provider.vue_rollup-plugin-vue=script.js +27 -0
  360. package/js/components/location-provider.vue_rollup-plugin-vue=script.js.map +1 -0
  361. package/js/components/modals/base-events-modal-close.vue.js +2 -2
  362. package/js/components/modals/base-events-modal-open.vue.js +2 -2
  363. package/js/components/modals/base-events-modal.vue.js +3 -3
  364. package/js/components/modals/base-id-modal-close.vue.js +2 -2
  365. package/js/components/modals/base-id-modal-open.vue.js +2 -2
  366. package/js/components/modals/base-id-modal.vue.js +3 -3
  367. package/js/components/modals/base-modal.vue.js +9 -11
  368. package/js/components/modals/base-modal.vue.js.map +1 -1
  369. package/js/components/panels/base-header-toggle-panel.vue.js +5 -7
  370. package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
  371. package/js/components/panels/base-id-toggle-panel-button.vue.js +2 -2
  372. package/js/components/panels/base-id-toggle-panel.vue.js +1 -1
  373. package/js/components/panels/base-toggle-panel.vue.js +3 -4
  374. package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
  375. package/js/components/result/base-result-add-to-cart.vue.js +2 -2
  376. package/js/components/result/base-result-current-price.vue.js +6 -8
  377. package/js/components/result/base-result-current-price.vue.js.map +1 -1
  378. package/js/components/result/base-result-fallback-image.vue.js +7 -9
  379. package/js/components/result/base-result-fallback-image.vue.js.map +1 -1
  380. package/js/components/result/base-result-image.vue.js +9 -12
  381. package/js/components/result/base-result-image.vue.js.map +1 -1
  382. package/js/components/result/base-result-link.vue.js +7 -7
  383. package/js/components/result/base-result-link.vue.js.map +1 -1
  384. package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js +5 -14
  385. package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js.map +1 -1
  386. package/js/components/result/base-result-placeholder-image.vue.js +7 -9
  387. package/js/components/result/base-result-placeholder-image.vue.js.map +1 -1
  388. package/js/components/result/base-result-previous-price.vue.js +7 -9
  389. package/js/components/result/base-result-previous-price.vue.js.map +1 -1
  390. package/js/components/scroll/base-scroll.vue.js +4 -4
  391. package/js/components/scroll/base-scroll.vue.js.map +1 -1
  392. package/js/components/scroll/base-scroll.vue_rollup-plugin-vue=script.js +2 -49
  393. package/js/components/scroll/base-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
  394. package/js/components/scroll/scroll.mixin.js +122 -52
  395. package/js/components/scroll/scroll.mixin.js.map +1 -1
  396. package/js/components/sliding-panel.vue.js +11 -14
  397. package/js/components/sliding-panel.vue.js.map +1 -1
  398. package/js/components/snippet-callbacks.vue.js +47 -0
  399. package/js/components/snippet-callbacks.vue.js.map +1 -0
  400. package/js/components/snippet-callbacks.vue_rollup-plugin-vue=script.js +58 -0
  401. package/js/components/snippet-callbacks.vue_rollup-plugin-vue=script.js.map +1 -0
  402. package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js +1 -0
  403. package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js.map +1 -1
  404. package/js/components/suggestions/base-suggestion.vue.js +7 -9
  405. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  406. package/js/components/suggestions/base-suggestion.vue_rollup-plugin-vue=script.js +21 -6
  407. package/js/components/suggestions/base-suggestion.vue_rollup-plugin-vue=script.js.map +1 -1
  408. package/js/components/suggestions/base-suggestions.vue.js +6 -7
  409. package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
  410. package/js/components/x-component.utils.js +2 -2
  411. package/js/components/x-component.utils.js.map +1 -1
  412. package/js/index.js +27 -12
  413. package/js/index.js.map +1 -1
  414. package/js/plugins/x-plugin.js +1 -0
  415. package/js/plugins/x-plugin.js.map +1 -1
  416. package/js/plugins/x-plugin.mixin.js +16 -6
  417. package/js/plugins/x-plugin.mixin.js.map +1 -1
  418. package/js/store/x.module.js +7 -6
  419. package/js/store/x.module.js.map +1 -1
  420. package/js/utils/origin.js +20 -0
  421. package/js/utils/origin.js.map +1 -0
  422. package/js/utils/storage.js +2 -2
  423. package/js/utils/storage.js.map +1 -1
  424. package/js/x-modules/device/components/device-detector.vue.js +2 -2
  425. package/js/x-modules/empathize/components/empathize.vue.js +5 -6
  426. package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
  427. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +6 -6
  428. package/js/x-modules/extra-params/components/renderless-extra-param.vue.js +3 -4
  429. package/js/x-modules/extra-params/components/renderless-extra-param.vue.js.map +1 -1
  430. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +6 -6
  431. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue.js +1 -1
  432. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +7 -6
  433. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  434. package/js/x-modules/facets/components/clear-filters.vue.js +6 -8
  435. package/js/x-modules/facets/components/clear-filters.vue.js.map +1 -1
  436. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +6 -6
  437. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +6 -6
  438. package/js/x-modules/facets/components/facets/facets.vue.js +10 -11
  439. package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
  440. package/js/x-modules/facets/components/filters/all-filter.vue.js +5 -6
  441. package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
  442. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +6 -6
  443. package/js/x-modules/facets/components/filters/base-filter.vue.js +5 -6
  444. package/js/x-modules/facets/components/filters/base-filter.vue.js.map +1 -1
  445. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +6 -6
  446. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +19 -23
  447. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
  448. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +29 -38
  449. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
  450. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +6 -6
  451. package/js/x-modules/facets/components/filters/number-range-filter.vue.js +5 -6
  452. package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
  453. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +6 -6
  454. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +6 -6
  455. package/js/x-modules/facets/components/filters/simple-filter.vue.js +13 -17
  456. package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
  457. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +6 -6
  458. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +6 -6
  459. package/js/x-modules/facets/components/lists/filters-list.vue.js +4 -4
  460. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +6 -6
  461. package/js/x-modules/facets/components/lists/filters-search.vue.js +8 -10
  462. package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
  463. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +6 -6
  464. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +14 -20
  465. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
  466. package/js/x-modules/facets/components/lists/selected-filters.vue.js +3 -4
  467. package/js/x-modules/facets/components/lists/selected-filters.vue.js.map +1 -1
  468. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +6 -6
  469. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +12 -18
  470. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  471. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +6 -6
  472. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +7 -6
  473. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  474. package/js/x-modules/facets/service/facets.service.js +1 -0
  475. package/js/x-modules/facets/service/facets.service.js.map +1 -1
  476. package/js/x-modules/history-queries/components/clear-history-queries.vue.js +5 -6
  477. package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
  478. package/js/x-modules/history-queries/components/history-queries.vue.js +19 -25
  479. package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
  480. package/js/x-modules/history-queries/components/history-query.vue.js +14 -18
  481. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  482. package/js/x-modules/history-queries/components/history-query.vue_rollup-plugin-vue=script.js.map +1 -1
  483. package/js/x-modules/history-queries/components/remove-history-query.vue.js +2 -2
  484. package/js/x-modules/identifier-results/components/identifier-result.vue.js +2 -2
  485. package/js/x-modules/identifier-results/components/identifier-results.vue.js +4 -4
  486. package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
  487. package/js/x-modules/identifier-results/components/identifier-results.vue_rollup-plugin-vue=script.js +14 -2
  488. package/js/x-modules/identifier-results/components/identifier-results.vue_rollup-plugin-vue=script.js.map +1 -1
  489. package/js/x-modules/identifier-results/store/actions/save-origin.action.js +18 -0
  490. package/js/x-modules/identifier-results/store/actions/save-origin.action.js.map +1 -0
  491. package/js/x-modules/identifier-results/store/actions/save-query.action.js +4 -0
  492. package/js/x-modules/identifier-results/store/actions/save-query.action.js.map +1 -1
  493. package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js +5 -8
  494. package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js.map +1 -1
  495. package/js/x-modules/identifier-results/store/module.js +16 -7
  496. package/js/x-modules/identifier-results/store/module.js.map +1 -1
  497. package/js/x-modules/identifier-results/wiring.js +25 -3
  498. package/js/x-modules/identifier-results/wiring.js.map +1 -1
  499. package/js/x-modules/next-queries/components/next-queries-list.vue.js +9 -12
  500. package/js/x-modules/next-queries/components/next-queries-list.vue.js.map +1 -1
  501. package/js/x-modules/next-queries/components/next-queries-list.vue_rollup-plugin-vue=script.js +1 -1
  502. package/js/x-modules/next-queries/components/next-queries.vue.js +15 -20
  503. package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
  504. package/js/x-modules/next-queries/components/next-query.vue.js +9 -10
  505. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  506. package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js.map +1 -1
  507. package/js/x-modules/popular-searches/components/popular-search.vue.js +9 -10
  508. package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
  509. package/js/x-modules/popular-searches/components/popular-search.vue_rollup-plugin-vue=script.js.map +1 -1
  510. package/js/x-modules/popular-searches/components/popular-searches.vue.js +15 -20
  511. package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
  512. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +10 -11
  513. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
  514. package/js/x-modules/query-suggestions/components/query-suggestion.vue_rollup-plugin-vue=script.js.map +1 -1
  515. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +15 -20
  516. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
  517. package/js/x-modules/recommendations/components/recommendations.vue.js +9 -12
  518. package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
  519. package/js/x-modules/related-tags/components/related-tag.vue.js +8 -8
  520. package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
  521. package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js +23 -24
  522. package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js.map +1 -1
  523. package/js/x-modules/related-tags/components/related-tags.vue.js +13 -17
  524. package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
  525. package/js/x-modules/scroll/components/main-scroll-item.vue.js +52 -0
  526. package/js/x-modules/scroll/components/main-scroll-item.vue.js.map +1 -0
  527. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +190 -0
  528. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -0
  529. package/js/x-modules/scroll/components/main-scroll.vue.js +39 -0
  530. package/js/x-modules/scroll/components/main-scroll.vue.js.map +1 -0
  531. package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js +204 -0
  532. package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js.map +1 -0
  533. package/js/{components/scroll/base-scroll-to-top.vue.js → x-modules/scroll/components/scroll-to-top.vue.js} +5 -6
  534. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -0
  535. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js +233 -0
  536. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -0
  537. package/js/x-modules/scroll/components/scroll.const.js +15 -0
  538. package/js/x-modules/scroll/components/scroll.const.js.map +1 -0
  539. package/js/{components/scroll/base-id-scroll.vue.js → x-modules/scroll/components/scroll.vue.js} +9 -10
  540. package/js/x-modules/scroll/components/scroll.vue.js.map +1 -0
  541. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +110 -0
  542. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js.map +1 -0
  543. package/js/x-modules/scroll/components/window-scroll.vue.js +39 -0
  544. package/js/x-modules/scroll/components/window-scroll.vue.js.map +1 -0
  545. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +188 -0
  546. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -0
  547. package/js/x-modules/scroll/store/emitters.js +15 -0
  548. package/js/x-modules/scroll/store/emitters.js.map +1 -0
  549. package/js/x-modules/scroll/store/module.js +36 -0
  550. package/js/x-modules/scroll/store/module.js.map +1 -0
  551. package/js/x-modules/scroll/wiring.js +114 -0
  552. package/js/x-modules/scroll/wiring.js.map +1 -0
  553. package/js/x-modules/scroll/x-module.js +19 -0
  554. package/js/x-modules/scroll/x-module.js.map +1 -0
  555. package/js/x-modules/search/components/banner.vue.js +4 -6
  556. package/js/x-modules/search/components/banner.vue.js.map +1 -1
  557. package/js/x-modules/search/components/banners-list.vue.js +9 -12
  558. package/js/x-modules/search/components/banners-list.vue.js.map +1 -1
  559. package/js/x-modules/search/components/banners-list.vue_rollup-plugin-vue=script.js +1 -1
  560. package/js/x-modules/search/components/partial-query-button.vue.js +6 -6
  561. package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
  562. package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js +21 -123
  563. package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js.map +1 -1
  564. package/js/x-modules/search/components/partial-results-list.vue.js +4 -4
  565. package/js/x-modules/search/components/promoted.vue.js +4 -6
  566. package/js/x-modules/search/components/promoted.vue.js.map +1 -1
  567. package/js/x-modules/search/components/promoteds-list.vue.js +9 -12
  568. package/js/x-modules/search/components/promoteds-list.vue.js.map +1 -1
  569. package/js/x-modules/search/components/promoteds-list.vue_rollup-plugin-vue=script.js +1 -1
  570. package/js/x-modules/search/components/redirection.vue.js +4 -5
  571. package/js/x-modules/search/components/redirection.vue.js.map +1 -1
  572. package/js/x-modules/search/components/results-list.vue.js +9 -12
  573. package/js/x-modules/search/components/results-list.vue.js.map +1 -1
  574. package/js/x-modules/search/components/sort-dropdown.vue.js +13 -16
  575. package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
  576. package/js/x-modules/search/components/sort-list.vue.js +8 -10
  577. package/js/x-modules/search/components/sort-list.vue.js.map +1 -1
  578. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +6 -6
  579. package/js/x-modules/search/components/sort.mixin.js +6 -6
  580. package/js/x-modules/search/components/spellcheck-button.vue.js +6 -6
  581. package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
  582. package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js +21 -122
  583. package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js.map +1 -1
  584. package/js/x-modules/search/components/spellcheck.vue.js +4 -6
  585. package/js/x-modules/search/components/spellcheck.vue.js.map +1 -1
  586. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +6 -6
  587. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +4 -1
  588. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
  589. package/js/x-modules/search/store/actions/save-origin.action.js +18 -0
  590. package/js/x-modules/search/store/actions/save-origin.action.js.map +1 -0
  591. package/js/x-modules/search/store/emitters.js +8 -0
  592. package/js/x-modules/search/store/emitters.js.map +1 -1
  593. package/js/x-modules/search/store/module.js +13 -3
  594. package/js/x-modules/search/store/module.js.map +1 -1
  595. package/js/x-modules/search/wiring.js +5 -5
  596. package/js/x-modules/search/wiring.js.map +1 -1
  597. package/js/x-modules/search-box/components/clear-search-input.vue.js +5 -6
  598. package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
  599. package/js/x-modules/search-box/components/search-button.vue.js +6 -6
  600. package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
  601. package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js +24 -15
  602. package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js.map +1 -1
  603. package/js/x-modules/search-box/components/search-input.vue.js +10 -11
  604. package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
  605. package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js +10 -9
  606. package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js.map +1 -1
  607. package/js/x-modules/tagging/components/tagging.vue.js +39 -0
  608. package/js/x-modules/tagging/components/tagging.vue.js.map +1 -0
  609. package/js/x-modules/tagging/components/tagging.vue_rollup-plugin-vue=script.js +65 -0
  610. package/js/x-modules/tagging/components/tagging.vue_rollup-plugin-vue=script.js.map +1 -0
  611. package/js/x-modules/tagging/service/session.service.js +52 -0
  612. package/js/x-modules/tagging/service/session.service.js.map +1 -0
  613. package/js/x-modules/tagging/store/actions/track.action.js +43 -0
  614. package/js/x-modules/tagging/store/actions/track.action.js.map +1 -0
  615. package/js/x-modules/tagging/store/emitters.js +3 -1
  616. package/js/x-modules/tagging/store/emitters.js.map +1 -1
  617. package/js/x-modules/tagging/store/module.js +21 -3
  618. package/js/x-modules/tagging/store/module.js.map +1 -1
  619. package/js/x-modules/tagging/wiring.js +86 -2
  620. package/js/x-modules/tagging/wiring.js.map +1 -1
  621. package/js/x-modules/url/components/url-handler.vue.js +2 -2
  622. package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
  623. package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js +2 -2
  624. package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js.map +1 -1
  625. package/js/x-modules/url/store/initial-state.js +1 -1
  626. package/js/x-modules/url/store/initial-state.js.map +1 -1
  627. package/js/x-modules/url/store/module.js +3 -0
  628. package/js/x-modules/url/store/module.js.map +1 -1
  629. package/js/x-modules/url/wiring.js +10 -1
  630. package/js/x-modules/url/wiring.js.map +1 -1
  631. package/package.json +18 -14
  632. package/report/tsdoc-metadata.json +1 -1
  633. package/report/x-adapter.api.json +21 -21
  634. package/report/x-components.api.json +4574 -1421
  635. package/report/x-components.api.md +456 -138
  636. package/report/x-types.api.json +397 -311
  637. package/scroll/index.d.ts +1 -0
  638. package/scroll/index.js +10 -0
  639. package/search/index.js +1 -1
  640. package/tagging/index.js +5 -2
  641. package/types/adapter/mocked-adapter.d.ts.map +1 -1
  642. package/types/components/global-x-bus.vue.d.ts +25 -0
  643. package/types/components/global-x-bus.vue.d.ts.map +1 -0
  644. package/types/components/index.d.ts +3 -0
  645. package/types/components/index.d.ts.map +1 -1
  646. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts.map +1 -1
  647. package/types/components/layouts/single-column-layout.vue.d.ts.map +1 -1
  648. package/types/components/location-provider.vue.d.ts +17 -0
  649. package/types/components/location-provider.vue.d.ts.map +1 -0
  650. package/types/components/result/base-result-link.vue.d.ts +8 -18
  651. package/types/components/result/base-result-link.vue.d.ts.map +1 -1
  652. package/types/components/scroll/base-scroll.vue.d.ts +0 -28
  653. package/types/components/scroll/base-scroll.vue.d.ts.map +1 -1
  654. package/types/components/scroll/index.d.ts +0 -3
  655. package/types/components/scroll/index.d.ts.map +1 -1
  656. package/types/components/scroll/scroll.mixin.d.ts +75 -30
  657. package/types/components/scroll/scroll.mixin.d.ts.map +1 -1
  658. package/types/components/snippet-callbacks.vue.d.ts +27 -0
  659. package/types/components/snippet-callbacks.vue.d.ts.map +1 -0
  660. package/types/components/suggestions/base-suggestion.vue.d.ts +15 -2
  661. package/types/components/suggestions/base-suggestion.vue.d.ts.map +1 -1
  662. package/types/components/x-component.utils.d.ts +1 -1
  663. package/types/components/x-component.utils.d.ts.map +1 -1
  664. package/types/index.d.ts +1 -0
  665. package/types/index.d.ts.map +1 -1
  666. package/types/plugins/x-plugin.mixin.d.ts +2 -2
  667. package/types/plugins/x-plugin.mixin.d.ts.map +1 -1
  668. package/types/plugins/x-plugin.types.d.ts +1 -1
  669. package/types/plugins/x-plugin.types.d.ts.map +1 -1
  670. package/types/router.d.ts.map +1 -1
  671. package/types/store/x.module.d.ts.map +1 -1
  672. package/types/types/index.d.ts +1 -1
  673. package/types/types/index.d.ts.map +1 -1
  674. package/types/types/origin.d.ts +46 -0
  675. package/types/types/origin.d.ts.map +1 -0
  676. package/types/types/url-params.d.ts +1 -1
  677. package/types/utils/index.d.ts +1 -0
  678. package/types/utils/index.d.ts.map +1 -1
  679. package/types/utils/origin.d.ts +13 -0
  680. package/types/utils/origin.d.ts.map +1 -0
  681. package/types/utils/storage.d.ts +1 -7
  682. package/types/utils/storage.d.ts.map +1 -1
  683. package/types/wiring/events.types.d.ts +26 -40
  684. package/types/wiring/events.types.d.ts.map +1 -1
  685. package/types/wiring/wiring.types.d.ts +9 -10
  686. package/types/wiring/wiring.types.d.ts.map +1 -1
  687. package/types/x-installer/api/api.types.d.ts +12 -0
  688. package/types/x-installer/api/api.types.d.ts.map +1 -1
  689. package/types/x-modules/history-queries/components/history-query.vue.d.ts.map +1 -1
  690. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +8 -0
  691. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts.map +1 -1
  692. package/types/x-modules/identifier-results/store/actions/{set-url-params.action.d.ts → save-origin.action.d.ts} +4 -4
  693. package/types/x-modules/identifier-results/store/actions/save-origin.action.d.ts.map +1 -0
  694. package/types/x-modules/identifier-results/store/actions/save-query.action.d.ts.map +1 -1
  695. package/types/x-modules/identifier-results/store/getters/identifier-results-request.getter.d.ts.map +1 -1
  696. package/types/x-modules/identifier-results/store/index.d.ts +1 -0
  697. package/types/x-modules/identifier-results/store/index.d.ts.map +1 -1
  698. package/types/x-modules/identifier-results/store/module.d.ts.map +1 -1
  699. package/types/x-modules/identifier-results/store/types.d.ts +35 -17
  700. package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
  701. package/types/x-modules/identifier-results/wiring.d.ts +17 -1
  702. package/types/x-modules/identifier-results/wiring.d.ts.map +1 -1
  703. package/types/x-modules/next-queries/components/next-query.vue.d.ts.map +1 -1
  704. package/types/x-modules/popular-searches/components/popular-search.vue.d.ts.map +1 -1
  705. package/types/x-modules/query-suggestions/components/query-suggestion.vue.d.ts.map +1 -1
  706. package/types/x-modules/related-tags/components/related-tag.vue.d.ts +10 -5
  707. package/types/x-modules/related-tags/components/related-tag.vue.d.ts.map +1 -1
  708. package/types/x-modules/scroll/components/index.d.ts +8 -0
  709. package/types/x-modules/scroll/components/index.d.ts.map +1 -0
  710. package/types/x-modules/scroll/components/main-scroll-item.vue.d.ts +65 -0
  711. package/types/x-modules/scroll/components/main-scroll-item.vue.d.ts.map +1 -0
  712. package/types/x-modules/scroll/components/main-scroll.vue.d.ts +121 -0
  713. package/types/x-modules/scroll/components/main-scroll.vue.d.ts.map +1 -0
  714. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +80 -0
  715. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts.map +1 -0
  716. package/types/x-modules/scroll/components/scroll.const.d.ts +15 -0
  717. package/types/x-modules/scroll/components/scroll.const.d.ts.map +1 -0
  718. package/types/x-modules/scroll/components/scroll.types.d.ts +20 -0
  719. package/types/x-modules/scroll/components/scroll.types.d.ts.map +1 -0
  720. package/types/{components/scroll/base-id-scroll.vue.d.ts → x-modules/scroll/components/scroll.vue.d.ts} +17 -30
  721. package/types/x-modules/scroll/components/scroll.vue.d.ts.map +1 -0
  722. package/types/x-modules/scroll/components/window-scroll.vue.d.ts +47 -0
  723. package/types/x-modules/scroll/components/window-scroll.vue.d.ts.map +1 -0
  724. package/types/x-modules/scroll/events.types.d.ts +53 -0
  725. package/types/x-modules/scroll/events.types.d.ts.map +1 -0
  726. package/types/x-modules/scroll/index.d.ts +6 -0
  727. package/types/x-modules/scroll/index.d.ts.map +1 -0
  728. package/types/x-modules/scroll/store/emitters.d.ts +7 -0
  729. package/types/x-modules/scroll/store/emitters.d.ts.map +1 -0
  730. package/types/x-modules/scroll/store/index.d.ts +4 -0
  731. package/types/x-modules/scroll/store/index.d.ts.map +1 -0
  732. package/types/x-modules/scroll/store/module.d.ts +8 -0
  733. package/types/x-modules/scroll/store/module.d.ts.map +1 -0
  734. package/types/x-modules/scroll/store/types.d.ts +98 -0
  735. package/types/x-modules/scroll/store/types.d.ts.map +1 -0
  736. package/types/x-modules/scroll/wiring.d.ts +74 -0
  737. package/types/x-modules/scroll/wiring.d.ts.map +1 -0
  738. package/types/x-modules/scroll/x-module.d.ts +16 -0
  739. package/types/x-modules/scroll/x-module.d.ts.map +1 -0
  740. package/types/x-modules/search/components/partial-query-button.vue.d.ts +9 -4
  741. package/types/x-modules/search/components/partial-query-button.vue.d.ts.map +1 -1
  742. package/types/x-modules/search/components/spellcheck-button.vue.d.ts +9 -4
  743. package/types/x-modules/search/components/spellcheck-button.vue.d.ts.map +1 -1
  744. package/types/x-modules/search/events.types.d.ts +6 -1
  745. package/types/x-modules/search/events.types.d.ts.map +1 -1
  746. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
  747. package/types/x-modules/search/store/actions/save-origin.action.d.ts +12 -0
  748. package/types/x-modules/search/store/actions/save-origin.action.d.ts.map +1 -0
  749. package/types/x-modules/search/store/emitters.d.ts +4 -0
  750. package/types/x-modules/search/store/emitters.d.ts.map +1 -1
  751. package/types/x-modules/search/store/module.d.ts.map +1 -1
  752. package/types/x-modules/search/store/types.d.ts +17 -3
  753. package/types/x-modules/search/store/types.d.ts.map +1 -1
  754. package/types/x-modules/search/wiring.d.ts +3 -3
  755. package/types/x-modules/search/wiring.d.ts.map +1 -1
  756. package/types/x-modules/search-box/components/search-button.vue.d.ts +14 -2
  757. package/types/x-modules/search-box/components/search-button.vue.d.ts.map +1 -1
  758. package/types/x-modules/search-box/components/search-input.vue.d.ts +1 -1
  759. package/types/x-modules/search-box/components/search-input.vue.d.ts.map +1 -1
  760. package/types/x-modules/tagging/components/index.d.ts +2 -0
  761. package/types/x-modules/tagging/components/index.d.ts.map +1 -0
  762. package/types/x-modules/tagging/components/tagging.vue.d.ts +47 -0
  763. package/types/x-modules/tagging/components/tagging.vue.d.ts.map +1 -0
  764. package/types/x-modules/tagging/config.types.d.ts +9 -0
  765. package/types/x-modules/tagging/config.types.d.ts.map +1 -1
  766. package/types/x-modules/tagging/events.types.d.ts +20 -0
  767. package/types/x-modules/tagging/events.types.d.ts.map +1 -1
  768. package/types/x-modules/tagging/index.d.ts +2 -0
  769. package/types/x-modules/tagging/index.d.ts.map +1 -1
  770. package/types/x-modules/tagging/service/index.d.ts +3 -0
  771. package/types/x-modules/tagging/service/index.d.ts.map +1 -0
  772. package/types/x-modules/tagging/service/session.service.d.ts +37 -0
  773. package/types/x-modules/tagging/service/session.service.d.ts.map +1 -0
  774. package/types/x-modules/tagging/service/types.d.ts +21 -0
  775. package/types/x-modules/tagging/service/types.d.ts.map +1 -0
  776. package/types/x-modules/tagging/store/actions/index.d.ts +2 -0
  777. package/types/x-modules/tagging/store/actions/index.d.ts.map +1 -0
  778. package/types/x-modules/tagging/store/actions/track.action.d.ts +12 -0
  779. package/types/x-modules/tagging/store/actions/track.action.d.ts.map +1 -0
  780. package/types/x-modules/tagging/store/emitters.d.ts +3 -1
  781. package/types/x-modules/tagging/store/emitters.d.ts.map +1 -1
  782. package/types/x-modules/tagging/store/index.d.ts +1 -0
  783. package/types/x-modules/tagging/store/index.d.ts.map +1 -1
  784. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  785. package/types/x-modules/tagging/store/types.d.ts +34 -0
  786. package/types/x-modules/tagging/store/types.d.ts.map +1 -1
  787. package/types/x-modules/tagging/wiring.d.ts +42 -1
  788. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  789. package/types/x-modules/url/store/module.d.ts.map +1 -1
  790. package/types/x-modules/url/store/types.d.ts +6 -0
  791. package/types/x-modules/url/store/types.d.ts.map +1 -1
  792. package/types/x-modules/url/wiring.d.ts +9 -0
  793. package/types/x-modules/url/wiring.d.ts.map +1 -1
  794. package/types/x-modules/x-modules.types.d.ts +3 -1
  795. package/types/x-modules/x-modules.types.d.ts.map +1 -1
  796. package/url/index.js +1 -1
  797. package/docs/API-reference/api/x-components.baseidscroll.md +0 -24
  798. package/docs/API-reference/api/x-components.baseidscroll.resetonquerychange.md +0 -13
  799. package/docs/API-reference/api/x-components.basemainscroll.element.md +0 -13
  800. package/docs/API-reference/api/x-components.basemainscroll.md +0 -31
  801. package/docs/API-reference/api/x-components.basemainscroll.tag.md +0 -13
  802. package/docs/API-reference/api/x-components.baseresultlink.emituserclickedaresult.md +0 -17
  803. package/docs/API-reference/api/x-components.baseresultlink.emituserrightclickedaresult.md +0 -17
  804. package/docs/API-reference/api/x-components.baseresultlink.metadata.md +0 -13
  805. package/docs/API-reference/api/x-components.baseresultlink.origin.md +0 -13
  806. package/docs/API-reference/api/x-components.baseresultlink.resultclickextraevents.md +0 -13
  807. package/docs/API-reference/api/x-components.basescroll.resetonquerychange.md +0 -13
  808. package/docs/API-reference/api/x-components.basescrolltotop.md +0 -23
  809. package/docs/API-reference/api/x-components.identifierresultsactions.seturlparams.md +0 -24
  810. package/docs/API-reference/api/x-components.wiremetadata.origin.md +0 -13
  811. package/docs/API-reference/api/x-components.xeventstypes.useralmostreachedscrollend.md +0 -13
  812. package/docs/API-reference/api/x-components.xeventstypes.userreachedscrollend.md +0 -13
  813. package/docs/API-reference/api/x-components.xeventstypes.userreachedscrollstart.md +0 -13
  814. package/docs/API-reference/api/x-types.redirection.tagging.md +0 -15
  815. package/docs/API-reference/api/x-types.result.tagging.md +0 -13
  816. package/docs/API-reference/api/x-types.resulttagging.add2cart.md +0 -13
  817. package/docs/API-reference/api/x-types.resulttagging.checkout.md +0 -13
  818. package/docs/API-reference/api/x-types.resulttagging.click.md +0 -13
  819. package/docs/API-reference/api/x-types.resulttagging.md +0 -22
  820. package/docs/API-reference/components/common/scroll/x-components.base-id-scroll.md +0 -216
  821. package/docs/API-reference/components/common/scroll/x-components.base-main-scroll.md +0 -170
  822. package/docs/css/global.scss +0 -1
  823. package/docs/css/utils/utils.scss +0 -35
  824. package/docs/css/xcomponents/clear-search-input.scss +0 -9
  825. package/docs/css/xcomponents/index.scss +0 -16
  826. package/docs/css/xcomponents/search-input.scss +0 -10
  827. package/docs/css/xcomponents/suggestions.scss +0 -19
  828. package/docs/guide/getting-started/components/clear-search-input.md +0 -98
  829. package/docs/guide/getting-started/components/live-examples.md +0 -100
  830. package/docs/guide/getting-started/components/query-suggestions.md +0 -76
  831. package/docs/guide/getting-started/components/search-button.md +0 -98
  832. package/docs/guide/getting-started/components/search-input.md +0 -105
  833. package/docs/guide/getting-started/install-xplugin.md +0 -72
  834. package/docs/guide/getting-started/use-components.md +0 -75
  835. package/docs/guide/install.md +0 -30
  836. package/docs/react-components/ReactComponents.jsx +0 -46
  837. package/docs/react-components/Utils.jsx +0 -34
  838. package/js/components/scroll/base-id-scroll.vue.js.map +0 -1
  839. package/js/components/scroll/base-id-scroll.vue_rollup-plugin-vue=script.js +0 -110
  840. package/js/components/scroll/base-id-scroll.vue_rollup-plugin-vue=script.js.map +0 -1
  841. package/js/components/scroll/base-main-scroll.vue.js.map +0 -1
  842. package/js/components/scroll/base-main-scroll.vue_rollup-plugin-vue=script.js +0 -105
  843. package/js/components/scroll/base-main-scroll.vue_rollup-plugin-vue=script.js.map +0 -1
  844. package/js/components/scroll/base-scroll-to-top.vue.js.map +0 -1
  845. package/js/components/scroll/base-scroll-to-top.vue_rollup-plugin-vue=script.js +0 -179
  846. package/js/components/scroll/base-scroll-to-top.vue_rollup-plugin-vue=script.js.map +0 -1
  847. package/js/x-modules/identifier-results/store/actions/set-url-params.action.js +0 -17
  848. package/js/x-modules/identifier-results/store/actions/set-url-params.action.js.map +0 -1
  849. package/types/components/scroll/base-id-scroll.vue.d.ts.map +0 -1
  850. package/types/components/scroll/base-main-scroll.vue.d.ts +0 -78
  851. package/types/components/scroll/base-main-scroll.vue.d.ts.map +0 -1
  852. package/types/components/scroll/base-scroll-to-top.vue.d.ts +0 -119
  853. package/types/components/scroll/base-scroll-to-top.vue.d.ts.map +0 -1
  854. package/types/types/query-origin.d.ts +0 -7
  855. package/types/types/query-origin.d.ts.map +0 -1
  856. package/types/x-modules/identifier-results/store/actions/set-url-params.action.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"filters-search.vue.js","sources":["../../../../../../src/x-modules/facets/components/lists/filters-search.vue"],"sourcesContent":["<template>\n <div class=\"x-list x-filters-search\" :class=\"cssClasses\" data-test=\"filters-search\">\n <!--\n @slot Search content. It is the content which triggers the filters sifting.\n @binding {string} query - The query to search in filters.\n @binding {Function} setQuery - The function to set the query. The query is passed as\n parameter.\n @binding {Function} clearQuery - The function to clear the query.\n -->\n <slot name=\"search\" v-bind=\"{ query, setQuery, clearQuery }\">\n <input\n @input=\"setQuery($event.target.value)\"\n :value=\"query\"\n type=\"search\"\n class=\"x-input x-filters-search__input\"\n data-test=\"filters-search-input\"\n />\n </slot>\n <!--\n @slot (Required) Sifted filters content.\n @binding {Filter[]} siftedFilters - Sifted filters data.\n -->\n <slot :siftedFilters=\"siftedFilters\"></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Filter, isBooleanFilter } from '@empathyco/x-types';\n import { mixins } from 'vue-class-component';\n import { Component, Prop, Watch } from 'vue-property-decorator';\n import { xComponentMixin, XProvide } from '../../../../components';\n import { debounce } from '../../../../utils/debounce';\n import { normalizeString } from '../../../../utils/normalize';\n import { DebouncedFunction, VueCSSClasses } from '../../../../utils/types';\n import { facetsXModule } from '../../x-module';\n import FiltersInjectionMixin from './filters-injection.mixin';\n\n /**\n * Renders the filters sifted with the input query.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(facetsXModule)]\n })\n export default class FiltersSearch extends mixins(FiltersInjectionMixin) {\n /** The debounce time for applying the filter sifting. */\n @Prop({ default: 200 })\n protected debounceInMs!: number;\n\n protected query = '';\n protected setQueryDebounced!: DebouncedFunction<[string]>;\n\n /**\n * Set the debounce function for setting the query debounced.\n *\n * @internal\n */\n @Watch('debounceInMs', { immediate: true })\n updateSetQueryDebounced(): void {\n this.setQueryDebounced = debounce(query => {\n this.query = query;\n }, this.debounceInMs);\n }\n\n /**\n * Sift the array of filters which matches with the query.\n *\n * @returns Array of sifted filters.\n * @internal\n */\n @XProvide('filters')\n public get siftedFilters(): Filter[] {\n const normalizedQuery = normalizeString(this.query);\n return this.renderedFilters.filter(\n filter => isBooleanFilter(filter) && normalizeString(filter.label).includes(normalizedQuery)\n );\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-filters-search--is-sifted': !!this.query\n };\n }\n\n /**\n * Set the query through the debounced function.\n *\n * @param query - The query to sift filters.\n * @internal\n */\n protected setQuery(query: string): void {\n this.setQueryDebounced(query);\n }\n\n /**\n * Clear the query.\n *\n * @internal\n */\n protected clearQuery(): void {\n this.query = '';\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-filters-search__input {\n &::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n &::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n display: none;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n# Examples\n\nIt renders an input and a list of filters passed as prop or being injected. The list of filters can\nbe sifted with the query typed in the input. This component has also a debounce prop to set the time\nin milliseconds to apply the filters search. Moreover, it has two scoped slots. The first one for\ncustomize the search triggering with three slot props; the query, a function to set the query by\nsifting and a third one for cleaning the query. The second scoped slot is required and it is for\ndisplaying the list of filters sifted. It has a slot prop with these filters sifted.\n\n## Important\n\nThe component has two ways of receive the filters list, it can be injected by another component or\nbe send it as a prop. If the component doesnt have a parent component that receive and exposed a\nfilters list to their children, it is mandatory to send it as prop.\n\n## Basic usage\n\nUsing default and required slot:\n\n```vue\n<FiltersSearch :filters=\"filters\" v-slot=\"{ siftedFilters }\">\n <ul v-for=\"filter in siftedFilters\">\n <li :key=\"filter.id\">{{ filter.label }}</li>\n </ul>\n</FiltersSearch>\n```\n\nSetting debounce time:\n\n```vue\n<FiltersSearch :filters=\"filters\" :debounceInMs=\"500\" v-slot=\"{ siftedFilters }\">\n <ul v-for=\"filter in siftedFilters\">\n <li :key=\"filter.id\">{{ filter.label }}</li>\n </ul>\n</FiltersSearch>\n```\n\nReplacing search triggering:\n\n```vue\n<FiltersSearch :filters=\"filters\">\n <template #search=\"{ query, setQuery, clearQuery }\">\n <input\n @input=\"setQuery($event.target.value)\"\n :value=\"query\"\n class=\"x-input x-filters-search__input\"/>\n <button @click=\"clearQuery\">X</button>\n </template>\n <template #default=\"{ siftedFilters }\">\n <ul v-for=\"filter in siftedFilters\">\n <li :key=\"filter.id\">{{ filter.label }}</li>\n </ul>\n </template>\n</FiltersSearch>\n```\n\n> **Using injection**: It can receive the filters list by injection. It only works if it has a\n> parent component that receives and exposes the filters list. Using the injection, It is not\n> necessary to send the prop to the child components, it has to be send it in the parent component,\n> the rest of components will inject this list.\n\n```vue\n<Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"8\">\n <FiltersSearch >\n <Filters v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\" data-test=\"brand-filter\" />\n </Filters>\n </FiltersSearch>\n </SlicedFilters>\n</Facets>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"filters-search.vue.js","sources":["../../../../../../src/x-modules/facets/components/lists/filters-search.vue"],"sourcesContent":["<template>\n <div class=\"x-list x-filters-search\" :class=\"cssClasses\" data-test=\"filters-search\">\n <!--\n @slot Search content. It is the content which triggers the filters sifting.\n @binding {string} query - The query to search in filters.\n @binding {Function} setQuery - The function to set the query. The query is passed as\n parameter.\n @binding {Function} clearQuery - The function to clear the query.\n -->\n <slot name=\"search\" v-bind=\"{ query, setQuery, clearQuery }\">\n <input\n @input=\"setQuery($event.target.value)\"\n :value=\"query\"\n type=\"search\"\n class=\"x-input x-filters-search__input\"\n data-test=\"filters-search-input\"\n />\n </slot>\n <!--\n @slot (Required) Sifted filters content.\n @binding {Filter[]} siftedFilters - Sifted filters data.\n -->\n <slot :siftedFilters=\"siftedFilters\"></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Filter, isBooleanFilter } from '@empathyco/x-types';\n import { mixins } from 'vue-class-component';\n import { Component, Prop, Watch } from 'vue-property-decorator';\n import { xComponentMixin, XProvide } from '../../../../components';\n import { debounce } from '../../../../utils/debounce';\n import { normalizeString } from '../../../../utils/normalize';\n import { DebouncedFunction, VueCSSClasses } from '../../../../utils/types';\n import { facetsXModule } from '../../x-module';\n import FiltersInjectionMixin from './filters-injection.mixin';\n\n /**\n * Renders the filters sifted with the input query.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(facetsXModule)]\n })\n export default class FiltersSearch extends mixins(FiltersInjectionMixin) {\n /** The debounce time for applying the filter sifting. */\n @Prop({ default: 200 })\n protected debounceInMs!: number;\n\n protected query = '';\n protected setQueryDebounced!: DebouncedFunction<[string]>;\n\n /**\n * Set the debounce function for setting the query debounced.\n *\n * @internal\n */\n @Watch('debounceInMs', { immediate: true })\n updateSetQueryDebounced(): void {\n this.setQueryDebounced = debounce(query => {\n this.query = query;\n }, this.debounceInMs);\n }\n\n /**\n * Sift the array of filters which matches with the query.\n *\n * @returns Array of sifted filters.\n * @internal\n */\n @XProvide('filters')\n public get siftedFilters(): Filter[] {\n const normalizedQuery = normalizeString(this.query);\n return this.renderedFilters.filter(\n filter => isBooleanFilter(filter) && normalizeString(filter.label).includes(normalizedQuery)\n );\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-filters-search--is-sifted': !!this.query\n };\n }\n\n /**\n * Set the query through the debounced function.\n *\n * @param query - The query to sift filters.\n * @internal\n */\n protected setQuery(query: string): void {\n this.setQueryDebounced(query);\n }\n\n /**\n * Clear the query.\n *\n * @internal\n */\n protected clearQuery(): void {\n this.query = '';\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-filters-search__input {\n &::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n &::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n display: none;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n# Examples\n\nIt renders an input and a list of filters passed as prop or being injected. The list of filters can\nbe sifted with the query typed in the input. This component has also a debounce prop to set the time\nin milliseconds to apply the filters search. Moreover, it has two scoped slots. The first one for\ncustomize the search triggering with three slot props; the query, a function to set the query by\nsifting and a third one for cleaning the query. The second scoped slot is required and it is for\ndisplaying the list of filters sifted. It has a slot prop with these filters sifted.\n\n## Important\n\nThe component has two ways of receive the filters list, it can be injected by another component or\nbe send it as a prop. If the component doesnt have a parent component that receive and exposed a\nfilters list to their children, it is mandatory to send it as prop.\n\n## Basic usage\n\nUsing default and required slot:\n\n```vue\n<FiltersSearch :filters=\"filters\" v-slot=\"{ siftedFilters }\">\n <ul v-for=\"filter in siftedFilters\">\n <li :key=\"filter.id\">{{ filter.label }}</li>\n </ul>\n</FiltersSearch>\n```\n\nSetting debounce time:\n\n```vue\n<FiltersSearch :filters=\"filters\" :debounceInMs=\"500\" v-slot=\"{ siftedFilters }\">\n <ul v-for=\"filter in siftedFilters\">\n <li :key=\"filter.id\">{{ filter.label }}</li>\n </ul>\n</FiltersSearch>\n```\n\nReplacing search triggering:\n\n```vue\n<FiltersSearch :filters=\"filters\">\n <template #search=\"{ query, setQuery, clearQuery }\">\n <input\n @input=\"setQuery($event.target.value)\"\n :value=\"query\"\n class=\"x-input x-filters-search__input\"/>\n <button @click=\"clearQuery\">X</button>\n </template>\n <template #default=\"{ siftedFilters }\">\n <ul v-for=\"filter in siftedFilters\">\n <li :key=\"filter.id\">{{ filter.label }}</li>\n </ul>\n </template>\n</FiltersSearch>\n```\n\n> **Using injection**: It can receive the filters list by injection. It only works if it has a\n> parent component that receives and exposes the filters list. Using the injection, It is not\n> necessary to send the prop to the child components, it has to be send it in the parent component,\n> the rest of components will inject this list.\n\n```vue\n<Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"8\">\n <FiltersSearch >\n <Filters v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\" data-test=\"brand-filter\" />\n </Filters>\n </FiltersSearch>\n </SlicedFilters>\n</Facets>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -90,9 +90,6 @@ import '../../../../components/result/base-result-fallback-image.vue.js';
90
90
  import '../../../../components/result/base-result-placeholder-image.vue.js';
91
91
  import '../../../../components/scroll/scroll.mixin.js';
92
92
  import '../../../../components/scroll/base-scroll.vue.js';
93
- import '../../../../components/scroll/base-id-scroll.vue.js';
94
- import '../../../../components/scroll/base-scroll-to-top.vue.js';
95
- import '../../../../components/scroll/base-main-scroll.vue.js';
96
93
  import '../../../../components/suggestions/base-suggestion.vue.js';
97
94
  import '../../../../components/suggestions/base-suggestions.vue.js';
98
95
  import '../../../../components/auto-progress-bar.vue.js';
@@ -103,12 +100,15 @@ import '../../../../components/base-variable-column-grid.vue.js';
103
100
  import '../../../../components/decorators/debounce.decorators.js';
104
101
  import '../../../../components/sliding-panel.vue.js';
105
102
  import '../../../../components/items-list.vue.js';
106
- import '../../../../components/layouts/multi-column-max-width-layout.vue.js';
107
- import '../../../../components/layouts/single-column-layout.vue.js';
108
103
  import '../../../../components/decorators/store.decorators.js';
109
- import '../../../../components/items-list-injection.mixin.js';
110
104
  import '../../../../components/x-component.utils.js';
111
105
  import { xComponentMixin } from '../../../../components/x-component.mixin.js';
106
+ import '../../../../components/layouts/multi-column-max-width-layout.vue.js';
107
+ import '../../../../components/layouts/single-column-layout.vue.js';
108
+ import '../../../../components/location-provider.vue.js';
109
+ import '../../../../components/global-x-bus.vue.js';
110
+ import '../../../../components/snippet-callbacks.vue.js';
111
+ import '../../../../components/items-list-injection.mixin.js';
112
112
  import { isBooleanFilter } from '@empathyco/x-types';
113
113
  import { facetsXModule } from '../../x-module.js';
114
114
  import FiltersInjectionMixin from './filters-injection.mixin.js';
@@ -5,7 +5,7 @@ import script from './selected-filters-list.vue_rollup-plugin-vue=script.js';
5
5
  var __vue_script__ = script;
6
6
 
7
7
  /* template */
8
- var __vue_render__ = function() {
8
+ var __vue_render__ = function () {
9
9
  var _vm = this;
10
10
  var _h = _vm.$createElement;
11
11
  var _c = _vm._self._c || _h;
@@ -15,7 +15,7 @@ var __vue_render__ = function() {
15
15
  [
16
16
  {
17
17
  key: "default",
18
- fn: function(ref) {
18
+ fn: function (ref) {
19
19
  var selectedFilters = ref.selectedFilters;
20
20
  return [
21
21
  _c(
@@ -23,9 +23,9 @@ var __vue_render__ = function() {
23
23
  {
24
24
  tag: "component",
25
25
  staticClass: "x-list x-selected-filters-list",
26
- attrs: { "data-test": "selected-filters-list", tag: "ul" }
26
+ attrs: { "data-test": "selected-filters-list", tag: "ul" },
27
27
  },
28
- _vm._l(_vm.mapSlot(selectedFilters), function(ref) {
28
+ _vm._l(_vm.mapSlot(selectedFilters), function (ref) {
29
29
  var slotName = ref.slotName;
30
30
  var selectedFilter = ref.selectedFilter;
31
31
  return _c(
@@ -33,47 +33,41 @@ var __vue_render__ = function() {
33
33
  {
34
34
  key: selectedFilter.id,
35
35
  staticClass: "x-selected-filters-list__item",
36
- attrs: { "data-test": "selected-filters-list-item" }
36
+ attrs: { "data-test": "selected-filters-list-item" },
37
37
  },
38
38
  [
39
39
  _vm.$scopedSlots[slotName]
40
40
  ? _vm._t(
41
41
  slotName,
42
- function() {
42
+ function () {
43
43
  return [
44
44
  _c("span", { staticClass: "x-tag" }, [
45
- _vm._v(_vm._s(selectedFilter.label))
46
- ])
47
- ]
45
+ _vm._v(_vm._s(selectedFilter.label)) ]) ]
48
46
  },
49
47
  { filter: selectedFilter }
50
48
  )
51
49
  : _vm._t(
52
50
  "default",
53
- function() {
51
+ function () {
54
52
  return [
55
53
  _vm._v(
56
54
  "\n " +
57
55
  _vm._s(selectedFilter.label) +
58
56
  "\n "
59
- )
60
- ]
57
+ ) ]
61
58
  },
62
59
  { filter: selectedFilter }
63
- )
64
- ],
60
+ ) ],
65
61
  2
66
62
  )
67
63
  }),
68
64
  0
69
- )
70
- ]
71
- }
72
- }
73
- ],
65
+ ) ]
66
+ },
67
+ } ],
74
68
  null,
75
69
  true
76
- )
70
+ ),
77
71
  })
78
72
  };
79
73
  var __vue_staticRenderFns__ = [];
@@ -1 +1 @@
1
- {"version":3,"file":"selected-filters-list.vue.js","sources":["../../../../../../src/x-modules/facets/components/lists/selected-filters-list.vue"],"sourcesContent":["<template>\n <SelectedFilters v-slot=\"{ selectedFilters }\" :facetId=\"facetId\" :alwaysVisible=\"alwaysVisible\">\n <component\n :is=\"animation\"\n class=\"x-list x-selected-filters-list\"\n data-test=\"selected-filters-list\"\n tag=\"ul\"\n >\n <li\n v-for=\"{ slotName, selectedFilter } in mapSlot(selectedFilters)\"\n :key=\"selectedFilter.id\"\n class=\"x-selected-filters-list__item\"\n data-test=\"selected-filters-list-item\"\n >\n <!--\n @slot Custom filter rendering. Dynamic slot defined in the template with the filter\n facet id. It renders the filter label by default.\n @binding {Filter} filter - Filter to render.\n -->\n <slot v-if=\"$scopedSlots[slotName]\" :name=\"slotName\" :filter=\"selectedFilter\">\n <span class=\"x-tag\">{{ selectedFilter.label }}</span>\n </slot>\n\n <!--\n @slot Default filter rendering. It renders the filter label by default.\n @binding {Filter} filter - Filter to render.\n -->\n <slot v-else name=\"default\" :filter=\"selectedFilter\">\n {{ selectedFilter.label }}\n </slot>\n </li>\n </component>\n </SelectedFilters>\n</template>\n\n<script lang=\"ts\">\n import { Component, Prop, Vue } from 'vue-property-decorator';\n import { Facet, Filter, isFacetFilter } from '@empathyco/x-types';\n import { xComponentMixin } from '../../../../components/x-component.mixin';\n import { toKebabCase } from '../../../../utils/string';\n import { facetsXModule } from '../../x-module';\n import SelectedFilters from './selected-filters.vue';\n\n /**\n * Custom interface to provide a slot name to a Filter.\n *\n * @internal\n */\n interface RenderFilter {\n slotName: string;\n selectedFilter: Filter;\n }\n\n /**\n * This component renders a list of selected filters from every facet, or from the facet\n * which facet id is passed as property. It uses the SelectedFilters component (state).\n *\n * It provides two slots: a scoped one which name is the filter facet id; and a default one.\n * Both exposes the filter and renders the filter label by default.\n *\n * The property \"alwaysVisible\" handles if the component is rendered if no filters are selected.\n *\n * @public\n */\n @Component({\n components: { SelectedFilters },\n mixins: [xComponentMixin(facetsXModule)]\n })\n export default class SelectedFiltersList extends Vue {\n /**\n * It is directly passed to the selected filters component. If a facet id is passed as prop,\n * the component filters the selected filters for that facet.\n *\n * @public\n */\n @Prop()\n protected facetId: Facet['id'] | undefined;\n\n /**\n * It is directly passed to the selected filters component. It handles if the SelectedFilters\n * component is always rendered no matter if no filters are selected.\n *\n * If true, the SelectedFilters component is always rendered.\n * If false, the SelectedFilters component is not rendered whether no filters are selected.\n *\n * @public\n */\n @Prop({ default: false })\n protected alwaysVisible!: boolean;\n\n /**\n * Animation component that will be used to animate the selected filters list.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n\n /**\n * Transforms a dictionary of Filters including the slot name.\n *\n * @param selectedFilters - A list of selected filters without slot name.\n *\n * @returns A dictionary of facets with the slot name.\n *\n * @internal\n */\n protected mapSlot(selectedFilters: Filter[]): RenderFilter[] {\n return selectedFilters.map(filter => ({\n slotName: isFacetFilter(filter) ? toKebabCase(filter.facetId as string) : 'default',\n selectedFilter: filter\n }));\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Example\n\nThis component renders a list of selected filters from every facet, or from the facet which facet id\nis passed as property. It uses the SelectedFilters component (state).\n\nIt provides two slots: a scoped one which name is the filter facet id; and a default one. Both\nexposes the filter and renders the filter label by default.\n\nThe property \"alwaysVisible\" handles if the component is rendered if no filters are selected.\n\n## Default usage\n\n```vue\n<template>\n <SelectedFiltersList />\n</template>\n\n<script>\n import { SelectedFiltersList } from '@empathyco/x-components/facets';\n\n export default {\n components: {\n SelectedFiltersList\n }\n };\n</script>\n```\n\n## Customized usage\n\n```vue\n<template>\n <SelectedFiltersList #default=\"{ filter }\">Default: {{ filter.label }}</SelectedFiltersList>\n</template>\n\n<script>\n import { SelectedFilters } from '@empathyco/x-components/facets';\n\n export default {\n components: {\n SelectedFilters\n }\n };\n</script>\n```\n\n```vue\n<template>\n <SelectedFiltersList>\n <template #default=\"{ filter }\">Default: {{ filter.label }}</template>\n <template #brand_facet=\"{ filter }\">Brand: {{ filter.label }}</template>\n <template #age_facet=\"{ filter }\">Age: {{ filter.label }}</template>\n <template #price_facet=\"{ filter }\">Price: {{ filter.label }}</template>\n </SelectedFiltersList>\n</template>\n\n<script>\n import { SelectedFilters } from '@empathyco/x-components/facets';\n\n export default {\n components: {\n SelectedFilters\n }\n };\n</script>\n```\n\n## Always visible\n\nIf \"alwaysVisible\" is true, the component is rendered no matter if there are some filter selected.\nIf \"alwaysVisible\" is false (default), the component is rendered if there are some filter selected.\n\n```vue\n<SelectedFiltersList :alwaysVisible=\"true\" />\n```\n\nOutput:\n\n```html\n<div class=\"x-selected-filters\">\n <ul class=\"x-selected-filters-list\" data-test=\"selected-filters-list\"></ul>\n</div>\n```\n\n## Providing a facet id\n\nIn this example, the selected filters computed are the ones that match the facet passed as property.\n\n```vue\n<SelectedFilters facetId=\"brand_facet\" />\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"selected-filters-list.vue.js","sources":["../../../../../../src/x-modules/facets/components/lists/selected-filters-list.vue"],"sourcesContent":["<template>\n <SelectedFilters v-slot=\"{ selectedFilters }\" :facetId=\"facetId\" :alwaysVisible=\"alwaysVisible\">\n <component\n :is=\"animation\"\n class=\"x-list x-selected-filters-list\"\n data-test=\"selected-filters-list\"\n tag=\"ul\"\n >\n <li\n v-for=\"{ slotName, selectedFilter } in mapSlot(selectedFilters)\"\n :key=\"selectedFilter.id\"\n class=\"x-selected-filters-list__item\"\n data-test=\"selected-filters-list-item\"\n >\n <!--\n @slot Custom filter rendering. Dynamic slot defined in the template with the filter\n facet id. It renders the filter label by default.\n @binding {Filter} filter - Filter to render.\n -->\n <slot v-if=\"$scopedSlots[slotName]\" :name=\"slotName\" :filter=\"selectedFilter\">\n <span class=\"x-tag\">{{ selectedFilter.label }}</span>\n </slot>\n\n <!--\n @slot Default filter rendering. It renders the filter label by default.\n @binding {Filter} filter - Filter to render.\n -->\n <slot v-else name=\"default\" :filter=\"selectedFilter\">\n {{ selectedFilter.label }}\n </slot>\n </li>\n </component>\n </SelectedFilters>\n</template>\n\n<script lang=\"ts\">\n import { Component, Prop, Vue } from 'vue-property-decorator';\n import { Facet, Filter, isFacetFilter } from '@empathyco/x-types';\n import { xComponentMixin } from '../../../../components/x-component.mixin';\n import { toKebabCase } from '../../../../utils/string';\n import { facetsXModule } from '../../x-module';\n import SelectedFilters from './selected-filters.vue';\n\n /**\n * Custom interface to provide a slot name to a Filter.\n *\n * @internal\n */\n interface RenderFilter {\n slotName: string;\n selectedFilter: Filter;\n }\n\n /**\n * This component renders a list of selected filters from every facet, or from the facet\n * which facet id is passed as property. It uses the SelectedFilters component (state).\n *\n * It provides two slots: a scoped one which name is the filter facet id; and a default one.\n * Both exposes the filter and renders the filter label by default.\n *\n * The property \"alwaysVisible\" handles if the component is rendered if no filters are selected.\n *\n * @public\n */\n @Component({\n components: { SelectedFilters },\n mixins: [xComponentMixin(facetsXModule)]\n })\n export default class SelectedFiltersList extends Vue {\n /**\n * It is directly passed to the selected filters component. If a facet id is passed as prop,\n * the component filters the selected filters for that facet.\n *\n * @public\n */\n @Prop()\n protected facetId: Facet['id'] | undefined;\n\n /**\n * It is directly passed to the selected filters component. It handles if the SelectedFilters\n * component is always rendered no matter if no filters are selected.\n *\n * If true, the SelectedFilters component is always rendered.\n * If false, the SelectedFilters component is not rendered whether no filters are selected.\n *\n * @public\n */\n @Prop({ default: false })\n protected alwaysVisible!: boolean;\n\n /**\n * Animation component that will be used to animate the selected filters list.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n\n /**\n * Transforms a dictionary of Filters including the slot name.\n *\n * @param selectedFilters - A list of selected filters without slot name.\n *\n * @returns A dictionary of facets with the slot name.\n *\n * @internal\n */\n protected mapSlot(selectedFilters: Filter[]): RenderFilter[] {\n return selectedFilters.map(filter => ({\n slotName: isFacetFilter(filter) ? toKebabCase(filter.facetId as string) : 'default',\n selectedFilter: filter\n }));\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Example\n\nThis component renders a list of selected filters from every facet, or from the facet which facet id\nis passed as property. It uses the SelectedFilters component (state).\n\nIt provides two slots: a scoped one which name is the filter facet id; and a default one. Both\nexposes the filter and renders the filter label by default.\n\nThe property \"alwaysVisible\" handles if the component is rendered if no filters are selected.\n\n## Default usage\n\n```vue\n<template>\n <SelectedFiltersList />\n</template>\n\n<script>\n import { SelectedFiltersList } from '@empathyco/x-components/facets';\n\n export default {\n components: {\n SelectedFiltersList\n }\n };\n</script>\n```\n\n## Customized usage\n\n```vue\n<template>\n <SelectedFiltersList #default=\"{ filter }\">Default: {{ filter.label }}</SelectedFiltersList>\n</template>\n\n<script>\n import { SelectedFilters } from '@empathyco/x-components/facets';\n\n export default {\n components: {\n SelectedFilters\n }\n };\n</script>\n```\n\n```vue\n<template>\n <SelectedFiltersList>\n <template #default=\"{ filter }\">Default: {{ filter.label }}</template>\n <template #brand_facet=\"{ filter }\">Brand: {{ filter.label }}</template>\n <template #age_facet=\"{ filter }\">Age: {{ filter.label }}</template>\n <template #price_facet=\"{ filter }\">Price: {{ filter.label }}</template>\n </SelectedFiltersList>\n</template>\n\n<script>\n import { SelectedFilters } from '@empathyco/x-components/facets';\n\n export default {\n components: {\n SelectedFilters\n }\n };\n</script>\n```\n\n## Always visible\n\nIf \"alwaysVisible\" is true, the component is rendered no matter if there are some filter selected.\nIf \"alwaysVisible\" is false (default), the component is rendered if there are some filter selected.\n\n```vue\n<SelectedFiltersList :alwaysVisible=\"true\" />\n```\n\nOutput:\n\n```html\n<div class=\"x-selected-filters\">\n <ul class=\"x-selected-filters-list\" data-test=\"selected-filters-list\"></ul>\n</div>\n```\n\n## Providing a facet id\n\nIn this example, the selected filters computed are the ones that match the facet passed as property.\n\n```vue\n<SelectedFilters facetId=\"brand_facet\" />\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,7 +5,7 @@ import script from './selected-filters.vue_rollup-plugin-vue=script.js';
5
5
  var __vue_script__ = script;
6
6
 
7
7
  /* template */
8
- var __vue_render__ = function() {
8
+ var __vue_render__ = function () {
9
9
  var _vm = this;
10
10
  var _h = _vm.$createElement;
11
11
  var _c = _vm._self._c || _h;
@@ -16,13 +16,12 @@ var __vue_render__ = function() {
16
16
  [
17
17
  _vm._t(
18
18
  "default",
19
- function() {
19
+ function () {
20
20
  return [_vm._v(_vm._s(_vm.selectedFilters.length))]
21
21
  },
22
22
  null,
23
23
  { selectedFilters: _vm.selectedFilters }
24
- )
25
- ],
24
+ ) ],
26
25
  2
27
26
  )
28
27
  : _vm._e()
@@ -1 +1 @@
1
- {"version":3,"file":"selected-filters.vue.js","sources":["../../../../../../src/x-modules/facets/components/lists/selected-filters.vue"],"sourcesContent":["<template>\n <NoElement v-if=\"show\" class=\"x-selected-filters\">\n <slot v-bind=\"{ selectedFilters }\">{{ selectedFilters.length }}</slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import { Facet, Filter } from '@empathyco/x-types';\n import { Component, Prop, Vue } from 'vue-property-decorator';\n import { Getter } from '../../../../components/decorators/store.decorators';\n import { NoElement } from '../../../../components';\n import { xComponentMixin } from '../../../../components/x-component.mixin';\n import { FiltersByFacet } from '../../store/types';\n import { facetsXModule } from '../../x-module';\n\n /**\n * Provides a scoped slot with the selected filters from every facet, or from the facet which\n * facet id is passed as property.\n *\n * The default slot renders the length of the selected filters array.\n * The property \"alwaysVisible\" handles if the component is rendered if no filters are selected.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(facetsXModule)],\n components: {\n NoElement\n }\n })\n export default class SelectedFilters extends Vue {\n /**\n * If a facet id is passed as prop, the component filters the selected filters for that facet.\n *\n * @public\n */\n @Prop()\n protected facetId: Facet['id'] | undefined;\n\n /**\n * It handles if the SelectedFilters component is always rendered no matter if no filters are\n * selected.\n * If true, the SelectedFilters component is always rendered.\n * If false, the SelectedFilters component is not rendered whether no filters are selected.\n *\n * @public\n */\n @Prop({ default: false })\n protected alwaysVisible!: boolean;\n\n /**\n * Array of selected filters from every facet.\n *\n * @public\n */\n @Getter('facets', 'selectedFilters')\n public selectedFiltersGetter!: Filter[];\n\n /**\n * Dictionary of selected filters grouped by facet.\n *\n * @public\n */\n @Getter('facets', 'selectedFiltersByFacet')\n public selectedFiltersByFacet!: FiltersByFacet;\n\n /**\n * It returns an array of selected filters. If a facet id is passed as prop to the component,\n * only the selected filters of that facet are returned. If not, it returns selected filters of\n * every facet.\n *\n * @returns Array of selected filters.\n *\n * @internal\n */\n protected get selectedFilters(): Filter[] {\n return this.facetId === undefined\n ? this.selectedFiltersGetter\n : this.selectedFiltersByFacet[this.facetId] ?? [];\n }\n\n /**\n * If \"alwaysVisible\" prop is true, returns true.\n * If \"alwaysVisible\" prop is false, returns true or false depending on if there are some\n * filter selected.\n *\n * @returns True if \"alwaysVisible\" is true. True or false depending on if there are some filter\n * selected.\n *\n * @internal\n */\n protected get show(): boolean {\n return this.alwaysVisible || this.selectedFilters.length > 0;\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nProvides a scoped slot with the selected filters from every facet, or from the facet which facet id\nis passed as property.\n\nThe default slot renders the length of the selected filters array.\n\n## Basic usage\n\n```vue\n<SelectedFilters />\n```\n\n## Always visible\n\nIf \"alwaysVisible\" is true, the component is rendered no matter if there are some filter selected.\nIf \"alwaysVisible\" is false (default), the component is rendered if there are some filter selected.\n\n```vue\n<SelectedFilters />\n```\n\nOutput:\n\n```html\n<div class=\"x-selected-filters\">1</div>\n```\n\n## Customizing its content\n\nIn this example, renders a custom message using the default scoped slot.\n\n```vue\n<SelectedFilters>\n <template #default=\"{ selectedFilters }\">\n Selected filters: {{ selectedFilters.length }}\n </template>\n</SelectedFilters>\n```\n\nOutput:\n\n```html\n<div class=\"x-selected-filters\">Selected filters: 1</div>\n```\n\nIn this example, the selected filters computed are the ones that match the facet passed as property.\n\n```vue\n<SelectedFilters facetId=\"brand_facet\" />\n```\n\n```vue\n<SelectedFilters facetId=\"brand_facet\">\n <template #default=\"{ selectedFilters }\">\n Selected filters: {{ selectedFilters.length }}\n </template>\n</SelectedFilters>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"selected-filters.vue.js","sources":["../../../../../../src/x-modules/facets/components/lists/selected-filters.vue"],"sourcesContent":["<template>\n <NoElement v-if=\"show\" class=\"x-selected-filters\">\n <slot v-bind=\"{ selectedFilters }\">{{ selectedFilters.length }}</slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import { Facet, Filter } from '@empathyco/x-types';\n import { Component, Prop, Vue } from 'vue-property-decorator';\n import { Getter } from '../../../../components/decorators/store.decorators';\n import { NoElement } from '../../../../components';\n import { xComponentMixin } from '../../../../components/x-component.mixin';\n import { FiltersByFacet } from '../../store/types';\n import { facetsXModule } from '../../x-module';\n\n /**\n * Provides a scoped slot with the selected filters from every facet, or from the facet which\n * facet id is passed as property.\n *\n * The default slot renders the length of the selected filters array.\n * The property \"alwaysVisible\" handles if the component is rendered if no filters are selected.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(facetsXModule)],\n components: {\n NoElement\n }\n })\n export default class SelectedFilters extends Vue {\n /**\n * If a facet id is passed as prop, the component filters the selected filters for that facet.\n *\n * @public\n */\n @Prop()\n protected facetId: Facet['id'] | undefined;\n\n /**\n * It handles if the SelectedFilters component is always rendered no matter if no filters are\n * selected.\n * If true, the SelectedFilters component is always rendered.\n * If false, the SelectedFilters component is not rendered whether no filters are selected.\n *\n * @public\n */\n @Prop({ default: false })\n protected alwaysVisible!: boolean;\n\n /**\n * Array of selected filters from every facet.\n *\n * @public\n */\n @Getter('facets', 'selectedFilters')\n public selectedFiltersGetter!: Filter[];\n\n /**\n * Dictionary of selected filters grouped by facet.\n *\n * @public\n */\n @Getter('facets', 'selectedFiltersByFacet')\n public selectedFiltersByFacet!: FiltersByFacet;\n\n /**\n * It returns an array of selected filters. If a facet id is passed as prop to the component,\n * only the selected filters of that facet are returned. If not, it returns selected filters of\n * every facet.\n *\n * @returns Array of selected filters.\n *\n * @internal\n */\n protected get selectedFilters(): Filter[] {\n return this.facetId === undefined\n ? this.selectedFiltersGetter\n : this.selectedFiltersByFacet[this.facetId] ?? [];\n }\n\n /**\n * If \"alwaysVisible\" prop is true, returns true.\n * If \"alwaysVisible\" prop is false, returns true or false depending on if there are some\n * filter selected.\n *\n * @returns True if \"alwaysVisible\" is true. True or false depending on if there are some filter\n * selected.\n *\n * @internal\n */\n protected get show(): boolean {\n return this.alwaysVisible || this.selectedFilters.length > 0;\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nProvides a scoped slot with the selected filters from every facet, or from the facet which facet id\nis passed as property.\n\nThe default slot renders the length of the selected filters array.\n\n## Basic usage\n\n```vue\n<SelectedFilters />\n```\n\n## Always visible\n\nIf \"alwaysVisible\" is true, the component is rendered no matter if there are some filter selected.\nIf \"alwaysVisible\" is false (default), the component is rendered if there are some filter selected.\n\n```vue\n<SelectedFilters />\n```\n\nOutput:\n\n```html\n<div class=\"x-selected-filters\">1</div>\n```\n\n## Customizing its content\n\nIn this example, renders a custom message using the default scoped slot.\n\n```vue\n<SelectedFilters>\n <template #default=\"{ selectedFilters }\">\n Selected filters: {{ selectedFilters.length }}\n </template>\n</SelectedFilters>\n```\n\nOutput:\n\n```html\n<div class=\"x-selected-filters\">Selected filters: 1</div>\n```\n\nIn this example, the selected filters computed are the ones that match the facet passed as property.\n\n```vue\n<SelectedFilters facetId=\"brand_facet\" />\n```\n\n```vue\n<SelectedFilters facetId=\"brand_facet\">\n <template #default=\"{ selectedFilters }\">\n Selected filters: {{ selectedFilters.length }}\n </template>\n</SelectedFilters>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -87,9 +87,6 @@ import '../../../../components/result/base-result-fallback-image.vue.js';
87
87
  import '../../../../components/result/base-result-placeholder-image.vue.js';
88
88
  import '../../../../components/scroll/scroll.mixin.js';
89
89
  import '../../../../components/scroll/base-scroll.vue.js';
90
- import '../../../../components/scroll/base-id-scroll.vue.js';
91
- import '../../../../components/scroll/base-scroll-to-top.vue.js';
92
- import '../../../../components/scroll/base-main-scroll.vue.js';
93
90
  import '../../../../components/suggestions/base-suggestion.vue.js';
94
91
  import '../../../../components/suggestions/base-suggestions.vue.js';
95
92
  import '../../../../components/auto-progress-bar.vue.js';
@@ -100,12 +97,15 @@ import '../../../../components/base-variable-column-grid.vue.js';
100
97
  import '../../../../components/decorators/debounce.decorators.js';
101
98
  import '../../../../components/sliding-panel.vue.js';
102
99
  import '../../../../components/items-list.vue.js';
103
- import '../../../../components/layouts/multi-column-max-width-layout.vue.js';
104
- import '../../../../components/layouts/single-column-layout.vue.js';
105
100
  import { Getter } from '../../../../components/decorators/store.decorators.js';
106
- import '../../../../components/items-list-injection.mixin.js';
107
101
  import '../../../../components/x-component.utils.js';
108
102
  import { xComponentMixin } from '../../../../components/x-component.mixin.js';
103
+ import '../../../../components/layouts/multi-column-max-width-layout.vue.js';
104
+ import '../../../../components/layouts/single-column-layout.vue.js';
105
+ import '../../../../components/location-provider.vue.js';
106
+ import '../../../../components/global-x-bus.vue.js';
107
+ import '../../../../components/snippet-callbacks.vue.js';
108
+ import '../../../../components/items-list-injection.mixin.js';
109
109
  import { facetsXModule } from '../../x-module.js';
110
110
 
111
111
  /**
@@ -5,7 +5,7 @@ import script from './sliced-filters.vue_rollup-plugin-vue=script.js';
5
5
  var __vue_script__ = script;
6
6
 
7
7
  /* template */
8
- var __vue_render__ = function() {
8
+ var __vue_render__ = function () {
9
9
  var _vm = this;
10
10
  var _h = _vm.$createElement;
11
11
  var _c = _vm._self._c || _h;
@@ -14,7 +14,7 @@ var __vue_render__ = function() {
14
14
  {
15
15
  staticClass: "x-sliced-filters",
16
16
  class: _vm.cssClasses,
17
- attrs: { "data-test": "filters-show-more" }
17
+ attrs: { "data-test": "filters-show-more" },
18
18
  },
19
19
  [
20
20
  _vm._t("default", null, { slicedFilters: _vm.slicedFilters }),
@@ -28,12 +28,12 @@ var __vue_render__ = function() {
28
28
  staticClass:
29
29
  "x-filter x-sliced-filters__button x-sliced-filters__button--show-more",
30
30
  attrs: { "data-test": "sliced-filters-show-more-button" },
31
- on: { click: _vm.toggleShowMoreFilters }
31
+ on: { click: _vm.toggleShowMoreFilters },
32
32
  },
33
33
  [
34
34
  _vm._t(
35
35
  "show-more",
36
- function() {
36
+ function () {
37
37
  return [
38
38
  _vm._v("\n Show\n "),
39
39
  _c(
@@ -41,12 +41,10 @@ var __vue_render__ = function() {
41
41
  { attrs: { "data-test": "show-more-amount" } },
42
42
  [_vm._v(_vm._s(_vm.difference))]
43
43
  ),
44
- _vm._v("\n more filters\n ")
45
- ]
44
+ _vm._v("\n more filters\n ") ]
46
45
  },
47
46
  { difference: _vm.difference }
48
- )
49
- ],
47
+ ) ],
50
48
  2
51
49
  )
52
50
  : _c(
@@ -55,12 +53,12 @@ var __vue_render__ = function() {
55
53
  staticClass:
56
54
  "x-filter x-sliced-filters__button x-sliced-filters__button--show-less",
57
55
  attrs: { "data-test": "sliced-filters-show-less-button" },
58
- on: { click: _vm.toggleShowMoreFilters }
56
+ on: { click: _vm.toggleShowMoreFilters },
59
57
  },
60
58
  [
61
59
  _vm._t(
62
60
  "show-less",
63
- function() {
61
+ function () {
64
62
  return [
65
63
  _vm._v("\n Show\n "),
66
64
  _c(
@@ -68,17 +66,13 @@ var __vue_render__ = function() {
68
66
  { attrs: { "data-test": "show-less-amount" } },
69
67
  [_vm._v(_vm._s(_vm.difference))]
70
68
  ),
71
- _vm._v("\n less filters\n ")
72
- ]
69
+ _vm._v("\n less filters\n ") ]
73
70
  },
74
71
  { difference: _vm.difference }
75
- )
76
- ],
72
+ ) ],
77
73
  2
78
- )
79
- ]
80
- : _vm._e()
81
- ],
74
+ ) ]
75
+ : _vm._e() ],
82
76
  2
83
77
  )
84
78
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sliced-filters.vue.js","sources":["../../../../../../src/x-modules/facets/components/lists/sliced-filters.vue"],"sourcesContent":["<template>\n <div class=\"x-sliced-filters\" :class=\"cssClasses\" data-test=\"filters-show-more\">\n <!--\n @slot (Required) Sliced filters content.\n @binding {Filter[]} slicedFilters - Sliced filters..\n -->\n <slot :slicedFilters=\"slicedFilters\" />\n <template v-if=\"showButton\">\n <button\n v-if=\"showMoreFilters\"\n @click=\"toggleShowMoreFilters\"\n class=\"x-filter x-sliced-filters__button x-sliced-filters__button--show-more\"\n data-test=\"sliced-filters-show-more-button\"\n >\n <!--\n @slot Button show more filters.\n @binding {number} difference - The difference between the filters and max to show.\n -->\n <slot name=\"show-more\" :difference=\"difference\">\n Show\n <span data-test=\"show-more-amount\">{{ difference }}</span>\n more filters\n </slot>\n </button>\n <button\n v-else\n @click=\"toggleShowMoreFilters\"\n class=\"x-filter x-sliced-filters__button x-sliced-filters__button--show-less\"\n data-test=\"sliced-filters-show-less-button\"\n >\n <!--\n @slot Button show less filters.\n @binding {number} difference - The difference between the filters and max to show.\n -->\n <slot name=\"show-less\" :difference=\"difference\">\n Show\n <span data-test=\"show-less-amount\">{{ difference }}</span>\n less filters\n </slot>\n </button>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Filter } from '@empathyco/x-types';\n import { mixins } from 'vue-class-component';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin, XProvide } from '../../../../components';\n import { VueCSSClasses } from '../../../../utils';\n import { facetsXModule } from '../../x-module';\n import FiltersInjectionMixin from './filters-injection.mixin';\n\n /**\n * Component that slices a list of filters and returns them using the default scoped slot,\n * allowing the user to show the full list of them or slicing them again using the\n * show more/less buttons.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(facetsXModule)]\n })\n export default class SlicedFilters extends mixins(FiltersInjectionMixin) {\n /** The maximum number of filters to show.\n *\n * @public\n * */\n @Prop({ required: true })\n protected max!: number;\n\n /** For showing the remaining filters. */\n public showMoreFilters = true;\n\n /**\n * Show the buttons template when length filters is greater than property max.\n *\n * @returns Boolean if length filters is greater than property max.\n * @internal\n */\n protected get showButton(): boolean {\n return this.renderedFilters.length > this.max;\n }\n\n /**\n * Sliced the array of filters depends on click button show more.\n *\n * @returns Array of sliced filters or all filters.\n * @internal\n */\n @XProvide('filters')\n public get slicedFilters(): Filter[] {\n return this.showMoreFilters ? this.renderedFilters.slice(0, this.max) : this.renderedFilters;\n }\n\n /**\n * The difference between length filters and max to show.\n *\n * @returns Number of remaining filters to show.\n * @internal\n */\n protected get difference(): number {\n return this.renderedFilters.length - this.max;\n }\n\n /**\n * Show or hide the remaining filters. It also emits a Vue event based on the clicked button.\n *\n * @param event - The click event.\n *\n * @internal\n */\n protected toggleShowMoreFilters(event: MouseEvent): void {\n this.showMoreFilters = !this.showMoreFilters;\n this.$emit(this.showMoreFilters ? 'click:show-less' : 'click:show-more', event);\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The classes to be added to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-sliced-filters--is-sliced': this.showButton\n };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Example\n\nThe sliced filters component, takes a list of filters, and the maximum number of filters to render\nas prop. Then, it slices the list of filters using the `max` prop, and returns this new filters list\nusing the default scoped slot.\n\nThe user can click the show more button if he wants to see the full list of filters, or the show\nless button when he wants to reset the filters. This buttons text or icons can be configured via\nslot too. They receive a `difference` prop which can be useful for writing friendlier messages.\n\nThis component is usually integrated with the `Facets` and `Filters` component. It is useful when\nthere are lots of available filters for a single facet, helping to improve the app performance, as\nless nodes are rendered.\n\n## Important\n\nThe component has two ways of receive the filters list, it can be injected by another component or\nbe send it as a prop. If the component doesnt have a parent component that receive and exposed a\nfilters list to their children, it is mandatory to send it as prop.\n\n## Basic usage\n\n```vue\n<template>\n <Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"4\">\n <template #default=\"{ slicedFilters }\">\n <Filters :items=\"slicedFilters\" v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\" />\n </Filters>\n </template>\n <template #show-more=\"{ difference }\">Show {{ difference }} more filters</template>\n <template #show-less=\"{ difference }\">Show {{ difference }} less filters</template>\n </SlicedFilters>\n </Facets>\n</template>\n<script>\n import { BaseShowMoreFilters } from '@empathyco/x-components';\n import { Facets, SimpleFilter, Filters } from '@empathyco/x-components';\n\n export default {\n components: {\n Facets,\n BaseShowMoreFilters,\n Filters,\n SimpleFilter\n }\n };\n</script>\n```\n\n> **Using injection**: It can receive the filters list by injection. It only works if it has a\n> parent component that receives and exposes the filters list. Using the injection, It is not\n> necessary to send the prop to the child components, it has to be send it in the parent component ,\n> the rest of components will inject this list.\n\n```vue\n<Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"4\">\n <Filters v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\"/>\n </Filters>\n <template #show-more=\"{ difference }\">Show {{ difference }} more filters</template>\n <template #show-less=\"{ difference }\">Show {{ difference }} less filters</template>\n </SlicedFilters>\n</Facets>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"sliced-filters.vue.js","sources":["../../../../../../src/x-modules/facets/components/lists/sliced-filters.vue"],"sourcesContent":["<template>\n <div class=\"x-sliced-filters\" :class=\"cssClasses\" data-test=\"filters-show-more\">\n <!--\n @slot (Required) Sliced filters content.\n @binding {Filter[]} slicedFilters - Sliced filters..\n -->\n <slot :slicedFilters=\"slicedFilters\" />\n <template v-if=\"showButton\">\n <button\n v-if=\"showMoreFilters\"\n @click=\"toggleShowMoreFilters\"\n class=\"x-filter x-sliced-filters__button x-sliced-filters__button--show-more\"\n data-test=\"sliced-filters-show-more-button\"\n >\n <!--\n @slot Button show more filters.\n @binding {number} difference - The difference between the filters and max to show.\n -->\n <slot name=\"show-more\" :difference=\"difference\">\n Show\n <span data-test=\"show-more-amount\">{{ difference }}</span>\n more filters\n </slot>\n </button>\n <button\n v-else\n @click=\"toggleShowMoreFilters\"\n class=\"x-filter x-sliced-filters__button x-sliced-filters__button--show-less\"\n data-test=\"sliced-filters-show-less-button\"\n >\n <!--\n @slot Button show less filters.\n @binding {number} difference - The difference between the filters and max to show.\n -->\n <slot name=\"show-less\" :difference=\"difference\">\n Show\n <span data-test=\"show-less-amount\">{{ difference }}</span>\n less filters\n </slot>\n </button>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Filter } from '@empathyco/x-types';\n import { mixins } from 'vue-class-component';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin, XProvide } from '../../../../components';\n import { VueCSSClasses } from '../../../../utils';\n import { facetsXModule } from '../../x-module';\n import FiltersInjectionMixin from './filters-injection.mixin';\n\n /**\n * Component that slices a list of filters and returns them using the default scoped slot,\n * allowing the user to show the full list of them or slicing them again using the\n * show more/less buttons.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(facetsXModule)]\n })\n export default class SlicedFilters extends mixins(FiltersInjectionMixin) {\n /** The maximum number of filters to show.\n *\n * @public\n * */\n @Prop({ required: true })\n protected max!: number;\n\n /** For showing the remaining filters. */\n public showMoreFilters = true;\n\n /**\n * Show the buttons template when length filters is greater than property max.\n *\n * @returns Boolean if length filters is greater than property max.\n * @internal\n */\n protected get showButton(): boolean {\n return this.renderedFilters.length > this.max;\n }\n\n /**\n * Sliced the array of filters depends on click button show more.\n *\n * @returns Array of sliced filters or all filters.\n * @internal\n */\n @XProvide('filters')\n public get slicedFilters(): Filter[] {\n return this.showMoreFilters ? this.renderedFilters.slice(0, this.max) : this.renderedFilters;\n }\n\n /**\n * The difference between length filters and max to show.\n *\n * @returns Number of remaining filters to show.\n * @internal\n */\n protected get difference(): number {\n return this.renderedFilters.length - this.max;\n }\n\n /**\n * Show or hide the remaining filters. It also emits a Vue event based on the clicked button.\n *\n * @param event - The click event.\n *\n * @internal\n */\n protected toggleShowMoreFilters(event: MouseEvent): void {\n this.showMoreFilters = !this.showMoreFilters;\n this.$emit(this.showMoreFilters ? 'click:show-less' : 'click:show-more', event);\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The classes to be added to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-sliced-filters--is-sliced': this.showButton\n };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Example\n\nThe sliced filters component, takes a list of filters, and the maximum number of filters to render\nas prop. Then, it slices the list of filters using the `max` prop, and returns this new filters list\nusing the default scoped slot.\n\nThe user can click the show more button if he wants to see the full list of filters, or the show\nless button when he wants to reset the filters. This buttons text or icons can be configured via\nslot too. They receive a `difference` prop which can be useful for writing friendlier messages.\n\nThis component is usually integrated with the `Facets` and `Filters` component. It is useful when\nthere are lots of available filters for a single facet, helping to improve the app performance, as\nless nodes are rendered.\n\n## Important\n\nThe component has two ways of receive the filters list, it can be injected by another component or\nbe send it as a prop. If the component doesnt have a parent component that receive and exposed a\nfilters list to their children, it is mandatory to send it as prop.\n\n## Basic usage\n\n```vue\n<template>\n <Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"4\">\n <template #default=\"{ slicedFilters }\">\n <Filters :items=\"slicedFilters\" v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\" />\n </Filters>\n </template>\n <template #show-more=\"{ difference }\">\n Show\n <span data-test=\"show-more-amount\">{{ difference }}</span>\n more filters\n </template>\n <template #show-less=\"{ difference }\">\n Show\n <span data-test=\"show-less-amount\">{{ difference }}</span>\n less filters\n </template>\n </SlicedFilters>\n </Facets>\n</template>\n<script>\n import { BaseShowMoreFilters } from '@empathyco/x-components';\n import { Facets, SimpleFilter, Filters } from '@empathyco/x-components';\n\n export default {\n components: {\n Facets,\n BaseShowMoreFilters,\n Filters,\n SimpleFilter\n }\n };\n</script>\n```\n\n> **Using injection**: It can receive the filters list by injection. It only works if it has a\n> parent component that receives and exposes the filters list. Using the injection, It is not\n> necessary to send the prop to the child components, it has to be send it in the parent component ,\n> the rest of components will inject this list.\n\n```vue\n<Facets v-slot=\"{ facet }\">\n <SlicedFilters :filters=\"facet.filters\" :max=\"4\">\n <Filters v-slot=\"{ filter }\">\n <SimpleFilter :filter=\"filter\"/>\n </Filters>\n <template #show-more=\"{ difference }\">Show {{ difference }} more filters</template>\n <template #show-less=\"{ difference }\">Show {{ difference }} less filters</template>\n </SlicedFilters>\n</Facets>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -88,9 +88,6 @@ import '../../../../components/result/base-result-fallback-image.vue.js';
88
88
  import '../../../../components/result/base-result-placeholder-image.vue.js';
89
89
  import '../../../../components/scroll/scroll.mixin.js';
90
90
  import '../../../../components/scroll/base-scroll.vue.js';
91
- import '../../../../components/scroll/base-id-scroll.vue.js';
92
- import '../../../../components/scroll/base-scroll-to-top.vue.js';
93
- import '../../../../components/scroll/base-main-scroll.vue.js';
94
91
  import '../../../../components/suggestions/base-suggestion.vue.js';
95
92
  import '../../../../components/suggestions/base-suggestions.vue.js';
96
93
  import '../../../../components/auto-progress-bar.vue.js';
@@ -101,12 +98,15 @@ import '../../../../components/base-variable-column-grid.vue.js';
101
98
  import '../../../../components/decorators/debounce.decorators.js';
102
99
  import '../../../../components/sliding-panel.vue.js';
103
100
  import '../../../../components/items-list.vue.js';
104
- import '../../../../components/layouts/multi-column-max-width-layout.vue.js';
105
- import '../../../../components/layouts/single-column-layout.vue.js';
106
101
  import '../../../../components/decorators/store.decorators.js';
107
- import '../../../../components/items-list-injection.mixin.js';
108
102
  import '../../../../components/x-component.utils.js';
109
103
  import { xComponentMixin } from '../../../../components/x-component.mixin.js';
104
+ import '../../../../components/layouts/multi-column-max-width-layout.vue.js';
105
+ import '../../../../components/layouts/single-column-layout.vue.js';
106
+ import '../../../../components/location-provider.vue.js';
107
+ import '../../../../components/global-x-bus.vue.js';
108
+ import '../../../../components/snippet-callbacks.vue.js';
109
+ import '../../../../components/items-list-injection.mixin.js';
110
110
  import { facetsXModule } from '../../x-module.js';
111
111
  import FiltersInjectionMixin from './filters-injection.mixin.js';
112
112
 
@@ -19,6 +19,7 @@ import '../../../../utils/html.js';
19
19
  import '../../../../utils/normalize.js';
20
20
  import '../../../../utils/number.js';
21
21
  import '../../../../utils/object.js';
22
+ import '../../../../utils/origin.js';
22
23
  import '../../../../utils/sanitize.js';
23
24
  import '../../../../utils/storage.js';
24
25
  import '../../../../utils/string.js';
@@ -104,9 +105,6 @@ import '../../../../components/result/base-result-fallback-image.vue.js';
104
105
  import '../../../../components/result/base-result-placeholder-image.vue.js';
105
106
  import '../../../../components/scroll/scroll.mixin.js';
106
107
  import '../../../../components/scroll/base-scroll.vue.js';
107
- import '../../../../components/scroll/base-id-scroll.vue.js';
108
- import '../../../../components/scroll/base-scroll-to-top.vue.js';
109
- import '../../../../components/scroll/base-main-scroll.vue.js';
110
108
  import '../../../../components/suggestions/base-suggestion.vue.js';
111
109
  import '../../../../components/suggestions/base-suggestions.vue.js';
112
110
  import '../../../../components/auto-progress-bar.vue.js';
@@ -117,12 +115,15 @@ import '../../../../components/base-variable-column-grid.vue.js';
117
115
  import '../../../../components/decorators/debounce.decorators.js';
118
116
  import '../../../../components/sliding-panel.vue.js';
119
117
  import '../../../../components/items-list.vue.js';
120
- import '../../../../components/layouts/multi-column-max-width-layout.vue.js';
121
- import '../../../../components/layouts/single-column-layout.vue.js';
122
118
  import '../../../../components/decorators/store.decorators.js';
123
- import '../../../../components/items-list-injection.mixin.js';
124
119
  import '../../../../components/x-component.utils.js';
125
120
  import { xComponentMixin } from '../../../../components/x-component.mixin.js';
121
+ import '../../../../components/layouts/multi-column-max-width-layout.vue.js';
122
+ import '../../../../components/layouts/single-column-layout.vue.js';
123
+ import '../../../../components/location-provider.vue.js';
124
+ import '../../../../components/global-x-bus.vue.js';
125
+ import '../../../../components/snippet-callbacks.vue.js';
126
+ import '../../../../components/items-list-injection.mixin.js';
126
127
  import { isBooleanFilter } from '@empathyco/x-types';
127
128
  import { facetsXModule } from '../../x-module.js';
128
129
  import FiltersInjectionMixin from './filters-injection.mixin.js';
@@ -1 +1 @@
1
- {"version":3,"file":"sorted-filters.vue_rollup-plugin-vue=script.js","sources":["../../../../../../src/x-modules/facets/components/lists/sorted-filters.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { BooleanFilter, Filter, isBooleanFilter } from '@empathyco/x-types';\nimport { mixins } from 'vue-class-component';\nimport { Component } from 'vue-property-decorator';\nimport { CreateElement, VNode } from 'vue';\nimport { xComponentMixin, XProvide } from '../../../../components';\nimport { isArrayEmpty } from '../../../../utils';\nimport { facetsXModule } from '../../x-module';\nimport FiltersInjectionMixin from './filters-injection.mixin';\n\n/**\n * Component that sorts a list of filters and returns them using the default scoped slot.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(facetsXModule)]\n})\nexport default class SortedFilters extends mixins(FiltersInjectionMixin) {\n /**\n * An array of filters with the selected filters at the beginning of the list.\n *\n * @returns Array of filters.\n * @internal\n */\n @XProvide('filters')\n public get sortedFilters(): Filter[] {\n if (!isArrayEmpty(this.renderedFilters) && isBooleanFilter(this.renderedFilters[0])) {\n return ([...this.renderedFilters] as BooleanFilter[]).sort(({ selected }) => {\n return selected ? -1 : 1;\n });\n }\n\n return this.renderedFilters;\n }\n\n render(h: CreateElement): VNode {\n return this.$scopedSlots.default?.({ filters: this.sortedFilters })?.[0] ?? h();\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;AAQA;IAA2C,iCAA6B;IAAxE;;KAqBC;IAbC,sBAAW,wCAAa;;;;;;;aAAxB;YACE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE;gBACnF,OAAQ,kBAAI,IAAI,CAAC,eAAe,CAAqB,CAAC,IAAI,CAAC,UAAC,EAAY;wBAAV,QAAQ,cAAA;oBACpE,OAAO,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;iBAC1B,CAAC,CAAC;aACJ;YAED,OAAO,IAAI,CAAC,eAAe,CAAC;SAC7B;;;OAAA;IAED,8BAAM,GAAN,UAAO,CAAgB;;QACrB,OAAO,MAAA,MAAA,MAAA,MAAA,IAAI,CAAC,YAAY,EAAC,OAAO,mDAAG,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,0CAAG,CAAC,CAAC,mCAAI,CAAC,EAAE,CAAC;KACjF;IAZD;QADC,QAAQ,CAAC,SAAS,CAAC;sDASnB;IAhBkB,aAAa;QAHjC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,aAAa,CAqBjC;IAAD,oBAAC;CArBD,CAA2C,MAAM,CAAC,qBAAqB,CAAC;;;;"}
1
+ {"version":3,"file":"sorted-filters.vue_rollup-plugin-vue=script.js","sources":["../../../../../../src/x-modules/facets/components/lists/sorted-filters.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { BooleanFilter, Filter, isBooleanFilter } from '@empathyco/x-types';\nimport { mixins } from 'vue-class-component';\nimport { Component } from 'vue-property-decorator';\nimport { CreateElement, VNode } from 'vue';\nimport { xComponentMixin, XProvide } from '../../../../components';\nimport { isArrayEmpty } from '../../../../utils';\nimport { facetsXModule } from '../../x-module';\nimport FiltersInjectionMixin from './filters-injection.mixin';\n\n/**\n * Component that sorts a list of filters and returns them using the default scoped slot.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(facetsXModule)]\n})\nexport default class SortedFilters extends mixins(FiltersInjectionMixin) {\n /**\n * An array of filters with the selected filters at the beginning of the list.\n *\n * @returns Array of filters.\n * @internal\n */\n @XProvide('filters')\n public get sortedFilters(): Filter[] {\n if (!isArrayEmpty(this.renderedFilters) && isBooleanFilter(this.renderedFilters[0])) {\n return ([...this.renderedFilters] as BooleanFilter[]).sort(({ selected }) => {\n return selected ? -1 : 1;\n });\n }\n\n return this.renderedFilters;\n }\n\n render(h: CreateElement): VNode {\n return this.$scopedSlots.default?.({ filters: this.sortedFilters })?.[0] ?? h();\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;AAQA;IAA2C,iCAA6B;IAAxE;;KAqBC;IAbC,sBAAW,wCAAa;;;;;;;aAAxB;YACE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE;gBACnF,OAAQ,kBAAI,IAAI,CAAC,eAAe,CAAqB,CAAC,IAAI,CAAC,UAAC,EAAY;wBAAV,QAAQ,cAAA;oBACpE,OAAO,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;iBAC1B,CAAC,CAAC;aACJ;YAED,OAAO,IAAI,CAAC,eAAe,CAAC;SAC7B;;;OAAA;IAED,8BAAM,GAAN,UAAO,CAAgB;;QACrB,OAAO,MAAA,MAAA,MAAA,MAAA,IAAI,CAAC,YAAY,EAAC,OAAO,mDAAG,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,0CAAG,CAAC,CAAC,mCAAI,CAAC,EAAE,CAAC;KACjF;IAZD;QADC,QAAQ,CAAC,SAAS,CAAC;sDASnB;IAhBkB,aAAa;QAHjC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,aAAa,CAqBjC;IAAD,oBAAC;CArBD,CAA2C,MAAM,CAAC,qBAAqB,CAAC;;;;"}
@@ -11,6 +11,7 @@ import '../../../utils/html.js';
11
11
  import '../../../utils/normalize.js';
12
12
  import '../../../utils/number.js';
13
13
  import '../../../utils/object.js';
14
+ import '../../../utils/origin.js';
14
15
  import '../../../utils/sanitize.js';
15
16
  import '../../../utils/storage.js';
16
17
  import '../../../utils/string.js';
@@ -1 +1 @@
1
- {"version":3,"file":"facets.service.js","sources":["../../../../../src/x-modules/facets/service/facets.service.ts"],"sourcesContent":["import { Facet, Filter, isFacetFilter } from '@empathyco/x-types';\nimport { Store } from 'vuex';\nimport { XPlugin } from '../../../plugins/index';\nimport { RootXStoreState } from '../../../store/index';\nimport { arrayToObject, groupItemsBy, isArrayEmpty } from '../../../utils/index';\nimport { FilterEntityFactory } from '../entities/filter-entity.factory';\nimport { FilterEntity } from '../entities/types';\nimport { FacetGroupEntry, FacetsGetters } from '../store/types';\nimport { FacetsGroup, FacetsService } from './types';\n\n/**\n * Default implementation for the {@link FacetsService}.\n *\n * @public\n */\nexport class DefaultFacetsService implements FacetsService {\n /**\n * Global instance of the {@link FacetsService}.\n */\n public static instance: FacetsService = new DefaultFacetsService();\n\n public constructor(\n protected filterEntityFactory: FilterEntityFactory = FilterEntityFactory.instance\n ) {}\n\n /**\n * The {@link https://vuex.vuejs.org/ | Vuex} store to use in the service.\n *\n * @returns The store.\n * @internal\n */\n protected get store(): Store<RootXStoreState> {\n return XPlugin.store;\n }\n\n setFacets(facetsGroup: FacetsGroup): void {\n const newFilters = this.updateStore(facetsGroup);\n /* Ensures that filters are selected with valid values. For example, you can't set a single\n select facet with 2 or more selected filters */\n this.updateFiltersSelectedState(newFilters);\n }\n\n updateFacets(facetsGroup: FacetsGroup): void {\n const selectedFilters = this.getSelectedFilters();\n const newFilters = this.updateStore(facetsGroup);\n this.updateFiltersSelectedState(newFilters, selectedFilters);\n }\n\n clearFilters(facetIds?: Array<Facet['id']>): void {\n this.getSelectedFilters()\n .filter(filter => !facetIds || (isFacetFilter(filter) && facetIds.includes(filter.facetId)))\n .forEach(this.deselect.bind(this));\n }\n\n deselect(filter: Filter): void {\n this.getFilterEntity(filter).deselect(filter);\n }\n\n select(filterOrFilters: Filter | Filter[]): void {\n const filters = Array.isArray(filterOrFilters) ? filterOrFilters : [filterOrFilters];\n filters.forEach(filter => this.getFilterEntity(filter).select(filter));\n }\n\n toggle(filter: Filter): void {\n if (filter.selected) {\n this.deselect(filter);\n } else {\n this.select(filter);\n }\n }\n\n /**\n * Creates an entity from a filter DTO.\n *\n * @param filter - The filter to create an entity from.\n * @returns The filter entity.\n * @internal\n */\n protected getFilterEntity(filter: Filter): FilterEntity {\n return this.filterEntityFactory.getFilterEntity(this.store, filter);\n }\n\n /**\n * Sets in the store the Facets, the Filters and the FacetsGroup, without applying any logic\n * to the selected state.\n *\n * @param facetsGroup - The {@link FacetsGroup} to set into the store state.\n * @returns An array with the new filters.\n * @internal\n */\n protected updateStore(facetsGroup: FacetsGroup): Filter[] {\n this.removeGroupFacets(facetsGroup.id);\n this.removeGroupFilters(facetsGroup.id);\n facetsGroup.facets.forEach(facet => {\n this.setFacetGroup({ facetId: facet.id, groupId: facetsGroup.id });\n this.setFacet(facet);\n });\n const newFilters = facetsGroup.facets.flatMap(facet => facet.filters);\n this.setFilters(newFilters);\n return newFilters;\n }\n\n /**\n * Retrieves the selected filters from the store.\n *\n * @returns The list of selected filters of the store.\n * @internal\n */\n protected getSelectedFilters(): FacetsGetters['selectedFilters'] {\n return this.store.getters['x/facets/selectedFilters'];\n }\n\n /**\n * Changes the filters selection state to match the store.\n *\n * @param newFilters - The list of filters to save.\n * @param previousFilters - (Optional) The list of old filters, used to set the `newFilters`\n * selected state.\n */\n protected updateFiltersSelectedState(newFilters: Filter[], previousFilters?: Filter[]): void {\n if (!isArrayEmpty(newFilters)) {\n const newStateFiltersMap = arrayToObject(previousFilters ?? newFilters, 'id');\n newFilters.forEach(filter => {\n const filterEntity = this.getFilterEntity(filter);\n if (newStateFiltersMap[filter.id]?.selected) {\n filterEntity.select(filter);\n } else {\n filterEntity.deselect(filter);\n }\n });\n }\n }\n\n /**\n * Removes the filters that belong to the given group.\n *\n * @param groupId - The id of the group from whom remove the filters that are in the store.\n *\n * @returns The removed filters.\n *\n * @internal\n */\n protected removeGroupFilters(groupId: FacetsGroup['id']): Filter[] {\n const filtersToRemove =\n groupItemsBy(Object.values(this.store.state.x.facets.filters), filter =>\n isFacetFilter(filter)\n ? this.store.state.x.facets.groups[filter.facetId]\n : '__unknown-group__'\n )[groupId] ?? [];\n this.removeFilters(filtersToRemove);\n return filtersToRemove;\n }\n /**\n * Removes the facets that belong to the given group.\n *\n * @param groupId - The id of the group from whom remove the facets that are in the store.\n * @returns The removed facets.\n * @internal\n */\n protected removeGroupFacets(groupId: FacetsGroup['id']): Omit<Facet, 'filters'>[] {\n const facetsToRemove = Object.values(this.store.state.x.facets.facets).filter(\n facet => this.store.state.x.facets.groups[facet.id] === groupId\n );\n facetsToRemove.forEach(this.removeFacet.bind(this));\n return facetsToRemove;\n }\n\n /**\n * Sets the group that a facet belongs to.\n *\n * @param facetGroup - The id of the facet, and the group it belongs to.\n * @internal\n */\n protected setFacetGroup(facetGroup: FacetGroupEntry): void {\n this.store.commit('x/facets/setFacetGroup', facetGroup);\n }\n\n /**\n * Sets the Facet to the store facets record.\n *\n * @param facet - The facet to store.\n *\n * @internal\n */\n protected setFacet({ filters, ...restFacet }: Facet): void {\n this.store.commit('x/facets/setFacet', restFacet);\n }\n\n /**\n * Removes a facet from the store.\n *\n * @param facet - The facet to remove.\n * @internal\n */\n protected removeFacet(facet: Omit<Facet, 'filters'>): void {\n this.store.commit('x/facets/removeFacet', facet);\n }\n\n /**\n * Saves a list of filters to the store without any state change logic applied.\n *\n * @param filters - The filters to save.\n * @internal\n */\n protected setFilters(filters: Filter[]): void {\n this.store.commit('x/facets/setFilters', filters);\n }\n\n /**\n * Removes a list of filters from the store.\n *\n * @param filters - The filters to remove.\n * @internal\n */\n protected removeFilters(filters: Filter[]): void {\n this.store.commit('x/facets/removeFilters', filters);\n }\n}\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"facets.service.js","sources":["../../../../../src/x-modules/facets/service/facets.service.ts"],"sourcesContent":["import { Facet, Filter, isFacetFilter } from '@empathyco/x-types';\nimport { Store } from 'vuex';\nimport { XPlugin } from '../../../plugins/index';\nimport { RootXStoreState } from '../../../store/index';\nimport { arrayToObject, groupItemsBy, isArrayEmpty } from '../../../utils/index';\nimport { FilterEntityFactory } from '../entities/filter-entity.factory';\nimport { FilterEntity } from '../entities/types';\nimport { FacetGroupEntry, FacetsGetters } from '../store/types';\nimport { FacetsGroup, FacetsService } from './types';\n\n/**\n * Default implementation for the {@link FacetsService}.\n *\n * @public\n */\nexport class DefaultFacetsService implements FacetsService {\n /**\n * Global instance of the {@link FacetsService}.\n */\n public static instance: FacetsService = new DefaultFacetsService();\n\n public constructor(\n protected filterEntityFactory: FilterEntityFactory = FilterEntityFactory.instance\n ) {}\n\n /**\n * The {@link https://vuex.vuejs.org/ | Vuex} store to use in the service.\n *\n * @returns The store.\n * @internal\n */\n protected get store(): Store<RootXStoreState> {\n return XPlugin.store;\n }\n\n setFacets(facetsGroup: FacetsGroup): void {\n const newFilters = this.updateStore(facetsGroup);\n /* Ensures that filters are selected with valid values. For example, you can't set a single\n select facet with 2 or more selected filters */\n this.updateFiltersSelectedState(newFilters);\n }\n\n updateFacets(facetsGroup: FacetsGroup): void {\n const selectedFilters = this.getSelectedFilters();\n const newFilters = this.updateStore(facetsGroup);\n this.updateFiltersSelectedState(newFilters, selectedFilters);\n }\n\n clearFilters(facetIds?: Array<Facet['id']>): void {\n this.getSelectedFilters()\n .filter(filter => !facetIds || (isFacetFilter(filter) && facetIds.includes(filter.facetId)))\n .forEach(this.deselect.bind(this));\n }\n\n deselect(filter: Filter): void {\n this.getFilterEntity(filter).deselect(filter);\n }\n\n select(filterOrFilters: Filter | Filter[]): void {\n const filters = Array.isArray(filterOrFilters) ? filterOrFilters : [filterOrFilters];\n filters.forEach(filter => this.getFilterEntity(filter).select(filter));\n }\n\n toggle(filter: Filter): void {\n if (filter.selected) {\n this.deselect(filter);\n } else {\n this.select(filter);\n }\n }\n\n /**\n * Creates an entity from a filter DTO.\n *\n * @param filter - The filter to create an entity from.\n * @returns The filter entity.\n * @internal\n */\n protected getFilterEntity(filter: Filter): FilterEntity {\n return this.filterEntityFactory.getFilterEntity(this.store, filter);\n }\n\n /**\n * Sets in the store the Facets, the Filters and the FacetsGroup, without applying any logic\n * to the selected state.\n *\n * @param facetsGroup - The {@link FacetsGroup} to set into the store state.\n * @returns An array with the new filters.\n * @internal\n */\n protected updateStore(facetsGroup: FacetsGroup): Filter[] {\n this.removeGroupFacets(facetsGroup.id);\n this.removeGroupFilters(facetsGroup.id);\n facetsGroup.facets.forEach(facet => {\n this.setFacetGroup({ facetId: facet.id, groupId: facetsGroup.id });\n this.setFacet(facet);\n });\n const newFilters = facetsGroup.facets.flatMap(facet => facet.filters);\n this.setFilters(newFilters);\n return newFilters;\n }\n\n /**\n * Retrieves the selected filters from the store.\n *\n * @returns The list of selected filters of the store.\n * @internal\n */\n protected getSelectedFilters(): FacetsGetters['selectedFilters'] {\n return this.store.getters['x/facets/selectedFilters'];\n }\n\n /**\n * Changes the filters selection state to match the store.\n *\n * @param newFilters - The list of filters to save.\n * @param previousFilters - (Optional) The list of old filters, used to set the `newFilters`\n * selected state.\n */\n protected updateFiltersSelectedState(newFilters: Filter[], previousFilters?: Filter[]): void {\n if (!isArrayEmpty(newFilters)) {\n const newStateFiltersMap = arrayToObject(previousFilters ?? newFilters, 'id');\n newFilters.forEach(filter => {\n const filterEntity = this.getFilterEntity(filter);\n if (newStateFiltersMap[filter.id]?.selected) {\n filterEntity.select(filter);\n } else {\n filterEntity.deselect(filter);\n }\n });\n }\n }\n\n /**\n * Removes the filters that belong to the given group.\n *\n * @param groupId - The id of the group from whom remove the filters that are in the store.\n *\n * @returns The removed filters.\n *\n * @internal\n */\n protected removeGroupFilters(groupId: FacetsGroup['id']): Filter[] {\n const filtersToRemove =\n groupItemsBy(Object.values(this.store.state.x.facets.filters), filter =>\n isFacetFilter(filter)\n ? this.store.state.x.facets.groups[filter.facetId]\n : '__unknown-group__'\n )[groupId] ?? [];\n this.removeFilters(filtersToRemove);\n return filtersToRemove;\n }\n /**\n * Removes the facets that belong to the given group.\n *\n * @param groupId - The id of the group from whom remove the facets that are in the store.\n * @returns The removed facets.\n * @internal\n */\n protected removeGroupFacets(groupId: FacetsGroup['id']): Omit<Facet, 'filters'>[] {\n const facetsToRemove = Object.values(this.store.state.x.facets.facets).filter(\n facet => this.store.state.x.facets.groups[facet.id] === groupId\n );\n facetsToRemove.forEach(this.removeFacet.bind(this));\n return facetsToRemove;\n }\n\n /**\n * Sets the group that a facet belongs to.\n *\n * @param facetGroup - The id of the facet, and the group it belongs to.\n * @internal\n */\n protected setFacetGroup(facetGroup: FacetGroupEntry): void {\n this.store.commit('x/facets/setFacetGroup', facetGroup);\n }\n\n /**\n * Sets the Facet to the store facets record.\n *\n * @param facet - The facet to store.\n *\n * @internal\n */\n protected setFacet({ filters, ...restFacet }: Facet): void {\n this.store.commit('x/facets/setFacet', restFacet);\n }\n\n /**\n * Removes a facet from the store.\n *\n * @param facet - The facet to remove.\n * @internal\n */\n protected removeFacet(facet: Omit<Facet, 'filters'>): void {\n this.store.commit('x/facets/removeFacet', facet);\n }\n\n /**\n * Saves a list of filters to the store without any state change logic applied.\n *\n * @param filters - The filters to save.\n * @internal\n */\n protected setFilters(filters: Filter[]): void {\n this.store.commit('x/facets/setFilters', filters);\n }\n\n /**\n * Removes a list of filters from the store.\n *\n * @param filters - The filters to remove.\n * @internal\n */\n protected removeFilters(filters: Filter[]): void {\n this.store.commit('x/facets/removeFilters', filters);\n }\n}\n"],"names":[],"mappings":"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"}
@@ -5,7 +5,7 @@ import script from './clear-history-queries.vue_rollup-plugin-vue=script.js';
5
5
  var __vue_script__ = script;
6
6
 
7
7
  /* template */
8
- var __vue_render__ = function() {
8
+ var __vue_render__ = function () {
9
9
  var _vm = this;
10
10
  var _h = _vm.$createElement;
11
11
  var _c = _vm._self._c || _h;
@@ -17,14 +17,13 @@ var __vue_render__ = function() {
17
17
  attrs: {
18
18
  disabled: _vm.isHistoryQueriesEmpty,
19
19
  events: _vm.clearHistoryQueriesEvents,
20
- "data-test": "clear-history-queries"
21
- }
20
+ "data-test": "clear-history-queries",
21
+ },
22
22
  },
23
23
  [
24
- _vm._t("default", function() {
24
+ _vm._t("default", function () {
25
25
  return [_vm._v("✕")]
26
- })
27
- ],
26
+ }) ],
28
27
  2
29
28
  )
30
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"clear-history-queries.vue.js","sources":["../../../../../src/x-modules/history-queries/components/clear-history-queries.vue"],"sourcesContent":["<template>\n <BaseEventButton\n class=\"x-button x-clear-history-queries\"\n :class=\"dynamicClasses\"\n :disabled=\"isHistoryQueriesEmpty\"\n :events=\"clearHistoryQueriesEvents\"\n data-test=\"clear-history-queries\"\n >\n <!-- @slot (Required) Button content with a message, an icon or both -->\n <slot>✕</slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import { HistoryQuery } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component } from 'vue-property-decorator';\n import { State } from '../../../components/decorators/store.decorators';\n import BaseEventButton from '../../../components/base-event-button.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { VueCSSClasses } from '../../../utils/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { historyQueriesXModule } from '../x-module';\n\n /**\n * A button that when is pressed, emits the\n * {@link HistoryQueriesXEvents.UserPressedClearHistoryQueries} event, expressing the user\n * intention to clear the whole history of queries.\n *\n * @public\n */\n @Component({\n components: { BaseEventButton },\n mixins: [xComponentMixin(historyQueriesXModule)]\n })\n export default class ClearHistoryQueries extends Vue {\n /**\n * The whole history queries.\n *\n * @internal\n */\n @State('historyQueries', 'historyQueries')\n public historyQueries!: HistoryQuery[];\n\n /**\n * Returns if the array of history queries is empty.\n *\n * @returns `true` if the {@link historyQueries} array is empty, `false` otherwise.\n * @internal\n */\n protected get isHistoryQueriesEmpty(): boolean {\n return this.historyQueries.length === 0;\n }\n\n /**\n * Dynamic CSS classes to add to the root element of this component.\n *\n * @returns A booleans dictionary where each key is the class name to add, and the boolean value\n * tells if it should be added or not.\n * @internal\n */\n protected get dynamicClasses(): VueCSSClasses {\n return {\n 'x-clear-history-queries--is-empty': this.isHistoryQueriesEmpty\n };\n }\n\n /**\n * The list of events that are going to be emitted when the button is pressed.\n *\n * @internal\n */\n protected clearHistoryQueriesEvents: Partial<XEventsTypes> = {\n UserPressedClearHistoryQueries: undefined\n };\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Basic example\n\nThe component exposes a single default slot, where you can add icons or text.\n\n```vue\n<ClearHistoryQueries>\n <img class=\"x-history-query__icon\" src=\"./my-icon.svg\"/>\n</ClearHistoryQueries>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserPressedClearHistoryQueries`: the event is emitted after the user clicks the button.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"clear-history-queries.vue.js","sources":["../../../../../src/x-modules/history-queries/components/clear-history-queries.vue"],"sourcesContent":["<template>\n <BaseEventButton\n class=\"x-button x-clear-history-queries\"\n :class=\"dynamicClasses\"\n :disabled=\"isHistoryQueriesEmpty\"\n :events=\"clearHistoryQueriesEvents\"\n data-test=\"clear-history-queries\"\n >\n <!-- @slot (Required) Button content with a message, an icon or both -->\n <slot>✕</slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import { HistoryQuery } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component } from 'vue-property-decorator';\n import { State } from '../../../components/decorators/store.decorators';\n import BaseEventButton from '../../../components/base-event-button.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { VueCSSClasses } from '../../../utils/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { historyQueriesXModule } from '../x-module';\n\n /**\n * A button that when is pressed, emits the\n * {@link HistoryQueriesXEvents.UserPressedClearHistoryQueries} event, expressing the user\n * intention to clear the whole history of queries.\n *\n * @public\n */\n @Component({\n components: { BaseEventButton },\n mixins: [xComponentMixin(historyQueriesXModule)]\n })\n export default class ClearHistoryQueries extends Vue {\n /**\n * The whole history queries.\n *\n * @internal\n */\n @State('historyQueries', 'historyQueries')\n public historyQueries!: HistoryQuery[];\n\n /**\n * Returns if the array of history queries is empty.\n *\n * @returns `true` if the {@link historyQueries} array is empty, `false` otherwise.\n * @internal\n */\n protected get isHistoryQueriesEmpty(): boolean {\n return this.historyQueries.length === 0;\n }\n\n /**\n * Dynamic CSS classes to add to the root element of this component.\n *\n * @returns A booleans dictionary where each key is the class name to add, and the boolean value\n * tells if it should be added or not.\n * @internal\n */\n protected get dynamicClasses(): VueCSSClasses {\n return {\n 'x-clear-history-queries--is-empty': this.isHistoryQueriesEmpty\n };\n }\n\n /**\n * The list of events that are going to be emitted when the button is pressed.\n *\n * @internal\n */\n protected clearHistoryQueriesEvents: Partial<XEventsTypes> = {\n UserPressedClearHistoryQueries: undefined\n };\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Basic example\n\nThe component exposes a single default slot, where you can add icons or text.\n\n```vue\n<ClearHistoryQueries>\n <img class=\"x-history-query__icon\" src=\"./my-icon.svg\"/>\n</ClearHistoryQueries>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserPressedClearHistoryQueries`: the event is emitted after the user clicks the button.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}