@empathyco/x-components 3.0.0-alpha.27 → 3.0.0-alpha.30

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 (810) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/core/index.js +9 -9
  3. package/core/index.js.map +1 -1
  4. package/design-system/badge-default.css +2 -5
  5. package/design-system/base.css +10 -1
  6. package/design-system/button-default.css +6 -11
  7. package/design-system/default-theme.css +229 -291
  8. package/design-system/dropdown-default.css +21 -38
  9. package/design-system/dropdown-line.css +10 -0
  10. package/design-system/facet-default.css +11 -22
  11. package/design-system/filter-default.css +10 -19
  12. package/design-system/filter-hierarchical.css +6 -10
  13. package/design-system/full-theme.css +1767 -1171
  14. package/design-system/grid-default.css +2 -1
  15. package/design-system/icon-default.css +3 -7
  16. package/design-system/input-default.css +6 -22
  17. package/design-system/input-group-default.css +18 -46
  18. package/design-system/input-group-line.css +6 -10
  19. package/design-system/list-default.css +31 -63
  20. package/design-system/message-default.css +57 -0
  21. package/design-system/option-list-default.css +3 -5
  22. package/design-system/picture-default.css +1 -2
  23. package/design-system/picture-fixed-ratio.css +6 -10
  24. package/design-system/progress-bar-progress-bar.css +23 -0
  25. package/design-system/row-default.css +1 -2
  26. package/design-system/sliding-panel-default.css +1 -2
  27. package/design-system/suggestion-default.css +9 -17
  28. package/design-system/suggestion-group-default.css +9 -17
  29. package/design-system/tag-default.css +6 -11
  30. package/design-system/utilities-border-radius.css +860 -312
  31. package/design-system/utilities-dev-mode.css +11 -0
  32. package/design-system/utilities-font-weight.css +8 -0
  33. package/design-system/utilities-margin.css +318 -268
  34. package/design-system/utilities-padding.css +308 -250
  35. package/docs/API-reference/api/x-adapter.empathybannermapper._constructor_.md +2 -2
  36. package/docs/API-reference/api/x-adapter.empathypromotedmapper._constructor_.md +2 -2
  37. package/docs/API-reference/api/x-adapter.empathyredirectionmapper._constructor_.md +2 -2
  38. package/docs/API-reference/api/x-adapter.empathyresultmapper._constructor_.md +2 -2
  39. package/docs/API-reference/api/x-adapter.empathytaggingmapper.map.md +3 -3
  40. package/docs/API-reference/api/x-adapter.empathytaggingmapper.md +2 -2
  41. package/docs/API-reference/api/x-adapter.searchresponse.md +1 -1
  42. package/docs/API-reference/api/x-adapter.searchresponse.querytagging.md +1 -1
  43. package/docs/API-reference/api/x-adapter.trackableshowresponse.md +1 -1
  44. package/docs/API-reference/api/x-adapter.trackableshowresponse.showtagging.md +1 -1
  45. package/docs/API-reference/api/x-components.autoprogressbar.durationinseconds.md +13 -0
  46. package/docs/API-reference/api/x-components.autoprogressbar.isloading.md +13 -0
  47. package/docs/API-reference/api/x-components.autoprogressbar.md +22 -0
  48. package/docs/API-reference/api/x-components.baseresultlink.md +0 -11
  49. package/docs/API-reference/api/x-components.basescroll.md +0 -12
  50. package/docs/API-reference/api/x-components.basesuggestion.emitevents.md +17 -0
  51. package/docs/API-reference/api/x-components.basesuggestion.feature.md +13 -0
  52. package/docs/API-reference/api/x-components.basesuggestion.md +8 -1
  53. package/docs/API-reference/api/x-components.clearpendingscrolltowire.md +13 -0
  54. package/docs/API-reference/api/x-components.defaultfacetsservice.updatefiltersselectedstate.md +1 -1
  55. package/docs/API-reference/api/x-components.defaultsessionservice._constructor_.md +21 -0
  56. package/docs/API-reference/api/x-components.defaultsessionservice.clearsessionid.md +15 -0
  57. package/docs/API-reference/api/x-components.defaultsessionservice.getsessionid.md +15 -0
  58. package/docs/API-reference/api/x-components.defaultsessionservice.instance.md +13 -0
  59. package/docs/API-reference/api/x-components.defaultsessionservice.md +37 -0
  60. package/docs/API-reference/api/x-components.defaultsessionservice.session_id_key.md +11 -0
  61. package/docs/API-reference/api/x-components.defaultsessionservice.storageservice.md +11 -0
  62. package/docs/API-reference/api/x-components.defaultsessionservice.ttlms.md +11 -0
  63. package/docs/API-reference/api/x-components.extraparams.md +2 -0
  64. package/docs/API-reference/api/x-components.extraparams.mounted.md +17 -0
  65. package/docs/API-reference/api/x-components.extraparams.storeextraparams.md +13 -0
  66. package/docs/API-reference/api/x-components.extraparamsxevents.extraparamschanged.md +2 -0
  67. package/docs/API-reference/api/x-components.extraparamsxevents.extraparamsinitialized.md +13 -0
  68. package/docs/API-reference/api/x-components.extraparamsxevents.extraparamsprovided.md +2 -0
  69. package/docs/API-reference/api/x-components.extraparamsxevents.md +4 -3
  70. package/docs/API-reference/api/x-components.extraparamsxevents.userchangedextraparams.md +2 -0
  71. package/docs/API-reference/api/x-components.featurelocation.md +22 -0
  72. package/docs/API-reference/api/x-components.identifierresults.md +1 -0
  73. package/docs/API-reference/api/x-components.identifierresults.resultclickextraevents.md +13 -0
  74. package/docs/API-reference/api/x-components.identifierresultsactions.md +1 -0
  75. package/docs/API-reference/api/x-components.identifierresultsactions.saveorigin.md +24 -0
  76. package/docs/API-reference/api/x-components.identifierresultsmutations.md +1 -0
  77. package/docs/API-reference/api/x-components.identifierresultsmutations.setorigin.md +24 -0
  78. package/docs/API-reference/api/x-components.identifierresultsstate.md +1 -0
  79. package/docs/API-reference/api/x-components.identifierresultsstate.origin.md +13 -0
  80. package/docs/API-reference/api/x-components.locationprovider.location.md +13 -0
  81. package/docs/API-reference/api/x-components.locationprovider.md +21 -0
  82. package/docs/API-reference/api/x-components.mainscroll.margin.md +13 -0
  83. package/docs/API-reference/api/x-components.mainscroll.md +33 -0
  84. package/docs/API-reference/api/{x-components.basemainscroll.mounted.md → x-components.mainscroll.mounted.md} +4 -2
  85. package/docs/API-reference/api/x-components.mainscroll.restorescrolltimeoutms.md +13 -0
  86. package/docs/API-reference/api/x-components.mainscroll.threshold.md +13 -0
  87. package/docs/API-reference/api/x-components.mainscroll.usewindow.md +13 -0
  88. package/docs/API-reference/api/x-components.mainscroll.visibleelementsobserver.md +13 -0
  89. package/docs/API-reference/api/x-components.mainscrollitem._el.md +13 -0
  90. package/docs/API-reference/api/x-components.mainscrollitem.item.md +13 -0
  91. package/docs/API-reference/api/x-components.mainscrollitem.md +29 -0
  92. package/docs/API-reference/api/x-components.mainscrollitem.observeitem.md +25 -0
  93. package/docs/API-reference/api/x-components.mainscrollitem.tag.md +13 -0
  94. package/docs/API-reference/api/x-components.md +48 -11
  95. package/docs/API-reference/api/x-components.multicolumnmaxwidthlayout.md +2 -3
  96. package/docs/API-reference/api/{x-components.partialquerybutton.events.md → x-components.partialquerybutton.emitevents.md} +8 -4
  97. package/docs/API-reference/api/x-components.partialquerybutton.md +6 -1
  98. package/docs/API-reference/api/x-components.queryfeature.md +13 -0
  99. package/docs/API-reference/api/x-components.queryorigin.md +4 -2
  100. package/docs/API-reference/api/x-components.queryorigininit.md +15 -0
  101. package/docs/API-reference/api/x-components.redirection.abortredirect.md +17 -0
  102. package/docs/API-reference/api/x-components.redirection.delayinseconds.md +18 -0
  103. package/docs/API-reference/api/x-components.redirection.isredirecting.md +13 -0
  104. package/docs/API-reference/api/x-components.redirection.md +31 -0
  105. package/docs/API-reference/api/x-components.redirection.mode.md +13 -0
  106. package/docs/API-reference/api/x-components.redirection.redirect.md +17 -0
  107. package/docs/API-reference/api/x-components.redirection.redirections.md +11 -0
  108. package/docs/API-reference/api/x-components.relatedtag.emitevents.md +17 -0
  109. package/docs/API-reference/api/x-components.relatedtag.md +6 -0
  110. package/docs/API-reference/api/x-components.renderlessextraparams.md +2 -3
  111. package/docs/API-reference/api/{x-components.renderlessextraparams.defaultvalue.md → x-components.renderlessextraparams.stateparams.md} +4 -4
  112. package/docs/API-reference/api/x-components.requeststatus.md +1 -1
  113. package/docs/API-reference/api/x-components.resultfeature.md +13 -0
  114. package/docs/API-reference/api/x-components.resultorigin.md +15 -0
  115. package/docs/API-reference/api/x-components.saveidentifierresultsoriginwire.md +13 -0
  116. package/docs/API-reference/api/x-components.saveorigin.md +13 -0
  117. package/docs/API-reference/api/{x-components.setorigin.md → x-components.saveoriginwire.md} +3 -3
  118. package/docs/API-reference/api/{x-components.baseidscroll.distancetobottom.md → x-components.scroll.distancetobottom.md} +2 -2
  119. package/docs/API-reference/api/{x-components.baseidscroll.id.md → x-components.scroll.id.md} +2 -2
  120. package/docs/API-reference/api/x-components.scroll.md +23 -0
  121. package/docs/API-reference/api/{x-components.baseidscroll.throttlems.md → x-components.scroll.throttlems.md} +2 -2
  122. package/docs/API-reference/api/{x-components.urlstate.params.md → x-components.scrollactions.md} +5 -3
  123. package/docs/API-reference/api/x-components.scrollcomponentstate.direction.md +13 -0
  124. package/docs/API-reference/api/x-components.scrollcomponentstate.hasalmostreachedend.md +13 -0
  125. package/docs/API-reference/api/x-components.scrollcomponentstate.hasreachedend.md +13 -0
  126. package/docs/API-reference/api/x-components.scrollcomponentstate.hasreachedstart.md +13 -0
  127. package/docs/API-reference/api/x-components.scrollcomponentstate.md +24 -0
  128. package/docs/API-reference/api/x-components.scrollcomponentstate.position.md +13 -0
  129. package/docs/API-reference/api/x-components.scrollgetters.md +13 -0
  130. package/docs/API-reference/api/x-components.scrollmixin._el.md +13 -0
  131. package/docs/API-reference/api/x-components.scrollmixin.firstelementthresholdpx.md +13 -0
  132. package/docs/API-reference/api/x-components.scrollmixin.md +3 -0
  133. package/docs/API-reference/api/x-components.scrollmixin.resetonchange.md +13 -0
  134. package/docs/API-reference/api/x-components.scrollmutations.md +21 -0
  135. package/docs/API-reference/api/x-components.scrollmutations.setpendingscrollto.md +24 -0
  136. package/docs/API-reference/api/x-components.scrollmutations.setscrollcomponentstate.md +24 -0
  137. package/docs/API-reference/api/x-components.scrollstate.data.md +13 -0
  138. package/docs/API-reference/api/x-components.scrollstate.md +21 -0
  139. package/docs/API-reference/api/x-components.scrollstate.pendingscrollto.md +13 -0
  140. package/docs/API-reference/api/x-components.scrollstatepayload.md +21 -0
  141. package/docs/API-reference/api/x-components.scrollstatepayload.newstate.md +13 -0
  142. package/docs/API-reference/api/{x-components.basescrolltotop.animation.md → x-components.scrolltotop.animation.md} +2 -2
  143. package/docs/API-reference/api/x-components.scrolltotop.md +23 -0
  144. package/docs/API-reference/api/{x-components.basescrolltotop.scrollid.md → x-components.scrolltotop.scrollid.md} +3 -3
  145. package/docs/API-reference/api/{x-components.basescrolltotop.thresholdpx.md → x-components.scrolltotop.thresholdpx.md} +2 -2
  146. package/docs/API-reference/api/x-components.scrollvisibilityobserver.md +21 -0
  147. package/docs/API-reference/api/x-components.scrollvisibilityobserver.observe.md +24 -0
  148. package/docs/API-reference/api/x-components.scrollvisibilityobserver.unobserve.md +24 -0
  149. package/docs/API-reference/api/x-components.scrollxevents.md +27 -0
  150. package/docs/API-reference/api/x-components.scrollxevents.scrollrestorefailed.md +13 -0
  151. package/docs/API-reference/api/x-components.scrollxevents.scrollrestoresucceeded.md +13 -0
  152. package/docs/API-reference/api/x-components.scrollxevents.useralmostreachedscrollend.md +13 -0
  153. package/docs/API-reference/api/{x-components.xeventstypes.userchangedscrolldirection.md → x-components.scrollxevents.userchangedscrolldirection.md} +2 -2
  154. package/docs/API-reference/api/x-components.scrollxevents.userreachedscrollend.md +13 -0
  155. package/docs/API-reference/api/x-components.scrollxevents.userreachedscrollstart.md +13 -0
  156. package/docs/API-reference/api/{x-components.xeventstypes.userscrolled.md → x-components.scrollxevents.userscrolled.md} +2 -2
  157. package/docs/API-reference/api/x-components.scrollxevents.userscrolledtoelement.md +13 -0
  158. package/docs/API-reference/api/x-components.scrollxmodule.md +13 -0
  159. package/docs/API-reference/api/x-components.scrollxstoremodule.md +15 -0
  160. package/docs/API-reference/api/x-components.searchactions.md +1 -0
  161. package/docs/API-reference/api/x-components.searchactions.saveorigin.md +24 -0
  162. package/docs/API-reference/api/{x-components.searchbutton.events.md → x-components.searchbutton.emitevents.md} +9 -3
  163. package/docs/API-reference/api/x-components.searchbutton.md +6 -1
  164. package/docs/API-reference/api/x-components.searchmutations.md +1 -0
  165. package/docs/API-reference/api/x-components.searchmutations.setorigin.md +2 -2
  166. package/docs/API-reference/api/x-components.searchmutations.setquerytagging.md +24 -0
  167. package/docs/API-reference/api/x-components.searchstate.md +1 -0
  168. package/docs/API-reference/api/x-components.searchstate.querytagging.md +13 -0
  169. package/docs/API-reference/api/x-components.searchxevents.md +3 -0
  170. package/docs/API-reference/api/x-components.searchxevents.searchtaggingchanged.md +13 -0
  171. package/docs/API-reference/api/x-components.searchxevents.userclickedabortaredirection.md +13 -0
  172. package/docs/API-reference/api/x-components.searchxevents.userclickedaredirection.md +13 -0
  173. package/docs/API-reference/api/x-components.sessionservice.clearsessionid.md +17 -0
  174. package/docs/API-reference/api/x-components.sessionservice.getsessionid.md +23 -0
  175. package/docs/API-reference/api/x-components.sessionservice.md +21 -0
  176. package/docs/API-reference/api/x-components.setconsent.md +13 -0
  177. package/docs/API-reference/api/x-components.setinitialextraparams.md +13 -0
  178. package/docs/API-reference/api/{x-components.seturlextraparams.md → x-components.setparams.md} +3 -3
  179. package/docs/API-reference/api/x-components.setpendingscrolltowire.md +13 -0
  180. package/docs/API-reference/api/x-components.setquerytaggingdebounce.md +13 -0
  181. package/docs/API-reference/api/x-components.setscrolldirectionwire.md +13 -0
  182. package/docs/API-reference/api/x-components.setscrollhasalmostreachedendwire.md +13 -0
  183. package/docs/API-reference/api/x-components.setscrollhasreachedendwire.md +13 -0
  184. package/docs/API-reference/api/x-components.setscrollhasreachedstartwire.md +13 -0
  185. package/docs/API-reference/api/x-components.setscrollpositionwire.md +13 -0
  186. package/docs/API-reference/api/x-components.setsessionduration.md +13 -0
  187. package/docs/API-reference/api/x-components.seturlfilters.md +1 -1
  188. package/docs/API-reference/api/x-components.seturlpage.md +1 -1
  189. package/docs/API-reference/api/x-components.seturlquery.md +1 -1
  190. package/docs/API-reference/api/x-components.seturlrelatedtags.md +1 -1
  191. package/docs/API-reference/api/x-components.seturlscroll.md +13 -0
  192. package/docs/API-reference/api/x-components.seturlsort.md +13 -0
  193. package/docs/API-reference/api/x-components.singlecolumnlayout.md +2 -3
  194. package/docs/API-reference/api/x-components.sortmixin.items.md +1 -1
  195. package/docs/API-reference/api/x-components.sortmixin.md +2 -3
  196. package/docs/API-reference/api/x-components.sortmixin.providedselectedsort.md +1 -1
  197. package/docs/API-reference/api/{x-components.spellcheckbutton.events.md → x-components.spellcheckbutton.emitevents.md} +8 -4
  198. package/docs/API-reference/api/x-components.spellcheckbutton.md +6 -1
  199. package/docs/API-reference/api/x-components.taggingconfig.md +8 -0
  200. package/docs/API-reference/api/x-components.taggingconfig.querytaggingdebouncems.md +13 -0
  201. package/docs/API-reference/api/x-components.taggingconfig.sessionttlms.md +13 -0
  202. package/docs/API-reference/api/x-components.taggingmutations.md +9 -0
  203. package/docs/API-reference/api/x-components.taggingmutations.setconsent.md +24 -0
  204. package/docs/API-reference/api/x-components.taggingmutations.setquerytaggingdebounce.md +24 -0
  205. package/docs/API-reference/api/x-components.taggingmutations.setsessionduration.md +24 -0
  206. package/docs/API-reference/api/x-components.taggingstate.config.md +13 -0
  207. package/docs/API-reference/api/x-components.taggingstate.consent.md +13 -0
  208. package/docs/API-reference/api/x-components.taggingstate.md +8 -0
  209. package/docs/API-reference/api/x-components.taggingxevents.consentchanged.md +13 -0
  210. package/docs/API-reference/api/x-components.taggingxevents.consentprovided.md +13 -0
  211. package/docs/API-reference/api/x-components.taggingxevents.md +10 -0
  212. package/docs/API-reference/api/x-components.taggingxevents.querytaggingdebounceprovided.md +13 -0
  213. package/docs/API-reference/api/x-components.taggingxevents.sessiondurationprovided.md +13 -0
  214. package/docs/API-reference/api/x-components.urlactions.md +0 -7
  215. package/docs/API-reference/api/x-components.urlhandler.created.md +17 -0
  216. package/docs/API-reference/api/x-components.urlhandler.md +23 -0
  217. package/docs/API-reference/api/x-components.urlhandler.updateurlwithpush.md +24 -0
  218. package/docs/API-reference/api/x-components.urlhandler.updateurlwithreplace.md +24 -0
  219. package/docs/API-reference/api/x-components.urlmutations.md +3 -1
  220. package/docs/API-reference/api/{x-components.urlmutations.setextraparams.md → x-components.urlmutations.setinitialextraparams.md} +5 -5
  221. package/docs/API-reference/api/x-components.urlmutations.setparams.md +2 -2
  222. package/docs/API-reference/api/x-components.urlmutations.setscroll.md +24 -0
  223. package/docs/API-reference/api/x-components.urlmutations.setsort.md +24 -0
  224. package/docs/API-reference/api/x-components.urlparams.md +1 -1
  225. package/docs/API-reference/api/x-components.urlparams.scroll.md +1 -1
  226. package/docs/API-reference/api/x-components.urlstate.md +5 -9
  227. package/docs/API-reference/api/x-components.urlxevents.extraparamsloadedfromurl.md +13 -0
  228. package/docs/API-reference/api/x-components.urlxevents.md +2 -1
  229. package/docs/API-reference/api/x-components.urlxevents.paramsloadedfromurl.md +1 -1
  230. package/docs/API-reference/api/{x-components.basemainscroll.beforedestroy.md → x-components.windowscroll.beforedestroy.md} +4 -2
  231. package/docs/API-reference/api/{x-components.basemainscroll.id.md → x-components.windowscroll.id.md} +2 -2
  232. package/docs/API-reference/api/x-components.windowscroll.md +30 -0
  233. package/docs/API-reference/api/{x-components.basescroll.mounted.md → x-components.windowscroll.mounted.md} +2 -2
  234. package/docs/API-reference/api/{x-components.basemainscroll.render.md → x-components.windowscroll.render.md} +2 -2
  235. package/docs/API-reference/api/x-components.windowscroll.scrollableelement.md +13 -0
  236. package/docs/API-reference/api/x-components.wiremetadata.feature.md +13 -0
  237. package/docs/API-reference/api/x-components.wiremetadata.location.md +13 -0
  238. package/docs/API-reference/api/x-components.wiremetadata.md +2 -1
  239. package/docs/API-reference/api/x-components.xcomponentaliasapi.md +3 -0
  240. package/docs/API-reference/api/x-components.xcomponentaliasapi.noresults.md +13 -0
  241. package/docs/API-reference/api/x-components.xcomponentaliasapi.partialresults.md +13 -0
  242. package/docs/API-reference/api/x-components.xcomponentaliasapi.redirections.md +13 -0
  243. package/docs/API-reference/api/x-components.xcomponentbusapi.emit_1.md +2 -2
  244. package/docs/API-reference/api/x-components.xeventstypes.md +3 -8
  245. package/docs/API-reference/api/x-components.xmodulestree.md +1 -0
  246. package/docs/API-reference/api/x-components.xmodulestree.scroll.md +11 -0
  247. package/docs/API-reference/api/x-types.banner.md +2 -3
  248. package/docs/API-reference/api/x-types.identifiable.id.md +1 -1
  249. package/docs/API-reference/api/x-types.identifiable.md +2 -2
  250. package/docs/API-reference/api/x-types.md +5 -2
  251. package/docs/API-reference/api/x-types.promoted.md +2 -3
  252. package/docs/API-reference/api/x-types.redirection.md +2 -3
  253. package/docs/API-reference/api/x-types.result.md +2 -3
  254. package/docs/API-reference/api/x-types.taggable.md +20 -0
  255. package/docs/API-reference/api/x-types.taggable.tagging.md +13 -0
  256. package/docs/API-reference/api/{x-types.banner.tagging.md → x-types.taggableschema.md} +4 -6
  257. package/docs/API-reference/api/x-types.tagging.add2cart.md +13 -0
  258. package/docs/API-reference/api/x-types.tagging.checkout.md +13 -0
  259. package/docs/API-reference/api/{x-types.promoted.tagging.md → x-types.tagging.click.md} +4 -6
  260. package/docs/API-reference/api/x-types.tagging.md +6 -3
  261. package/docs/API-reference/api/x-types.tagging.query.md +13 -0
  262. package/docs/API-reference/api/x-types.tagging.wishlist.md +13 -0
  263. package/docs/API-reference/api/x-types.tagginginfo.md +21 -0
  264. package/docs/API-reference/api/{x-types.tagging.params.md → x-types.tagginginfo.params.md} +3 -3
  265. package/docs/API-reference/api/{x-types.tagging.url.md → x-types.tagginginfo.url.md} +2 -2
  266. package/docs/API-reference/api/x-types.tagginginfoschema.md +13 -0
  267. package/docs/API-reference/components/common/layouts/x-components.fixed-header-and-asides-layout.md +73 -0
  268. package/docs/API-reference/components/common/layouts/x-components.multi-column-max-width-layout.md +133 -0
  269. package/docs/API-reference/components/common/result/x-components.base-result-image.md +2 -2
  270. package/docs/API-reference/components/common/result/x-components.base-result-link.md +2 -3
  271. package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +9 -9
  272. package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +9 -8
  273. package/docs/API-reference/components/common/x-components.auto-progress-bar.md +63 -0
  274. package/docs/API-reference/components/common/x-components.location-provider.md +54 -0
  275. package/docs/API-reference/components/extra-params/x-components.renderless-extra-param.md +7 -13
  276. package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +10 -6
  277. package/docs/API-reference/components/scroll/x-components.main-scroll-item.md +84 -0
  278. package/docs/API-reference/components/scroll/x-components.main-scroll.md +175 -0
  279. package/docs/API-reference/components/{common/scroll/x-components.base-scroll-to-top.md → scroll/x-components.scroll-to-top.md} +11 -14
  280. package/docs/API-reference/components/scroll/x-components.scroll.md +168 -0
  281. package/docs/API-reference/components/scroll/x-components.window-scroll.md +158 -0
  282. package/docs/API-reference/components/search/x-components.redirection.md +99 -0
  283. package/docs/API-reference/components/search/x-components.sort-dropdown.md +4 -5
  284. package/docs/API-reference/components/search/x-components.sort-list.md +4 -5
  285. package/docs/API-reference/components/tagging/x-components.tagging.md +84 -0
  286. package/docs/API-reference/components/url/x-components.url-handler.md +14 -2
  287. package/docs/sidebar.json +1 -1
  288. package/identifier-results/index.js +2 -1
  289. package/js/components/auto-progress-bar.vue.js +65 -0
  290. package/js/components/auto-progress-bar.vue.js.map +1 -0
  291. package/js/components/auto-progress-bar.vue_rollup-plugin-vue=script.js +42 -0
  292. package/js/components/auto-progress-bar.vue_rollup-plugin-vue=script.js.map +1 -0
  293. package/js/components/base-dropdown.vue.js +31 -9
  294. package/js/components/base-dropdown.vue.js.map +1 -1
  295. package/js/components/base-dropdown.vue_rollup-plugin-vue=script.js.map +1 -1
  296. package/js/components/base-grid.vue.js +2 -2
  297. package/js/components/base-grid.vue.js.map +1 -1
  298. package/js/components/base-grid.vue_rollup-plugin-vue=script.js +1 -1
  299. package/js/components/base-grid.vue_rollup-plugin-vue=script.js.map +1 -1
  300. package/js/components/layouts/layouts.mixin.js +44 -0
  301. package/js/components/layouts/layouts.mixin.js.map +1 -0
  302. package/js/components/layouts/multi-column-max-width-layout.vue.js +64 -54
  303. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  304. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue=script.js +6 -26
  305. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue=script.js.map +1 -1
  306. package/js/components/layouts/single-column-layout.vue.js +20 -14
  307. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  308. package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js +6 -25
  309. package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js.map +1 -1
  310. package/js/components/location-provider.vue.js +39 -0
  311. package/js/components/location-provider.vue.js.map +1 -0
  312. package/js/components/location-provider.vue_rollup-plugin-vue=script.js +27 -0
  313. package/js/components/location-provider.vue_rollup-plugin-vue=script.js.map +1 -0
  314. package/js/components/result/base-result-image.vue.js +4 -4
  315. package/js/components/result/base-result-image.vue.js.map +1 -1
  316. package/js/components/result/base-result-link.vue.js +2 -2
  317. package/js/components/result/base-result-link.vue.js.map +1 -1
  318. package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js +5 -14
  319. package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js.map +1 -1
  320. package/js/components/scroll/base-scroll.vue.js +2 -2
  321. package/js/components/scroll/base-scroll.vue.js.map +1 -1
  322. package/js/components/scroll/base-scroll.vue_rollup-plugin-vue=script.js +2 -49
  323. package/js/components/scroll/base-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
  324. package/js/components/scroll/scroll.mixin.js +122 -52
  325. package/js/components/scroll/scroll.mixin.js.map +1 -1
  326. package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js +1 -0
  327. package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js.map +1 -1
  328. package/js/components/suggestions/base-suggestion.vue.js +2 -2
  329. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  330. package/js/components/suggestions/base-suggestion.vue_rollup-plugin-vue=script.js +21 -6
  331. package/js/components/suggestions/base-suggestion.vue_rollup-plugin-vue=script.js.map +1 -1
  332. package/js/components/x-component.utils.js +2 -2
  333. package/js/components/x-component.utils.js.map +1 -1
  334. package/js/index.js +27 -14
  335. package/js/index.js.map +1 -1
  336. package/js/plugins/x-emitters.js +92 -21
  337. package/js/plugins/x-emitters.js.map +1 -1
  338. package/js/plugins/x-plugin.alias.js +37 -26
  339. package/js/plugins/x-plugin.alias.js.map +1 -1
  340. package/js/plugins/x-plugin.js +1 -0
  341. package/js/plugins/x-plugin.js.map +1 -1
  342. package/js/plugins/x-plugin.mixin.js +16 -6
  343. package/js/plugins/x-plugin.mixin.js.map +1 -1
  344. package/js/store/utils/status-store.utils.js.map +1 -1
  345. package/js/store/x.module.js +7 -6
  346. package/js/store/x.module.js.map +1 -1
  347. package/js/utils/array.js +19 -1
  348. package/js/utils/array.js.map +1 -1
  349. package/js/utils/origin.js +20 -0
  350. package/js/utils/origin.js.map +1 -0
  351. package/js/x-installer/x-installer/x-installer.js +7 -4
  352. package/js/x-installer/x-installer/x-installer.js.map +1 -1
  353. package/js/x-modules/extra-params/components/extra-params.vue.js.map +1 -1
  354. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +18 -8
  355. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  356. package/js/x-modules/extra-params/components/renderless-extra-param.vue.js.map +1 -1
  357. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +9 -39
  358. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js.map +1 -1
  359. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue.js.map +1 -1
  360. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +10 -10
  361. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  362. package/js/x-modules/extra-params/wiring.js +3 -0
  363. package/js/x-modules/extra-params/wiring.js.map +1 -1
  364. package/js/x-modules/facets/components/clear-filters.vue.js +7 -1
  365. package/js/x-modules/facets/components/clear-filters.vue.js.map +1 -1
  366. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +5 -6
  367. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  368. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +5 -6
  369. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
  370. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +5 -6
  371. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  372. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +5 -6
  373. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  374. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +5 -6
  375. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  376. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +5 -6
  377. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  378. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +5 -6
  379. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  380. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +5 -6
  381. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  382. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +5 -6
  383. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js.map +1 -1
  384. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +5 -6
  385. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
  386. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +5 -6
  387. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map +1 -1
  388. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +5 -6
  389. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  390. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +14 -6
  391. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  392. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +5 -6
  393. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  394. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +6 -6
  395. package/js/x-modules/facets/entities/filter-entity.factory.js +22 -1
  396. package/js/x-modules/facets/entities/filter-entity.factory.js.map +1 -1
  397. package/js/x-modules/facets/service/facets.service.js +17 -15
  398. package/js/x-modules/facets/service/facets.service.js.map +1 -1
  399. package/js/x-modules/facets/wiring.js +2 -0
  400. package/js/x-modules/facets/wiring.js.map +1 -1
  401. package/js/x-modules/history-queries/store/actions/set-url-params.action.js +1 -3
  402. package/js/x-modules/history-queries/store/actions/set-url-params.action.js.map +1 -1
  403. package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
  404. package/js/x-modules/identifier-results/components/identifier-results.vue_rollup-plugin-vue=script.js +14 -2
  405. package/js/x-modules/identifier-results/components/identifier-results.vue_rollup-plugin-vue=script.js.map +1 -1
  406. package/js/x-modules/identifier-results/store/actions/save-origin.action.js +18 -0
  407. package/js/x-modules/identifier-results/store/actions/save-origin.action.js.map +1 -0
  408. package/js/x-modules/identifier-results/store/actions/set-url-params.action.js +1 -3
  409. package/js/x-modules/identifier-results/store/actions/set-url-params.action.js.map +1 -1
  410. package/js/x-modules/identifier-results/store/emitters.js +5 -1
  411. package/js/x-modules/identifier-results/store/emitters.js.map +1 -1
  412. package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js +3 -2
  413. package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js.map +1 -1
  414. package/js/x-modules/identifier-results/store/module.js +11 -4
  415. package/js/x-modules/identifier-results/store/module.js.map +1 -1
  416. package/js/x-modules/identifier-results/wiring.js +12 -2
  417. package/js/x-modules/identifier-results/wiring.js.map +1 -1
  418. package/js/x-modules/next-queries/components/next-queries-list.vue_rollup-plugin-vue=script.js +1 -1
  419. package/js/x-modules/next-queries/store/actions/set-url-params.action.js +1 -3
  420. package/js/x-modules/next-queries/store/actions/set-url-params.action.js.map +1 -1
  421. package/js/x-modules/next-queries/store/emitters.js +2 -2
  422. package/js/x-modules/next-queries/store/emitters.js.map +1 -1
  423. package/js/x-modules/next-queries/store/module.js +1 -1
  424. package/js/x-modules/next-queries/store/module.js.map +1 -1
  425. package/js/x-modules/popular-searches/store/module.js +1 -1
  426. package/js/x-modules/popular-searches/store/module.js.map +1 -1
  427. package/js/x-modules/query-suggestions/store/actions/set-url-params.action.js +1 -3
  428. package/js/x-modules/query-suggestions/store/actions/set-url-params.action.js.map +1 -1
  429. package/js/x-modules/query-suggestions/store/module.js +1 -1
  430. package/js/x-modules/query-suggestions/store/module.js.map +1 -1
  431. package/js/x-modules/recommendations/store/module.js +1 -1
  432. package/js/x-modules/recommendations/store/module.js.map +1 -1
  433. package/js/x-modules/related-tags/components/related-tag.vue.js +5 -4
  434. package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
  435. package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js +15 -24
  436. package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js.map +1 -1
  437. package/js/x-modules/related-tags/store/actions/set-url-params.action.js +14 -20
  438. package/js/x-modules/related-tags/store/actions/set-url-params.action.js.map +1 -1
  439. package/js/x-modules/related-tags/store/emitters.js +5 -1
  440. package/js/x-modules/related-tags/store/emitters.js.map +1 -1
  441. package/js/x-modules/related-tags/store/module.js +1 -1
  442. package/js/x-modules/related-tags/store/module.js.map +1 -1
  443. package/js/x-modules/scroll/components/main-scroll-item.vue.js +52 -0
  444. package/js/x-modules/scroll/components/main-scroll-item.vue.js.map +1 -0
  445. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +188 -0
  446. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -0
  447. package/js/{components/scroll/base-main-scroll.vue.js → x-modules/scroll/components/main-scroll.vue.js} +2 -2
  448. package/js/x-modules/scroll/components/main-scroll.vue.js.map +1 -0
  449. package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js +204 -0
  450. package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js.map +1 -0
  451. package/js/{components/scroll/base-scroll-to-top.vue.js → x-modules/scroll/components/scroll-to-top.vue.js} +2 -2
  452. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -0
  453. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js +231 -0
  454. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -0
  455. package/js/x-modules/scroll/components/scroll.const.js +15 -0
  456. package/js/x-modules/scroll/components/scroll.const.js.map +1 -0
  457. package/js/{components/scroll/base-id-scroll.vue.js → x-modules/scroll/components/scroll.vue.js} +8 -9
  458. package/js/x-modules/scroll/components/scroll.vue.js.map +1 -0
  459. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +110 -0
  460. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js.map +1 -0
  461. package/js/x-modules/scroll/components/window-scroll.vue.js +39 -0
  462. package/js/x-modules/scroll/components/window-scroll.vue.js.map +1 -0
  463. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +186 -0
  464. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -0
  465. package/js/x-modules/scroll/store/emitters.js +15 -0
  466. package/js/x-modules/scroll/store/emitters.js.map +1 -0
  467. package/js/x-modules/scroll/store/module.js +36 -0
  468. package/js/x-modules/scroll/store/module.js.map +1 -0
  469. package/js/x-modules/scroll/wiring.js +114 -0
  470. package/js/x-modules/scroll/wiring.js.map +1 -0
  471. package/js/x-modules/scroll/x-module.js +19 -0
  472. package/js/x-modules/scroll/x-module.js.map +1 -0
  473. package/js/x-modules/search/components/banners-list.vue_rollup-plugin-vue=script.js +1 -1
  474. package/js/x-modules/search/components/partial-query-button.vue.js +3 -2
  475. package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
  476. package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js +13 -122
  477. package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js.map +1 -1
  478. package/js/x-modules/search/components/promoteds-list.vue_rollup-plugin-vue=script.js +1 -1
  479. package/js/x-modules/search/components/redirection.vue.js +65 -0
  480. package/js/x-modules/search/components/redirection.vue.js.map +1 -0
  481. package/js/x-modules/search/components/redirection.vue_rollup-plugin-vue=script.js +108 -0
  482. package/js/x-modules/search/components/redirection.vue_rollup-plugin-vue=script.js.map +1 -0
  483. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +5 -6
  484. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js.map +1 -1
  485. package/js/x-modules/search/components/sort.mixin.js +7 -12
  486. package/js/x-modules/search/components/sort.mixin.js.map +1 -1
  487. package/js/x-modules/search/components/spellcheck-button.vue.js +3 -2
  488. package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
  489. package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js +13 -121
  490. package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js.map +1 -1
  491. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +5 -6
  492. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
  493. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +2 -1
  494. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
  495. package/js/x-modules/search/store/actions/save-origin.action.js +18 -0
  496. package/js/x-modules/search/store/actions/save-origin.action.js.map +1 -0
  497. package/js/x-modules/search/store/actions/set-url-params.action.js +4 -7
  498. package/js/x-modules/search/store/actions/set-url-params.action.js.map +1 -1
  499. package/js/x-modules/search/store/emitters.js +7 -1
  500. package/js/x-modules/search/store/emitters.js.map +1 -1
  501. package/js/x-modules/search/store/module.js +17 -4
  502. package/js/x-modules/search/store/module.js.map +1 -1
  503. package/js/x-modules/search/wiring.js +25 -23
  504. package/js/x-modules/search/wiring.js.map +1 -1
  505. package/js/x-modules/search-box/components/search-button.vue.js +3 -2
  506. package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
  507. package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js +16 -15
  508. package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js.map +1 -1
  509. package/js/x-modules/search-box/components/search-input.vue.js +3 -2
  510. package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
  511. package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js.map +1 -1
  512. package/js/x-modules/search-box/store/actions/set-url-params.action.js +1 -3
  513. package/js/x-modules/search-box/store/actions/set-url-params.action.js.map +1 -1
  514. package/js/x-modules/tagging/service/session.service.js +35 -0
  515. package/js/x-modules/tagging/service/session.service.js.map +1 -0
  516. package/js/x-modules/tagging/store/emitters.js +3 -1
  517. package/js/x-modules/tagging/store/emitters.js.map +1 -1
  518. package/js/x-modules/tagging/store/module.js +16 -2
  519. package/js/x-modules/tagging/store/module.js.map +1 -1
  520. package/js/x-modules/tagging/wiring.js +59 -2
  521. package/js/x-modules/tagging/wiring.js.map +1 -1
  522. package/js/x-modules/url/components/url-handler.vue.js +50 -0
  523. package/js/x-modules/url/components/url-handler.vue.js.map +1 -0
  524. package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js +243 -0
  525. package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js.map +1 -0
  526. package/js/x-modules/url/store/emitters.js +24 -7
  527. package/js/x-modules/url/store/emitters.js.map +1 -1
  528. package/js/x-modules/url/store/getters/url-params.getter.js +11 -7
  529. package/js/x-modules/url/store/getters/url-params.getter.js.map +1 -1
  530. package/js/x-modules/url/store/initial-state.js +6 -9
  531. package/js/x-modules/url/store/initial-state.js.map +1 -1
  532. package/js/x-modules/url/store/module.js +17 -15
  533. package/js/x-modules/url/store/module.js.map +1 -1
  534. package/js/x-modules/url/store/mutations/set-params.mutation.js +21 -0
  535. package/js/x-modules/url/store/mutations/set-params.mutation.js.map +1 -0
  536. package/js/x-modules/url/wiring.js +32 -23
  537. package/js/x-modules/url/wiring.js.map +1 -1
  538. package/next-queries/index.js +0 -1
  539. package/package.json +6 -4
  540. package/report/x-adapter.api.json +18 -18
  541. package/report/x-components.api.json +4829 -1625
  542. package/report/x-components.api.md +534 -207
  543. package/report/x-types.api.json +396 -310
  544. package/scroll/index.d.ts +1 -0
  545. package/scroll/index.js +10 -0
  546. package/search/index.js +2 -1
  547. package/tagging/index.js +2 -1
  548. package/types/adapter/real-adapter.d.ts.map +1 -1
  549. package/types/adapter/util.d.ts +1 -1
  550. package/types/adapter/util.d.ts.map +1 -1
  551. package/types/components/auto-progress-bar.vue.d.ts +29 -0
  552. package/types/components/auto-progress-bar.vue.d.ts.map +1 -0
  553. package/types/components/base-dropdown.vue.d.ts.map +1 -1
  554. package/types/components/index.d.ts +2 -0
  555. package/types/components/index.d.ts.map +1 -1
  556. package/types/components/layouts/layouts.mixin.d.ts +24 -0
  557. package/types/components/layouts/layouts.mixin.d.ts.map +1 -0
  558. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts +4 -16
  559. package/types/components/layouts/multi-column-max-width-layout.vue.d.ts.map +1 -1
  560. package/types/components/layouts/single-column-layout.vue.d.ts +4 -16
  561. package/types/components/layouts/single-column-layout.vue.d.ts.map +1 -1
  562. package/types/components/location-provider.vue.d.ts +17 -0
  563. package/types/components/location-provider.vue.d.ts.map +1 -0
  564. package/types/components/result/base-result-link.vue.d.ts +8 -18
  565. package/types/components/result/base-result-link.vue.d.ts.map +1 -1
  566. package/types/components/scroll/base-scroll.vue.d.ts +0 -28
  567. package/types/components/scroll/base-scroll.vue.d.ts.map +1 -1
  568. package/types/components/scroll/index.d.ts +0 -3
  569. package/types/components/scroll/index.d.ts.map +1 -1
  570. package/types/components/scroll/scroll.mixin.d.ts +75 -30
  571. package/types/components/scroll/scroll.mixin.d.ts.map +1 -1
  572. package/types/components/suggestions/base-suggestion.vue.d.ts +15 -2
  573. package/types/components/suggestions/base-suggestion.vue.d.ts.map +1 -1
  574. package/types/components/x-component.utils.d.ts +1 -1
  575. package/types/components/x-component.utils.d.ts.map +1 -1
  576. package/types/index.d.ts +1 -0
  577. package/types/index.d.ts.map +1 -1
  578. package/types/plugins/x-emitters.d.ts.map +1 -1
  579. package/types/plugins/x-plugin.alias.d.ts.map +1 -1
  580. package/types/plugins/x-plugin.d.ts +1 -1
  581. package/types/plugins/x-plugin.d.ts.map +1 -1
  582. package/types/plugins/x-plugin.mixin.d.ts +2 -2
  583. package/types/plugins/x-plugin.mixin.d.ts.map +1 -1
  584. package/types/plugins/x-plugin.types.d.ts +8 -2
  585. package/types/plugins/x-plugin.types.d.ts.map +1 -1
  586. package/types/router.d.ts.map +1 -1
  587. package/types/store/utils/status-store.utils.d.ts +1 -1
  588. package/types/store/utils/status-store.utils.d.ts.map +1 -1
  589. package/types/store/x.module.d.ts.map +1 -1
  590. package/types/types/index.d.ts +1 -1
  591. package/types/types/index.d.ts.map +1 -1
  592. package/types/types/origin.d.ts +46 -0
  593. package/types/types/origin.d.ts.map +1 -0
  594. package/types/types/url-params.d.ts +1 -1
  595. package/types/utils/array.d.ts +10 -0
  596. package/types/utils/array.d.ts.map +1 -1
  597. package/types/utils/index.d.ts +1 -0
  598. package/types/utils/index.d.ts.map +1 -1
  599. package/types/utils/origin.d.ts +13 -0
  600. package/types/utils/origin.d.ts.map +1 -0
  601. package/types/views/base-config.d.ts.map +1 -1
  602. package/types/wiring/events.types.d.ts +18 -40
  603. package/types/wiring/events.types.d.ts.map +1 -1
  604. package/types/wiring/wiring.types.d.ts +9 -10
  605. package/types/wiring/wiring.types.d.ts.map +1 -1
  606. package/types/x-installer/x-installer/x-installer.d.ts +1 -1
  607. package/types/x-installer/x-installer/x-installer.d.ts.map +1 -1
  608. package/types/x-modules/extra-params/components/extra-params.vue.d.ts +9 -0
  609. package/types/x-modules/extra-params/components/extra-params.vue.d.ts.map +1 -1
  610. package/types/x-modules/extra-params/components/renderless-extra-param.vue.d.ts +3 -27
  611. package/types/x-modules/extra-params/components/renderless-extra-param.vue.d.ts.map +1 -1
  612. package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts +1 -1
  613. package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts.map +1 -1
  614. package/types/x-modules/extra-params/events.types.d.ts +17 -0
  615. package/types/x-modules/extra-params/events.types.d.ts.map +1 -1
  616. package/types/x-modules/extra-params/wiring.d.ts +3 -0
  617. package/types/x-modules/extra-params/wiring.d.ts.map +1 -1
  618. package/types/x-modules/facets/components/clear-filters.vue.d.ts.map +1 -1
  619. package/types/x-modules/facets/components/lists/sliced-filters.vue.d.ts.map +1 -1
  620. package/types/x-modules/facets/entities/filter-entity.factory.d.ts +19 -2
  621. package/types/x-modules/facets/entities/filter-entity.factory.d.ts.map +1 -1
  622. package/types/x-modules/facets/service/facets.service.d.ts +4 -9
  623. package/types/x-modules/facets/service/facets.service.d.ts.map +1 -1
  624. package/types/x-modules/facets/wiring.d.ts +1 -0
  625. package/types/x-modules/facets/wiring.d.ts.map +1 -1
  626. package/types/x-modules/history-queries/store/actions/set-url-params.action.d.ts.map +1 -1
  627. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +8 -0
  628. package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts.map +1 -1
  629. package/types/x-modules/identifier-results/store/actions/save-origin.action.d.ts +12 -0
  630. package/types/x-modules/identifier-results/store/actions/save-origin.action.d.ts.map +1 -0
  631. package/types/x-modules/identifier-results/store/actions/set-url-params.action.d.ts.map +1 -1
  632. package/types/x-modules/identifier-results/store/emitters.d.ts +4 -1
  633. package/types/x-modules/identifier-results/store/emitters.d.ts.map +1 -1
  634. package/types/x-modules/identifier-results/store/getters/identifier-results-request.getter.d.ts.map +1 -1
  635. package/types/x-modules/identifier-results/store/index.d.ts +1 -0
  636. package/types/x-modules/identifier-results/store/index.d.ts.map +1 -1
  637. package/types/x-modules/identifier-results/store/module.d.ts.map +1 -1
  638. package/types/x-modules/identifier-results/store/types.d.ts +26 -10
  639. package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
  640. package/types/x-modules/identifier-results/wiring.d.ts +7 -0
  641. package/types/x-modules/identifier-results/wiring.d.ts.map +1 -1
  642. package/types/x-modules/next-queries/index.d.ts +0 -1
  643. package/types/x-modules/next-queries/index.d.ts.map +1 -1
  644. package/types/x-modules/next-queries/store/actions/set-url-params.action.d.ts.map +1 -1
  645. package/types/x-modules/next-queries/store/emitters.d.ts +1 -2
  646. package/types/x-modules/next-queries/store/emitters.d.ts.map +1 -1
  647. package/types/x-modules/query-suggestions/store/actions/set-url-params.action.d.ts.map +1 -1
  648. package/types/x-modules/related-tags/components/related-tag.vue.d.ts +3 -6
  649. package/types/x-modules/related-tags/components/related-tag.vue.d.ts.map +1 -1
  650. package/types/x-modules/related-tags/store/actions/set-url-params.action.d.ts.map +1 -1
  651. package/types/x-modules/related-tags/store/emitters.d.ts +4 -1
  652. package/types/x-modules/related-tags/store/emitters.d.ts.map +1 -1
  653. package/types/x-modules/scroll/components/index.d.ts +8 -0
  654. package/types/x-modules/scroll/components/index.d.ts.map +1 -0
  655. package/types/x-modules/scroll/components/main-scroll-item.vue.d.ts +65 -0
  656. package/types/x-modules/scroll/components/main-scroll-item.vue.d.ts.map +1 -0
  657. package/types/x-modules/scroll/components/main-scroll.vue.d.ts +121 -0
  658. package/types/x-modules/scroll/components/main-scroll.vue.d.ts.map +1 -0
  659. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +80 -0
  660. package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts.map +1 -0
  661. package/types/x-modules/scroll/components/scroll.const.d.ts +15 -0
  662. package/types/x-modules/scroll/components/scroll.const.d.ts.map +1 -0
  663. package/types/x-modules/scroll/components/scroll.types.d.ts +20 -0
  664. package/types/x-modules/scroll/components/scroll.types.d.ts.map +1 -0
  665. package/types/{components/scroll/base-id-scroll.vue.d.ts → x-modules/scroll/components/scroll.vue.d.ts} +17 -30
  666. package/types/x-modules/scroll/components/scroll.vue.d.ts.map +1 -0
  667. package/types/x-modules/scroll/components/window-scroll.vue.d.ts +47 -0
  668. package/types/x-modules/scroll/components/window-scroll.vue.d.ts.map +1 -0
  669. package/types/x-modules/scroll/events.types.d.ts +53 -0
  670. package/types/x-modules/scroll/events.types.d.ts.map +1 -0
  671. package/types/x-modules/scroll/index.d.ts +6 -0
  672. package/types/x-modules/scroll/index.d.ts.map +1 -0
  673. package/types/x-modules/scroll/store/emitters.d.ts +7 -0
  674. package/types/x-modules/scroll/store/emitters.d.ts.map +1 -0
  675. package/types/x-modules/scroll/store/index.d.ts +4 -0
  676. package/types/x-modules/scroll/store/index.d.ts.map +1 -0
  677. package/types/x-modules/scroll/store/module.d.ts +8 -0
  678. package/types/x-modules/scroll/store/module.d.ts.map +1 -0
  679. package/types/x-modules/scroll/store/types.d.ts +98 -0
  680. package/types/x-modules/scroll/store/types.d.ts.map +1 -0
  681. package/types/x-modules/scroll/wiring.d.ts +74 -0
  682. package/types/x-modules/scroll/wiring.d.ts.map +1 -0
  683. package/types/x-modules/scroll/x-module.d.ts +16 -0
  684. package/types/x-modules/scroll/x-module.d.ts.map +1 -0
  685. package/types/x-modules/search/components/index.d.ts +1 -0
  686. package/types/x-modules/search/components/index.d.ts.map +1 -1
  687. package/types/x-modules/search/components/partial-query-button.vue.d.ts +2 -5
  688. package/types/x-modules/search/components/partial-query-button.vue.d.ts.map +1 -1
  689. package/types/x-modules/search/components/redirection.vue.d.ts +72 -0
  690. package/types/x-modules/search/components/redirection.vue.d.ts.map +1 -0
  691. package/types/x-modules/search/components/sort.mixin.d.ts +3 -11
  692. package/types/x-modules/search/components/sort.mixin.d.ts.map +1 -1
  693. package/types/x-modules/search/components/spellcheck-button.vue.d.ts +2 -5
  694. package/types/x-modules/search/components/spellcheck-button.vue.d.ts.map +1 -1
  695. package/types/x-modules/search/events.types.d.ts +15 -1
  696. package/types/x-modules/search/events.types.d.ts.map +1 -1
  697. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
  698. package/types/x-modules/search/store/actions/save-origin.action.d.ts +12 -0
  699. package/types/x-modules/search/store/actions/save-origin.action.d.ts.map +1 -0
  700. package/types/x-modules/search/store/actions/set-url-params.action.d.ts.map +1 -1
  701. package/types/x-modules/search/store/emitters.d.ts +5 -1
  702. package/types/x-modules/search/store/emitters.d.ts.map +1 -1
  703. package/types/x-modules/search/store/module.d.ts.map +1 -1
  704. package/types/x-modules/search/store/types.d.ts +17 -3
  705. package/types/x-modules/search/store/types.d.ts.map +1 -1
  706. package/types/x-modules/search/wiring.d.ts +21 -19
  707. package/types/x-modules/search/wiring.d.ts.map +1 -1
  708. package/types/x-modules/search-box/components/search-button.vue.d.ts +6 -2
  709. package/types/x-modules/search-box/components/search-button.vue.d.ts.map +1 -1
  710. package/types/x-modules/search-box/components/search-input.vue.d.ts.map +1 -1
  711. package/types/x-modules/search-box/store/actions/set-url-params.action.d.ts.map +1 -1
  712. package/types/x-modules/tagging/components/index.d.ts +2 -0
  713. package/types/x-modules/tagging/components/index.d.ts.map +1 -0
  714. package/types/x-modules/tagging/config.types.d.ts +9 -0
  715. package/types/x-modules/tagging/config.types.d.ts.map +1 -1
  716. package/types/x-modules/tagging/events.types.d.ts +20 -0
  717. package/types/x-modules/tagging/events.types.d.ts.map +1 -1
  718. package/types/x-modules/tagging/index.d.ts +1 -0
  719. package/types/x-modules/tagging/index.d.ts.map +1 -1
  720. package/types/x-modules/tagging/service/index.d.ts +3 -0
  721. package/types/x-modules/tagging/service/index.d.ts.map +1 -0
  722. package/types/x-modules/tagging/service/session.service.d.ts +20 -0
  723. package/types/x-modules/tagging/service/session.service.d.ts.map +1 -0
  724. package/types/x-modules/tagging/service/types.d.ts +21 -0
  725. package/types/x-modules/tagging/service/types.d.ts.map +1 -0
  726. package/types/x-modules/tagging/store/emitters.d.ts +3 -1
  727. package/types/x-modules/tagging/store/emitters.d.ts.map +1 -1
  728. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  729. package/types/x-modules/tagging/store/types.d.ts +27 -0
  730. package/types/x-modules/tagging/store/types.d.ts.map +1 -1
  731. package/types/x-modules/tagging/wiring.d.ts +32 -1
  732. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  733. package/types/x-modules/url/components/url-handler.vue.d.ts +130 -0
  734. package/types/x-modules/url/components/url-handler.vue.d.ts.map +1 -0
  735. package/types/x-modules/url/events.types.d.ts +8 -2
  736. package/types/x-modules/url/events.types.d.ts.map +1 -1
  737. package/types/x-modules/url/index.d.ts +1 -0
  738. package/types/x-modules/url/index.d.ts.map +1 -1
  739. package/types/x-modules/url/store/emitters.d.ts +13 -6
  740. package/types/x-modules/url/store/emitters.d.ts.map +1 -1
  741. package/types/x-modules/url/store/getters/url-params.getter.d.ts.map +1 -1
  742. package/types/x-modules/url/store/initial-state.d.ts +2 -2
  743. package/types/x-modules/url/store/initial-state.d.ts.map +1 -1
  744. package/types/x-modules/url/store/module.d.ts.map +1 -1
  745. package/types/x-modules/url/store/mutations/set-params.mutation.d.ts +13 -0
  746. package/types/x-modules/url/store/mutations/set-params.mutation.d.ts.map +1 -0
  747. package/types/x-modules/url/store/types.d.ts +22 -17
  748. package/types/x-modules/url/store/types.d.ts.map +1 -1
  749. package/types/x-modules/url/wiring.d.ts +37 -19
  750. package/types/x-modules/url/wiring.d.ts.map +1 -1
  751. package/types/x-modules/x-modules.types.d.ts +3 -1
  752. package/types/x-modules/x-modules.types.d.ts.map +1 -1
  753. package/url/index.js +3 -2
  754. package/docs/API-reference/api/x-components.arenextqueriesdifferent.md +0 -27
  755. package/docs/API-reference/api/x-components.baseidscroll.md +0 -24
  756. package/docs/API-reference/api/x-components.baseidscroll.resetonquerychange.md +0 -13
  757. package/docs/API-reference/api/x-components.basemainscroll.element.md +0 -13
  758. package/docs/API-reference/api/x-components.basemainscroll.md +0 -31
  759. package/docs/API-reference/api/x-components.basemainscroll.tag.md +0 -13
  760. package/docs/API-reference/api/x-components.baseresultlink.emituserclickedaresult.md +0 -17
  761. package/docs/API-reference/api/x-components.baseresultlink.emituserrightclickedaresult.md +0 -17
  762. package/docs/API-reference/api/x-components.baseresultlink.metadata.md +0 -13
  763. package/docs/API-reference/api/x-components.baseresultlink.mounted.md +0 -15
  764. package/docs/API-reference/api/x-components.baseresultlink.origin.md +0 -13
  765. package/docs/API-reference/api/x-components.baseresultlink.resultclickextraevents.md +0 -13
  766. package/docs/API-reference/api/x-components.basescroll.resetonquerychange.md +0 -13
  767. package/docs/API-reference/api/x-components.basescrolltotop.md +0 -23
  768. package/docs/API-reference/api/x-components.multicolumnmaxwidthlayout.devmode.md +0 -13
  769. package/docs/API-reference/api/x-components.renderlessextraparams.extraparams.md +0 -13
  770. package/docs/API-reference/api/x-components.singlecolumnlayout.devmode.md +0 -13
  771. package/docs/API-reference/api/x-components.sortmixin.value.md +0 -13
  772. package/docs/API-reference/api/x-components.updatestorefromurl.md +0 -13
  773. package/docs/API-reference/api/x-components.urlactions.updatestorefromurl.md +0 -24
  774. package/docs/API-reference/api/x-components.urlstate.extraparams.md +0 -11
  775. package/docs/API-reference/api/x-components.wiremetadata.origin.md +0 -13
  776. package/docs/API-reference/api/x-components.xeventstypes.useralmostreachedscrollend.md +0 -13
  777. package/docs/API-reference/api/x-components.xeventstypes.userreachedscrollend.md +0 -13
  778. package/docs/API-reference/api/x-components.xeventstypes.userreachedscrollstart.md +0 -13
  779. package/docs/API-reference/api/x-types.redirection.tagging.md +0 -15
  780. package/docs/API-reference/api/x-types.result.tagging.md +0 -13
  781. package/docs/API-reference/api/x-types.resulttagging.add2cart.md +0 -13
  782. package/docs/API-reference/api/x-types.resulttagging.checkout.md +0 -13
  783. package/docs/API-reference/api/x-types.resulttagging.click.md +0 -13
  784. package/docs/API-reference/api/x-types.resulttagging.md +0 -22
  785. package/docs/API-reference/components/common/scroll/x-components.base-id-scroll.md +0 -216
  786. package/docs/API-reference/components/common/scroll/x-components.base-main-scroll.md +0 -170
  787. package/js/components/scroll/base-id-scroll.vue.js.map +0 -1
  788. package/js/components/scroll/base-id-scroll.vue_rollup-plugin-vue=script.js +0 -110
  789. package/js/components/scroll/base-id-scroll.vue_rollup-plugin-vue=script.js.map +0 -1
  790. package/js/components/scroll/base-main-scroll.vue.js.map +0 -1
  791. package/js/components/scroll/base-main-scroll.vue_rollup-plugin-vue=script.js +0 -105
  792. package/js/components/scroll/base-main-scroll.vue_rollup-plugin-vue=script.js.map +0 -1
  793. package/js/components/scroll/base-scroll-to-top.vue.js.map +0 -1
  794. package/js/components/scroll/base-scroll-to-top.vue_rollup-plugin-vue=script.js +0 -179
  795. package/js/components/scroll/base-scroll-to-top.vue_rollup-plugin-vue=script.js.map +0 -1
  796. package/js/x-modules/next-queries/utils.js +0 -15
  797. package/js/x-modules/next-queries/utils.js.map +0 -1
  798. package/js/x-modules/url/store/actions/update-store-from-url.action.js +0 -29
  799. package/js/x-modules/url/store/actions/update-store-from-url.action.js.map +0 -1
  800. package/types/components/scroll/base-id-scroll.vue.d.ts.map +0 -1
  801. package/types/components/scroll/base-main-scroll.vue.d.ts +0 -78
  802. package/types/components/scroll/base-main-scroll.vue.d.ts.map +0 -1
  803. package/types/components/scroll/base-scroll-to-top.vue.d.ts +0 -119
  804. package/types/components/scroll/base-scroll-to-top.vue.d.ts.map +0 -1
  805. package/types/types/query-origin.d.ts +0 -7
  806. package/types/types/query-origin.d.ts.map +0 -1
  807. package/types/x-modules/next-queries/utils.d.ts +0 -12
  808. package/types/x-modules/next-queries/utils.d.ts.map +0 -1
  809. package/types/x-modules/url/store/actions/update-store-from-url.action.d.ts +0 -12
  810. package/types/x-modules/url/store/actions/update-store-from-url.action.d.ts.map +0 -1
