@empathyco/x-components 3.0.0-alpha.28 → 3.0.0-alpha.31

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 (631) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/core/index.js +7 -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 +15 -0
  26. package/docs/API-reference/api/x-components.defaultsessionservice.getsessionid.md +15 -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 +11 -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.identifierresults.md +1 -0
  34. package/docs/API-reference/api/x-components.identifierresults.resultclickextraevents.md +13 -0
  35. package/docs/API-reference/api/x-components.identifierresultsactions.md +1 -1
  36. package/docs/API-reference/api/x-components.identifierresultsactions.saveorigin.md +24 -0
  37. package/docs/API-reference/api/x-components.identifierresultsmutations.md +2 -0
  38. package/docs/API-reference/api/x-components.identifierresultsmutations.setorigin.md +24 -0
  39. package/docs/API-reference/api/x-components.identifierresultsmutations.setparams.md +24 -0
  40. package/docs/API-reference/api/x-components.identifierresultsstate.md +2 -0
  41. package/docs/API-reference/api/x-components.identifierresultsstate.origin.md +13 -0
  42. package/docs/API-reference/api/x-components.identifierresultsstate.params.md +13 -0
  43. package/docs/API-reference/api/x-components.locationprovider.location.md +13 -0
  44. package/docs/API-reference/api/x-components.locationprovider.md +21 -0
  45. package/docs/API-reference/api/x-components.mainscroll.margin.md +13 -0
  46. package/docs/API-reference/api/x-components.mainscroll.md +33 -0
  47. package/docs/API-reference/api/{x-components.basemainscroll.mounted.md → x-components.mainscroll.mounted.md} +4 -2
  48. package/docs/API-reference/api/x-components.mainscroll.restorescrolltimeoutms.md +13 -0
  49. package/docs/API-reference/api/x-components.mainscroll.threshold.md +13 -0
  50. package/docs/API-reference/api/x-components.mainscroll.usewindow.md +13 -0
  51. package/docs/API-reference/api/x-components.mainscroll.visibleelementsobserver.md +13 -0
  52. package/docs/API-reference/api/x-components.mainscrollitem._el.md +13 -0
  53. package/docs/API-reference/api/x-components.mainscrollitem.item.md +13 -0
  54. package/docs/API-reference/api/x-components.mainscrollitem.md +29 -0
  55. package/docs/API-reference/api/x-components.mainscrollitem.observeitem.md +25 -0
  56. package/docs/API-reference/api/x-components.mainscrollitem.tag.md +13 -0
  57. package/docs/API-reference/api/x-components.md +44 -6
  58. package/docs/API-reference/api/{x-components.partialquerybutton.events.md → x-components.partialquerybutton.emitevents.md} +8 -4
  59. package/docs/API-reference/api/x-components.partialquerybutton.md +6 -1
  60. package/docs/API-reference/api/x-components.queryfeature.md +13 -0
  61. package/docs/API-reference/api/x-components.queryorigin.md +4 -2
  62. package/docs/API-reference/api/x-components.queryorigininit.md +15 -0
  63. package/docs/API-reference/api/x-components.relatedtag.emitevents.md +17 -0
  64. package/docs/API-reference/api/x-components.relatedtag.md +6 -0
  65. package/docs/API-reference/api/x-components.resultfeature.md +13 -0
  66. package/docs/API-reference/api/x-components.resultorigin.md +15 -0
  67. package/docs/API-reference/api/x-components.saveidentifierresultsoriginwire.md +13 -0
  68. package/docs/API-reference/api/x-components.saveorigin.md +13 -0
  69. package/docs/API-reference/api/{x-components.setorigin.md → x-components.saveoriginwire.md} +3 -3
  70. package/docs/API-reference/api/{x-components.baseidscroll.distancetobottom.md → x-components.scroll.distancetobottom.md} +2 -2
  71. package/docs/API-reference/api/{x-components.baseidscroll.id.md → x-components.scroll.id.md} +2 -2
  72. package/docs/API-reference/api/x-components.scroll.md +23 -0
  73. package/docs/API-reference/api/{x-components.baseidscroll.throttlems.md → x-components.scroll.throttlems.md} +2 -2
  74. package/docs/API-reference/api/x-components.scrollactions.md +13 -0
  75. package/docs/API-reference/api/x-components.scrollcomponentstate.direction.md +13 -0
  76. package/docs/API-reference/api/x-components.scrollcomponentstate.hasalmostreachedend.md +13 -0
  77. package/docs/API-reference/api/x-components.scrollcomponentstate.hasreachedend.md +13 -0
  78. package/docs/API-reference/api/x-components.scrollcomponentstate.hasreachedstart.md +13 -0
  79. package/docs/API-reference/api/x-components.scrollcomponentstate.md +24 -0
  80. package/docs/API-reference/api/x-components.scrollcomponentstate.position.md +13 -0
  81. package/docs/API-reference/api/x-components.scrollgetters.md +13 -0
  82. package/docs/API-reference/api/x-components.scrollmixin._el.md +13 -0
  83. package/docs/API-reference/api/x-components.scrollmixin.firstelementthresholdpx.md +13 -0
  84. package/docs/API-reference/api/x-components.scrollmixin.md +3 -0
  85. package/docs/API-reference/api/x-components.scrollmixin.resetonchange.md +13 -0
  86. package/docs/API-reference/api/x-components.scrollmutations.md +21 -0
  87. package/docs/API-reference/api/x-components.scrollmutations.setpendingscrollto.md +24 -0
  88. package/docs/API-reference/api/x-components.scrollmutations.setscrollcomponentstate.md +24 -0
  89. package/docs/API-reference/api/x-components.scrollstate.data.md +13 -0
  90. package/docs/API-reference/api/x-components.scrollstate.md +21 -0
  91. package/docs/API-reference/api/x-components.scrollstate.pendingscrollto.md +13 -0
  92. package/docs/API-reference/api/x-components.scrollstatepayload.md +21 -0
  93. package/docs/API-reference/api/x-components.scrollstatepayload.newstate.md +13 -0
  94. package/docs/API-reference/api/{x-components.basescrolltotop.animation.md → x-components.scrolltotop.animation.md} +2 -2
  95. package/docs/API-reference/api/x-components.scrolltotop.md +23 -0
  96. package/docs/API-reference/api/{x-components.basescrolltotop.scrollid.md → x-components.scrolltotop.scrollid.md} +3 -3
  97. package/docs/API-reference/api/{x-components.basescrolltotop.thresholdpx.md → x-components.scrolltotop.thresholdpx.md} +2 -2
  98. package/docs/API-reference/api/x-components.scrollvisibilityobserver.md +21 -0
  99. package/docs/API-reference/api/x-components.scrollvisibilityobserver.observe.md +24 -0
  100. package/docs/API-reference/api/x-components.scrollvisibilityobserver.unobserve.md +24 -0
  101. package/docs/API-reference/api/x-components.scrollxevents.md +27 -0
  102. package/docs/API-reference/api/x-components.scrollxevents.scrollrestorefailed.md +13 -0
  103. package/docs/API-reference/api/x-components.scrollxevents.scrollrestoresucceeded.md +13 -0
  104. package/docs/API-reference/api/x-components.scrollxevents.useralmostreachedscrollend.md +13 -0
  105. package/docs/API-reference/api/{x-components.xeventstypes.userchangedscrolldirection.md → x-components.scrollxevents.userchangedscrolldirection.md} +2 -2
  106. package/docs/API-reference/api/x-components.scrollxevents.userreachedscrollend.md +13 -0
  107. package/docs/API-reference/api/x-components.scrollxevents.userreachedscrollstart.md +13 -0
  108. package/docs/API-reference/api/{x-components.xeventstypes.userscrolled.md → x-components.scrollxevents.userscrolled.md} +2 -2
  109. package/docs/API-reference/api/x-components.scrollxevents.userscrolledtoelement.md +13 -0
  110. package/docs/API-reference/api/x-components.scrollxmodule.md +13 -0
  111. package/docs/API-reference/api/x-components.scrollxstoremodule.md +15 -0
  112. package/docs/API-reference/api/x-components.searchactions.md +1 -0
  113. package/docs/API-reference/api/x-components.searchactions.saveorigin.md +24 -0
  114. package/docs/API-reference/api/{x-components.searchbutton.events.md → x-components.searchbutton.emitevents.md} +9 -3
  115. package/docs/API-reference/api/x-components.searchbutton.md +6 -1
  116. package/docs/API-reference/api/x-components.searchmutations.md +1 -0
  117. package/docs/API-reference/api/x-components.searchmutations.setorigin.md +2 -2
  118. package/docs/API-reference/api/x-components.searchmutations.setquerytagging.md +24 -0
  119. package/docs/API-reference/api/x-components.searchstate.md +1 -0
  120. package/docs/API-reference/api/x-components.searchstate.querytagging.md +13 -0
  121. package/docs/API-reference/api/x-components.searchxevents.md +1 -0
  122. package/docs/API-reference/api/x-components.searchxevents.searchtaggingchanged.md +13 -0
  123. package/docs/API-reference/api/x-components.sessionservice.clearsessionid.md +17 -0
  124. package/docs/API-reference/api/x-components.sessionservice.getsessionid.md +23 -0
  125. package/docs/API-reference/api/x-components.sessionservice.md +21 -0
  126. package/docs/API-reference/api/x-components.setconsent.md +13 -0
  127. package/docs/API-reference/api/x-components.setidentifierresultsextraparams.md +13 -0
  128. package/docs/API-reference/api/x-components.setpendingscrolltowire.md +13 -0
  129. package/docs/API-reference/api/x-components.setquerytaggingdebounce.md +13 -0
  130. package/docs/API-reference/api/x-components.setscrolldirectionwire.md +13 -0
  131. package/docs/API-reference/api/x-components.setscrollhasalmostreachedendwire.md +13 -0
  132. package/docs/API-reference/api/x-components.setscrollhasreachedendwire.md +13 -0
  133. package/docs/API-reference/api/x-components.setscrollhasreachedstartwire.md +13 -0
  134. package/docs/API-reference/api/x-components.setscrollpositionwire.md +13 -0
  135. package/docs/API-reference/api/x-components.setsessionduration.md +13 -0
  136. package/docs/API-reference/api/x-components.seturlscroll.md +13 -0
  137. package/docs/API-reference/api/x-components.seturlsort.md +13 -0
  138. package/docs/API-reference/api/x-components.sortmixin.items.md +1 -1
  139. package/docs/API-reference/api/x-components.sortmixin.md +2 -3
  140. package/docs/API-reference/api/x-components.sortmixin.providedselectedsort.md +1 -1
  141. package/docs/API-reference/api/{x-components.spellcheckbutton.events.md → x-components.spellcheckbutton.emitevents.md} +8 -4
  142. package/docs/API-reference/api/x-components.spellcheckbutton.md +6 -1
  143. package/docs/API-reference/api/x-components.taggingactions.md +7 -0
  144. package/docs/API-reference/api/x-components.taggingactions.track.md +24 -0
  145. package/docs/API-reference/api/x-components.taggingconfig.md +8 -0
  146. package/docs/API-reference/api/x-components.taggingconfig.querytaggingdebouncems.md +13 -0
  147. package/docs/API-reference/api/x-components.taggingconfig.sessionttlms.md +13 -0
  148. package/docs/API-reference/api/x-components.taggingmutations.md +9 -0
  149. package/docs/API-reference/api/x-components.taggingmutations.setconsent.md +24 -0
  150. package/docs/API-reference/api/x-components.taggingmutations.setquerytaggingdebounce.md +24 -0
  151. package/docs/API-reference/api/x-components.taggingmutations.setsessionduration.md +24 -0
  152. package/docs/API-reference/api/x-components.taggingstate.config.md +13 -0
  153. package/docs/API-reference/api/x-components.taggingstate.consent.md +13 -0
  154. package/docs/API-reference/api/x-components.taggingstate.md +8 -0
  155. package/docs/API-reference/api/x-components.taggingxevents.consentchanged.md +13 -0
  156. package/docs/API-reference/api/x-components.taggingxevents.consentprovided.md +13 -0
  157. package/docs/API-reference/api/x-components.taggingxevents.md +10 -0
  158. package/docs/API-reference/api/x-components.taggingxevents.querytaggingdebounceprovided.md +13 -0
  159. package/docs/API-reference/api/x-components.taggingxevents.sessiondurationprovided.md +13 -0
  160. package/docs/API-reference/api/x-components.track.md +13 -0
  161. package/docs/API-reference/api/x-components.trackwire.md +13 -0
  162. package/docs/API-reference/api/x-components.urlmutations.md +2 -0
  163. package/docs/API-reference/api/x-components.urlmutations.setscroll.md +24 -0
  164. package/docs/API-reference/api/x-components.urlmutations.setsort.md +24 -0
  165. package/docs/API-reference/api/x-components.urlparams.md +1 -1
  166. package/docs/API-reference/api/x-components.urlparams.scroll.md +1 -1
  167. package/docs/API-reference/api/{x-components.basemainscroll.beforedestroy.md → x-components.windowscroll.beforedestroy.md} +4 -2
  168. package/docs/API-reference/api/{x-components.basemainscroll.id.md → x-components.windowscroll.id.md} +2 -2
  169. package/docs/API-reference/api/x-components.windowscroll.md +30 -0
  170. package/docs/API-reference/api/{x-components.basescroll.mounted.md → x-components.windowscroll.mounted.md} +2 -2
  171. package/docs/API-reference/api/{x-components.basemainscroll.render.md → x-components.windowscroll.render.md} +2 -2
  172. package/docs/API-reference/api/x-components.windowscroll.scrollableelement.md +13 -0
  173. package/docs/API-reference/api/x-components.wiremetadata.feature.md +13 -0
  174. package/docs/API-reference/api/x-components.wiremetadata.location.md +13 -0
  175. package/docs/API-reference/api/x-components.wiremetadata.md +2 -1
  176. package/docs/API-reference/api/x-components.xcomponentbusapi.emit_1.md +2 -2
  177. package/docs/API-reference/api/x-components.xeventstypes.md +3 -8
  178. package/docs/API-reference/api/x-components.xmodulestree.md +1 -0
  179. package/docs/API-reference/api/x-components.xmodulestree.scroll.md +11 -0
  180. package/docs/API-reference/api/x-types.banner.md +2 -3
  181. package/docs/API-reference/api/x-types.identifiable.id.md +1 -1
  182. package/docs/API-reference/api/x-types.identifiable.md +2 -2
  183. package/docs/API-reference/api/x-types.md +5 -2
  184. package/docs/API-reference/api/x-types.promoted.md +2 -3
  185. package/docs/API-reference/api/x-types.redirection.md +2 -3
  186. package/docs/API-reference/api/x-types.result.md +2 -3
  187. package/docs/API-reference/api/x-types.taggable.md +20 -0
  188. package/docs/API-reference/api/x-types.taggable.tagging.md +13 -0
  189. package/docs/API-reference/api/{x-types.banner.tagging.md → x-types.taggableschema.md} +4 -6
  190. package/docs/API-reference/api/x-types.tagging.add2cart.md +13 -0
  191. package/docs/API-reference/api/x-types.tagging.checkout.md +13 -0
  192. package/docs/API-reference/api/{x-types.promoted.tagging.md → x-types.tagging.click.md} +4 -6
  193. package/docs/API-reference/api/x-types.tagging.md +6 -3
  194. package/docs/API-reference/api/x-types.tagging.query.md +13 -0
  195. package/docs/API-reference/api/x-types.tagging.wishlist.md +13 -0
  196. package/docs/API-reference/api/x-types.tagginginfo.md +21 -0
  197. package/docs/API-reference/api/{x-types.tagging.params.md → x-types.tagginginfo.params.md} +3 -3
  198. package/docs/API-reference/api/{x-types.tagging.url.md → x-types.tagginginfo.url.md} +2 -2
  199. package/docs/API-reference/api/x-types.tagginginfoschema.md +13 -0
  200. package/docs/API-reference/components/common/result/x-components.base-result-link.md +2 -3
  201. package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +9 -9
  202. package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +9 -8
  203. package/docs/API-reference/components/common/x-components.location-provider.md +54 -0
  204. package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +10 -6
  205. package/docs/API-reference/components/scroll/x-components.main-scroll-item.md +84 -0
  206. package/docs/API-reference/components/scroll/x-components.main-scroll.md +175 -0
  207. package/docs/API-reference/components/{common/scroll/x-components.base-scroll-to-top.md → scroll/x-components.scroll-to-top.md} +11 -14
  208. package/docs/API-reference/components/scroll/x-components.scroll.md +168 -0
  209. package/docs/API-reference/components/scroll/x-components.window-scroll.md +158 -0
  210. package/docs/API-reference/components/search/x-components.sort-dropdown.md +4 -5
  211. package/docs/API-reference/components/search/x-components.sort-list.md +4 -5
  212. package/docs/API-reference/components/tagging/x-components.tagging.md +84 -0
  213. package/docs/build-search-ui/README.md +113 -0
  214. package/docs/build-search-ui/web-archetype-integration-guide.md +183 -0
  215. package/docs/build-search-ui/web-use-x-components-guide.md +170 -0
  216. package/docs/build-search-ui/web-x-components-integration-guide.md +197 -0
  217. package/docs/build-search-ui/x-architecture/README.md +133 -0
  218. package/docs/sidebar.json +1 -1
  219. package/identifier-results/index.js +2 -1
  220. package/js/components/layouts/multi-column-max-width-layout.vue.js +41 -34
  221. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  222. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue=script.js +3 -2
  223. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue=script.js.map +1 -1
  224. package/js/components/layouts/single-column-layout.vue.js +20 -14
  225. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  226. package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js +3 -2
  227. package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js.map +1 -1
  228. package/js/components/location-provider.vue.js +39 -0
  229. package/js/components/location-provider.vue.js.map +1 -0
  230. package/js/components/location-provider.vue_rollup-plugin-vue=script.js +27 -0
  231. package/js/components/location-provider.vue_rollup-plugin-vue=script.js.map +1 -0
  232. package/js/components/result/base-result-link.vue.js +2 -2
  233. package/js/components/result/base-result-link.vue.js.map +1 -1
  234. package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js +5 -14
  235. package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js.map +1 -1
  236. package/js/components/scroll/base-scroll.vue.js +2 -2
  237. package/js/components/scroll/base-scroll.vue.js.map +1 -1
  238. package/js/components/scroll/base-scroll.vue_rollup-plugin-vue=script.js +2 -49
  239. package/js/components/scroll/base-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
  240. package/js/components/scroll/scroll.mixin.js +122 -52
  241. package/js/components/scroll/scroll.mixin.js.map +1 -1
  242. package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js +1 -0
  243. package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js.map +1 -1
  244. package/js/components/suggestions/base-suggestion.vue.js +2 -2
  245. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  246. package/js/components/suggestions/base-suggestion.vue_rollup-plugin-vue=script.js +21 -6
  247. package/js/components/suggestions/base-suggestion.vue_rollup-plugin-vue=script.js.map +1 -1
  248. package/js/components/x-component.utils.js +2 -2
  249. package/js/components/x-component.utils.js.map +1 -1
  250. package/js/index.js +24 -12
  251. package/js/index.js.map +1 -1
  252. package/js/plugins/x-plugin.js +1 -0
  253. package/js/plugins/x-plugin.js.map +1 -1
  254. package/js/plugins/x-plugin.mixin.js +16 -6
  255. package/js/plugins/x-plugin.mixin.js.map +1 -1
  256. package/js/store/x.module.js +7 -6
  257. package/js/store/x.module.js.map +1 -1
  258. package/js/utils/origin.js +20 -0
  259. package/js/utils/origin.js.map +1 -0
  260. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +4 -6
  261. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  262. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +4 -6
  263. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js.map +1 -1
  264. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +5 -6
  265. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  266. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +4 -6
  267. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  268. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +4 -6
  269. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
  270. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +4 -6
  271. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  272. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +4 -6
  273. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  274. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +4 -6
  275. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  276. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +4 -6
  277. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  278. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +4 -6
  279. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  280. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +4 -6
  281. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  282. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +4 -6
  283. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js.map +1 -1
  284. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +4 -6
  285. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
  286. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +4 -6
  287. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map +1 -1
  288. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +4 -6
  289. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  290. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  291. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +4 -6
  292. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  293. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +5 -6
  294. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  295. package/js/x-modules/facets/service/facets.service.js +1 -0
  296. package/js/x-modules/facets/service/facets.service.js.map +1 -1
  297. package/js/x-modules/history-queries/components/history-query.vue.js +1 -1
  298. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  299. package/js/x-modules/history-queries/components/history-query.vue_rollup-plugin-vue=script.js.map +1 -1
  300. package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
  301. package/js/x-modules/identifier-results/components/identifier-results.vue_rollup-plugin-vue=script.js +14 -2
  302. package/js/x-modules/identifier-results/components/identifier-results.vue_rollup-plugin-vue=script.js.map +1 -1
  303. package/js/x-modules/identifier-results/store/actions/save-origin.action.js +18 -0
  304. package/js/x-modules/identifier-results/store/actions/save-origin.action.js.map +1 -0
  305. package/js/x-modules/identifier-results/store/actions/save-query.action.js +4 -0
  306. package/js/x-modules/identifier-results/store/actions/save-query.action.js.map +1 -1
  307. package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js +5 -8
  308. package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js.map +1 -1
  309. package/js/x-modules/identifier-results/store/module.js +16 -7
  310. package/js/x-modules/identifier-results/store/module.js.map +1 -1
  311. package/js/x-modules/identifier-results/wiring.js +25 -3
  312. package/js/x-modules/identifier-results/wiring.js.map +1 -1
  313. package/js/x-modules/next-queries/components/next-queries-list.vue_rollup-plugin-vue=script.js +1 -1
  314. package/js/x-modules/next-queries/components/next-query.vue.js +2 -1
  315. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  316. package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js.map +1 -1
  317. package/js/x-modules/popular-searches/components/popular-search.vue.js +2 -1
  318. package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
  319. package/js/x-modules/popular-searches/components/popular-search.vue_rollup-plugin-vue=script.js.map +1 -1
  320. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +2 -1
  321. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
  322. package/js/x-modules/query-suggestions/components/query-suggestion.vue_rollup-plugin-vue=script.js.map +1 -1
  323. package/js/x-modules/related-tags/components/related-tag.vue.js +5 -4
  324. package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
  325. package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js +23 -24
  326. package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js.map +1 -1
  327. package/js/x-modules/scroll/components/main-scroll-item.vue.js +52 -0
  328. package/js/x-modules/scroll/components/main-scroll-item.vue.js.map +1 -0
  329. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +188 -0
  330. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -0
  331. package/js/{components/scroll/base-main-scroll.vue.js → x-modules/scroll/components/main-scroll.vue.js} +2 -2
  332. package/js/x-modules/scroll/components/main-scroll.vue.js.map +1 -0
  333. package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js +204 -0
  334. package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js.map +1 -0
  335. package/js/{components/scroll/base-scroll-to-top.vue.js → x-modules/scroll/components/scroll-to-top.vue.js} +2 -2
  336. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -0
  337. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js +231 -0
  338. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -0
  339. package/js/x-modules/scroll/components/scroll.const.js +15 -0
  340. package/js/x-modules/scroll/components/scroll.const.js.map +1 -0
  341. package/js/{components/scroll/base-id-scroll.vue.js → x-modules/scroll/components/scroll.vue.js} +8 -9
  342. package/js/x-modules/scroll/components/scroll.vue.js.map +1 -0
  343. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +110 -0
  344. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js.map +1 -0
  345. package/js/x-modules/scroll/components/window-scroll.vue.js +39 -0
  346. package/js/x-modules/scroll/components/window-scroll.vue.js.map +1 -0
  347. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +186 -0
  348. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -0
  349. package/js/x-modules/scroll/store/emitters.js +15 -0
  350. package/js/x-modules/scroll/store/emitters.js.map +1 -0
  351. package/js/x-modules/scroll/store/module.js +36 -0
  352. package/js/x-modules/scroll/store/module.js.map +1 -0
  353. package/js/x-modules/scroll/wiring.js +114 -0
  354. package/js/x-modules/scroll/wiring.js.map +1 -0
  355. package/js/x-modules/scroll/x-module.js +19 -0
  356. package/js/x-modules/scroll/x-module.js.map +1 -0
  357. package/js/x-modules/search/components/banners-list.vue_rollup-plugin-vue=script.js +1 -1
  358. package/js/x-modules/search/components/partial-query-button.vue.js +3 -2
  359. package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
  360. package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js +21 -123
  361. package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js.map +1 -1
  362. package/js/x-modules/search/components/promoteds-list.vue_rollup-plugin-vue=script.js +1 -1
  363. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +4 -6
  364. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js.map +1 -1
  365. package/js/x-modules/search/components/sort.mixin.js +6 -12
  366. package/js/x-modules/search/components/sort.mixin.js.map +1 -1
  367. package/js/x-modules/search/components/spellcheck-button.vue.js +3 -2
  368. package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
  369. package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js +21 -122
  370. package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js.map +1 -1
  371. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +4 -6
  372. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
  373. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +2 -1
  374. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
  375. package/js/x-modules/search/store/actions/save-origin.action.js +18 -0
  376. package/js/x-modules/search/store/actions/save-origin.action.js.map +1 -0
  377. package/js/x-modules/search/store/actions/set-url-params.action.js +2 -1
  378. package/js/x-modules/search/store/actions/set-url-params.action.js.map +1 -1
  379. package/js/x-modules/search/store/emitters.js +8 -0
  380. package/js/x-modules/search/store/emitters.js.map +1 -1
  381. package/js/x-modules/search/store/module.js +13 -3
  382. package/js/x-modules/search/store/module.js.map +1 -1
  383. package/js/x-modules/search/wiring.js +5 -5
  384. package/js/x-modules/search/wiring.js.map +1 -1
  385. package/js/x-modules/search-box/components/search-button.vue.js +3 -2
  386. package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
  387. package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js +24 -15
  388. package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js.map +1 -1
  389. package/js/x-modules/search-box/components/search-input.vue.js +3 -2
  390. package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
  391. package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js +10 -9
  392. package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js.map +1 -1
  393. package/js/x-modules/tagging/service/session.service.js +35 -0
  394. package/js/x-modules/tagging/service/session.service.js.map +1 -0
  395. package/js/x-modules/tagging/store/actions/track.action.js +43 -0
  396. package/js/x-modules/tagging/store/actions/track.action.js.map +1 -0
  397. package/js/x-modules/tagging/store/emitters.js +3 -1
  398. package/js/x-modules/tagging/store/emitters.js.map +1 -1
  399. package/js/x-modules/tagging/store/module.js +21 -3
  400. package/js/x-modules/tagging/store/module.js.map +1 -1
  401. package/js/x-modules/tagging/wiring.js +83 -2
  402. package/js/x-modules/tagging/wiring.js.map +1 -1
  403. package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
  404. package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js +2 -2
  405. package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js.map +1 -1
  406. package/js/x-modules/url/store/initial-state.js +1 -1
  407. package/js/x-modules/url/store/initial-state.js.map +1 -1
  408. package/js/x-modules/url/store/module.js +6 -0
  409. package/js/x-modules/url/store/module.js.map +1 -1
  410. package/js/x-modules/url/wiring.js +19 -1
  411. package/js/x-modules/url/wiring.js.map +1 -1
  412. package/package.json +6 -4
  413. package/report/x-adapter.api.json +18 -18
  414. package/report/x-components.api.json +4652 -1770
  415. package/report/x-components.api.md +421 -133
  416. package/report/x-types.api.json +396 -310
  417. package/scroll/index.d.ts +1 -0
  418. package/scroll/index.js +10 -0
  419. package/search/index.js +1 -1
  420. package/tagging/index.js +3 -1
  421. package/types/adapter/mocked-adapter.d.ts.map +1 -1
  422. package/types/components/index.d.ts +1 -0
  423. package/types/components/index.d.ts.map +1 -1
  424. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts.map +1 -1
  425. package/types/components/layouts/single-column-layout.vue.d.ts.map +1 -1
  426. package/types/components/location-provider.vue.d.ts +17 -0
  427. package/types/components/location-provider.vue.d.ts.map +1 -0
  428. package/types/components/result/base-result-link.vue.d.ts +8 -18
  429. package/types/components/result/base-result-link.vue.d.ts.map +1 -1
  430. package/types/components/scroll/base-scroll.vue.d.ts +0 -28
  431. package/types/components/scroll/base-scroll.vue.d.ts.map +1 -1
  432. package/types/components/scroll/index.d.ts +0 -3
  433. package/types/components/scroll/index.d.ts.map +1 -1
  434. package/types/components/scroll/scroll.mixin.d.ts +75 -30
  435. package/types/components/scroll/scroll.mixin.d.ts.map +1 -1
  436. package/types/components/suggestions/base-suggestion.vue.d.ts +15 -2
  437. package/types/components/suggestions/base-suggestion.vue.d.ts.map +1 -1
  438. package/types/components/x-component.utils.d.ts +1 -1
  439. package/types/components/x-component.utils.d.ts.map +1 -1
  440. package/types/index.d.ts +1 -0
  441. package/types/index.d.ts.map +1 -1
  442. package/types/plugins/x-plugin.mixin.d.ts +2 -2
  443. package/types/plugins/x-plugin.mixin.d.ts.map +1 -1
  444. package/types/plugins/x-plugin.types.d.ts +1 -1
  445. package/types/plugins/x-plugin.types.d.ts.map +1 -1
  446. package/types/router.d.ts.map +1 -1
  447. package/types/store/x.module.d.ts.map +1 -1
  448. package/types/types/index.d.ts +1 -1
  449. package/types/types/index.d.ts.map +1 -1
  450. package/types/types/origin.d.ts +46 -0
  451. package/types/types/origin.d.ts.map +1 -0
  452. package/types/types/url-params.d.ts +1 -1
  453. package/types/utils/index.d.ts +1 -0
  454. package/types/utils/index.d.ts.map +1 -1
  455. package/types/utils/origin.d.ts +13 -0
  456. package/types/utils/origin.d.ts.map +1 -0
  457. package/types/wiring/events.types.d.ts +18 -40
  458. package/types/wiring/events.types.d.ts.map +1 -1
  459. package/types/wiring/wiring.types.d.ts +9 -10
  460. package/types/wiring/wiring.types.d.ts.map +1 -1
  461. package/types/x-modules/history-queries/components/history-query.vue.d.ts.map +1 -1
  462. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +8 -0
  463. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts.map +1 -1
  464. package/types/x-modules/identifier-results/store/actions/{set-url-params.action.d.ts → save-origin.action.d.ts} +4 -4
  465. package/types/x-modules/identifier-results/store/actions/save-origin.action.d.ts.map +1 -0
  466. package/types/x-modules/identifier-results/store/actions/save-query.action.d.ts.map +1 -1
  467. package/types/x-modules/identifier-results/store/getters/identifier-results-request.getter.d.ts.map +1 -1
  468. package/types/x-modules/identifier-results/store/index.d.ts +1 -0
  469. package/types/x-modules/identifier-results/store/index.d.ts.map +1 -1
  470. package/types/x-modules/identifier-results/store/module.d.ts.map +1 -1
  471. package/types/x-modules/identifier-results/store/types.d.ts +35 -17
  472. package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
  473. package/types/x-modules/identifier-results/wiring.d.ts +17 -1
  474. package/types/x-modules/identifier-results/wiring.d.ts.map +1 -1
  475. package/types/x-modules/next-queries/components/next-query.vue.d.ts.map +1 -1
  476. package/types/x-modules/popular-searches/components/popular-search.vue.d.ts.map +1 -1
  477. package/types/x-modules/query-suggestions/components/query-suggestion.vue.d.ts.map +1 -1
  478. package/types/x-modules/related-tags/components/related-tag.vue.d.ts +10 -5
  479. package/types/x-modules/related-tags/components/related-tag.vue.d.ts.map +1 -1
  480. package/types/x-modules/scroll/components/index.d.ts +8 -0
  481. package/types/x-modules/scroll/components/index.d.ts.map +1 -0
  482. package/types/x-modules/scroll/components/main-scroll-item.vue.d.ts +65 -0
  483. package/types/x-modules/scroll/components/main-scroll-item.vue.d.ts.map +1 -0
  484. package/types/x-modules/scroll/components/main-scroll.vue.d.ts +121 -0
  485. package/types/x-modules/scroll/components/main-scroll.vue.d.ts.map +1 -0
  486. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +80 -0
  487. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts.map +1 -0
  488. package/types/x-modules/scroll/components/scroll.const.d.ts +15 -0
  489. package/types/x-modules/scroll/components/scroll.const.d.ts.map +1 -0
  490. package/types/x-modules/scroll/components/scroll.types.d.ts +20 -0
  491. package/types/x-modules/scroll/components/scroll.types.d.ts.map +1 -0
  492. package/types/{components/scroll/base-id-scroll.vue.d.ts → x-modules/scroll/components/scroll.vue.d.ts} +17 -30
  493. package/types/x-modules/scroll/components/scroll.vue.d.ts.map +1 -0
  494. package/types/x-modules/scroll/components/window-scroll.vue.d.ts +47 -0
  495. package/types/x-modules/scroll/components/window-scroll.vue.d.ts.map +1 -0
  496. package/types/x-modules/scroll/events.types.d.ts +53 -0
  497. package/types/x-modules/scroll/events.types.d.ts.map +1 -0
  498. package/types/x-modules/scroll/index.d.ts +6 -0
  499. package/types/x-modules/scroll/index.d.ts.map +1 -0
  500. package/types/x-modules/scroll/store/emitters.d.ts +7 -0
  501. package/types/x-modules/scroll/store/emitters.d.ts.map +1 -0
  502. package/types/x-modules/scroll/store/index.d.ts +4 -0
  503. package/types/x-modules/scroll/store/index.d.ts.map +1 -0
  504. package/types/x-modules/scroll/store/module.d.ts +8 -0
  505. package/types/x-modules/scroll/store/module.d.ts.map +1 -0
  506. package/types/x-modules/scroll/store/types.d.ts +98 -0
  507. package/types/x-modules/scroll/store/types.d.ts.map +1 -0
  508. package/types/x-modules/scroll/wiring.d.ts +74 -0
  509. package/types/x-modules/scroll/wiring.d.ts.map +1 -0
  510. package/types/x-modules/scroll/x-module.d.ts +16 -0
  511. package/types/x-modules/scroll/x-module.d.ts.map +1 -0
  512. package/types/x-modules/search/components/partial-query-button.vue.d.ts +9 -4
  513. package/types/x-modules/search/components/partial-query-button.vue.d.ts.map +1 -1
  514. package/types/x-modules/search/components/sort.mixin.d.ts +3 -11
  515. package/types/x-modules/search/components/sort.mixin.d.ts.map +1 -1
  516. package/types/x-modules/search/components/spellcheck-button.vue.d.ts +9 -4
  517. package/types/x-modules/search/components/spellcheck-button.vue.d.ts.map +1 -1
  518. package/types/x-modules/search/events.types.d.ts +6 -1
  519. package/types/x-modules/search/events.types.d.ts.map +1 -1
  520. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
  521. package/types/x-modules/search/store/actions/save-origin.action.d.ts +12 -0
  522. package/types/x-modules/search/store/actions/save-origin.action.d.ts.map +1 -0
  523. package/types/x-modules/search/store/actions/set-url-params.action.d.ts.map +1 -1
  524. package/types/x-modules/search/store/emitters.d.ts +4 -0
  525. package/types/x-modules/search/store/emitters.d.ts.map +1 -1
  526. package/types/x-modules/search/store/module.d.ts.map +1 -1
  527. package/types/x-modules/search/store/types.d.ts +17 -3
  528. package/types/x-modules/search/store/types.d.ts.map +1 -1
  529. package/types/x-modules/search/wiring.d.ts +3 -3
  530. package/types/x-modules/search/wiring.d.ts.map +1 -1
  531. package/types/x-modules/search-box/components/search-button.vue.d.ts +14 -2
  532. package/types/x-modules/search-box/components/search-button.vue.d.ts.map +1 -1
  533. package/types/x-modules/search-box/components/search-input.vue.d.ts +1 -1
  534. package/types/x-modules/search-box/components/search-input.vue.d.ts.map +1 -1
  535. package/types/x-modules/tagging/components/index.d.ts +2 -0
  536. package/types/x-modules/tagging/components/index.d.ts.map +1 -0
  537. package/types/x-modules/tagging/config.types.d.ts +9 -0
  538. package/types/x-modules/tagging/config.types.d.ts.map +1 -1
  539. package/types/x-modules/tagging/events.types.d.ts +20 -0
  540. package/types/x-modules/tagging/events.types.d.ts.map +1 -1
  541. package/types/x-modules/tagging/index.d.ts +1 -0
  542. package/types/x-modules/tagging/index.d.ts.map +1 -1
  543. package/types/x-modules/tagging/service/index.d.ts +3 -0
  544. package/types/x-modules/tagging/service/index.d.ts.map +1 -0
  545. package/types/x-modules/tagging/service/session.service.d.ts +20 -0
  546. package/types/x-modules/tagging/service/session.service.d.ts.map +1 -0
  547. package/types/x-modules/tagging/service/types.d.ts +21 -0
  548. package/types/x-modules/tagging/service/types.d.ts.map +1 -0
  549. package/types/x-modules/tagging/store/actions/index.d.ts +2 -0
  550. package/types/x-modules/tagging/store/actions/index.d.ts.map +1 -0
  551. package/types/x-modules/tagging/store/actions/track.action.d.ts +12 -0
  552. package/types/x-modules/tagging/store/actions/track.action.d.ts.map +1 -0
  553. package/types/x-modules/tagging/store/emitters.d.ts +3 -1
  554. package/types/x-modules/tagging/store/emitters.d.ts.map +1 -1
  555. package/types/x-modules/tagging/store/index.d.ts +1 -0
  556. package/types/x-modules/tagging/store/index.d.ts.map +1 -1
  557. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  558. package/types/x-modules/tagging/store/types.d.ts +34 -0
  559. package/types/x-modules/tagging/store/types.d.ts.map +1 -1
  560. package/types/x-modules/tagging/wiring.d.ts +42 -1
  561. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  562. package/types/x-modules/url/store/module.d.ts.map +1 -1
  563. package/types/x-modules/url/store/types.d.ts +12 -0
  564. package/types/x-modules/url/store/types.d.ts.map +1 -1
  565. package/types/x-modules/url/wiring.d.ts +18 -0
  566. package/types/x-modules/url/wiring.d.ts.map +1 -1
  567. package/types/x-modules/x-modules.types.d.ts +3 -1
  568. package/types/x-modules/x-modules.types.d.ts.map +1 -1
  569. package/url/index.js +1 -1
  570. package/docs/API-reference/api/x-components.baseidscroll.md +0 -24
  571. package/docs/API-reference/api/x-components.baseidscroll.resetonquerychange.md +0 -13
  572. package/docs/API-reference/api/x-components.basemainscroll.element.md +0 -13
  573. package/docs/API-reference/api/x-components.basemainscroll.md +0 -31
  574. package/docs/API-reference/api/x-components.basemainscroll.tag.md +0 -13
  575. package/docs/API-reference/api/x-components.baseresultlink.emituserclickedaresult.md +0 -17
  576. package/docs/API-reference/api/x-components.baseresultlink.emituserrightclickedaresult.md +0 -17
  577. package/docs/API-reference/api/x-components.baseresultlink.metadata.md +0 -13
  578. package/docs/API-reference/api/x-components.baseresultlink.mounted.md +0 -15
  579. package/docs/API-reference/api/x-components.baseresultlink.origin.md +0 -13
  580. package/docs/API-reference/api/x-components.baseresultlink.resultclickextraevents.md +0 -13
  581. package/docs/API-reference/api/x-components.basescroll.resetonquerychange.md +0 -13
  582. package/docs/API-reference/api/x-components.basescrolltotop.md +0 -23
  583. package/docs/API-reference/api/x-components.identifierresultsactions.seturlparams.md +0 -24
  584. package/docs/API-reference/api/x-components.sortmixin.value.md +0 -13
  585. package/docs/API-reference/api/x-components.wiremetadata.origin.md +0 -13
  586. package/docs/API-reference/api/x-components.xeventstypes.useralmostreachedscrollend.md +0 -13
  587. package/docs/API-reference/api/x-components.xeventstypes.userreachedscrollend.md +0 -13
  588. package/docs/API-reference/api/x-components.xeventstypes.userreachedscrollstart.md +0 -13
  589. package/docs/API-reference/api/x-types.redirection.tagging.md +0 -15
  590. package/docs/API-reference/api/x-types.result.tagging.md +0 -13
  591. package/docs/API-reference/api/x-types.resulttagging.add2cart.md +0 -13
  592. package/docs/API-reference/api/x-types.resulttagging.checkout.md +0 -13
  593. package/docs/API-reference/api/x-types.resulttagging.click.md +0 -13
  594. package/docs/API-reference/api/x-types.resulttagging.md +0 -22
  595. package/docs/API-reference/components/common/scroll/x-components.base-id-scroll.md +0 -216
  596. package/docs/API-reference/components/common/scroll/x-components.base-main-scroll.md +0 -170
  597. package/docs/css/global.scss +0 -1
  598. package/docs/css/utils/utils.scss +0 -35
  599. package/docs/css/xcomponents/clear-search-input.scss +0 -9
  600. package/docs/css/xcomponents/index.scss +0 -16
  601. package/docs/css/xcomponents/search-input.scss +0 -10
  602. package/docs/css/xcomponents/suggestions.scss +0 -19
  603. package/docs/guide/getting-started/components/clear-search-input.md +0 -98
  604. package/docs/guide/getting-started/components/live-examples.md +0 -100
  605. package/docs/guide/getting-started/components/query-suggestions.md +0 -76
  606. package/docs/guide/getting-started/components/search-button.md +0 -98
  607. package/docs/guide/getting-started/components/search-input.md +0 -105
  608. package/docs/guide/getting-started/install-xplugin.md +0 -72
  609. package/docs/guide/getting-started/use-components.md +0 -75
  610. package/docs/guide/install.md +0 -30
  611. package/docs/react-components/ReactComponents.jsx +0 -46
  612. package/docs/react-components/Utils.jsx +0 -34
  613. package/js/components/scroll/base-id-scroll.vue.js.map +0 -1
  614. package/js/components/scroll/base-id-scroll.vue_rollup-plugin-vue=script.js +0 -110
  615. package/js/components/scroll/base-id-scroll.vue_rollup-plugin-vue=script.js.map +0 -1
  616. package/js/components/scroll/base-main-scroll.vue.js.map +0 -1
  617. package/js/components/scroll/base-main-scroll.vue_rollup-plugin-vue=script.js +0 -105
  618. package/js/components/scroll/base-main-scroll.vue_rollup-plugin-vue=script.js.map +0 -1
  619. package/js/components/scroll/base-scroll-to-top.vue.js.map +0 -1
  620. package/js/components/scroll/base-scroll-to-top.vue_rollup-plugin-vue=script.js +0 -179
  621. package/js/components/scroll/base-scroll-to-top.vue_rollup-plugin-vue=script.js.map +0 -1
  622. package/js/x-modules/identifier-results/store/actions/set-url-params.action.js +0 -17
  623. package/js/x-modules/identifier-results/store/actions/set-url-params.action.js.map +0 -1
  624. package/types/components/scroll/base-id-scroll.vue.d.ts.map +0 -1
  625. package/types/components/scroll/base-main-scroll.vue.d.ts +0 -78
  626. package/types/components/scroll/base-main-scroll.vue.d.ts.map +0 -1
  627. package/types/components/scroll/base-scroll-to-top.vue.d.ts +0 -119
  628. package/types/components/scroll/base-scroll-to-top.vue.d.ts.map +0 -1
  629. package/types/types/query-origin.d.ts +0 -7
  630. package/types/types/query-origin.d.ts.map +0 -1
  631. package/types/x-modules/identifier-results/store/actions/set-url-params.action.d.ts.map +0 -1
