@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
@@ -1 +1 @@
1
- {"version":3,"file":"x-plugin.mixin.js","sources":["../../../src/plugins/x-plugin.mixin.ts"],"sourcesContent":["import Vue, { ComponentOptions } from 'vue';\nimport { XComponent } from '../components/x-component.types';\nimport { getXComponentXModuleName, isXComponent } from '../components/x-component.utils';\nimport { XEvent, XEventPayload } from '../wiring/events.types';\nimport { WireMetadata } from '../wiring/wiring.types';\nimport { QueryOrigin } from '../types/query-origin';\nimport { XBus } from './x-bus.types';\nimport { getAliasAPI } from './x-plugin.alias';\nimport { XComponentAPI, XComponentBusAPI } from './x-plugin.types';\n\ndeclare module 'vue/types/vue' {\n export interface Vue {\n $x: XComponentAPI;\n }\n}\n\ninterface PrivateExtendedVueComponent extends Vue {\n xComponent: XComponent | undefined;\n $origin: QueryOrigin;\n}\n\n/**\n * Vue global mixin that adds a `$x` object to every component with the {@link XComponentAPI}.\n *\n * @remarks It adds an injection property `origin` which value is included in the metadata of each\n * event emitted with `$x.emit`.\n *\n * @param bus - The {@link XBus} to use inside the components for emitting events.\n * @returns Mixin options which registers the component as X-Component and the $x.\n * @internal\n */\nexport const createXComponentAPIMixin = (\n bus: XBus\n): ComponentOptions<Vue> & ThisType<PrivateExtendedVueComponent> => ({\n inject: {\n $origin: {\n from: 'origin',\n default: undefined\n }\n },\n created(): void {\n this.xComponent = getRootXComponent(this);\n const aliasAPI = getAliasAPI(this.$store);\n const busAPI = getBusAPI(bus, this);\n this.$x = Object.assign(aliasAPI, busAPI);\n }\n});\n\n/**\n * Creates an object containing the API related to the {@link XBus}.\n *\n * @param bus - The global {@link XBus}.\n * @param component - The component instance.\n *\n * @returns An object containing the {@link XComponentBusAPI}.\n * @internal\n */\nexport function getBusAPI(bus: XBus, component: PrivateExtendedVueComponent): XComponentBusAPI {\n return {\n emit: <Event extends XEvent>(\n event: Event,\n payload?: XEventPayload<Event>,\n metadata: Omit<WireMetadata, 'moduleName'> = {}\n ) => {\n const xComponent = component.xComponent;\n const moduleName = xComponent ? getXComponentXModuleName(xComponent) : null;\n bus.emit(event, payload as any, { moduleName, origin: component.$origin, ...metadata });\n xComponent?.$emit(event, payload);\n },\n on: bus.on.bind(bus)\n };\n}\n\n/**\n * Given a component, finds the root XComponent in the ancestors hierarchy.\n *\n * @param component - The component to find its root XComponent.\n * @returns The root XComponent or undefined if it has not.\n * @public\n */\nexport function getRootXComponent(component: Vue): XComponent | undefined {\n let xComponent: XComponent | undefined;\n while (component !== undefined && component !== null) {\n if (isXComponent(component)) {\n xComponent = component;\n }\n component = component.$parent;\n }\n return xComponent;\n}\n"],"names":[],"mappings":";;;;AAqBA;;;;;;;;;;IAUa,wBAAwB,GAAG,UACtC,GAAS,IACyD,QAAC;IACnE,MAAM,EAAE;QACN,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,SAAS;SACnB;KACF;IACD,OAAO,EAAP;QACE,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAM,MAAM,GAAG,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;KAC3C;CACF,KAAE;AAEH;;;;;;;;;SASgB,SAAS,CAAC,GAAS,EAAE,SAAsC;IACzE,OAAO;QACL,IAAI,EAAE,UACJ,KAAY,EACZ,OAA8B,EAC9B,QAA+C;YAA/C,yBAAA,EAAA,aAA+C;YAE/C,IAAM,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;YACxC,IAAM,UAAU,GAAG,UAAU,GAAG,wBAAwB,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;YAC5E,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,OAAc,aAAI,UAAU,YAAA,EAAE,MAAM,EAAE,SAAS,CAAC,OAAO,IAAK,QAAQ,EAAG,CAAC;YACxF,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;SACnC;QACD,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC;KACrB,CAAC;AACJ,CAAC;AAED;;;;;;;SAOgB,iBAAiB,CAAC,SAAc;IAC9C,IAAI,UAAkC,CAAC;IACvC,OAAO,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,EAAE;QACpD,IAAI,YAAY,CAAC,SAAS,CAAC,EAAE;YAC3B,UAAU,GAAG,SAAS,CAAC;SACxB;QACD,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC;KAC/B;IACD,OAAO,UAAU,CAAC;AACpB;;;;"}
1
+ {"version":3,"file":"x-plugin.mixin.js","sources":["../../../src/plugins/x-plugin.mixin.ts"],"sourcesContent":["import Vue, { ComponentOptions } from 'vue';\nimport { XComponent } from '../components/x-component.types';\nimport { getXComponentXModuleName, isXComponent } from '../components/x-component.utils';\nimport { XEvent, XEventPayload } from '../wiring/events.types';\nimport { WireMetadata } from '../wiring/wiring.types';\nimport { FeatureLocation } from '../types/origin';\nimport { XBus } from './x-bus.types';\nimport { getAliasAPI } from './x-plugin.alias';\nimport { XComponentAPI, XComponentBusAPI } from './x-plugin.types';\n\ndeclare module 'vue/types/vue' {\n export interface Vue {\n $x: XComponentAPI;\n }\n}\n\ninterface PrivateExtendedVueComponent extends Vue {\n $location?: FeatureLocation;\n xComponent: XComponent | undefined;\n}\n\n/**\n * Vue global mixin that adds a `$x` object to every component with the {@link XComponentAPI}.\n *\n * @remarks It adds an injection property `origin` which value is included in the metadata of each\n * event emitted with `$x.emit`.\n *\n * @param bus - The {@link XBus} to use inside the components for emitting events.\n * @returns Mixin options which registers the component as X-Component and the $x.\n * @internal\n */\nexport const createXComponentAPIMixin = (\n bus: XBus\n): ComponentOptions<Vue> & ThisType<PrivateExtendedVueComponent> => ({\n inject: {\n $location: {\n from: 'location',\n default: undefined\n }\n },\n created(): void {\n this.xComponent = getRootXComponent(this);\n const aliasAPI = getAliasAPI(this.$store);\n const busAPI = getBusAPI(bus, this);\n this.$x = Object.assign(aliasAPI, busAPI);\n }\n});\n\n/**\n * Creates an object containing the API related to the {@link XBus}.\n *\n * @param bus - The global {@link XBus}.\n * @param component - The component instance.\n *\n * @returns An object containing the {@link XComponentBusAPI}.\n * @internal\n */\nexport function getBusAPI(bus: XBus, component: PrivateExtendedVueComponent): XComponentBusAPI {\n return {\n emit: <Event extends XEvent>(\n event: Event,\n payload?: XEventPayload<Event>,\n metadata: Omit<WireMetadata, 'moduleName'> = {}\n ) => {\n bus.emit(event, payload as any, createWireMetadata(component, metadata));\n component.xComponent?.$emit(event, payload);\n },\n on: bus.on.bind(bus)\n };\n}\n\n/**\n * Creates a wire metadata object based on the component and the provided metadata.\n *\n * @param component - The component this metadata belongs to.\n * @param metadata - Additional metadata emitted by the component.\n * @returns A {@link WireMetadata} object.\n * @internal\n */\nfunction createWireMetadata(\n component: PrivateExtendedVueComponent,\n metadata: Partial<WireMetadata>\n): WireMetadata {\n return {\n moduleName: getXComponentXModuleName(component.xComponent),\n location: component.$location,\n ...metadata\n };\n}\n\n/**\n * Given a component, finds the root XComponent in the ancestors hierarchy.\n *\n * @param component - The component to find its root XComponent.\n * @returns The root XComponent or undefined if it has not.\n * @public\n */\nexport function getRootXComponent(component: Vue): XComponent | undefined {\n let xComponent: XComponent | undefined;\n while (component !== undefined && component !== null) {\n if (isXComponent(component)) {\n xComponent = component;\n }\n component = component.$parent;\n }\n return xComponent;\n}\n"],"names":[],"mappings":";;;;AAqBA;;;;;;;;;;IAUa,wBAAwB,GAAG,UACtC,GAAS,IACyD,QAAC;IACnE,MAAM,EAAE;QACN,SAAS,EAAE;YACT,IAAI,EAAE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;KAC/B;IACD,OAAO,UAAU,CAAC;AACpB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"status-store.utils.js","sources":["../../../../src/store/utils/status-store.utils.ts"],"sourcesContent":["/**\n * Status state type, containing a property to hold the status property.\n *\n * @public\n */\nexport interface StatusState {\n /** The request status. Useful for changing the displayed component depending on whether the\n * request has succeeded, has not been fulfilled or has failed. */\n status: RequestStatus;\n}\n\n/**\n * Status mutations, containing a method to change the current status.\n *\n * @public\n */\nexport interface StatusMutations {\n /**\n * Sets the request status.\n *\n * @param status - The new request status.\n */\n setStatus(status: RequestStatus): void;\n}\n\n/**\n * The possible status of a request:\n * - Success: The request has resolved successfully.\n * - Loading: The request is in process, waiting for a response.\n * - Error: The request has failed.\n *\n * @public\n */\nexport type RequestStatus = 'success' | 'loading' | 'error';\n\n/**\n * Sets the request status. Can be used as a mutation.\n *\n * @param state - The {@link https://vuex.vuejs.org/guide/state.html | state} provided by Vuex.\n * @param status - The new request status.\n * @public\n */\nexport function setStatus(state: StatusState, status: RequestStatus): void {\n state.status = status;\n}\n"],"names":[],"mappings":"AAmCA;;;;;;;SAOgB,SAAS,CAAC,KAAkB,EAAE,MAAqB;IACjE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AACxB;;;;"}
1
+ {"version":3,"file":"status-store.utils.js","sources":["../../../../src/store/utils/status-store.utils.ts"],"sourcesContent":["/**\n * Status state type, containing a property to hold the status property.\n *\n * @public\n */\nexport interface StatusState {\n /** The request status. Useful for changing the displayed component depending on whether the\n * request has succeeded, has not been fulfilled or has failed. */\n status: RequestStatus;\n}\n\n/**\n * Status mutations, containing a method to change the current status.\n *\n * @public\n */\nexport interface StatusMutations {\n /**\n * Sets the request status.\n *\n * @param status - The new request status.\n */\n setStatus(status: RequestStatus): void;\n}\n\n/**\n * The possible status of a request:\n * - Success: The request has resolved successfully.\n * - Loading: The request is in process, waiting for a response.\n * - Error: The request has failed.\n *\n * @public\n */\nexport type RequestStatus = 'success' | 'loading' | 'error' | 'initial';\n\n/**\n * Sets the request status. Can be used as a mutation.\n *\n * @param state - The {@link https://vuex.vuejs.org/guide/state.html | state} provided by Vuex.\n * @param status - The new request status.\n * @public\n */\nexport function setStatus(state: StatusState, status: RequestStatus): void {\n state.status = status;\n}\n"],"names":[],"mappings":"AAmCA;;;;;;;SAOgB,SAAS,CAAC,KAAkB,EAAE,MAAqB;IACjE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AACxB;;;;"}
@@ -8,19 +8,20 @@ var RootXStoreModule = {
8
8
  state: function () { return ({
9
9
  device: null,
10
10
  empathize: null,
11
+ extraParams: null,
12
+ facets: null,
13
+ historyQueries: null,
14
+ identifierResults: null,
11
15
  nextQueries: null,
12
16
  popularSearches: null,
13
- searchBox: null,
14
17
  querySuggestions: null,
15
- historyQueries: null,
16
18
  recommendations: null,
17
19
  relatedTags: null,
18
- identifierResults: null,
20
+ scroll: null,
19
21
  search: null,
20
- facets: null,
22
+ searchBox: null,
21
23
  tagging: null,
22
- url: null,
23
- extraParams: null
24
+ url: null
24
25
  }); },
25
26
  namespaced: true
26
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"x.module.js","sources":["../../../src/store/x.module.ts"],"sourcesContent":["import { Module } from 'vuex';\nimport { RootXStoreState } from './store.types';\n\n/**\n * The type of the x module state has a property for each other sub-module assigned to `null`,\n * so we can avoid re-executing getters every time\n * the `store.registerModule` method is called.\n *\n * @internal\n */\nexport type XModuleState = { [Key in keyof RootXStoreState['x']]: null };\n\n/**\n * The main module of the X Store. All of the other {@link XModule | XModules} will be\n * registered as a sub-module of this one.\n *\n * @internal\n */\nexport const RootXStoreModule: Module<XModuleState, any> = {\n state: () => ({\n device: null,\n empathize: null,\n nextQueries: null,\n popularSearches: null,\n searchBox: null,\n querySuggestions: null,\n historyQueries: null,\n recommendations: null,\n relatedTags: null,\n identifierResults: null,\n search: null,\n facets: null,\n tagging: null,\n url: null,\n extraParams: null\n }),\n namespaced: true\n};\n"],"names":[],"mappings":"AAYA;;;;;;IAMa,gBAAgB,GAA8B;IACzD,KAAK,EAAE,cAAM,QAAC;QACZ,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;QACjB,eAAe,EAAE,IAAI;QACrB,SAAS,EAAE,IAAI;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,IAAI;QACpB,eAAe,EAAE,IAAI;QACrB,WAAW,EAAE,IAAI;QACjB,iBAAiB,EAAE,IAAI;QACvB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,GAAG,EAAE,IAAI;QACT,WAAW,EAAE,IAAI;KAClB,IAAC;IACF,UAAU,EAAE,IAAI;;;;;"}
1
+ {"version":3,"file":"x.module.js","sources":["../../../src/store/x.module.ts"],"sourcesContent":["import { Module } from 'vuex';\nimport { RootXStoreState } from './store.types';\n\n/**\n * The type of the x module state has a property for each other sub-module assigned to `null`,\n * so we can avoid re-executing getters every time\n * the `store.registerModule` method is called.\n *\n * @internal\n */\nexport type XModuleState = { [Key in keyof RootXStoreState['x']]: null };\n\n/**\n * The main module of the X Store. All of the other {@link XModule | XModules} will be\n * registered as a sub-module of this one.\n *\n * @internal\n */\nexport const RootXStoreModule: Module<XModuleState, any> = {\n state: () => ({\n device: null,\n empathize: null,\n extraParams: null,\n facets: null,\n historyQueries: null,\n identifierResults: null,\n nextQueries: null,\n popularSearches: null,\n querySuggestions: null,\n recommendations: null,\n relatedTags: null,\n scroll: null,\n search: null,\n searchBox: null,\n tagging: null,\n url: null\n }),\n namespaced: true\n};\n"],"names":[],"mappings":"AAYA;;;;;;IAMa,gBAAgB,GAA8B;IACzD,KAAK,EAAE,cAAM,QAAC;QACZ,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,IAAI;QACZ,cAAc,EAAE,IAAI;QACpB,iBAAiB,EAAE,IAAI;QACvB,WAAW,EAAE,IAAI;QACjB,eAAe,EAAE,IAAI;QACrB,gBAAgB,EAAE,IAAI;QACtB,eAAe,EAAE,IAAI;QACrB,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;QACb,GAAG,EAAE,IAAI;KACV,IAAC;IACF,UAAU,EAAE,IAAI;;;;;"}
package/js/utils/array.js CHANGED
@@ -193,7 +193,25 @@ function deepFlat(array, childrenKey) {
193
193
  return flatArray(resultantArray, currentItem[childrenKey]);
194
194
  }
195
195
  return flatArray([], array);
196
+ }
197
+ /**
198
+ * Creates an Emitter filter function to compare two arrays and filter those that are equal.
199
+ *
200
+ * @param comparator - String with the name of the field of the arrays items to compare, or function
201
+ * to compare items directly.
202
+ * @returns The comparator function that receives two arrays to compare them.
203
+ *
204
+ * @internal
205
+ */
206
+ function createEmitterArrayFilter(comparator) {
207
+ var comparatorFn = typeof comparator === 'function'
208
+ ? comparator
209
+ : function (newItem, oldItem) { return newItem[comparator] === oldItem[comparator]; };
210
+ return function (newCollection, oldCollection) {
211
+ return (newCollection.length !== oldCollection.length ||
212
+ newCollection.some(function (newItem) { return !oldCollection.find(function (oldItem) { return comparatorFn(newItem, oldItem); }); }));
213
+ };
196
214
  }