package/js/index.js CHANGED
@@ -5,7 +5,7 @@ export { default as CollapseHeight } from './components/animations/collapse-heig
5
5
  export { default as CollapseWidth } from './components/animations/collapse-width.vue.js';
6
6
  export { default as CrossFade } from './components/animations/cross-fade.vue.js';
7
7
  export { default as FadeAndSlide } from './components/animations/fade-and-slide.vue.js';
8
- export { arrayToObject, deepFilter, deepFlat, groupItemsBy, isArrayEmpty } from './utils/array.js';
8
+ export { arrayToObject, createEmitterArrayFilter, deepFilter, deepFlat, groupItemsBy, isArrayEmpty } from './utils/array.js';
9
9
  export { noOp } from './utils/function.js';
10
10
  export { CancelSymbol, cancellablePromise } from './utils/cancellable-promise.js';
11
11
  export { clone } from './utils/clone.js';
@@ -17,6 +17,7 @@ export { isElementEqualOrContained } from './utils/html.js';
17
17
  export { normalizeString } from './utils/normalize.js';
18
18
  export { isInRange } from './utils/number.js';
19
19
  export { cleanUndefined, forEach, map, objectFilter, reduce } from './utils/object.js';
20
+ export { createOrigin } from './utils/origin.js';
20
21
  export { sanitize } from './utils/sanitize.js';
