@empathyco/x-components 3.0.0-alpha.34 → 3.0.0-alpha.35

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 (421) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/core/index.js +23 -22
  3. package/core/index.js.map +1 -1
  4. package/docs/API-reference/api/x-components.baseidtogglepanel.md +0 -1
  5. package/docs/API-reference/api/x-components.baseresultlink.md +1 -1
  6. package/docs/API-reference/api/x-components.fixedheaderandasideslayout.isbackdropvisible.md +11 -0
  7. package/docs/API-reference/api/x-components.fixedheaderandasideslayout.leftasideanimation.md +11 -0
  8. package/docs/API-reference/api/x-components.fixedheaderandasideslayout.md +30 -0
  9. package/docs/API-reference/api/x-components.fixedheaderandasideslayout.rightasideanimation.md +11 -0
  10. package/docs/API-reference/api/x-components.fixedheaderandasideslayout.scrollposition.md +11 -0
  11. package/docs/API-reference/api/x-components.fixedheaderandasideslayout.setposition.md +22 -0
  12. package/docs/API-reference/api/x-components.getrootxcomponent.md +2 -2
  13. package/docs/API-reference/api/x-components.isxcomponent.md +2 -2
  14. package/docs/API-reference/api/x-components.maybearray.md +13 -0
  15. package/docs/API-reference/api/x-components.md +11 -7
  16. package/docs/API-reference/api/x-components.namespaceddebounce.md +2 -2
  17. package/docs/API-reference/api/x-components.namespacedthrottle.md +2 -2
  18. package/docs/API-reference/api/{x-components.namespacedtimeretrieving.md → x-components.namespacedtimeselector.md} +3 -3
  19. package/docs/API-reference/api/x-components.namespacedtimewireoperator.md +3 -3
  20. package/docs/API-reference/api/x-components.searchxevents.md +2 -0
  21. package/docs/API-reference/api/x-components.searchxevents.userclickedabanner.md +13 -0
  22. package/docs/API-reference/api/x-components.searchxevents.userclickedapromoted.md +13 -0
  23. package/docs/API-reference/api/x-components.setconsent.md +1 -1
  24. package/docs/API-reference/api/x-components.setquerytaggingdebounce.md +1 -1
  25. package/docs/API-reference/api/x-components.setsessionduration.md +1 -1
  26. package/docs/API-reference/api/x-components.throttle.md +3 -3
  27. package/docs/API-reference/api/x-components.timedwireoperatoroptions.cancelon.md +13 -0
  28. package/docs/API-reference/api/x-components.timedwireoperatoroptions.forceon.md +13 -0
  29. package/docs/API-reference/api/x-components.timedwireoperatoroptions.md +21 -0
  30. package/docs/API-reference/api/{x-components.timeretrieving.md → x-components.timeselector.md} +3 -3
  31. package/docs/API-reference/api/x-components.trackaddtocartwire.md +13 -0
  32. package/docs/API-reference/api/{x-components.trackwire.md → x-components.trackquerywire.md} +3 -3
  33. package/docs/API-reference/api/x-components.trackresultclickedwire.md +13 -0
  34. package/docs/API-reference/api/x-components.xeventstypes.md +0 -1
  35. package/docs/API-reference/api/x-components.xinstaller.md +1 -1
  36. package/docs/API-reference/components/common/animations/x-components.animate-width.md +1 -1
  37. package/docs/API-reference/components/common/animations/x-components.collapse-from-top.md +1 -1
  38. package/docs/API-reference/components/common/animations/x-components.collapse-height.md +1 -1
  39. package/docs/API-reference/components/common/animations/x-components.collapse-width.md +1 -1
  40. package/docs/API-reference/components/common/animations/x-components.cross-fade.md +1 -1
  41. package/docs/API-reference/components/common/animations/x-components.fade-and-slide.md +1 -1
  42. package/docs/API-reference/components/common/{x-components.staggering-transition-group.md → animations/x-components.staggering-transition-group.md} +2 -2
  43. package/docs/API-reference/components/common/animations/x-components.translate-from-left.md +1 -1
  44. package/docs/API-reference/components/common/animations/x-components.translate-from-right.md +1 -1
  45. package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-dropdown.md +5 -5
  46. package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-list.md +5 -5
  47. package/docs/API-reference/components/common/currency/x-components.base-currency.md +2 -4
  48. package/docs/API-reference/components/common/filters/labels/x-components.base-price-filter-label.md +2 -2
  49. package/docs/API-reference/components/common/filters/labels/x-components.base-rating-filter-label.md +4 -4
  50. package/docs/API-reference/components/common/layouts/x-components.fixed-header-and-asides-layout.md +2 -2
  51. package/docs/API-reference/components/common/layouts/x-components.multi-column-max-width-layout.md +2 -2
  52. package/docs/API-reference/components/common/modals/x-components.base-events-modal-close.md +3 -3
  53. package/docs/API-reference/components/common/modals/x-components.base-events-modal-open.md +3 -3
  54. package/docs/API-reference/components/common/modals/x-components.base-events-modal.md +3 -3
  55. package/docs/API-reference/components/common/modals/x-components.base-id-modal-close.md +2 -2
  56. package/docs/API-reference/components/common/modals/x-components.base-id-modal-open.md +2 -2
  57. package/docs/API-reference/components/common/modals/x-components.base-id-modal.md +2 -2
  58. package/docs/API-reference/components/common/modals/x-components.base-modal.md +1 -1
  59. package/docs/API-reference/components/common/panels/x-components.base-header-toggle-panel.md +4 -4
  60. package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel-button.md +2 -2
  61. package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel.md +2 -2
  62. package/docs/API-reference/components/common/panels/x-components.base-toggle-panel.md +2 -2
  63. package/docs/API-reference/components/common/result/x-components.base-result-add-to-cart.md +2 -2
  64. package/docs/API-reference/components/common/result/x-components.base-result-current-price.md +3 -3
  65. package/docs/API-reference/components/common/result/x-components.base-result-image.md +3 -3
  66. package/docs/API-reference/components/common/result/x-components.base-result-link.md +11 -19
  67. package/docs/API-reference/components/common/result/x-components.base-result-previous-price.md +3 -3
  68. package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +2 -2
  69. package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +3 -3
  70. package/docs/API-reference/components/common/suggestions/x-components.base-suggestions.md +1 -1
  71. package/docs/API-reference/components/common/x-components.base-dropdown.md +1 -1
  72. package/docs/API-reference/components/common/x-components.base-event-button.md +2 -2
  73. package/docs/API-reference/components/common/x-components.base-grid.md +4 -4
  74. package/docs/API-reference/components/common/x-components.base-keyboard-navigation.md +4 -4
  75. package/docs/API-reference/components/common/x-components.base-rating.md +3 -3
  76. package/docs/API-reference/components/common/x-components.base-variable-column-grid.md +1 -1
  77. package/docs/API-reference/components/common/x-components.sliding-panel.md +4 -4
  78. package/docs/API-reference/components/empathize/x-components.empathize.md +2 -2
  79. package/docs/API-reference/components/extra-params/x-components.renderless-extra-param.md +2 -2
  80. package/docs/API-reference/components/facets/x-components.clear-filters.md +3 -3
  81. package/docs/API-reference/components/facets/x-components.facets/facets-provider.md +1 -1
  82. package/docs/API-reference/components/facets/x-components.facets/facets.md +6 -6
  83. package/docs/API-reference/components/facets/x-components.filters/all-filter.md +5 -5
  84. package/docs/API-reference/components/facets/x-components.filters/base-filter.md +4 -4
  85. package/docs/API-reference/components/facets/x-components.filters/editable-number-range-filter.md +5 -5
  86. package/docs/API-reference/components/facets/x-components.filters/hierarchical-filter.md +4 -4
  87. package/docs/API-reference/components/facets/x-components.filters/number-range-filter.md +3 -3
  88. package/docs/API-reference/components/facets/x-components.filters/renderless-filter.md +3 -3
  89. package/docs/API-reference/components/facets/x-components.filters/simple-filter.md +4 -4
  90. package/docs/API-reference/components/facets/x-components.lists/exclude-filters-with-no-results.md +3 -3
  91. package/docs/API-reference/components/facets/x-components.lists/filters-list.md +3 -3
  92. package/docs/API-reference/components/facets/x-components.lists/filters-search.md +3 -3
  93. package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +5 -5
  94. package/docs/API-reference/components/facets/x-components.lists/selected-filters.md +4 -4
  95. package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +3 -3
  96. package/docs/API-reference/components/facets/x-components.lists/sorted-filters.md +5 -5
  97. package/docs/API-reference/components/history-queries/x-components.clear-history-queries.md +2 -2
  98. package/docs/API-reference/components/history-queries/x-components.history-queries.md +4 -4
  99. package/docs/API-reference/components/history-queries/x-components.history-query.md +3 -3
  100. package/docs/API-reference/components/history-queries/x-components.remove-history-query.md +2 -2
  101. package/docs/API-reference/components/identifier-results/x-components.identifier-result.md +2 -2
  102. package/docs/API-reference/components/identifier-results/x-components.identifier-results.md +2 -2
  103. package/docs/API-reference/components/next-queries/x-components.next-queries.md +4 -4
  104. package/docs/API-reference/components/next-queries/x-components.next-query.md +3 -3
  105. package/docs/API-reference/components/popular-searches/x-components.popular-search.md +3 -3
  106. package/docs/API-reference/components/popular-searches/x-components.popular-searches.md +4 -4
  107. package/docs/API-reference/components/recommendations/x-components.recommendations.md +4 -4
  108. package/docs/API-reference/components/scroll/x-components.scroll-to-top.md +2 -2
  109. package/docs/API-reference/components/scroll/x-components.scroll.md +18 -22
  110. package/docs/API-reference/components/scroll/x-components.window-scroll.md +5 -7
  111. package/docs/API-reference/components/search/x-components.partial-query-button.md +3 -3
  112. package/docs/API-reference/components/search/x-components.partial-results-list.md +4 -4
  113. package/docs/API-reference/components/search/x-components.redirection.md +1 -1
  114. package/docs/API-reference/components/search/x-components.sort-dropdown.md +1 -1
  115. package/docs/API-reference/components/search/x-components.sort-list.md +1 -1
  116. package/docs/API-reference/components/search/x-components.spellcheck-button.md +3 -3
  117. package/docs/API-reference/components/search/x-components.spellcheck.md +3 -3
  118. package/docs/build-search-ui/web-archetype-development-guide.md +178 -0
  119. package/docs/build-search-ui/web-archetype-integration-guide.md +146 -138
  120. package/docs/build-search-ui/web-x-components-integration-guide.md +3 -3
  121. package/js/components/animations/animate-width.vue.js +2 -2
  122. package/js/components/animations/animate-width.vue.js.map +1 -1
  123. package/js/components/animations/collapse-from-top.vue.js +2 -2
  124. package/js/components/animations/collapse-from-top.vue.js.map +1 -1
  125. package/js/components/animations/collapse-height.vue.js +2 -2
  126. package/js/components/animations/collapse-height.vue.js.map +1 -1
  127. package/js/components/animations/collapse-width.vue.js +2 -2
  128. package/js/components/animations/collapse-width.vue.js.map +1 -1
  129. package/js/components/animations/cross-fade.vue.js +2 -2
  130. package/js/components/animations/cross-fade.vue.js.map +1 -1
  131. package/js/components/animations/fade-and-slide.vue.js +2 -2
  132. package/js/components/animations/fade-and-slide.vue.js.map +1 -1
  133. package/js/components/animations/staggered-fade-and-slide.vue.js +2 -2
  134. package/js/components/animations/staggered-fade-and-slide.vue.js.map +1 -1
  135. package/js/components/animations/staggered-fade-and-slide.vue_rollup-plugin-vue=script.js +1 -1
  136. package/js/components/animations/staggered-fade-and-slide.vue_rollup-plugin-vue=script.js.map +1 -1
  137. package/js/components/{staggering-transition-group.vue.js → animations/staggering-transition-group.vue.js} +2 -2
  138. package/js/components/animations/staggering-transition-group.vue.js.map +1 -0
  139. package/js/components/{staggering-transition-group.vue_rollup-plugin-vue=script.js → animations/staggering-transition-group.vue_rollup-plugin-vue=script.js} +17 -17
  140. package/js/components/animations/staggering-transition-group.vue_rollup-plugin-vue=script.js.map +1 -0
  141. package/js/components/animations/translate-from-left.vue.js +2 -2
  142. package/js/components/animations/translate-from-left.vue.js.map +1 -1
  143. package/js/components/animations/translate-from-right.vue.js +2 -2
  144. package/js/components/animations/translate-from-right.vue.js.map +1 -1
  145. package/js/components/base-dropdown.vue.js +2 -2
  146. package/js/components/base-dropdown.vue.js.map +1 -1
  147. package/js/components/base-event-button.vue.js.map +1 -1
  148. package/js/components/base-grid.vue.js +2 -2
  149. package/js/components/base-grid.vue.js.map +1 -1
  150. package/js/components/base-keyboard-navigation.vue.js.map +1 -1
  151. package/js/components/base-rating.vue.js +2 -2
  152. package/js/components/base-rating.vue.js.map +1 -1
  153. package/js/components/base-variable-column-grid.vue.js.map +1 -1
  154. package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
  155. package/js/components/column-picker/base-column-picker-list.vue.js +2 -2
  156. package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
  157. package/js/components/currency/base-currency.vue.js.map +1 -1
  158. package/js/components/filters/labels/base-price-filter-label.vue.js.map +1 -1
  159. package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
  160. package/js/components/global-x-bus.vue.js.map +1 -1
  161. package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js +2 -1
  162. package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js.map +1 -1
  163. package/js/components/layouts/fixed-header-and-asides-layout.vue.js +212 -0
  164. package/js/components/layouts/fixed-header-and-asides-layout.vue.js.map +1 -0
  165. package/js/components/layouts/fixed-header-and-asides-layout.vue_rollup-plugin-vue=script.js +57 -0
  166. package/js/components/layouts/fixed-header-and-asides-layout.vue_rollup-plugin-vue=script.js.map +1 -0
  167. package/js/components/layouts/multi-column-max-width-layout.vue.js +3 -3
  168. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  169. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue=script.js +1 -1
  170. package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js +1 -1
  171. package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
  172. package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
  173. package/js/components/modals/base-events-modal.vue.js.map +1 -1
  174. package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
  175. package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
  176. package/js/components/modals/base-id-modal.vue.js.map +1 -1
  177. package/js/components/modals/base-modal.vue.js +2 -2
  178. package/js/components/modals/base-modal.vue.js.map +1 -1
  179. package/js/components/panels/base-header-toggle-panel.vue.js +2 -2
  180. package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
  181. package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
  182. package/js/components/panels/base-id-toggle-panel.vue.js.map +1 -1
  183. package/js/components/panels/base-id-toggle-panel.vue_rollup-plugin-vue=script.js +4 -9
  184. package/js/components/panels/base-id-toggle-panel.vue_rollup-plugin-vue=script.js.map +1 -1
  185. package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
  186. package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
  187. package/js/components/result/base-result-current-price.vue.js.map +1 -1
  188. package/js/components/result/base-result-image.vue.js +2 -2
  189. package/js/components/result/base-result-image.vue.js.map +1 -1
  190. package/js/components/result/base-result-link.vue.js +5 -5
  191. package/js/components/result/base-result-link.vue.js.map +1 -1
  192. package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js +3 -12
  193. package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js.map +1 -1
  194. package/js/components/result/base-result-previous-price.vue.js.map +1 -1
  195. package/js/components/scroll/base-scroll.vue.js +2 -2
  196. package/js/components/scroll/base-scroll.vue.js.map +1 -1
  197. package/js/components/sliding-panel.vue.js +2 -2
  198. package/js/components/sliding-panel.vue.js.map +1 -1
  199. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  200. package/js/components/suggestions/base-suggestions.vue.js +2 -2
  201. package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
  202. package/js/components/x-component.mixin.js +1 -4
  203. package/js/components/x-component.mixin.js.map +1 -1
  204. package/js/components/x-component.utils.js +4 -20
  205. package/js/components/x-component.utils.js.map +1 -1
  206. package/js/index.js +31 -30
  207. package/js/index.js.map +1 -1
  208. package/js/plugins/x-plugin.alias.js +21 -20
  209. package/js/plugins/x-plugin.alias.js.map +1 -1
  210. package/js/plugins/x-plugin.mixin.js +2 -2
  211. package/js/plugins/x-plugin.mixin.js.map +1 -1
  212. package/js/wiring/namespaced-wires.operators.js +3 -4
  213. package/js/wiring/namespaced-wires.operators.js.map +1 -1
  214. package/js/wiring/wires-operators.utils.js +55 -0
  215. package/js/wiring/wires-operators.utils.js.map +1 -0
  216. package/js/wiring/wires.operators.js +17 -12
  217. package/js/wiring/wires.operators.js.map +1 -1
  218. package/js/x-installer/x-installer/x-installer.js +1 -1
  219. package/js/x-installer/x-installer/x-installer.js.map +1 -1
  220. package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
  221. package/js/x-modules/empathize/components/empathize.vue_rollup-plugin-vue=script.js +1 -1
  222. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +13 -12
  223. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  224. package/js/x-modules/extra-params/components/renderless-extra-param.vue.js.map +1 -1
  225. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +13 -12
  226. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js.map +1 -1
  227. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue.js.map +1 -1
  228. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +22 -12
  229. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  230. package/js/x-modules/facets/components/clear-filters.vue.js.map +1 -1
  231. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +13 -12
  232. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  233. package/js/x-modules/facets/components/facets/facets-provider.vue.js +2 -2
  234. package/js/x-modules/facets/components/facets/facets-provider.vue.js.map +1 -1
  235. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +17 -23
  236. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
  237. package/js/x-modules/facets/components/facets/facets.vue.js +2 -2
  238. package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
  239. package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
  240. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +13 -12
  241. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  242. package/js/x-modules/facets/components/filters/base-filter.vue.js.map +1 -1
  243. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +13 -12
  244. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  245. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +1 -1
  246. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
  247. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
  248. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +13 -12
  249. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  250. package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
  251. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +13 -12
  252. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  253. package/js/x-modules/facets/components/filters/renderless-filter.vue.js.map +1 -1
  254. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +13 -12
  255. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  256. package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
  257. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +13 -12
  258. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  259. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue.js.map +1 -1
  260. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +13 -12
  261. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js.map +1 -1
  262. package/js/x-modules/facets/components/lists/filters-list.vue.js +2 -2
  263. package/js/x-modules/facets/components/lists/filters-list.vue.js.map +1 -1
  264. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +13 -12
  265. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
  266. package/js/x-modules/facets/components/lists/filters-search.vue.js +2 -2
  267. package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
  268. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +13 -12
  269. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map +1 -1
  270. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
  271. package/js/x-modules/facets/components/lists/selected-filters.vue.js.map +1 -1
  272. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +13 -12
  273. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  274. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  275. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +13 -12
  276. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  277. package/js/x-modules/facets/components/lists/sorted-filters.vue.js.map +1 -1
  278. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +13 -12
  279. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  280. package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
  281. package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
  282. package/js/x-modules/history-queries/components/history-queries.vue_rollup-plugin-vue=script.js +1 -1
  283. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  284. package/js/x-modules/history-queries/components/history-query.vue_rollup-plugin-vue=script.js +1 -1
  285. package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
  286. package/js/x-modules/history-queries/wiring.js +1 -1
  287. package/js/x-modules/history-queries/wiring.js.map +1 -1
  288. package/js/x-modules/identifier-results/components/identifier-result.vue.js.map +1 -1
  289. package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
  290. package/js/x-modules/identifier-results/wiring.js +1 -1
  291. package/js/x-modules/identifier-results/wiring.js.map +1 -1
  292. package/js/x-modules/next-queries/components/next-queries-list.vue_rollup-plugin-vue=script.js +1 -1
  293. package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
  294. package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue=script.js +1 -1
  295. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  296. package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js +1 -1
  297. package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
  298. package/js/x-modules/popular-searches/components/popular-search.vue_rollup-plugin-vue=script.js +1 -1
  299. package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
  300. package/js/x-modules/popular-searches/components/popular-searches.vue_rollup-plugin-vue=script.js +1 -1
  301. package/js/x-modules/query-suggestions/components/query-suggestion.vue_rollup-plugin-vue=script.js +1 -1
  302. package/js/x-modules/query-suggestions/components/query-suggestions.vue_rollup-plugin-vue=script.js +1 -1
  303. package/js/x-modules/query-suggestions/wiring.js +1 -1
  304. package/js/x-modules/query-suggestions/wiring.js.map +1 -1
  305. package/js/x-modules/recommendations/components/recommendations.vue.js +2 -2
  306. package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
  307. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +15 -14
  308. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -1
  309. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
  310. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js +15 -14
  311. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -1
  312. package/js/x-modules/scroll/components/scroll.vue.js.map +1 -1
  313. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +1 -1
  314. package/js/x-modules/scroll/components/window-scroll.vue.js.map +1 -1
  315. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +15 -14
  316. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
  317. package/js/x-modules/search/components/banner.vue.js +2 -1
  318. package/js/x-modules/search/components/banner.vue.js.map +1 -1
  319. package/js/x-modules/search/components/banner.vue_rollup-plugin-vue=script.js +8 -0
  320. package/js/x-modules/search/components/banner.vue_rollup-plugin-vue=script.js.map +1 -1
  321. package/js/x-modules/search/components/banners-list.vue_rollup-plugin-vue=script.js +1 -1
  322. package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
  323. package/js/x-modules/search/components/partial-results-list.vue.js +2 -2
  324. package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
  325. package/js/x-modules/search/components/promoted.vue.js +2 -1
  326. package/js/x-modules/search/components/promoted.vue.js.map +1 -1
  327. package/js/x-modules/search/components/promoted.vue_rollup-plugin-vue=script.js +8 -0
  328. package/js/x-modules/search/components/promoted.vue_rollup-plugin-vue=script.js.map +1 -1
  329. package/js/x-modules/search/components/promoteds-list.vue_rollup-plugin-vue=script.js +1 -1
  330. package/js/x-modules/search/components/redirection.vue.js.map +1 -1
  331. package/js/x-modules/search/components/redirection.vue_rollup-plugin-vue=script.js.map +1 -1
  332. package/js/x-modules/search/components/results-list.vue_rollup-plugin-vue=script.js +2 -2
  333. package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
  334. package/js/x-modules/search/components/sort-list.vue.js +2 -2
  335. package/js/x-modules/search/components/sort-list.vue.js.map +1 -1
  336. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +13 -12
  337. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js.map +1 -1
  338. package/js/x-modules/search/components/sort.mixin.js +13 -12
  339. package/js/x-modules/search/components/sort.mixin.js.map +1 -1
  340. package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
  341. package/js/x-modules/search/components/spellcheck.vue.js.map +1 -1
  342. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +13 -12
  343. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
  344. package/js/x-modules/tagging/store/actions/track.action.js +2 -2
  345. package/js/x-modules/tagging/store/actions/track.action.js.map +1 -1
  346. package/js/x-modules/tagging/wiring.js +48 -4
  347. package/js/x-modules/tagging/wiring.js.map +1 -1
  348. package/package.json +7 -7
  349. package/report/tsdoc-metadata.json +1 -1
  350. package/report/x-adapter.api.json +1 -1
  351. package/report/x-components.api.json +572 -222
  352. package/report/x-components.api.md +60 -33
  353. package/report/x-types.api.json +1 -1
  354. package/tagging/index.js +1 -1
  355. package/types/adapter/mocked-adapter.d.ts.map +1 -1
  356. package/types/components/animations/index.d.ts +1 -0
  357. package/types/components/animations/index.d.ts.map +1 -1
  358. package/types/components/{staggering-transition-group.vue.d.ts → animations/staggering-transition-group.vue.d.ts} +0 -0
  359. package/types/components/animations/staggering-transition-group.vue.d.ts.map +1 -0
  360. package/types/components/global-x-bus.vue.d.ts.map +1 -1
  361. package/types/components/index.d.ts +1 -4
  362. package/types/components/index.d.ts.map +1 -1
  363. package/types/components/layouts/fixed-header-and-asides-layout.vue.d.ts +17 -0
  364. package/types/components/layouts/fixed-header-and-asides-layout.vue.d.ts.map +1 -0
  365. package/types/components/layouts/index.d.ts +4 -0
  366. package/types/components/layouts/index.d.ts.map +1 -0
  367. package/types/components/panels/base-id-toggle-panel.vue.d.ts +0 -5
  368. package/types/components/panels/base-id-toggle-panel.vue.d.ts.map +1 -1
  369. package/types/components/result/base-result-link.vue.d.ts +3 -10
  370. package/types/components/result/base-result-link.vue.d.ts.map +1 -1
  371. package/types/components/x-component.mixin.d.ts.map +1 -1
  372. package/types/components/x-component.utils.d.ts +1 -16
  373. package/types/components/x-component.utils.d.ts.map +1 -1
  374. package/types/plugins/x-plugin.alias.d.ts +4 -6
  375. package/types/plugins/x-plugin.alias.d.ts.map +1 -1
  376. package/types/plugins/x-plugin.mixin.d.ts +13 -3
  377. package/types/plugins/x-plugin.mixin.d.ts.map +1 -1
  378. package/types/utils/types.d.ts +6 -0
  379. package/types/utils/types.d.ts.map +1 -1
  380. package/types/wiring/events.types.d.ts +0 -5
  381. package/types/wiring/events.types.d.ts.map +1 -1
  382. package/types/wiring/namespaced-wires.operators.d.ts +2 -3
  383. package/types/wiring/namespaced-wires.operators.d.ts.map +1 -1
  384. package/types/wiring/namespaced-wiring.types.d.ts +9 -10
  385. package/types/wiring/namespaced-wiring.types.d.ts.map +1 -1
  386. package/types/wiring/wires-operators.utils.d.ts +36 -0
  387. package/types/wiring/wires-operators.utils.d.ts.map +1 -0
  388. package/types/wiring/wires.operators.d.ts +5 -8
  389. package/types/wiring/wires.operators.d.ts.map +1 -1
  390. package/types/wiring/wiring.types.d.ts +17 -4
  391. package/types/wiring/wiring.types.d.ts.map +1 -1
  392. package/types/x-installer/x-installer/x-installer.d.ts +1 -1
  393. package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts +6 -0
  394. package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts.map +1 -1
  395. package/types/x-modules/facets/components/facets/facets-provider.vue.d.ts +0 -8
  396. package/types/x-modules/facets/components/facets/facets-provider.vue.d.ts.map +1 -1
  397. package/types/x-modules/history-queries/wiring.d.ts +1 -1
  398. package/types/x-modules/identifier-results/wiring.d.ts +1 -1
  399. package/types/x-modules/query-suggestions/wiring.d.ts +1 -1
  400. package/types/x-modules/search/components/banner.vue.d.ts +6 -0
  401. package/types/x-modules/search/components/banner.vue.d.ts.map +1 -1
  402. package/types/x-modules/search/components/promoted.vue.d.ts +6 -0
  403. package/types/x-modules/search/components/promoted.vue.d.ts.map +1 -1
  404. package/types/x-modules/search/components/redirection.vue.d.ts +1 -1
  405. package/types/x-modules/search/components/redirection.vue.d.ts.map +1 -1
  406. package/types/x-modules/search/events.types.d.ts +11 -1
  407. package/types/x-modules/search/events.types.d.ts.map +1 -1
  408. package/types/x-modules/tagging/wiring.d.ts +29 -9
  409. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  410. package/docs/API-reference/api/x-components.baseidtogglepanel.created.md +0 -17
  411. package/docs/API-reference/api/x-components.xcomponent.md +0 -15
  412. package/docs/API-reference/api/x-components.xeventstypes.userrightclickedaresult.md +0 -13
  413. package/js/components/staggering-transition-group.vue.js.map +0 -1
  414. package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js.map +0 -1
  415. package/js/wiring/utils/wire-racing-handling.js +0 -108
  416. package/js/wiring/utils/wire-racing-handling.js.map +0 -1
  417. package/types/components/staggering-transition-group.vue.d.ts.map +0 -1
  418. package/types/components/x-component.types.d.ts +0 -19
  419. package/types/components/x-component.types.d.ts.map +0 -1
  420. package/types/wiring/utils/wire-racing-handling.d.ts +0 -27
  421. package/types/wiring/utils/wire-racing-handling.d.ts.map +0 -1
