@empathyco/x-components 6.0.0-alpha.6 → 6.0.0-alpha.61
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 +531 -0
- package/core/index.js +9 -1
- package/core/index.js.map +1 -1
- package/design-system/deprecated-full-theme.css +2371 -2371
- package/docs/API-reference/api/x-adapter-platform.md +12 -0
- package/docs/API-reference/api/x-adapter-platform.nextqueriesrelatedpromptsschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformadapter.relatedprompts.md +1 -1
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.md +23 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.nextqueries.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.suggestiontext.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.tagging.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompt.type.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.md +22 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplay.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplayadd2cart.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptnextqueriestagging.toolingdisplayclick.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsrequest.md +15 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsresponse.data.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsresponse.md +21 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedpromptsresponse.status.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.md +22 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.nextqueries.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.toolingdisplay.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedprompttagging.toolingdisplayclick.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.catalog.md +6 -0
- package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.md +1 -1
- package/docs/API-reference/api/x-adapter-platform.relatedpromptschema.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.relatedpromptsendpointadapter.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.relatedpromptsrequestmapper.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.relatedpromptsrequestschema.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.relatedpromptsresponsemapper.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.relatedpromptsresponseschema.md +13 -0
- package/docs/API-reference/api/x-components.animationprop.md +6 -1
- package/docs/API-reference/api/x-components.bannerslist.md +3 -3
- package/docs/API-reference/api/x-components.baseaddtocart.md +1 -0
- package/docs/API-reference/api/x-components.basedropdown.md +5 -5
- package/docs/API-reference/api/x-components.baseeventsmodal.md +2 -2
- package/docs/API-reference/api/x-components.basegrid.md +3 -3
- package/docs/API-reference/api/x-components.baseheadertogglepanel.md +5 -5
- package/docs/API-reference/api/x-components.baseidmodal.md +2 -2
- package/docs/API-reference/api/x-components.baseidtogglepanel.md +5 -5
- package/docs/API-reference/api/x-components.basemodal.md +10 -10
- package/docs/API-reference/api/x-components.baseresultimage.md +9 -9
- package/docs/API-reference/api/x-components.baseslider.md +70 -0
- package/docs/API-reference/api/x-components.basesuggestions.md +3 -3
- package/docs/API-reference/api/x-components.baseswitch.md +1 -1
- package/docs/API-reference/api/x-components.basetabspanel.md +8 -8
- package/docs/API-reference/api/x-components.baseteleport.md +21 -0
- package/docs/API-reference/api/x-components.basetogglepanel.md +3 -3
- package/docs/API-reference/api/x-components.basevariablecolumngrid.md +3 -3
- package/docs/API-reference/api/x-components.cancelfetchandsaverelatedprompts.md +13 -0
- package/docs/API-reference/api/x-components.configmutations.config.md +11 -0
- package/docs/API-reference/api/x-components.configmutations.md +29 -0
- package/docs/API-reference/api/x-components.configmutations.mergeconfig.md +24 -0
- package/docs/API-reference/api/x-components.configmutations.setconfig.md +24 -0
- package/docs/API-reference/api/x-components.createrelatedtagsquerygetter.md +26 -0
- package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.getrelatedtags.md +13 -0
- package/docs/API-reference/api/x-components.createrelatedtagsquerygetteroptions.md +20 -0
- package/docs/API-reference/api/x-components.createtrackrelatedprompttoolingdisplayclickwire.md +19 -0
- package/docs/API-reference/api/x-components.createtracktoolingadd2cartwire.md +19 -0
- package/docs/API-reference/api/x-components.createtracktoolingdisplaywire.md +19 -0
- package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice._constructor_.md → x-components.defaultexternaltaggingservice._constructor_.md} +3 -3
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.add_to_cart_id_key.md +13 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.instance.md +13 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.localstorageservice.md +11 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.md +43 -0
- package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.movetosessionstorage.md → x-components.defaultexternaltaggingservice.movetosessionstorage.md} +2 -2
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.result_clicked_id_key.md +13 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.sessionstorageservice.md +11 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagekey.md +11 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagettlms.md +11 -0
- package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.store.md → x-components.defaultexternaltaggingservice.store.md} +2 -2
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storeaddtocart.md +24 -0
- package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.storeresultclicked.md → x-components.defaultexternaltaggingservice.storeresultclicked.md} +3 -3
- package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.trackaddtocart.md → x-components.defaultexternaltaggingservice.trackaddtocart.md} +3 -3
- package/docs/API-reference/api/x-components.displayclickprovider.md +66 -0
- package/docs/API-reference/api/x-components.empathize.md +6 -6
- package/docs/API-reference/api/x-components.empathizemutations.md +1 -1
- package/docs/API-reference/api/x-components.externaltaggingservice.md +23 -0
- package/docs/API-reference/api/{x-components.pdpaddtocartservice.movetosessionstorage.md → x-components.externaltaggingservice.movetosessionstorage.md} +2 -2
- package/docs/API-reference/api/x-components.externaltaggingservice.storeaddtocart.md +24 -0
- package/docs/API-reference/api/{x-components.pdpaddtocartservice.storeresultclicked.md → x-components.externaltaggingservice.storeresultclicked.md} +3 -3
- package/docs/API-reference/api/{x-components.pdpaddtocartservice.trackaddtocart.md → x-components.externaltaggingservice.trackaddtocart.md} +3 -3
- package/docs/API-reference/api/x-components.facets.md +3 -3
- package/docs/API-reference/api/x-components.facetsmutations.md +1 -1
- package/docs/API-reference/api/x-components.featurelocation.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsaverelatedprompts.md +13 -0
- package/docs/API-reference/api/x-components.fetchrelatedprompts.md +13 -0
- package/docs/API-reference/api/x-components.filterslist.md +3 -3
- package/docs/API-reference/api/x-components.globalxbus.md +14 -0
- package/docs/API-reference/api/x-components.hierarchicalfilter.md +9 -2
- package/docs/API-reference/api/x-components.historyqueriesmutations.md +1 -1
- package/docs/API-reference/api/x-components.historyqueriesstate.md +1 -1
- package/docs/API-reference/api/x-components.identifierresults.md +3 -3
- package/docs/API-reference/api/x-components.identifierresultsmutations.md +1 -1
- package/docs/API-reference/api/x-components.identifierresultsstate.md +1 -1
- package/docs/API-reference/api/x-components.installxoptions.domelement.md +1 -1
- package/docs/API-reference/api/x-components.installxoptions.installextraplugins.md +2 -2
- package/docs/API-reference/api/x-components.installxoptions.md +1 -1
- package/docs/API-reference/api/x-components.itemslist.md +3 -3
- package/docs/API-reference/api/x-components.mainmodal.md +2 -2
- package/docs/API-reference/api/x-components.md +39 -3
- package/docs/API-reference/api/x-components.mergeconfig.md +27 -0
- package/docs/API-reference/api/x-components.multicolumnmaxwidthlayout.md +5 -5
- package/docs/API-reference/api/x-components.myhistory.md +3 -3
- package/docs/API-reference/api/x-components.nextqueriesgroup.md +22 -0
- package/docs/API-reference/api/x-components.nextqueriesgroup.modelname.md +11 -0
- package/docs/API-reference/api/x-components.nextqueriesgroup.nextqueries.md +11 -0
- package/docs/API-reference/api/x-components.nextquerieslist.md +3 -3
- package/docs/API-reference/api/x-components.nextqueriesmutations.md +1 -1
- package/docs/API-reference/api/x-components.nextqueriesstate.md +1 -1
- package/docs/API-reference/api/x-components.pageselector.md +80 -0
- package/docs/API-reference/api/x-components.partialresultslist.md +3 -3
- package/docs/API-reference/api/x-components.popularsearchesmutations.md +1 -1
- package/docs/API-reference/api/x-components.promotedslist.md +3 -3
- package/docs/API-reference/api/x-components.queriespreviewmutations.md +1 -1
- package/docs/API-reference/api/x-components.queryfeature.md +1 -1
- package/docs/API-reference/api/x-components.querymutations.md +20 -0
- package/docs/API-reference/api/x-components.querymutations.setquery.md +24 -0
- package/docs/API-reference/api/x-components.querypreviewlist.md +3 -3
- package/docs/API-reference/api/x-components.querystate.md +20 -0
- package/docs/API-reference/api/x-components.querystate.query.md +13 -0
- package/docs/API-reference/api/x-components.querysuggestionsmutations.md +1 -1
- package/docs/API-reference/api/x-components.querysuggestionsstate.md +1 -1
- package/docs/API-reference/api/x-components.recommendations.md +3 -3
- package/docs/API-reference/api/x-components.recommendationsmutations.md +1 -1
- package/docs/API-reference/api/x-components.relatedprompt.md +33 -0
- package/docs/API-reference/api/x-components.relatedpromptsactioncontext.md +15 -0
- package/docs/API-reference/api/x-components.relatedpromptsactions.cancelfetchandsaverelatedprompts.md +17 -0
- package/docs/API-reference/api/x-components.relatedpromptsactions.fetchandsaverelatedprompts.md +24 -0
- package/docs/API-reference/api/x-components.relatedpromptsactions.fetchrelatedprompts.md +24 -0
- package/docs/API-reference/api/x-components.relatedpromptsactions.md +23 -0
- package/docs/API-reference/api/x-components.relatedpromptsactions.seturlparams.md +24 -0
- package/docs/API-reference/api/x-components.relatedpromptsgetters.md +21 -0
- package/docs/API-reference/api/x-components.relatedpromptsgetters.query.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsgetters.request.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptslist.md +72 -0
- package/docs/API-reference/api/x-components.relatedpromptsmutations.md +27 -0
- package/docs/API-reference/api/x-components.relatedpromptsmutations.resetrelatedpromptsstate.md +17 -0
- package/docs/API-reference/api/x-components.relatedpromptsmutations.resetselectedprompt.md +17 -0
- package/docs/API-reference/api/x-components.relatedpromptsmutations.setparams.md +24 -0
- package/docs/API-reference/api/x-components.relatedpromptsmutations.setrelatedpromptsproducts.md +24 -0
- package/docs/API-reference/api/x-components.relatedpromptsmutations.setrelatedpromptsrelatedtags.md +24 -0
- package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedprompt.md +24 -0
- package/docs/API-reference/api/x-components.relatedpromptsmutations.setselectedquery.md +24 -0
- package/docs/API-reference/api/x-components.relatedpromptsstate.md +25 -0
- package/docs/API-reference/api/x-components.relatedpromptsstate.params.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsstate.relatedprompts.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsstate.relatedtags.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsstate.selectedprompt.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsstate.selectedquery.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptstaglist.md +72 -0
- package/docs/API-reference/api/x-components.relatedpromptsxevents.md +25 -0
- package/docs/API-reference/api/x-components.relatedpromptsxevents.relatedpromptsrequestupdated.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsxevents.selectedrelatedpromptchanged.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptadd2cart.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsxevents.userclickedarelatedpromptresult.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedprompt.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsxevents.userselectedarelatedpromptquery.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsxmodule.md +13 -0
- package/docs/API-reference/api/x-components.relatedpromptsxstoremodule.md +15 -0
- package/docs/API-reference/api/x-components.relatedtags.md +3 -3
- package/docs/API-reference/api/x-components.relatedtagsmutations.md +1 -1
- package/docs/API-reference/api/x-components.relatedtagsstate.md +1 -1
- package/docs/API-reference/api/x-components.resultfeature.md +1 -1
- package/docs/API-reference/api/x-components.resultslist.md +3 -3
- package/docs/API-reference/api/x-components.scrolltotop.md +5 -5
- package/docs/API-reference/api/x-components.searchboxmutations.md +1 -1
- package/docs/API-reference/api/x-components.searchboxstate.md +1 -1
- package/docs/API-reference/api/x-components.searchconfig.md +1 -0
- package/docs/API-reference/api/x-components.searchconfig.pagemode.md +11 -0
- package/docs/API-reference/api/x-components.searchinputplaceholder.md +3 -3
- package/docs/API-reference/api/x-components.searchmutations.md +2 -1
- package/docs/API-reference/api/x-components.searchmutations.setstats.md +24 -0
- package/docs/API-reference/api/x-components.searchstate.md +2 -1
- package/docs/API-reference/api/x-components.searchstate.stats.md +13 -0
- package/docs/API-reference/api/x-components.searchxevents.md +1 -0
- package/docs/API-reference/api/x-components.searchxevents.userselectedapage.md +13 -0
- package/docs/API-reference/api/x-components.selectedfilterslist.md +3 -3
- package/docs/API-reference/api/x-components.semanticqueriesgetters.md +1 -0
- package/docs/API-reference/api/x-components.semanticqueriesgetters.query.md +13 -0
- package/docs/API-reference/api/x-components.semanticqueriesmutations.md +2 -1
- package/docs/API-reference/api/x-components.semanticqueriesmutations.setsemanticqueriesrelatedtags.md +24 -0
- package/docs/API-reference/api/x-components.semanticqueriesstate.md +2 -1
- package/docs/API-reference/api/x-components.semanticqueriesstate.relatedtags.md +13 -0
- package/docs/API-reference/api/x-components.setconfig.md +27 -0
- package/docs/API-reference/api/x-components.setquery.md +25 -0
- package/docs/API-reference/api/x-components.seturlprompt.md +13 -0
- package/docs/API-reference/api/x-components.simplefilter.md +7 -0
- package/docs/API-reference/api/x-components.singlecolumnlayout.md +3 -3
- package/docs/API-reference/api/x-components.slidingpanel.md +13 -5
- package/docs/API-reference/api/x-components.snippetcallbacks.md +7 -0
- package/docs/API-reference/api/x-components.sortdropdown.md +1 -1
- package/docs/API-reference/api/x-components.tagging.md +6 -6
- package/docs/API-reference/api/x-components.taggingconfig.md +2 -2
- package/docs/API-reference/api/{x-components.taggingconfig.clickedresultstoragekey.md → x-components.taggingconfig.storagekey.md} +3 -3
- package/docs/API-reference/api/x-components.taggingconfig.storagettlms.md +13 -0
- package/docs/API-reference/api/x-components.taggingmutations.md +1 -1
- package/docs/API-reference/api/x-components.taggingxevents.md +1 -1
- package/docs/API-reference/api/x-components.taggingxevents.resulturltrackingenabled.md +1 -1
- package/docs/API-reference/api/x-components.trackrelatedprompttoolingdisplayclickwire.md +13 -0
- package/docs/API-reference/api/x-components.tracktoolingadd2cartwire.md +13 -0
- package/docs/API-reference/api/x-components.tracktoolingdisplayclickedwire.md +13 -0
- package/docs/API-reference/api/x-components.typing.md +13 -0
- package/docs/API-reference/api/x-components.typingoptions.md +22 -0
- package/docs/API-reference/api/x-components.typingoptions.speed.md +13 -0
- package/docs/API-reference/api/x-components.typingoptions.targetattr.md +18 -0
- package/docs/API-reference/api/x-components.typingoptions.text.md +13 -0
- package/docs/API-reference/api/x-components.urlmutations.md +2 -1
- package/docs/API-reference/api/x-components.urlmutations.setprompt.md +24 -0
- package/docs/API-reference/api/x-components.urlparams.md +1 -0
- package/docs/API-reference/api/x-components.urlparams.prompt.md +11 -0
- package/docs/API-reference/api/x-components.urlstate.md +1 -1
- package/docs/API-reference/api/x-components.usealiasapi.md +1 -0
- package/docs/API-reference/api/x-components.usealiasapi.pricestats.md +16 -0
- package/docs/API-reference/api/x-components.xeventstypes.md +3 -3
- package/docs/API-reference/api/x-components.xmodulestree.md +1 -0
- package/docs/API-reference/api/x-components.xmodulestree.relatedprompts.md +11 -0
- package/docs/API-reference/api/x-types.md +2 -0
- package/docs/API-reference/api/x-types.relatedprompt.md +4 -1
- package/docs/API-reference/api/x-types.relatedprompt.nextqueries.md +1 -1
- package/docs/API-reference/api/x-types.relatedprompt.relatedpromptnextqueries.md +13 -0
- package/docs/API-reference/api/x-types.relatedprompt.tagging.md +17 -0
- package/docs/API-reference/api/x-types.relatedprompt.toolingdisplaytagging.md +13 -0
- package/docs/API-reference/api/x-types.relatedpromptnextquery.md +23 -0
- package/docs/API-reference/api/x-types.relatedpromptnextquery.query.md +13 -0
- package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayadd2carttagging.md +13 -0
- package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplayclicktagging.md +13 -0
- package/docs/API-reference/api/x-types.relatedpromptnextquery.toolingdisplaytagging.md +13 -0
- package/docs/API-reference/api/x-types.searchresponse.md +1 -0
- package/docs/API-reference/api/x-types.searchresponse.stats.md +11 -0
- package/docs/API-reference/api/x-types.stats.md +22 -0
- package/docs/API-reference/api/x-types.stats.price.md +14 -0
- package/docs/API-reference/components/common/result/x-components.base-result-image.md +2 -2
- package/docs/API-reference/components/common/x-components.base-slider.md +189 -0
- package/docs/API-reference/components/common/x-components.base-teleport.md +19 -0
- package/docs/API-reference/components/common/x-components.display-click-provider.md +17 -0
- package/docs/API-reference/components/common/x-components.items-list.md +1 -1
- package/docs/API-reference/components/common/x-components.page-selector.md +136 -0
- package/docs/API-reference/components/common/x-components.sliding-panel.md +7 -7
- package/docs/API-reference/components/facets/x-components.facets/facets.md +1 -1
- package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +1 -1
- package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +22 -0
- package/docs/API-reference/components/related-prompts/x-components.related-prompts-list.md +196 -0
- package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +32 -0
- package/docs/API-reference/components/search/x-components.results-list.md +1 -1
- package/docs/API-reference/components/tagging/x-components.tagging.md +15 -16
- package/js/components/animations/fade-and-slide.vue.js +1 -2
- package/js/components/animations/fade-and-slide.vue.js.map +1 -1
- package/js/components/base-dropdown.vue.js +1 -3
- package/js/components/base-dropdown.vue.js.map +1 -1
- package/js/components/base-dropdown.vue2.js +1 -7
- package/js/components/base-dropdown.vue2.js.map +1 -1
- package/js/components/base-event-button.vue.js +1 -2
- package/js/components/base-event-button.vue.js.map +1 -1
- package/js/components/base-grid.vue.js +11 -18
- package/js/components/base-grid.vue.js.map +1 -1
- package/js/components/base-grid.vue2.js.map +1 -1
- package/js/components/base-grid.vue3.js +1 -1
- package/js/components/base-keyboard-navigation.vue.js +1 -2
- package/js/components/base-keyboard-navigation.vue.js.map +1 -1
- package/js/components/base-rating.vue.js +1 -3
- package/js/components/base-rating.vue.js.map +1 -1
- package/js/components/base-slider.vue.js +65 -0
- package/js/components/base-slider.vue.js.map +1 -0
- package/js/components/base-slider.vue2.js +109 -0
- package/js/components/base-slider.vue2.js.map +1 -0
- package/js/components/base-slider.vue3.js +7 -0
- package/js/components/base-slider.vue3.js.map +1 -0
- package/js/components/base-switch.vue.js.map +1 -1
- package/js/components/base-switch.vue2.js +3 -7
- package/js/components/base-switch.vue2.js.map +1 -1
- package/js/components/base-teleport.vue.js +17 -0
- package/js/components/base-teleport.vue.js.map +1 -0
- package/js/components/base-teleport.vue2.js +14 -0
- package/js/components/base-teleport.vue2.js.map +1 -0
- package/js/components/base-teleport.vue3.js +7 -0
- package/js/components/base-teleport.vue3.js.map +1 -0
- package/js/components/base-variable-column-grid.vue.js +1 -2
- package/js/components/base-variable-column-grid.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-dropdown.vue.js +1 -3
- 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 +1 -3
- package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
- package/js/components/display-click-provider.vue.js +74 -0
- package/js/components/display-click-provider.vue.js.map +1 -0
- package/js/components/display-click-provider.vue2.js +6 -0
- package/js/components/display-click-provider.vue2.js.map +1 -0
- package/js/components/filters/labels/base-rating-filter-label.vue.js +1 -3
- package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
- package/js/components/icons/cross-tiny.vue.js +2 -2
- package/js/components/icons/plus.vue.js +2 -2
- package/js/components/items-list.vue.js +1 -2
- package/js/components/items-list.vue.js.map +1 -1
- package/js/components/items-list.vue2.js +2 -2
- package/js/components/items-list.vue2.js.map +1 -1
- package/js/components/layouts/fixed-header-and-asides-layout.vue.js +1 -7
- package/js/components/layouts/fixed-header-and-asides-layout.vue.js.map +1 -1
- package/js/components/layouts/multi-column-max-width-layout.vue.js +1 -9
- package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
- package/js/components/layouts/single-column-layout.vue.js +1 -9
- package/js/components/layouts/single-column-layout.vue.js.map +1 -1
- package/js/components/modals/base-events-modal-close.vue.js +1 -2
- package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-events-modal-open.vue.js +1 -2
- package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-id-modal-close.vue.js +1 -2
- package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-id-modal-open.vue.js +1 -2
- package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-modal.vue.js +1 -2
- package/js/components/modals/base-modal.vue.js.map +1 -1
- package/js/components/modals/base-modal.vue2.js +13 -6
- package/js/components/modals/base-modal.vue2.js.map +1 -1
- package/js/components/page-loader-button.vue.js +8 -10
- package/js/components/page-loader-button.vue.js.map +1 -1
- package/js/components/page-loader-button.vue2.js.map +1 -1
- package/js/components/page-loader-button.vue3.js +7 -0
- package/js/components/page-loader-button.vue3.js.map +1 -0
- package/js/components/page-selector.vue.js +78 -0
- package/js/components/page-selector.vue.js.map +1 -0
- package/js/components/page-selector.vue2.js +128 -0
- package/js/components/page-selector.vue2.js.map +1 -0
- package/js/components/page-selector.vue3.js +7 -0
- package/js/components/page-selector.vue3.js.map +1 -0
- package/js/components/panels/base-header-toggle-panel.vue.js +1 -5
- package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel-button.vue.js +1 -2
- package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel.vue.js +1 -2
- package/js/components/panels/base-id-toggle-panel.vue.js.map +1 -1
- package/js/components/panels/base-tabs-panel.vue.js +1 -4
- package/js/components/panels/base-tabs-panel.vue.js.map +1 -1
- package/js/components/panels/base-toggle-panel.vue.js +1 -2
- package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
- package/js/components/result/base-result-add-to-cart.vue.js +3 -3
- package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
- package/js/components/result/base-result-add-to-cart.vue2.js +19 -5
- package/js/components/result/base-result-add-to-cart.vue2.js.map +1 -1
- package/js/components/result/base-result-current-price.vue.js +1 -2
- package/js/components/result/base-result-current-price.vue.js.map +1 -1
- package/js/components/result/base-result-image.vue.js +39 -59
- package/js/components/result/base-result-image.vue.js.map +1 -1
- package/js/components/result/base-result-image.vue2.js +5 -5
- package/js/components/result/base-result-image.vue2.js.map +1 -1
- package/js/components/result/base-result-link.vue.js +1 -2
- package/js/components/result/base-result-link.vue.js.map +1 -1
- package/js/components/result/base-result-previous-price.vue.js +1 -2
- package/js/components/result/base-result-previous-price.vue.js.map +1 -1
- package/js/components/result/base-result-rating.vue.js +1 -4
- package/js/components/result/base-result-rating.vue.js.map +1 -1
- package/js/components/result/result-variant-selector.vue.js +1 -3
- package/js/components/result/result-variant-selector.vue.js.map +1 -1
- package/js/components/sliding-panel.vue.js +3 -6
- package/js/components/sliding-panel.vue.js.map +1 -1
- package/js/components/sliding-panel.vue2.js +2 -2
- package/js/components/sliding-panel.vue2.js.map +1 -1
- package/js/components/suggestions/base-suggestion.vue.js +1 -2
- package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
- package/js/components/suggestions/base-suggestions.vue.js +1 -2
- package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
- package/js/composables/use-alias-api.js +4 -1
- package/js/composables/use-alias-api.js.map +1 -1
- package/js/composables/use-getter.js +1 -1
- package/js/composables/use-state.js +1 -1
- package/js/directives/typing.js +58 -0
- package/js/directives/typing.js.map +1 -0
- package/js/index.js +21 -4
- package/js/index.js.map +1 -1
- package/js/types/animation-prop.js +5 -0
- package/js/types/animation-prop.js.map +1 -1
- package/js/x-installer/x-installer/x-installer.js +3 -3
- package/js/x-installer/x-installer/x-installer.js.map +1 -1
- package/js/x-modules/device/store/emitters.js +1 -0
- package/js/x-modules/device/store/emitters.js.map +1 -1
- package/js/x-modules/empathize/components/empathize.vue.js +1 -2
- package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
- package/js/x-modules/empathize/components/empathize.vue2.js +10 -3
- package/js/x-modules/empathize/components/empathize.vue2.js.map +1 -1
- package/js/x-modules/empathize/store/emitters.js +1 -0
- package/js/x-modules/empathize/store/emitters.js.map +1 -1
- package/js/x-modules/experience-controls/store/emitters.js +1 -0
- package/js/x-modules/experience-controls/store/emitters.js.map +1 -1
- package/js/x-modules/extra-params/components/extra-params.vue.js +1 -1
- package/js/x-modules/extra-params/components/extra-params.vue.js.map +1 -1
- package/js/x-modules/extra-params/store/emitters.js +1 -0
- package/js/x-modules/extra-params/store/emitters.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets.vue.js +20 -33
- package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets.vue2.js +2 -2
- package/js/x-modules/facets/components/facets/facets.vue2.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue.js +1 -2
- package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +1 -6
- 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 +1 -3
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/number-range-filter.vue.js +1 -3
- package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/simple-filter.vue.js +1 -3
- package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-list.vue.js +1 -2
- package/js/x-modules/facets/components/lists/filters-list.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue.js +1 -3
- package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +11 -18
- package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js +2 -2
- package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js.map +1 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue.js +1 -4
- package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/clear-history-queries.vue.js +1 -2
- 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 +1 -10
- package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue.js +1 -6
- package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/my-history.vue.js +1 -4
- package/js/x-modules/history-queries/components/my-history.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/remove-history-query.vue.js +1 -2
- package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/store/emitters.js +1 -0
- package/js/x-modules/history-queries/store/emitters.js.map +1 -1
- package/js/x-modules/identifier-results/components/identifier-results.vue.js +1 -2
- package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
- package/js/x-modules/identifier-results/store/emitters.js +1 -0
- package/js/x-modules/identifier-results/store/emitters.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue.js +1 -7
- package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query-preview.vue.js +1 -3
- package/js/x-modules/next-queries/components/next-query-preview.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue.js +1 -4
- package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
- package/js/x-modules/next-queries/store/emitters.js +1 -0
- package/js/x-modules/next-queries/store/emitters.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue.js +1 -4
- package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue.js +1 -7
- package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-button.vue.js +1 -2
- package/js/x-modules/queries-preview/components/query-preview-button.vue.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-button.vue2.js +8 -0
- package/js/x-modules/queries-preview/components/query-preview-button.vue2.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-list.vue.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-list.vue2.js +15 -2
- package/js/x-modules/queries-preview/components/query-preview-list.vue2.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview.vue.js +1 -2
- package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview.vue2.js +9 -1
- package/js/x-modules/queries-preview/components/query-preview.vue2.js.map +1 -1
- package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js +2 -1
- package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js.map +1 -1
- package/js/x-modules/queries-preview/store/emitters.js +1 -0
- package/js/x-modules/queries-preview/store/emitters.js.map +1 -1
- package/js/x-modules/queries-preview/store/module.js +1 -1
- package/js/x-modules/queries-preview/store/module.js.map +1 -1
- package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js +6 -4
- package/js/x-modules/queries-preview/utils/get-hash-from-query-preview.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +1 -4
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +1 -7
- package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
- package/js/x-modules/query-suggestions/store/emitters.js +1 -0
- package/js/x-modules/query-suggestions/store/emitters.js.map +1 -1
- package/js/x-modules/recommendations/components/recommendations.vue.js +1 -2
- package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
- package/js/x-modules/recommendations/store/emitters.js +1 -0
- package/js/x-modules/recommendations/store/emitters.js.map +1 -1
- package/js/x-modules/related-prompts/components/related-prompt.vue.js +27 -0
- package/js/x-modules/related-prompts/components/related-prompt.vue.js.map +1 -0
- package/js/x-modules/related-prompts/components/related-prompt.vue2.js +31 -0
- package/js/x-modules/related-prompts/components/related-prompt.vue2.js.map +1 -0
- package/js/x-modules/related-prompts/components/related-prompt.vue3.js +7 -0
- package/js/x-modules/related-prompts/components/related-prompt.vue3.js.map +1 -0
- package/js/x-modules/related-prompts/components/related-prompts-list.vue.js +154 -0
- package/js/x-modules/related-prompts/components/related-prompts-list.vue.js.map +1 -0
- package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js +6 -0
- package/js/x-modules/related-prompts/components/related-prompts-list.vue2.js.map +1 -0
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js +101 -0
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue.js.map +1 -0
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js +221 -0
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue2.js.map +1 -0
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js +7 -0
- package/js/x-modules/related-prompts/components/related-prompts-tag-list.vue3.js.map +1 -0
- package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js +29 -0
- package/js/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.js.map +1 -0
- package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js +20 -0
- package/js/x-modules/related-prompts/store/actions/fetch-related-prompts.action.js.map +1 -0
- package/js/x-modules/related-prompts/store/actions/set-url-params.action.js +15 -0
- package/js/x-modules/related-prompts/store/actions/set-url-params.action.js.map +1 -0
- package/js/x-modules/related-prompts/store/emitters.js +16 -0
- package/js/x-modules/related-prompts/store/emitters.js.map +1 -0
- package/js/x-modules/related-prompts/store/getters/related-prompts-query.getter.js +18 -0
- package/js/x-modules/related-prompts/store/getters/related-prompts-query.getter.js.map +1 -0
- package/js/x-modules/related-prompts/store/getters/request.getter.js +17 -0
- package/js/x-modules/related-prompts/store/getters/request.getter.js.map +1 -0
- package/js/x-modules/related-prompts/store/module.js +64 -0
- package/js/x-modules/related-prompts/store/module.js.map +1 -0
- package/js/x-modules/related-prompts/wiring.js +82 -0
- package/js/x-modules/related-prompts/wiring.js.map +1 -0
- package/js/x-modules/related-prompts/x-module.js +21 -0
- package/js/x-modules/related-prompts/x-module.js.map +1 -0
- package/js/x-modules/related-tags/components/related-tag.vue.js +1 -2
- package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tags.vue.js +1 -4
- package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
- package/js/x-modules/related-tags/store/emitters.js +1 -0
- package/js/x-modules/related-tags/store/emitters.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue.js +1 -2
- package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue2.js +8 -0
- package/js/x-modules/scroll/components/scroll-to-top.vue2.js.map +1 -1
- package/js/x-modules/scroll/store/emitters.js +1 -0
- package/js/x-modules/scroll/store/emitters.js.map +1 -1
- package/js/x-modules/search/components/partial-results-list.vue.js +1 -2
- package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
- package/js/x-modules/search/components/results-list.vue.js +2 -2
- package/js/x-modules/search/components/results-list.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-dropdown.vue.js +1 -3
- package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +10 -3
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
- package/js/x-modules/search/store/actions/save-search-response.action.js +3 -1
- package/js/x-modules/search/store/actions/save-search-response.action.js.map +1 -1
- package/js/x-modules/search/store/emitters.js +1 -0
- package/js/x-modules/search/store/emitters.js.map +1 -1
- package/js/x-modules/search/store/module.js +9 -3
- package/js/x-modules/search/store/module.js.map +1 -1
- package/js/x-modules/search/wiring.js +4 -0
- package/js/x-modules/search/wiring.js.map +1 -1
- package/js/x-modules/search-box/components/clear-search-input.vue.js +1 -2
- package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-button.vue.js +1 -2
- package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
- package/js/x-modules/search-box/store/emitters.js +1 -0
- package/js/x-modules/search-box/store/emitters.js.map +1 -1
- package/js/x-modules/semantic-queries/components/semantic-queries.vue.js +1 -3
- package/js/x-modules/semantic-queries/components/semantic-queries.vue.js.map +1 -1
- package/js/x-modules/semantic-queries/components/semantic-query.vue.js +1 -4
- package/js/x-modules/semantic-queries/components/semantic-query.vue.js.map +1 -1
- package/js/x-modules/semantic-queries/store/getters/normalized-query.getter.js +1 -1
- package/js/x-modules/semantic-queries/store/getters/normalized-query.getter.js.map +1 -1
- package/js/x-modules/semantic-queries/store/getters/request.getter.js +5 -4
- package/js/x-modules/semantic-queries/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.js +18 -0
- package/js/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.js.map +1 -0
- package/js/x-modules/semantic-queries/store/module.js +8 -2
- package/js/x-modules/semantic-queries/store/module.js.map +1 -1
- package/js/x-modules/semantic-queries/wiring.js +5 -0
- package/js/x-modules/semantic-queries/wiring.js.map +1 -1
- package/js/x-modules/tagging/components/tagging.vue.js +8 -7
- package/js/x-modules/tagging/components/tagging.vue.js.map +1 -1
- package/js/x-modules/tagging/service/{pdp-add-to-cart.service.js → external-tagging.service.js} +56 -25
- package/js/x-modules/tagging/service/external-tagging.service.js.map +1 -0
- package/js/x-modules/tagging/store/emitters.js +1 -1
- package/js/x-modules/tagging/store/emitters.js.map +1 -1
- package/js/x-modules/tagging/store/module.js +7 -3
- package/js/x-modules/tagging/store/module.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +110 -9
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue2.js +4 -5
- package/js/x-modules/url/components/url-handler.vue2.js.map +1 -1
- package/js/x-modules/url/store/emitters.js +1 -0
- package/js/x-modules/url/store/emitters.js.map +1 -1
- package/js/x-modules/url/store/getters/url-params.getter.js +2 -3
- package/js/x-modules/url/store/getters/url-params.getter.js.map +1 -1
- package/js/x-modules/url/store/initial-state.js +2 -1
- package/js/x-modules/url/store/initial-state.js.map +1 -1
- package/js/x-modules/url/store/module.js +3 -0
- package/js/x-modules/url/store/module.js.map +1 -1
- package/js/x-modules/url/wiring.js +10 -1
- package/js/x-modules/url/wiring.js.map +1 -1
- package/package.json +50 -49
- package/related-prompts/index.d.ts +1 -0
- package/related-prompts/index.js +9 -0
- package/report/x-adapter-platform.api.json +895 -67
- package/report/x-components.api.json +16491 -17162
- package/report/x-components.api.md +847 -215
- package/report/x-types.api.json +320 -4
- package/tagging/index.js +2 -2
- package/types/adapter/mocked-responses.d.ts +3 -0
- package/types/adapter/mocked-responses.d.ts.map +1 -1
- package/types/components/base-dropdown.vue.d.ts +5 -5
- package/types/components/base-dropdown.vue.d.ts.map +1 -1
- package/types/components/base-grid.vue.d.ts +3 -3
- package/types/components/base-slider.vue.d.ts +74 -0
- package/types/components/base-slider.vue.d.ts.map +1 -0
- package/types/components/base-switch.vue.d.ts +2 -1
- package/types/components/base-switch.vue.d.ts.map +1 -1
- package/types/components/base-teleport.vue.d.ts +13 -0
- package/types/components/base-teleport.vue.d.ts.map +1 -0
- package/types/components/base-variable-column-grid.vue.d.ts +3 -3
- package/types/components/display-click-provider.vue.d.ts +61 -0
- package/types/components/display-click-provider.vue.d.ts.map +1 -0
- package/types/components/global-x-bus.vue.d.ts +14 -0
- package/types/components/global-x-bus.vue.d.ts.map +1 -1
- package/types/components/index.d.ts +4 -0
- package/types/components/index.d.ts.map +1 -1
- package/types/components/items-list.vue.d.ts +3 -3
- package/types/components/layouts/multi-column-max-width-layout.vue.d.ts +5 -5
- package/types/components/layouts/single-column-layout.vue.d.ts +3 -3
- package/types/components/modals/base-events-modal.vue.d.ts +2 -2
- package/types/components/modals/base-id-modal.vue.d.ts +2 -2
- package/types/components/modals/base-modal.vue.d.ts +10 -10
- package/types/components/modals/base-modal.vue.d.ts.map +1 -1
- package/types/components/modals/main-modal.vue.d.ts +2 -2
- package/types/components/page-selector.vue.d.ts +125 -0
- package/types/components/page-selector.vue.d.ts.map +1 -0
- package/types/components/panels/base-header-toggle-panel.vue.d.ts +5 -5
- package/types/components/panels/base-id-toggle-panel.vue.d.ts +5 -5
- package/types/components/panels/base-tabs-panel.vue.d.ts +8 -8
- package/types/components/panels/base-toggle-panel.vue.d.ts +3 -3
- package/types/components/result/base-result-add-to-cart.vue.d.ts +2 -0
- package/types/components/result/base-result-add-to-cart.vue.d.ts.map +1 -1
- package/types/components/result/base-result-image.vue.d.ts +10 -10
- package/types/components/result/base-result-image.vue.d.ts.map +1 -1
- package/types/components/sliding-panel.vue.d.ts +15 -5
- package/types/components/sliding-panel.vue.d.ts.map +1 -1
- package/types/components/snippet-callbacks.vue.d.ts +7 -0
- package/types/components/snippet-callbacks.vue.d.ts.map +1 -1
- package/types/components/suggestions/base-suggestions.vue.d.ts +3 -3
- package/types/composables/use-alias-api.d.ts +5 -0
- package/types/composables/use-alias-api.d.ts.map +1 -1
- package/types/composables/use-store.d.ts +2 -2
- package/types/composables/use-store.d.ts.map +1 -1
- package/types/directives/index.d.ts +1 -0
- package/types/directives/index.d.ts.map +1 -1
- package/types/directives/typing.d.ts +35 -0
- package/types/directives/typing.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/store/index.d.ts +4 -1
- package/types/store/index.d.ts.map +1 -1
- package/types/tailwind/plugin-options.d.ts +1 -2
- package/types/tailwind/plugin-options.d.ts.map +1 -1
- package/types/types/animation-prop.d.ts +6 -2
- package/types/types/animation-prop.d.ts.map +1 -1
- package/types/types/origin.d.ts +3 -3
- package/types/types/origin.d.ts.map +1 -1
- package/types/types/page-mode.d.ts +2 -0
- package/types/types/page-mode.d.ts.map +1 -0
- package/types/types/url-params.d.ts +1 -0
- package/types/types/url-params.d.ts.map +1 -1
- package/types/views/home/types.d.ts +3 -0
- package/types/views/home/types.d.ts.map +1 -1
- package/types/wiring/events.types.d.ts +3 -1
- package/types/wiring/events.types.d.ts.map +1 -1
- package/types/x-installer/x-installer/types.d.ts +2 -2
- package/types/x-installer/x-installer/types.d.ts.map +1 -1
- package/types/x-installer/x-installer/x-installer.d.ts +4 -4
- package/types/x-installer/x-installer/x-installer.d.ts.map +1 -1
- package/types/x-modules/empathize/components/empathize.vue.d.ts +6 -6
- package/types/x-modules/empathize/components/empathize.vue.d.ts.map +1 -1
- package/types/x-modules/facets/components/facets/facets.vue.d.ts +3 -3
- package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +9 -2
- package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
- package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts +7 -0
- package/types/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
- package/types/x-modules/facets/components/lists/filters-list.vue.d.ts +3 -3
- package/types/x-modules/facets/components/lists/selected-filters-list.vue.d.ts +3 -3
- package/types/x-modules/history-queries/components/my-history.vue.d.ts +3 -3
- package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +3 -3
- package/types/x-modules/next-queries/components/next-queries-list.vue.d.ts +3 -3
- package/types/x-modules/next-queries/index.d.ts +1 -0
- package/types/x-modules/next-queries/index.d.ts.map +1 -1
- package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts +3 -3
- package/types/x-modules/queries-preview/components/query-preview-list.vue.d.ts.map +1 -1
- package/types/x-modules/queries-preview/components/query-preview.vue.d.ts.map +1 -1
- package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts.map +1 -1
- package/types/x-modules/queries-preview/store/module.d.ts.map +1 -1
- package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts +4 -2
- package/types/x-modules/queries-preview/utils/get-hash-from-query-preview.d.ts.map +1 -1
- package/types/x-modules/recommendations/components/recommendations.vue.d.ts +3 -3
- package/types/x-modules/related-prompts/components/index.d.ts +4 -0
- package/types/x-modules/related-prompts/components/index.d.ts.map +1 -0
- package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts +28 -0
- package/types/x-modules/related-prompts/components/related-prompt.vue.d.ts.map +1 -0
- package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts +106 -0
- package/types/x-modules/related-prompts/components/related-prompts-list.vue.d.ts.map +1 -0
- package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts +131 -0
- package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -0
- package/types/x-modules/related-prompts/events.types.d.ts +41 -0
- package/types/x-modules/related-prompts/events.types.d.ts.map +1 -0
- package/types/x-modules/related-prompts/index.d.ts +6 -0
- package/types/x-modules/related-prompts/index.d.ts.map +1 -0
- package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts +17 -0
- package/types/x-modules/related-prompts/store/actions/fetch-and-save-related-prompts.action.d.ts.map +1 -0
- package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts +13 -0
- package/types/x-modules/related-prompts/store/actions/fetch-related-prompts.action.d.ts.map +1 -0
- package/types/x-modules/related-prompts/store/actions/set-url-params.action.d.ts +11 -0
- package/types/x-modules/related-prompts/store/actions/set-url-params.action.d.ts.map +1 -0
- package/types/x-modules/related-prompts/store/emitters.d.ts +10 -0
- package/types/x-modules/related-prompts/store/emitters.d.ts.map +1 -0
- package/types/x-modules/related-prompts/store/getters/index.d.ts +3 -0
- package/types/x-modules/related-prompts/store/getters/index.d.ts.map +1 -0
- package/types/x-modules/related-prompts/store/getters/related-prompts-query.getter.d.ts +13 -0
- package/types/x-modules/related-prompts/store/getters/related-prompts-query.getter.d.ts.map +1 -0
- package/types/x-modules/related-prompts/store/getters/request.getter.d.ts +14 -0
- package/types/x-modules/related-prompts/store/getters/request.getter.d.ts.map +1 -0
- package/types/x-modules/related-prompts/store/index.d.ts +6 -0
- package/types/x-modules/related-prompts/store/index.d.ts.map +1 -0
- package/types/x-modules/related-prompts/store/module.d.ts +8 -0
- package/types/x-modules/related-prompts/store/module.d.ts.map +1 -0
- package/types/x-modules/related-prompts/store/types.d.ts +125 -0
- package/types/x-modules/related-prompts/store/types.d.ts.map +1 -0
- package/types/x-modules/related-prompts/types.d.ts +10 -0
- package/types/x-modules/related-prompts/types.d.ts.map +1 -0
- package/types/x-modules/related-prompts/wiring.d.ts +42 -0
- package/types/x-modules/related-prompts/wiring.d.ts.map +1 -0
- package/types/x-modules/related-prompts/x-module.d.ts +16 -0
- package/types/x-modules/related-prompts/x-module.d.ts.map +1 -0
- package/types/x-modules/related-tags/components/related-tags.vue.d.ts +3 -3
- package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +5 -5
- package/types/x-modules/search/components/banners-list.vue.d.ts +3 -3
- package/types/x-modules/search/components/partial-results-list.vue.d.ts +3 -3
- package/types/x-modules/search/components/promoteds-list.vue.d.ts +3 -3
- package/types/x-modules/search/components/results-list.vue.d.ts +3 -3
- package/types/x-modules/search/components/sort-dropdown.vue.d.ts +1 -1
- package/types/x-modules/search/config.types.d.ts +2 -0
- package/types/x-modules/search/config.types.d.ts.map +1 -1
- package/types/x-modules/search/events.types.d.ts +4 -0
- package/types/x-modules/search/events.types.d.ts.map +1 -1
- package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
- package/types/x-modules/search/store/actions/save-search-response.action.d.ts.map +1 -1
- package/types/x-modules/search/store/module.d.ts +2 -0
- package/types/x-modules/search/store/module.d.ts.map +1 -1
- package/types/x-modules/search/store/types.d.ts +9 -1
- package/types/x-modules/search/store/types.d.ts.map +1 -1
- package/types/x-modules/search/wiring.d.ts +4 -0
- package/types/x-modules/search/wiring.d.ts.map +1 -1
- package/types/x-modules/search-box/components/search-input-placeholder.vue.d.ts +3 -3
- package/types/x-modules/semantic-queries/store/getters/index.d.ts +1 -0
- package/types/x-modules/semantic-queries/store/getters/index.d.ts.map +1 -1
- package/types/x-modules/semantic-queries/store/getters/normalized-query.getter.d.ts +1 -1
- package/types/x-modules/semantic-queries/store/getters/request.getter.d.ts +2 -1
- package/types/x-modules/semantic-queries/store/getters/request.getter.d.ts.map +1 -1
- package/types/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.d.ts +13 -0
- package/types/x-modules/semantic-queries/store/getters/semanti-queries-query.getter.d.ts.map +1 -0
- package/types/x-modules/semantic-queries/store/module.d.ts.map +1 -1
- package/types/x-modules/semantic-queries/store/types.d.ts +13 -1
- package/types/x-modules/semantic-queries/store/types.d.ts.map +1 -1
- package/types/x-modules/semantic-queries/wiring.d.ts +3 -0
- package/types/x-modules/semantic-queries/wiring.d.ts.map +1 -1
- package/types/x-modules/tagging/components/tagging.vue.d.ts +14 -12
- package/types/x-modules/tagging/components/tagging.vue.d.ts.map +1 -1
- package/types/x-modules/tagging/config.types.d.ts +3 -3
- package/types/x-modules/tagging/config.types.d.ts.map +1 -1
- package/types/x-modules/tagging/events.types.d.ts +2 -2
- package/types/x-modules/tagging/service/{pdp-add-to-cart.service.d.ts → external-tagging.service.d.ts} +31 -13
- package/types/x-modules/tagging/service/external-tagging.service.d.ts.map +1 -0
- package/types/x-modules/tagging/service/index.d.ts +1 -1
- package/types/x-modules/tagging/service/index.d.ts.map +1 -1
- package/types/x-modules/tagging/service/types.d.ts +13 -4
- package/types/x-modules/tagging/service/types.d.ts.map +1 -1
- package/types/x-modules/tagging/store/module.d.ts.map +1 -1
- package/types/x-modules/tagging/wiring.d.ts +54 -2
- package/types/x-modules/tagging/wiring.d.ts.map +1 -1
- package/types/x-modules/url/components/url-handler.vue.d.ts.map +1 -1
- package/types/x-modules/url/store/getters/url-params.getter.d.ts +2 -3
- package/types/x-modules/url/store/getters/url-params.getter.d.ts.map +1 -1
- package/types/x-modules/url/store/initial-state.d.ts.map +1 -1
- package/types/x-modules/url/store/module.d.ts.map +1 -1
- package/types/x-modules/url/store/types.d.ts +6 -0
- package/types/x-modules/url/store/types.d.ts.map +1 -1
- package/types/x-modules/url/wiring.d.ts +9 -0
- package/types/x-modules/url/wiring.d.ts.map +1 -1
- package/types/x-modules/x-modules.types.d.ts +2 -0
- package/types/x-modules/x-modules.types.d.ts.map +1 -1
- package/url/index.js +1 -1
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragekey.md +0 -11
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragettlms.md +0 -11
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.instance.md +0 -13
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.localstorageservice.md +0 -11
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.md +0 -41
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.result_clicked_id_key.md +0 -13
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.sessionstorageservice.md +0 -11
- package/docs/API-reference/api/x-components.pdpaddtocartservice.md +0 -22
- package/docs/API-reference/api/x-components.taggingconfig.clickedresultstoragettlms.md +0 -13
- package/docs/API-reference/api/x-components.usestore.md +0 -19
- package/docs/assets/features/overview-my-history.svg +0 -279
- package/docs/assets/features/overview-product-results-card.svg +0 -128
- package/docs/assets/interface/build-search-ui.svg +0 -167
- package/docs/assets/interface/experience-search-intro.svg +0 -1
- package/docs/assets/interface/integration-guide.svg +0 -1
- package/docs/assets/interface/integration-video.png +0 -0
- package/docs/assets/interface/x-architecture.svg +0 -1
- package/docs/assets/interface/x-empathize.gif +0 -0
- package/docs/assets/interface/x-facets.gif +0 -0
- package/docs/assets/interface/x-facets.svg +0 -189
- package/docs/assets/interface/x-history-queries.gif +0 -0
- package/docs/assets/interface/x-id-results.gif +0 -0
- package/docs/assets/interface/x-next-queries.gif +0 -0
- package/docs/assets/interface/x-popular-searches.gif +0 -0
- package/docs/assets/interface/x-query-suggestions.gif +0 -0
- package/docs/assets/interface/x-recommendations.gif +0 -0
- package/docs/assets/interface/x-recommendations.svg +0 -472
- package/docs/assets/interface/x-related-tags.gif +0 -0
- package/docs/assets/interface/x-results-layout.svg +0 -259
- package/docs/assets/interface/x-search-box-elements.svg +0 -1
- package/docs/assets/interface/x-search-box.svg +0 -60
- package/docs/build-search-ui/README.md +0 -127
- package/docs/build-search-ui/sidebar.js +0 -7
- package/docs/build-search-ui/web-archetype-development-guide.md +0 -186
- package/docs/build-search-ui/web-archetype-integration-guide.md +0 -458
- package/docs/build-search-ui/web-how-to-use-x-components-guide.md +0 -200
- package/docs/build-search-ui/web-x-architecture.md +0 -83
- package/docs/build-search-ui/web-x-components-development-guide.md +0 -157
- package/docs/experience-search-and-discovery/README.md +0 -132
- package/docs/experience-search-and-discovery/empathize.md +0 -119
- package/docs/experience-search-and-discovery/facets-and-filters.md +0 -154
- package/docs/experience-search-and-discovery/history-queries.md +0 -70
- package/docs/experience-search-and-discovery/id-results.md +0 -49
- package/docs/experience-search-and-discovery/my-history.md +0 -60
- package/docs/experience-search-and-discovery/next-queries.md +0 -72
- package/docs/experience-search-and-discovery/popular-searches.md +0 -50
- package/docs/experience-search-and-discovery/product-results-ui.md +0 -82
- package/docs/experience-search-and-discovery/query-suggestions.md +0 -48
- package/docs/experience-search-and-discovery/recommendations.md +0 -134
- package/docs/experience-search-and-discovery/related-tags.md +0 -66
- package/docs/experience-search-and-discovery/search-box.md +0 -99
- package/docs/experience-search-and-discovery/serp-ui.md +0 -125
- package/docs/experience-search-and-discovery/sidebar.js +0 -17
- package/docs/experience-search-and-discovery/web-local-storage.md +0 -30
- package/docs/input-status-machine-state.png +0 -0
- package/js/composables/use-store.js +0 -15
- package/js/composables/use-store.js.map +0 -1
- package/js/utils/options-api.js +0 -4
- package/js/utils/options-api.js.map +0 -1
- package/js/x-modules/tagging/service/pdp-add-to-cart.service.js.map +0 -1
- package/types/utils/options-api.d.ts +0 -3
- package/types/utils/options-api.d.ts.map +0 -1
- package/types/x-modules/tagging/service/pdp-add-to-cart.service.d.ts.map +0 -1
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Integrate Interface X Archetype into an existing website
|
|
3
|
-
tags:
|
|
4
|
-
- integration
|
|
5
|
-
- archetype
|
|
6
|
-
- archetype integration
|
|
7
|
-
- x integration
|
|
8
|
-
- interface x
|
|
9
|
-
- x components
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
In this tutorial, you'll learn how to integrate the Interface X Archetype project in your
|
|
13
|
-
commerce store in a matter of minutes. You can use the X Archetype **as is** or you can
|
|
14
|
-
**[extend](web-archetype-development-guide.md)** the search and discovery interface experience to
|
|
15
|
-
meet your business needs.
|
|
16
|
-
|
|
17
|
-
To integrate the Interface X Archetype layer in your commerce store, just **load** the
|
|
18
|
-
generated Interface X JavaScript file and **initialize** it.
|
|
19
|
-
|
|
20
|
-
::: note IMPORTANT
|
|
21
|
-
|
|
22
|
-
If the X Archetype script is hosted by Empathy, all the X resources are provided by a CDN
|
|
23
|
-
through the following environment URLs:
|
|
24
|
-
|
|
25
|
-
- **Production**: `https://x.empathy.co/{INSTANCE}/app.js`
|
|
26
|
-
- **Staging**: `https://x.staging.empathy.co/{INSTANCE}/app.js`
|
|
27
|
-
|
|
28
|
-
Where `{INSTANCE}` is the name of your commerce store. If you require any assistance, contact
|
|
29
|
-
[Empathy Support](mailto:support@empathy.co).
|
|
30
|
-
|
|
31
|
-
:::
|
|
32
|
-
|
|
33
|
-
Depending on your business needs, Interface X supports two initialization types:
|
|
34
|
-
|
|
35
|
-
- **[Automatic initialization](#initializing-the-interface-x-project-automatically)**
|
|
36
|
-
- **[On-demand initialization](#initializing-the-interface-x-project-on-demand)**
|
|
37
|
-
|
|
38
|
-
::: develop Frameworks & libraries integration
|
|
39
|
-
|
|
40
|
-
You can integrate the X Archetype into any existing website regardless of the technology used
|
|
41
|
-
(i.e. **React**, **Vue**, **Svelte**, etc.), as the bundle includes all the dependencies you need
|
|
42
|
-
for a correct implementation.
|
|
43
|
-
|
|
44
|
-
:::
|
|
45
|
-
|
|
46
|
-
## Initializing the Interface X project automatically
|
|
47
|
-
|
|
48
|
-
Automatic initialization is the easiest way to integrate the Interface X project in a website.
|
|
49
|
-
|
|
50
|
-
**Steps to initialize the project automatically**
|
|
51
|
-
|
|
52
|
-
1. **Configure the JavaScript snippet** to define either an initialization object or a function.
|
|
53
|
-
2. **Load and initialize** the Interface X script.
|
|
54
|
-
|
|
55
|
-
### Configuring the snippet
|
|
56
|
-
|
|
57
|
-
First, add the JavaScript snippet configuration to define multiple initialization options, i.e. the
|
|
58
|
-
API to use, the language or currency to display, or even the tagging parameters to collect
|
|
59
|
-
search-related data to generate conversational search features and analytics.
|
|
60
|
-
|
|
61
|
-
Depending on whether you are retrieving **static or dynamic configuration values** in your
|
|
62
|
-
[snippet configuration](#snippet-configuration), you define an **object** or a **function** to
|
|
63
|
-
initialize Interface X:
|
|
64
|
-
|
|
65
|
-
- To retrieve **static** configuration values, define an initialization object as follows:
|
|
66
|
-
|
|
67
|
-
```js
|
|
68
|
-
window.initX = {
|
|
69
|
-
instance: 'my-store',
|
|
70
|
-
scope: 'desktop',
|
|
71
|
-
lang: 'en',
|
|
72
|
-
currency: 'EUR',
|
|
73
|
-
consent: false
|
|
74
|
-
};
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
- To retrieve configuration values **dynamically**, use an initialization function:
|
|
78
|
-
|
|
79
|
-
```js
|
|
80
|
-
window.initX = function () {
|
|
81
|
-
return {
|
|
82
|
-
instance: 'my-store',
|
|
83
|
-
env: location.href.includes('.pre.') ? 'staging' : undefined,
|
|
84
|
-
scope: 'web',
|
|
85
|
-
lang: localStorage.get('lang'),
|
|
86
|
-
currency: localStorage.get('currency'),
|
|
87
|
-
consent: localStorage.get('consent')
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
::: note
|
|
93
|
-
|
|
94
|
-
You can change the snippet configuration values once the project is deployed. Use the
|
|
95
|
-
`/x-archetype/public/snippet-script.js` file to perform hot changes for the snippet parameters. For
|
|
96
|
-
more information on the supported parameters, check out
|
|
97
|
-
[Snippet configuration](#snippet-configuration).
|
|
98
|
-
|
|
99
|
-
:::
|
|
100
|
-
|
|
101
|
-
### Loading the script
|
|
102
|
-
|
|
103
|
-
Once the snippet configuration is ready, add the Interface X script to your webpage. The script
|
|
104
|
-
is hosted in a URL with the following syntax:
|
|
105
|
-
|
|
106
|
-
- **Production**: `https://x.empathy.co/{INSTANCE}/app.js`
|
|
107
|
-
- **Staging**: `https://x.staging.empathy.co/{INSTANCE}/app.js`
|
|
108
|
-
|
|
109
|
-
For example, to load the production version script for the instance _my-store_, you need to add the
|
|
110
|
-
following scripts to your HTML:
|
|
111
|
-
|
|
112
|
-
```html
|
|
113
|
-
<script>
|
|
114
|
-
window.initX = {
|
|
115
|
-
instance: 'my-store',
|
|
116
|
-
scope: 'desktop',
|
|
117
|
-
lang: 'en',
|
|
118
|
-
currency: 'EUR',
|
|
119
|
-
consent: false
|
|
120
|
-
};
|
|
121
|
-
</script>
|
|
122
|
-
<script src="https://x.empathy.co/my-store/app.js" type="module"></script>
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
In the case you want to load the script for the staging environment, you just modify the script
|
|
126
|
-
attribute `src` so that it points to the staging environment as follows:
|
|
127
|
-
|
|
128
|
-
```html
|
|
129
|
-
<script>
|
|
130
|
-
window.initX = {
|
|
131
|
-
instance: 'my-store',
|
|
132
|
-
env: 'staging', // By removing this param you would be using a production API with the staging version of Interface X
|
|
133
|
-
scope: 'desktop',
|
|
134
|
-
lang: 'en',
|
|
135
|
-
currency: 'EUR',
|
|
136
|
-
consent: false
|
|
137
|
-
};
|
|
138
|
-
</script>
|
|
139
|
-
<script src="https://x.staging.empathy.co/my-store/app.js" type="module"></script>
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Thus, when the Interface X JavaScript file is loaded, it retrieves the configuration from the
|
|
143
|
-
defined object or function.
|
|
144
|
-
|
|
145
|
-
## Initializing the Interface X project on demand
|
|
146
|
-
|
|
147
|
-
On-demand initialization allows you to control when Interface X is loaded.
|
|
148
|
-
|
|
149
|
-
**Steps to initialize the project on demand**
|
|
150
|
-
|
|
151
|
-
1. **Load** the Interface X script.
|
|
152
|
-
2. **Initialize** Interface X.
|
|
153
|
-
|
|
154
|
-
### Loading the script
|
|
155
|
-
|
|
156
|
-
Add the Interface X script hosted in a URL with the following syntax:
|
|
157
|
-
|
|
158
|
-
- **Production**: `https://x.empathy.co/{INSTANCE}/app.js`
|
|
159
|
-
- **Staging**: `https://x.staging.empathy.co/{INSTANCE}/app.js`
|
|
160
|
-
|
|
161
|
-
For example, to load the production version script for the instance _my-store_, you need to add the
|
|
162
|
-
following script to your HTML:
|
|
163
|
-
|
|
164
|
-
```html
|
|
165
|
-
<script src="https://x.empathy.co/my-store/app.js" type="module"></script>
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
In the case you want to load the script for the staging environment, you just modify the script
|
|
169
|
-
attribute `src` so that it points to the staging environment as follows:
|
|
170
|
-
|
|
171
|
-
```html
|
|
172
|
-
<script src="https://x.staging.empathy.co/my-store/app.js" type="module"></script>
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Initializing Interface X
|
|
176
|
-
|
|
177
|
-
Since no initialization configuration is defined when loading the script, you need to **invoke the
|
|
178
|
-
initialization function** created automatically in the
|
|
179
|
-
[X API](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-installer/api/base-api.ts)
|
|
180
|
-
object to provide the initialization options:
|
|
181
|
-
|
|
182
|
-
```html
|
|
183
|
-
<script src="https://x.empathy.co/my-store/app.js" type="module"></script>
|
|
184
|
-
<script>
|
|
185
|
-
window.InterfaceX.init({
|
|
186
|
-
instance: 'my-store',
|
|
187
|
-
scope: 'desktop',
|
|
188
|
-
lang: 'en',
|
|
189
|
-
currency: 'EUR',
|
|
190
|
-
consent: false
|
|
191
|
-
});
|
|
192
|
-
</script>
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
For this example, the initialization function is called immediately after loading the script, but it
|
|
196
|
-
can be called at any time. Note that you need to call this function only **once**.
|
|
197
|
-
|
|
198
|
-
::: interact
|
|
199
|
-
|
|
200
|
-
Check out the [X API](#x-api) section to learn more about the functions and parameters
|
|
201
|
-
supported.
|
|
202
|
-
|
|
203
|
-
:::
|
|
204
|
-
|
|
205
|
-
## Notes on X Archetype integration
|
|
206
|
-
|
|
207
|
-
To successfully integrate Interface X in your commerce store using the X Archetype, check
|
|
208
|
-
out further information about:
|
|
209
|
-
|
|
210
|
-
- **Initialization options** supported in [snippet configuration](#snippet-configuration)
|
|
211
|
-
- **[Callbacks and X event types](#callbacks-and-interface-x-events-types)** available to
|
|
212
|
-
subscribe to when initializing
|
|
213
|
-
- **Functions supported by the [X API object](#x-api)** to initialize Interface X
|
|
214
|
-
- Notes on how to set up [**the preview of query results**](#dynamic-query-results-preview) for
|
|
215
|
-
determined queries at the pre-search stage
|
|
216
|
-
- [**Tracking options for add to cart events**](#tracking-events-for-add-to-cart-on-product-detail-pages)
|
|
217
|
-
from product detail pages
|
|
218
|
-
|
|
219
|
-
### Snippet configuration
|
|
220
|
-
|
|
221
|
-
The
|
|
222
|
-
[snippet configuration](https://github.com/empathyco/x-archetype/blob/main/public/snippet-script.js)
|
|
223
|
-
allows you to configure multiple initialization options for the Interface X project such as
|
|
224
|
-
language, currency, and shopper's personal data consent. The snippet configuration supports the
|
|
225
|
-
following configuration parameters:
|
|
226
|
-
|
|
227
|
-
| Parameter | Type | Description |
|
|
228
|
-
| ------------------------------------------------------ | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
229
|
-
| `instance` | `string` | _Required._ ID of the API client instance. It's provided by Empathy. |
|
|
230
|
-
| `env` | `staging` | _Optional_. API environment to use. Note that if you **do not** declare this parameter, you'll use the production API. Instead, use `env: 'staging'` to point to the staging API. |
|
|
231
|
-
| `scope` | `string` | _Optional_. Context where the search interface is executed, i.e. `mobile`, `mobile-app`, `tablet`, `desktop`. |
|
|
232
|
-
| `lang` | `string` | _Required._ Language to use. By default, it's used for both the interface messages and the API requests. |
|
|
233
|
-
| `uiLang` | `string` | _Optional_. Language to use for the interface messages **only**. |
|
|
234
|
-
| `consent` | `boolean` | _Required._ Determines whether the shopper has accepted the use of cookies so that the `sessionId` is sent to the Empathy's Search and Tagging APIs or not. |
|
|
235
|
-
| `documentDirection` | `'ltr'` | `'rtl'` | _Optional_. Writing direction script that the X Components should, i.e. left-to-right or right-to-left. |
|
|
236
|
-
| `currency` | `string` | _Required._ Currency identifier to configure how prices are displayed. |
|
|
237
|
-
| [`callbacks`](#callbacks-and-interface-x-events-types) | `Record<XEventName, (payload: XEventPayload<Event>, metadata: WireMetadata) => void` | _Optional_. Callback record where the _key_ is the event to listen and the _value_ is the callback to be executed whenever the event is emitted. E.g. to listen to the `UserAcceptedAQuery` event: `{ UserAcceptedAQuery({ eventPayload }) { console.log('UserAcceptedAQuery', eventPayload); }` |
|
|
238
|
-
| `isSpa` | `boolean` | _Optional_. Enables single-page application model. You set it to `true` when the X Archetype runs on top of a SPA website. |
|
|
239
|
-
| `filters` | `string[]` | _Optional_. Filters to be applied at the start of the application and start to searching with those filters selected. |
|
|
240
|
-
| `queriesPreview` | `QueryPreviewInfo[]` | _Optional_. List of queries to preview. Every query defined includes a preview of related product results before shoppers type a search term in the search box. E.g. to preview results for the queries `backpacks` and `watches`, you add the following: `[{query: "backpack", title: "Back to school"}, {query: "watch", title: "Get on time"}]`. See [Dynamic query results preview](#dynamic-query-results-preview) for more information. |
|
|
241
|
-
| `<extra parameters>` | `any` | _Optional_. Any other parameters to sent to the API calls directly. E.g. to filter the search catalogue with a warehouse parameter, you add `warehouse: <your-warehouse-identifier>` to the snippet configuration. |
|
|
242
|
-
|
|
243
|
-
::: note Consent parameter
|
|
244
|
-
|
|
245
|
-
When the `consent` parameter is set to `false`, the `sessionId` is not generated nor sent to the
|
|
246
|
-
Tagging API. Only shoppers' behavioral data (wisdom of the crowd) is inferred from the current
|
|
247
|
-
session. The `consent` parameter is set to `true` as soon as the shopper accepts the use of cookies.
|
|
248
|
-
If page reload is not triggered after accepting cookies, update the `consent` parameter
|
|
249
|
-
(`window.initX.consent = true`) to start tracking the current session.
|
|
250
|
-
|
|
251
|
-
</br>
|
|
252
|
-
|
|
253
|
-
Although cookie acceptance is bound to the generation of the `sessionId` in local storage, Empathy
|
|
254
|
-
does **not use any cookies** in its libraries.
|
|
255
|
-
|
|
256
|
-
<br/>
|
|
257
|
-
|
|
258
|
-
The `sessionId` lasts until there are 30 minutes of inactivity. However, every time the shopper
|
|
259
|
-
interacts with the commerce search (e.g. queries, clicks, etc.), the session expiration time is
|
|
260
|
-
reset by adding 30 minutes from the time of that interaction. After 30 minutes of shopper
|
|
261
|
-
inactivity, a new `sessionId` is generated.
|
|
262
|
-
|
|
263
|
-
:::
|
|
264
|
-
|
|
265
|
-
### Callbacks and Interface X events types
|
|
266
|
-
|
|
267
|
-
You can use a **callback** to subscribe to specific **X events types** to perform
|
|
268
|
-
particular actions when triggered.
|
|
269
|
-
|
|
270
|
-
For example, you subscribe to the `UserClickedResultAddToCart` event to add a product result to the
|
|
271
|
-
shopping cart:
|
|
272
|
-
|
|
273
|
-
```html
|
|
274
|
-
<script src="https://x.empathy.co/my-store/app.js" type="module"></script>
|
|
275
|
-
<script>
|
|
276
|
-
window.InterfaceX.init({
|
|
277
|
-
instance: 'my-store',
|
|
278
|
-
scope: 'desktop',
|
|
279
|
-
lang: 'en',
|
|
280
|
-
currency: 'EUR',
|
|
281
|
-
consent: false,
|
|
282
|
-
callbacks: {
|
|
283
|
-
UserAcceptedAQuery: query => {
|
|
284
|
-
doSomethingInWebApp(query);
|
|
285
|
-
},
|
|
286
|
-
UserClickedResultAddToCart: result => {
|
|
287
|
-
addToCartInWebApp(result);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
</script>
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
Interface X is built on an [event-based architecture](web-x-architecture.md). There are more
|
|
295
|
-
than one hundred of events available to subscribe to via callbacks to trigger different actions in
|
|
296
|
-
your app. Check out the complete
|
|
297
|
-
**[X events types list](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)**
|
|
298
|
-
in the open source repository in GitHub.
|
|
299
|
-
|
|
300
|
-
X events types can be triggered from different modules in the X Components project.
|
|
301
|
-
However, every module has its own sort of components (e.g. Empathize X events, Search Box X events,
|
|
302
|
-
etc.). See the corresponding `events.types.ts` file for each module in the
|
|
303
|
-
[X Components library in GitHub](https://github.com/empathyco/x/tree/main/packages/x-components/src/x-modules).
|
|
304
|
-
|
|
305
|
-
### X API
|
|
306
|
-
|
|
307
|
-
The
|
|
308
|
-
[X API](https://github.com/empathyco/x/blob/main/packages/x-components/src/x-installer/api/base-api.ts)
|
|
309
|
-
object allows your commerce store to communicate with Interface X. It supports multiple
|
|
310
|
-
functions to integrate Interface X in your website. You can access these functions inside the
|
|
311
|
-
`window.InterfaceX` object.
|
|
312
|
-
|
|
313
|
-
| Function | Parameters | Description |
|
|
314
|
-
| ------------------ | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
315
|
-
| `init` | [snippet configuration params](#snippet-configuration) - _Required_. Initialization options | [Initializes Interface X on demand](#initializing-interface-x-project-on-demand). |
|
|
316
|
-
| `search` | `query` - _Optional_. Query to open Interface X | Executes Interface X and triggers a search with the given query. |
|
|
317
|
-
| `close` | none | Closes Interface X search layer. |
|
|
318
|
-
| `getSnippetConfig` | none | Returns the current initialization options. |
|
|
319
|
-
| `setSnippetConfig` | [snippet configuration params](#snippet-configuration) - _Required_. Initialization options | Changes initialization options so that all components react to the changes, i.e. changing both search engine and language without reloading the page. |
|
|
320
|
-
| `addProductToCart` | `productId` - _Optional._ Id of the product added to cart | Sends tracking of the `AddToCart` event to the [Empathy Tagging microservice](/develop-empathy-platform/capture-interaction-signals/tagging-api-guide.md) for the product displayed on screen. This function is called from the product detail page (PDP) when the shopper clicks on the add-to-cart button. If the `productId` is not provided, the URL detects whether the shopper found the product via a search session or not. |
|
|
321
|
-
|
|
322
|
-
### Dynamic query results preview
|
|
323
|
-
|
|
324
|
-
The `queriesPreview` parameter settings can be changed to dynamically preview product results from
|
|
325
|
-
the queries you define according to your brand's strategy.
|
|
326
|
-
|
|
327
|
-
You may set the `queriesPreview` in two ways:
|
|
328
|
-
|
|
329
|
-
- In the initialization object as parameter.
|
|
330
|
-
- Later on , using the `setSnippetConfig` function in the [`X API`](#x-api) object to determine the
|
|
331
|
-
queries to be previewed dynamically depending on the section the shopper is visiting in your
|
|
332
|
-
commerce store, for instance, or any other scenario.
|
|
333
|
-
|
|
334
|
-
The following example shows you how to change dynamically the preview of query results in the _kids_
|
|
335
|
-
and _adult_ sections:
|
|
336
|
-
|
|
337
|
-
```html
|
|
338
|
-
<script>
|
|
339
|
-
if (yourCommerceStoreEnvironment.section === 'kids') {
|
|
340
|
-
InterfaceX.setSnippetConfig({
|
|
341
|
-
queriesPreview: [
|
|
342
|
-
{
|
|
343
|
-
query: 'backpack',
|
|
344
|
-
title: 'Back to School!'
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
query: 'pencil',
|
|
348
|
-
title: 'Write with style!'
|
|
349
|
-
}
|
|
350
|
-
]
|
|
351
|
-
});
|
|
352
|
-
} else if (yourCommerceStoreEnvironment.section === 'adult') {
|
|
353
|
-
InterfaceX.setSnippetConfig({
|
|
354
|
-
queriesPreview: [
|
|
355
|
-
{
|
|
356
|
-
query: 'watch',
|
|
357
|
-
title: 'Get on time!'
|
|
358
|
-
}
|
|
359
|
-
]
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
</script>
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
#### Adding filters
|
|
366
|
-
|
|
367
|
-
The `queriesPreview` accept additional parameters that allow to filter the result set. See the
|
|
368
|
-
following example:
|
|
369
|
-
|
|
370
|
-
```html
|
|
371
|
-
<script>
|
|
372
|
-
InterfaceX.setSnippetConfig({
|
|
373
|
-
queriesPreview: [
|
|
374
|
-
{
|
|
375
|
-
query: 'backpack',
|
|
376
|
-
title: 'Back to School!',
|
|
377
|
-
filters: ['brand:acme', 'collection:summer']
|
|
378
|
-
}
|
|
379
|
-
]
|
|
380
|
-
});
|
|
381
|
-
</script>
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
::: note
|
|
385
|
-
|
|
386
|
-
The syntax to each filter is the same one as the one sent to the search request when selecting a
|
|
387
|
-
filter in the interface.
|
|
388
|
-
|
|
389
|
-
:::
|
|
390
|
-
|
|
391
|
-
#### Adding extra params
|
|
392
|
-
|
|
393
|
-
On top of that, extra parameters can be added to the search request of the `queriesPreview`, for
|
|
394
|
-
instance:
|
|
395
|
-
|
|
396
|
-
```html
|
|
397
|
-
<script>
|
|
398
|
-
InterfaceX.setSnippetConfig({
|
|
399
|
-
queriesPreview: [
|
|
400
|
-
{
|
|
401
|
-
query: 'backpack',
|
|
402
|
-
title: 'Back to School!',
|
|
403
|
-
extraParams: {
|
|
404
|
-
sort: 'price desc'
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
]
|
|
408
|
-
});
|
|
409
|
-
</script>
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
### Tracking events for add to cart on product detail pages
|
|
413
|
-
|
|
414
|
-
Empathy Platform Interface X allows you to track shoppers' add-to-cart interactions from any product
|
|
415
|
-
detail page (PDP) in your commerce store, regardless of whether your commerce store is running on a
|
|
416
|
-
**single-page application or not**.
|
|
417
|
-
|
|
418
|
-
#### Tracking add-to-cart events on non-SPA webpages
|
|
419
|
-
|
|
420
|
-
To track your shoppers' add-to-cart interactions from any PDP based on a non-spa structured webpage,
|
|
421
|
-
follow these steps:
|
|
422
|
-
|
|
423
|
-
1. Add the `productId` parameter when initializing the script.
|
|
424
|
-
|
|
425
|
-
```html
|
|
426
|
-
window.InterfaceX.init({ instance: "instanceName", lang: "es", documentDirection: "ltr", scope:
|
|
427
|
-
'desktop', currency: "EUR", consent: true, isSPA: false, queriesPreview: [] { query: 'coats',
|
|
428
|
-
title: 'Winter Coats' } ], callbacks: { UserClickedAResult: function(a, b, e, t) {} }, productId:
|
|
429
|
-
'11776347-ES' // Add this parameter })
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
2. Call the `InterfaceX.addProductToCart('11776347-ES')` function to track the event when the
|
|
433
|
-
add-to-cart button is clicked.
|
|
434
|
-
|
|
435
|
-
```html
|
|
436
|
-
yourCommerceStoreEnvironment.addToCartButton.addEventListener('click', () =>
|
|
437
|
-
InterfaceX.addProductToCart('11776347-ES'); );
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
#### Tracking add-to-cart events on SPA webpages
|
|
441
|
-
|
|
442
|
-
To track your shoppers' add-to-cart interactions from any PDP based on a SPA structured webpage,
|
|
443
|
-
follow these steps:
|
|
444
|
-
|
|
445
|
-
1. Call the `InterfaceX.bus.emit('PDPIsLoaded')` function any time a new PDP-type page is loaded.
|
|
446
|
-
|
|
447
|
-
```html
|
|
448
|
-
if (yourCommerceStoreEnvironment.isPDP && window.initX.isSpa) {
|
|
449
|
-
InterfaceX.bus.emit('PDPIsLoaded') }
|
|
450
|
-
```
|
|
451
|
-
|
|
452
|
-
2. Call the `InterfaceX.addProductToCart()` function to track the event when the add-to-cart button
|
|
453
|
-
is clicked:
|
|
454
|
-
|
|
455
|
-
```html
|
|
456
|
-
yourCommerceStoreEnvironment.addToCartButton.addEventListener('click', () =>
|
|
457
|
-
InterfaceX.addProductToCart(); );
|
|
458
|
-
```
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: How to use and configure Interface X Components in your project
|
|
3
|
-
meta_title: How to use the Interface X Components library in your project
|
|
4
|
-
tags:
|
|
5
|
-
- configuration
|
|
6
|
-
- x configuration
|
|
7
|
-
- x component configuration
|
|
8
|
-
- use x components
|
|
9
|
-
- how to
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
Interface X Components are like building blocks that you pick up and mix to craft your
|
|
13
|
-
search UI experiences. The goal of using components is to include only the components you want,
|
|
14
|
-
wherever you want.
|
|
15
|
-
|
|
16
|
-
Once you’ve installed the
|
|
17
|
-
[dependencies and the xPlugin](web-x-components-development-guide.md#1-install-the-dependencies),
|
|
18
|
-
you’re ready to use X Components in your project.
|
|
19
|
-
|
|
20
|
-
##### Steps to use X Components in your project:
|
|
21
|
-
|
|
22
|
-
1. **Import and register** X Components from a module.
|
|
23
|
-
|
|
24
|
-
2. **Configure the X Components behavior** to customize the search and discovery experience.
|
|
25
|
-
|
|
26
|
-
## Importing and registering the X Components
|
|
27
|
-
|
|
28
|
-
Many of the X Components are distributed into modules to make them easier to manage. So you
|
|
29
|
-
need to indicate from which module you’re importing each component as appropriate.
|
|
30
|
-
|
|
31
|
-
For example, the `search-box` module contains the `SearchInput`, `SearchButton`, and
|
|
32
|
-
`ClearSearchInput` components. See
|
|
33
|
-
[Using the search box components](#example-using-the-search-box-components) for an example on how to
|
|
34
|
-
import and register the Search box components in a project.
|
|
35
|
-
|
|
36
|
-
When importing the components, you can register each component **locally for each Vue instance** as
|
|
37
|
-
you go.
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
//Import every component you'd like to use.
|
|
41
|
-
import { ComponentA } from './Module1';
|
|
42
|
-
import { ComponentB } from './Module1';
|
|
43
|
-
import { ComponentC } from './Module1';
|
|
44
|
-
|
|
45
|
-
//Register the components locally.
|
|
46
|
-
export default {
|
|
47
|
-
components: {
|
|
48
|
-
ComponentA,
|
|
49
|
-
ComponentB,
|
|
50
|
-
ComponentC
|
|
51
|
-
}
|
|
52
|
-
// ...
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
//The components are now ready to be used inside your template.
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Configuring the X Components
|
|
59
|
-
|
|
60
|
-
You can configure some behaviors for each component to customize the search experience.
|
|
61
|
-
|
|
62
|
-
To provide different project-specific behaviors, you use:
|
|
63
|
-
|
|
64
|
-
- **Props**: custom attributes to pass data into a component. It modifies the behavior or the
|
|
65
|
-
properties in a component.
|
|
66
|
-
|
|
67
|
-
```vue
|
|
68
|
-
//Configure a component with props.
|
|
69
|
-
<SearchInput :maxLength="5" :autofocus="false" :instant="true" :instantDebounceInMs="1000" />
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
- **Scoped slots**: a slot exposes data from a child component to create your own custom
|
|
73
|
-
implementation.
|
|
74
|
-
|
|
75
|
-
```vue
|
|
76
|
-
//Configure a component with slots.
|
|
77
|
-
<ClearSearchInput>Clear</ClearSearchInput>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
You can pass the configuration attributes documented in the
|
|
81
|
-
[UI Reference](/develop-empathy-platform/ui-reference/) for the Interface X Components.
|
|
82
|
-
Combine components at your ease and use resource modules such as **modals**, **panels**, and
|
|
83
|
-
**animations**. You also use
|
|
84
|
-
**[base components](/develop-empathy-platform/ui-reference/components/base-components/)**, i.e.
|
|
85
|
-
standard Vue components that don’t have any dependencies with the X Components. Use them as a
|
|
86
|
-
foundation to build other components.
|
|
87
|
-
|
|
88
|
-
::: develop Next steps
|
|
89
|
-
|
|
90
|
-
Your components are ready to go, but you can provide your search UI with a friendly and fancy style
|
|
91
|
-
and layout. For more information, see
|
|
92
|
-
[Design tokens](https://github.com/empathyco/x/blob/main/packages/x-components/contributing/design-system.md).
|
|
93
|
-
|
|
94
|
-
:::
|
|
95
|
-
|
|
96
|
-
<!--If you want to support multiple languages, you can use the [x-translation](https://github.com/empathyco/x/tree/main/packages/x-translations) library to manage localization options.-->
|
|
97
|
-
|
|
98
|
-
## Example: Using the search box components
|
|
99
|
-
|
|
100
|
-
To build your search UI, you need to provide at least a search field that allows users to input a
|
|
101
|
-
query. Additionally, you can include a button to trigger the search and a button to delete the input
|
|
102
|
-
query.
|
|
103
|
-
|
|
104
|
-
The `search-box` module contains these components:
|
|
105
|
-
|
|
106
|
-
- `SearchInput`
|
|
107
|
-
- `SearchButton`
|
|
108
|
-
- `ClearSearchInput`
|
|
109
|
-
|
|
110
|
-
::: interact
|
|
111
|
-
|
|
112
|
-
Learn more about the
|
|
113
|
-
[Search Box UI](/onboard-empathy-platform/experience-search-and-discovery/search-box.md)
|
|
114
|
-
|
|
115
|
-
:::
|
|
116
|
-
|
|
117
|
-
**1. Importing the components from the search-box module**
|
|
118
|
-
|
|
119
|
-
For this purpose, you need to import the `SearchInput`, `SearchButton`, and `ClearSearchInput`
|
|
120
|
-
components from the `search-box` module to the desired app component. Then, register them and
|
|
121
|
-
include them in the template.
|
|
122
|
-
|
|
123
|
-
First, **import and locally register** the components.
|
|
124
|
-
|
|
125
|
-
```vue
|
|
126
|
-
//Import the components from the corresponding module.
|
|
127
|
-
<script>
|
|
128
|
-
import { SearchInput, SearchButton, ClearSearchInput } from '@empathyco/x-components/search-box';
|
|
129
|
-
|
|
130
|
-
//Locally register each component.
|
|
131
|
-
export default {
|
|
132
|
-
components: { SearchInput, SearchButton, ClearSearchInput }
|
|
133
|
-
};
|
|
134
|
-
</script>
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Now, you’re ready to start using the component wherever you want in your template.
|
|
138
|
-
|
|
139
|
-
```vue
|
|
140
|
-
<template>
|
|
141
|
-
<div>
|
|
142
|
-
<SearchInput />
|
|
143
|
-
<SearchButton />
|
|
144
|
-
<ClearSearchInput />
|
|
145
|
-
</div>
|
|
146
|
-
</template>
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
**2. Configuring the SearchInput component**
|
|
150
|
-
|
|
151
|
-
Next, you want to configure the behavior of the `SearchInput` component. Here you use the
|
|
152
|
-
`maxLength` prop to limit the maximum length to 20 characters.
|
|
153
|
-
|
|
154
|
-
```vue
|
|
155
|
-
<SearchInput
|
|
156
|
-
:maxLength="20"
|
|
157
|
-
:autofocus="false"
|
|
158
|
-
:instant="true"
|
|
159
|
-
:instantDebounceInMs="1000"
|
|
160
|
-
:autocompleteKeyboardKeys="['ArrowDown']"
|
|
161
|
-
:autocompleteSuggestionsEvent="'NextQueriesChanged'"
|
|
162
|
-
/>
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
**3. Listening to X Events**
|
|
166
|
-
|
|
167
|
-
For advanced use cases you might need to subscribe to certain `XEvent`. The recommended way to do so
|
|
168
|
-
is by using the `GlobalXBus` component.
|
|
169
|
-
|
|
170
|
-
In this example you are subscribing to the `UserAcceptedAQuery` event. This event is emitted both by
|
|
171
|
-
the `SearchInput` component and by the `QuerySuggestions` one.
|
|
172
|
-
|
|
173
|
-
```vue live
|
|
174
|
-
<template>
|
|
175
|
-
<div>
|
|
176
|
-
<GlobalXBus @UserAcceptedAQuery="logUserAcceptedAQuery" />
|
|
177
|
-
<SearchInput />
|
|
178
|
-
<QuerySuggestions />
|
|
179
|
-
</div>
|
|
180
|
-
</template>
|
|
181
|
-
<script>
|
|
182
|
-
import { GlobalXBus } from '@empathyco/x-components';
|
|
183
|
-
import { SearchInput } from '@empathyco/x-components/search-box';
|
|
184
|
-
import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';
|
|
185
|
-
|
|
186
|
-
export default {
|
|
187
|
-
name: 'Demo',
|
|
188
|
-
components: {
|
|
189
|
-
GlobalXBus,
|
|
190
|
-
SearchInput,
|
|
191
|
-
QuerySuggestions
|
|
192
|
-
},
|
|
193
|
-
methods: {
|
|
194
|
-
logUserAcceptedAQuery(query, metadata) {
|
|
195
|
-
console.log('UserAcceptedAQuery', query, metadata);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
</script>
|
|
200
|
-
```
|