21
22
  export { localStorageService } from './utils/storage.js';
22
23
  export { capitalize, isStringEmpty, toKebabCase } from './utils/string.js';
@@ -101,11 +102,9 @@ export { default as BaseFallbackImage } from './components/result/base-result-fa
101
102
  export { default as BasePlaceholderImage } from './components/result/base-result-placeholder-image.vue.js';
102
103
  export { default as ScrollMixin } from './components/scroll/scroll.mixin.js';
103
104
  export { default as BaseScroll } from './components/scroll/base-scroll.vue.js';
104
- export { default as BaseIdScroll } from './components/scroll/base-id-scroll.vue.js';
105
- export { default as BaseScrollToTop } from './components/scroll/base-scroll-to-top.vue.js';
106
- export { default as BaseMainScroll } from './components/scroll/base-main-scroll.vue.js';
107
105
  export { default as BaseSuggestion } from './components/suggestions/base-suggestion.vue.js';
108
106
  export { default as BaseSuggestions } from './components/suggestions/base-suggestions.vue.js';
107
+ export { default as AutoProgressBar } from './components/auto-progress-bar.vue.js';
109
108
  export { LIST_ITEMS_KEY } from './components/decorators/injection.consts.js';
110
109
  export { default as BaseGrid } from './components/base-grid.vue.js';