@@ -22,11 +22,11 @@ It also provides the partial result slot to customize the item with the partial
22
22
  | -------------------- | --------------------------------------- | ------------------------------------------------------------ |
23
23
  | <code>default</code> | (Required) Partial results item content | **partialResult** <code>Partial</code> - Partial Result data |
24
24
 
25
- # Examples
25
+ ## Examples
26
26
 
27
27
  This component loops through an array of partials an exposed a slot to use customize each partial.
28
28
 
29
- ## Basic example
29
+ ### Basic example
30
30
 
31
31
  It renders a list of partial results using the default slot:
32
32
 
@@ -40,7 +40,7 @@ It renders a list of partial results using the default slot:
40
40
  </template>
41
41
  ```
42
42
 
43
- ## Configuring the number of partials
43
+ ### Configuring the number of partials
44
44
 
45
45
  It sets the maximum partials to show to 3.
46
46
 
@@ -54,7 +54,7 @@ It sets the maximum partials to show to 3.
54
54
  </template>
55
55
  ```
56
56
 
57
- ## Rendering usage
57
+ ### Rendering usage
58
58
 
59
59
  It renders a list of partial results using the default slot. It will show the query, the partial
60
60
  results and a button to update the query with the partial one.
@@ -23,7 +23,7 @@ website will be more helpful than the set of results returned.
23
23
  | -------------------- | ----------- | ----------------------------------------- |