@@ -0,0 +1,39 @@
1
+ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
+ import script from './location-provider.vue_rollup-plugin-vue=script.js';
3
+
4
+ /* script */
5
+ var __vue_script__ = script;
6
+
7
+ /* template */
8
+
9
+ /* style */
10
+ var __vue_inject_styles__ = undefined;
11
+ /* scoped */
12
+ var __vue_scope_id__ = undefined;
13
+ /* module identifier */
14
+ var __vue_module_identifier__ = undefined;
15
+ /* functional template */
16
+ var __vue_is_functional_template__ = undefined;
17
+ /* style inject */
18
+
19
+ /* style inject SSR */
20
+
21
+ /* style inject shadow dom */
22
+
23
+
24
+
25
+ var __vue_component__ = /*#__PURE__*/__vue_normalize__(
26
+ {},
27
+ __vue_inject_styles__,
28
+ __vue_script__,
29
+ __vue_scope_id__,
30
+ __vue_is_functional_template__,
31
+ __vue_module_identifier__,
32
+ false,
33
+ undefined,
34
+ undefined,
35
+ undefined
36
+ );
37
+
38
+ export default __vue_component__;
39
+ //# sourceMappingURL=location-provider.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location-provider.vue.js","sources":["../../../src/components/location-provider.vue"],"sourcesContent":["<script lang=\"ts\">\n import { Prop, Provide, Component } from 'vue-property-decorator';\n import { NoElement } from '../components/no-element';\n import { FeatureLocation } from '../types';\n\n /**\n * Location Provider component.\n * This component injects the location with value passed as prop.\n *\n * @public\n */\n @Component\n export default class LocationProvider extends NoElement {\n /**\n * The {@link FeatureLocation} to provide.\n *\n * @public\n */\n @Prop({ required: true })\n @Provide()\n protected location!: FeatureLocation;\n }\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events. However, events emitted by child components, will include the\n`location` prop value in its metadata.\n\n## See it in action\n\nIn this example, the `LocationProvider` component receives the `location` prop with the\n`predictive_layer` value. This value will then be combined with the `NextQueries` feature name,\n`next_query` to create a `QueryOrigin` string, which is used for tracking the performance of the\ndifferent tools that generate the query.\n\n```vue\n<template>\n <LocationProvider location=\"predictive_layer\">\n <NextQueries />\n </LocationProvider>\n</template>\n<script>\n import { LocationProvider } from '@empathyco/x-components';\n import { NextQueries } from '@empathyco/x-components/next-queries';\n export default {\n name: 'LocationProviderDemo',\n components: {\n LocationProvider,\n NextQueries\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,27 @@
1
+ import { __extends, __decorate } from 'tslib';
2
+ import { Prop, Provide, Component } from 'vue-property-decorator';
3
+ import { NoElement } from './no-element.js';
4
+
5
+ /**
6
+ * Location Provider component.
7
+ * This component injects the location with value passed as prop.
8
+ *
9
+ * @public
10
+ */
11
+ var LocationProvider = /** @class */ (function (_super) {
12
+ __extends(LocationProvider, _super);
13
+ function LocationProvider() {
14
+ return _super !== null && _super.apply(this, arguments) || this;
15
+ }
16
+ __decorate([
17
+ Prop({ required: true }),
18
+ Provide()
19
+ ], LocationProvider.prototype, "location", void 0);
20
+ LocationProvider = __decorate([
21
+ Component
22
+ ], LocationProvider);
23
+ return LocationProvider;
24
+ }(NoElement));
25
+
26
+ export default LocationProvider;
27
+ //# sourceMappingURL=location-provider.vue_rollup-plugin-vue=script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location-provider.vue_rollup-plugin-vue=script.js","sources":["../../../src/components/location-provider.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { Prop, Provide, Component } from 'vue-property-decorator';\nimport { NoElement } from '../components/no-element';\nimport { FeatureLocation } from '../types';\n\n/**\n * Location Provider component.\n * This component injects the location with value passed as prop.\n *\n * @public\n */\n@Component\nexport default class LocationProvider extends NoElement {\n /**\n * The {@link FeatureLocation} to provide.\n *\n * @public\n */\n @Prop({ required: true })\n @Provide()\n protected location!: FeatureLocation;\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;;AAOA;IAA8C,oCAAS;IAAvD;;KASC;IADC;QAFC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACxB,OAAO,EAAE;sDAC2B;IARlB,gBAAgB;QADpC,SAAS;OACW,gBAAgB,CASpC;IAAD,uBAAC;CAAA,CAT6C,SAAS;;;;"}
@@ -38,11 +38,11 @@ __vue_render__._withStripped = true;
38
38
  /* style */