111
110
  export { DirectionalFocusNavigationService } from './services/directional-focus-navigation.service.js';
@@ -114,24 +113,32 @@ export { default as BaseVariableColumnGrid } from './components/base-variable-co
114
113
  export { Debounce } from './components/decorators/debounce.decorators.js';
115
114
  export { default as SlidingPanel } from './components/sliding-panel.vue.js';
116
115
  export { default as ItemsList } from './components/items-list.vue.js';
117
- export { default as MultiColumnMaxWidthLayout } from './components/layouts/multi-column-max-width-layout.vue.js';
118
- export { default as SingleColumnLayout } from './components/layouts/single-column-layout.vue.js';
119
116
  export { Getter, State } from './components/decorators/store.decorators.js';
120
- export { ItemsListInjectionMixin } from './components/items-list-injection.mixin.js';
121
117
  export { RootXStoreModule } from './store/x.module.js';
122
118
  export { BaseXBus, bus } from './plugins/x-bus.js';
123
119
  export { XComponentModule, getXComponentXModuleName, isXComponent, setXComponentXModuleName } from './components/x-component.utils.js';
124
120
  export { createXComponentAPIMixin, getBusAPI, getRootXComponent } from './plugins/x-plugin.mixin.js';
125
121
  export { XPlugin, xPlugin } from './plugins/x-plugin.js';
126
122
  export { xComponentMixin } from './components/x-component.mixin.js';
127
- export { infiniteScroll } from './directives/infinite-scroll/infinite-scroll.js';
128
- export { compileMessage } from './filters/compile-message.filter.js';
129
123
  export { createFetchAndSaveActions } from './store/utils/fetch-and-save-action.utils.js';
130
124
  export { setStatus } from './store/utils/status-store.utils.js';
131
125
  export { createStoreEmitters } from './store/utils/store-emitters.utils.js';
126
+ export { scrollXStoreModule } from './x-modules/scroll/store/module.js';
127
+ export { scrollEmitters } from './x-modules/scroll/store/emitters.js';
132
128
  export { createWireFromFunction, wireCommit, wireCommitWithoutPayload, wireDispatch, wireDispatchWithoutPayload, wireService, wireServiceWithoutPayload } from './wiring/wires.factory.js';
133
129
  export { createWiring, getStateAndGettersFromModule } from './wiring/wiring.utils.js';
134
130
  export { namespacedWireCommit, namespacedWireCommitWithoutPayload, namespacedWireDispatch, namespacedWireDispatchWithoutPayload } from './wiring/namespaced-wires.factory.js';
131
+ export { clearPendingScrollToWire, scrollWiring, setPendingScrollToWire, setScrollDirectionWire, setScrollHasAlmostReachedEndWire, setScrollHasReachedEndWire, setScrollHasReachedStartWire, setScrollPositionWire } from './x-modules/scroll/wiring.js';
132
+ export { scrollXModule } from './x-modules/scroll/x-module.js';
133
+ export { MainScrollId, ScrollObserverKey } from './x-modules/scroll/components/scroll.const.js';
134
+ export { default as MainScroll } from './x-modules/scroll/components/main-scroll.vue.js';
135
+ export { default as Scroll } from './x-modules/scroll/components/scroll.vue.js';
136
+ export { default as MultiColumnMaxWidthLayout } from './components/layouts/multi-column-max-width-layout.vue.js';
137
+ export { default as SingleColumnLayout } from './components/layouts/single-column-layout.vue.js';
138
+ export { default as LocationProvider } from './components/location-provider.vue.js';
139
+ export { ItemsListInjectionMixin } from './components/items-list-injection.mixin.js';
140
+ export { infiniteScroll } from './directives/infinite-scroll/infinite-scroll.js';
141
+ export { compileMessage } from './filters/compile-message.filter.js';
135
142
  export { debounce, filter, filterBlacklistedModules, filterFalsyPayload, filterTruthyPayload, filterWhitelistedModules, mapWire, throttle } from './wiring/wires.operators.js';
136
143
  export { namespacedDebounce, namespacedThrottle } from './wiring/namespaced-wires.operators.js';
137
144
  export { BaseXAPI } from './x-installer/api/base-api.js';
@@ -206,17 +213,17 @@ export { default as HistoryQuery } from './x-modules/history-queries/components/
206
213
  export { default as HistoryQueries } from './x-modules/history-queries/components/history-queries.vue.js';
207
214
  export { cancelFetchAndSaveIdentifierResults, fetchAndSaveIdentifierResults } from './x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.js';
208
215
  export { fetchIdentifierResults } from './x-modules/identifier-results/store/actions/fetch-identifier-results.action.js';
216
+ export { saveOrigin } from './x-modules/identifier-results/store/actions/save-origin.action.js';
209
217
  export { saveQuery } from './x-modules/identifier-results/store/actions/save-query.action.js';
210
218
  export { identifierDetectionRegexp } from './x-modules/identifier-results/store/getters/identifier-detection-regexp.getter.js';
211
219
  export { identifierHighlightRegexp } from './x-modules/identifier-results/store/getters/identifier-highlight-regexp.getter.js';
212
220
  export { identifierResultsRequest } from './x-modules/identifier-results/store/getters/identifier-results-request.getter.js';
213
221
  export { identifierResultsXStoreModule } from './x-modules/identifier-results/store/module.js';
214
222
  export { identifierResultsEmitters } from './x-modules/identifier-results/store/emitters.js';
215
- export { cancelFetchAndSaveIdentifierResultsWire, clearIdentifierResultsQuery, fetchAndSaveIdentifierResultsWire, identifierResultsWiring, setIdentifierResultsQuery } from './x-modules/identifier-results/wiring.js';
223
+ export { cancelFetchAndSaveIdentifierResultsWire, clearIdentifierResultsQuery, fetchAndSaveIdentifierResultsWire, identifierResultsWiring, saveIdentifierResultsOriginWire, setIdentifierResultsQuery } from './x-modules/identifier-results/wiring.js';
216
224
  export { identifierResultsXModule } from './x-modules/identifier-results/x-module.js';
217
225
  export { default as IdentifierResult } from './x-modules/identifier-results/components/identifier-result.vue.js';
218
226
  export { default as IdentifierResults } from './x-modules/identifier-results/components/identifier-results.vue.js';
219
- export { areNextQueriesDifferent } from './x-modules/next-queries/utils.js';
220
227
  export { cancelFetchAndSaveNextQueries, fetchAndSaveNextQueries } from './x-modules/next-queries/store/actions/fetch-and-save-next-queries.action.js';
221
228
  export { fetchNextQueries } from './x-modules/next-queries/store/actions/fetch-next-queries.action.js';