24
24
  | <code>default</code> | | <br /><br /><br /><br /> |
25
25
 
26
- ### Play with the component
26
+ ## Play with the component
27
27
 
28
28
  In this example, a query has been searched in the search input resulting in a case where the
29
29
  response has a redirection.
@@ -29,7 +29,7 @@ also allows to change the selected sort programmatically.
29
29
  | <code>toggle</code> | Used to render the contents of the dropdown toggle button. If not provided, it uses<br /> the item slot as fallback. | **isOpen** <code>boolean</code> - True if the dropdown is opened, and false if it is closed.<br />**item** <code>Sort</code> - The sort data to render. |
30
30
  | <code>item</code> | (required) Used to render each one of the items content, and as fallback<br /> for the toggle button content slot if it is not provided. | **item** <code>Sort</code> - Sort to render<br />**isHighlighted** <code>boolean</code> - True when the item has the focus.<br />**isSelected** <code>boolean</code> - True when the item is selected. |
31
31
 
32
- # Sort Dropdown
32
+ ## Sort Dropdown
33
33
 
34
34
  The `SortDropdown` component can be used to change the way the search results are ordered.
35
35
 
@@ -22,7 +22,7 @@ also allows to change the selected sort programmatically.
22
22
  | -------------------- | ----------- | ----------------------------------------- |