39
39
  var __vue_inject_styles__ = function (inject) {
40
40
  if (!inject) { return }
41
- inject("data-v-2d8804c6_0", { source: ".x-result-link[data-v-2d8804c6] {\n text-decoration: none;\n}", map: undefined, media: undefined });
41
+ inject("data-v-13699ce7_0", { source: ".x-result-link[data-v-13699ce7] {\n text-decoration: none;\n}", map: undefined, media: undefined });
42
42
 
43
43
  };
44
44
  /* scoped */
45
- var __vue_scope_id__ = "data-v-2d8804c6";
45
+ var __vue_scope_id__ = "data-v-13699ce7";
46
46
  /* module identifier */
47
47
  var __vue_module_identifier__ = undefined;
48
48
  /* functional template */
@@ -1 +1 @@
1
- {"version":3,"file":"base-result-link.vue.js","sources":["../../../../src/components/result/base-result-link.vue"],"sourcesContent":["<template>\n <a\n @click=\"emitUserClickedAResult\"\n @click.middle=\"emitUserClickedAResult\"\n @click.right=\"emitUserRightClickedAResult\"\n :href=\"result.url\"\n class=\"x-result-link\"\n data-test=\"result-link\"\n >\n <!--\n @slot (Required) Link content with a text, an image, another component or both\n @binding {Result} result - Result data\n -->\n <slot :result=\"result\" />\n </a>\n</template>\n\n<script lang=\"ts\">\n import { Result } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Inject, Prop } from 'vue-property-decorator';\n import { QueryOrigin } from '../../types/query-origin';\n import { PropsWithType } from '../../utils/types';\n import { XEventsTypes } from '../../wiring/events.types';\n import { WireMetadata } from '../../wiring/wiring.types';\n\n /**\n * Component to be reused that renders an `<a>` wrapping the result contents.\n *\n * @remarks\n * It has the logic to emit {@link XEventsTypes.UserClickedAResult} and\n * {@link XEventsTypes.UserRightClickedAResult} to the bus on click mouse events.\n * Additionally, this component may be injected other events to be emitted on click event, so,\n * depending where it's used its father component may provide this events.\n *\n * @public\n */\n @Component\n export default class BaseResultLink extends Vue {\n /**\n * The origin to be sent as part of the `params` property in the\n * {@link @empathyco/x-types#Tagging | tagging} information.\n *\n * @public\n */\n @Inject({ from: 'origin', default: 'default' })\n protected origin!: QueryOrigin;\n\n /**\n * The list of additional events to be emitted by the component when user clicks the link.\n *\n * @public\n */\n @Inject({ from: 'resultClickExtraEvents', default: [] })\n protected resultClickExtraEvents!: PropsWithType<XEventsTypes, Result>[];\n\n /**\n * (Required) The {@link @empathyco/x-types#Result | result} information.\n *\n * @public\n */\n @Prop({ required: true })\n protected result!: Result;\n\n /**\n * The metadata to emit the event.\n *\n * @public\n */\n protected metadata!: Omit<WireMetadata, 'moduleName'>;\n\n mounted(): void {\n this.metadata = {\n target: this.$el as HTMLElement,\n origin: this.origin\n };\n }\n\n /**\n * Emits the {@link XEventsTypes.UserClickedAResult} when user clicks on the result, and also\n * additional events if have been injected in the component.\n *\n * @public\n */\n emitUserClickedAResult(): void {\n this.$x.emit('UserClickedAResult', this.result, this.metadata);\n this.resultClickExtraEvents.forEach(event => {\n this.$x.emit(event, this.result, this.metadata);\n });\n }\n\n /**\n * Emits the {@link XEventsTypes.UserRightClickedAResult} when user right clicks on the result.\n *\n * @public\n */\n emitUserRightClickedAResult(): void {\n this.$x.emit('UserRightClickedAResult', this.result, this.metadata);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-result-link {\n text-decoration: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Basic example\n\nThis component is a wrapper for the result contents (images, name, price...) It may be part of the\nsearch result page, recommendations or other section which needs to include results.\n\nThis component will emit `UserClickedAResult` when clicked or middle clicked and\n`UserRightClickedAResult` when right clicked.\n\nAdditionally, this component may be injected other events to be emitted on click event, so,\ndepending where it's used its father component may provide this events.\n\nThe result prop is required. It will render a `<a></a>` with the href to the result URL:\n\n```vue\n<BaseResultLink :result=\"result\">\n <template #default=\"{ result }\">\n <img :src=\"result.images[0]\"/>\n <span>{{ result.name }}</span>\n </template>\n</BaseResultLink>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedAResult`: the event is emitted after the user clicks the element. The event payload is\n the result data and the metadata with the target and the origin of the element that emitted it.\n- `UserRightClickedAResult`: the event is emitted after the user right clicks the element. The event\n payload is the result data and the metadata with the target and the origin of the element that\n emitted it.\n- The component can emit more events on click using the `resultClickExtraEvents` prop.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"base-result-link.vue.js","sources":["../../../../src/components/result/base-result-link.vue"],"sourcesContent":["<template>\n <a\n @click=\"emitUserClickedAResult\"\n @click.middle=\"emitUserClickedAResult\"\n @click.right=\"emitUserRightClickedAResult\"\n :href=\"result.url\"\n class=\"x-result-link\"\n data-test=\"result-link\"\n >\n <!--\n @slot (Required) Link content with a text, an image, another component or both\n @binding {Result} result - Result data\n -->\n <slot :result=\"result\" />\n </a>\n</template>\n\n<script lang=\"ts\">\n import { Result } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Inject, Prop } from 'vue-property-decorator';\n import { PropsWithType } from '../../utils/types';\n import { XEventsTypes } from '../../wiring/events.types';\n\n /**\n * Component to be reused that renders an `<a>` wrapping the result contents.\n *\n * @remarks\n * It has the logic to emit {@link XEventsTypes.UserClickedAResult} and\n * {@link XEventsTypes.UserRightClickedAResult} to the bus on click mouse events.\n * Additionally, this component may be injected other events to be emitted on click event, so,\n * depending where it's used its father component may provide this events.\n *\n * @public\n */\n @Component\n export default class BaseResultLink extends Vue {\n /**\n * The rendered DOM element.\n *\n * @internal\n */\n public $el!: HTMLElement;\n /**\n * The list of additional events to be emitted by the component when user clicks the link.\n *\n * @internal\n */\n @Inject({ from: 'resultClickExtraEvents', default: [] })\n protected resultClickExtraEvents!: PropsWithType<XEventsTypes, Result>[];\n\n /**\n * (Required) The {@link @empathyco/x-types#Result | result} information.\n *\n * @public\n */\n @Prop({ required: true })\n protected result!: Result;\n\n /**\n * Emits the {@link XEventsTypes.UserClickedAResult} when user clicks on the result, and also\n * additional events if have been injected in the component.\n *\n * @internal\n */\n protected emitUserClickedAResult(): void {\n this.$x.emit('UserClickedAResult', this.result, { target: this.$el });\n this.resultClickExtraEvents.forEach(event => {\n this.$x.emit(event, this.result, { target: this.$el });\n });\n }\n\n /**\n * Emits the {@link XEventsTypes.UserRightClickedAResult} when user right clicks on the result.\n *\n * @internal\n */\n protected emitUserRightClickedAResult(): void {\n this.$x.emit('UserRightClickedAResult', this.result, { target: this.$el });\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-result-link {\n text-decoration: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Basic example\n\nThis component is a wrapper for the result contents (images, name, price...) It may be part of the\nsearch result page, recommendations or other section which needs to include results.\n\nThis component will emit `UserClickedAResult` when clicked or middle clicked and\n`UserRightClickedAResult` when right clicked.\n\nAdditionally, this component may be injected other events to be emitted on click event, so,\ndepending where it's used its father component may provide this events.\n\nThe result prop is required. It will render a `<a></a>` with the href to the result URL:\n\n```vue\n<BaseResultLink :result=\"result\">\n <template #default=\"{ result }\">\n <img :src=\"result.images[0]\"/>\n <span>{{ result.name }}</span>\n </template>\n</BaseResultLink>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedAResult`: the event is emitted after the user clicks the element. The event payload is\n the result data.\n- `UserRightClickedAResult`: the event is emitted after the user right clicks the element. The event\n payload is the result data.\n- The component can emit more events on click using the `resultClickExtraEvents` prop.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -18,36 +18,27 @@ var BaseResultLink = /** @class */ (function (_super) {
18
18
  function BaseResultLink() {
19
19
  return _super !== null && _super.apply(this, arguments) || this;
20
20
  }
21
- BaseResultLink.prototype.mounted = function () {
22
- this.metadata = {
23
- target: this.$el,
24
- origin: this.origin
25
- };
26
- };
27
21
  /**
28
22
  * Emits the {@link XEventsTypes.UserClickedAResult} when user clicks on the result, and also
29
23
  * additional events if have been injected in the component.
30
24
  *
31
- * @public
25
+ * @internal
32
26
  */
33
27
  BaseResultLink.prototype.emitUserClickedAResult = function () {
34
28
  var _this = this;
35
- this.$x.emit('UserClickedAResult', this.result, this.metadata);
29
+ this.$x.emit('UserClickedAResult', this.result, { target: this.$el });
36
30
  this.resultClickExtraEvents.forEach(function (event) {
37
- _this.$x.emit(event, _this.result, _this.metadata);
31
+ _this.$x.emit(event, _this.result, { target: _this.$el });
38
32
  });
39
33
  };
40
34
  /**
41
35
  * Emits the {@link XEventsTypes.UserRightClickedAResult} when user right clicks on the result.
42
36
  *
43
- * @public
37
+ * @internal
44
38
  */
45
39
  BaseResultLink.prototype.emitUserRightClickedAResult = function () {
46
- this.$x.emit('UserRightClickedAResult', this.result, this.metadata);
40
+ this.$x.emit('UserRightClickedAResult', this.result, { target: this.$el });
47
41
  };
48
- __decorate([
49
- Inject({ from: 'origin', default: 'default' })
50
- ], BaseResultLink.prototype, "origin", void 0);
51
42
  __decorate([
52
43
  Inject({ from: 'resultClickExtraEvents', default: [] })
53
44
  ], BaseResultLink.prototype, "resultClickExtraEvents", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"base-result-link.vue_rollup-plugin-vue=script.js","sources":["../../../../src/components/result/base-result-link.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Result } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Inject, Prop } from 'vue-property-decorator';\nimport { QueryOrigin } from '../../types/query-origin';\nimport { PropsWithType } from '../../utils/types';\nimport { XEventsTypes } from '../../wiring/events.types';\nimport { WireMetadata } from '../../wiring/wiring.types';\n\n/**\n * Component to be reused that renders an `<a>` wrapping the result contents.\n *\n * @remarks\n * It has the logic to emit {@link XEventsTypes.UserClickedAResult} and\n * {@link XEventsTypes.UserRightClickedAResult} to the bus on click mouse events.\n * Additionally, this component may be injected other events to be emitted on click event, so,\n * depending where it's used its father component may provide this events.\n *\n * @public\n */\n@Component\nexport default class BaseResultLink extends Vue {\n /**\n * The origin to be sent as part of the `params` property in the\n * {@link @empathyco/x-types#Tagging | tagging} information.\n *\n * @public\n */\n @Inject({ from: 'origin', default: 'default' })\n protected origin!: QueryOrigin;\n\n /**\n * The list of additional events to be emitted by the component when user clicks the link.\n *\n * @public\n */\n @Inject({ from: 'resultClickExtraEvents', default: [] })\n protected resultClickExtraEvents!: PropsWithType<XEventsTypes, Result>[];\n\n /**\n * (Required) The {@link @empathyco/x-types#Result | result} information.\n *\n * @public\n */\n @Prop({ required: true })\n protected result!: Result;\n\n /**\n * The metadata to emit the event.\n *\n * @public\n */\n protected metadata!: Omit<WireMetadata, 'moduleName'>;\n\n mounted(): void {\n this.metadata = {\n target: this.$el as HTMLElement,\n origin: this.origin\n };\n }\n\n /**\n * Emits the {@link XEventsTypes.UserClickedAResult} when user clicks on the result, and also\n * additional events if have been injected in the component.\n *\n * @public\n */\n emitUserClickedAResult(): void {\n this.$x.emit('UserClickedAResult', this.result, this.metadata);\n this.resultClickExtraEvents.forEach(event => {\n this.$x.emit(event, this.result, this.metadata);\n });\n }\n\n /**\n * Emits the {@link XEventsTypes.UserRightClickedAResult} when user right clicks on the result.\n *\n * @public\n */\n emitUserRightClickedAResult(): void {\n this.$x.emit('UserRightClickedAResult', this.result, this.metadata);\n }\n}\n"],"names":[],"mappings":";;;;AA0BA;;;;;;;;;;;AAYA;IAA4C,kCAAG;IAA/C;;KA6DC;IA5BC,gCAAO,GAAP;QACE,IAAI,CAAC,QAAQ,GAAG;YACd,MAAM,EAAE,IAAI,CAAC,GAAkB;YAC/B,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;KACH;;;;;;;IAQD,+CAAsB,GAAtB;QAAA,iBAKC;QAJC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/D,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,UAAA,KAAK;YACvC,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAI,CAAC,MAAM,EAAE,KAAI,CAAC,QAAQ,CAAC,CAAC;SACjD,CAAC,CAAC;KACJ;;;;;;IAOD,oDAA2B,GAA3B;QACE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,yBAAyB,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACrE;IApDD;QADC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;kDAChB;IAQ/B;QADC,MAAM,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;kEACiB;IAQzE;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACC;IAxBP,cAAc;QADlC,SAAS;OACW,cAAc,CA6DlC;IAAD,qBAAC;CAAA,CA7D2C,GAAG;;;;"}
1
+ {"version":3,"file":"base-result-link.vue_rollup-plugin-vue=script.js","sources":["../../../../src/components/result/base-result-link.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Result } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Inject, Prop } from 'vue-property-decorator';\nimport { PropsWithType } from '../../utils/types';\nimport { XEventsTypes } from '../../wiring/events.types';\n\n/**\n * Component to be reused that renders an `<a>` wrapping the result contents.\n *\n * @remarks\n * It has the logic to emit {@link XEventsTypes.UserClickedAResult} and\n * {@link XEventsTypes.UserRightClickedAResult} to the bus on click mouse events.\n * Additionally, this component may be injected other events to be emitted on click event, so,\n * depending where it's used its father component may provide this events.\n *\n * @public\n */\n@Component\nexport default class BaseResultLink extends Vue {\n /**\n * The rendered DOM element.\n *\n * @internal\n */\n public $el!: HTMLElement;\n /**\n * The list of additional events to be emitted by the component when user clicks the link.\n *\n * @internal\n */\n @Inject({ from: 'resultClickExtraEvents', default: [] })\n protected resultClickExtraEvents!: PropsWithType<XEventsTypes, Result>[];\n\n /**\n * (Required) The {@link @empathyco/x-types#Result | result} information.\n *\n * @public\n */\n @Prop({ required: true })\n protected result!: Result;\n\n /**\n * Emits the {@link XEventsTypes.UserClickedAResult} when user clicks on the result, and also\n * additional events if have been injected in the component.\n *\n * @internal\n */\n protected emitUserClickedAResult(): void {\n this.$x.emit('UserClickedAResult', this.result, { target: this.$el });\n this.resultClickExtraEvents.forEach(event => {\n this.$x.emit(event, this.result, { target: this.$el });\n });\n }\n\n /**\n * Emits the {@link XEventsTypes.UserRightClickedAResult} when user right clicks on the result.\n *\n * @internal\n */\n protected emitUserRightClickedAResult(): void {\n this.$x.emit('UserRightClickedAResult', this.result, { target: this.$el });\n }\n}\n"],"names":[],"mappings":";;;;AAwBA;;;;;;;;;;;AAYA;IAA4C,kCAAG;IAA/C;;KA4CC;;;;;;;IAfW,+CAAsB,GAAhC;QAAA,iBAKC;QAJC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACtE,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,UAAA,KAAK;YACvC,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAI,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,KAAI,CAAC,GAAG,EAAE,CAAC,CAAC;SACxD,CAAC,CAAC;KACJ;;;;;;IAOS,oDAA2B,GAArC;QACE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,yBAAyB,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;KAC5E;IA9BD;QADC,MAAM,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;kEACiB;IAQzE;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACC;IArBP,cAAc;QADlC,SAAS;OACW,cAAc,CA4ClC;IAAD,qBAAC;CAAA,CA5C2C,GAAG;;;;"}
@@ -27,11 +27,11 @@ __vue_render__._withStripped = true;
27
27
  /* style */
28
28
  var __vue_inject_styles__ = function (inject) {
29
29
  if (!inject) { return }
30
- inject("data-v-0a6872df_0", { source: ".x-base-scroll[data-v-0a6872df] {\n overflow-y: var(--x-string-overflow-scroll, auto);\n}", map: undefined, media: undefined });
30
+ inject("data-v-3fdd429c_0", { source: ".x-base-scroll[data-v-3fdd429c] {\n overflow-y: var(--x-string-overflow-scroll, auto);\n}", map: undefined, media: undefined });
31
31
 
32
32
  };
33
33
  /* scoped */
34
- var __vue_scope_id__ = "data-v-0a6872df";
34
+ var __vue_scope_id__ = "data-v-3fdd429c";
35
35
  /* module identifier */
36
36
  var __vue_module_identifier__ = undefined;
37
37
  /* functional template */
@@ -1 +1 @@
1
- {"version":3,"file":"base-scroll.vue.js","sources":["../../../../src/components/scroll/base-scroll.vue"],"sourcesContent":["<template>\n <div @scroll=\"throttledStoreScrollData\" class=\"x-scroll x-base-scroll\" data-test=\"base-scroll\">\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Component, Prop } from 'vue-property-decorator';\n import { mixins } from 'vue-class-component';\n import { throttle } from '../../utils/throttle';\n import { XOn } from '../decorators/bus.decorators';\n import ScrollMixin from './scroll.mixin';\n\n /**\n * Base scroll component that depending on the user interactivity emits different events for\n * knowing when the user scrolls, the direction of scroll and if user reaches the start or end.\n *\n * @public\n */\n @Component\n export default class BaseScroll extends mixins(ScrollMixin) {\n /**\n * If true (default), sets the scroll position to top when an\n * {@link XEventsTypes.UserAcceptedAQuery} event is emitted.\n *\n * @public\n */\n @Prop({ default: true })\n protected resetOnQueryChange!: boolean;\n\n /**\n * Throttled version of the function that stores the DOM scroll related properties.\n * The duration of the throttle is configured through the\n * {@link ScrollMixin.throttleMs}.\n *\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/unbound-method\n protected throttledStoreScrollData = throttle(this.storeScrollData, this.throttleMs);\n\n mounted(): void {\n this.storeScrollData();\n }\n\n /**\n * Updates scroll related properties.\n *\n * @internal\n */\n protected storeScrollData(): void {\n this.currentPosition = this.$el.scrollTop;\n this.scrollHeight = this.$el.scrollHeight;\n this.clientHeight = this.$el.clientHeight;\n }\n\n /**\n * It sets the scroll to top if the property `resetOnQueryChange` is true.\n *\n * @internal\n */\n @XOn([\n 'SearchBoxQueryChanged',\n 'SortChanged',\n 'SelectedFiltersChanged',\n 'SelectedRelatedTagsChanged'\n ])\n scrollToTop(): void {\n if (this.resetOnQueryChange) {\n this.$el?.scrollTo({ top: 0 });\n }\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-base-scroll {\n overflow-y: var(--x-string-overflow-scroll, auto);\n }\n</style>\n\n<docs lang=\"mdx\">\n# Example\n\nThe BaseScroll is a component that manage the states of scroll of a specified element. The component\ndoes the necessary calculations for knowing the direction of scroll, if the scroll has reached to\nstart or to end, and is about to reaching to end. The components emits the next events depending of\nmovement that realize the user:\n\n```vue\n<template>\n <BaseScroll\n @scroll=\"scroll\"\n @scroll:direction-change=\"scrollDirectionChange\"\n @scroll:at-start=\"scrollAtStart\"\n @scroll:almost-at-end=\"scrollAlmostAtEnd\"\n @scroll:at-end=\"scrollAtEnd\"\n throttleMs=\"1000\"\n distanceToBottom=\"200\"\n >\n <template>\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </template>\n </BaseScroll>\n</template>\n\n<script>\n import { BaseScroll } from '@empathyco/x-components';\n\n export default {\n name: 'ScrollTest',\n components: {\n BaseScroll\n },\n methods: {\n scroll(position) {\n console.log('scroll', position);\n },\n scrollDirectionChange(direction) {\n console.log('scroll:direction-change', direction);\n },\n scrollAtStart() {\n console.log('scroll:at-start');\n },\n scrollAlmostAtEnd(distance) {\n console.log('scroll:almost-at-end', distance);\n },\n scrollAtEnd() {\n console.log('scroll:at-end');\n }\n }\n };\n</script>\n```\n\n## Avoid reset scroll on query change\n\nSet to false the reset scroll on query change feature which is true by default.\n\n```vue\n<template>\n <BaseScroll\n @scroll=\"scroll\"\n @scroll:direction-change=\"scrollDirectionChange\"\n @scroll:at-start=\"scrollAtStart\"\n @scroll:almost-at-end=\"scrollAlmostAtEnd\"\n @scroll:at-end=\"scrollAtEnd\"\n :resetOnQueryChange=\"false\"\n throttleMs=\"1000\"\n distanceToBottom=\"200\"\n >\n <template>\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </template>\n </BaseScroll>\n</template>\n\n<script>\n import { BaseScroll } from '@empathyco/x-components';\n\n export default {\n name: 'ScrollTest',\n components: {\n BaseScroll\n },\n methods: {\n scroll(position) {\n console.log('scroll', position);\n },\n scrollDirectionChange(direction) {\n console.log('scroll:direction-change', direction);\n },\n scrollAtStart() {\n console.log('scroll:at-start');\n },\n scrollAlmostAtEnd(distance) {\n console.log('scroll:almost-at-end', distance);\n },\n scrollAtEnd() {\n console.log('scroll:at-end');\n }\n }\n };\n</script>\n```\n\n## Vue Events:\n\n- `scroll`: the event is emitted after the user scrolls in this container. The payload is the scroll\n top distance in pixels.\n- `scroll:direction-change`: the event is emitted when the user changes the scroll direction. The\n payload is the new scrolling direction.\n- `scroll:at-start`: the event is emitted when the user scrolls up to the initial position of the\n scroll.\n- `scroll:almost-at-end`: the event is emitted when the user is about to reach the bottom part of\n the scroll.\n- `scroll:at-end`: the event is emitted when the user has reached the bottom part of the scroll.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"base-scroll.vue.js","sources":["../../../../src/components/scroll/base-scroll.vue"],"sourcesContent":["<template>\n <div @scroll=\"throttledStoreScrollData\" class=\"x-scroll x-base-scroll\" data-test=\"base-scroll\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { mixins } from 'vue-class-component';\n import { Component } from 'vue-property-decorator';\n import ScrollMixin from './scroll.mixin';\n\n /**\n * Base scroll component that depending on the user interactivity emits different events for\n * knowing when the user scrolls, the direction of scroll and if user reaches the start or end.\n *\n * @public\n */\n @Component\n export default class BaseScroll extends mixins(ScrollMixin) {}\n</script>\n\n<style lang=\"scss\" scoped>\n .x-base-scroll {\n overflow-y: var(--x-string-overflow-scroll, auto);\n }\n</style>\n\n<docs lang=\"mdx\">\n# Example\n\nThe BaseScroll is a component that manage the states of scroll of a specified element. The component\ndoes the necessary calculations for knowing the direction of scroll, if the scroll has reached to\nstart or to end, and is about to reaching to end. The components emits the next events depending of\nmovement that realize the user:\n\n```vue\n<template>\n <BaseScroll\n @scroll=\"scroll\"\n @scroll:direction-change=\"scrollDirectionChange\"\n @scroll:at-start=\"scrollAtStart\"\n @scroll:almost-at-end=\"scrollAlmostAtEnd\"\n @scroll:at-end=\"scrollAtEnd\"\n throttleMs=\"1000\"\n distanceToBottom=\"200\"\n >\n <template>\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </template>\n </BaseScroll>\n</template>\n\n<script>\n import { BaseScroll } from '@empathyco/x-components';\n\n export default {\n name: 'ScrollTest',\n components: {\n BaseScroll\n },\n methods: {\n scroll(position) {\n console.log('scroll', position);\n },\n scrollDirectionChange(direction) {\n console.log('scroll:direction-change', direction);\n },\n scrollAtStart() {\n console.log('scroll:at-start');\n },\n scrollAlmostAtEnd(distance) {\n console.log('scroll:almost-at-end', distance);\n },\n scrollAtEnd() {\n console.log('scroll:at-end');\n }\n }\n };\n</script>\n```\n\n## Avoid reset scroll on query change\n\nSet to false the reset scroll on query change feature which is true by default.\n\n```vue\n<template>\n <BaseScroll\n @scroll=\"scroll\"\n @scroll:direction-change=\"scrollDirectionChange\"\n @scroll:at-start=\"scrollAtStart\"\n @scroll:almost-at-end=\"scrollAlmostAtEnd\"\n @scroll:at-end=\"scrollAtEnd\"\n throttleMs=\"1000\"\n distanceToBottom=\"200\"\n >\n <template>\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </template>\n </BaseScroll>\n</template>\n\n<script>\n import { BaseScroll } from '@empathyco/x-components';\n\n export default {\n name: 'ScrollTest',\n components: {\n BaseScroll\n },\n methods: {\n scroll(position) {\n console.log('scroll', position);\n },\n scrollDirectionChange(direction) {\n console.log('scroll:direction-change', direction);\n },\n scrollAtStart() {\n console.log('scroll:at-start');\n },\n scrollAlmostAtEnd(distance) {\n console.log('scroll:almost-at-end', distance);\n },\n scrollAtEnd() {\n console.log('scroll:at-end');\n }\n }\n };\n</script>\n```\n\n## Vue Events:\n\n- `scroll`: the event is emitted after the user scrolls in this container. The payload is the scroll\n top distance in pixels.\n- `scroll:direction-change`: the event is emitted when the user changes the scroll direction. The\n payload is the new scrolling direction.\n- `scroll:at-start`: the event is emitted when the user scrolls up to the initial position of the\n scroll.\n- `scroll:almost-at-end`: the event is emitted when the user is about to reach the bottom part of\n the scroll.\n- `scroll:at-end`: the event is emitted when the user has reached the bottom part of the scroll.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,6 @@
1
1
  import { __extends, __decorate } from 'tslib';
2
- import { Prop, Component } from 'vue-property-decorator';
3
- import { throttle } from '../../utils/throttle.js';
2
+ import { Component } from 'vue-property-decorator';
4
3
  import { mixins } from 'vue-class-component';
5
- import { XOn } from '../decorators/bus.decorators.js';
6
4
  import ScrollMixin from './scroll.mixin.js';
7
5
 
8
6
  /**
@@ -14,53 +12,8 @@ import ScrollMixin from './scroll.mixin.js';
14
12
  var BaseScroll = /** @class */ (function (_super) {
15
13
  __extends(BaseScroll, _super);
16
14
  function BaseScroll() {
17
- var _this = _super !== null && _super.apply(this, arguments) || this;
18
- /**
19
- * Throttled version of the function that stores the DOM scroll related properties.
20
- * The duration of the throttle is configured through the
21
- * {@link ScrollMixin.throttleMs}.
22
- *
23
- * @internal
24
- */
25
- // eslint-disable-next-line @typescript-eslint/unbound-method
26
- _this.throttledStoreScrollData = throttle(_this.storeScrollData, _this.throttleMs);
27
- return _this;
15
+ return _super !== null && _super.apply(this, arguments) || this;
28
16
  }
29
- BaseScroll.prototype.mounted = function () {
30
- this.storeScrollData();
31
- };
32
- /**
33
- * Updates scroll related properties.
34
- *
35
- * @internal
36
- */
37
- BaseScroll.prototype.storeScrollData = function () {
38
- this.currentPosition = this.$el.scrollTop;
39
- this.scrollHeight = this.$el.scrollHeight;
40
- this.clientHeight = this.$el.clientHeight;
41
- };
42
- /**
43
- * It sets the scroll to top if the property `resetOnQueryChange` is true.
44
- *
45
- * @internal
46
- */
47
- BaseScroll.prototype.scrollToTop = function () {
48
- var _a;
49
- if (this.resetOnQueryChange) {
50
- (_a = this.$el) === null || _a === void 0 ? void 0 : _a.scrollTo({ top: 0 });
51
- }
52
- };
53
- __decorate([
54
- Prop({ default: true })
55
- ], BaseScroll.prototype, "resetOnQueryChange", void 0);
56
- __decorate([
57
- XOn([
58
- 'SearchBoxQueryChanged',
59
- 'SortChanged',
60
- 'SelectedFiltersChanged',
61
- 'SelectedRelatedTagsChanged'
62
- ])
63
- ], BaseScroll.prototype, "scrollToTop", null);
64
17
  BaseScroll = __decorate([
65
18
  Component
66
19
  ], BaseScroll);
@@ -1 +1 @@
1
- {"version":3,"file":"base-scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../src/components/scroll/base-scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport { Component, Prop } from 'vue-property-decorator';\nimport { mixins } from 'vue-class-component';\nimport { throttle } from '../../utils/throttle';\nimport { XOn } from '../decorators/bus.decorators';\nimport ScrollMixin from './scroll.mixin';\n\n/**\n * Base scroll component that depending on the user interactivity emits different events for\n * knowing when the user scrolls, the direction of scroll and if user reaches the start or end.\n *\n * @public\n */\n@Component\nexport default class BaseScroll extends mixins(ScrollMixin) {\n /**\n * If true (default), sets the scroll position to top when an\n * {@link XEventsTypes.UserAcceptedAQuery} event is emitted.\n *\n * @public\n */\n @Prop({ default: true })\n protected resetOnQueryChange!: boolean;\n\n /**\n * Throttled version of the function that stores the DOM scroll related properties.\n * The duration of the throttle is configured through the\n * {@link ScrollMixin.throttleMs}.\n *\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/unbound-method\n protected throttledStoreScrollData = throttle(this.storeScrollData, this.throttleMs);\n\n mounted(): void {\n this.storeScrollData();\n }\n\n /**\n * Updates scroll related properties.\n *\n * @internal\n */\n protected storeScrollData(): void {\n this.currentPosition = this.$el.scrollTop;\n this.scrollHeight = this.$el.scrollHeight;\n this.clientHeight = this.$el.clientHeight;\n }\n\n /**\n * It sets the scroll to top if the property `resetOnQueryChange` is true.\n *\n * @internal\n */\n @XOn([\n 'SearchBoxQueryChanged',\n 'SortChanged',\n 'SelectedFiltersChanged',\n 'SelectedRelatedTagsChanged'\n ])\n scrollToTop(): void {\n if (this.resetOnQueryChange) {\n this.$el?.scrollTo({ top: 0 });\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;AAaA;;;;;;AAOA;IAAwC,8BAAmB;IAA3D;QAAA,qEAmDC;;;;;;;;;QAjCW,8BAAwB,GAAG,QAAQ,CAAC,KAAI,CAAC,eAAe,EAAE,KAAI,CAAC,UAAU,CAAC,CAAC;;KAiCtF;IA/BC,4BAAO,GAAP;QACE,IAAI,CAAC,eAAe,EAAE,CAAC;KACxB;;;;;;IAOS,oCAAe,GAAzB;QACE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;QAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC;QAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC;KAC3C;;;;;;IAaD,gCAAW,GAAX;;QACE,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3B,MAAA,IAAI,CAAC,GAAG,0CAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;SAChC;KACF;IA1CD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0DACe;IAsCvC;QANC,GAAG,CAAC;YACH,uBAAuB;YACvB,aAAa;YACb,wBAAwB;YACxB,4BAA4B;SAC7B,CAAC;iDAKD;IAlDkB,UAAU;QAD9B,SAAS;OACW,UAAU,CAmD9B;IAAD,iBAAC;CAnDD,CAAwC,MAAM,CAAC,WAAW,CAAC;;;;"}
1
+ {"version":3,"file":"base-scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../src/components/scroll/base-scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport { mixins } from 'vue-class-component';\nimport { Component } from 'vue-property-decorator';\nimport ScrollMixin from './scroll.mixin';\n\n/**\n * Base scroll component that depending on the user interactivity emits different events for\n * knowing when the user scrolls, the direction of scroll and if user reaches the start or end.\n *\n * @public\n */\n@Component\nexport default class BaseScroll extends mixins(ScrollMixin) {}\n"],"names":[],"mappings":";;;;;AAWA;;;;;;AAOA;IAAwC,8BAAmB;IAA3D;;KAA8D;IAAzC,UAAU;QAD9B,SAAS;OACW,UAAU,CAA+B;IAAD,iBAAC;CAA9D,CAAwC,MAAM,CAAC,WAAW,CAAC;;;;"}
@@ -1,7 +1,8 @@
1
1
  import { __extends, __decorate } from 'tslib';
2
2
  import Vue from 'vue';
3
- import { Prop, Watch } from 'vue-property-decorator';
4
- import Component from 'vue-class-component';
3
+ import { Prop, Watch, Component } from 'vue-property-decorator';
4
+ import { throttle } from '../../utils/throttle.js';
5
+ import { XOn } from '../decorators/bus.decorators.js';
5
6
 
6
7
  /**
7
8
  * Mixin to share Scroll logic.
@@ -10,8 +11,15 @@ import Component from 'vue-class-component';
10
11
  */
11
12
  var ScrollMixin = /** @class */ (function (_super) {
12
13
  __extends(ScrollMixin, _super);
14
+ /* eslint-disable @typescript-eslint/unbound-method */
13
15
  function ScrollMixin() {
14
16
  var _this = _super !== null && _super.apply(this, arguments) || this;
17
+ /**
18
+ * Property for getting the client height of scroll.
19
+ *
20
+ * @internal
21
+ */
22
+ _this.clientHeight = 0;
15
23
  /**
16
24
  * Property for getting the current position of scroll.
17
25
  *
@@ -30,23 +38,19 @@ var ScrollMixin = /** @class */ (function (_super) {
30
38
  * @internal
31
39
  */
32
40
  _this.scrollHeight = 0;
33
- /**
34
- * Property for getting the client height of scroll.
35
- *
36
- * @internal
37
- */
38
- _this.clientHeight = 0;
39
41
  return _this;
40
42
  }
41
- Object.defineProperty(ScrollMixin.prototype, "scrollEndPosition", {
43
+ Object.defineProperty(ScrollMixin.prototype, "throttledStoreScrollData", {
42
44
  /**
43
- * Returns end position of scroll.
45
+ * Throttled version of the function that stores the DOM scroll related properties.
46
+ * The duration of the throttle is configured through the
47
+ * {@link ScrollMixin.throttleMs}.
44
48
  *
45
- * @returns A number for knowing end position of scroll.
49
+ * @returns A throttled version of the function to store the scroll data.
46
50
  * @internal
47
51
  */
48
52
  get: function () {
49
- return this.scrollHeight - this.clientHeight;
53
+ return throttle(this.storeScrollData, this.throttleMs);
50
54
  },
51
55
  enumerable: false,
52
56
  configurable: true
@@ -64,59 +68,103 @@ var ScrollMixin = /** @class */ (function (_super) {
64
68
  enumerable: false,
65
69
  configurable: true
66
70
  });
67
- Object.defineProperty(ScrollMixin.prototype, "hasScrollReachedStart", {
71
+ Object.defineProperty(ScrollMixin.prototype, "hasScrollAlmostReachedEnd", {
68
72
  /**
69
- * Returns `true` when the scroll is at the initial position.
73
+ * Returns `true` when the amount of pixels scrolled is greater than
74
+ * the {@link ScrollMixin.distanceToBottom}.
70
75
  *
71
- * @returns A boolean for knowing if the user scrolls to the start.
76
+ * @returns A boolean for knowing if the user is about to reaching to the end.
72
77
  * @internal
73
78
  */
74
79
  get: function () {
75
- return this.currentPosition === 0;
80
+ return !this.hasScrollReachedStart && this.distanceToBottom > this.distanceToEnd;
76
81
  },
77
82
  enumerable: false,
78
83
  configurable: true
79
84
  });
80
- Object.defineProperty(ScrollMixin.prototype, "scrollDirection", {
85
+ Object.defineProperty(ScrollMixin.prototype, "hasScrollReachedEnd", {
81
86
  /**
82
- * Returns direction of scroll based in {@link ScrollDirection}.
87
+ * Returns `true` when there is no more content to scroll.
83
88
  *
84
- * @returns The scroll direction.
89
+ * @returns A boolean for knowing if the user scrolls to the end.
85
90
  * @internal
86
91
  */
87
92
  get: function () {
88
- return this.currentPosition > this.previousPosition ? 'DOWN' : 'UP';
93
+ return this.currentPosition === this.scrollEndPosition;
89
94
  },
90
95
  enumerable: false,
91
96
  configurable: true
92
97
  });
93
- Object.defineProperty(ScrollMixin.prototype, "hasScrollAlmostReachedEnd", {
98
+ Object.defineProperty(ScrollMixin.prototype, "hasScrollReachedStart", {
94
99
  /**
95
- * Returns `true` when the amount of pixels scrolled is greater than
96
- * the {@link ScrollMixin.distanceToBottom}.
100
+ * Returns `true` when the scroll is at the initial position.
97
101
  *
98
- * @returns A boolean for knowing if the user is about to reaching to the end.
102
+ * @returns A boolean for knowing if the user scrolls to the start.
99
103
  * @internal
100
104
  */
101
105
  get: function () {
102
- return !this.hasScrollReachedStart && this.distanceToBottom > this.distanceToEnd;
106
+ return this.currentPosition === 0;
103
107
  },
104
108
  enumerable: false,
105
109
  configurable: true
106
110
  });
107
- Object.defineProperty(ScrollMixin.prototype, "hasScrollReachedEnd", {
111
+ Object.defineProperty(ScrollMixin.prototype, "scrollDirection", {
108
112
  /**
109
- * Returns `true` when there is no more content to scroll.
113
+ * Returns direction of scroll based in {@link ScrollDirection}.
110
114
  *
111
- * @returns A boolean for knowing if the user scrolls to the end.
115
+ * @returns The scroll direction.
112
116
  * @internal
113
117
  */
114
118
  get: function () {
115
- return this.currentPosition === this.scrollEndPosition;
119
+ return this.currentPosition > this.previousPosition ? 'DOWN' : 'UP';
120
+ },
121
+ enumerable: false,
122
+ configurable: true
123
+ });
124
+ Object.defineProperty(ScrollMixin.prototype, "scrollEndPosition", {
125
+ /**
126
+ * Returns end position of scroll.
127
+ *
128
+ * @returns A number for knowing end position of scroll.
129
+ * @internal
130
+ */
131
+ get: function () {
132
+ return this.scrollHeight - this.clientHeight;
116
133
  },
117
134
  enumerable: false,
118
135
  configurable: true
119
136
  });
137
+ /**
138
+ * Initialises DOM dependant scroll properties.
139
+ *
140
+ * @internal
141
+ */
142
+ ScrollMixin.prototype.mounted = function () {
143
+ var _this = this;
144
+ this.$nextTick().then(function () {
145
+ if (!_this.$el) {
146
+ // TODO Replace with Empathy's logger
147
+ // eslint-disable-next-line no-console
148
+ console.warn('[ScrollMixin]', 'Components using this mixin must set `this.$el` to the HTML node that is scrolling.');
149
+ }
150
+ else {
151
+ _this.storeScrollData();
152
+ }
153
+ });
154
+ };
155
+ /**
156
+ * Resets the scroll position.
157
+ *
158
+ * @internal
159
+ */
160
+ ScrollMixin.prototype.resetScroll = function () {
161
+ var _this = this;
162
+ this.$nextTick().then(function () {
163
+ if (_this.resetOnChange) {
164
+ _this.$el.scrollTo({ top: 0 });
165
+ }
166
+ });
167
+ };
120
168
  /**
121
169
  * Emits the `scroll` event.
122
170
  *
@@ -128,15 +176,6 @@ var ScrollMixin = /** @class */ (function (_super) {
128
176
  this.$emit('scroll', this.currentPosition);
129
177
  this.previousPosition = oldScrollPosition;
130
178
  };
131
- /**
132
- * Emits the `scroll:direction-change` event when the scrolling direction has changed.
133
- *
134
- * @param direction - The new direction of scroll.
135
- * @internal
136
- */
137
- ScrollMixin.prototype.emitScrollDirection = function (direction) {
138
- this.$emit('scroll:direction-change', direction);
139
- };
140
179
  /**
141
180
  * Emits the 'scroll:at-start' event when the user reaches the start.
142
181
  *
@@ -144,9 +183,7 @@ var ScrollMixin = /** @class */ (function (_super) {
144
183
  * @internal
145
184
  */
146
185
  ScrollMixin.prototype.emitScrollReachedAtStart = function (isScrollAtStart) {
147
- if (isScrollAtStart) {
148
- this.$emit('scroll:at-start');
149
- }
186
+ this.$emit('scroll:at-start', isScrollAtStart);
150
187
  };
151
188
  /**
152
189
  * Emits the 'scroll:almost-at-end' event when the user is about to reach to end.
@@ -155,9 +192,7 @@ var ScrollMixin = /** @class */ (function (_super) {
155
192
  * @internal
156
193
  */
157
194
  ScrollMixin.prototype.emitScrollAlmostAtEnd = function (isScrollAlmostAtEnd) {
158
- if (isScrollAlmostAtEnd) {
159
- this.$emit('scroll:almost-at-end', this.distanceToEnd);
160
- }
195
+ this.$emit('scroll:almost-at-end', isScrollAlmostAtEnd);
161
196
  };
162
197
  /**
163
198
  * Emits the 'scroll:at-end' event when the user reaches the end.
@@ -166,22 +201,52 @@ var ScrollMixin = /** @class */ (function (_super) {
166
201
  * @internal
167
202
  */
168
203
  ScrollMixin.prototype.emitScrollAtEnd = function (isScrollAtEnd) {
169
- if (isScrollAtEnd) {
170
- this.$emit('scroll:at-end');
204
+ this.$emit('scroll:at-end', isScrollAtEnd);
205
+ };
206
+ /**
207
+ * Emits the `scroll:direction-change` event when the scrolling direction has changed.
208
+ *
209
+ * @param direction - The new direction of scroll.
210
+ * @internal
211
+ */
212
+ ScrollMixin.prototype.emitScrollDirection = function (direction) {
213
+ this.$emit('scroll:direction-change', direction);
214
+ };
215
+ /**
216
+ * Updates scroll related properties.
217
+ *
218
+ * @internal
219
+ */
220
+ ScrollMixin.prototype.storeScrollData = function () {
221
+ if (this.$el) {
222
+ this.currentPosition = this.$el.scrollTop;
223
+ this.scrollHeight = this.$el.scrollHeight;
224
+ this.clientHeight = this.$el.clientHeight;
171
225
  }
172
226
  };
173
227
  __decorate([
174
228
  Prop({ default: 100 })
175
- ], ScrollMixin.prototype, "throttleMs", void 0);
229
+ ], ScrollMixin.prototype, "distanceToBottom", void 0);
176
230
  __decorate([
177
231
  Prop({ default: 100 })
178
- ], ScrollMixin.prototype, "distanceToBottom", void 0);
232
+ ], ScrollMixin.prototype, "firstElementThresholdPx", void 0);
233
+ __decorate([
234
+ Prop({ default: 100 })
235
+ ], ScrollMixin.prototype, "throttleMs", void 0);
236
+ __decorate([
237
+ Prop({ type: Boolean, default: true })
238
+ ], ScrollMixin.prototype, "resetOnChange", void 0);
239
+ __decorate([
240
+ XOn([
241
+ 'SearchBoxQueryChanged',
242
+ 'SortChanged',
243
+ 'SelectedFiltersChanged',
244
+ 'SelectedRelatedTagsChanged'
245
+ ])
246
+ ], ScrollMixin.prototype, "resetScroll", null);
179
247
  __decorate([
180
248
  Watch('currentPosition')
181
249
  ], ScrollMixin.prototype, "emitScroll", null);
182
- __decorate([
183
- Watch('scrollDirection')
184
- ], ScrollMixin.prototype, "emitScrollDirection", null);
185
250
  __decorate([
186
251
  Watch('hasScrollReachedStart')
187
252
  ], ScrollMixin.prototype, "emitScrollReachedAtStart", null);
@@ -191,11 +256,16 @@ var ScrollMixin = /** @class */ (function (_super) {
191
256
  __decorate([
192
257
  Watch('hasScrollReachedEnd')
193
258
  ], ScrollMixin.prototype, "emitScrollAtEnd", null);
259
+ __decorate([
260
+ Watch('scrollDirection')
261
+ ], ScrollMixin.prototype, "emitScrollDirection", null);
194
262
  ScrollMixin = __decorate([
195
263
  Component
264
+ /* eslint-disable @typescript-eslint/unbound-method */
196
265
  ], ScrollMixin);
197
266
  return ScrollMixin;
198
- }(Vue));
267
+ }(Vue));
268
+ /* eslint-enable @typescript-eslint/unbound-method */
199
269
 
200
270
  export default ScrollMixin;
201
271
  //# sourceMappingURL=scroll.mixin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scroll.mixin.js","sources":["../../../../src/components/scroll/scroll.mixin.ts"],"sourcesContent":["import Vue from 'vue';\nimport { Prop, Watch } from 'vue-property-decorator';\nimport Component from 'vue-class-component';\nimport { ScrollDirection } from './scroll.types';\n\n/**\n * Mixin to share Scroll logic.\n *\n * @public\n */\n@Component\nexport default class ScrollMixin extends Vue {\n /**\n * Time duration to ignore the subsequent scroll events after an emission.\n * Higher values will decrease events precision but can prevent performance issues.\n *\n * @public\n */\n @Prop({ default: 100 })\n public throttleMs!: number;\n\n /**\n * Distance to the end of the scroll that when reached will emit the\n * `scroll:about-to-end` event.\n *\n * @public\n */\n @Prop({ default: 100 })\n public distanceToBottom!: number;\n\n /**\n * Property for getting the current position of scroll.\n *\n * @internal\n */\n protected currentPosition = 0;\n\n /**\n * Property for getting the previous position of scroll.\n *\n * @internal\n */\n protected previousPosition = 0;\n\n /**\n * Property for getting the scroll height.\n *\n * @internal\n */\n protected scrollHeight = 0;\n\n /**\n * Property for getting the client height of scroll.\n *\n * @internal\n */\n protected clientHeight = 0;\n\n /**\n * Property for getting the direction of scroll.\n *\n * @internal\n */\n protected direction!: ScrollDirection;\n\n /**\n * Returns end position of scroll.\n *\n * @returns A number for knowing end position of scroll.\n * @internal\n */\n protected get scrollEndPosition(): number {\n return this.scrollHeight - this.clientHeight;\n }\n\n /**\n * Returns distance missing to end position position.\n *\n * @returns A number for knowing the distance missing to end position position.\n * @internal\n */\n protected get distanceToEnd(): number {\n return this.scrollEndPosition - this.currentPosition;\n }\n\n /**\n * Returns `true` when the scroll is at the initial position.\n *\n * @returns A boolean for knowing if the user scrolls to the start.\n * @internal\n */\n protected get hasScrollReachedStart(): boolean {\n return this.currentPosition === 0;\n }\n\n /**\n * Returns direction of scroll based in {@link ScrollDirection}.\n *\n * @returns The scroll direction.\n * @internal\n */\n protected get scrollDirection(): ScrollDirection {\n return this.currentPosition > this.previousPosition ? 'DOWN' : 'UP';\n }\n\n /**\n * Returns `true` when the amount of pixels scrolled is greater than\n * the {@link ScrollMixin.distanceToBottom}.\n *\n * @returns A boolean for knowing if the user is about to reaching to the end.\n * @internal\n */\n protected get hasScrollAlmostReachedEnd(): boolean {\n return !this.hasScrollReachedStart && this.distanceToBottom > this.distanceToEnd;\n }\n\n /**\n * Returns `true` when there is no more content to scroll.\n *\n * @returns A boolean for knowing if the user scrolls to the end.\n * @internal\n */\n protected get hasScrollReachedEnd(): boolean {\n return this.currentPosition === this.scrollEndPosition;\n }\n\n /**\n * Emits the `scroll` event.\n *\n * @param _newScrollPosition - The new position of scroll.\n * @param oldScrollPosition - The old position of scroll.\n * @internal\n */\n @Watch('currentPosition')\n emitScroll(_newScrollPosition: number, oldScrollPosition: number): void {\n this.$emit('scroll', this.currentPosition);\n this.previousPosition = oldScrollPosition;\n }\n\n /**\n * Emits the `scroll:direction-change` event when the scrolling direction has changed.\n *\n * @param direction - The new direction of scroll.\n * @internal\n */\n @Watch('scrollDirection')\n emitScrollDirection(direction: ScrollDirection): void {\n this.$emit('scroll:direction-change', direction);\n }\n\n /**\n * Emits the 'scroll:at-start' event when the user reaches the start.\n *\n * @param isScrollAtStart - For knowing if the user reaches at start.\n * @internal\n */\n @Watch('hasScrollReachedStart')\n emitScrollReachedAtStart(isScrollAtStart: boolean): void {\n if (isScrollAtStart) {\n this.$emit('scroll:at-start');\n }\n }\n\n /**\n * Emits the 'scroll:almost-at-end' event when the user is about to reach to end.\n *\n * @param isScrollAlmostAtEnd - For knowing if the user is about to reach to end.\n * @internal\n */\n @Watch('hasScrollAlmostReachedEnd')\n emitScrollAlmostAtEnd(isScrollAlmostAtEnd: boolean): void {\n if (isScrollAlmostAtEnd) {\n this.$emit('scroll:almost-at-end', this.distanceToEnd);\n }\n }\n\n /**\n * Emits the 'scroll:at-end' event when the user reaches the end.\n *\n * @param isScrollAtEnd - For knowing if the user reaches at end.\n * @internal\n */\n @Watch('hasScrollReachedEnd')\n emitScrollAtEnd(isScrollAtEnd: boolean): void {\n if (isScrollAtEnd) {\n this.$emit('scroll:at-end');\n }\n }\n}\n"],"names":[],"mappings":";;;;;AAKA;;;;;AAMA;IAAyC,+BAAG;IAA5C;QAAA,qEAiLC;;;;;;QAzJW,qBAAe,GAAG,CAAC,CAAC;;;;;;QAOpB,sBAAgB,GAAG,CAAC,CAAC;;;;;;QAOrB,kBAAY,GAAG,CAAC,CAAC;;;;;;QAOjB,kBAAY,GAAG,CAAC,CAAC;;KAoI5B;IArHC,sBAAc,0CAAiB;;;;;;;aAA/B;YACE,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;SAC9C;;;OAAA;IAQD,sBAAc,sCAAa;;;;;;;aAA3B;YACE,OAAO,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC;SACtD;;;OAAA;IAQD,sBAAc,8CAAqB;;;;;;;aAAnC;YACE,OAAO,IAAI,CAAC,eAAe,KAAK,CAAC,CAAC;SACnC;;;OAAA;IAQD,sBAAc,wCAAe;;;;;;;aAA7B;YACE,OAAO,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAAC;SACrE;;;OAAA;IASD,sBAAc,kDAAyB;;;;;;;;aAAvC;YACE,OAAO,CAAC,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;SAClF;;;OAAA;IAQD,sBAAc,4CAAmB;;;;;;;aAAjC;YACE,OAAO,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,iBAAiB,CAAC;SACxD;;;OAAA;;;;;;;;IAUD,gCAAU,GAAV,UAAW,kBAA0B,EAAE,iBAAyB;QAC9D,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,CAAC,gBAAgB,GAAG,iBAAiB,CAAC;KAC3C;;;;;;;IASD,yCAAmB,GAAnB,UAAoB,SAA0B;QAC5C,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;KAClD;;;;;;;IASD,8CAAwB,GAAxB,UAAyB,eAAwB;QAC/C,IAAI,eAAe,EAAE;YACnB,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;SAC/B;KACF;;;;;;;IASD,2CAAqB,GAArB,UAAsB,mBAA4B;QAChD,IAAI,mBAAmB,EAAE;YACvB,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;SACxD;KACF;;;;;;;IASD,qCAAe,GAAf,UAAgB,aAAsB;QACpC,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;SAC7B;KACF;IAxKD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;mDACI;IAS3B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;yDACU;IA0GjC;QADC,KAAK,CAAC,iBAAiB,CAAC;iDAIxB;IASD;QADC,KAAK,CAAC,iBAAiB,CAAC;0DAGxB;IASD;QADC,KAAK,CAAC,uBAAuB,CAAC;+DAK9B;IASD;QADC,KAAK,CAAC,2BAA2B,CAAC;4DAKlC;IASD;QADC,KAAK,CAAC,qBAAqB,CAAC;sDAK5B;IAhLkB,WAAW;QAD/B,SAAS;OACW,WAAW,CAiL/B;IAAD,kBAAC;CAAA,CAjLwC,GAAG;;;;"}
1
+ {"version":3,"file":"scroll.mixin.js","sources":["../../../../src/components/scroll/scroll.mixin.ts"],"sourcesContent":["import Vue from 'vue';\nimport { Component, Prop, Watch } from 'vue-property-decorator';\nimport { throttle } from '../../utils/throttle';\nimport { XOn } from '../decorators/bus.decorators';\nimport { ScrollDirection } from './scroll.types';\n\n/**\n * Mixin to share Scroll logic.\n *\n * @public\n */\n@Component\n/* eslint-disable @typescript-eslint/unbound-method */\nexport default class ScrollMixin extends Vue {\n /**\n * The scrolling container reference.\n *\n * @public\n */\n public $el!: HTMLElement;\n /**\n * Distance to the end of the scroll that when reached will emit the\n * `scroll:about-to-end` event.\n *\n * @public\n */\n @Prop({ default: 100 })\n public distanceToBottom!: number;\n /**\n * Positive vertical distance to still consider that the an element is the first one visible.\n * For example, if set to 100, after scrolling 100 pixels, the first rendered element\n * will still be considered the first one.\n */\n @Prop({ default: 100 })\n public firstElementThresholdPx!: number;\n /**\n * Time duration to ignore the subsequent scroll events after an emission.\n * Higher values will decrease events precision but can prevent performance issues.\n *\n * @public\n */\n @Prop({ default: 100 })\n public throttleMs!: number;\n\n /**\n * If true (default), sets the scroll position to the top when certain events are emitted.\n *\n * @public\n */\n @Prop({ type: Boolean, default: true })\n protected resetOnChange!: boolean;\n /**\n * Property for getting the client height of scroll.\n *\n * @internal\n */\n protected clientHeight = 0;\n /**\n * Property for getting the current position of scroll.\n *\n * @internal\n */\n protected currentPosition = 0;\n /**\n * Property for getting the direction of scroll.\n *\n * @internal\n */\n protected direction!: ScrollDirection;\n /**\n * Property for getting the previous position of scroll.\n *\n * @internal\n */\n protected previousPosition = 0;\n /**\n * Property for getting the scroll height.\n *\n * @internal\n */\n protected scrollHeight = 0;\n\n /**\n * Throttled version of the function that stores the DOM scroll related properties.\n * The duration of the throttle is configured through the\n * {@link ScrollMixin.throttleMs}.\n *\n * @returns A throttled version of the function to store the scroll data.\n * @internal\n */\n protected get throttledStoreScrollData(): () => void {\n return throttle(this.storeScrollData, this.throttleMs);\n }\n\n /**\n * Returns distance missing to end position position.\n *\n * @returns A number for knowing the distance missing to end position position.\n * @internal\n */\n protected get distanceToEnd(): number {\n return this.scrollEndPosition - this.currentPosition;\n }\n\n /**\n * Returns `true` when the amount of pixels scrolled is greater than\n * the {@link ScrollMixin.distanceToBottom}.\n *\n * @returns A boolean for knowing if the user is about to reaching to the end.\n * @internal\n */\n protected get hasScrollAlmostReachedEnd(): boolean {\n return !this.hasScrollReachedStart && this.distanceToBottom > this.distanceToEnd;\n }\n\n /**\n * Returns `true` when there is no more content to scroll.\n *\n * @returns A boolean for knowing if the user scrolls to the end.\n * @internal\n */\n protected get hasScrollReachedEnd(): boolean {\n return this.currentPosition === this.scrollEndPosition;\n }\n\n /**\n * Returns `true` when the scroll is at the initial position.\n *\n * @returns A boolean for knowing if the user scrolls to the start.\n * @internal\n */\n protected get hasScrollReachedStart(): boolean {\n return this.currentPosition === 0;\n }\n\n /**\n * Returns direction of scroll based in {@link ScrollDirection}.\n *\n * @returns The scroll direction.\n * @internal\n */\n protected get scrollDirection(): ScrollDirection {\n return this.currentPosition > this.previousPosition ? 'DOWN' : 'UP';\n }\n\n /**\n * Returns end position of scroll.\n *\n * @returns A number for knowing end position of scroll.\n * @internal\n */\n protected get scrollEndPosition(): number {\n return this.scrollHeight - this.clientHeight;\n }\n\n /**\n * Initialises DOM dependant scroll properties.\n *\n * @internal\n */\n mounted(): void {\n this.$nextTick().then(() => {\n if (!this.$el) {\n // TODO Replace with Empathy's logger\n // eslint-disable-next-line no-console\n console.warn(\n '[ScrollMixin]',\n 'Components using this mixin must set `this.$el` to the HTML node that is scrolling.'\n );\n } else {\n this.storeScrollData();\n }\n });\n }\n\n /**\n * Resets the scroll position.\n *\n * @internal\n */\n @XOn([\n 'SearchBoxQueryChanged',\n 'SortChanged',\n 'SelectedFiltersChanged',\n 'SelectedRelatedTagsChanged'\n ])\n resetScroll(): void {\n this.$nextTick().then(() => {\n if (this.resetOnChange) {\n this.$el.scrollTo({ top: 0 });\n }\n });\n }\n\n /**\n * Emits the `scroll` event.\n *\n * @param _newScrollPosition - The new position of scroll.\n * @param oldScrollPosition - The old position of scroll.\n * @internal\n */\n @Watch('currentPosition')\n protected emitScroll(_newScrollPosition: number, oldScrollPosition: number): void {\n this.$emit('scroll', this.currentPosition);\n this.previousPosition = oldScrollPosition;\n }\n\n /**\n * Emits the 'scroll:at-start' event when the user reaches the start.\n *\n * @param isScrollAtStart - For knowing if the user reaches at start.\n * @internal\n */\n @Watch('hasScrollReachedStart')\n protected emitScrollReachedAtStart(isScrollAtStart: boolean): void {\n this.$emit('scroll:at-start', isScrollAtStart);\n }\n\n /**\n * Emits the 'scroll:almost-at-end' event when the user is about to reach to end.\n *\n * @param isScrollAlmostAtEnd - For knowing if the user is about to reach to end.\n * @internal\n */\n @Watch('hasScrollAlmostReachedEnd')\n protected emitScrollAlmostAtEnd(isScrollAlmostAtEnd: boolean): void {\n this.$emit('scroll:almost-at-end', isScrollAlmostAtEnd);\n }\n\n /**\n * Emits the 'scroll:at-end' event when the user reaches the end.\n *\n * @param isScrollAtEnd - For knowing if the user reaches at end.\n * @internal\n */\n @Watch('hasScrollReachedEnd')\n protected emitScrollAtEnd(isScrollAtEnd: boolean): void {\n this.$emit('scroll:at-end', isScrollAtEnd);\n }\n\n /**\n * Emits the `scroll:direction-change` event when the scrolling direction has changed.\n *\n * @param direction - The new direction of scroll.\n * @internal\n */\n @Watch('scrollDirection')\n protected emitScrollDirection(direction: ScrollDirection): void {\n this.$emit('scroll:direction-change', direction);\n }\n\n /**\n * Updates scroll related properties.\n *\n * @internal\n */\n protected storeScrollData(): void {\n if (this.$el) {\n this.currentPosition = this.$el.scrollTop;\n this.scrollHeight = this.$el.scrollHeight;\n this.clientHeight = this.$el.clientHeight;\n }\n }\n}\n/* eslint-enable @typescript-eslint/unbound-method */\n"],"names":[],"mappings":";;;;;;AAMA;;;;;AAOA;IAAyC,+BAAG;;IAA5C;QAAA,qEA0PC;;;;;;QA/MW,kBAAY,GAAG,CAAC,CAAC;;;;;;QAMjB,qBAAe,GAAG,CAAC,CAAC;;;;;;QAYpB,sBAAgB,GAAG,CAAC,CAAC;;;;;;QAMrB,kBAAY,GAAG,CAAC,CAAC;;KAuL5B;IA7KC,sBAAc,iDAAwB;;;;;;;;;aAAtC;YACE,OAAO,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;SACxD;;;OAAA;IAQD,sBAAc,sCAAa;;;;;;;aAA3B;YACE,OAAO,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC;SACtD;;;OAAA;IASD,sBAAc,kDAAyB;;;;;;;;aAAvC;YACE,OAAO,CAAC,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;SAClF;;;OAAA;IAQD,sBAAc,4CAAmB;;;;;;;aAAjC;YACE,OAAO,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,iBAAiB,CAAC;SACxD;;;OAAA;IAQD,sBAAc,8CAAqB;;;;;;;aAAnC;YACE,OAAO,IAAI,CAAC,eAAe,KAAK,CAAC,CAAC;SACnC;;;OAAA;IAQD,sBAAc,wCAAe;;;;;;;aAA7B;YACE,OAAO,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAAC;SACrE;;;OAAA;IAQD,sBAAc,0CAAiB;;;;;;;aAA/B;YACE,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;SAC9C;;;OAAA;;;;;;IAOD,6BAAO,GAAP;QAAA,iBAaC;QAZC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC;YACpB,IAAI,CAAC,KAAI,CAAC,GAAG,EAAE;;;gBAGb,OAAO,CAAC,IAAI,CACV,eAAe,EACf,qFAAqF,CACtF,CAAC;aACH;iBAAM;gBACL,KAAI,CAAC,eAAe,EAAE,CAAC;aACxB;SACF,CAAC,CAAC;KACJ;;;;;;IAaD,iCAAW,GAAX;QANA,iBAYC;QALC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC;YACpB,IAAI,KAAI,CAAC,aAAa,EAAE;gBACtB,KAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;aAC/B;SACF,CAAC,CAAC;KACJ;;;;;;;;IAUS,gCAAU,GAApB,UAAqB,kBAA0B,EAAE,iBAAyB;QACxE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,CAAC,gBAAgB,GAAG,iBAAiB,CAAC;KAC3C;;;;;;;IASS,8CAAwB,GAAlC,UAAmC,eAAwB;QACzD,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;KAChD;;;;;;;IASS,2CAAqB,GAA/B,UAAgC,mBAA4B;QAC1D,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,CAAC;KACzD;;;;;;;IASS,qCAAe,GAAzB,UAA0B,aAAsB;QAC9C,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;KAC5C;;;;;;;IASS,yCAAmB,GAA7B,UAA8B,SAA0B;QACtD,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;KAClD;;;;;;IAOS,qCAAe,GAAzB;QACE,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC;YAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC;SAC3C;KACF;IA3OD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;yDACU;IAOjC;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;gEACiB;IAQxC;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;mDACI;IAQ3B;QADC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDACL;IAwIlC;QANC,GAAG,CAAC;YACH,uBAAuB;YACvB,aAAa;YACb,wBAAwB;YACxB,4BAA4B;SAC7B,CAAC;kDAOD;IAUD;QADC,KAAK,CAAC,iBAAiB,CAAC;iDAIxB;IASD;QADC,KAAK,CAAC,uBAAuB,CAAC;+DAG9B;IASD;QADC,KAAK,CAAC,2BAA2B,CAAC;4DAGlC;IASD;QADC,KAAK,CAAC,qBAAqB,CAAC;sDAG5B;IASD;QADC,KAAK,CAAC,iBAAiB,CAAC;0DAGxB;IA5OkB,WAAW;QAF/B,SAAS;;OAEW,WAAW,CA0P/B;IAAD,kBAAC;CAAA,CA1PwC,GAAG,GA0P3C;AACD;;;;"}