222
229
  export { setQueryFromLastHistoryQuery } from './x-modules/next-queries/store/actions/set-query-from-last-history-query.action.js';
@@ -233,7 +240,7 @@ export { fetchSearchResponse } from './x-modules/search/store/actions/fetch-sear
233
240
  export { request as searchRequest } from './x-modules/search/store/getters/request.getter.js';
234
241
  export { searchXStoreModule } from './x-modules/search/store/module.js';
235
242
  export { searchEmitters } from './x-modules/search/store/emitters.js';
236
- export { cancelFetchAndSaveSearchResponseWire, fetchAndSaveSearchResponseWire, increasePageAppendingResults, resetAppending, resetFacets, resetPage, resetSort, resetSpellcheckQuery, searchWiring, setOrigin, setPageSize, setRelatedTags, setSearchExtraParams, setSearchPage, setSearchQuery, setSelectedFilters, setSort, setUrlParams } from './x-modules/search/wiring.js';
243
+ export { cancelFetchAndSaveSearchResponseWire, fetchAndSaveSearchResponseWire, increasePageAppendingResults, resetAppending, resetFacets, resetPage, resetSort, resetSpellcheckQuery, saveOriginWire, searchWiring, setPageSize, setRelatedTags, setSearchExtraParams, setSearchPage, setSearchQuery, setSelectedFilters, setSort, setUrlParams } from './x-modules/search/wiring.js';
237
244
  export { searchXModule } from './x-modules/search/x-module.js';
238
245
  export { default as ResultsList } from './x-modules/search/components/results-list.vue.js';
239
246
  export { default as NextQueriesList } from './x-modules/next-queries/components/next-queries-list.vue.js';