23
23
  | <code>default</code> | | <br /> |
24
24
 
25
- # Sort List
25
+ ## Sort List
26
26
 
27
27
  The `SortList` component can be used to change the way the search results are ordered.
28
28
 
@@ -16,9 +16,9 @@ intention to set the spellchecked query.
16
16
  | -------------------- | ----------- | ----------------------------------------- |
17
17
  | <code>default</code> | | |
18
18
 
19
- # Examples
19
+ ## Examples
20
20
 
21
- ## Basic example
21
+ ### Basic example
22
22
 
23
23
  The component sets the current spellcheckedQuery as the new query and emits the `UserAcceptedAQuery`
24
24
  and `UserAcceptedSpellcheckQuery` events.
@@ -27,7 +27,7 @@ and `UserAcceptedSpellcheckQuery` events.
27
27
  <SpellcheckButton />
28
28
  ```
29
29
 
30
- ## Customizing its contents
30
+ ### Customizing its contents
31
31
 
32
32
  ```vue
33
33
  <SpellcheckButton>
@@ -19,20 +19,20 @@ The component will only render itself if the `spellcheckedQuery` property has va
19
19
  | -------------------- | ----------- | ----------------------------------------- |
20
20
  | <code>default</code> | | <br /> |
21
21
 
22
- # Examples
22
+ ## Examples
23
23
 
