@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.
- package/CHANGELOG.md +52 -0
- package/core/index.js +23 -22
- package/core/index.js.map +1 -1
- package/docs/API-reference/api/x-components.baseidtogglepanel.md +0 -1
- package/docs/API-reference/api/x-components.baseresultlink.md +1 -1
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.isbackdropvisible.md +11 -0
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.leftasideanimation.md +11 -0
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.md +30 -0
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.rightasideanimation.md +11 -0
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.scrollposition.md +11 -0
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.setposition.md +22 -0
- package/docs/API-reference/api/x-components.getrootxcomponent.md +2 -2
- package/docs/API-reference/api/x-components.isxcomponent.md +2 -2
- package/docs/API-reference/api/x-components.maybearray.md +13 -0
- package/docs/API-reference/api/x-components.md +11 -7
- package/docs/API-reference/api/x-components.namespaceddebounce.md +2 -2
- package/docs/API-reference/api/x-components.namespacedthrottle.md +2 -2
- package/docs/API-reference/api/{x-components.namespacedtimeretrieving.md → x-components.namespacedtimeselector.md} +3 -3
- package/docs/API-reference/api/x-components.namespacedtimewireoperator.md +3 -3
- package/docs/API-reference/api/x-components.searchxevents.md +2 -0
- package/docs/API-reference/api/x-components.searchxevents.userclickedabanner.md +13 -0
- package/docs/API-reference/api/x-components.searchxevents.userclickedapromoted.md +13 -0
- package/docs/API-reference/api/x-components.setconsent.md +1 -1
- package/docs/API-reference/api/x-components.setquerytaggingdebounce.md +1 -1
- package/docs/API-reference/api/x-components.setsessionduration.md +1 -1
- package/docs/API-reference/api/x-components.throttle.md +3 -3
- package/docs/API-reference/api/x-components.timedwireoperatoroptions.cancelon.md +13 -0
- package/docs/API-reference/api/x-components.timedwireoperatoroptions.forceon.md +13 -0
- package/docs/API-reference/api/x-components.timedwireoperatoroptions.md +21 -0
- package/docs/API-reference/api/{x-components.timeretrieving.md → x-components.timeselector.md} +3 -3
- package/docs/API-reference/api/x-components.trackaddtocartwire.md +13 -0
- package/docs/API-reference/api/{x-components.trackwire.md → x-components.trackquerywire.md} +3 -3
- package/docs/API-reference/api/x-components.trackresultclickedwire.md +13 -0
- package/docs/API-reference/api/x-components.xeventstypes.md +0 -1
- package/docs/API-reference/api/x-components.xinstaller.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.animate-width.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.collapse-from-top.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.collapse-height.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.collapse-width.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.cross-fade.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.fade-and-slide.md +1 -1
- package/docs/API-reference/components/common/{x-components.staggering-transition-group.md → animations/x-components.staggering-transition-group.md} +2 -2
- package/docs/API-reference/components/common/animations/x-components.translate-from-left.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.translate-from-right.md +1 -1
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-dropdown.md +5 -5
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-list.md +5 -5
- package/docs/API-reference/components/common/currency/x-components.base-currency.md +2 -4
- package/docs/API-reference/components/common/filters/labels/x-components.base-price-filter-label.md +2 -2
- package/docs/API-reference/components/common/filters/labels/x-components.base-rating-filter-label.md +4 -4
- package/docs/API-reference/components/common/layouts/x-components.fixed-header-and-asides-layout.md +2 -2
- package/docs/API-reference/components/common/layouts/x-components.multi-column-max-width-layout.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-events-modal-close.md +3 -3
- package/docs/API-reference/components/common/modals/x-components.base-events-modal-open.md +3 -3
- package/docs/API-reference/components/common/modals/x-components.base-events-modal.md +3 -3
- package/docs/API-reference/components/common/modals/x-components.base-id-modal-close.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-id-modal-open.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-id-modal.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-modal.md +1 -1
- package/docs/API-reference/components/common/panels/x-components.base-header-toggle-panel.md +4 -4
- package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel-button.md +2 -2
- package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel.md +2 -2
- package/docs/API-reference/components/common/panels/x-components.base-toggle-panel.md +2 -2
- package/docs/API-reference/components/common/result/x-components.base-result-add-to-cart.md +2 -2
- package/docs/API-reference/components/common/result/x-components.base-result-current-price.md +3 -3
- package/docs/API-reference/components/common/result/x-components.base-result-image.md +3 -3
- package/docs/API-reference/components/common/result/x-components.base-result-link.md +11 -19
- package/docs/API-reference/components/common/result/x-components.base-result-previous-price.md +3 -3
- package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +2 -2
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +3 -3
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestions.md +1 -1
- package/docs/API-reference/components/common/x-components.base-dropdown.md +1 -1
- package/docs/API-reference/components/common/x-components.base-event-button.md +2 -2
- package/docs/API-reference/components/common/x-components.base-grid.md +4 -4
- package/docs/API-reference/components/common/x-components.base-keyboard-navigation.md +4 -4
- package/docs/API-reference/components/common/x-components.base-rating.md +3 -3
- package/docs/API-reference/components/common/x-components.base-variable-column-grid.md +1 -1
- package/docs/API-reference/components/common/x-components.sliding-panel.md +4 -4
- package/docs/API-reference/components/empathize/x-components.empathize.md +2 -2
- package/docs/API-reference/components/extra-params/x-components.renderless-extra-param.md +2 -2
- package/docs/API-reference/components/facets/x-components.clear-filters.md +3 -3
- package/docs/API-reference/components/facets/x-components.facets/facets-provider.md +1 -1
- package/docs/API-reference/components/facets/x-components.facets/facets.md +6 -6
- package/docs/API-reference/components/facets/x-components.filters/all-filter.md +5 -5
- package/docs/API-reference/components/facets/x-components.filters/base-filter.md +4 -4
- package/docs/API-reference/components/facets/x-components.filters/editable-number-range-filter.md +5 -5
- package/docs/API-reference/components/facets/x-components.filters/hierarchical-filter.md +4 -4
- package/docs/API-reference/components/facets/x-components.filters/number-range-filter.md +3 -3
- package/docs/API-reference/components/facets/x-components.filters/renderless-filter.md +3 -3
- package/docs/API-reference/components/facets/x-components.filters/simple-filter.md +4 -4
- package/docs/API-reference/components/facets/x-components.lists/exclude-filters-with-no-results.md +3 -3
- package/docs/API-reference/components/facets/x-components.lists/filters-list.md +3 -3
- package/docs/API-reference/components/facets/x-components.lists/filters-search.md +3 -3
- package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +5 -5
- package/docs/API-reference/components/facets/x-components.lists/selected-filters.md +4 -4
- package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +3 -3
- package/docs/API-reference/components/facets/x-components.lists/sorted-filters.md +5 -5
- package/docs/API-reference/components/history-queries/x-components.clear-history-queries.md +2 -2
- package/docs/API-reference/components/history-queries/x-components.history-queries.md +4 -4
- package/docs/API-reference/components/history-queries/x-components.history-query.md +3 -3
- package/docs/API-reference/components/history-queries/x-components.remove-history-query.md +2 -2
- package/docs/API-reference/components/identifier-results/x-components.identifier-result.md +2 -2
- package/docs/API-reference/components/identifier-results/x-components.identifier-results.md +2 -2
- package/docs/API-reference/components/next-queries/x-components.next-queries.md +4 -4
- package/docs/API-reference/components/next-queries/x-components.next-query.md +3 -3
- package/docs/API-reference/components/popular-searches/x-components.popular-search.md +3 -3
- package/docs/API-reference/components/popular-searches/x-components.popular-searches.md +4 -4
- package/docs/API-reference/components/recommendations/x-components.recommendations.md +4 -4
- package/docs/API-reference/components/scroll/x-components.scroll-to-top.md +2 -2
- package/docs/API-reference/components/scroll/x-components.scroll.md +18 -22
- package/docs/API-reference/components/scroll/x-components.window-scroll.md +5 -7
- package/docs/API-reference/components/search/x-components.partial-query-button.md +3 -3
- package/docs/API-reference/components/search/x-components.partial-results-list.md +4 -4
- package/docs/API-reference/components/search/x-components.redirection.md +1 -1
- package/docs/API-reference/components/search/x-components.sort-dropdown.md +1 -1
- package/docs/API-reference/components/search/x-components.sort-list.md +1 -1
- package/docs/API-reference/components/search/x-components.spellcheck-button.md +3 -3
- package/docs/API-reference/components/search/x-components.spellcheck.md +3 -3
- package/docs/build-search-ui/web-archetype-development-guide.md +178 -0
- package/docs/build-search-ui/web-archetype-integration-guide.md +146 -138
- package/docs/build-search-ui/web-x-components-integration-guide.md +3 -3
- package/js/components/animations/animate-width.vue.js +2 -2
- package/js/components/animations/animate-width.vue.js.map +1 -1
- package/js/components/animations/collapse-from-top.vue.js +2 -2
- package/js/components/animations/collapse-from-top.vue.js.map +1 -1
- package/js/components/animations/collapse-height.vue.js +2 -2
- package/js/components/animations/collapse-height.vue.js.map +1 -1
- package/js/components/animations/collapse-width.vue.js +2 -2
- package/js/components/animations/collapse-width.vue.js.map +1 -1
- package/js/components/animations/cross-fade.vue.js +2 -2
- package/js/components/animations/cross-fade.vue.js.map +1 -1
- package/js/components/animations/fade-and-slide.vue.js +2 -2
- package/js/components/animations/fade-and-slide.vue.js.map +1 -1
- package/js/components/animations/staggered-fade-and-slide.vue.js +2 -2
- package/js/components/animations/staggered-fade-and-slide.vue.js.map +1 -1
- package/js/components/animations/staggered-fade-and-slide.vue_rollup-plugin-vue=script.js +1 -1
- package/js/components/animations/staggered-fade-and-slide.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/{staggering-transition-group.vue.js → animations/staggering-transition-group.vue.js} +2 -2
- package/js/components/animations/staggering-transition-group.vue.js.map +1 -0
- package/js/components/{staggering-transition-group.vue_rollup-plugin-vue=script.js → animations/staggering-transition-group.vue_rollup-plugin-vue=script.js} +17 -17
- package/js/components/animations/staggering-transition-group.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/animations/translate-from-left.vue.js +2 -2
- package/js/components/animations/translate-from-left.vue.js.map +1 -1
- package/js/components/animations/translate-from-right.vue.js +2 -2
- package/js/components/animations/translate-from-right.vue.js.map +1 -1
- package/js/components/base-dropdown.vue.js +2 -2
- package/js/components/base-dropdown.vue.js.map +1 -1
- package/js/components/base-event-button.vue.js.map +1 -1
- package/js/components/base-grid.vue.js +2 -2
- package/js/components/base-grid.vue.js.map +1 -1
- package/js/components/base-keyboard-navigation.vue.js.map +1 -1
- package/js/components/base-rating.vue.js +2 -2
- package/js/components/base-rating.vue.js.map +1 -1
- package/js/components/base-variable-column-grid.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-list.vue.js +2 -2
- package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
- package/js/components/currency/base-currency.vue.js.map +1 -1
- package/js/components/filters/labels/base-price-filter-label.vue.js.map +1 -1
- package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
- package/js/components/global-x-bus.vue.js.map +1 -1
- package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js +2 -1
- package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/layouts/fixed-header-and-asides-layout.vue.js +212 -0
- package/js/components/layouts/fixed-header-and-asides-layout.vue.js.map +1 -0
- package/js/components/layouts/fixed-header-and-asides-layout.vue_rollup-plugin-vue=script.js +57 -0
- package/js/components/layouts/fixed-header-and-asides-layout.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/layouts/multi-column-max-width-layout.vue.js +3 -3
- package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
- package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue=script.js +1 -1
- package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js +1 -1
- package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-events-modal.vue.js.map +1 -1
- package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-id-modal.vue.js.map +1 -1
- package/js/components/modals/base-modal.vue.js +2 -2
- package/js/components/modals/base-modal.vue.js.map +1 -1
- package/js/components/panels/base-header-toggle-panel.vue.js +2 -2
- package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel.vue_rollup-plugin-vue=script.js +4 -9
- package/js/components/panels/base-id-toggle-panel.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
- package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
- package/js/components/result/base-result-current-price.vue.js.map +1 -1
- package/js/components/result/base-result-image.vue.js +2 -2
- package/js/components/result/base-result-image.vue.js.map +1 -1
- package/js/components/result/base-result-link.vue.js +5 -5
- package/js/components/result/base-result-link.vue.js.map +1 -1
- package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js +3 -12
- package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/result/base-result-previous-price.vue.js.map +1 -1
- package/js/components/scroll/base-scroll.vue.js +2 -2
- package/js/components/scroll/base-scroll.vue.js.map +1 -1
- package/js/components/sliding-panel.vue.js +2 -2
- package/js/components/sliding-panel.vue.js.map +1 -1
- package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
- package/js/components/suggestions/base-suggestions.vue.js +2 -2
- package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
- package/js/components/x-component.mixin.js +1 -4
- package/js/components/x-component.mixin.js.map +1 -1
- package/js/components/x-component.utils.js +4 -20
- package/js/components/x-component.utils.js.map +1 -1
- package/js/index.js +31 -30
- package/js/index.js.map +1 -1
- package/js/plugins/x-plugin.alias.js +21 -20
- package/js/plugins/x-plugin.alias.js.map +1 -1
- package/js/plugins/x-plugin.mixin.js +2 -2
- package/js/plugins/x-plugin.mixin.js.map +1 -1
- package/js/wiring/namespaced-wires.operators.js +3 -4
- package/js/wiring/namespaced-wires.operators.js.map +1 -1
- package/js/wiring/wires-operators.utils.js +55 -0
- package/js/wiring/wires-operators.utils.js.map +1 -0
- package/js/wiring/wires.operators.js +17 -12
- package/js/wiring/wires.operators.js.map +1 -1
- package/js/x-installer/x-installer/x-installer.js +1 -1
- package/js/x-installer/x-installer/x-installer.js.map +1 -1
- package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
- package/js/x-modules/empathize/components/empathize.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/extra-params/components/renderless-extra-param.vue.js.map +1 -1
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue.js.map +1 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +22 -12
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/clear-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets-provider.vue.js +2 -2
- package/js/x-modules/facets/components/facets/facets-provider.vue.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +17 -23
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets.vue.js +2 -2
- package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/base-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +1 -1
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/renderless-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-list.vue.js +2 -2
- package/js/x-modules/facets/components/lists/filters-list.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue.js +2 -2
- package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/sorted-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/wiring.js +1 -1
- package/js/x-modules/history-queries/wiring.js.map +1 -1
- package/js/x-modules/identifier-results/components/identifier-result.vue.js.map +1 -1
- package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
- package/js/x-modules/identifier-results/wiring.js +1 -1
- package/js/x-modules/identifier-results/wiring.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestions.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/query-suggestions/wiring.js +1 -1
- package/js/x-modules/query-suggestions/wiring.js.map +1 -1
- package/js/x-modules/recommendations/components/recommendations.vue.js +2 -2
- package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +15 -14
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js +15 -14
- package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/scroll.vue.js.map +1 -1
- package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/scroll/components/window-scroll.vue.js.map +1 -1
- package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +15 -14
- package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/banner.vue.js +2 -1
- package/js/x-modules/search/components/banner.vue.js.map +1 -1
- package/js/x-modules/search/components/banner.vue_rollup-plugin-vue=script.js +8 -0
- package/js/x-modules/search/components/banner.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/banners-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
- package/js/x-modules/search/components/partial-results-list.vue.js +2 -2
- package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
- package/js/x-modules/search/components/promoted.vue.js +2 -1
- package/js/x-modules/search/components/promoted.vue.js.map +1 -1
- package/js/x-modules/search/components/promoted.vue_rollup-plugin-vue=script.js +8 -0
- package/js/x-modules/search/components/promoted.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/promoteds-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/search/components/redirection.vue.js.map +1 -1
- package/js/x-modules/search/components/redirection.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/results-list.vue_rollup-plugin-vue=script.js +2 -2
- package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue.js +2 -2
- package/js/x-modules/search/components/sort-list.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/sort.mixin.js +13 -12
- package/js/x-modules/search/components/sort.mixin.js.map +1 -1
- package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
- package/js/x-modules/search/components/spellcheck.vue.js.map +1 -1
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/tagging/store/actions/track.action.js +2 -2
- package/js/x-modules/tagging/store/actions/track.action.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +48 -4
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/package.json +7 -7
- package/report/tsdoc-metadata.json +1 -1
- package/report/x-adapter.api.json +1 -1
- package/report/x-components.api.json +572 -222
- package/report/x-components.api.md +60 -33
- package/report/x-types.api.json +1 -1
- package/tagging/index.js +1 -1
- package/types/adapter/mocked-adapter.d.ts.map +1 -1
- package/types/components/animations/index.d.ts +1 -0
- package/types/components/animations/index.d.ts.map +1 -1
- package/types/components/{staggering-transition-group.vue.d.ts → animations/staggering-transition-group.vue.d.ts} +0 -0
- package/types/components/animations/staggering-transition-group.vue.d.ts.map +1 -0
- package/types/components/global-x-bus.vue.d.ts.map +1 -1
- package/types/components/index.d.ts +1 -4
- package/types/components/index.d.ts.map +1 -1
- package/types/components/layouts/fixed-header-and-asides-layout.vue.d.ts +17 -0
- package/types/components/layouts/fixed-header-and-asides-layout.vue.d.ts.map +1 -0
- package/types/components/layouts/index.d.ts +4 -0
- package/types/components/layouts/index.d.ts.map +1 -0
- package/types/components/panels/base-id-toggle-panel.vue.d.ts +0 -5
- package/types/components/panels/base-id-toggle-panel.vue.d.ts.map +1 -1
- package/types/components/result/base-result-link.vue.d.ts +3 -10
- package/types/components/result/base-result-link.vue.d.ts.map +1 -1
- package/types/components/x-component.mixin.d.ts.map +1 -1
- package/types/components/x-component.utils.d.ts +1 -16
- package/types/components/x-component.utils.d.ts.map +1 -1
- package/types/plugins/x-plugin.alias.d.ts +4 -6
- package/types/plugins/x-plugin.alias.d.ts.map +1 -1
- package/types/plugins/x-plugin.mixin.d.ts +13 -3
- package/types/plugins/x-plugin.mixin.d.ts.map +1 -1
- package/types/utils/types.d.ts +6 -0
- package/types/utils/types.d.ts.map +1 -1
- package/types/wiring/events.types.d.ts +0 -5
- package/types/wiring/events.types.d.ts.map +1 -1
- package/types/wiring/namespaced-wires.operators.d.ts +2 -3
- package/types/wiring/namespaced-wires.operators.d.ts.map +1 -1
- package/types/wiring/namespaced-wiring.types.d.ts +9 -10
- package/types/wiring/namespaced-wiring.types.d.ts.map +1 -1
- package/types/wiring/wires-operators.utils.d.ts +36 -0
- package/types/wiring/wires-operators.utils.d.ts.map +1 -0
- package/types/wiring/wires.operators.d.ts +5 -8
- package/types/wiring/wires.operators.d.ts.map +1 -1
- package/types/wiring/wiring.types.d.ts +17 -4
- package/types/wiring/wiring.types.d.ts.map +1 -1
- package/types/x-installer/x-installer/x-installer.d.ts +1 -1
- package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts +6 -0
- package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts.map +1 -1
- package/types/x-modules/facets/components/facets/facets-provider.vue.d.ts +0 -8
- package/types/x-modules/facets/components/facets/facets-provider.vue.d.ts.map +1 -1
- package/types/x-modules/history-queries/wiring.d.ts +1 -1
- package/types/x-modules/identifier-results/wiring.d.ts +1 -1
- package/types/x-modules/query-suggestions/wiring.d.ts +1 -1
- package/types/x-modules/search/components/banner.vue.d.ts +6 -0
- package/types/x-modules/search/components/banner.vue.d.ts.map +1 -1
- package/types/x-modules/search/components/promoted.vue.d.ts +6 -0
- package/types/x-modules/search/components/promoted.vue.d.ts.map +1 -1
- package/types/x-modules/search/components/redirection.vue.d.ts +1 -1
- package/types/x-modules/search/components/redirection.vue.d.ts.map +1 -1
- package/types/x-modules/search/events.types.d.ts +11 -1
- package/types/x-modules/search/events.types.d.ts.map +1 -1
- package/types/x-modules/tagging/wiring.d.ts +29 -9
- package/types/x-modules/tagging/wiring.d.ts.map +1 -1
- package/docs/API-reference/api/x-components.baseidtogglepanel.created.md +0 -17
- package/docs/API-reference/api/x-components.xcomponent.md +0 -15
- package/docs/API-reference/api/x-components.xeventstypes.userrightclickedaresult.md +0 -13
- package/js/components/staggering-transition-group.vue.js.map +0 -1
- package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js.map +0 -1
- package/js/wiring/utils/wire-racing-handling.js +0 -108
- package/js/wiring/utils/wire-racing-handling.js.map +0 -1
- package/types/components/staggering-transition-group.vue.d.ts.map +0 -1
- package/types/components/x-component.types.d.ts +0 -19
- package/types/components/x-component.types.d.ts.map +0 -1
- package/types/wiring/utils/wire-racing-handling.d.ts +0 -27
- 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
19
|
+
## Examples
|
|
20
20
|
|
|
21
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
29
|
+
### Basic usage
|
|
30
30
|
|
|
31
31
|
```vue
|
|
32
32
|
<Spellcheck />
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
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 X 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 X 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 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 X 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 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 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 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 X 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 X 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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
Once you have finished developing or extending your search interface using the
|
|
16
|
+
Interface X Archetype project you will probably want to integrate it into your current
|
|
17
|
+
store.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
requires knowledge of JavaScript and Vue.js.
|
|
19
|
+
The integration is a 2-steps process:
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
- Load Interface X script.
|
|
22
|
+
- Initialise the Interface X.
|
|
23
23
|
|
|
24
|
-
|
|
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
|
-
|
|
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 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 X
|
|
31
|
+
script.
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
### 1. Add a snippet configuration
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
4. Configure the **xPlugin**.
|
|
35
|
+
The snippet configuration is needed by Interface 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
|
-
|
|
39
|
+
If your configuration values are easy to retrieve or static, you can simply use an object.
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
You can read more about the [Snippet Configuration](#snippet-configuration) below.
|
|
69
|
+
|
|
70
|
+
### 2. Load the Interface X script
|
|
71
|
+
|
|
72
|
+
Once you have defined your snippet configuration either as an object or a function, you can insert
|
|
73
|
+
the Interface 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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
[`package.json`](https://github.com/empathyco/x-archetype/blob/main/package.json) file in the
|
|
102
|
-
Interface X Archetype repository. :::
|
|
110
|
+
This way, when the Interface 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
|
-
##
|
|
113
|
+
## Initialise on demand
|
|
105
114
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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 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 X.
|
|
111
119
|
|
|
112
|
-
|
|
113
|
-
[xPlugin configuration](web-archetype-integration-guide.md#_4-configure-the-plugin).
|
|
120
|
+
### 1. Load the Interface X script
|
|
114
121
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
[x-adapter repository](https://github.com/empathyco/x/tree/main/packages/search-adapter). :::
|
|
122
|
+
First, load the Interface 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
|
-
|
|
120
|
-
|
|
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
|
-
|
|
125
|
-
|
|
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 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 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 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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
134
|
+
```html
|
|
135
|
+
<script src="https://x.staging.empathy.co/my-store/app.js"></script>
|
|
136
|
+
```
|
|
169
137
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
138
|
+
### 2. Initialise Interface X
|
|
139
|
+
|
|
140
|
+
Loading the Interface 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 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
|
-
|
|
159
|
+
## Snippet configuration
|
|
160
|
+
|
|
161
|
+
The snippet configuration allows you to configure certain parts of the Interface 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'` | `'staging'` | | The API environment to use. Note that you can use the production version of your Interface 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'` | `'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
|
+
| <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 X with | Opens Interface 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 X Archetype as
|
|
17
17
|
your starting point, see
|
|
18
|
-
**[
|
|
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 X 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-
|
|
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-
|
|
30
|
+
var __vue_scope_id__ = "data-v-0d2c1ed8";
|
|
31
31
|
/* module identifier */
|
|
32
32
|
var __vue_module_identifier__ = undefined;
|
|
33
33
|
/* functional template */
|