@@ -278,12 +285,16 @@ export { cancelFetchAndSaveRelatedTagsWire, clearRelatedTagsQuery, clearSelected
278
285
  export { relatedTagsXModule } from './x-modules/related-tags/x-module.js';
279
286
  export { default as RelatedTag } from './x-modules/related-tags/components/related-tag.vue.js';
280
287
  export { default as RelatedTags } from './x-modules/related-tags/components/related-tags.vue.js';
288
+ export { default as ScrollToTop } from './x-modules/scroll/components/scroll-to-top.vue.js';
289
+ export { default as WindowScroll } from './x-modules/scroll/components/window-scroll.vue.js';
290
+ export { default as MainScrollItem } from './x-modules/scroll/components/main-scroll-item.vue.js';
281
291
  export { default as Banner } from './x-modules/search/components/banner.vue.js';
282
292
  export { default as BannersList } from './x-modules/search/components/banners-list.vue.js';
283
293
  export { default as PartialQueryButton } from './x-modules/search/components/partial-query-button.vue.js';
284
294
  export { default as PartialResultsList } from './x-modules/search/components/partial-results-list.vue.js';
285
295
  export { default as Promoted } from './x-modules/search/components/promoted.vue.js';
286
296
  export { default as PromotedsList } from './x-modules/search/components/promoteds-list.vue.js';
297
+ export { default as Redirection } from './x-modules/search/components/redirection.vue.js';
287
298
  export { default as SortMixin } from './x-modules/search/components/sort.mixin.js';
288
299
  export { default as SortDropdown } from './x-modules/search/components/sort-dropdown.vue.js';
289
300
  export { default as SortList } from './x-modules/search/components/sort-list.vue.js';
@@ -296,12 +307,14 @@ export { searchBoxXModule } from './x-modules/search-box/x-module.js';
296
307
  export { default as ClearSearchInput } from './x-modules/search-box/components/clear-search-input.vue.js';
297
308
  export { default as SearchButton } from './x-modules/search-box/components/search-button.vue.js';
298
309
  export { default as SearchInput } from './x-modules/search-box/components/search-input.vue.js';
310
+ export { DefaultSessionService } from './x-modules/tagging/service/session.service.js';
299
311
  export { taggingXStoreModule } from './x-modules/tagging/store/module.js';
300
312
  export { taggingEmitters } from './x-modules/tagging/store/emitters.js';
301
- export { taggingWiring } from './x-modules/tagging/wiring.js';
313
+ export { setConsent, setQueryTaggingDebounce, setSessionDuration, taggingWiring } from './x-modules/tagging/wiring.js';
302
314
  export { taggingXModule } from './x-modules/tagging/x-module.js';
303
315
  export { urlXStoreModule } from './x-modules/url/store/module.js';
304
316
  export { replaceableParams, urlEmitters } from './x-modules/url/store/emitters.js';
305
- export { setUrlExtraParams, setUrlFilters, setUrlPage, setUrlQuery, setUrlRelatedTags, updateStoreFromUrl, urlWiring } from './x-modules/url/wiring.js';
317
+ export { setInitialExtraParams, setParams, setUrlFilters, setUrlPage, setUrlQuery, setUrlRelatedTags, setUrlScroll, setUrlSort, urlWiring } from './x-modules/url/wiring.js';
306
318
  export { urlXModule } from './x-modules/url/x-module.js';
319
+ export { default as UrlHandler } from './x-modules/url/components/url-handler.vue.js';
307
320
  //# sourceMappingURL=index.js.map
package/js/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -17,47 +17,81 @@ function registerStoreEmitters(_a, bus, store) {
17
17
  var name = _a.name, storeEmitters = _a.storeEmitters, storeModule = _a.storeModule;
18
18
  var safeGettersProxy = getGettersProxyFromModule(store.getters, name, storeModule);
19
19
  forEach(storeEmitters, function (event, stateSelector) {
20
- var _a = normalizeStateSelector(stateSelector), selector = _a.selector, immediate = _a.immediate, filter = _a.filter, options = __rest(_a, ["selector", "immediate", "filter"]);
21
- /*
22
- * Due the debounce added to the watch callback, the `oldValue` would be the one from the last
23
- * watcher execution instead of the last callback execution. This would cause problems receiving
24
- * unstable oldValues, used in the Emitter filter.
25
- * To solve this, we store the `oldValue` of the watcher in the `previousValue` variable, and we
26
- * keep there until the watcher callback is finally executed (after the debounce). Then this
27
- * `previousValue` is cleared to store the next `oldValue`.
28
- */
29
- var previousValue = null;
30
- var watcherCallback = debounce(function (newValue, oldValue) {
20
+ var _a = normalizeStateSelector(stateSelector, event), selector = _a.selector, immediate = _a.immediate, filter = _a.filter, options = __rest(_a, ["selector", "immediate", "filter"]);
21
+ var emit = function (value) {
22
+ bus.emit(event, value, { moduleName: name });
23
+ };
24
+ var watcherSelector = function () { return selector(store.state.x[name], safeGettersProxy); };
25
+ var debouncedEffect = debounceWatcherEffect(event, function (newValue, oldValue) {
31
26
  if (filter(newValue, oldValue)) {
32
- bus.emit(event, newValue, { moduleName: name });
27
+ emit(newValue);
33
28
  }
34
- previousValue = null;
35
- }, 0);
36
- store.watch(function (state) { return selector(state.x[name], safeGettersProxy); }, function (newValue, oldValue) {
37
- previousValue = previousValue !== null && previousValue !== void 0 ? previousValue : oldValue;
38
- watcherCallback(newValue, previousValue);
39
- }, options);
29
+ });
30
+ store.watch(watcherSelector, debouncedEffect, options);
40
31
  if (immediate) {
41
32
  Promise.resolve().then(function () {
42
- bus.emit(event, selector(store.state.x[name], safeGettersProxy));
33
+ emit(watcherSelector());
43
34
  });
44
35
  }
45
36
  });
46
37
  }
38
+ /**
39
+ * This function "wraps" the watcher effect (the callback of the watcher) with debounce to avoid
40
+ * repeating events and request. Right now this function wraps every effect in a debounce and adds
41
+ * an extra debounce to the "SecondLevelEvent" events, to try to delay this events after the state
42
+ * change events.
43
+ *
44
+ * @param event - The {@link XEvent} to emit.
45
+ * @param watcherEffect - The callback to execute.
46
+ * @returns A new function with the `watcherEffect` callback wrapped in debounce.
47
+ */
48
+ function debounceWatcherEffect(event, watcherEffect) {
49
+ /*
50
+ * Due the debounce added to the watch callback, the `oldValue` would be the one from the last
51
+ * watcher execution instead of the last callback execution. This would cause problems receiving
52
+ * unstable oldValues, used in the Emitter filter.
53
+ * To solve this, we store the `oldValue` of the watcher in the `previousValue` variable, and we
54
+ * keep there until the watcher callback is finally executed (after the debounce). Then this
55
+ * `previousValue` is cleared to store the next `oldValue`.
56
+ */
57
+ var previousValue = undefined;
58
+ var watcherCallback = debounce(function (newValue, oldValue) {
59
+ watcherEffect(newValue, oldValue);
60
+ previousValue = undefined;
61
+ }, 0);
62
+ /* Only applying the extra debounce to the "SecondLevelEvent" events to avoid repeating outer
63
+ * effects (requests, URL changes). If we only apply the debounce to all the events we still have
64
+ * the problem of outer effects. */
65
+ if (isSecondLevelEventEmitter(event)) {
66
+ var previousCallback_1 = watcherCallback;
67
+ var debouncedPreviousCallback_1 = debounce(previousCallback_1, 0);
68
+ watcherCallback = (function (n, o) {
69
+ previousCallback_1.cancel();
70
+ debouncedPreviousCallback_1(n, o);
71
+ });
72
+ }
73
+ return function (newValue, oldValue) {
74
+ previousValue = previousValue !== undefined ? previousValue : oldValue;
75
+ watcherCallback(newValue, previousValue);
76
+ };
77
+ }
47
78
  /**
48
79
  * Transforms a {@link AnySimpleStateSelector} into a {@link AnyStateSelector}, and sets
49
80
  * default values for its properties.
50
81
  *
51
82
  * @param stateSelector - The state selector to normalize.
83
+ * @param event - The event name of the emitter.
52
84
  * @returns A {@link AnyStateSelector} with all the properties set.
53
85
  *
54
86
  * @internal
55
87
  */
56
- function normalizeStateSelector(stateSelector) {
88
+ function normalizeStateSelector(stateSelector, event) {
57
89
  var normalizedSelector = isSimpleSelector(stateSelector)
58
90
  ? { selector: stateSelector }
59
91
  : stateSelector;
60
- return __assign({ deep: false, immediate: false, filter: function () { return true; } }, normalizedSelector);
92
+ return __assign({ deep: false, immediate: false, filter: isSecondLevelEventEmitter(event)
93
+ ? function (newValue, oldValue) { return !hasPayloadChanged(newValue, oldValue); }
94
+ : function () { return true; } }, normalizedSelector);
61
95
  }
62
96
  /**
63
97
  * Checks if a the type of the store emitter selector is simple or complex. This selector can be
@@ -70,6 +104,43 @@ function normalizeStateSelector(stateSelector) {
70
104
  */
71
105
  function isSimpleSelector(stateSelector) {
72
106
  return typeof stateSelector === 'function';
107
+ }
108
+ // TODO: Generalize the Naming of the Events to take this into account
109
+ var secondLevelEvents = [/RequestChanged$/, /UrlStateChanged$/];
110
+ /**
111
+ * Function to detect if an {@link XEvent} is a "SecondLevelEvent", to treat it differently.
112
+ *
113
+ * @param event - The name of the {@link XEvent} to check.
114
+ * @returns True if is an `SecondLevelEvent`, False otherwise.
115
+ *
116
+ * @internal
117
+ */
118
+ function isSecondLevelEventEmitter(event) {
119
+ return secondLevelEvents.some(function (regex) { return regex.test(event); });
120
+ }
121
+ /**
122
+ * Function to filter if a payload of an {@link XEvent} has really changed or not. It only
123
+ * compares the first level of fields and not deeply, to avoid CPU consuming task here.
124
+ *
125
+ * @param request1 - First request to compare.
126
+ * @param request2 - Second request to compare.
127
+ * @returns True if the two objects are different, false otherwise.
128
+ *
129
+ * @internal
130
+ */
131
+ function hasPayloadChanged(request1, request2) {
132
+ if (request1 === request2) {
133
+ return true;
134
+ }
135
+ if (!request1 || !request2) {
136
+ return false;
137
+ }
138
+ var keys1 = Object.keys(request1);
139
+ var keys2 = Object.keys(request2);
140
+ if (keys1.length !== keys2.length) {
141
+ return false;
142
+ }
143
+ return !keys1.some(function (key) { return request1[key] !== request2[key]; });
73
144
  }
74
145
 
75
146
  export { isSimpleSelector, registerStoreEmitters };
@@ -1 +1 @@
1
- {"version":3,"file":"x-emitters.js","sources":["../../../src/plugins/x-emitters.ts"],"sourcesContent":["import { Store } from 'vuex';\nimport { getGettersProxyFromModule } from '../store/utils/getters-proxy.utils';\nimport { AnySimpleStateSelector, AnyStateSelector } from '../store/utils/store-emitters.utils';\nimport { debounce } from '../utils/debounce';\nimport { forEach } from '../utils/object';\nimport { AnyXModule } from '../x-modules/x-modules.types';\nimport { XBus } from './x-bus.types';\n\n/**\n * Registers the store emitters, making them emit the event when the part of the state selected\n * changes.\n *\n * @param xModule - The {@link XModule} to register its Store Emitters.\n * @param bus - The {@Link XBus} to emit the events by the Emitters.\n * @param store - The Vuex store to access to state and getters to watch them.\n *\n * @internal\n */\nexport function registerStoreEmitters(\n { name, storeEmitters, storeModule }: AnyXModule,\n bus: XBus,\n store: Store<any>\n): void {\n const safeGettersProxy = getGettersProxyFromModule(store.getters, name, storeModule);\n forEach(storeEmitters, (event, stateSelector: AnySimpleStateSelector | AnyStateSelector) => {\n const { selector, immediate, filter, ...options } = normalizeStateSelector(stateSelector);\n /*\n * Due the debounce added to the watch callback, the `oldValue` would be the one from the last\n * watcher execution instead of the last callback execution. This would cause problems receiving\n * unstable oldValues, used in the Emitter filter.\n * To solve this, we store the `oldValue` of the watcher in the `previousValue` variable, and we\n * keep there until the watcher callback is finally executed (after the debounce). Then this\n * `previousValue` is cleared to store the next `oldValue`.\n */\n let previousValue: any = null;\n\n const watcherCallback = debounce((newValue, oldValue) => {\n if (filter(newValue, oldValue)) {\n bus.emit(event, newValue, { moduleName: name });\n }\n previousValue = null;\n }, 0);\n\n store.watch(\n state => selector(state.x[name], safeGettersProxy),\n (newValue, oldValue) => {\n previousValue = previousValue ?? oldValue;\n watcherCallback(newValue, previousValue);\n },\n options\n );\n\n if (immediate) {\n Promise.resolve().then(() => {\n bus.emit(event, selector(store.state.x[name], safeGettersProxy));\n });\n }\n });\n}\n\n/**\n * Transforms a {@link AnySimpleStateSelector} into a {@link AnyStateSelector}, and sets\n * default values for its properties.\n *\n * @param stateSelector - The state selector to normalize.\n * @returns A {@link AnyStateSelector} with all the properties set.\n *\n * @internal\n */\nfunction normalizeStateSelector(\n stateSelector: AnySimpleStateSelector | AnyStateSelector\n): Required<AnyStateSelector> {\n const normalizedSelector = isSimpleSelector(stateSelector)\n ? { selector: stateSelector }\n : stateSelector;\n return {\n deep: false,\n immediate: false,\n filter: () => true,\n ...normalizedSelector\n };\n}\n\n/**\n * Checks if a the type of the store emitter selector is simple or complex. This selector can be\n * a function if it is simple or an object with the selector and other options if it is complex.\n *\n * @param stateSelector - The store emitter selector.\n * @returns A boolean which flags if the stateSelector is simple (function) or complex (object).\n *\n * @internal\n */\nexport function isSimpleSelector(\n stateSelector: AnySimpleStateSelector | AnyStateSelector\n): stateSelector is AnySimpleStateSelector {\n return typeof stateSelector === 'function';\n}\n"],"names":[],"mappings":";;;;;AAQA;;;;;;;;;;SAUgB,qBAAqB,CACnC,EAAgD,EAChD,GAAS,EACT,KAAiB;QAFf,IAAI,UAAA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AAC;AAED;;;;;;;;;AASA,SAAS,sBAAsB,CAC7B,aAAwD;IAExD,IAAM,kBAAkB,GAAG,gBAAgB,CAAC,aAAa,CAAC;UACtD,EAAE,QAAQ,EAAE,aAAa,EAAE;UAC3B,aAAa,CAAC;IAClB,kBACE,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,KAAK,EAChB,MAAM,EAAE,cAAM,OAAA,IAAI,GAAA,IACf,kBAAkB,EACrB;AACJ,CAAC;AAED;;;;;;;;;SASgB,gBAAgB,CAC9B,aAAwD;IAExD,OAAO,OAAO,aAAa,KAAK,UAAU,CAAC;AAC7C;;;;"}
1
+ {"version":3,"file":"x-emitters.js","sources":["../../../src/plugins/x-emitters.ts"],"sourcesContent":["import { Store } from 'vuex';\nimport { getGettersProxyFromModule } from '../store/utils/getters-proxy.utils';\nimport { AnySimpleStateSelector, AnyStateSelector } from '../store/utils/store-emitters.utils';\nimport { debounce } from '../utils/debounce';\nimport { forEach } from '../utils/object';\nimport { DebouncedFunction, Dictionary } from '../utils/types';\nimport { XEvent } from '../wiring/events.types';\nimport { AnyXModule } from '../x-modules/x-modules.types';\nimport { XBus } from './x-bus.types';\n\n/**\n * Registers the store emitters, making them emit the event when the part of the state selected\n * changes.\n *\n * @param xModule - The {@link XModule} to register its Store Emitters.\n * @param bus - The {@Link XBus} to emit the events by the Emitters.\n * @param store - The Vuex store to access to state and getters to watch them.\n *\n * @internal\n */\nexport function registerStoreEmitters(\n { name, storeEmitters, storeModule }: AnyXModule,\n bus: XBus,\n store: Store<any>\n): void {\n const safeGettersProxy = getGettersProxyFromModule(store.getters, name, storeModule);\n forEach(storeEmitters, (event, stateSelector: AnySimpleStateSelector | AnyStateSelector) => {\n const { selector, immediate, filter, ...options } = normalizeStateSelector(\n stateSelector,\n event\n );\n\n const emit = (value: unknown): void => {\n bus.emit(event, value, { moduleName: name });\n };\n const watcherSelector = (): unknown => selector(store.state.x[name], safeGettersProxy);\n const debouncedEffect = debounceWatcherEffect(event, (newValue, oldValue) => {\n if (filter(newValue, oldValue)) {\n emit(newValue);\n }\n });\n\n store.watch(watcherSelector, debouncedEffect, options);\n\n if (immediate) {\n Promise.resolve().then(() => {\n emit(watcherSelector());\n });\n }\n });\n}\n\n/**\n * This function \"wraps\" the watcher effect (the callback of the watcher) with debounce to avoid\n * repeating events and request. Right now this function wraps every effect in a debounce and adds\n * an extra debounce to the \"SecondLevelEvent\" events, to try to delay this events after the state\n * change events.\n *\n * @param event - The {@link XEvent} to emit.\n * @param watcherEffect - The callback to execute.\n * @returns A new function with the `watcherEffect` callback wrapped in debounce.\n */\nfunction debounceWatcherEffect(\n event: XEvent,\n watcherEffect: (newValue: unknown, oldValue: unknown) => void\n): (newValue: unknown, oldValue: unknown) => void {\n /*\n * Due the debounce added to the watch callback, the `oldValue` would be the one from the last\n * watcher execution instead of the last callback execution. This would cause problems receiving\n * unstable oldValues, used in the Emitter filter.\n * To solve this, we store the `oldValue` of the watcher in the `previousValue` variable, and we\n * keep there until the watcher callback is finally executed (after the debounce). Then this\n * `previousValue` is cleared to store the next `oldValue`.\n */\n let previousValue: unknown = undefined;\n\n let watcherCallback = debounce((newValue: unknown, oldValue: unknown): void => {\n watcherEffect(newValue, oldValue);\n previousValue = undefined;\n }, 0);\n /* Only applying the extra debounce to the \"SecondLevelEvent\" events to avoid repeating outer\n * effects (requests, URL changes). If we only apply the debounce to all the events we still have\n * the problem of outer effects. */\n if (isSecondLevelEventEmitter(event)) {\n const previousCallback = watcherCallback;\n const debouncedPreviousCallback = debounce(previousCallback, 0);\n watcherCallback = ((n, o) => {\n previousCallback.cancel();\n debouncedPreviousCallback(n, o);\n }) as DebouncedFunction<any>;\n }\n\n return (newValue, oldValue) => {\n previousValue = previousValue !== undefined ? previousValue : oldValue;\n watcherCallback(newValue, previousValue);\n };\n}\n\n/**\n * Transforms a {@link AnySimpleStateSelector} into a {@link AnyStateSelector}, and sets\n * default values for its properties.\n *\n * @param stateSelector - The state selector to normalize.\n * @param event - The event name of the emitter.\n * @returns A {@link AnyStateSelector} with all the properties set.\n *\n * @internal\n */\nfunction normalizeStateSelector(\n stateSelector: AnySimpleStateSelector | AnyStateSelector,\n event: XEvent\n): Required<AnyStateSelector> {\n const normalizedSelector = isSimpleSelector(stateSelector)\n ? { selector: stateSelector }\n : stateSelector;\n return {\n deep: false,\n immediate: false,\n filter: isSecondLevelEventEmitter(event)\n ? (newValue, oldValue) => !hasPayloadChanged(newValue, oldValue)\n : () => true,\n ...normalizedSelector\n };\n}\n\n/**\n * Checks if a the type of the store emitter selector is simple or complex. This selector can be\n * a function if it is simple or an object with the selector and other options if it is complex.\n *\n * @param stateSelector - The store emitter selector.\n * @returns A boolean which flags if the stateSelector is simple (function) or complex (object).\n *\n * @internal\n */\nexport function isSimpleSelector(\n stateSelector: AnySimpleStateSelector | AnyStateSelector\n): stateSelector is AnySimpleStateSelector {\n return typeof stateSelector === 'function';\n}\n\n// TODO: Generalize the Naming of the Events to take this into account\nconst secondLevelEvents: RegExp[] = [/RequestChanged$/, /UrlStateChanged$/];\n\n/**\n * Function to detect if an {@link XEvent} is a \"SecondLevelEvent\", to treat it differently.\n *\n * @param event - The name of the {@link XEvent} to check.\n * @returns True if is an `SecondLevelEvent`, False otherwise.\n *\n * @internal\n */\nfunction isSecondLevelEventEmitter(event: XEvent): boolean {\n return secondLevelEvents.some(regex => regex.test(event));\n}\n/**\n * Function to filter if a payload of an {@link XEvent} has really changed or not. It only\n * compares the first level of fields and not deeply, to avoid CPU consuming task here.\n *\n * @param request1 - First request to compare.\n * @param request2 - Second request to compare.\n * @returns True if the two objects are different, false otherwise.\n *\n * @internal\n */\nfunction hasPayloadChanged<T extends Dictionary>(request1?: T, request2?: T): boolean {\n if (request1 === request2) {\n return true;\n }\n if (!request1 || !request2) {\n return false;\n }\n const keys1 = Object.keys(request1);\n const keys2 = Object.keys(request2);\n if (keys1.length !== keys2.length) {\n return false;\n }\n return !keys1.some(key => request1[key] !== request2[key]);\n}\n"],"names":[],"mappings":";;;;;AA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iBAAiB,GAAa,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AAE5E;;;;;;;;AAQA,SAAS,yBAAyB,CAAC,KAAa;IAC9C,OAAO,iBAAiB,CAAC,IAAI,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAA,CAAC,CAAC;AAC5D,CAAC;AACD;;;;;;;;;;AAUA,SAAS,iBAAiB,CAAuB,QAAY,EAAE,QAAY;IACzE,IAAI,QAAQ,KAAK,QAAQ,EAAE;QACzB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE;QACjC,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,UAAA,GAAG,IAAI,OAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,GAAG,CAAC,GAAA,CAAC,CAAC;AAC7D;;;;"}
@@ -45,61 +45,72 @@ function getAliasAPI(store) {
45
45
  return {
46
46
  query: query,
47
47
  status: status,
48
- get nextQueries() {
49
- var _a;
50
- return (_a = store.getters[getGetterPath('nextQueries', 'nextQueries')]) !== null && _a !== void 0 ? _a : [];
51
- },
52
- get popularSearches() {
48
+ get device() {
53
49
  var _a, _b;
54
- return (_b = (_a = store.state.x.popularSearches) === null || _a === void 0 ? void 0 : _a.popularSearches) !== null && _b !== void 0 ? _b : [];
50
+ return (_b = (_a = store.state.x.device) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : null;
51
+ },
52
+ get facets() {
53
+ var _a;
54
+ return (_a = store.getters[getGetterPath('facets', 'facets')]) !== null && _a !== void 0 ? _a : {};
55
55
  },
56
56
  get historyQueries() {
57
57
  var _a;
58
58
  return (_a = store.getters[getGetterPath('historyQueries', 'historyQueries')]) !== null && _a !== void 0 ? _a : [];
59
59
  },
60
- get querySuggestions() {
60
+ get identifierResults() {
61
61
  var _a, _b;
62
- return (_b = (_a = store.state.x.querySuggestions) === null || _a === void 0 ? void 0 : _a.suggestions) !== null && _b !== void 0 ? _b : [];
62
+ return (_b = (_a = store.state.x.identifierResults) === null || _a === void 0 ? void 0 : _a.identifierResults) !== null && _b !== void 0 ? _b : [];
63
63
  },
64
- get relatedTags() {
64
+ get isEmpathizeOpen() {
65
+ var _a, _b;
66
+ return (_b = (_a = store.state.x.empathize) === null || _a === void 0 ? void 0 : _a.isOpen) !== null && _b !== void 0 ? _b : false;
67
+ },
68
+ get nextQueries() {
65
69
  var _a;
66
- return (_a = store.getters[getGetterPath('relatedTags', 'relatedTags')]) !== null && _a !== void 0 ? _a : [];
70
+ return (_a = store.getters[getGetterPath('nextQueries', 'nextQueries')]) !== null && _a !== void 0 ? _a : [];
67
71
  },
68
- get selectedRelatedTags() {
72
+ get noResults() {
73
+ return !this.totalResults && !!this.query.search && this.status.search === 'success';
74
+ },
75
+ get partialResults() {
69
76
  var _a, _b;
70
- return (_b = (_a = store.state.x.relatedTags) === null || _a === void 0 ? void 0 : _a.selectedRelatedTags) !== null && _b !== void 0 ? _b : [];
77
+ return (_b = (_a = store.state.x.search) === null || _a === void 0 ? void 0 : _a.partialResults) !== null && _b !== void 0 ? _b : [];
71
78
  },
72
- get identifierResults() {
79
+ get popularSearches() {
73
80
  var _a, _b;
74
- return (_b = (_a = store.state.x.identifierResults) === null || _a === void 0 ? void 0 : _a.identifierResults) !== null && _b !== void 0 ? _b : [];
81
+ return (_b = (_a = store.state.x.popularSearches) === null || _a === void 0 ? void 0 : _a.popularSearches) !== null && _b !== void 0 ? _b : [];
82
+ },
83
+ get querySuggestions() {
84
+ var _a, _b;
85
+ return (_b = (_a = store.state.x.querySuggestions) === null || _a === void 0 ? void 0 : _a.suggestions) !== null && _b !== void 0 ? _b : [];
75
86
  },
76
87
  get recommendations() {
77
88
  var _a, _b;
78
89
  return (_b = (_a = store.state.x.recommendations) === null || _a === void 0 ? void 0 : _a.recommendations) !== null && _b !== void 0 ? _b : [];
79
90
  },
80
- get facets() {
91
+ get redirections() {
92
+ var _a, _b;
93
+ return (_b = (_a = store.state.x.search) === null || _a === void 0 ? void 0 : _a.redirections) !== null && _b !== void 0 ? _b : [];
94
+ },
95
+ get relatedTags() {
81
96
  var _a;
82
- return (_a = store.getters[getGetterPath('facets', 'facets')]) !== null && _a !== void 0 ? _a : {};
97
+ return (_a = store.getters[getGetterPath('relatedTags', 'relatedTags')]) !== null && _a !== void 0 ? _a : [];
83
98
  },
84
99
  get selectedFilters() {
85
100
  var _a;
86
101
  return (_a = store.getters[getGetterPath('facets', 'selectedFilters')]) !== null && _a !== void 0 ? _a : [];
87
102
  },
88
- get totalResults() {
89
- var _a, _b;
90
- return (_b = (_a = store.state.x.search) === null || _a === void 0 ? void 0 : _a.totalResults) !== null && _b !== void 0 ? _b : 0;
91
- },
92
- get isEmpathizeOpen() {
93
- var _a, _b;
94
- return (_b = (_a = store.state.x.empathize) === null || _a === void 0 ? void 0 : _a.isOpen) !== null && _b !== void 0 ? _b : false;
95
- },
96
- get device() {
103
+ get selectedRelatedTags() {
97
104
  var _a, _b;
98
- return (_b = (_a = store.state.x.device) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : null;
105
+ return (_b = (_a = store.state.x.relatedTags) === null || _a === void 0 ? void 0 : _a.selectedRelatedTags) !== null && _b !== void 0 ? _b : [];
99
106
  },
100
107
  get spellcheckedQuery() {
101
108
  var _a, _b;
102
109
  return (_b = (_a = store.state.x.search) === null || _a === void 0 ? void 0 : _a.spellcheckedQuery) !== null && _b !== void 0 ? _b : null;
110
+ },
111
+ get totalResults() {
112
+ var _a, _b;
113
+ return (_b = (_a = store.state.x.search) === null || _a === void 0 ? void 0 : _a.totalResults) !== null && _b !== void 0 ? _b : 0;
103
114
  }
104
115
  };
105
116
  }
@@ -1 +1 @@
1
- {"version":3,"file":"x-plugin.alias.js","sources":["../../../src/plugins/x-plugin.alias.ts"],"sourcesContent":["import { Store } from 'vuex';\nimport { RootXStoreState } from '../store';\nimport { RequestStatus } from '../store/utils/status-store.utils';\nimport {\n XComponentAliasAPI,\n XComponentAliasQueryAPI,\n XComponentAliasStatusAPI\n} from './x-plugin.types';\nimport { getGetterPath } from './x-plugin.utils';\n\n/**\n * Creates an object containing the alias part of {@link XComponentAPI}.\n *\n * @param store - The store from which retrieve the data.\n * @returns An object containing the alias part of the {@link XComponentAPI}.\n * @internal\n */\nexport function getAliasAPI(\n store: Store<{ x: Partial<RootXStoreState['x']> }>\n): XComponentAliasAPI {\n const queryModules = [\n 'searchBox',\n 'nextQueries',\n 'querySuggestions',\n 'relatedTags',\n 'search'\n ] as const;\n const statusModules = [\n 'identifierResults',\n 'nextQueries',\n 'popularSearches',\n 'querySuggestions',\n 'recommendations',\n 'relatedTags',\n 'search'\n ] as const;\n\n const query = queryModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): string {\n return store.state.x[moduleName]?.query ?? '';\n },\n enumerable: true\n });\n }, {} as XComponentAliasQueryAPI);\n const status = statusModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): RequestStatus | undefined {\n return store.state.x[moduleName]?.status;\n },\n enumerable: true\n });\n }, {} as XComponentAliasStatusAPI);\n\n return {\n query,\n status,\n get nextQueries() {\n return store.getters[getGetterPath('nextQueries', 'nextQueries')] ?? [];\n },\n get popularSearches() {\n return store.state.x.popularSearches?.popularSearches ?? [];\n },\n get historyQueries() {\n return store.getters[getGetterPath('historyQueries', 'historyQueries')] ?? [];\n },\n get querySuggestions() {\n return store.state.x.querySuggestions?.suggestions ?? [];\n },\n get relatedTags() {\n return store.getters[getGetterPath('relatedTags', 'relatedTags')] ?? [];\n },\n get selectedRelatedTags() {\n return store.state.x.relatedTags?.selectedRelatedTags ?? [];\n },\n get identifierResults() {\n return store.state.x.identifierResults?.identifierResults ?? [];\n },\n get recommendations() {\n return store.state.x.recommendations?.recommendations ?? [];\n },\n get facets() {\n return store.getters[getGetterPath('facets', 'facets')] ?? {};\n },\n get selectedFilters() {\n return store.getters[getGetterPath('facets', 'selectedFilters')] ?? [];\n },\n get totalResults() {\n return store.state.x.search?.totalResults ?? 0;\n },\n get isEmpathizeOpen() {\n return store.state.x.empathize?.isOpen ?? false;\n },\n get device() {\n return store.state.x.device?.name ?? null;\n },\n get spellcheckedQuery() {\n return store.state.x.search?.spellcheckedQuery ?? null;\n }\n };\n}\n"],"names":[],"mappings":";;AAUA;;;;;;;SAOgB,WAAW,CACzB,KAAkD;IAElD,IAAM,YAAY,GAAG;QACnB,WAAW;QACX,aAAa;QACb,kBAAkB;QAClB,aAAa;QACb,QAAQ;KACA,CAAC;IACX,IAAM,aAAa,GAAG;QACpB,mBAAmB;QACnB,aAAa;QACb,iBAAiB;QACjB,kBAAkB;QAClB,iBAAiB;QACjB,aAAa;QACb,QAAQ;KACA,CAAC;IAEX,IAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,UAAU;QAChD,OAAO,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,UAAU,EAAE;YAC5C,GAAG,EAAH;;gBACE,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,0CAAE,KAAK,mCAAI,EAAE,CAAC;aAC/C;YACD,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;KACJ,EAAE,EAA6B,CAAC,CAAC;IAClC,IAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,UAAU;QAClD,OAAO,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,UAAU,EAAE;YAC5C,GAAG,EAAH;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D;QACD,IAAI,MAAM;;YACR,OAAO,MAAA,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,mCAAI,EAAE,CAAC;SAC/D;QACD,IAAI,eAAe;;YACjB,OAAO,MAAA,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,mCAAI,EAAE,CAAC;SACxE;QACD,IAAI,YAAY;;YACd,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,0CAAE,YAAY,mCAAI,CAAC,CAAC;SAChD;QACD,IAAI,eAAe;;YACjB,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,0CAAE,MAAM,mCAAI,KAAK,CAAC;SACjD;QACD,IAAI,MAAM;;YACR,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,0CAAE,IAAI,mCAAI,IAAI,CAAC;SAC3C;QACD,IAAI,iBAAiB;;YACnB,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,0CAAE,iBAAiB,mCAAI,IAAI,CAAC;SACxD;KACF,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"x-plugin.alias.js","sources":["../../../src/plugins/x-plugin.alias.ts"],"sourcesContent":["import { Store } from 'vuex';\nimport { RootXStoreState } from '../store';\nimport { RequestStatus } from '../store/utils/status-store.utils';\nimport {\n XComponentAliasAPI,\n XComponentAliasQueryAPI,\n XComponentAliasStatusAPI\n} from './x-plugin.types';\nimport { getGetterPath } from './x-plugin.utils';\n\n/**\n * Creates an object containing the alias part of {@link XComponentAPI}.\n *\n * @param store - The store from which retrieve the data.\n * @returns An object containing the alias part of the {@link XComponentAPI}.\n * @internal\n */\nexport function getAliasAPI(\n store: Store<{ x: Partial<RootXStoreState['x']> }>\n): XComponentAliasAPI {\n const queryModules = [\n 'searchBox',\n 'nextQueries',\n 'querySuggestions',\n 'relatedTags',\n 'search'\n ] as const;\n const statusModules = [\n 'identifierResults',\n 'nextQueries',\n 'popularSearches',\n 'querySuggestions',\n 'recommendations',\n 'relatedTags',\n 'search'\n ] as const;\n\n const query = queryModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): string {\n return store.state.x[moduleName]?.query ?? '';\n },\n enumerable: true\n });\n }, {} as XComponentAliasQueryAPI);\n const status = statusModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): RequestStatus | undefined {\n return store.state.x[moduleName]?.status;\n },\n enumerable: true\n });\n }, {} as XComponentAliasStatusAPI);\n\n return {\n query,\n status,\n get device() {\n return store.state.x.device?.name ?? null;\n },\n get facets() {\n return store.getters[getGetterPath('facets', 'facets')] ?? {};\n },\n get historyQueries() {\n return store.getters[getGetterPath('historyQueries', 'historyQueries')] ?? [];\n },\n get identifierResults() {\n return store.state.x.identifierResults?.identifierResults ?? [];\n },\n get isEmpathizeOpen() {\n return store.state.x.empathize?.isOpen ?? false;\n },\n get nextQueries() {\n return store.getters[getGetterPath('nextQueries', 'nextQueries')] ?? [];\n },\n get noResults() {\n return !this.totalResults && !!this.query.search && this.status.search === 'success';\n },\n get partialResults() {\n return store.state.x.search?.partialResults ?? [];\n },\n get popularSearches() {\n return store.state.x.popularSearches?.popularSearches ?? [];\n },\n get querySuggestions() {\n return store.state.x.querySuggestions?.suggestions ?? [];\n },\n get recommendations() {\n return store.state.x.recommendations?.recommendations ?? [];\n },\n get redirections() {\n return store.state.x.search?.redirections ?? [];\n },\n get relatedTags() {\n return store.getters[getGetterPath('relatedTags', 'relatedTags')] ?? [];\n },\n get selectedFilters() {\n return store.getters[getGetterPath('facets', 'selectedFilters')] ?? [];\n },\n get selectedRelatedTags() {\n return store.state.x.relatedTags?.selectedRelatedTags ?? [];\n },\n get spellcheckedQuery() {\n return store.state.x.search?.spellcheckedQuery ?? null;\n },\n get totalResults() {\n return store.state.x.search?.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MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,0CAAE,YAAY,mCAAI,EAAE,CAAC;SACjD;QACD,IAAI,WAAW;;YACb,OAAO,MAAA,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,mCAAI,EAAE,CAAC;SACzE;QACD,IAAI,eAAe;;YACjB,OAAO,MAAA,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,mCAAI,EAAE,CAAC;SACxE;QACD,IAAI,mBAAmB;;YACrB,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,0CAAE,mBAAmB,mCAAI,EAAE,CAAC;SAC7D;QACD,IAAI,iBAAiB;;YACnB,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,0CAAE,iBAAiB,mCAAI,IAAI,CAAC;SACxD;QACD,IAAI,YAAY;;YACd,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,0CAAE,YAAY,mCAAI,CAAC,CAAC;SAChD;KACF,CAAC;AACJ;;;;"}
@@ -11,6 +11,7 @@ import '../utils/html.js';
11
11
  import '../utils/normalize.js';
12
12
  import '../utils/number.js';
13
13
  import { forEach } from '../utils/object.js';
14
+ import '../utils/origin.js';
14
15
  import '../utils/sanitize.js';
15
16
  import '../utils/storage.js';
16
17
  import '../utils/string.js';
@@ -1 +1 @@
1
- {"version":3,"file":"x-plugin.js","sources":["../../../src/plugins/x-plugin.ts"],"sourcesContent":["import { SearchAdapter } from '@empathyco/x-adapter';\nimport { deepMerge } from '@empathyco/x-deep-merge';\nimport { PluginObject, VueConstructor } from 'vue';\nimport Vuex, { Module, Store } from 'vuex';\nimport { FILTERS_REGISTRY } from '../filters/filters.registry';\nimport { AnyXStoreModule, RootXStoreState } from '../store/store.types';\nimport { cleanGettersProxyCache } from '../store/utils/getters-proxy.utils';\nimport { RootXStoreModule } from '../store/x.module';\nimport { Dictionary, forEach } from '../utils';\nimport { AnyWire } from '../wiring/wiring.types';\nimport { AnyXModule, XModuleName } from '../x-modules/x-modules.types';\nimport { bus } from './x-bus';\nimport { XBus } from './x-bus.types';\nimport { registerStoreEmitters } from './x-emitters';\nimport { createXComponentAPIMixin } from './x-plugin.mixin';\nimport { AnyXStoreModuleOption, XModuleOptions, XPluginOptions } from './x-plugin.types';\nimport { assertXPluginOptionsAreValid } from './x-plugin.utils';\n\n/**\n * Vue plugin that initializes the properties needed by the x-components, and exposes the events bus\n * and the adapter after it has been installed.\n *\n * @public\n */\nexport class XPlugin implements PluginObject<XPluginOptions> {\n /**\n * {@link @empathyco/x-adapter#SearchAdapter | SearchAdapter} Is the middleware between\n * the components and our API where data can be mapped to client needs.\n * This property is only available after installing the plugin.\n *\n * @returns The installed adapter.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get adapter(): SearchAdapter {\n return this.getInstance().adapter;\n }\n\n /**\n * Exposed {@link XBus}, so any kind of application can subscribe to {@link XEventsTypes}\n * without having to pass through a component.\n * This property is only available after installing the plugin.\n *\n * @returns The installed bus.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get bus(): XBus {\n return this.getInstance().bus;\n }\n\n /**\n * {@link https://vuex.vuejs.org | Vuex Store} Is the place where all shared data\n * is saved.\n *\n * @returns The installed store.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get store(): Store<RootXStoreState> {\n return this.getInstance().store;\n }\n\n /**\n * Safely retrieves the installed instance of the XPlugin.\n *\n * @returns The installed instance of the XPlugin.\n * @throws If this method is called before calling `Vue.use(xPlugin)`.\n * @internal\n */\n protected static getInstance(): XPlugin {\n if (!this.instance) {\n throw Error(\"XPlugin must be installed before accessing it's API.\");\n }\n return this.instance;\n }\n\n /**\n * Record of modules that have been tried to be installed before the installation of the plugin.\n *\n * @internal\n */\n protected static pendingXModules: Partial<Record<XModuleName, AnyXModule>> = {};\n\n /**\n * Instance of the installed plugin. Used to expose the bus and the adapter.\n *\n * @internal\n */\n protected static instance?: XPlugin;\n\n /**\n * Bus for retrieving the observables when registering the wiring.\n *\n * @internal\n */\n protected bus: XBus;\n\n /**\n * Adapter for the API, responsible for transforming requests and responses.\n *\n * @internal\n */\n protected adapter!: SearchAdapter;\n\n /**\n * Set of the already installed {@link XModule | XModules} to avoid re-registering them.\n *\n * @internal\n */\n protected installedXModules = new Set<string>();\n\n /**\n * True if the plugin has been installed in a Vue instance, in this case\n * {@link XModule |Xmodules} will be installed immediately. False otherwise, in this case\n * {@link XModule | XModules} will be installed lazily when the {@link XPlugin#install} method\n * is called.\n *\n * @internal\n */\n protected isInstalled = false;\n\n /**\n * The install options of the plugin, where all the customization of\n * {@link XModule | XModules} is done.\n *\n * @internal\n */\n protected options!: XPluginOptions;\n\n /**\n * The Vuex store, to pass to the wires for its registration, and to register the store\n * modules on it.\n *\n * @internal\n */\n protected store!: Store<any>;\n /**\n * The global Vue, passed by the install method. Used to apply the global mixin\n * {@link createXComponentAPIMixin}, and install the {@link https://vuex.vuejs.org/ | Vuex}\n * plugin.\n *\n * @internal\n */\n protected vue!: VueConstructor;\n\n /**\n * Creates a new instance of the XPlugin with the given bus passed as parameter.\n *\n * @param bus - The {@link XBus} implementation to use for the plugin.\n *\n * @public\n */\n public constructor(bus: XBus) {\n this.bus = bus;\n }\n\n /**\n * If the plugin has already been installed, it immediately registers a {@link XModule}. If it\n * has not been installed yet, it stores the module in a list until the plugin is installed.\n *\n * @param xModule - The module to register.\n *\n * @public\n */\n static registerXModule(xModule: AnyXModule): void {\n if (this.instance) {\n this.instance.registerXModule(xModule);\n } else {\n this.lazyRegisterXModule(xModule);\n }\n }\n\n /**\n * Utility method for resetting the installed instance of the plugin.\n *\n * @remarks Use only for testing.\n *\n * @internal\n */\n static resetInstance(): void {\n cleanGettersProxyCache();\n this.instance = undefined;\n }\n\n /**\n * Stores the {@link XModule} in a dictionary, so it can be registered later in the install\n * process.\n *\n * @param xModule - The module to register.\n *\n * @internal\n */\n protected static lazyRegisterXModule(xModule: AnyXModule): void {\n this.pendingXModules[xModule.name] = xModule;\n }\n\n /**\n * Installs the plugin into the Vue instance.\n *\n * @param vue - The GlobalVue object.\n * @param options - The options to install this plugin with.\n * @throws If the XPlugin has already been installed, or the options are not valid.\n *\n * @internal\n */\n install(vue: VueConstructor, options?: XPluginOptions): void {\n if (this.isInstalled) {\n throw new Error('XPlugin has already been installed');\n }\n assertXPluginOptionsAreValid(options);\n XPlugin.instance = this;\n this.vue = vue;\n this.options = options;\n this.adapter = options.adapter;\n this.createAdapterConfigChangedListener();\n this.registerStore();\n this.applyMixins();\n this.registerFilters();\n this.registerInitialModules();\n this.registerPendingXModules();\n this.isInstalled = true;\n }\n\n /**\n * Performs the registration of a {@link XModule}.\n *\n * @param xModule - The module to register.\n *\n * @internal\n */\n protected registerXModule(xModule: AnyXModule): void {\n if (!this.installedXModules.has(xModule.name)) {\n const customizedXModule = this.customizeXModule(xModule);\n this.registerStoreModule(customizedXModule);\n this.registerWiring(customizedXModule);\n this.registerStoreEmitters(customizedXModule);\n this.installedXModules.add(xModule.name);\n }\n }\n\n /**\n * Performs a customization of a {@link XModule} using the XPlugin public and private options.\n *\n * @param xModule - The module to customize.\n * @returns The customized xModule.\n *\n * @internal\n */\n customizeXModule({\n name,\n wiring,\n storeModule,\n storeEmitters,\n ...restXModule\n }: AnyXModule): AnyXModule {\n const { wiring: wiringOptions, config }: XModuleOptions<XModuleName> =\n this.options.xModules?.[name] ?? {};\n\n const { storeModule: storeModuleOptions, storeEmitters: emittersOptions } =\n this.options.__PRIVATE__xModules?.[name] ?? {};\n\n return {\n name,\n wiring: wiringOptions ? deepMerge({}, wiring, wiringOptions) : wiring,\n storeModule: this.customizeStoreModule(storeModule, storeModuleOptions ?? {}, config),\n storeEmitters: emittersOptions\n ? deepMerge({}, storeEmitters, emittersOptions)\n : storeEmitters,\n ...restXModule\n };\n }\n\n /**\n * Performs the registration of the wiring, retrieving the observable for each event, and\n * executing each wire.\n *\n * @param xModule - The {@link XModule} to register its wiring.\n *\n * @internal\n */\n protected registerWiring({ wiring }: AnyXModule): void {\n forEach(wiring, (event, wires: Dictionary<AnyWire>) => {\n // Obtain the observable\n const observable = this.bus.on(event, true);\n // Register event wires\n forEach(wires, (_, wire) => {\n wire(observable, this.store, this.bus.on.bind(this.bus));\n });\n });\n }\n\n /**\n * Registers a {@link https://vuex.vuejs.org/ | Vuex} store module under the 'x' module.\n *\n * @param xModule - The {@link XModule} to register its Store Module.\n *\n * @internal\n */\n protected registerStoreModule({ name, storeModule }: AnyXModule): void {\n (storeModule as Module<any, any>).namespaced = true;\n this.store.registerModule(['x', name], storeModule);\n }\n\n /**\n * Overrides a {@link https://vuex.vuejs.org/ | Vuex} store module definition.\n *\n * Priority of configuration merging.\n * 1st {@link XPluginOptions.xModules | xModules XPlugin option}.\n * 2nd {@link XPluginOptions.__PRIVATE__xModules | Private xModules XPlugin option}.\n * 3rd {@link XStoreModule.state | Default state of the xModule}.\n *\n * @param defaultModule - The default store module to override.\n * @param moduleOptions - The state, actions, mutations and getters to override the defaultModule.\n * @param configOptions - The state config to override the moduleOptions.\n * @returns The {@link XStoreModule} customized.\n *\n * @internal\n */\n protected customizeStoreModule(\n { state: defaultState, ...actionsGettersMutations }: AnyXStoreModule,\n { state: xModuleState, ...newActionsGettersMutations }: AnyXStoreModuleOption,\n configOptions: unknown\n ): AnyXStoreModule {\n const configOptionsObject = configOptions ? { config: configOptions } : {};\n const customizedModule = deepMerge({}, actionsGettersMutations, newActionsGettersMutations);\n customizedModule.state = deepMerge(defaultState(), xModuleState, configOptionsObject);\n return customizedModule;\n }\n\n /**\n * Registers the store emitters, making them emit the event when the part of the state selected\n * changes.\n *\n * @param xModule - The {@link XModule} to register its Store Emitters.\n *\n * @internal\n */\n protected registerStoreEmitters(xModule: AnyXModule): void {\n registerStoreEmitters(xModule, this.bus, this.store);\n }\n\n /**\n * Registers the {@link https://vuex.vuejs.org/ | Vuex} store. If the store has not been passed\n * through the {@link XPluginOptions} object, it creates one, and injects it in the Vue\n * prototype. Then it register an x module in the store, to safe scope all the\n * {@link XModule | XModules} dynamically installed.\n *\n * @internal\n */\n protected registerStore(): void {\n this.vue.use(Vuex); // We can safely install Vuex because if it is already installed Vue\n // will simply ignore it\n this.store =\n this.options.store ??\n new Store({\n strict: process.env.NODE_ENV !== 'production'\n });\n if (!this.options.store) {\n this.vue.prototype.$store = this.store;\n }\n this.store.registerModule('x', RootXStoreModule);\n }\n\n /**\n * Applies the {@link createXComponentAPIMixin} mixin in the global Vue.\n *\n * @internal\n */\n protected applyMixins(): void {\n this.vue.mixin(createXComponentAPIMixin(this.bus));\n }\n\n /**\n * Registers the initial {@link XModule | XModules} during the {@link XPlugin} installation.\n *\n * @internal\n */\n protected registerInitialModules(): void {\n this.options.initialXModules?.forEach(xModule => {\n this.registerXModule(xModule);\n });\n }\n\n /**\n * Registers the pending {@link XModule | XModules}, that requested to be registered before the\n * installation of the plugin.\n *\n * @internal\n */\n protected registerPendingXModules(): void {\n forEach(XPlugin.pendingXModules, (_, xModule) => {\n this.registerXModule(xModule);\n });\n XPlugin.pendingXModules = {};\n }\n\n /**\n * If the received adapter supports it, it registers a listener to emit the\n * {@link XEventsTypes.AdapterConfigChanged} event whenever the config of it changes.\n *\n * @internal\n */\n protected createAdapterConfigChangedListener(): void {\n this.options.adapter.addConfigChangedListener?.(newAdapterConfig => {\n this.bus.emit('AdapterConfigChanged', newAdapterConfig);\n });\n }\n\n /**\n * Registers filters globally.\n *\n * @internal\n */\n protected registerFilters(): void {\n forEach(FILTERS_REGISTRY, (filterName, filterFunction) =>\n this.vue.filter(filterName, filterFunction)\n );\n }\n}\n\n/**\n * Vue plugin that modifies each component instance, extending them with the\n * {@link XComponentAPI | X Component API }.\n *\n * @example\n * Minimal installation example. A search adapter is needed for the plugin to work, and connect to\n * the API.\n * ```typescript\n * const adapter = new EmpathyAdapterBuilder()\n * .withConfiguration({instance: 'my-instance-id'})\n * .build();\n * Vue.use(xPlugin, { adapter });\n * ```\n *\n * @example\n * If you are using {@link https://vuex.vuejs.org/ | Vuex} in your project you must install its\n * plugin, and instantiate an store before installing the XPlugin:\n * ```typescript\n * Vue.use(Vuex);\n * const store = new Store({ ... });\n * Vue.use(xPlugin, { adapter, store });\n * ```\n * @public\n */\nexport const xPlugin = new XPlugin(bus);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;;;IAuIE,iBAAmB,GAAS;;;;;;QA3ClB,sBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;;;;;;;;;QAUtC,gBAAW,GAAG,KAAK,CAAC;QAkC5B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;KAChB;IAzHD,sBAAkB,kBAAO;;;;;;;;;;aAAzB;YACE,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC;SACnC;;;OAAA;IAWD,sBAAkB,cAAG;;;;;;;;;;aAArB;YACE,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC;SAC/B;;;OAAA;IAUD,sBAAkB,gBAAK;;;;;;;;;aAAvB;YACE,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC;SACjC;;;OAAA;;;;;;;;IASgB,mBAAW,GAA5B;QACE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,MAAM,KAAK,CAAC,sDAAsD,CAAC,CAAC;SACrE;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;;;;;;;;;IA0FM,uBAAe,GAAtB,UAAuB,OAAmB;QACxC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SACxC;aAAM;YACL,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;SACnC;KACF;;;;;;;;I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C;CA3YD,IA2YC;AAED;;;;;;;;;;;;;;;;;;;;;;;;IAwBa,OAAO,GAAG,IAAI,OAAO,CAAC,GAAG;;;;"}
1
+ {"version":3,"file":"x-plugin.js","sources":["../../../src/plugins/x-plugin.ts"],"sourcesContent":["import { SearchAdapter } from '@empathyco/x-adapter';\nimport { deepMerge } from '@empathyco/x-deep-merge';\nimport { PluginObject, VueConstructor } from 'vue';\nimport Vuex, { Module, Store } from 'vuex';\nimport { FILTERS_REGISTRY } from '../filters/filters.registry';\nimport { AnyXStoreModule, RootXStoreState } from '../store/store.types';\nimport { cleanGettersProxyCache } from '../store/utils/getters-proxy.utils';\nimport { RootXStoreModule } from '../store/x.module';\nimport { Dictionary, forEach } from '../utils';\nimport { AnyWire } from '../wiring/wiring.types';\nimport { AnyXModule, XModuleName } from '../x-modules/x-modules.types';\nimport { bus } from './x-bus';\nimport { XBus } from './x-bus.types';\nimport { registerStoreEmitters } from './x-emitters';\nimport { createXComponentAPIMixin } from './x-plugin.mixin';\nimport { AnyXStoreModuleOption, XModuleOptions, XPluginOptions } from './x-plugin.types';\nimport { assertXPluginOptionsAreValid } from './x-plugin.utils';\n\n/**\n * Vue plugin that initializes the properties needed by the x-components, and exposes the events bus\n * and the adapter after it has been installed.\n *\n * @public\n */\nexport class XPlugin implements PluginObject<XPluginOptions> {\n /**\n * {@link @empathyco/x-adapter#SearchAdapter | SearchAdapter} Is the middleware between\n * the components and our API where data can be mapped to client needs.\n * This property is only available after installing the plugin.\n *\n * @returns The installed adapter.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get adapter(): SearchAdapter {\n return this.getInstance().adapter;\n }\n\n /**\n * Exposed {@link XBus}, so any kind of application can subscribe to {@link XEventsTypes}\n * without having to pass through a component.\n * This property is only available after installing the plugin.\n *\n * @returns The installed bus.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get bus(): XBus {\n return this.getInstance().bus;\n }\n\n /**\n * {@link https://vuex.vuejs.org | Vuex Store} Is the place where all shared data\n * is saved.\n *\n * @returns The installed store.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get store(): Store<RootXStoreState> {\n return this.getInstance().store;\n }\n\n /**\n * Safely retrieves the installed instance of the XPlugin.\n *\n * @returns The installed instance of the XPlugin.\n * @throws If this method is called before calling `Vue.use(xPlugin)`.\n * @internal\n */\n protected static getInstance(): XPlugin {\n if (!this.instance) {\n throw Error(\"XPlugin must be installed before accessing it's API.\");\n }\n return this.instance;\n }\n\n /**\n * Record of modules that have been tried to be installed before the installation of the plugin.\n *\n * @internal\n */\n protected static pendingXModules: Partial<Record<XModuleName, AnyXModule>> = {};\n\n /**\n * Instance of the installed plugin. Used to expose the bus and the adapter.\n *\n * @internal\n */\n protected static instance?: XPlugin;\n\n /**\n * Bus for retrieving the observables when registering the wiring.\n *\n * @internal\n */\n protected bus: XBus;\n\n /**\n * Adapter for the API, responsible for transforming requests and responses.\n *\n * @internal\n */\n protected adapter!: SearchAdapter;\n\n /**\n * Set of the already installed {@link XModule | XModules} to avoid re-registering them.\n *\n * @internal\n */\n protected installedXModules = new Set<string>();\n\n /**\n * True if the plugin has been installed in a Vue instance, in this case\n * {@link XModule |Xmodules} will be installed immediately. False otherwise, in this case\n * {@link XModule | XModules} will be installed lazily when the {@link XPlugin#install} method\n * is called.\n *\n * @internal\n */\n protected isInstalled = false;\n\n /**\n * The install options of the plugin, where all the customization of\n * {@link XModule | XModules} is done.\n *\n * @internal\n */\n protected options!: XPluginOptions;\n\n /**\n * The Vuex store, to pass to the wires for its registration, and to register the store\n * modules on it.\n *\n * @internal\n */\n protected store!: Store<any>;\n /**\n * The global Vue, passed by the install method. Used to apply the global mixin\n * {@link createXComponentAPIMixin}, and install the {@link https://vuex.vuejs.org/ | Vuex}\n * plugin.\n *\n * @internal\n */\n protected vue!: VueConstructor;\n\n /**\n * Creates a new instance of the XPlugin with the given bus passed as parameter.\n *\n * @param bus - The {@link XBus} implementation to use for the plugin.\n *\n * @public\n */\n public constructor(bus: XBus) {\n this.bus = bus;\n }\n\n /**\n * If the plugin has already been installed, it immediately registers a {@link XModule}. If it\n * has not been installed yet, it stores the module in a list until the plugin is installed.\n *\n * @param xModule - The module to register.\n *\n * @public\n */\n static registerXModule(xModule: AnyXModule): void {\n if (this.instance) {\n this.instance.registerXModule(xModule);\n } else {\n this.lazyRegisterXModule(xModule);\n }\n }\n\n /**\n * Utility method for resetting the installed instance of the plugin.\n *\n * @remarks Use only for testing.\n *\n * @internal\n */\n static resetInstance(): void {\n cleanGettersProxyCache();\n this.instance = undefined;\n }\n\n /**\n * Stores the {@link XModule} in a dictionary, so it can be registered later in the install\n * process.\n *\n * @param xModule - The module to register.\n *\n * @internal\n */\n protected static lazyRegisterXModule(xModule: AnyXModule): void {\n this.pendingXModules[xModule.name] = xModule;\n }\n\n /**\n * Installs the plugin into the Vue instance.\n *\n * @param vue - The GlobalVue object.\n * @param options - The options to install this plugin with.\n * @throws If the XPlugin has already been installed, or the options are not valid.\n *\n * @internal\n */\n install(vue: VueConstructor, options?: XPluginOptions): void {\n if (this.isInstalled) {\n throw new Error('XPlugin has already been installed');\n }\n assertXPluginOptionsAreValid(options);\n XPlugin.instance = this;\n this.vue = vue;\n this.options = options;\n this.adapter = options.adapter;\n this.createAdapterConfigChangedListener();\n this.registerStore();\n this.applyMixins();\n this.registerFilters();\n this.registerInitialModules();\n this.registerPendingXModules();\n this.isInstalled = true;\n }\n\n /**\n * Performs the registration of a {@link XModule}.\n *\n * @param xModule - The module to register.\n *\n * @internal\n */\n protected registerXModule(xModule: AnyXModule): void {\n if (!this.installedXModules.has(xModule.name)) {\n const customizedXModule = this.customizeXModule(xModule);\n this.registerStoreModule(customizedXModule);\n this.registerWiring(customizedXModule);\n this.registerStoreEmitters(customizedXModule);\n this.installedXModules.add(xModule.name);\n }\n }\n\n /**\n * Performs a customization of a {@link XModule} using the XPlugin public and private options.\n *\n * @param xModule - The module to customize.\n * @returns The customized xModule.\n *\n * @internal\n */\n protected customizeXModule({\n name,\n wiring,\n storeModule,\n storeEmitters,\n ...restXModule\n }: AnyXModule): AnyXModule {\n const { wiring: wiringOptions, config }: XModuleOptions<XModuleName> =\n this.options.xModules?.[name] ?? {};\n\n const { storeModule: storeModuleOptions, storeEmitters: emittersOptions } =\n this.options.__PRIVATE__xModules?.[name] ?? {};\n\n return {\n name,\n wiring: wiringOptions ? deepMerge({}, wiring, wiringOptions) : wiring,\n storeModule: this.customizeStoreModule(storeModule, storeModuleOptions ?? {}, config),\n storeEmitters: emittersOptions\n ? deepMerge({}, storeEmitters, emittersOptions)\n : storeEmitters,\n ...restXModule\n };\n }\n\n /**\n * Performs the registration of the wiring, retrieving the observable for each event, and\n * executing each wire.\n *\n * @param xModule - The {@link XModule} to register its wiring.\n *\n * @internal\n */\n protected registerWiring({ wiring }: AnyXModule): void {\n forEach(wiring, (event, wires: Dictionary<AnyWire>) => {\n // Obtain the observable\n const observable = this.bus.on(event, true);\n // Register event wires\n forEach(wires, (_, wire) => {\n wire(observable, this.store, this.bus.on.bind(this.bus));\n });\n });\n }\n\n /**\n * Registers a {@link https://vuex.vuejs.org/ | Vuex} store module under the 'x' module.\n *\n * @param xModule - The {@link XModule} to register its Store Module.\n *\n * @internal\n */\n protected registerStoreModule({ name, storeModule }: AnyXModule): void {\n (storeModule as Module<any, any>).namespaced = true;\n this.store.registerModule(['x', name], storeModule);\n }\n\n /**\n * Overrides a {@link https://vuex.vuejs.org/ | Vuex} store module definition.\n *\n * Priority of configuration merging.\n * 1st {@link XPluginOptions.xModules | xModules XPlugin option}.\n * 2nd {@link XPluginOptions.__PRIVATE__xModules | Private xModules XPlugin option}.\n * 3rd {@link XStoreModule.state | Default state of the xModule}.\n *\n * @param defaultModule - The default store module to override.\n * @param moduleOptions - The state, actions, mutations and getters to override the defaultModule.\n * @param configOptions - The state config to override the moduleOptions.\n * @returns The {@link XStoreModule} customized.\n *\n * @internal\n */\n protected customizeStoreModule(\n { state: defaultState, ...actionsGettersMutations }: AnyXStoreModule,\n { state: xModuleState, ...newActionsGettersMutations }: AnyXStoreModuleOption,\n configOptions: unknown\n ): AnyXStoreModule {\n const configOptionsObject = configOptions ? { config: configOptions } : {};\n const customizedModule = deepMerge({}, actionsGettersMutations, newActionsGettersMutations);\n customizedModule.state = deepMerge(defaultState(), xModuleState, configOptionsObject);\n return customizedModule;\n }\n\n /**\n * Registers the store emitters, making them emit the event when the part of the state selected\n * changes.\n *\n * @param xModule - The {@link XModule} to register its Store Emitters.\n *\n * @internal\n */\n protected registerStoreEmitters(xModule: AnyXModule): void {\n registerStoreEmitters(xModule, this.bus, this.store);\n }\n\n /**\n * Registers the {@link https://vuex.vuejs.org/ | Vuex} store. If the store has not been passed\n * through the {@link XPluginOptions} object, it creates one, and injects it in the Vue\n * prototype. Then it register an x module in the store, to safe scope all the\n * {@link XModule | XModules} dynamically installed.\n *\n * @internal\n */\n protected registerStore(): void {\n this.vue.use(Vuex); // We can safely install Vuex because if it is already installed Vue\n // will simply ignore it\n this.store =\n this.options.store ??\n new Store({\n strict: process.env.NODE_ENV !== 'production'\n });\n if (!this.options.store) {\n this.vue.prototype.$store = this.store;\n }\n this.store.registerModule('x', RootXStoreModule);\n }\n\n /**\n * Applies the {@link createXComponentAPIMixin} mixin in the global Vue.\n *\n * @internal\n */\n protected applyMixins(): void {\n this.vue.mixin(createXComponentAPIMixin(this.bus));\n }\n\n /**\n * Registers the initial {@link XModule | XModules} during the {@link XPlugin} installation.\n *\n * @internal\n */\n protected registerInitialModules(): void {\n this.options.initialXModules?.forEach(xModule => {\n this.registerXModule(xModule);\n });\n }\n\n /**\n * Registers the pending {@link XModule | XModules}, that requested to be registered before the\n * installation of the plugin.\n *\n * @internal\n */\n protected registerPendingXModules(): void {\n forEach(XPlugin.pendingXModules, (_, xModule) => {\n this.registerXModule(xModule);\n });\n XPlugin.pendingXModules = {};\n }\n\n /**\n * If the received adapter supports it, it registers a listener to emit the\n * {@link XEventsTypes.AdapterConfigChanged} event whenever the config of it changes.\n *\n * @internal\n */\n protected createAdapterConfigChangedListener(): void {\n this.options.adapter.addConfigChangedListener?.(newAdapterConfig => {\n this.bus.emit('AdapterConfigChanged', newAdapterConfig);\n });\n }\n\n /**\n * Registers filters globally.\n *\n * @internal\n */\n protected registerFilters(): void {\n forEach(FILTERS_REGISTRY, (filterName, filterFunction) =>\n this.vue.filter(filterName, filterFunction)\n );\n }\n}\n\n/**\n * Vue plugin that modifies each component instance, extending them with the\n * {@link XComponentAPI | X Component API }.\n *\n * @example\n * Minimal installation example. A search adapter is needed for the plugin to work, and connect to\n * the API.\n * ```typescript\n * const adapter = new EmpathyAdapterBuilder()\n * .withConfiguration({instance: 'my-instance-id'})\n * .build();\n * Vue.use(xPlugin, { adapter });\n * ```\n *\n * @example\n * If you are using {@link https://vuex.vuejs.org/ | Vuex} in your project you must install its\n * plugin, and instantiate an store before installing the XPlugin:\n * ```typescript\n * Vue.use(Vuex);\n * const store = new Store({ ... });\n * Vue.use(xPlugin, { adapter, store });\n * ```\n * @public\n */\nexport const xPlugin = new XPlugin(bus);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;;;IAuIE,iBAAmB,GAAS;;;;;;QA3ClB,sBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;;;;;;;;;QAUtC,gBAAW,GAAG,KAAK,CAAC;QAkC5B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;KAChB;IAzHD,sBAAkB,kBAAO;;;;;;;;;;aAAzB;YACE,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC;SACnC;;;OAAA;IAWD,sBAAkB,cAAG;;;;;;;;;;aAArB;YACE,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC;SAC/B;;;OAAA;IAUD,sBAAkB,gBAAK;;;;;;;;;aAAvB;YACE,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC;SACjC;;;O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AC,OAAO,EAAC,wBAAwB,mDAAG,UAAA,gBAAgB;YAC9D,KAAI,CAAC,GAAG,CAAC,IAAI,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,CAAC;SACzD,CAAC,CAAC;KACJ;;;;;;IAOS,iCAAe,GAAzB;QAAA,iBAIC;QAHC,OAAO,CAAC,gBAAgB,EAAE,UAAC,UAAU,EAAE,cAAc;YACnD,OAAA,KAAI,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC;SAAA,CAC5C,CAAC;KACH;;;;;;IAhVgB,uBAAe,GAA6C,EAAE,CAAC;IAiVlF,cAAC;CA3YD,IA2YC;AAED;;;;;;;;;;;;;;;;;;;;;;;;IAwBa,OAAO,GAAG,IAAI,OAAO,CAAC,GAAG;;;;"}
@@ -14,8 +14,8 @@ import { getAliasAPI } from './x-plugin.alias.js';
14
14
  */
15
15
  var createXComponentAPIMixin = function (bus) { return ({
16
16
  inject: {
17
- $origin: {
18
- from: 'origin',
17
+ $location: {
18
+ from: 'location',
19
19
  default: undefined
20
20
  }
21
21
  },
@@ -38,15 +38,25 @@ var createXComponentAPIMixin = function (bus) { return ({
38
38
  function getBusAPI(bus, component) {
39
39
  return {
40
40
  emit: function (event, payload, metadata) {
41
+ var _a;
41
42
  if (metadata === void 0) { metadata = {}; }
42
- var xComponent = component.xComponent;
43
- var moduleName = xComponent ? getXComponentXModuleName(xComponent) : null;
44
- bus.emit(event, payload, __assign({ moduleName: moduleName, origin: component.$origin }, metadata));
45
- xComponent === null || xComponent === void 0 ? void 0 : xComponent.$emit(event, payload);
43
+ bus.emit(event, payload, createWireMetadata(component, metadata));
44
+ (_a = component.xComponent) === null || _a === void 0 ? void 0 : _a.$emit(event, payload);
46
45
  },
47
46
  on: bus.on.bind(bus)
48
47
  };
49
48
  }
49
+ /**
50
+ * Creates a wire metadata object based on the component and the provided metadata.
51
+ *
52
+ * @param component - The component this metadata belongs to.
53
+ * @param metadata - Additional metadata emitted by the component.
54
+ * @returns A {@link WireMetadata} object.
55
+ * @internal
56
+ */
57
+ function createWireMetadata(component, metadata) {
58
+ return __assign({ moduleName: getXComponentXModuleName(component.xComponent), location: component.$location }, metadata);
59
+ }
50
60
  /**
51
61
  * Given a component, finds the root XComponent in the ancestors hierarchy.
52
62
  *