197
215
 
198
- export { arrayToObject, deepFilter, deepFlat, groupItemsBy, isArrayEmpty };
216
+ export { arrayToObject, createEmitterArrayFilter, deepFilter, deepFlat, groupItemsBy, isArrayEmpty };
199
217
  //# sourceMappingURL=array.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"array.js","sources":["../../../src/utils/array.ts"],"sourcesContent":["import { PropsWithType } from './types';\n\n/**\n * Returns if the given array is `null`, `undefined`, or has no elements.\n *\n * @param array - The array to check if it is empty.\n * @returns `true` if the array is `null`, `undefined`, or has no elements. `false` otherwise.\n * @public\n */\nexport function isArrayEmpty(array: unknown[] | undefined | null): array is undefined | null | [] {\n return array == null || array.length === 0;\n}\n\n/**\n * Reduce an array of strings to an object which properties names are the value of each string,\n * and the value under that property are also the string.\n *\n * @param array - Array of strings that will be used to create the object.\n *\n * @returns New object which properties object[key] contains object of each iteration in the\n * array.\n *\n * @example Converting an array to an object:\n * arrayToObject(['a', 'b', 'c']) === \\{a: 'a', b: 'b', c: 'c'\\}\n *\n * @public\n */\nexport function arrayToObject(array: string[]): Record<string, string>;\n/**\n * Reduce an array of objects to an object which properties names are the value of each object[key],\n * and the value under that property are each object. 'key' is the the parameter passed to this\n * function.\n *\n * @param array - Array of objects that contains objects which have object[key] string as a property\n * value.\n * @param key - Key used to access to each object[key] value, used for each property name in the new\n * object.\n *\n * @returns New object which properties object[key] contains object of each iteration in the array.\n *\n * @public\n */\nexport function arrayToObject<ArrayType, KeyType extends string | number>(\n array: ArrayType[],\n key: PropsWithType<ArrayType, KeyType>\n): Record<string, ArrayType>;\n/**\n * Reduce an array to an object. The type of the object returned depends on the type of the params.\n * If the 'key' is passed then the function returns an object which properties names are the value\n * of each object[key] and the value under that property are each object.\n * If the 'key' is not passed then the function returns an object which properties names are each\n * array item, and the value is also the array item.\n *\n * @param array - Array from which to create an object.\n * @param key - Key used to access to each object[key] value, used for each property name in the\n * new object.\n *\n * @returns New object which properties object[key] contains each item in the array and the key is\n * either the item of the array or a property of each item designated by 'key' param.\n *\n * @public\n */\nexport function arrayToObject<ArrayType, KeyType extends string | number>(\n array: ArrayType[],\n key?: PropsWithType<ArrayType, KeyType>\n): Record<string, ArrayType> {\n return array.reduce<Record<string, ArrayType>>((accumulator, current) => {\n if (key) {\n accumulator[current[key] as unknown as string] = current;\n } else if (typeof current === 'string') {\n accumulator[current] = current;\n }\n return accumulator;\n }, {});\n}\n\n/**\n * Groups the array items based on the provided `groupBy` function.\n *\n * @param array - The array to iterate, grouping its items in different arrays based on the\n * `groupBy` function.\n * @param groupBy - A function to determine the group name of a single item.\n * @returns The items grouped in a dictionary.\n *\n * @public\n */\nexport function groupItemsBy<ArrayType, ReturnType extends string | number>(\n array: ArrayType[],\n groupBy: (item: ArrayType, index: number) => ReturnType\n): Record<ReturnType, ArrayType[]> {\n return array.reduce<Record<ReturnType, ArrayType[]>>((accumulator, current, index) => {\n const keyValue = groupBy(current, index);\n if (!accumulator[keyValue]) {\n accumulator[keyValue] = [];\n }\n accumulator[keyValue].push(current);\n return accumulator;\n }, {} as Record<ReturnType, ArrayType[]>);\n}\n\n/**\n * Filters an array with all elements that pass the test implemented by the provided filter\n * function. It also does it recursively if the property accessed, whose name is the parameter\n * childrenKey, to the current iteration in an array.\n *\n * @param array - Array to be filtered.\n * @param filter - Predicate function to test each element of the array. It should return true\n * to keep the element; or false otherwise.\n * @param childrenKey - Property name within the array used to perform a recursive call.\n *\n * @example\n * Input - Output example\n *\n * ```\n * const hierarchicalFilters: Filter[] = [\n * {\n * id: 'filter1'\n * selected: true,\n * children: [\n * {\n * id: 'filter1-1'\n * selected: true,\n * children: []\n * },\n * {\n * id: 'filter1-2'\n * selected: false,\n * children: []\n * }\n * ]\n * },\n * {\n * id: 'filter2',\n * selected: false,\n * children: [\n * {\n * id: 'filter2-1',\n * selected: true // not should happen\n * }\n * ]\n * }\n * ]\n *\n * const filteredArray: Filter[] = deepFilterArray(\n * hierarchicalFilters,\n * filter => filter.selected,\n * 'children'\n * )\n *\n * /*\n * filteredArray = [\n * {\n * id: 'filter1'\n * selected: true,\n * children: [\n * {\n * id: 'filter1-1'\n * selected: true,\n * children: []\n * },\n * {\n * id: 'filter1-2'\n * selected: false,\n * children: []\n * }\n * ]\n * },\n * {\n * id: 'filter1-1'\n * selected: true,\n * children: []\n * }\n * ]\n * ```\n *\n * @returns A new array with the elements that pass the test, or an empty array if no one\n * pass the test.\n *\n * @public\n */\nexport function deepFilter<ArrayType, Key extends PropsWithType<ArrayType, ArrayType[]>>(\n array: ArrayType[],\n filter: (item: ArrayType) => boolean,\n childrenKey: Key\n): ArrayType[] {\n const filterArray = function (\n currentArray: ArrayType[],\n initialArray: ArrayType[] = []\n ): ArrayType[] {\n return currentArray.reduce((result, currentItem) => {\n if (filter(currentItem)) {\n result.push(currentItem);\n filterArray(currentItem[childrenKey], result);\n }\n\n return result;\n }, initialArray);\n };\n\n return filterArray(array);\n}\n\n/**\n * Flat an ArrayType[] recursively using the childrenKey passed as parameter to access to his nested\n * child which is also ArrayType[].\n *\n * @param array - ArrayType[] which each ArrayType has a property childrenKey which value is also\n * an ArrayType[].\n * @param childrenKey - Key used to access to each ArrayType[childrenKey] value which is also\n * an ArrayType[].\n *\n * @returns ArrayType[] with all the nested ArrayType, including the nested ones, at the same depth\n * level.\n *\n * @public\n */\nexport function deepFlat<ArrayType, Key extends PropsWithType<ArrayType, ArrayType[] | undefined>>(\n array: ArrayType[],\n childrenKey: Key\n): ArrayType[] {\n /**\n * Flats an array recursively. In each iteration:\n * - If the currentItem is an array, flatArray is used to reduce it. So, the order of the\n * flatArray arguments defined is important. This happens when the function is called passing an\n * array as the second parameter.\n * - If not, the item is pushed to the resultantArray.\n * - Finally, flatArray function is called again with the currentItem children and the process\n * starts again.\n *\n * It's the main function of the parent. See the description above\n * for further information.\n *\n * @param resultantArray - Flattened array.\n * @param currentItem - ArrayType object.\n *\n * @returns Flattened ArrayType[].\n *\n * @internal\n */\n function flatArray(\n resultantArray: ArrayType[],\n currentItem: ArrayType | ArrayType[]\n ): ArrayType[] {\n if (!currentItem) {\n return resultantArray;\n }\n\n if (Array.isArray(currentItem)) {\n return currentItem.reduce(flatArray, resultantArray);\n }\n resultantArray.push(currentItem);\n return flatArray(resultantArray, currentItem[childrenKey]);\n }\n\n return flatArray([], array);\n}\n"],"names":[],"mappings":"AAEA;;;;;;;SAOgB,YAAY,CAAC,KAAmC;IAC9D,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AAC7C,CAAC;AAmCD;;;;;;;;;;;;;;;;SAgBgB,aAAa,CAC3B,KAAkB,EAClB,GAAuC;IAEvC,OAAO,KAAK,CAAC,MAAM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AY,CAAC,CAAC;KAClB,CAAC;IAEF,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;;;;;;;;;SAcgB,QAAQ,CACtB,KAAkB,EAClB,WAAgB;;;;;;;;;;;;;;;;;;;;IAqBhB,SAAS,SAAS,CAChB,cAA2B,EAC3B,WAAoC;QAEpC,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO,cAAc,CAAC;SACvB;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YAC9B,OAAO,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;SACtD;QACD,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjC,OAAO,SAAS,CAAC,cAAc,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;KAC5D;IAED,OAAO,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAC9B;;;;"}