24
24
  This default spellcheck component expects a query and a spellcheckedQuery to render and pass to its
25
25
  default slot.
26
26
 
27
27
  This two props should be show like a message comparing them.
28
28
 
29
- ## Basic usage
29
+ ### Basic usage
30
30
 
31
31
  ```vue
32
32
  <Spellcheck />
33
33
  ```
34
34
 
35
- ## Customizing its contents
35
+ ### Customizing its contents
36
36
 
37
37
  ```vue
38
38
  <Spellcheck>
@@ -0,0 +1,178 @@
1
+ ---
2
+ title: Interface X Archetype Development
3
+ tags:
4
+ - development
5
+ - archetype
6
+ - X Components archetype development
7
+ - x development
8
+ - interface x
9
+ - x components
10
+ - archetype development
11
+ - archetype integration
12
+ ---
13
+
14
+ # Interface X Archetype Development
15
+
16
+ In this tutorial, you’ll learn how to start developing with the Interface&nbsp;X&nbsp;Archetype
17
+ project in your store in a matter of minutes, so you can create a search interface layer based on
18
+ predefined features and components.
19
+
20
+ For this tutorial, the Empathy Search API is used, but you can use any search API. This guide
21
+ requires knowledge of JavaScript and Vue.js.
22
+
23
+ ::: note Before you begin
24
+
25
+ To integrate Interface&nbsp;X&nbsp;Archetype as a search UI layer, you need:
26
+
27
+ - **Empathy Search API** (or any search API that you use to retrieve search data).
28
+ - **Empathy Search Adapter** to communicate with the Empathy Search API (or any search adapter to
29
+ connect with the search API you are using).
30
+
31
+ :::
32
+
33
+ ##### Steps to start developing in a X Archetype project:
34
+
35
+ 1. **Clone** the X&nbsp;Archetype project and **initialize** your repository.
36
+ 2. Install the **project dependencies** and execute the project.
37
+ 3. Configure the **search adapter**.
38
+ 4. Configure the **xPlugin**.
39
+
40
+ ## 1. Clone the project and initialize your repository
41
+
42
+ Clone the [X Archetype project](https://github.com/empathyco/x-archetype.git) from the GitHub
43
+ repository to your target folder. You need a non-initialized repository, so make sure you remove the
44
+ git folder from the cloned project.
45
+
46
+ ```batch
47
+ // Clone the X Archetype project from GitHub
48
+ git clone --depth 1 https://github.com/empathyco/x-archetype.git <your-target-folder>
49
+
50
+ // Remove the git folder
51
+ rm -rf .git
52
+ ```
53
+
54
+ ::: develop
55
+
56
+ You can use [Degit](https://github.com/Rich-Harris/degit) to clone the git repository without
57
+ downloading the entire git history:
58
+ `npx degit https://github.com/empathyco/x-archetype.git <your-target-folder>`.
59
+
60
+ :::
61
+
62
+ Once you have cloned the project and removed the git history from the project, initialize the
63
+ repository from the root directory.
64
+
65
+ ```batch
66
+ // Initialize the repository
67
+ git init
68
+ git remote add origin <your-repository-url>
69
+ git add .
70
+ git commit -m "Initial X-Components Setup"
71
+ git push -u origin main
72
+ ```
73
+
74
+ Then, replace the current repository name (`@empathyco/x-archetype`) with the name of your
75
+ repository in the `package.json` file.
76
+
77
+ ```json
78
+ // Define your repository
79
+ {
80
+ "name": "<your-repo>",
81
+ "author": "Empathy Systems Corporation S.L.",
82
+
83
+ }
84
+
85
+ ```
86
+
87
+ ## 2. Install the dependencies and execute the project
88
+
89
+ Install the project dependencies via `npm` in the root folder of your cloned repository. Then, you
90
+ can run the project.
91
+
92
+ ```batch
93
+ // Install the dependencies via npm
94
+ npm install
95
+
96
+ // Execute the project
97
+ npm run serve
98
+ ```
99
+
100
+ ::: interact For a full list of the project dependencies, check the
101
+ [`package.json`](https://github.com/empathyco/x-archetype/blob/main/package.json) file in the
102
+ Interface&nbsp;X&nbsp;Archetype repository. :::
103
+
104
+ ## 3. Configure the search adapter
105
+
106
+ Before using your project, configure the Empathy Search Adapter in the
107
+ `x-archetype/src/adapter/adapter.ts` file, using the Empathy Adapter Builder to make it work with
108
+ the Empathy Search API. The Empathy Search Adapter contains a sample configuration for setup, global
109
+ configurations, or mappers that points to a demo environment. You need to make some adjustments in
110
+ the configuration according to the search features you use in your project.
111
+
112
+ Export the required search adapter with your configuration as you will need it for the search
113
+ [xPlugin configuration](web-archetype-integration-guide.md#_4-configure-the-plugin).
114
+
115
+ ::: interact For detailed information about other configuration options in the Empathy Search
116
+ Adapter, go to the
117
+ [x-adapter repository](https://github.com/empathyco/x/tree/main/packages/search-adapter). :::
118
+
119
+ ::: note Although you configure the values for the `instance`, `language`, `scope`, and `endpoint`
120
+ options when integrating the project, you can still change these values when the project is
121
+ deployed. Use the `/x-archetype/public/snippet-script.js` file to perform hot changes for `lang`,
122
+ `store`, `device`, and `catalog` parameters.
123
+
124
+ For example, you may configure the adapter to use EN as `lang` so that when you search, the results
125
+ are displayed in English. However, if you want to deploy the application in Spain, you want the
126
+ `lang` to be ES. You change these values in the `snippet-script.js` file.
127
+
128
+ :::
129
+
130
+ ## 4. Configure the plugin
131
+
132
+ The `xPlugin` initializes the properties needed by the X&nbsp;Components. It has key options that
133
+ you can configure in the `/x-archetype/src/x-components/plugin.options.ts` file.
134
+
135
+ Since the X&nbsp;Archetype project operates as a layer and is designed to be integrated on top of
136
+ any kind of website regardless the chosen technology, the `XInstaller` utility and its
137
+ `installXOptions` object are designed to install the xPlugin, adding the connection between the
138
+ X&nbsp;Components and the search API and bootstrapping the entire application with powerful APIs
139
+ that are available in the `window.X` object.
140
+
141
+ To configure the xPlugin, run this code:
142
+
143
+ ```typescript
144
+ import { InstallXOptions, XInstaller } from '@empathyco/x-components';
145
+ import App from './App.vue';
146
+ import store from './store';
147
+ import { adapter } from '../adapter';
148
+
149
+ export const installXOptions: InstallXOptions = {
150
+ adapter,
151
+ store,
152
+ app: App
153
+ };
154
+
155
+ new XInstaller(installXOptions).init({
156
+ instance: '<your-search-api-instance>',
157
+ lang: '<your-application-language>',
158
+ scope: '<your-application-scope>'
159
+ });
160
+ ```
161
+
162
+ ---
163
+
164
+ ### Next steps
165
+
166
+ Once you have your Interface&nbsp;X&nbsp;Archetype project, you're ready to integrate it in your
167
+ store, or extend the search and discovery experience to meet your business needs:
168
+
169
+ - [Integrate an Interface&nbsp;X&nbsp;Archetype project into an existing website](web-archetype-integration-guide.md).
170
+ - Change the configuration of [X Components](web-use-x-components-guide.md) or create new ones.
171
+ - Adapt the
172
+ [design system](https://github.com/empathyco/x/blob/main/packages/x-components/contributing/design-system.md)
173
+ to your branding.
174
+ - Manage
175
+ [internationalization options](https://github.com/empathyco/x-archetype/blob/main/docs/i18n.md) to
176
+ support different languages.
177
+
178
+ <!-- add links to design system and internationalization content pages when ready-->
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: Integrate Interface X Archetype
2
+ title: Integrate Interface X Archetype into an existing website
3
3
  tags:
4
4
  - integration
5
5
  - archetype
@@ -10,169 +10,177 @@ tags:
10
10
  - archetype integration
11
11
  ---
12
12
 
13
- # Integrate Interface X Archetype
13
+ # Integrate Interface X Archetype into an existing website
14
14
 
15
- In this tutorial, you’ll learn how to integrate the Interface&nbsp;X&nbsp;Archetype project in your
16
- store in a matter of minutes so you can develop a search interface layer based on predefined
17
- features and components.
15
+ Once you have finished developing or extending your search interface using the
16
+ Interface&nbsp;X&nbsp;Archetype project you will probably want to integrate it into your current
17
+ store.
18
18
 
19
- For this tutorial, the Empathy Search API is used, but you can use any search API. This guide
20
- requires knowledge of JavaScript and Vue.js.
19
+ The integration is a 2-steps process:
21
20
 
22
- ::: note Before you begin
21
+ - Load Interface&nbsp;X script.
22
+ - Initialise the Interface&nbsp;X.
23
23
 
24
- To integrate Interface&nbsp;X&nbsp;Archetype as a search UI layer, you need:
24
+ Depending on your business needs, there are 2 different ways of making this integration process:
25
+ auto initialising, or initialising on demand.
25
26
 
26
- - **Empathy Search API** (or any search API that you use to retrieve search data).
27
- - **Empathy Search Adapter** to communicate with the Empathy Search API (or any search adapter to
28
- connect with the search API you are using).
27
+ ## Auto initialisation
29
28
 
30
- :::
29
+ This is the easiest way to integrate the Interface&nbsp;X project in a website. The way to do so is
30
+ by first defining an initialisation object or function, and then loading the Interface&nbsp;X
31
+ script.
31
32
 
32
- ##### Steps to integrate X Archetype project:
33
+ ### 1. Add a snippet configuration
33
34
 
34
- 1. **Clone** the X&nbsp;Archetype project and **initialize** your repository.
35
- 2. Install the **project dependencies** and execute the project.
36
- 3. Configure the **search adapter**.
37
- 4. Configure the **xPlugin**.
35
+ The snippet configuration is needed by Interface&nbsp;X to know the API it must use, the language or
36
+ currency it should display the texts in, or tagging parameters to enrich the data and provide better
37
+ insights on how users search.
38
38
 
39
- ## 1. Clone the project and initialize your repository
39
+ If your configuration values are easy to retrieve or static, you can simply use an object.
40
40
 
41
- Clone the [X Archetype project](https://github.com/empathyco/x-archetype.git) from the GitHub
42
- repository to your target folder. You need a non-initialized repository, so make sure you remove the
43
- git folder from the cloned project.
44
-
45
- ```batch
46
- // Clone the X Archetype project from GitHub
47
- git clone --depth 1 https://github.com/empathyco/x-archetype.git <your-target-folder>
48
-
49
- // Remove the git folder
50
- rm -rf .git
41
+ ```js
42
+ window.initX = {
43
+ instance: 'my-store',
44
+ env: 'live',
45
+ scope: 'desktop',
46
+ lang: 'en',
47
+ currency: 'EUR',
48
+ consent: false
49
+ };
51
50
  ```
52
51
 
53
- ::: develop
54
-
55
- You can use [Degit](https://github.com/Rich-Harris/degit) to clone the git repository without
56
- downloading the entire git history:
57
- `npx degit https://github.com/empathyco/x-archetype.git <your-target-folder>`.
58
-
59
- :::
60
-
61
- Once you have cloned the project and removed the git history from the project, initialize the
62
- repository from the root directory.
63
-
64
- ```batch
65
- // Initialize the repository
66
- git init
67
- git remote add origin <your-repository-url>
68
- git add .
69
- git commit -m "Initial X-Components Setup"
70
- git push -u origin main
52
+ Otherwise, if you need to retrieve values dynamically, or execute any kind of logic before the
53
+ initialisation you can also use a function:
54
+
55
+ ```js
56
+ window.initX = function () {
57
+ return {
58
+ instance: 'my-store',
59
+ env: location.href.includes('.pre.') ? 'staging' : 'live',
60
+ scope: 'web',
61
+ lang: localStorage.get('lang'),
62
+ currency: localStorage.get('currency'),
63
+ consent: localStorage.get('consent')
64
+ };
65
+ };
71
66
  ```
72
67
 
73
- Then, replace the current repository name (`@empathyco/x-archetype`) with the name of your
74
- repository in the `package.json` file.
75
-
76
- ```json
77
- // Define your repository
78
- {
79
- "name": "<your-repo>",
80
- "author": "Empathy Systems Corporation S.L.",
81
-
82
- }
83
-
68
+ You can read more about the [Snippet Configuration](#snippet-configuration) below.
69
+
70
+ ### 2. Load the Interface&nbsp;X script
71
+
72
+ Once you have defined your snippet configuration either as an object or a function, you can insert
73
+ the Interface&nbsp;X script. This script is hosted in a URL of this shape
74
+ `https://x.<environment?>.empathy.co/<instance>/app.js`.
75
+
76
+ For example, supposing that `my-store` is the instance, and you want to load the production script,
77
+ you can add to your HTML the following scripts.
78
+
79
+ ```html
80
+ <script>
81
+ window.initX = {
82
+ instance: 'my-store',
83
+ env: 'live',
84
+ scope: 'desktop',
85
+ lang: 'en',
86
+ currency: 'EUR',
87
+ consent: false
88
+ };
89
+ </script>
90
+ <script src="https://x.empathy.co/my-store/app.js"></script>
84
91
  ```
85
92
 
86
- ## 2. Install the dependencies and execute the project
87
-
88
- Install the project dependencies via `npm` in the root folder of your cloned repository. Then, you
89
- can run the project.
90
-
91
- ```batch
92
- // Install the dependencies via npm
93
- npm install
94
-
95
- // Execute the project
96
- npm run serve
93
+ Or if you want to load the staging version, you just have to change the script `src` attribute to
94
+ point to the staging environment:
95
+
96
+ ```html
97
+ <script>
98
+ window.initX = {
99
+ instance: 'my-store',
100
+ env: 'live', // Note that here you are using production API with the staging version of Interface X
101
+ scope: 'desktop',
102
+ lang: 'en',
103
+ currency: 'EUR',
104
+ consent: false
105
+ };
106
+ </script>
107
+ <script src="https://x.staging.empathy.co/my-store/app.js"></script>
97
108
  ```
98
109
 
99
- ::: interact
100
- For a full list of the project dependencies, check the
101
- [`package.json`](https://github.com/empathyco/x-archetype/blob/main/package.json) file in the
102
- Interface&nbsp;X&nbsp;Archetype repository. :::
110
+ This way, when the Interface&nbsp;X JavaScript file is loaded, it will retrieve the configuration
111
+ from the object or function that you defined before. Nothing else is required.
103
112
 
104
- ## 3. Configure the search adapter
113
+ ## Initialise on demand
105
114
 
106
- Before using your project, configure the Empathy Search Adapter in the
107
- `x-archetype/src/adapter/adapter.ts` file, using the Empathy Adapter Builder to make it work with
108
- the Empathy Search API. The Empathy Search Adapter contains a sample configuration for setup, global
109
- configurations, or mappers that points to a demo environment. You need to make some adjustments in
110
- the configuration according to the search features you use in your project.
115
+ If you want to have more manual control on when the Interface&nbsp;X is loaded, you can still do so.
116
+ Instead of defining an initialisation object or function upfront like in
117
+ [Auto initialisation](#auto-initialisation), you can invoke a function with these options that will
118
+ initialise Interface&nbsp;X.
111
119
 
112
- Export the required search adapter with your configuration as you will need it for the search
113
- [xPlugin configuration](web-archetype-integration-guide.md#_4-configure-the-plugin).
120
+ ### 1. Load the Interface&nbsp;X script
114
121
 
115
- ::: interact For detailed information about other configuration options in the Empathy Search
116
- Adapter, go to the
117
- [x-adapter repository](https://github.com/empathyco/x/tree/main/packages/search-adapter). :::
122
+ First, load the Interface&nbsp;X script. As you may already know, it is hosted in a URL of this
123
+ shape: `https://x.<environment?>.empathy.co/<instance>/app.js`.
118
124
 
119
- ::: note Although you configure the values for the `instance`, `language`, `scope`, and `endpoint`
120
- options when integrating the project, you can still change these values when the project is
121
- deployed. Use the `/x-archetype/public/snippet-script.js` file to perform hot changes for `lang`,
122
- `store`, `device`, and `catalog` parameters.
125
+ For example, supposing that `my-store` is the instance, and you want to load the production script,
126
+ you can add to your HTML the following scripts:
123
127
 
124
- For example, you may configure the adapter to use EN as `lang` so that when you search, the results
125
- are displayed in English. However, if you want to deploy the application in Spain, you want the
126
- `lang` to be ES. You change these values in the `snippet-script.js` file.
127
-
128
- :::
129
-
130
- ## 4. Configure the plugin
131
-
132
- The `xPlugin` initializes the properties needed by the X&nbsp;Components. It has key options that
133
- you can configure in the `/x-archetype/src/x-components/plugin.options.ts` file.
134
-
135
- Since the X&nbsp;Archetype project operates as a layer and is designed to be integrated on top of
136
- any kind of website regardless the chosen technology, the `XInstaller` utility and its
137
- `installXOptions` object are designed to install the xPlugin, adding the connection between the
138
- X&nbsp;Components and the search API and bootstrapping the entire application with powerful APIs
139
- that are available in the `window.X` object.
140
-
141
- To configure the xPlugin, run this code:
142
-
143
- ```typescript
144
- import { InstallXOptions, XInstaller } from '@empathyco/x-components';
145
- import App from './App.vue';
146
- import store from './store';
147
- import { adapter } from '../adapter';
148
-
149
- export const installXOptions: InstallXOptions = {
150
- adapter,
151
- store,
152
- app: App
153
- };
154
-
155
- new XInstaller(installXOptions).init({
156
- instance: '<your-search-api-instance>',
157
- lang: '<your-application-language>',
158
- scope: '<your-application-scope>'
159
- });
128
+ ```html
129
+ <script src="https://x.empathy.co/my-store/app.js"></script>
160
130
  ```
161
131
 
162
- ---
163
-
164
- ### Next steps
132
+ For loading the staging version simply change the `src` attribute to the staging environment:
165
133
 
166
- Once you have integrated the Interface&nbsp;X&nbsp;Archetype in your store, you're ready to start
167
- using the X&nbsp;Archetype as is or extend the search and discovery experience to meet your business
168
- needs:
134
+ ```html
135
+ <script src="https://x.staging.empathy.co/my-store/app.js"></script>
136
+ ```
169
137
 
170
- - Change the configuration of [X Components](web-use-x-components-guide.md) or create new ones.
171
- - Adapt the
172
- [design system](https://github.com/empathyco/x/blob/main/packages/x-components/contributing/design-system.md)
173
- to your branding.
174
- - Manage
175
- [internationalization options](https://github.com/empathyco/x-archetype/blob/main/docs/i18n.md) to
176
- support different languages.
138
+ ### 2. Initialise Interface&nbsp;X
139
+
140
+ Loading the Interface&nbsp;X script and not providing a `initX` configuration will make it create an
141
+ initialisation function in the [X API](#x-api) object that you can invoke whenever you want. In this
142
+ example we are calling it immediately after loading the Interface&nbsp;X script, but it can be
143
+ invoked at any time. Note that you should only call this function **once**.
144
+
145
+ ```html
146
+ <script src="https://x.empathy.co/my-store/app.js"></script>
147
+ <script>
148
+ window.X.init({
149
+ instance: 'my-store',
150
+ env: 'live',
151
+ scope: 'desktop',
152
+ lang: 'en',
153
+ currency: 'EUR',
154
+ consent: false
155
+ });
156
+ </script>
157
+ ```
177
158
 
178
- <!-- add links to design system and internationalization content pages when ready-->
159
+ ## Snippet configuration
160
+
161
+ The snippet configuration allows you to configure certain parts of the Interface&nbsp;X project like
162
+ language, the currency, inform whether the user has given us his consent to process personal data.
163
+
164
+ | Name | Type | Required | Description |
165
+ | --------------------- | ------------------------------------------------------------------------------------ | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
166
+ | instance | `string` | ✅ | The identifier of the API client instance. Should be provided by Empathy |
167
+ | env | `'live'` &#124; `'staging'` | | The API environment to use. Note that you can use the production version of your Interface&nbsp;X with the staging API, or viceversa. |
168
+ | scope | `string` | | The context name where the search interface is being executed. I.e. `mobile`, `mobile-app`, `tablet`, `desktop` |
169
+ | lang | `string` | ✅ | The language to use. By default this lang is used for both the front-end and the API requests |
170
+ | searchLang | `string` | | A language to use only for the API requests |
171
+ | consent | `boolean` | ✅ | Whether the user has allowed to process its personal data or not. X-Components do not track or process any personal data. This parameter is used to generate a unique session id |
172
+ | documentDirection | `'ltr'` &#124; `'rtl'` | | The writing direction that the X Components should use |
173
+ | currency | `string` | ✅ | The currency identifier. Used to configure how prices are shown |
174
+ | callbacks | `Record<XEventName, (payload: XEventPayload<Event>, metadata: WireMetadata) => void` | | A record of callbacks where the key is the event to listen, and the value is the callback to be executed whenever the event is emitted. For example, to listen to the `UserAcceptedAQuery` event: `{ UserAcceptedAQuery({ eventPayload }) { console.log('UserAcceptedAQuery', eventPayload); }` |
175
+ | isSpa | `boolean` | | True when the X Components archetype is being run on top of an SPA. |
176
+ | &lt;extra parameters> | `any` | | Any other parameter to be sent directly to the API calls. For example, some times is needed to filter the search catalog with a warehouse parameter. In that case you can just add `warehouse: <your-warehouse-identifier>` to the snippet config. |
177
+
178
+ ## X API
179
+
180
+ The X API allows your website to communicate with Interface&X. It is a set of utilities that helps
181
+ to integrate Interface&X into your website.
182
+
183
+ | Function | Parameters | Description |
184
+ | -------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------- |
185
+ | init | - [Snippet Configuration](#snippet-configuration) - The initialisation options | [Initialises Interface X on demand](#initialise-on-demand). |
186
+ | search | - query (Optional) - The query to open Interface&nbsp;X with | Opens Interface&nbsp;X with the given search query. |
@@ -15,7 +15,7 @@ in your own project to craft enticing Vue search experiences for your shop in a
15
15
 
16
16
  ::: interact If you are looking to use the ready-to-go project Interface&nbsp;X&nbsp;Archetype as
17
17
  your starting point, see
18
- **[Integrate Interface X Archetype project](/develop-empathy-platform/build-search-ui/web-archetype-integration-guide.md)**.
18
+ **[Interface X Archetype Development](/develop-empathy-platform/build-search-ui/web-archetypedevelopment-guide.md)**.
19
19
  :::
20
20
 
21
21
  For this tutorial, the Empathy Search API is used, but you can use any search API. This step-by-step
@@ -164,9 +164,9 @@ Vue.use(xPlugin, { adapter, store });
164
164
  Watch how our frontend Team Lead, [Iván Tajes](https://github.com/tajespasarela), integrates the
165
165
  Interface&nbsp;X&nbsp;Components in a project from scratch.
166
166
 
167
- <VideoContent
167
+ <VideoContent
168
168
  title="Want to learn more?"
169
- source="/assets/media/videos/How-to-use-X-components-in-a-real-project.mp4"
169
+ source="/assets/media/videos/How-to-use-X-components-in-a-real-project.mp4"
170
170
  poster="/assets/media/videos/How-to-use-X-components-in-a-real-project.jpeg"
171
171
  :links="[
172
172
  {
@@ -23,11 +23,11 @@ __vue_render__._withStripped = true;
23
23
  /* style */
24
24
  var __vue_inject_styles__ = function (inject) {
25
25
  if (!inject) { return }
26
- inject("data-v-0b0a53bb_0", { source: ".x-animate-width--enter-active[data-v-0b0a53bb], .x-animate-width--leave-active[data-v-0b0a53bb] {\n transition: width 0.3s ease-out;\n overflow-x: hidden;\n}\n.x-animate-width--enter[data-v-0b0a53bb], .x-animate-width--leave-to[data-v-0b0a53bb] {\n width: 0 !important;\n}", map: undefined, media: undefined });
26
+ inject("data-v-0d2c1ed8_0", { source: ".x-animate-width--enter-active[data-v-0d2c1ed8], .x-animate-width--leave-active[data-v-0d2c1ed8] {\n transition: width 0.3s ease-out;\n overflow-x: hidden;\n}\n.x-animate-width--enter[data-v-0d2c1ed8], .x-animate-width--leave-to[data-v-0d2c1ed8] {\n width: 0 !important;\n}", map: undefined, media: undefined });
27
27
 
28
28
  };
29
29
  /* scoped */
30
- var __vue_scope_id__ = "data-v-0b0a53bb";
30
+ var __vue_scope_id__ = "data-v-0d2c1ed8";
31
31
  /* module identifier */
32
32
  var __vue_module_identifier__ = undefined;
33
33
  /* functional template */