1
+ {"version":3,"file":"array.js","sources":["../../../src/utils/array.ts"],"sourcesContent":["import { PropsWithType } from './types';\n\n/**\n * Returns if the given array is `null`, `undefined`, or has no elements.\n *\n * @param array - The array to check if it is empty.\n * @returns `true` if the array is `null`, `undefined`, or has no elements. `false` otherwise.\n * @public\n */\nexport function isArrayEmpty(array: unknown[] | undefined | null): array is undefined | null | [] {\n return array == null || array.length === 0;\n}\n\n/**\n * Reduce an array of strings to an object which properties names are the value of each string,\n * and the value under that property are also the string.\n *\n * @param array - Array of strings that will be used to create the object.\n *\n * @returns New object which properties object[key] contains object of each iteration in the\n * array.\n *\n * @example Converting an array to an object:\n * arrayToObject(['a', 'b', 'c']) === \\{a: 'a', b: 'b', c: 'c'\\}\n *\n * @public\n */\nexport function arrayToObject(array: string[]): Record<string, string>;\n/**\n * Reduce an array of objects to an object which properties names are the value of each object[key],\n * and the value under that property are each object. 'key' is the the parameter passed to this\n * function.\n *\n * @param array - Array of objects that contains objects which have object[key] string as a property\n * value.\n * @param key - Key used to access to each object[key] value, used for each property name in the new\n * object.\n *\n * @returns New object which properties object[key] contains object of each iteration in the array.\n *\n * @public\n */\nexport function arrayToObject<ArrayType, KeyType extends string | number>(\n array: ArrayType[],\n key: PropsWithType<ArrayType, KeyType>\n): Record<string, ArrayType>;\n/**\n * Reduce an array to an object. The type of the object returned depends on the type of the params.\n * If the 'key' is passed then the function returns an object which properties names are the value\n * of each object[key] and the value under that property are each object.\n * If the 'key' is not passed then the function returns an object which properties names are each\n * array item, and the value is also the array item.\n *\n * @param array - Array from which to create an object.\n * @param key - Key used to access to each object[key] value, used for each property name in the\n * new object.\n *\n * @returns New object which properties object[key] contains each item in the array and the key is\n * either the item of the array or a property of each item designated by 'key' param.\n *\n * @public\n */\nexport function arrayToObject<ArrayType, KeyType extends string | number>(\n array: ArrayType[],\n key?: PropsWithType<ArrayType, KeyType>\n): Record<string, ArrayType> {\n return array.reduce<Record<string, ArrayType>>((accumulator, current) => {\n if (key) {\n accumulator[current[key] as unknown as string] = current;\n } else if (typeof current === 'string') {\n accumulator[current] = current;\n }\n return accumulator;\n }, {});\n}\n\n/**\n * Groups the array items based on the provided `groupBy` function.\n *\n * @param array - The array to iterate, grouping its items in different arrays based on the\n * `groupBy` function.\n * @param groupBy - A function to determine the group name of a single item.\n * @returns The items grouped in a dictionary.\n *\n * @public\n */\nexport function groupItemsBy<ArrayType, ReturnType extends string | number>(\n array: ArrayType[],\n groupBy: (item: ArrayType, index: number) => ReturnType\n): Record<ReturnType, ArrayType[]> {\n return array.reduce<Record<ReturnType, ArrayType[]>>((accumulator, current, index) => {\n const keyValue = groupBy(current, index);\n if (!accumulator[keyValue]) {\n accumulator[keyValue] = [];\n }\n accumulator[keyValue].push(current);\n return accumulator;\n }, {} as Record<ReturnType, ArrayType[]>);\n}\n\n/**\n * Filters an array with all elements that pass the test implemented by the provided filter\n * function. It also does it recursively if the property accessed, whose name is the parameter\n * childrenKey, to the current iteration in an array.\n *\n * @param array - Array to be filtered.\n * @param filter - Predicate function to test each element of the array. It should return true\n * to keep the element; or false otherwise.\n * @param childrenKey - Property name within the array used to perform a recursive call.\n *\n * @example\n * Input - Output example\n *\n * ```\n * const hierarchicalFilters: Filter[] = [\n * {\n * id: 'filter1'\n * selected: true,\n * children: [\n * {\n * id: 'filter1-1'\n * selected: true,\n * children: []\n * },\n * {\n * id: 'filter1-2'\n * selected: false,\n * children: []\n * }\n * ]\n * },\n * {\n * id: 'filter2',\n * selected: false,\n * children: [\n * {\n * id: 'filter2-1',\n * selected: true // not should happen\n * }\n * ]\n * }\n * ]\n *\n * const filteredArray: Filter[] = deepFilterArray(\n * hierarchicalFilters,\n * filter => filter.selected,\n * 'children'\n * )\n *\n * /*\n * filteredArray = [\n * {\n * id: 'filter1'\n * selected: true,\n * children: [\n * {\n * id: 'filter1-1'\n * selected: true,\n * children: []\n * },\n * {\n * id: 'filter1-2'\n * selected: false,\n * children: []\n * }\n * ]\n * },\n * {\n * id: 'filter1-1'\n * selected: true,\n * children: []\n * }\n * ]\n * ```\n *\n * @returns A new array with the elements that pass the test, or an empty array if no one\n * pass the test.\n *\n * @public\n */\nexport function deepFilter<ArrayType, Key extends PropsWithType<ArrayType, ArrayType[]>>(\n array: ArrayType[],\n filter: (item: ArrayType) => boolean,\n childrenKey: Key\n): ArrayType[] {\n const filterArray = function (\n currentArray: ArrayType[],\n initialArray: ArrayType[] = []\n ): ArrayType[] {\n return currentArray.reduce((result, currentItem) => {\n if (filter(currentItem)) {\n result.push(currentItem);\n filterArray(currentItem[childrenKey], result);\n }\n\n return result;\n }, initialArray);\n };\n\n return filterArray(array);\n}\n\n/**\n * Flat an ArrayType[] recursively using the childrenKey passed as parameter to access to his nested\n * child which is also ArrayType[].\n *\n * @param array - ArrayType[] which each ArrayType has a property childrenKey which value is also\n * an ArrayType[].\n * @param childrenKey - Key used to access to each ArrayType[childrenKey] value which is also\n * an ArrayType[].\n *\n * @returns ArrayType[] with all the nested ArrayType, including the nested ones, at the same depth\n * level.\n *\n * @public\n */\nexport function deepFlat<ArrayType, Key extends PropsWithType<ArrayType, ArrayType[] | undefined>>(\n array: ArrayType[],\n childrenKey: Key\n): ArrayType[] {\n /**\n * Flats an array recursively. In each iteration:\n * - If the currentItem is an array, flatArray is used to reduce it. So, the order of the\n * flatArray arguments defined is important. This happens when the function is called passing an\n * array as the second parameter.\n * - If not, the item is pushed to the resultantArray.\n * - Finally, flatArray function is called again with the currentItem children and the process\n * starts again.\n *\n * It's the main function of the parent. See the description above\n * for further information.\n *\n * @param resultantArray - Flattened array.\n * @param currentItem - ArrayType object.\n *\n * @returns Flattened ArrayType[].\n *\n * @internal\n */\n function flatArray(\n resultantArray: ArrayType[],\n currentItem: ArrayType | ArrayType[]\n ): ArrayType[] {\n if (!currentItem) {\n return resultantArray;\n }\n\n if (Array.isArray(currentItem)) {\n return currentItem.reduce(flatArray, resultantArray);\n }\n resultantArray.push(currentItem);\n return flatArray(resultantArray, currentItem[childrenKey]);\n }\n\n return flatArray([], array);\n}\n\n/**\n * Creates an Emitter filter function to compare two arrays and filter those that are equal.\n *\n * @param comparator - String with the name of the field of the arrays items to compare, or function\n * to compare items directly.\n * @returns The comparator function that receives two arrays to compare them.\n *\n * @internal\n */\nexport function createEmitterArrayFilter<T>(\n comparator: keyof T | ((item1: T, item2: T) => boolean)\n): (newCollection: Array<T>, oldCollection: Array<T>) => boolean {\n const comparatorFn =\n typeof comparator === 'function'\n ? comparator\n : (newItem: T, oldItem: T) => newItem[comparator] === oldItem[comparator];\n return function (newCollection: Array<T>, oldCollection: Array<T>): boolean {\n return (\n newCollection.length !== oldCollection.length ||\n newCollection.some(newItem => !oldCollection.find(oldItem => comparatorFn(newItem, oldItem)))\n );\n };\n}\n"],"names":[],"mappings":"AAEA;;;;;;;SAOgB,YAAY,CAAC,KAAmC;IAC9D,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AAC7C,CAAC;AAmCD;;;;;;;;;;;;;;;;SAgBgB,aAAa,CAC3B,K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ature} and
3
+ * a {@link FeatureLocation}.
4
+ * If it can't be created, it returns `undefined`.
5
+ *
6
+ * @param originInit - An object containing the needed properties to create a {@link QueryOrigin} or
7
+ * a {@link ResultOrigin}.
8
+ * @returns The composed origin, or `null` if it is not able to create the origin.
9
+ * @internal
10
+ */
11
+ function createOrigin(_a) {
12
+ var feature = _a.feature, location = _a.location;
13
+ if (location && feature) {
14
+ return feature + ":" + location;
15
+ }
16
+ return null;
17
+ }
18
+
19
+ export { createOrigin };
20
+ //# sourceMappingURL=origin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"origin.js","sources":["../../../src/utils/origin.ts"],"sourcesContent":["import { QueryOrigin, QueryOriginInit, ResultOrigin } from '../types/origin';\n\n/**\n * Creates a {@link QueryOrigin} or a {@link ResultOrigin} string given a {@link QueryFeature} and\n * a {@link FeatureLocation}.\n * If it can't be created, it returns `undefined`.\n *\n * @param originInit - An object containing the needed properties to create a {@link QueryOrigin} or\n * a {@link ResultOrigin}.\n * @returns The composed origin, or `null` if it is not able to create the origin.\n * @internal\n */\nexport function createOrigin({\n feature,\n location\n}: QueryOriginInit): QueryOrigin | ResultOrigin | null {\n if (location && feature) {\n return `${feature}:${location}`;\n }\n return null;\n}\n"],"names":[],"mappings":"AAEA;;;;;;;;;;SAUgB,YAAY,CAAC,EAGX;QAFhB,OAAO,aAAA,EACP,QAAQ,cAAA;IAER,IAAI,QAAQ,IAAI,OAAO,EAAE;QACvB,OAAU,OAAO,SAAI,QAAU,CAAC;KACjC;IACD,OAAO,IAAI,CAAC;AACd;;;;"}
@@ -1,4 +1,4 @@
1
- import { __awaiter, __generator, __rest, __assign } from 'tslib';
1
+ import { __awaiter, __generator, __assign } from 'tslib';
2
2
  import Vue from 'vue';
3
3
  import { cleanUndefined } from '../../utils/object.js';
4
4
  import { deepMerge } from '@empathyco/x-deep-merge';
@@ -162,11 +162,14 @@ var XInstaller = /** @class */ (function () {
162
162
  * @internal
163
163
  */
164
164
  XInstaller.prototype.getAdapterConfig = function (_a) {
165
- var instance = _a.instance, env = _a.env, lang = _a.lang, searchLang = _a.searchLang, scope = _a.scope, consent = _a.consent, currency = _a.currency, documentDirection = _a.documentDirection, extraParams = __rest(_a, ["instance", "env", "lang", "searchLang", "scope", "consent", "currency", "documentDirection"]);
165
+ var instance = _a.instance, env = _a.env, lang = _a.lang, searchLang = _a.searchLang, scope = _a.scope;
166
166
  return deepMerge(defaultAdapterConfig, cleanUndefined({
167
167
  instance: instance,
168
168
  env: env,
169
- requestParams: __assign({ lang: searchLang !== null && searchLang !== void 0 ? searchLang : lang, scope: scope }, extraParams)
169
+ requestParams: {
170
+ lang: searchLang !== null && searchLang !== void 0 ? searchLang : lang,
171
+ scope: scope
172
+ }
170
173
  }));
171
174
  };
172
175
  /**
@@ -273,7 +276,7 @@ var XInstaller = /** @class */ (function () {
273
276
  var _this = this;
274
277
  if (this.options.app !== undefined) {
275
278
  var vue = this.getVue();
276
- vue.observable(snippetConfig);
279
+ snippetConfig = vue.observable(snippetConfig);
277
280
  return new vue(__assign(__assign(__assign({}, extraPlugins), this.options.vueOptions), { provide: function () {
278
281
  return {
279
282
  snippetConfig: snippetConfig
@@ -1 +1 @@
1
- {"version":3,"file":"x-installer.js","sources":["../../../../src/x-installer/x-installer/x-installer.ts"],"sourcesContent":["import { EmpathyAdapterConfig } from '@empathyco/x-adapter';\nimport { deepMerge } from '@empathyco/x-deep-merge';\nimport Vue, { PluginObject, VueConstructor } from 'vue';\nimport { BaseXBus } from '../../plugins/x-bus';\nimport { XBus } from '../../plugins/x-bus.types';\nimport { XPlugin } from '../../plugins/x-plugin';\nimport { XPluginOptions } from '../../plugins/x-plugin.types';\nimport { cleanUndefined } from '../../utils/object';\nimport { DeepPartial } from '../../utils/types';\nimport { SnippetConfig, XAPI } from '../api/api.types';\nimport { BaseXAPI } from '../api/base-api';\nimport { InstallXOptions, VueConstructorPartialArgument } from './types';\n\ndeclare global {\n interface Window {\n X?: XAPI;\n }\n}\n\nconst defaultAdapterConfig: DeepPartial<EmpathyAdapterConfig> = {\n env: 'live',\n requestParams: {\n lang: 'es',\n scope: 'default'\n }\n};\n\n/**\n * The purpose of this class is to offer a quick way to initialize the XComponents in a setup\n * project. It allows to receive all the options in {@link InstallXOptions} which is an extension\n * of {@link XPluginOptions} with all the options for the plugin and some options more.\n *\n * This class does multiple things:\n * 1. Install the {@link XPlugin} with the {@link XPluginOptions}.\n * 2. Creates the public {@link XAPI} and add it to global window.\n * 3. Creates the Vue Application for the customer project.\n *\n * The steps 2 & 3 are optional and depends on the options passed in {@link InstallXOptions}.\n *\n * @example The way to use this class is the next:\n * 1. Create the installer passing in the {@link InstallXOptions}. This only save the options:\n *\n * ```\n * const installer = new XInstaller(installXOptions)\n * ```\n *\n * 2. Initialize passing the {@link SnippetConfig}. This installs the plugin and creates the App.\n * There are 3 different ways to do this:\n *\n * 2.1 Using the created installer:\n *\n * ```\n * installer.init(snipetConfig)\n * ```\n *\n * 2.2 If the API option is enabled (`createAPI` is `true` in {@link InstallXOptions}, or\n * is not present as the default vlaue is `true`) then this init step can be done with\n * the Public API:\n *\n * ```\n * window.X.init(snippetConfig)\n * ```\n *\n * 2.3 When the script of the project build is loaded it searches for a global `initX`\n * variable that the customer must have in their web site. This variable can be a\n * function that returns the {@link SnippetConfig} or an object that contains the\n * {@link SnippetConfig} itself:\n *\n * ```\n * window.initX = function() {\n * return {\n * instance,\n * env,\n * scope,\n * lang,\n * searchLang,\n * currency,\n * consent,\n * documentDirection\n * };\n * };\n * ```\n *\n * ```\n * window.initX = {\n * instance,\n * env,\n * scope,\n * lang,\n * searchLang,\n * currency,\n * consent,\n * documentDirection\n * };\n * ```\n *\n * @public\n */\nexport class XInstaller {\n private api?: XAPI;\n\n /**\n * Receives the {@link InstallXOptions} and merges it with the default fallback options. Also\n * creates the public {@link XAPI}.\n *\n * @param options - The {@link InstallXOptions}.\n *\n * @public\n */\n public constructor(protected readonly options: InstallXOptions) {\n this.createAPI();\n }\n\n /**\n * Creates the public {@link XAPI} using the `api` option from {@link InstallXOptions}. If this\n * `api` option is not passed, then a default {@link BaseXAPI} is created. To disable the API\n * creation the value `false` must be passed in the `api` option.\n *\n * @internal\n */\n protected createAPI(): void {\n const { api } = this.options;\n if (api !== false) {\n this.api = api ?? new BaseXAPI();\n this.api.setInitCallback(this.init.bind(this));\n window.X = this.api;\n }\n }\n\n /**\n * Receives the {@link SnippetConfig | snippet config}, installs the plugin and initializes\n * the Vue application.\n *\n * @param snippetConfig - The {@link SnippetConfig} that receives from snippet\n * integration.\n *\n * @returns Object with the {@link XAPI}, the {@link XBus}, the {@link XPlugin} and the Vue App\n * used in the application.\n *\n * @public\n */\n async init(snippetConfig: SnippetConfig): Promise<{\n app: Vue | undefined;\n api: XAPI | undefined;\n bus: XBus;\n plugin: PluginObject<XPluginOptions>;\n }> {\n const adapterConfig = this.getAdapterConfig(snippetConfig);\n this.applyConfigToAdapter(adapterConfig);\n const bus = this.createBus();\n const pluginOptions = this.getPluginOptions();\n const plugin = this.installPlugin(pluginOptions, bus);\n const extraPlugins = await this.installExtraPlugins(snippetConfig, bus);\n const app = this.createApp(extraPlugins, snippetConfig);\n this.api?.setBus(bus);\n\n return {\n api: this.api,\n app,\n bus,\n plugin\n };\n }\n\n /**\n * Creates the Adapter Config object using the {@link SnippetConfig} to do it. It also\n * merges the default configuration.\n *\n * @param options - The {@link SnippetConfig}.\n *\n * @returns The Adapter Config object.\n *\n * @internal\n */\n protected getAdapterConfig({\n instance,\n env,\n lang,\n searchLang,\n scope,\n consent,\n currency,\n documentDirection,\n ...extraParams\n }: SnippetConfig): unknown {\n return deepMerge(\n defaultAdapterConfig,\n cleanUndefined<DeepPartial<EmpathyAdapterConfig>>({\n instance,\n env,\n requestParams: {\n lang: searchLang ?? lang,\n scope,\n ...extraParams\n }\n })\n );\n }\n\n /**\n * Creates the {@link XPluginOptions} object.\n *\n * @returns The {@link XPluginOptions} object.\n *\n * @internal\n */\n protected getPluginOptions(): XPluginOptions {\n const { adapter, store, initialXModules, xModules, __PRIVATE__xModules } = this.options;\n return {\n adapter,\n store,\n xModules,\n initialXModules,\n __PRIVATE__xModules\n };\n }\n\n /**\n * It applies the snippet configuration to the Adapter. Not all the parameters are for the Adapter\n * but they appear destructured to not include them in the `extraParams` parameter.\n *\n * @param adapterConfig - The Adapter config object.\n *\n * @internal\n */\n protected applyConfigToAdapter(adapterConfig: any): void {\n this.options.adapter.setConfig?.(adapterConfig);\n }\n\n /**\n * This method returns the bus instance to be used in the {@link XPlugin} and in the {@link XAPI}.\n * It returns the `bus` parameter in the {@link InstallXOptions} or if not provided, then\n * creates a new instance of {@link BaseXBus}.\n *\n * @returns XBus - The bus instance.\n *\n * @internal\n */\n protected createBus(): XBus {\n return this.options.bus ?? new BaseXBus();\n }\n\n /**\n * This method returns the VueConstructor to use to create the App instance.\n * It returns the `vue` parameter in the {@link InstallXOptions} or if not provided, then\n * returns the default Vue.\n *\n * @remarks The purpose of this option is mainly the testing. In a test we can use this option\n * to pass the local vue instance created by `createLocalVue` method.\n *\n * @returns VueConstructor - The vue constructor to create the App instance.\n *\n * @internal\n */\n protected getVue(): VueConstructor {\n return this.options.vue ?? Vue;\n }\n\n /**\n * Creates and install the Vue Plugin. If `plugin` parameter is passed in the\n * {@link InstallXOptions}, then it is used. If not, then a new instance of {@link XPlugin} is\n * created and installed.\n *\n * @param pluginOptions - The {@link XPluginOptions} to passed as parameter to the install method\n * of the plugin.\n * @param bus - The {@link XBus} to be used to create the XPlugin.\n *\n * @returns PluginObject<XPluginOption> - The plugin instance.\n * @internal\n */\n protected installPlugin(pluginOptions: XPluginOptions, bus: XBus): PluginObject<XPluginOptions> {\n const plugin = this.options.plugin ?? new XPlugin(bus);\n const vue = this.getVue();\n vue.use(plugin, pluginOptions);\n return plugin;\n }\n\n /**\n * Install more plugins to Vue defined by the user.\n *\n * @param snippet - The snippet configuration.\n * @param bus - The events bus used in the application.\n * @returns The arguments from the plugins installation to be used in Vue's constructor.\n * @internal\n */\n protected installExtraPlugins(\n snippet: SnippetConfig,\n bus: XBus\n ): Promise<VueConstructorPartialArgument> {\n const vue = this.getVue();\n return Promise.resolve(this.options.installExtraPlugins?.({ vue, snippet, bus }));\n }\n\n /**\n * In the case that the `app` parameter is present in the {@link InstallXOptions}, then a new Vue\n * application is created using that app.\n *\n * @param extraPlugins - Vue plugins initialisation data.\n * @param snippetConfig - Configuration from the client snippet.\n * @returns The Created Vue application or undefined if not created.\n *\n * @internal\n */\n protected createApp(\n extraPlugins: VueConstructorPartialArgument,\n snippetConfig: SnippetConfig\n ): Vue | undefined {\n if (this.options.app !== undefined) {\n const vue = this.getVue();\n vue.observable(snippetConfig);\n return new vue({\n ...extraPlugins,\n ...this.options.vueOptions,\n provide() {\n return {\n snippetConfig\n };\n },\n store: this.options.store,\n el: this.getMountingTarget(this.options.domElement),\n render: h => h(this.options.app)\n });\n }\n }\n\n /**\n * It returns the HTML element to mount the Vue Application. If the `domElement` parameter in the\n * {@link InstallXOptions} is an Element or a string, then it is used. If it is\n * not present then a new <div> Element is created and append to the body to be used.\n *\n * @param elementOrSelector - String or Element used to mount the Vue App.\n *\n * @returns The Element to use as mounting point for the Vue App.\n * @internal\n */\n protected getMountingTarget(elementOrSelector?: string | Element): Element {\n if (typeof elementOrSelector === 'string') {\n const target = document.querySelector(elementOrSelector);\n if (!target) {\n throw Error(\n `XComponents app couldn't be mounted: Element \"${elementOrSelector}\" couldn't be found`\n );\n }\n return target;\n } else if (elementOrSelector !== undefined) {\n return elementOrSelector;\n } else {\n return document.body.appendChild(document.createElement('div'));\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAmBA,IAAM,oBAAoB,GAAsC;IAC9D,GAAG,EAAE,MAAM;IACX,aAAa,EAAE;QACb,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,SAAS;KACjB;CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkFE,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;gBACX,MAAM,KAAK,CACT,oDAAiD,iBAAiB,yBAAqB,CACxF,CAAC;aACH;YACD,OAAO,MAAM,CAAC;SACf;aAAM,IAAI,iBAAiB,KAAK,SAAS,EAAE;YAC1C,OAAO,iBAAiB,CAAC;SAC1B;aAAM;YACL,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;SACjE;KACF;IACH,iBAAC;AAAD,CAAC;;;;"}
1
+ {"version":3,"file":"x-installer.js","sources":["../../../../src/x-installer/x-installer/x-installer.ts"],"sourcesContent":["import { EmpathyAdapterConfig } from '@empathyco/x-adapter';\nimport { deepMerge } from '@empathyco/x-deep-merge';\nimport Vue, { PluginObject, VueConstructor } from 'vue';\nimport { BaseXBus } from '../../plugins/x-bus';\nimport { XBus } from '../../plugins/x-bus.types';\nimport { XPlugin } from '../../plugins/x-plugin';\nimport { XPluginOptions } from '../../plugins/x-plugin.types';\nimport { cleanUndefined } from '../../utils/object';\nimport { DeepPartial } from '../../utils/types';\nimport { SnippetConfig, XAPI } from '../api/api.types';\nimport { BaseXAPI } from '../api/base-api';\nimport { InstallXOptions, VueConstructorPartialArgument } from './types';\n\ndeclare global {\n interface Window {\n X?: XAPI;\n }\n}\n\nconst defaultAdapterConfig: DeepPartial<EmpathyAdapterConfig> = {\n env: 'live',\n requestParams: {\n lang: 'es',\n scope: 'default'\n }\n};\n\n/**\n * The purpose of this class is to offer a quick way to initialize the XComponents in a setup\n * project. It allows to receive all the options in {@link InstallXOptions} which is an extension\n * of {@link XPluginOptions} with all the options for the plugin and some options more.\n *\n * This class does multiple things:\n * 1. Install the {@link XPlugin} with the {@link XPluginOptions}.\n * 2. Creates the public {@link XAPI} and add it to global window.\n * 3. Creates the Vue Application for the customer project.\n *\n * The steps 2 & 3 are optional and depends on the options passed in {@link InstallXOptions}.\n *\n * @example The way to use this class is the next:\n * 1. Create the installer passing in the {@link InstallXOptions}. This only save the options:\n *\n * ```\n * const installer = new XInstaller(installXOptions)\n * ```\n *\n * 2. Initialize passing the {@link SnippetConfig}. This installs the plugin and creates the App.\n * There are 3 different ways to do this:\n *\n * 2.1 Using the created installer:\n *\n * ```\n * installer.init(snipetConfig)\n * ```\n *\n * 2.2 If the API option is enabled (`createAPI` is `true` in {@link InstallXOptions}, or\n * is not present as the default vlaue is `true`) then this init step can be done with\n * the Public API:\n *\n * ```\n * window.X.init(snippetConfig)\n * ```\n *\n * 2.3 When the script of the project build is loaded it searches for a global `initX`\n * variable that the customer must have in their web site. This variable can be a\n * function that returns the {@link SnippetConfig} or an object that contains the\n * {@link SnippetConfig} itself:\n *\n * ```\n * window.initX = function() {\n * return {\n * instance,\n * env,\n * scope,\n * lang,\n * searchLang,\n * currency,\n * consent,\n * documentDirection\n * };\n * };\n * ```\n *\n * ```\n * window.initX = {\n * instance,\n * env,\n * scope,\n * lang,\n * searchLang,\n * currency,\n * consent,\n * documentDirection\n * };\n * ```\n *\n * @public\n */\nexport class XInstaller {\n private api?: XAPI;\n\n /**\n * Receives the {@link InstallXOptions} and merges it with the default fallback options. Also\n * creates the public {@link XAPI}.\n *\n * @param options - The {@link InstallXOptions}.\n *\n * @public\n */\n public constructor(protected readonly options: InstallXOptions) {\n this.createAPI();\n }\n\n /**\n * Creates the public {@link XAPI} using the `api` option from {@link InstallXOptions}. If this\n * `api` option is not passed, then a default {@link BaseXAPI} is created. To disable the API\n * creation the value `false` must be passed in the `api` option.\n *\n * @internal\n */\n protected createAPI(): void {\n const { api } = this.options;\n if (api !== false) {\n this.api = api ?? new BaseXAPI();\n this.api.setInitCallback(this.init.bind(this));\n window.X = this.api;\n }\n }\n\n /**\n * Receives the {@link SnippetConfig | snippet config}, installs the plugin and initializes\n * the Vue application.\n *\n * @param snippetConfig - The {@link SnippetConfig} that receives from snippet\n * integration.\n *\n * @returns Object with the {@link XAPI}, the {@link XBus}, the {@link XPlugin} and the Vue App\n * used in the application.\n *\n * @public\n */\n async init(snippetConfig: SnippetConfig): Promise<{\n app: Vue | undefined;\n api: XAPI | undefined;\n bus: XBus;\n plugin: PluginObject<XPluginOptions>;\n }> {\n const adapterConfig = this.getAdapterConfig(snippetConfig);\n this.applyConfigToAdapter(adapterConfig);\n const bus = this.createBus();\n const pluginOptions = this.getPluginOptions();\n const plugin = this.installPlugin(pluginOptions, bus);\n const extraPlugins = await this.installExtraPlugins(snippetConfig, bus);\n const app = this.createApp(extraPlugins, snippetConfig);\n this.api?.setBus(bus);\n\n return {\n api: this.api,\n app,\n bus,\n plugin\n };\n }\n\n /**\n * Creates the Adapter Config object using the {@link SnippetConfig} to do it. It also\n * merges the default configuration.\n *\n * @param options - The {@link SnippetConfig}.\n *\n * @returns The Adapter Config object.\n *\n * @internal\n */\n protected getAdapterConfig({ instance, env, lang, searchLang, scope }: SnippetConfig): unknown {\n return deepMerge(\n defaultAdapterConfig,\n cleanUndefined<DeepPartial<EmpathyAdapterConfig>>({\n instance,\n env,\n requestParams: {\n lang: searchLang ?? lang,\n scope\n }\n })\n );\n }\n\n /**\n * Creates the {@link XPluginOptions} object.\n *\n * @returns The {@link XPluginOptions} object.\n *\n * @internal\n */\n protected getPluginOptions(): XPluginOptions {\n const { adapter, store, initialXModules, xModules, __PRIVATE__xModules } = this.options;\n return {\n adapter,\n store,\n xModules,\n initialXModules,\n __PRIVATE__xModules\n };\n }\n\n /**\n * It applies the snippet configuration to the Adapter. Not all the parameters are for the Adapter\n * but they appear destructured to not include them in the `extraParams` parameter.\n *\n * @param adapterConfig - The Adapter config object.\n *\n * @internal\n */\n protected applyConfigToAdapter(adapterConfig: any): void {\n this.options.adapter.setConfig?.(adapterConfig);\n }\n\n /**\n * This method returns the bus instance to be used in the {@link XPlugin} and in the {@link XAPI}.\n * It returns the `bus` parameter in the {@link InstallXOptions} or if not provided, then\n * creates a new instance of {@link BaseXBus}.\n *\n * @returns XBus - The bus instance.\n *\n * @internal\n */\n protected createBus(): XBus {\n return this.options.bus ?? new BaseXBus();\n }\n\n /**\n * This method returns the VueConstructor to use to create the App instance.\n * It returns the `vue` parameter in the {@link InstallXOptions} or if not provided, then\n * returns the default Vue.\n *\n * @remarks The purpose of this option is mainly the testing. In a test we can use this option\n * to pass the local vue instance created by `createLocalVue` method.\n *\n * @returns VueConstructor - The vue constructor to create the App instance.\n *\n * @internal\n */\n protected getVue(): VueConstructor {\n return this.options.vue ?? Vue;\n }\n\n /**\n * Creates and install the Vue Plugin. If `plugin` parameter is passed in the\n * {@link InstallXOptions}, then it is used. If not, then a new instance of {@link XPlugin} is\n * created and installed.\n *\n * @param pluginOptions - The {@link XPluginOptions} to passed as parameter to the install method\n * of the plugin.\n * @param bus - The {@link XBus} to be used to create the XPlugin.\n *\n * @returns PluginObject<XPluginOption> - The plugin instance.\n * @internal\n */\n protected installPlugin(pluginOptions: XPluginOptions, bus: XBus): PluginObject<XPluginOptions> {\n const plugin = this.options.plugin ?? new XPlugin(bus);\n const vue = this.getVue();\n vue.use(plugin, pluginOptions);\n return plugin;\n }\n\n /**\n * Install more plugins to Vue defined by the user.\n *\n * @param snippet - The snippet configuration.\n * @param bus - The events bus used in the application.\n * @returns The arguments from the plugins installation to be used in Vue's constructor.\n * @internal\n */\n protected installExtraPlugins(\n snippet: SnippetConfig,\n bus: XBus\n ): Promise<VueConstructorPartialArgument> {\n const vue = this.getVue();\n return Promise.resolve(this.options.installExtraPlugins?.({ vue, snippet, bus }));\n }\n\n /**\n * In the case that the `app` parameter is present in the {@link InstallXOptions}, then a new Vue\n * application is created using that app.\n *\n * @param extraPlugins - Vue plugins initialisation data.\n * @param snippetConfig - Configuration from the client snippet.\n * @returns The Created Vue application or undefined if not created.\n *\n * @internal\n */\n protected createApp(\n extraPlugins: VueConstructorPartialArgument,\n snippetConfig: SnippetConfig\n ): Vue | undefined {\n if (this.options.app !== undefined) {\n const vue = this.getVue();\n snippetConfig = vue.observable(snippetConfig);\n return new vue({\n ...extraPlugins,\n ...this.options.vueOptions,\n provide() {\n return {\n snippetConfig\n };\n },\n store: this.options.store,\n el: this.getMountingTarget(this.options.domElement),\n render: h => h(this.options.app)\n });\n }\n }\n\n /**\n * It returns the HTML element to mount the Vue Application. If the `domElement` parameter in the\n * {@link InstallXOptions} is an Element or a string, then it is used. If it is\n * not present then a new <div> Element is created and append to the body to be used.\n *\n * @param elementOrSelector - String or Element used to mount the Vue App.\n *\n * @returns The Element to use as mounting point for the Vue App.\n * @internal\n */\n protected getMountingTarget(elementOrSelector?: string | Element): Element {\n if (typeof elementOrSelector === 'string') {\n const target = document.querySelector(elementOrSelector);\n if (!target) {\n throw Error(\n `XComponents app couldn't be mounted: Element \"${elementOrSelector}\" couldn't be found`\n );\n }\n return target;\n } else if (elementOrSelector !== undefined) {\n return elementOrSelector;\n } else {\n return document.body.appendChild(document.createElement('div'));\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAmBA,IAAM,oBAAoB,GAAsC;IAC9D,GAAG,EAAE,MAAM;IACX,aAAa,EAAE;QACb,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,SAAS;KACjB;CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkFE,oBAAsC,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;QAC5D,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;;;;;;;;IASS,8BAAS,GAAnB;QACU,IAAA,GAAG,GAAK,IAAI,CAAC,OAAO,IAAjB,CAAkB;QAC7B,IAAI,GAAG,KAAK,KAAK,EAAE;YACjB,IAAI,CAAC,GAAG,GAAG,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,IAAI,QAAQ,EAAE,CAAC;YACjC,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAC/C,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;SACrB;K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AClC,IAAM,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YAC1B,aAAa,GAAG,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YAC9C,OAAO,IAAI,GAAG,gCACT,YAAY,GACZ,IAAI,CAAC,OAAO,CAAC,UAAU,KAC1B,OAAO;oBACL,OAAO;wBACL,aAAa,eAAA;qBACd,CAAC;iBACH,EACD,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,EACzB,EAAE,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EACnD,MAAM,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,KAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAA,IAChC,CAAC;SACJ;KACF;;;;;;;;;;;IAYS,sCAAiB,GAA3B,UAA4B,iBAAoC;QAC9D,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;YACzC,IAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;YACzD,IAAI,CAAC,MAAM,EAAE;gBACX,MAAM,KAAK,CACT,oDAAiD,iBAAiB,yBAAqB,CACxF,CAAC;aACH;YACD,OAAO,MAAM,CAAC;SACf;aAAM,IAAI,iBAAiB,KAAK,SAAS,EAAE;YAC1C,OAAO,iBAAiB,CAAC;SAC1B;aAAM;YACL,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;SACjE;KACF;IACH,iBAAC;AAAD,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"extra-params.vue.js","sources":["../../../../../src/x-modules/extra-params/components/extra-params.vue"],"sourcesContent":["<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin, XEmit } from '../../../components';\n import { Dictionary } from '../../../utils';\n import { extraParamsXModule } from '../x-module';\n\n /**\n * It emits a {@link ExtraParamsXEvents.ExtraParamsProvided} with the values\n * received as a prop.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(extraParamsXModule)]\n })\n export default class ExtraParams extends Vue {\n /**\n * (Required) A Dictionary where the keys are the extra param names and its values.\n *\n * @remarks Emits the {@link ExtraParamsXEvents.ExtraParamsProvided} when the\n * component is rendered or the values changed.\n *\n * @public\n */\n @XEmit('ExtraParamsProvided', { immediate: true, deep: true })\n @Prop({ required: true })\n public values!: Dictionary<unknown>;\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n }\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\n- [`ExtraParamsProvided`][1]\n\n[1](./../../api/x-components.extraparamsxevents.extraparamsprovided.md)\n\n## See it in action\n\n_See how the event is triggered when the component is rendered._\n\n```vue\n<template>\n <ExtraParams :values=\"values\" />\n</template>\n\n<script>\n import { ExtraParams } from '@empathyco/x-components/extra-params';\n\n export default {\n name: 'ExtraParamsDemo',\n components: {\n ExtraParams\n },\n data() {\n return {\n values: {\n warehouse: 1234\n }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"extra-params.vue.js","sources":["../../../../../src/x-modules/extra-params/components/extra-params.vue"],"sourcesContent":["<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { State, xComponentMixin, XEmit } from '../../../components';\n import { Dictionary } from '../../../utils';\n import { extraParamsXModule } from '../x-module';\n\n /**\n * It emits a {@link ExtraParamsXEvents.ExtraParamsProvided} with the values\n * received as a prop.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(extraParamsXModule)]\n })\n export default class ExtraParams extends Vue {\n /**\n * Emits the initial extra params, overriding with the state extra params, just in case, those\n * values were already set by XComponents initialization (url, plugin config, etc.).\n */\n mounted(): void {\n this.$x.emit('ExtraParamsInitialized', this.values);\n this.$x.emit('ExtraParamsProvided', { ...this.values, ...this.storeExtraParams });\n }\n\n /**\n * (Required) A Dictionary where the keys are the extra param names and its values.\n *\n * @remarks Emits the {@link ExtraParamsXEvents.ExtraParamsProvided} when the\n * component is rendered or the values changed.\n *\n * @public\n */\n @XEmit('ExtraParamsProvided', { deep: true })\n @Prop({ required: true })\n public values!: Dictionary<unknown>;\n\n /**\n * State extra params. Used to override the initial extra params.\n */\n @State('extraParams', 'params')\n public storeExtraParams!: Dictionary<unknown>;\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n }\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\n- [`ExtraParamsProvided`][1]\n\n[1](./../../api/x-components.extraparamsxevents.extraparamsprovided.md)\n\n## See it in action\n\n_See how the event is triggered when the component is rendered._\n\n```vue\n<template>\n <ExtraParams :values=\"values\" />\n</template>\n\n<script>\n import { ExtraParams } from '@empathyco/x-components/extra-params';\n\n export default {\n name: 'ExtraParamsDemo',\n components: {\n ExtraParams\n },\n data() {\n return {\n values: {\n warehouse: 1234\n }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { __extends, __decorate } from 'tslib';
1
+ import { __extends, __assign, __decorate } from 'tslib';
2
2
  import Vue from 'vue';
3
3
  import { Prop, Component } from 'vue-property-decorator';
4
4
  import '../../../components/animations/animate-width.vue.js';
@@ -88,11 +88,9 @@ import '../../../components/result/base-result-fallback-image.vue.js';
88
88
  import '../../../components/result/base-result-placeholder-image.vue.js';
89
89
  import '../../../components/scroll/scroll.mixin.js';
90
90
  import '../../../components/scroll/base-scroll.vue.js';
91
- import '../../../components/scroll/base-id-scroll.vue.js';
92
- import '../../../components/scroll/base-scroll-to-top.vue.js';
93
- import '../../../components/scroll/base-main-scroll.vue.js';
94
91
  import '../../../components/suggestions/base-suggestion.vue.js';
95
92
  import '../../../components/suggestions/base-suggestions.vue.js';
93
+ import '../../../components/auto-progress-bar.vue.js';
96
94
  import '../../../components/decorators/injection.consts.js';
97
95
  import '../../../components/base-grid.vue.js';
98
96
  import '../../../components/base-keyboard-navigation.vue.js';
@@ -100,12 +98,13 @@ import '../../../components/base-variable-column-grid.vue.js';
100
98
  import '../../../components/decorators/debounce.decorators.js';
101
99
  import '../../../components/sliding-panel.vue.js';
102
100
  import '../../../components/items-list.vue.js';
101
+ import { State } from '../../../components/decorators/store.decorators.js';
102
+ import '../../../components/x-component.utils.js';
103
+ import { xComponentMixin } from '../../../components/x-component.mixin.js';
103
104
  import '../../../components/layouts/multi-column-max-width-layout.vue.js';
104
105
  import '../../../components/layouts/single-column-layout.vue.js';
105
- import '../../../components/decorators/store.decorators.js';
106
+ import '../../../components/location-provider.vue.js';
106
107
  import '../../../components/items-list-injection.mixin.js';
107
- import '../../../components/x-component.utils.js';
108
- import { xComponentMixin } from '../../../components/x-component.mixin.js';
109
108
  import { extraParamsXModule } from '../x-module.js';
110
109
 
111
110
  /**
@@ -119,12 +118,23 @@ var ExtraParams = /** @class */ (function (_super) {
119
118
  function ExtraParams() {
120
119
  return _super !== null && _super.apply(this, arguments) || this;
121
120
  }
121
+ /**
122
+ * Emits the initial extra params, overriding with the state extra params, just in case, those
123
+ * values were already set by XComponents initialization (url, plugin config, etc.).
124
+ */
125
+ ExtraParams.prototype.mounted = function () {
126
+ this.$x.emit('ExtraParamsInitialized', this.values);
127
+ this.$x.emit('ExtraParamsProvided', __assign(__assign({}, this.values), this.storeExtraParams));
128
+ };
122
129
  // eslint-disable-next-line @typescript-eslint/no-empty-function
123
130
  ExtraParams.prototype.render = function () { };
124
131
  __decorate([
125
- XEmit('ExtraParamsProvided', { immediate: true, deep: true }),
132
+ XEmit('ExtraParamsProvided', { deep: true }),
126
133
  Prop({ required: true })
127
134
  ], ExtraParams.prototype, "values", void 0);
135
+ __decorate([
136
+ State('extraParams', 'params')
137
+ ], ExtraParams.prototype, "storeExtraParams", void 0);
128
138
  ExtraParams = __decorate([
129
139
  Component({
130
140
  mixins: [xComponentMixin(extraParamsXModule)]
@@ -1 +1 @@
1
- {"version":3,"file":"extra-params.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/extra-params/components/extra-params.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { xComponentMixin, XEmit } from '../../../components';\nimport { Dictionary } from '../../../utils';\nimport { extraParamsXModule } from '../x-module';\n\n/**\n * It emits a {@link ExtraParamsXEvents.ExtraParamsProvided} with the values\n * received as a prop.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(extraParamsXModule)]\n})\nexport default class ExtraParams extends Vue {\n /**\n * (Required) A Dictionary where the keys are the extra param names and its values.\n *\n * @remarks Emits the {@link ExtraParamsXEvents.ExtraParamsProvided} when the\n * component is rendered or the values changed.\n *\n * @public\n */\n @XEmit('ExtraParamsProvided', { immediate: true, deep: true })\n @Prop({ required: true })\n public values!: Dictionary<unknown>;\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;AASA;IAAyC,+BAAG;IAA5C;;KAeC;;IADC,4BAAM,GAAN,eAAiB;IAHjB;QAFC,KAAK,CAAC,qBAAqB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAC7D,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;+CACW;IAXjB,WAAW;QAH/B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,WAAW,CAe/B;IAAD,kBAAC;CAAA,CAfwC,GAAG;;;;"}
1
+ {"version":3,"file":"extra-params.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/extra-params/components/extra-params.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin, XEmit } from '../../../components';\nimport { Dictionary } from '../../../utils';\nimport { extraParamsXModule } from '../x-module';\n\n/**\n * It emits a {@link ExtraParamsXEvents.ExtraParamsProvided} with the values\n * received as a prop.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(extraParamsXModule)]\n})\nexport default class ExtraParams extends Vue {\n /**\n * Emits the initial extra params, overriding with the state extra params, just in case, those\n * values were already set by XComponents initialization (url, plugin config, etc.).\n */\n mounted(): void {\n this.$x.emit('ExtraParamsInitialized', this.values);\n this.$x.emit('ExtraParamsProvided', { ...this.values, ...this.storeExtraParams });\n }\n\n /**\n * (Required) A Dictionary where the keys are the extra param names and its values.\n *\n * @remarks Emits the {@link ExtraParamsXEvents.ExtraParamsProvided} when the\n * component is rendered or the values changed.\n *\n * @public\n */\n @XEmit('ExtraParamsProvided', { deep: true })\n @Prop({ required: true })\n public values!: Dictionary<unknown>;\n\n /**\n * State extra params. Used to override the initial extra params.\n */\n @State('extraParams', 'params')\n public storeExtraParams!: Dictionary<unknown>;\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;AASA;IAAyC,+BAAG;IAA5C;;KA8BC;;;;;IAzBC,6BAAO,GAAP;QACE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,qBAAqB,wBAAO,IAAI,CAAC,MAAM,GAAK,IAAI,CAAC,gBAAgB,EAAG,CAAC;KACnF;;IAqBD,4BAAM,GAAN,eAAiB;IATjB;QAFC,KAAK,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;+CACW;IAMpC;QADC,KAAK,CAAC,aAAa,EAAE,QAAQ,CAAC;yDACe;IA1B3B,WAAW;QAH/B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,WAAW,CA8B/B;IAAD,kBAAC;CAAA,CA9BwC,GAAG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"renderless-extra-param.vue.js","sources":["../../../../../src/x-modules/extra-params/components/renderless-extra-param.vue"],"sourcesContent":["<template>\n <NoElement>\n <slot v-bind=\"{ value, updateValue }\"></slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { NoElement, State, xComponentMixin } from '../../../components';\n import { Dictionary } from '../../../utils';\n import { ExtraParamsXEvents } from '../events.types';\n import { extraParamsXModule } from '../x-module';\n\n /**\n * It emits a {@link ExtraParamsXEvents.UserChangedExtraParams} when the `updateValue`\n * is called and the {@link ExtraParamsXEvents.ExtraParamsProvided} when it receives\n * a defaultValue.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(extraParamsXModule)],\n components: {\n NoElement\n }\n })\n export default class RenderlessExtraParam extends Vue {\n /**\n * The extra param's name.\n *\n * @public\n */\n @Prop({ required: true })\n public name!: string;\n\n /**\n * The extra param's default value.\n *\n * @public\n */\n @Prop()\n public defaultValue?: unknown;\n\n /**\n * A dictionary with the extra params.\n *\n * @public\n */\n @State('extraParams', 'params')\n public extraParams!: Dictionary<unknown>;\n\n /**\n * Emits the {@link ExtraParamsXEvents.ExtraParamsProvided} when the component\n * is mounted if the defaultValue is set.\n *\n * @internal\n */\n created(): void {\n this.$watch(\n () => this.defaultValue,\n defaultValue => {\n if (defaultValue !== undefined && this.value === undefined) {\n this.emitEvent('ExtraParamsProvided', this.defaultValue);\n }\n },\n { immediate: true }\n );\n }\n\n /**\n * It returns the value of the extra param from the store.\n *\n * @returns - The value from the store.\n *\n * @internal\n */\n protected get value(): unknown {\n return this.extraParams[this.name];\n }\n\n /**\n * It sets the new value to the store.\n *\n * @param newValue - The new value of the extra param.\n *\n * @internal\n */\n protected updateValue(newValue: unknown): void {\n this.emitEvent('UserChangedExtraParams', newValue);\n }\n\n /**\n * It emits an {@link ExtraParamsXEvents| event} passed as payload.\n *\n * @param event - The name of the event.\n * @param value - The value of the extra param.\n *\n * @internal\n */\n protected emitEvent(event: keyof ExtraParamsXEvents, value: unknown): void {\n this.$x.emit(event, { [this.name]: value });\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nRenders default slot content. It binds to the default slot the name of the extra parameter and the\ndefault value of it.\n\n## Basic usage\n\n```vue\n<template>\n <RenderlessExtraParam #default=\"{ value, updateValue }\" name=\"warehouse\" defaultValue=\"1234\">\n <BaseDropdown @change=\"updateValue\" :value=\"value\" :items=\"items\" />\n </RenderlessExtraParam>\n</template>\n\n<script>\n import { RenderlessExtraParams } from '@empathyco/x-components/extra-params';\n import { BaseDropdown } from '@empathyco/x-components';\n\n export default {\n name: 'RenderlessExtraParamsDemo',\n components: {\n RenderlessExtraParams,\n BaseDropdown\n },\n props: ['name', 'defaultValue'],\n data() {\n return {\n items: [1234, 4567]\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"renderless-extra-param.vue.js","sources":["../../../../../src/x-modules/extra-params/components/renderless-extra-param.vue"],"sourcesContent":["<template>\n <NoElement>\n <slot v-bind=\"{ value, updateValue }\"></slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { NoElement, State, xComponentMixin } from '../../../components';\n import { Dictionary } from '../../../utils';\n import { extraParamsXModule } from '../x-module';\n\n /**\n * It emits a {@link ExtraParamsXEvents.UserChangedExtraParams} when the `updateValue`\n * is called.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(extraParamsXModule)],\n components: {\n NoElement\n }\n })\n export default class RenderlessExtraParam extends Vue {\n /**\n * The extra param's name.\n *\n * @public\n */\n @Prop({ required: true })\n public name!: string;\n\n /**\n * A dictionary with the extra params in the store state.\n *\n * @public\n */\n @State('extraParams', 'params')\n public stateParams!: Dictionary<unknown>;\n\n /**\n * It returns the value of the extra param from the store.\n *\n * @returns - The value from the store.\n *\n * @internal\n */\n protected get value(): unknown {\n return this.stateParams[this.name];\n }\n\n /**\n * It sets the new value to the store.\n *\n * @param newValue - The new value of the extra param.\n *\n * @internal\n */\n protected updateValue(newValue: unknown): void {\n this.$x.emit('UserChangedExtraParams', { [this.name]: newValue });\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nRenders default slot content. It binds to the default slot the name of the extra parameter and the\ndefault value of it.\n\n## Basic usage\n\n```vue\n<template>\n <RenderlessExtraParam #default=\"{ value, updateValue }\" name=\"store\">\n <BaseDropdown @change=\"updateValue\" :value=\"value\" :items=\"items\" />\n </RenderlessExtraParam>\n</template>\n\n<script>\n import { RenderlessExtraParams } from '@empathyco/x-components/extra-params';\n import { BaseDropdown } from '@empathyco/x-components';\n\n export default {\n name: 'RenderlessExtraParamsDemo',\n components: {\n RenderlessExtraParams,\n BaseDropdown\n },\n props: ['name'],\n data() {\n return {\n items: ['spain', 'portugal']\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -88,11 +88,9 @@ import '../../../components/result/base-result-fallback-image.vue.js';
88
88
  import '../../../components/result/base-result-placeholder-image.vue.js';
89
89
  import '../../../components/scroll/scroll.mixin.js';
90
90
  import '../../../components/scroll/base-scroll.vue.js';
91
- import '../../../components/scroll/base-id-scroll.vue.js';
92
- import '../../../components/scroll/base-scroll-to-top.vue.js';
93
- import '../../../components/scroll/base-main-scroll.vue.js';
94
91
  import '../../../components/suggestions/base-suggestion.vue.js';
95
92
  import '../../../components/suggestions/base-suggestions.vue.js';
93
+ import '../../../components/auto-progress-bar.vue.js';
96
94
  import '../../../components/decorators/injection.consts.js';
97
95
  import '../../../components/base-grid.vue.js';
98
96
  import '../../../components/base-keyboard-navigation.vue.js';
@@ -100,18 +98,18 @@ import '../../../components/base-variable-column-grid.vue.js';
100
98
  import '../../../components/decorators/debounce.decorators.js';
101
99
  import '../../../components/sliding-panel.vue.js';
102
100
  import '../../../components/items-list.vue.js';
103
- import '../../../components/layouts/multi-column-max-width-layout.vue.js';
104
- import '../../../components/layouts/single-column-layout.vue.js';
105
101
  import { State } from '../../../components/decorators/store.decorators.js';
106
- import '../../../components/items-list-injection.mixin.js';
107
102
  import '../../../components/x-component.utils.js';
108
103
  import { xComponentMixin } from '../../../components/x-component.mixin.js';
104
+ import '../../../components/layouts/multi-column-max-width-layout.vue.js';
105
+ import '../../../components/layouts/single-column-layout.vue.js';
106
+ import '../../../components/location-provider.vue.js';
107
+ import '../../../components/items-list-injection.mixin.js';
109
108
  import { extraParamsXModule } from '../x-module.js';
110
109
 
111
110
  /**
112
111
  * It emits a {@link ExtraParamsXEvents.UserChangedExtraParams} when the `updateValue`
113
- * is called and the {@link ExtraParamsXEvents.ExtraParamsProvided} when it receives
114
- * a defaultValue.
112
+ * is called.
115
113
  *
116
114
  * @public
117
115
  */
@@ -120,20 +118,6 @@ var RenderlessExtraParam = /** @class */ (function (_super) {
120
118
  function RenderlessExtraParam() {
121
119
  return _super !== null && _super.apply(this, arguments) || this;
122
120
  }
123
- /**
124
- * Emits the {@link ExtraParamsXEvents.ExtraParamsProvided} when the component
125
- * is mounted if the defaultValue is set.
126
- *
127
- * @internal
128
- */
129
- RenderlessExtraParam.prototype.created = function () {
130
- var _this = this;
131
- this.$watch(function () { return _this.defaultValue; }, function (defaultValue) {
132
- if (defaultValue !== undefined && _this.value === undefined) {
133
- _this.emitEvent('ExtraParamsProvided', _this.defaultValue);
134
- }
135
- }, { immediate: true });
136
- };
137
121
  Object.defineProperty(RenderlessExtraParam.prototype, "value", {
138
122
  /**
139
123
  * It returns the value of the extra param from the store.
@@ -143,7 +127,7 @@ var RenderlessExtraParam = /** @class */ (function (_super) {
143
127
  * @internal
144
128
  */
145
129
  get: function () {
146
- return this.extraParams[this.name];
130
+ return this.stateParams[this.name];
147
131
  },
148
132
  enumerable: false,
149
133
  configurable: true
@@ -156,29 +140,15 @@ var RenderlessExtraParam = /** @class */ (function (_super) {
156
140
  * @internal
157
141
  */
158
142
  RenderlessExtraParam.prototype.updateValue = function (newValue) {
159
- this.emitEvent('UserChangedExtraParams', newValue);
160
- };
161
- /**
162
- * It emits an {@link ExtraParamsXEvents| event} passed as payload.
163
- *
164
- * @param event - The name of the event.
165
- * @param value - The value of the extra param.
166
- *
167
- * @internal
168
- */
169
- RenderlessExtraParam.prototype.emitEvent = function (event, value) {
170
143
  var _a;
171
- this.$x.emit(event, (_a = {}, _a[this.name] = value, _a));
144
+ this.$x.emit('UserChangedExtraParams', (_a = {}, _a[this.name] = newValue, _a));
172
145
  };
173
146
  __decorate([
174
147
  Prop({ required: true })
175
148
  ], RenderlessExtraParam.prototype, "name", void 0);
176
- __decorate([
177
- Prop()
178
- ], RenderlessExtraParam.prototype, "defaultValue", void 0);
179
149
  __decorate([
180
150
  State('extraParams', 'params')
181
- ], RenderlessExtraParam.prototype, "extraParams", void 0);
151
+ ], RenderlessExtraParam.prototype, "stateParams", void 0);
182
152
  RenderlessExtraParam = __decorate([
183
153
  Component({
184
154
  mixins: [xComponentMixin(extraParamsXModule)],
@@ -1 +1 @@
1
- {"version":3,"file":"renderless-extra-param.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/extra-params/components/renderless-extra-param.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { Dictionary } from '../../../utils';\nimport { ExtraParamsXEvents } from '../events.types';\nimport { extraParamsXModule } from '../x-module';\n\n/**\n * It emits a {@link ExtraParamsXEvents.UserChangedExtraParams} when the `updateValue`\n * is called and the {@link ExtraParamsXEvents.ExtraParamsProvided} when it receives\n * a defaultValue.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(extraParamsXModule)],\n components: {\n NoElement\n }\n})\nexport default class RenderlessExtraParam extends Vue {\n /**\n * The extra param's name.\n *\n * @public\n */\n @Prop({ required: true })\n public name!: string;\n\n /**\n * The extra param's default value.\n *\n * @public\n */\n @Prop()\n public defaultValue?: unknown;\n\n /**\n * A dictionary with the extra params.\n *\n * @public\n */\n @State('extraParams', 'params')\n public extraParams!: Dictionary<unknown>;\n\n /**\n * Emits the {@link ExtraParamsXEvents.ExtraParamsProvided} when the component\n * is mounted if the defaultValue is set.\n *\n * @internal\n */\n created(): void {\n this.$watch(\n () => this.defaultValue,\n defaultValue => {\n if (defaultValue !== undefined && this.value === undefined) {\n this.emitEvent('ExtraParamsProvided', this.defaultValue);\n }\n },\n { immediate: true }\n );\n }\n\n /**\n * It returns the value of the extra param from the store.\n *\n * @returns - The value from the store.\n *\n * @internal\n */\n protected get value(): unknown {\n return this.extraParams[this.name];\n }\n\n /**\n * It sets the new value to the store.\n *\n * @param newValue - The new value of the extra param.\n *\n * @internal\n */\n protected updateValue(newValue: unknown): void {\n this.emitEvent('UserChangedExtraParams', newValue);\n }\n\n /**\n * It emits an {@link ExtraParamsXEvents| event} passed as payload.\n *\n * @param event - The name of the event.\n * @param value - The value of the extra param.\n *\n * @internal\n */\n protected emitEvent(event: keyof ExtraParamsXEvents, value: unknown): void {\n this.$x.emit(event, { [this.name]: value });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA;;;;;;;AAaA;IAAkD,wCAAG;IAArD;;KA4EC;;;;;;;IA7CC,sCAAO,GAAP;QAAA,iBAUC;QATC,IAAI,CAAC,MAAM,CACT,cAAM,OAAA,KAAI,CAAC,YAAY,GAAA,EACvB,UAAA,YAAY;YACV,IAAI,YAAY,KAAK,SAAS,IAAI,KAAI,CAAC,KAAK,KAAK,SAAS,EAAE;gBAC1D,KAAI,CAAC,SAAS,CAAC,qBAAqB,EAAE,KAAI,CAAC,YAAY,CAAC,CAAC;aAC1D;SACF,EACD,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC;KACH;IASD,sBAAc,uCAAK;;;;;;;;aAAnB;YACE,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACpC;;;OAAA;;;;;;;;IASS,0CAAW,GAArB,UAAsB,QAAiB;QACrC,IAAI,CAAC,SAAS,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;KACpD;;;;;;;;;IAUS,wCAAS,GAAnB,UAAoB,KAA+B,EAAE,KAAc;;QACjE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,YAAI,GAAC,IAAI,CAAC,IAAI,IAAG,KAAK,MAAG,CAAC;KAC7C;IApED;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sDACJ;IAQrB;QADC,IAAI,EAAE;8DACuB;IAQ9B;QADC,KAAK,CAAC,aAAa,EAAE,QAAQ,CAAC;6DACU;IAvBtB,oBAAoB;QANxC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;YAC7C,UAAU,EAAE;gBACV,SAAS,WAAA;aACV;SACF,CAAC;OACmB,oBAAoB,CA4ExC;IAAD,2BAAC;CAAA,CA5EiD,GAAG;;;;"}
1
+ {"version":3,"file":"renderless-extra-param.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/extra-params/components/renderless-extra-param.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { Dictionary } from '../../../utils';\nimport { extraParamsXModule } from '../x-module';\n\n/**\n * It emits a {@link ExtraParamsXEvents.UserChangedExtraParams} when the `updateValue`\n * is called.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(extraParamsXModule)],\n components: {\n NoElement\n }\n})\nexport default class RenderlessExtraParam extends Vue {\n /**\n * The extra param's name.\n *\n * @public\n */\n @Prop({ required: true })\n public name!: string;\n\n /**\n * A dictionary with the extra params in the store state.\n *\n * @public\n */\n @State('extraParams', 'params')\n public stateParams!: Dictionary<unknown>;\n\n /**\n * It returns the value of the extra param from the store.\n *\n * @returns - The value from the store.\n *\n * @internal\n */\n protected get value(): unknown {\n return this.stateParams[this.name];\n }\n\n /**\n * It sets the new value to the store.\n *\n * @param newValue - The new value of the extra param.\n *\n * @internal\n */\n protected updateValue(newValue: unknown): void {\n this.$x.emit('UserChangedExtraParams', { [this.name]: newValue });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA;;;;;;AAYA;IAAkD,wCAAG;IAArD;;KAsCC;IAdC,sBAAc,uCAAK;;;;;;;;aAAnB;YACE,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACpC;;;OAAA;;;;;;;;IASS,0CAAW,GAArB,UAAsB,QAAiB;;QACrC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,YAAI,GAAC,IAAI,CAAC,IAAI,IAAG,QAAQ,MAAG,CAAC;KACnE;IA9BD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sDACJ;IAQrB;QADC,KAAK,CAAC,aAAa,EAAE,QAAQ,CAAC;6DACU;IAftB,oBAAoB;QANxC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;YAC7C,UAAU,EAAE;gBACV,SAAS,WAAA;aACV;SACF,CAAC;OACmB,oBAAoB,CAsCxC;IAAD,2BAAC;CAAA,CAtCiD,GAAG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"snippet-config-extra-params.vue.js","sources":["../../../../../src/x-modules/extra-params/components/snippet-config-extra-params.vue"],"sourcesContent":["<template>\n <ExtraParams :values=\"extraParams\" />\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Watch } from 'vue-property-decorator';\n import { xComponentMixin, XInject } from '../../../components';\n import { Dictionary, forEach } from '../../../utils';\n import { SnippetConfig } from '../../../x-installer';\n import { extraParamsXModule } from '../x-module';\n import ExtraParams from './extra-params.vue';\n\n /**\n * Extracts the extra parameters from the {@link SnippetConfig} and syncs it with the request\n * objects of every x-module.\n *\n * @public\n */\n @Component({\n components: { ExtraParams },\n mixins: [xComponentMixin(extraParamsXModule)]\n })\n export default class SnippetConfigExtraParams extends Vue {\n /**\n * It injects {@link SnippetConfig} provided by an ancestor as snippetConfig.\n *\n * @internal\n */\n @XInject('snippetConfig')\n public snippetConfig!: SnippetConfig;\n\n /**\n * Custom object containing the extra params from the snippet config.\n *\n * @remarks This object keeps manually the desired snippet config properties to avoid\n * unnecessary re-renders.\n *\n * @internal\n */\n protected extraParams: Dictionary<unknown> = {};\n\n /**\n * Updates the extraParams object when the snippet config changes.\n *\n * @param snippetConfig - The new snippet config.\n *\n * @internal\n */\n @Watch('snippetConfig', { deep: true, immediate: true })\n syncExtraParams({\n instance,\n env,\n scope,\n lang,\n searchLang,\n consent,\n documentDirection,\n currency,\n ...snippetExtraParams\n }: SnippetConfig): void {\n forEach(snippetExtraParams, (name, value) => {\n this.$set(this.extraParams, name, value);\n });\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\n_See how the snippet config is injected and passed to the SnippetConfigExtraParams component._\n\n```vue\n<template>\n <Provider>\n <SnippetConfigExtraParams />\n </Provider>\n</template>\n\n<script>\n import { SnippetConfigExtraParams } from '@empathyco/x-components/extra-params';\n\n const Provider = {\n provide: {\n snippetConfig: {\n instance: 'demo',\n lang: 'es',\n warehouse: 1234\n }\n }\n };\n\n export default {\n name: 'SnippetConfigExtraParamsDemo',\n components: {\n Provider,\n SnippetConfigExtraParams\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"snippet-config-extra-params.vue.js","sources":["../../../../../src/x-modules/extra-params/components/snippet-config-extra-params.vue"],"sourcesContent":["<template>\n <ExtraParams :values=\"extraParams\" />\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Watch, Inject } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components';\n import { Dictionary, forEach } from '../../../utils';\n import { SnippetConfig } from '../../../x-installer';\n import { extraParamsXModule } from '../x-module';\n import ExtraParams from './extra-params.vue';\n\n /**\n * Extracts the extra parameters from the {@link SnippetConfig} and syncs it with the request\n * objects of every x-module.\n *\n * @public\n */\n @Component({\n components: { ExtraParams },\n mixins: [xComponentMixin(extraParamsXModule)]\n })\n export default class SnippetConfigExtraParams extends Vue {\n /**\n * It injects {@link SnippetConfig} provided by an ancestor as snippetConfig.\n *\n * @internal\n */\n @Inject('snippetConfig')\n public snippetConfig!: SnippetConfig;\n\n /**\n * Custom object containing the extra params from the snippet config.\n *\n * @remarks This object keeps manually the desired snippet config properties to avoid\n * unnecessary re-renders.\n *\n * @internal\n */\n protected extraParams: Dictionary<unknown> = {};\n\n /**\n * Updates the extraParams object when the snippet config changes.\n *\n * @param snippetConfig - The new snippet config.\n *\n * @internal\n */\n @Watch('snippetConfig', { deep: true, immediate: true })\n syncExtraParams({\n instance,\n scope,\n lang,\n searchLang,\n consent,\n documentDirection,\n currency,\n ...snippetExtraParams\n }: SnippetConfig): void {\n forEach(snippetExtraParams, (name, value) => {\n this.$set(this.extraParams, name, value);\n });\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\n_See how the snippet config is injected and passed to the SnippetConfigExtraParams component._\n\n```vue\n<template>\n <Provider>\n <SnippetConfigExtraParams />\n </Provider>\n</template>\n\n<script>\n import { SnippetConfigExtraParams } from '@empathyco/x-components/extra-params';\n\n const Provider = {\n provide: {\n snippetConfig: {\n instance: 'demo',\n lang: 'es',\n warehouse: 1234\n }\n }\n };\n\n export default {\n name: 'SnippetConfigExtraParamsDemo',\n components: {\n Provider,\n SnippetConfigExtraParams\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}