@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,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from './related-tag.vue2.js';
|
|
2
|
-
import { openBlock, createElementBlock, normalizeClass,
|
|
2
|
+
import { openBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString } from 'vue';
|
|
3
3
|
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
|
|
4
4
|
|
|
5
5
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -12,7 +12,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12
12
|
"data-test": "related-tag"
|
|
13
13
|
},
|
|
14
14
|
[
|
|
15
|
-
createCommentVNode("\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n @binding {boolean} shouldHighlightCurated - True if the curated RTs should be displayed.\n "),
|
|
16
15
|
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ relatedTag: _ctx.relatedTag, isSelected: _ctx.isSelected, shouldHighlightCurated: _ctx.shouldHighlightCurated })), () => [
|
|
17
16
|
createTextVNode(
|
|
18
17
|
toDisplayString(_ctx.relatedTag.tag),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"related-tag.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tag.vue"],"sourcesContent":["<template>\n <button\n ref=\"buttonEl\"\n @click=\"clickRelatedTag\"\n class=\"x-tag x-related-tag\"\n data-test=\"related-tag\"\n :class=\"dynamicClasses\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n @binding {boolean} shouldHighlightCurated - True if the curated RTs should be displayed.\n -->\n <slot v-bind=\"{ relatedTag, isSelected, shouldHighlightCurated }\">{{ relatedTag.tag }}</slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, ComputedRef, defineComponent, PropType, ref } from 'vue';\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import { Dictionary } from '@empathyco/x-utils';\n import { VueCSSClasses } from '../../../utils/types';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { relatedTagsXModule } from '../x-module';\n import { use$x } from '../../../composables/use-$x';\n import { useState } from '../../../composables/use-state';\n\n /**\n * This component renders a related tag for a query. A related tag is a descriptive keyword\n * related to the current query to fine-tune the search. For example, if you are searching\n * for *lego*, a related tag could be *city*, refining the search with *lego city*.\n *\n * @public\n */\n export default defineComponent({\n name: 'RelatedTag',\n xModule: relatedTagsXModule.name,\n props: {\n /**\n * Indicates if the curated related tag should be highlighted.\n *\n * @public\n */\n highlightCurated: {\n type: Boolean,\n default: false\n },\n /**\n * The related tag model data.\n *\n * @public\n */\n relatedTag: {\n type: Object as PropType<RelatedTagModel>,\n required: true\n }\n },\n setup(props) {\n const $x = use$x();\n\n const buttonEl = ref<HTMLElement | undefined>();\n\n /**\n * The selected related tags.\n *\n * @internal\n */\n const { selectedRelatedTags }: Dictionary<ComputedRef<RelatedTagModel[]>> = useState(\n 'relatedTags',\n ['selectedRelatedTags']\n );\n\n /**\n * Check if the related tag is selected or not.\n *\n * @returns If the related tag is selected.\n *\n * @internal\n */\n const isSelected = computed(() => selectedRelatedTags.value.includes(props.relatedTag));\n\n /**\n * Blurs the related tag if it is selected.\n *\n * @public\n */\n const blurRelatedTag = () => {\n if (isSelected.value) {\n buttonEl.value?.blur();\n }\n };\n\n /**\n * Generates the {@link WireMetadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n const createEventMetadata = (): Omit<WireMetadata, 'moduleName'> => ({\n target: buttonEl.value as HTMLElement,\n feature: 'related_tag'\n });\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n const emitEvents = () => {\n // We have to emit this events first to avoid the UserPickedARelatedTag wires to change the\n // isSelected value before emitting this selection events.\n $x.emit(\n isSelected.value ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag',\n props.relatedTag,\n createEventMetadata()\n );\n $x.emit('UserPickedARelatedTag', props.relatedTag, createEventMetadata());\n };\n\n /**\n * Handles the click on the button.\n *\n * @public\n */\n const clickRelatedTag = () => {\n emitEvents();\n blurRelatedTag();\n };\n\n /**\n * Check if the related tag is curated and should be highlighted.\n *\n * @returns True if the related tag is curated and should be highlighted.\n *\n * @internal\n */\n const shouldHighlightCurated = computed(\n () => props.highlightCurated && (props.relatedTag.isCurated ?? false)\n );\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n *\n * @internal\n */\n const dynamicClasses = computed(\n (): VueCSSClasses => ({\n 'x-selected x-related-tag--is-selected': isSelected.value,\n 'x-related-tag--is-curated': shouldHighlightCurated.value\n })\n );\n\n return {\n buttonEl,\n dynamicClasses,\n isSelected,\n clickRelatedTag,\n shouldHighlightCurated\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Dynamic classes\n\n`RelatedTag` uses the following dynamic CSS classes so you can style it when is:\n\n- Selected: `x-related-tag--is-selected`.\n- Curated: `x-related-tag--is-curated`.\n\n## Events\n\nThis component emits the following events:\n\n- [`UserDeselectedARelatedTag`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPickedARelatedTag`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserSelectedARelatedTag`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nThe QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nIn this example related tag data is passed as a prop.\n\n_Here you can see how the RelatedTag component is rendered._\n\n```vue live\n<template>\n <RelatedTag :relatedTag=\"tag\" />\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n query: 'high heel',\n isCurated: false,\n tag: 'heel'\n }\n };\n }\n };\n</script>\n```\n\n### Play with default slot\n\nIn this example, an HTML span element is passed in the `default` slot.\n\n_See how the related tag can be rendered._\n\n```vue live\n<template>\n <RelatedTag :relatedTag=\"tag\" #default=\"{ relatedTag }\">\n <span :aria-label=\"relatedTag.tag\">{{ relatedTag.tag }}</span>\n </RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n query: 'high heel',\n isCurated: false,\n tag: 'heel'\n }\n };\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, the [`UserSelectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\nevent is implemented, as illustrated by the “Tag” message returned.\n\n_See how the event is triggered when the related tag is clicked._\n\n```vue live\n<template>\n <RelatedTag :relatedTag=\"tag\" @UserSelectedARelatedTag=\"alertRelatedTag\" />\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n query: 'high heel',\n isCurated: false,\n tag: 'heel'\n }\n };\n },\n methods: {\n alertRelatedTag(relatedTag) {\n alert(`You have clicked the related tag: ${relatedTag.query}`);\n }\n }\n };\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass"
|
|
1
|
+
{"version":3,"file":"related-tag.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tag.vue"],"sourcesContent":["<template>\n <button\n ref=\"buttonEl\"\n @click=\"clickRelatedTag\"\n class=\"x-tag x-related-tag\"\n data-test=\"related-tag\"\n :class=\"dynamicClasses\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n @binding {boolean} shouldHighlightCurated - True if the curated RTs should be displayed.\n -->\n <slot v-bind=\"{ relatedTag, isSelected, shouldHighlightCurated }\">{{ relatedTag.tag }}</slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, ComputedRef, defineComponent, PropType, ref } from 'vue';\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import { Dictionary } from '@empathyco/x-utils';\n import { VueCSSClasses } from '../../../utils/types';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { relatedTagsXModule } from '../x-module';\n import { use$x } from '../../../composables/use-$x';\n import { useState } from '../../../composables/use-state';\n\n /**\n * This component renders a related tag for a query. A related tag is a descriptive keyword\n * related to the current query to fine-tune the search. For example, if you are searching\n * for *lego*, a related tag could be *city*, refining the search with *lego city*.\n *\n * @public\n */\n export default defineComponent({\n name: 'RelatedTag',\n xModule: relatedTagsXModule.name,\n props: {\n /**\n * Indicates if the curated related tag should be highlighted.\n *\n * @public\n */\n highlightCurated: {\n type: Boolean,\n default: false\n },\n /**\n * The related tag model data.\n *\n * @public\n */\n relatedTag: {\n type: Object as PropType<RelatedTagModel>,\n required: true\n }\n },\n setup(props) {\n const $x = use$x();\n\n const buttonEl = ref<HTMLElement | undefined>();\n\n /**\n * The selected related tags.\n *\n * @internal\n */\n const { selectedRelatedTags }: Dictionary<ComputedRef<RelatedTagModel[]>> = useState(\n 'relatedTags',\n ['selectedRelatedTags']\n );\n\n /**\n * Check if the related tag is selected or not.\n *\n * @returns If the related tag is selected.\n *\n * @internal\n */\n const isSelected = computed(() => selectedRelatedTags.value.includes(props.relatedTag));\n\n /**\n * Blurs the related tag if it is selected.\n *\n * @public\n */\n const blurRelatedTag = () => {\n if (isSelected.value) {\n buttonEl.value?.blur();\n }\n };\n\n /**\n * Generates the {@link WireMetadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n const createEventMetadata = (): Omit<WireMetadata, 'moduleName'> => ({\n target: buttonEl.value as HTMLElement,\n feature: 'related_tag'\n });\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n const emitEvents = () => {\n // We have to emit this events first to avoid the UserPickedARelatedTag wires to change the\n // isSelected value before emitting this selection events.\n $x.emit(\n isSelected.value ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag',\n props.relatedTag,\n createEventMetadata()\n );\n $x.emit('UserPickedARelatedTag', props.relatedTag, createEventMetadata());\n };\n\n /**\n * Handles the click on the button.\n *\n * @public\n */\n const clickRelatedTag = () => {\n emitEvents();\n blurRelatedTag();\n };\n\n /**\n * Check if the related tag is curated and should be highlighted.\n *\n * @returns True if the related tag is curated and should be highlighted.\n *\n * @internal\n */\n const shouldHighlightCurated = computed(\n () => props.highlightCurated && (props.relatedTag.isCurated ?? false)\n );\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n *\n * @internal\n */\n const dynamicClasses = computed(\n (): VueCSSClasses => ({\n 'x-selected x-related-tag--is-selected': isSelected.value,\n 'x-related-tag--is-curated': shouldHighlightCurated.value\n })\n );\n\n return {\n buttonEl,\n dynamicClasses,\n isSelected,\n clickRelatedTag,\n shouldHighlightCurated\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Dynamic classes\n\n`RelatedTag` uses the following dynamic CSS classes so you can style it when is:\n\n- Selected: `x-related-tag--is-selected`.\n- Curated: `x-related-tag--is-curated`.\n\n## Events\n\nThis component emits the following events:\n\n- [`UserDeselectedARelatedTag`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPickedARelatedTag`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserSelectedARelatedTag`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nThe QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nIn this example related tag data is passed as a prop.\n\n_Here you can see how the RelatedTag component is rendered._\n\n```vue live\n<template>\n <RelatedTag :relatedTag=\"tag\" />\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n query: 'high heel',\n isCurated: false,\n tag: 'heel'\n }\n };\n }\n };\n</script>\n```\n\n### Play with default slot\n\nIn this example, an HTML span element is passed in the `default` slot.\n\n_See how the related tag can be rendered._\n\n```vue live\n<template>\n <RelatedTag :relatedTag=\"tag\" #default=\"{ relatedTag }\">\n <span :aria-label=\"relatedTag.tag\">{{ relatedTag.tag }}</span>\n </RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n query: 'high heel',\n isCurated: false,\n tag: 'heel'\n }\n };\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, the [`UserSelectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\nevent is implemented, as illustrated by the “Tag” message returned.\n\n_See how the event is triggered when the related tag is clicked._\n\n```vue live\n<template>\n <RelatedTag :relatedTag=\"tag\" @UserSelectedARelatedTag=\"alertRelatedTag\" />\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n query: 'high heel',\n isCurated: false,\n tag: 'heel'\n }\n };\n },\n methods: {\n alertRelatedTag(relatedTag) {\n alert(`You have clicked the related tag: ${relatedTag.query}`);\n }\n }\n };\n</script>\n```\n</docs>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass"],"mappings":";;;;SAEQ,WAAU,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA;SACbA,SAAK,EAAA,EAAAC,kBAAA;AAAA,IAAA,QAAA;AAAA,IAAE;AAAA,MACR,GAAK,EAAA,UAAA;AAAA,MACL,gBAAU,CAAa,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,eAAA,IAAA,IAAA,CAAA,eAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,MAAA,KAAA,EAAAC,cAAA,CAAA,CAAA,qBAAA,EAAA,IAAA,CAAA,cAAA,CAAA,CAAA;MASvB,WAA6F,EAAA,aAAA;AAAA,KAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from './related-tags.vue2.js';
|
|
2
|
-
import { resolveComponent, openBlock, createBlock, resolveDynamicComponent, withCtx, createElementBlock, Fragment, renderList,
|
|
2
|
+
import { resolveComponent, openBlock, createBlock, resolveDynamicComponent, withCtx, createElementBlock, Fragment, renderList, renderSlot, mergeProps, createVNode, normalizeClass, createCommentVNode } from 'vue';
|
|
3
3
|
import './related-tags.vue3.js';
|
|
4
4
|
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
|
|
5
5
|
|
|
@@ -21,7 +21,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
21
21
|
class: "x-related-tags__item",
|
|
22
22
|
"data-test": "related-tag-item"
|
|
23
23
|
}, [
|
|
24
|
-
createCommentVNode("\n @slot Custom content that replaces the RelatedTag component.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} highlightCurated - True if the curated RTs should be displayed.\n "),
|
|
25
24
|
renderSlot(_ctx.$slots, "related-tag", mergeProps({ ref_for: true }, { relatedTag, highlightCurated: _ctx.highlightCurated }), () => [
|
|
26
25
|
createVNode(_component_RelatedTag, {
|
|
27
26
|
highlightCurated: _ctx.highlightCurated,
|
|
@@ -29,8 +28,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
29
28
|
class: normalizeClass(_ctx.itemClass)
|
|
30
29
|
}, {
|
|
31
30
|
default: withCtx(({ relatedTag: relatedTag2, isSelected, shouldHighlightCurated }) => [
|
|
32
|
-
createCommentVNode(" eslint-disable max-len "),
|
|
33
|
-
createCommentVNode("\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n @binding {boolean} shouldHighlightCurated - True if the curated RTs should be displayed.\n "),
|
|
34
31
|
renderSlot(_ctx.$slots, "related-tag-content", mergeProps({ ref_for: true }, { relatedTag: relatedTag2, isSelected, shouldHighlightCurated }), void 0, true)
|
|
35
32
|
]),
|
|
36
33
|
_: 2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"related-tags.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tags.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"relatedTags.length\"\n tag=\"ul\"\n class=\"x-related-tags\"\n data-test=\"related-tags\"\n >\n <li\n v-for=\"relatedTag in relatedTags\"\n :key=\"relatedTag.query\"\n class=\"x-related-tags__item\"\n data-test=\"related-tag-item\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag component.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} highlightCurated - True if the curated RTs should be displayed.\n -->\n <slot name=\"related-tag\" v-bind=\"{ relatedTag, highlightCurated }\">\n <RelatedTag\n :highlightCurated=\"highlightCurated\"\n :relatedTag=\"relatedTag\"\n :class=\"itemClass\"\n >\n <template #default=\"{ relatedTag, isSelected, shouldHighlightCurated }\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n @binding {boolean} shouldHighlightCurated - True if the curated RTs should be displayed.\n -->\n <slot\n name=\"related-tag-content\"\n v-bind=\"{ relatedTag, isSelected, shouldHighlightCurated }\"\n />\n </template>\n </RelatedTag>\n </slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import { computed, ComputedRef, defineComponent } from 'vue';\n import { relatedTagsXModule } from '../x-module';\n import { AnimationProp } from '../../../types/index';\n import { useGetter } from '../../../composables/use-getter';\n import RelatedTag from './related-tag.vue';\n\n /**\n * This component renders a set of [`RelatedTag`](./x-components.related-tag) components by\n * default to select from after a query is performed to fine-tune search.\n * For example, if you are searching for *lego*, different related tags could be *city*,\n * *friends*, or *harry potter*, refining the search with *lego city*, *lego friends*,\n * or *lego harry potter*.\n *\n * @public\n */\n export default defineComponent({\n name: 'RelatedTags',\n xModule: relatedTagsXModule.name,\n components: {\n RelatedTag\n },\n props: {\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n\n /**\n * Number of related tags to be rendered.\n *\n * @public\n */\n maxItemsToRender: Number,\n\n /**\n * Flag to indicate if the curated tags should be displayed different.\n *\n * @public\n */\n highlightCurated: {\n type: Boolean,\n default: false\n },\n\n /** Class inherited by content element. */\n itemClass: String\n },\n setup(props) {\n const storedRelatedTags: ComputedRef<RelatedTagModel[]> = useGetter('relatedTags', [\n 'relatedTags'\n ]).relatedTags;\n\n const relatedTags = computed((): RelatedTagModel[] =>\n storedRelatedTags.value.slice(0, props.maxItemsToRender)\n );\n\n return {\n relatedTags\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-related-tags {\n display: flex;\n flex-flow: row nowrap;\n list-style: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nThis example shows how related tags can be rendered without any additional effects.\n\n_Search for a fashion term like \"sandal\" or \"lipstick\"._\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags />\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the number of related tags rendered has been limited to 3. A fade and slide effect\nhas been added so that the related tags appear with a delay, then slide upwards and fade.\n\n_Search for a fashion term and see the related tags with the animation effect._\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags :animation=\"'StaggeredFadeAndSlide'\" :maxItemsToRender=\"3\" />\n </div>\n</template>\n\n<script>\n import Vue from 'vue';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { StaggeredFadeAndSlide } from '@empathyco/x-components';\n\n // Registering the animation as a global component\n Vue.component('StaggeredFadeAndSlide', StaggeredFadeAndSlide);\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with related-tag slot\n\nIn this example, the [`RelatedTag`](./x-components.related-tag.md) component is passed in the\n`related-tag` slot (although any other component could potentially be passed).\n\n_Search for a fashion term and see how the related tags can be rendered._\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags #related-tag=\"{ relatedTag }\">\n <RelatedTag :relatedTag=\"relatedTag\" />\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags, RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n RelatedTag\n }\n };\n</script>\n```\n\n### Play with related-tag-content slot\n\nTo continue the previous example, the [`RelatedTag`](./x-components.related-tag.md) component is\npassed in the `related-tag-content` slot, but in addition, an HTML span tag for the text are also\npassed.\n\n_Search for a fashion term and see how the related tags are rendered._\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags #related-tag-content=\"{ relatedTag }\">\n <span>{{ relatedTag.tag }}</span>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. The `RelatedTags` component can\ncommunicate with the [`SearchInput`](../search-box/x-components.search-input.md) as follows:\n\n_Search for a fashion term and see how the related tags can be rendered._\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags />\n <ResultsList #result=\"{ item }\">\n <span class=\"result\">\n {{ item.name }}\n </span>\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { ResultsList } from '@empathyco/x-components/search';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n ResultsList\n }\n };\n</script>\n```\n\n## Customizing the related tags with classes\n\nThe `itemClass` prop can be used to add classes to the related tags.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags #related-tag-content=\"{ relatedTag }\" itemClass=\"x-tag-outlined x-tag-auxiliary\">\n <span>{{ relatedTag.tag }}</span>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","_createCommentVNode","_renderSlot","highlightCurated","_mergeProps","_createVNode","itemClass","_normalizeClass","_withCtx","relatedTag"],"mappings":";;;;;;gCAGsBA,gBAAM,CAAA,YAAA,CAAA,CAAA;SAH5B,IAIY,CAAA,WAAA,CAAA,MAAA,IAAAC,SAAA,EAAA,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA;AAAA,IACR,GAAK,EAAA,CAAA;AAAA,IACL,GAAA,EAAA,IAAA;AAAA,IAAA,KAAA,EAAA,gBAAA;AANJ,IAAA,WAAA,EAAA,cAAA;AAAA,GAAA,EAAA;;iBAUY,IAAU,CAAA,EAAAC,kBAAA;AAAA,QAAMC,QAAA;AAAA,QAAA,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,WAAA,EAAA,CAAA,UAAA,KAAA;AACjB,UAAA,OAAAL,SAAA,EAAuB,EAAAG,kBAAA,CAAA,IAAA,EAAA;AAAA,YAC5B,GAAU,EAAA,UAAA,CAAA,KAAA;AAAA,YAAA,KAAA,EAAA,sBAAA;AAEV,YAAA,WAAA,EAAA,kBAAA;AAAA,WAKA,EAAA;AAAA,YAmBeG,kBAAA,CAAA,2OAAA,CAAA;AAAA,YAAAC,UAAA,CAjBV,aAAkBC,aAAgB,EAAAC,UAAA,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA;AAAA,cAAAC,WAAA,CACxB,qBAAY,EAAA;AAAA,gBACtB,kBAvBX,IAuBkBC,CAAAA,gBAAAA;AAAAA,gBAAAA,UAAAA;AAEG,gBAAA,KAAA,EAAOC,eAAI,IAAY,CAAA,SAAA,CAAA;AAAA,eAAA,EAAA;AAEhC,gBAAA,OAAA,EAAAC,OAAA,CAAA,CAAA,EAAA,UAAA,EAAAC,WAAA,EAAA,UAAA,EAAA,sBAAA,EAAA,KAAA;AAAA,kBAMAR,kBAGE,CAAA,0BAAA,CAAA;AAAA,kBAAAA,kBAAA,CAAA,iVAAA,CAAA;AApCd,kBAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,qBAAA,EAAAE,UAAA,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAA,EAAA,UAAA,EAAAK,WAAA,EAAA,UAAA,EAAA,sBAAA,EAAA,CAAA,EAAA,KAAA,CAAA,EAAA,IAAA,CAAA;AAAA,iBAAA,CAAA;;;;;;AAAA,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAAA;AAAA,KAAA,CAAA;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,CAAA,IAAAR,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"related-tags.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tags.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"relatedTags.length\"\n tag=\"ul\"\n class=\"x-related-tags\"\n data-test=\"related-tags\"\n >\n <li\n v-for=\"relatedTag in relatedTags\"\n :key=\"relatedTag.query\"\n class=\"x-related-tags__item\"\n data-test=\"related-tag-item\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag component.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} highlightCurated - True if the curated RTs should be displayed.\n -->\n <slot name=\"related-tag\" v-bind=\"{ relatedTag, highlightCurated }\">\n <RelatedTag\n :highlightCurated=\"highlightCurated\"\n :relatedTag=\"relatedTag\"\n :class=\"itemClass\"\n >\n <template #default=\"{ relatedTag, isSelected, shouldHighlightCurated }\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n @binding {boolean} shouldHighlightCurated - True if the curated RTs should be displayed.\n -->\n <slot\n name=\"related-tag-content\"\n v-bind=\"{ relatedTag, isSelected, shouldHighlightCurated }\"\n />\n </template>\n </RelatedTag>\n </slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import { computed, ComputedRef, defineComponent } from 'vue';\n import { relatedTagsXModule } from '../x-module';\n import { AnimationProp } from '../../../types/index';\n import { useGetter } from '../../../composables/use-getter';\n import RelatedTag from './related-tag.vue';\n\n /**\n * This component renders a set of [`RelatedTag`](./x-components.related-tag) components by\n * default to select from after a query is performed to fine-tune search.\n * For example, if you are searching for *lego*, different related tags could be *city*,\n * *friends*, or *harry potter*, refining the search with *lego city*, *lego friends*,\n * or *lego harry potter*.\n *\n * @public\n */\n export default defineComponent({\n name: 'RelatedTags',\n xModule: relatedTagsXModule.name,\n components: {\n RelatedTag\n },\n props: {\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n\n /**\n * Number of related tags to be rendered.\n *\n * @public\n */\n maxItemsToRender: Number,\n\n /**\n * Flag to indicate if the curated tags should be displayed different.\n *\n * @public\n */\n highlightCurated: {\n type: Boolean,\n default: false\n },\n\n /** Class inherited by content element. */\n itemClass: String\n },\n setup(props) {\n const storedRelatedTags: ComputedRef<RelatedTagModel[]> = useGetter('relatedTags', [\n 'relatedTags'\n ]).relatedTags;\n\n const relatedTags = computed((): RelatedTagModel[] =>\n storedRelatedTags.value.slice(0, props.maxItemsToRender)\n );\n\n return {\n relatedTags\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-related-tags {\n display: flex;\n flex-flow: row nowrap;\n list-style: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nThis example shows how related tags can be rendered without any additional effects.\n\n_Search for a fashion term like \"sandal\" or \"lipstick\"._\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags />\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the number of related tags rendered has been limited to 3. A fade and slide effect\nhas been added so that the related tags appear with a delay, then slide upwards and fade.\n\n_Search for a fashion term and see the related tags with the animation effect._\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags :animation=\"'StaggeredFadeAndSlide'\" :maxItemsToRender=\"3\" />\n </div>\n</template>\n\n<script>\n import Vue from 'vue';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { StaggeredFadeAndSlide } from '@empathyco/x-components';\n\n // Registering the animation as a global component\n Vue.component('StaggeredFadeAndSlide', StaggeredFadeAndSlide);\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with related-tag slot\n\nIn this example, the [`RelatedTag`](./x-components.related-tag.md) component is passed in the\n`related-tag` slot (although any other component could potentially be passed).\n\n_Search for a fashion term and see how the related tags can be rendered._\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags #related-tag=\"{ relatedTag }\">\n <RelatedTag :relatedTag=\"relatedTag\" />\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags, RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n RelatedTag\n }\n };\n</script>\n```\n\n### Play with related-tag-content slot\n\nTo continue the previous example, the [`RelatedTag`](./x-components.related-tag.md) component is\npassed in the `related-tag-content` slot, but in addition, an HTML span tag for the text are also\npassed.\n\n_Search for a fashion term and see how the related tags are rendered._\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags #related-tag-content=\"{ relatedTag }\">\n <span>{{ relatedTag.tag }}</span>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. The `RelatedTags` component can\ncommunicate with the [`SearchInput`](../search-box/x-components.search-input.md) as follows:\n\n_Search for a fashion term and see how the related tags can be rendered._\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags />\n <ResultsList #result=\"{ item }\">\n <span class=\"result\">\n {{ item.name }}\n </span>\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { ResultsList } from '@empathyco/x-components/search';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n ResultsList\n }\n };\n</script>\n```\n\n## Customizing the related tags with classes\n\nThe `itemClass` prop can be used to add classes to the related tags.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <RelatedTags #related-tag-content=\"{ relatedTag }\" itemClass=\"x-tag-outlined x-tag-auxiliary\">\n <span>{{ relatedTag.tag }}</span>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","_renderSlot","highlightCurated","_mergeProps","_createVNode","itemClass","_normalizeClass","relatedTag","_createCommentVNode"],"mappings":";;;;;;gCAGsBA,gBAAM,CAAA,YAAA,CAAA,CAAA;SAH5B,IAIY,CAAA,WAAA,CAAA,MAAA,IAAAC,SAAA,EAAA,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA;AAAA,IACR,GAAK,EAAA,CAAA;AAAA,IACL,GAAA,EAAA,IAAA;AAAA,IAAA,KAAA,EAAA,gBAAA;AANJ,IAAA,WAAA,EAAA,cAAA;AAAA,GAAA,EAAA;;iBAUY,IAAU,CAAA,EAAAC,kBAAA;AAAA,QAAMC,QAAA;AAAA,QAAA,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,WAAA,EAAA,CAAA,UAAA,KAAA;AACjB,UAAA,OAAAL,SAAA,EAAuB,EAAAG,kBAAA,CAAA,IAAA,EAAA;AAAA,YAC5B,GAAU,EAAA,UAAA,CAAA,KAAA;AAAA,YAAA,KAAA,EAAA,sBAAA;YAOV,WAoBO,EAAA,kBAAA;AAAA,WAAA,EAAA;AAlBF,YAAAG,UAAA,CAAA,IAAA,CAAA,MAAA,EAAkBC,aAAgB,EAAAC,UAAA,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA;AAAA,cAAAC,WAAA,CACxB,qBAAY,EAAA;AAAA,gBACtB,kBAvBX,IAuBkBC,CAAAA,gBAAAA;AAAAA,gBAAAA,UAAAA;AAEG,gBAAA,KAAA,EAAOC,eAAI,IAAY,CAAA,SAAA,CAAA;AAAA,eAAA,EAAA;;AAzB5C,kBAAAL,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,qBAAA,EAAAE,UAAA,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAA,EAAA,UAAA,EAAAI,WAAA,EAAA,UAAA,EAAA,sBAAA,EAAA,CAAA,EAAA,KAAA,CAAA,EAAA,IAAA,CAAA;AAAA,iBAAA,CAAA;;;;;;AAAA,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAAA;AAAA,KAAA,CAAA;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/related-tags/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { createEmitterArrayFilter } from '../../../utils/array';\nimport { relatedTagsXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the related-tags module.\n *\n * @internal\n */\nexport const relatedTagsEmitters = createStoreEmitters(relatedTagsXStoreModule, {\n RelatedTagsChanged: state => state.relatedTags,\n RelatedTagsRequestUpdated: (_, getters) => getters.request,\n SelectedRelatedTagsChanged: {\n selector: state => state.selectedRelatedTags,\n filter: createEmitterArrayFilter('tag')\n }\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/related-tags/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { createEmitterArrayFilter } from '../../../utils/array';\nimport { relatedTagsXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the related-tags module.\n *\n * @internal\n */\nexport const relatedTagsEmitters = createStoreEmitters(relatedTagsXStoreModule, {\n RelatedTagsChanged: state => state.relatedTags,\n RelatedTagsRequestUpdated: (_, getters) => getters.request,\n SelectedRelatedTagsChanged: {\n selector: state => state.selectedRelatedTags,\n filter: createEmitterArrayFilter('tag')\n }\n});\n"],"names":[],"mappings":";;;;;AAIA;;;;AAIG;AACU,MAAA,mBAAmB,GAAG,mBAAmB,CAAC,uBAAuB,EAAE;AAC9E,IAAA,kBAAkB,EAAE,KAAK,IAAI,KAAK,CAAC,WAAW;IAC9C,yBAAyB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO;AAC1D,IAAA,0BAA0B,EAAE;AAC1B,QAAA,QAAQ,EAAE,KAAK,IAAI,KAAK,CAAC,mBAAmB;AAC5C,QAAA,MAAM,EAAE,wBAAwB,CAAC,KAAK,CAAC;AACxC,KAAA;AACF,CAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from './scroll-to-top.vue2.js';
|
|
2
|
-
import { resolveComponent, openBlock, createBlock, resolveDynamicComponent, withCtx,
|
|
2
|
+
import { resolveComponent, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, createCommentVNode } from 'vue';
|
|
3
3
|
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
|
|
4
4
|
|
|
5
5
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -14,7 +14,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14
14
|
events: _ctx.events
|
|
15
15
|
}, {
|
|
16
16
|
default: withCtx(() => [
|
|
17
|
-
createCommentVNode(" @slot (Required) Button content with a text, an icon or both "),
|
|
18
17
|
renderSlot(_ctx.$slots, "default")
|
|
19
18
|
]),
|
|
20
19
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-to-top.vue.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <BaseEventButton\n v-if=\"isVisible\"\n class=\"x-scroll-to-top x-button\"\n data-test=\"scroll-to-top\"\n aria-label=\"Scroll to top\"\n :events=\"events\"\n >\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </BaseEventButton>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { NoAnimation, BaseEventButton } from '../../../components';\n import { XEventsTypes } from '../../../wiring';\n import { scrollXModule } from '../x-module';\n import { AnimationProp } from '../../../types';\n import { useState } from '../../../composables';\n import { MainScrollId } from './scroll.const';\n\n /**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n export default defineComponent({\n name: 'ScrollToTop',\n xModule: scrollXModule.name,\n components: { BaseEventButton },\n props: {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: () => NoAnimation\n },\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n thresholdPx: Number,\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n scrollId: {\n type: String,\n default: MainScrollId\n }\n },\n setup(props) {\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n const { data } = useState('scroll', ['data']);\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n const scrollData = computed(() => {\n return props.scrollId && data.value[props.scrollId]\n ? data.value[props.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n });\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserClickedScrollToTop: props.scrollId })\n );\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n const useThresholdStrategy = computed(() => typeof props.thresholdPx === 'number');\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n const isThresholdReached = computed(\n () => useThresholdStrategy.value && scrollData.value.position > props.thresholdPx!\n );\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n const hasAlmostReachedScrollEnd = computed(\n () => scrollData.value.hasAlmostReachedEnd && scrollData.value.direction === 'DOWN'\n );\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n const isVisible = computed(() =>\n useThresholdStrategy.value ? isThresholdReached.value : hasAlmostReachedScrollEnd.value\n );\n\n return {\n events,\n isVisible\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserClickedScrollToTop`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the id of the scroll\n that it going to be scrolled.\n\n## Examples\n\n### Basic example\n\nThe component renders whatever is passed to it in the default slot and scrolls to top the scroll\nwith an id `scrollId`.\n\nIt also receives an optional threshold in pixels. When the threshold is reached from the top, the\ncomponent will be shown once the user scrolls `UP`.\n\nIf this parameter is not provided the button will be visible when the user almost reaches the end of\nthe scroll.\n\n```vue\n<template>\n <div>\n <ScrollToTop scroll-id=\"scrollId\" :threshold-px=\"1000\">\n <span>Scroll to top</span>\n </ScrollToTop>\n </div>\n</template>\n\n<script>\n import { ScrollToTop } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollToTopTest',\n components: {\n ScrollToTop\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","animation","isVisible","_createBlock","_resolveDynamicComponent","_withCtx","events","
|
|
1
|
+
{"version":3,"file":"scroll-to-top.vue.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <BaseEventButton\n v-if=\"isVisible\"\n class=\"x-scroll-to-top x-button\"\n data-test=\"scroll-to-top\"\n aria-label=\"Scroll to top\"\n :events=\"events\"\n >\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </BaseEventButton>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { NoAnimation, BaseEventButton } from '../../../components';\n import { XEventsTypes } from '../../../wiring';\n import { scrollXModule } from '../x-module';\n import { AnimationProp } from '../../../types';\n import { useState } from '../../../composables';\n import { MainScrollId } from './scroll.const';\n\n /**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n export default defineComponent({\n name: 'ScrollToTop',\n xModule: scrollXModule.name,\n components: { BaseEventButton },\n props: {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: () => NoAnimation\n },\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n thresholdPx: Number,\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n scrollId: {\n type: String,\n default: MainScrollId\n }\n },\n setup(props) {\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n const { data } = useState('scroll', ['data']);\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n const scrollData = computed(() => {\n return props.scrollId && data.value[props.scrollId]\n ? data.value[props.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n });\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserClickedScrollToTop: props.scrollId })\n );\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n const useThresholdStrategy = computed(() => typeof props.thresholdPx === 'number');\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n const isThresholdReached = computed(\n () => useThresholdStrategy.value && scrollData.value.position > props.thresholdPx!\n );\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n const hasAlmostReachedScrollEnd = computed(\n () => scrollData.value.hasAlmostReachedEnd && scrollData.value.direction === 'DOWN'\n );\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n const isVisible = computed(() =>\n useThresholdStrategy.value ? isThresholdReached.value : hasAlmostReachedScrollEnd.value\n );\n\n return {\n events,\n isVisible\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserClickedScrollToTop`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the id of the scroll\n that it going to be scrolled.\n\n## Examples\n\n### Basic example\n\nThe component renders whatever is passed to it in the default slot and scrolls to top the scroll\nwith an id `scrollId`.\n\nIt also receives an optional threshold in pixels. When the threshold is reached from the top, the\ncomponent will be shown once the user scrolls `UP`.\n\nIf this parameter is not provided the button will be visible when the user almost reaches the end of\nthe scroll.\n\n```vue\n<template>\n <div>\n <ScrollToTop scroll-id=\"scrollId\" :threshold-px=\"1000\">\n <span>Scroll to top</span>\n </ScrollToTop>\n </div>\n</template>\n\n<script>\n import { ScrollToTop } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollToTopTest',\n components: {\n ScrollToTop\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","animation","isVisible","_createBlock","_resolveDynamicComponent","_withCtx","events","_renderSlot","_createCommentVNode"],"mappings":";;;;;AAYc,EAAA,MAAA,0BAAA,GAAAA,gBAAA,CAZd,iBACkBC,CAAAA,CAAAA;SAENC,SAAS,EAAA,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA,IAAA,EAAA;AAAA,IADjB,OAAA,EAAAC,OAAA,CAAA,MAAA;AAAA,MAAA,IAAA,CAFJ,wBAIsC,EAAAF,WAAA,CAAA,0BAAA,EAAA;AAAA,QAChC,GAAA,EAAA,CAAA;AAAA,QACA,KAAA,EAAA,0BAAA;AAAA,QACC,WAAQG,EAAAA,eAAAA;AAAAA,QAAAA,YAAAA,EAAAA,eAAAA;AAPf,QAAA,MAAA,EAAA,IAAA,CAAA,MAAA;AAAA,OAAA,EAAA;;AAAA,UAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA,SAAA,CAAA;AAAA,QAAA,CAAA,EAAA,CAAA;AAAA;AAAA,OAAA,EAAA,CAAA,EAAA,CAAA,QAAA,CAAA,CAAA,IAAAC,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
|
|
@@ -82,6 +82,8 @@ import '../../../components/base-grid.vue3.js';
|
|
|
82
82
|
import '../../../components/base-keyboard-navigation.vue2.js';
|
|
83
83
|
import '../../../components/base-rating.vue2.js';
|
|
84
84
|
import '../../../components/base-rating.vue3.js';
|
|
85
|
+
import '../../../components/base-slider.vue2.js';
|
|
86
|
+
import '../../../components/base-slider.vue3.js';
|
|
85
87
|
import '../../../components/base-switch.vue2.js';
|
|
86
88
|
import '../../../components/base-switch.vue3.js';
|
|
87
89
|
import '../../../components/base-variable-column-grid.vue2.js';
|
|
@@ -94,6 +96,12 @@ import '../../../components/sliding-panel.vue2.js';
|
|
|
94
96
|
import '../../../components/sliding-panel.vue3.js';
|
|
95
97
|
import '../../../components/snippet-callbacks.vue2.js';
|
|
96
98
|
import '../../../components/page-loader-button.vue2.js';
|
|
99
|
+
import '../../../components/page-loader-button.vue3.js';
|
|
100
|
+
import '../../../components/page-selector.vue2.js';
|
|
101
|
+
import '../../../components/page-selector.vue3.js';
|
|
102
|
+
import '../../../components/display-click-provider.vue.js';
|
|
103
|
+
import '../../../components/base-teleport.vue2.js';
|
|
104
|
+
import '../../../components/base-teleport.vue3.js';
|
|
97
105
|
import { scrollXModule } from '../x-module.js';
|
|
98
106
|
import { AnimationProp } from '../../../types/animation-prop.js';
|
|
99
107
|
import '../../../composables/create-use-device.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-to-top.vue2.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <BaseEventButton\n v-if=\"isVisible\"\n class=\"x-scroll-to-top x-button\"\n data-test=\"scroll-to-top\"\n aria-label=\"Scroll to top\"\n :events=\"events\"\n >\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </BaseEventButton>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { NoAnimation, BaseEventButton } from '../../../components';\n import { XEventsTypes } from '../../../wiring';\n import { scrollXModule } from '../x-module';\n import { AnimationProp } from '../../../types';\n import { useState } from '../../../composables';\n import { MainScrollId } from './scroll.const';\n\n /**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n export default defineComponent({\n name: 'ScrollToTop',\n xModule: scrollXModule.name,\n components: { BaseEventButton },\n props: {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: () => NoAnimation\n },\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n thresholdPx: Number,\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n scrollId: {\n type: String,\n default: MainScrollId\n }\n },\n setup(props) {\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n const { data } = useState('scroll', ['data']);\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n const scrollData = computed(() => {\n return props.scrollId && data.value[props.scrollId]\n ? data.value[props.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n });\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserClickedScrollToTop: props.scrollId })\n );\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n const useThresholdStrategy = computed(() => typeof props.thresholdPx === 'number');\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n const isThresholdReached = computed(\n () => useThresholdStrategy.value && scrollData.value.position > props.thresholdPx!\n );\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n const hasAlmostReachedScrollEnd = computed(\n () => scrollData.value.hasAlmostReachedEnd && scrollData.value.direction === 'DOWN'\n );\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n const isVisible = computed(() =>\n useThresholdStrategy.value ? isThresholdReached.value : hasAlmostReachedScrollEnd.value\n );\n\n return {\n events,\n isVisible\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserClickedScrollToTop`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the id of the scroll\n that it going to be scrolled.\n\n## Examples\n\n### Basic example\n\nThe component renders whatever is passed to it in the default slot and scrolls to top the scroll\nwith an id `scrollId`.\n\nIt also receives an optional threshold in pixels. When the threshold is reached from the top, the\ncomponent will be shown once the user scrolls `UP`.\n\nIf this parameter is not provided the button will be visible when the user almost reaches the end of\nthe scroll.\n\n```vue\n<template>\n <div>\n <ScrollToTop scroll-id=\"scrollId\" :threshold-px=\"1000\">\n <span>Scroll to top</span>\n </ScrollToTop>\n </div>\n</template>\n\n<script>\n import { ScrollToTop } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollToTopTest',\n components: {\n ScrollToTop\n }\n };\n</script>\n```\n</docs>\n"],"names":["NoAnimation"],"mappings":"
|
|
1
|
+
{"version":3,"file":"scroll-to-top.vue2.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <BaseEventButton\n v-if=\"isVisible\"\n class=\"x-scroll-to-top x-button\"\n data-test=\"scroll-to-top\"\n aria-label=\"Scroll to top\"\n :events=\"events\"\n >\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </BaseEventButton>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { NoAnimation, BaseEventButton } from '../../../components';\n import { XEventsTypes } from '../../../wiring';\n import { scrollXModule } from '../x-module';\n import { AnimationProp } from '../../../types';\n import { useState } from '../../../composables';\n import { MainScrollId } from './scroll.const';\n\n /**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n export default defineComponent({\n name: 'ScrollToTop',\n xModule: scrollXModule.name,\n components: { BaseEventButton },\n props: {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: () => NoAnimation\n },\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n thresholdPx: Number,\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n scrollId: {\n type: String,\n default: MainScrollId\n }\n },\n setup(props) {\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n const { data } = useState('scroll', ['data']);\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n const scrollData = computed(() => {\n return props.scrollId && data.value[props.scrollId]\n ? data.value[props.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n });\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n const events = computed(\n (): Partial<XEventsTypes> => ({ UserClickedScrollToTop: props.scrollId })\n );\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n const useThresholdStrategy = computed(() => typeof props.thresholdPx === 'number');\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n const isThresholdReached = computed(\n () => useThresholdStrategy.value && scrollData.value.position > props.thresholdPx!\n );\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n const hasAlmostReachedScrollEnd = computed(\n () => scrollData.value.hasAlmostReachedEnd && scrollData.value.direction === 'DOWN'\n );\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n const isVisible = computed(() =>\n useThresholdStrategy.value ? isThresholdReached.value : hasAlmostReachedScrollEnd.value\n );\n\n return {\n events,\n isVisible\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`UserClickedScrollToTop`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted after the user clicks the button. The event payload is the id of the scroll\n that it going to be scrolled.\n\n## Examples\n\n### Basic example\n\nThe component renders whatever is passed to it in the default slot and scrolls to top the scroll\nwith an id `scrollId`.\n\nIt also receives an optional threshold in pixels. When the threshold is reached from the top, the\ncomponent will be shown once the user scrolls `UP`.\n\nIf this parameter is not provided the button will be visible when the user almost reaches the end of\nthe scroll.\n\n```vue\n<template>\n <div>\n <ScrollToTop scroll-id=\"scrollId\" :threshold-px=\"1000\">\n <span>Scroll to top</span>\n </ScrollToTop>\n </div>\n</template>\n\n<script>\n import { ScrollToTop } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollToTopTest',\n components: {\n ScrollToTop\n }\n };\n</script>\n```\n</docs>\n"],"names":["NoAnimation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBE;;;;;AAKE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,aAAa,CAAC,IAAI;IAC3B,UAAU,EAAE,EAAE,eAAc,EAAG;AAC/B,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,OAAO,EAAE,MAAMA,WAAU;AAC1B,SAAA;AACD;;;;AAIE;AACF,QAAA,WAAW,EAAE,MAAM;AACnB;;;;AAIE;AACF,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,YAAW;AACtB,SAAA;AACD,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT;;;;AAIE;;AAEF,QAAA,MAAM,EAAE,IAAK,EAAA,GAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;AAE7C;;;;;;AAME;AACF,QAAA,MAAM,UAAW,GAAE,QAAQ,CAAC,MAAM;YAChC,OAAO,KAAK,CAAC,QAAO,IAAK,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAA;kBAC9C,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAA;AAC3B,kBAAE;AACE,oBAAA,QAAQ,EAAE,CAAC;AACX,oBAAA,SAAS,EAAE,IAAI;AACf,oBAAA,eAAe,EAAE,KAAK;AACtB,oBAAA,mBAAmB,EAAE,KAAK;AAC1B,oBAAA,aAAa,EAAE,KAAI;iBACpB,CAAA;AACP,SAAC,CAAC,CAAA;AAEF;;;;;AAKE;AACF,QAAA,MAAM,MAAO,GAAE,QAAQ,CACrB,OAA8B,EAAE,sBAAsB,EAAE,KAAK,CAAC,UAAU,CAAA,CACzE,CAAA;AAED;;;;;AAKE;AACF,QAAA,MAAM,uBAAuB,QAAQ,CAAC,MAAM,OAAO,KAAK,CAAC,WAAU,KAAM,QAAQ,CAAC,CAAA;AAElF;;;;;AAKE;QACF,MAAM,kBAAmB,GAAE,QAAQ,CACjC,MAAM,oBAAoB,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,QAAS,GAAE,KAAK,CAAC,WAAW,CAClF,CAAA;AAED;;;;;AAKE;QACF,MAAM,yBAA0B,GAAE,QAAQ,CACxC,MAAM,UAAU,CAAC,KAAK,CAAC,mBAAkB,IAAK,UAAU,CAAC,KAAK,CAAC,SAAU,KAAI,MAAK,CACnF,CAAA;AAED;;;;;AAKE;QACF,MAAM,YAAY,QAAQ,CAAC,MACzB,oBAAoB,CAAC,KAAM,GAAE,kBAAkB,CAAC,KAAI,GAAI,yBAAyB,CAAC,KAAI,CACvF,CAAA;QAED,OAAO;YACL,MAAM;YACN,SAAQ;SACT,CAAA;KACH;AACD,CAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/scroll/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { scrollXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the scroll module.\n *\n * @internal\n */\nexport const scrollEmitters = createStoreEmitters(scrollXStoreModule, {});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/scroll/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { scrollXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the scroll module.\n *\n * @internal\n */\nexport const scrollEmitters = createStoreEmitters(scrollXStoreModule, {});\n"],"names":[],"mappings":";;;;AAGA;;;;AAIG;AACU,MAAA,cAAc,GAAG,mBAAmB,CAAC,kBAAkB,EAAE,EAAE;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from './partial-results-list.vue2.js';
|
|
2
|
-
import { openBlock, createBlock, resolveDynamicComponent, withCtx, createElementBlock, Fragment, renderList,
|
|
2
|
+
import { openBlock, createBlock, resolveDynamicComponent, withCtx, createElementBlock, Fragment, renderList, renderSlot, createCommentVNode } from 'vue';
|
|
3
3
|
import './partial-results-list.vue3.js';
|
|
4
4
|
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
|
|
5
5
|
|
|
@@ -20,7 +20,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20
20
|
class: "x-partial-result",
|
|
21
21
|
"data-test": "partial-result"
|
|
22
22
|
}, [
|
|
23
|
-
createCommentVNode("\n @slot (Required) Partial results item content\n @binding {Partial} partialResult - Partial Result data\n "),
|
|
24
23
|
renderSlot(_ctx.$slots, "default", { partialResult }, void 0, true)
|
|
25
24
|
]);
|
|
26
25
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partial-results-list.vue.js","sources":["../../../../../src/x-modules/search/components/partial-results-list.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"partialResults.length\"\n class=\"x-partial-results-list\"\n data-test=\"partial-results\"\n tag=\"ul\"\n >\n <li\n v-for=\"(partialResult, index) in partialResults\"\n :key=\"`${partialResult.query}-${index}`\"\n class=\"x-partial-result\"\n data-test=\"partial-result\"\n >\n <!--\n @slot (Required) Partial results item content\n @binding {Partial} partialResult - Partial Result data\n -->\n <slot :partialResult=\"partialResult\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { PartialResult } from '@empathyco/x-types';\n import { computed, ComputedRef, defineComponent } from 'vue';\n import { searchXModule } from '../x-module';\n import { AnimationProp } from '../../../types/animation-prop';\n import { useState } from '../../../composables/use-state';\n\n /**\n * It renders a list of partial results from {@link SearchState.partialResults} by default.\n * It also provides the partial result slot to customize the item with the partial result bound.\n *\n * @public\n */\n export default defineComponent({\n name: 'PartialResultsList',\n xModule: searchXModule.name,\n props: {\n /**\n * Animation component that will be used to animate the partial results.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n\n /**\n * Maximum number of partial results to show.\n *\n * @public\n */\n maxItemsToRender: {\n type: Number,\n default: 5\n }\n },\n setup(props) {\n /**\n * The partials results from the search state.\n *\n * @public\n */\n const items: ComputedRef<PartialResult[]> = useState('search', [\n 'partialResults'\n ]).partialResults;\n\n /**\n * A limited number of partial results.\n *\n * @returns The partial results sliced by the maxItemsToRender.\n *\n * @internal\n */\n const partialResults = computed(() => items.value.slice(0, props.maxItemsToRender));\n\n return {\n partialResults\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-partial-results-list {\n display: flex;\n flex-flow: column nowrap;\n list-style-type: none;\n padding: 0;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component loops through an array of partials an exposed a slot to use customize each partial.\n\n### Basic example\n\nIt renders a list of partial results using the default slot:\n\n```vue\n<template>\n <PartialResultsList>\n <template #default=\"{ partialResult }\">\n <ResultsList :results=\"partialResult.results\" />\n </template>\n </PartialResultsList>\n</template>\n```\n\n### Configuring the number of partials\n\nIt sets the maximum partials to show to 3.\n\n```vue\n<template>\n <PartialResultsList :maxItemsToRender=\"3\">\n <template #default=\"{ partialResult }\">\n <ResultsList :results=\"partialResult.results\" />\n </template>\n </PartialResultsList>\n</template>\n```\n\n### Rendering usage\n\nIt renders a list of partial results using the default slot. It will show the query, the partial\nresults and a button to update the query with the partial one.\n\n```vue\n<template>\n <PartialResultsList>\n <template #default=\"{ partialResult }\">\n <span>{{ partialResult.query }}</span>\n <BaseGrid :columns=\"4\" :items=\"partialResult.results\">\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n <template #default=\"{ item }\">\n <BaseResultImage :result=\"item\" />\n <span class=\"x-result__title\">{{ item.name }}</span>\n </template>\n </BaseResultLink>\n </template>\n </BaseGrid>\n <PartialQueryButton :query=\"partialResult.query\">\n <template #default=\"{ query }\">Ver todos {{ query }}</template>\n </PartialQueryButton>\n </template>\n </PartialResultsList>\n</template>\n```\n</docs>\n"],"names":["animation","_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","_createCommentVNode"],"mappings":";;;;;AACE,SAAA,WAAA,CAAA,IAAA,EAAA,MAAA,EADF,MAESA,EAAAA,MAAAA,EAAAA,KAAAA,EAAAA,QAAAA,EAAAA;AAFT,EAAA,OAAA,IAAA,CAAA,cAAA,CAAA,MAAA,IAAAC,SAAA,EAIkC,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA;AAAA,IAC9B,GAAA,EAAA,CAAA;AAAA,IACA,KAAI,EAAA,wBAAA;AAAA,IAAA,WAAA,EAAA,iBAAA;AANR,IAAA,GAAA,EAAA,IAAA;AAAA,GAAA,EAAA;;AAUe,OAAAF,SAAA,CAAA,IAAA,CAAA,EAAAG,kBAAA;AAAA,QAAuBC,QAAA;AAAA,QAAK,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,cAAA,EAAA,CAAA,aAAA,EAAA,KAAA,KAAA;AAChC,UAAA,OAAAL,SAAA,EAAmB,EAAAG,kBAAA,CAAA,IAAA,EAAA;AAAA,YACxB,sBAAU,KAAgB,CAAA,CAAA,EAAA,KAAA,CAAA,CAAA;AAAA,YAAA,KAAA,EAAA,kBAAA;
|
|
1
|
+
{"version":3,"file":"partial-results-list.vue.js","sources":["../../../../../src/x-modules/search/components/partial-results-list.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"partialResults.length\"\n class=\"x-partial-results-list\"\n data-test=\"partial-results\"\n tag=\"ul\"\n >\n <li\n v-for=\"(partialResult, index) in partialResults\"\n :key=\"`${partialResult.query}-${index}`\"\n class=\"x-partial-result\"\n data-test=\"partial-result\"\n >\n <!--\n @slot (Required) Partial results item content\n @binding {Partial} partialResult - Partial Result data\n -->\n <slot :partialResult=\"partialResult\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { PartialResult } from '@empathyco/x-types';\n import { computed, ComputedRef, defineComponent } from 'vue';\n import { searchXModule } from '../x-module';\n import { AnimationProp } from '../../../types/animation-prop';\n import { useState } from '../../../composables/use-state';\n\n /**\n * It renders a list of partial results from {@link SearchState.partialResults} by default.\n * It also provides the partial result slot to customize the item with the partial result bound.\n *\n * @public\n */\n export default defineComponent({\n name: 'PartialResultsList',\n xModule: searchXModule.name,\n props: {\n /**\n * Animation component that will be used to animate the partial results.\n *\n * @public\n */\n animation: {\n type: AnimationProp,\n default: 'ul'\n },\n\n /**\n * Maximum number of partial results to show.\n *\n * @public\n */\n maxItemsToRender: {\n type: Number,\n default: 5\n }\n },\n setup(props) {\n /**\n * The partials results from the search state.\n *\n * @public\n */\n const items: ComputedRef<PartialResult[]> = useState('search', [\n 'partialResults'\n ]).partialResults;\n\n /**\n * A limited number of partial results.\n *\n * @returns The partial results sliced by the maxItemsToRender.\n *\n * @internal\n */\n const partialResults = computed(() => items.value.slice(0, props.maxItemsToRender));\n\n return {\n partialResults\n };\n }\n });\n</script>\n\n<style lang=\"css\" scoped>\n .x-partial-results-list {\n display: flex;\n flex-flow: column nowrap;\n list-style-type: none;\n padding: 0;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component loops through an array of partials an exposed a slot to use customize each partial.\n\n### Basic example\n\nIt renders a list of partial results using the default slot:\n\n```vue\n<template>\n <PartialResultsList>\n <template #default=\"{ partialResult }\">\n <ResultsList :results=\"partialResult.results\" />\n </template>\n </PartialResultsList>\n</template>\n```\n\n### Configuring the number of partials\n\nIt sets the maximum partials to show to 3.\n\n```vue\n<template>\n <PartialResultsList :maxItemsToRender=\"3\">\n <template #default=\"{ partialResult }\">\n <ResultsList :results=\"partialResult.results\" />\n </template>\n </PartialResultsList>\n</template>\n```\n\n### Rendering usage\n\nIt renders a list of partial results using the default slot. It will show the query, the partial\nresults and a button to update the query with the partial one.\n\n```vue\n<template>\n <PartialResultsList>\n <template #default=\"{ partialResult }\">\n <span>{{ partialResult.query }}</span>\n <BaseGrid :columns=\"4\" :items=\"partialResult.results\">\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n <template #default=\"{ item }\">\n <BaseResultImage :result=\"item\" />\n <span class=\"x-result__title\">{{ item.name }}</span>\n </template>\n </BaseResultLink>\n </template>\n </BaseGrid>\n <PartialQueryButton :query=\"partialResult.query\">\n <template #default=\"{ query }\">Ver todos {{ query }}</template>\n </PartialQueryButton>\n </template>\n </PartialResultsList>\n</template>\n```\n</docs>\n"],"names":["animation","_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","_createCommentVNode"],"mappings":";;;;;AACE,SAAA,WAAA,CAAA,IAAA,EAAA,MAAA,EADF,MAESA,EAAAA,MAAAA,EAAAA,KAAAA,EAAAA,QAAAA,EAAAA;AAFT,EAAA,OAAA,IAAA,CAAA,cAAA,CAAA,MAAA,IAAAC,SAAA,EAIkC,EAAAC,WAAA,CAAAC,uBAAA,CAAA,IAAA,CAAA,SAAA,CAAA,EAAA;AAAA,IAC9B,GAAA,EAAA,CAAA;AAAA,IACA,KAAI,EAAA,wBAAA;AAAA,IAAA,WAAA,EAAA,iBAAA;AANR,IAAA,GAAA,EAAA,IAAA;AAAA,GAAA,EAAA;;AAUe,OAAAF,SAAA,CAAA,IAAA,CAAA,EAAAG,kBAAA;AAAA,QAAuBC,QAAA;AAAA,QAAK,IAAA;AAAA,QAAAC,UAAA,CAAA,IAAA,CAAA,cAAA,EAAA,CAAA,aAAA,EAAA,KAAA,KAAA;AAChC,UAAA,OAAAL,SAAA,EAAmB,EAAAG,kBAAA,CAAA,IAAA,EAAA;AAAA,YACxB,sBAAU,KAAgB,CAAA,CAAA,EAAA,KAAA,CAAA,CAAA;AAAA,YAAA,KAAA,EAAA,kBAAA;YAM1B,WAAuC,EAAA,gBAAA;AAAA,WAAA,EAAA;;;AAlB7C,SAAA,CAAA;AAAA,QAAA,GAAA;AAAA;AAAA,OAAA;AAAA,KAAA,CAAA;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA;AAAA,GAAA,CAAA,IAAAG,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA,CAAA;;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, provide, ref, computed, watch, h } from 'vue';
|
|
2
2
|
import { LIST_ITEMS_KEY, QUERY_KEY, HAS_MORE_ITEMS_KEY } from '../../../components/decorators/injection.consts.js';
|
|
3
3
|
import ItemsList from '../../../components/items-list.vue.js';
|
|
4
|
-
import { animationProp } from '../../../utils/options-api.js';
|
|
5
4
|
import { useState } from '../../../composables/use-state.js';
|
|
6
5
|
import { searchXModule } from '../x-module.js';
|
|
6
|
+
import { AnimationProp } from '../../../types/animation-prop.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* It renders a {@link ItemsList} list with the results from {@link SearchState.results} by
|
|
@@ -22,7 +22,7 @@ var _sfc_main = defineComponent({
|
|
|
22
22
|
props: {
|
|
23
23
|
/** Animation component that will be used to animate the results. */
|
|
24
24
|
animation: {
|
|
25
|
-
type:
|
|
25
|
+
type: AnimationProp,
|
|
26
26
|
default: 'ul'
|
|
27
27
|
}
|
|
28
28
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results-list.vue.js","sources":["../../../../../src/x-modules/search/components/results-list.vue"],"sourcesContent":["<script lang=\"ts\">\n import { computed, ComputedRef, defineComponent, h, provide, Ref, ref, watch } from 'vue';\n import { Result } from '@empathyco/x-types';\n import {\n HAS_MORE_ITEMS_KEY,\n LIST_ITEMS_KEY,\n QUERY_KEY\n } from '../../../components/decorators/injection.consts';\n import ItemsList from '../../../components/items-list.vue';\n import { RequestStatus } from '../../../store/utils/status-store.utils';\n import {
|
|
1
|
+
{"version":3,"file":"results-list.vue.js","sources":["../../../../../src/x-modules/search/components/results-list.vue"],"sourcesContent":["<script lang=\"ts\">\n import { computed, ComputedRef, defineComponent, h, provide, Ref, ref, watch } from 'vue';\n import { Result } from '@empathyco/x-types';\n import {\n HAS_MORE_ITEMS_KEY,\n LIST_ITEMS_KEY,\n QUERY_KEY\n } from '../../../components/decorators/injection.consts';\n import ItemsList from '../../../components/items-list.vue';\n import { RequestStatus } from '../../../store/utils/status-store.utils';\n import { useState } from '../../../composables/use-state';\n import { searchXModule } from '../x-module';\n import { AnimationProp } from '../../../types';\n\n /**\n * It renders a {@link ItemsList} list with the results from {@link SearchState.results} by\n * default.\n *\n * The component provides a default slot which wraps the whole component with the `results` bound.\n *\n * It also provides the slot result to customize the item, which is within the default slot, with\n * the result bound.\n *\n * @public\n */\n export default defineComponent({\n name: 'ResultsList',\n xModule: searchXModule.name,\n props: {\n /** Animation component that will be used to animate the results. */\n animation: {\n type: AnimationProp,\n default: 'ul'\n }\n },\n emits: ['UserReachedResultsListEnd'],\n setup(props, { slots }) {\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n */\n const items: ComputedRef<Result[]> = useState('search', ['results']).results;\n provide<ComputedRef<Result[]>>(LIST_ITEMS_KEY as string, items);\n\n /** The total number of results, taken from the state. */\n const totalResults: ComputedRef<number> = useState('search', ['totalResults']).totalResults;\n\n /** This query is updated only when the search request has succeeded. */\n let providedQuery = ref('');\n provide<Ref<string>>(QUERY_KEY as string, providedQuery);\n\n /** Indicates if there are more available results that have not been injected. */\n const hasMoreItems = computed(() => items.value.length < totalResults.value);\n provide<ComputedRef<boolean>>(HAS_MORE_ITEMS_KEY as string, hasMoreItems);\n\n /** The status of the search request, taken from the state. */\n const searchStatus: ComputedRef<RequestStatus> = useState('search', ['status']).status;\n\n /** The query of the search request, taken from the state. */\n const searchQuery: ComputedRef<string> = useState('search', ['query']).query;\n\n /**\n * Updates the query to be provided to the child components\n * when the search request has succeeded.\n *\n * @param status - The status of the search request.\n */\n function updateQuery(status: RequestStatus) {\n if (status === 'success') {\n providedQuery.value = searchQuery.value;\n }\n }\n\n /**\n * Watches the searchStatus and triggers updateQuery as callback\n * when it changes.\n *\n * @param status - The status of the search request.\n */\n watch(searchStatus, () => updateQuery(searchStatus.value), { immediate: true });\n\n return () => {\n const innerProps = { items: items.value, animation: props.animation };\n // https://vue-land.github.io/faq/forwarding-slots#passing-all-slots\n return slots.default?.(innerProps)[0] ?? h(ItemsList, innerProps, slots);\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nTo use this component, the Search service must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nHere you have a basic example of how the ResultsList is rendered.\n\n_Type any term in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList />\n </div>\n</template>\n\n<script>\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'ResultsListDemo',\n components: {\n SearchInput,\n ResultsList\n }\n };\n</script>\n```\n\n### Play with the animation\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList :animation=\"fadeAndSlide\" />\n </div>\n</template>\n\n<script>\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { FadeAndSlide } from '@empathyco/x-components/animations';\n\n export default {\n name: 'ResultsListDemo',\n components: {\n SearchInput,\n ResultsList\n },\n data() {\n return {\n fadeAndSlide: FadeAndSlide\n };\n }\n };\n</script>\n```\n\n### Overriding default content\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList #default=\"{ items, animation }\">\n <BaseGrid :items=\"items\" :animation=\"animation\">\n <template #result=\"{ item }\">\n <span>Result: {{ item.name }}</span>\n </template>\n <template #default=\"{ item }\">\n <span>Default: {{ item }}</span>\n </template>\n </BaseGrid>\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { BaseGrid } from '@empathyco/x-components';\n\n export default {\n name: 'ResultsListDemo',\n components: {\n SearchInput,\n ResultsList,\n BaseGrid\n }\n };\n</script>\n```\n\n### Overriding result content\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList #result=\"{ item }\">\n <span class=\"result\">\n {{ item.name }}\n </span>\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { SearchInput, ResultsList } from '@empathyco/x-components/search';\n\n export default {\n name: 'ResultsListDemo',\n components: {\n SearchInput,\n ResultsList\n }\n };\n</script>\n```\n\n### Data injection\n\nStarting with the `ResultsList` component as root element, you can concat the list of list items\nusing `BannersList`, `PromotedsList`, `BaseGrid` or any component that injects the `listItems`\nvalue.\n\nThe order in which elements are placed in the template will define the concat strategy of the items,\nso it is important to define it properly; for example, Promoteds will be usually before Banners so\nfirst promoted items are inserted within the results and then banner items are placed on top of\nthat, occupying the rows.\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <PromotedsList>\n <BannersList>\n <template #result=\"{ item }\">Result: {{ item.id }}</template>\n <template #banner=\"{ item }\">Banner: {{ item.id }}</template>\n <template #promoted=\"{ item }\">Promoted: {{ item.id }}</template>\n </BannersList>\n </PromotedsList>\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { ResultsList, BannersList, PromotedsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'ResultsListDemo',\n components: {\n SearchInput,\n ResultsList,\n BannersList,\n PromotedsList\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;;AAcE;;;;;;;;;;AAUE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,aAAa,CAAC,IAAI;AAC3B,IAAA,KAAK,EAAE;;AAEL,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,OAAO,EAAE,IAAG;AACd,SAAA;AACD,KAAA;IACD,KAAK,EAAE,CAAC,2BAA2B,CAAC;AACpC,IAAA,KAAK,CAAC,KAAK,EAAE,EAAE,KAAI,EAAG,EAAA;AACpB;;;;;;AAME;AACF,QAAA,MAAM,KAAK,GAA0B,QAAQ,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAA;AAC5E,QAAA,OAAO,CAAwB,cAAwB,EAAE,KAAK,CAAC,CAAA;;AAG/D,QAAA,MAAM,YAAY,GAAwB,QAAQ,CAAC,QAAQ,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAA;;AAG3F,QAAA,IAAI,gBAAgB,GAAG,CAAC,EAAE,CAAC,CAAA;AAC3B,QAAA,OAAO,CAAc,SAAmB,EAAE,aAAa,CAAC,CAAA;;AAGxD,QAAA,MAAM,YAAa,GAAE,QAAQ,CAAC,MAAM,KAAK,CAAC,KAAK,CAAC,MAAK,GAAI,YAAY,CAAC,KAAK,CAAC,CAAA;AAC5E,QAAA,OAAO,CAAuB,kBAA4B,EAAE,YAAY,CAAC,CAAA;;AAGzE,QAAA,MAAM,YAAY,GAA+B,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAA;;AAGtF,QAAA,MAAM,WAAW,GAAwB,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAA;AAE5E;;;;;AAKE;QACF,SAAS,WAAW,CAAC,MAAqB,EAAA;YACxC,IAAI,WAAW,SAAS,EAAE;AACxB,gBAAA,aAAa,CAAC,KAAM,GAAE,WAAW,CAAC,KAAK,CAAA;AACzC,aAAA;SACF;AAEA;;;;;AAKE;AACF,QAAA,KAAK,CAAC,YAAY,EAAE,MAAM,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,IAAG,EAAG,CAAC,CAAA;AAE/E,QAAA,OAAO,MAAM;AACX,YAAA,MAAM,UAAW,GAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAQ,EAAG,CAAA;;AAErE,YAAA,OAAO,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAE,IAAG,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,CAAA;AAC1E,SAAC,CAAA;KACH;AACD,CAAA,CAAC;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from './sort-dropdown.vue2.js';
|
|
2
|
-
import { resolveComponent, openBlock, createBlock, withCtx,
|
|
2
|
+
import { resolveComponent, openBlock, createBlock, withCtx, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString } from 'vue';
|
|
3
3
|
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
|
|
4
4
|
|
|
5
5
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -15,7 +15,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15
15
|
"aria-label": "Select sorting"
|
|
16
16
|
}, {
|
|
17
17
|
toggle: withCtx(({ isOpen, item }) => [
|
|
18
|
-
createCommentVNode("\n @slot Used to render the contents of the dropdown toggle button. If not provided, it uses\n the item slot as fallback.\n @binding {Sort} item - The sort data to render.\n @binding {boolean} isOpen - True if the dropdown is opened, and false if it is closed.\n "),
|
|
19
18
|
renderSlot(_ctx.$slots, "toggle", normalizeProps(guardReactiveProps({ isOpen, item })), () => [
|
|
20
19
|
createTextVNode(
|
|
21
20
|
toDisplayString(item),
|
|
@@ -25,7 +24,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25
24
|
])
|
|
26
25
|
]),
|
|
27
26
|
item: withCtx(({ item, isHighlighted, isSelected }) => [
|
|
28
|
-
createCommentVNode("\n @slot (required) Used to render each one of the items content, and as fallback\n for the toggle button content slot if it is not provided.\n @binding {Sort} item - Sort to render\n @binding {boolean} isHighlighted - True when the item has the focus.\n @binding {boolean} isSelected - True when the item is selected.\n "),
|
|
29
27
|
renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps({ item, isHighlighted, isSelected })), () => [
|
|
30
28
|
createTextVNode(
|
|
31
29
|
toDisplayString(item),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-dropdown.vue.js","sources":["../../../../../src/x-modules/search/components/sort-dropdown.vue"],"sourcesContent":["<template>\n <BaseDropdown\n ref=\"rootRef\"\n @update:modelValue=\"emitUserClickedASort\"\n :items=\"items\"\n :modelValue=\"selectedSort\"\n :animation=\"animation\"\n class=\"x-sort-dropdown\"\n data-test=\"sort-dropdown\"\n aria-label=\"Select sorting\"\n >\n <template #toggle=\"{ isOpen, item }\">\n <!--\n @slot Used to render the contents of the dropdown toggle button. If not provided, it uses\n the item slot as fallback.\n @binding {Sort} item - The sort data to render.\n @binding {boolean} isOpen - True if the dropdown is opened, and false if it is closed.\n -->\n <slot v-bind=\"{ isOpen, item }\" name=\"toggle\">{{ item }}</slot>\n </template>\n <template #item=\"{ item, isHighlighted, isSelected }\">\n <!--\n @slot (required) Used to render each one of the items content, and as fallback\n for the toggle button content slot if it is not provided.\n @binding {Sort} item - Sort to render\n @binding {boolean} isHighlighted - True when the item has the focus.\n @binding {boolean} isSelected - True when the item is selected.\n -->\n <slot v-bind=\"{ item, isHighlighted, isSelected }\" name=\"item\">{{ item }}</slot>\n </template>\n </BaseDropdown>\n</template>\n\n<script lang=\"ts\">\n import { Sort } from '@empathyco/x-types';\n import Vue, { defineComponent, PropType, ref, watch } from 'vue';\n\n import BaseDropdown from '../../../components/base-dropdown.vue';\n import { use$x } from '../../../composables/use-$x';\n import { useState } from '../../../composables/use-state';\n import { searchXModule } from '../x-module';\n\n /**\n * The `SortDropdown` component allows user to select the search results order. This component\n * also allows to change the selected sort programmatically.\n */\n export default defineComponent({\n name: 'SortDropdown',\n xModule: searchXModule.name,\n components: { BaseDropdown },\n props: {\n /** The list of possible sort values. */\n items: {\n type: Array as PropType<Sort[]>,\n required: true\n },\n /** The transition to use for opening and closing the dropdown. */\n animation: [String, Object] as PropType<string | typeof Vue>\n },\n emits: ['change'],\n setup(_, { emit }) {\n const $x = use$x();\n\n const { sort: selectedSort } = useState('search', ['sort']);\n const rootRef = ref<typeof BaseDropdown>();\n\n watch(selectedSort, (value: Sort) => $x.emit('SelectedSortProvided', value), {\n immediate: true\n });\n\n /**\n * Emits the events related to the selection of a sort value.\n *\n * @remarks `(rootRef.value as any)?.$el` because rollup-plugin-vue understands\n * `ref<typeof BaseDropdown>` as VueConstructor which doesn't contain $el.\n *\n * @param sort - The selected sort.\n */\n function emitUserClickedASort(sort: Sort) {\n $x.emit('UserClickedASort', sort, { target: (rootRef.value as any)?.$el });\n emit('change', sort);\n }\n\n return {\n emitUserClickedASort,\n rootRef,\n selectedSort\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Sort Dropdown\n\nThe `SortDropdown` component can be used to change the way the search results are ordered.\n\nTo do so, the list of valid sort values has to be provided using the `items` prop. These are the\nvalues that can be received then in the `SearchAdapter`.\n\nThe component also optionally accepts the selected sort, which can be set using the `value` prop.\nThis prop allows changing programmatically the selected sort, as it will be synced with the store\nimmediately. If this prop is not provided, the first item from the `items` prop will be the one\nselected by default.\n\nThis component also allows customizing both the toggle button and each one of the possible sort\nvalues. This can be done with the`toggle` and `item` slots.\n\n## Events\n\nThis component emits 2 different events:\n\n- [`SelectedSortProvided`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n To sync the selected sort with the store state value. This event is emitted as soon as the list of\n items is received, whenever this list changes if there is no provided value, and when the provided\n value changes.\n- [`UserClickedASort`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n As its name suggest, the event is emitted after the user clicks one of the sort options. This does\n not mean that the sort has changed, only that the user has clicked it.\n\n## Examples\n\n### Only providing the list of items\n\n```vue\n<template>\n <SortDropdown :items=\"sortValues\">\n <template #toggle=\"{ item, isOpen }\">{{ item }} {{ isOpen ? '🔼' : '🔽' }}</template>\n <template #item=\"{ item, isHighlighted, isSelected }\">\n <span v-if=\"isSelected\">✅</span>\n <span v-if=\"isHighlighted\">🟢</span>\n {{ item }}\n </template>\n </SortDropdown>\n</template>\n\n<script>\n import { SortDropdown } from '@empathyco/x-components/search';\n\n export default {\n components: {\n SortDropdown\n },\n data() {\n return { sortValues: ['Relevance', 'Price asc', 'Price desc'] };\n }\n };\n</script>\n```\n\n### Providing also the selected value\n\n```vue\n<template>\n <SortDropdown v-model=\"selectedSort\" :items=\"sortValues\">\n <template #toggle=\"{ item, isOpen }\">{{ item }} {{ isOpen ? '🔼' : '🔽' }}</template>\n <template #item=\"{ item, isHighlighted, isSelected }\">\n <span v-if=\"isSelected\">✅</span>\n <span v-if=\"isHighlighted\">🟢</span>\n {{ item }}\n </template>\n </SortDropdown>\n</template>\n\n<script>\n import { SortDropdown } from '@empathyco/x-components/search';\n\n export default {\n components: {\n SortDropdown\n },\n data() {\n return {\n selectedSort: 'Price asc',\n sortValues: ['Relevance', 'Price asc', 'Price desc']\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","emitUserClickedASort","selectedSort","animation","_withCtx","
|
|
1
|
+
{"version":3,"file":"sort-dropdown.vue.js","sources":["../../../../../src/x-modules/search/components/sort-dropdown.vue"],"sourcesContent":["<template>\n <BaseDropdown\n ref=\"rootRef\"\n @update:modelValue=\"emitUserClickedASort\"\n :items=\"items\"\n :modelValue=\"selectedSort\"\n :animation=\"animation\"\n class=\"x-sort-dropdown\"\n data-test=\"sort-dropdown\"\n aria-label=\"Select sorting\"\n >\n <template #toggle=\"{ isOpen, item }\">\n <!--\n @slot Used to render the contents of the dropdown toggle button. If not provided, it uses\n the item slot as fallback.\n @binding {Sort} item - The sort data to render.\n @binding {boolean} isOpen - True if the dropdown is opened, and false if it is closed.\n -->\n <slot v-bind=\"{ isOpen, item }\" name=\"toggle\">{{ item }}</slot>\n </template>\n <template #item=\"{ item, isHighlighted, isSelected }\">\n <!--\n @slot (required) Used to render each one of the items content, and as fallback\n for the toggle button content slot if it is not provided.\n @binding {Sort} item - Sort to render\n @binding {boolean} isHighlighted - True when the item has the focus.\n @binding {boolean} isSelected - True when the item is selected.\n -->\n <slot v-bind=\"{ item, isHighlighted, isSelected }\" name=\"item\">{{ item }}</slot>\n </template>\n </BaseDropdown>\n</template>\n\n<script lang=\"ts\">\n import { Sort } from '@empathyco/x-types';\n import Vue, { defineComponent, PropType, ref, watch } from 'vue';\n\n import BaseDropdown from '../../../components/base-dropdown.vue';\n import { use$x } from '../../../composables/use-$x';\n import { useState } from '../../../composables/use-state';\n import { searchXModule } from '../x-module';\n\n /**\n * The `SortDropdown` component allows user to select the search results order. This component\n * also allows to change the selected sort programmatically.\n */\n export default defineComponent({\n name: 'SortDropdown',\n xModule: searchXModule.name,\n components: { BaseDropdown },\n props: {\n /** The list of possible sort values. */\n items: {\n type: Array as PropType<Sort[]>,\n required: true\n },\n /** The transition to use for opening and closing the dropdown. */\n animation: [String, Object] as PropType<string | typeof Vue>\n },\n emits: ['change'],\n setup(_, { emit }) {\n const $x = use$x();\n\n const { sort: selectedSort } = useState('search', ['sort']);\n const rootRef = ref<typeof BaseDropdown>();\n\n watch(selectedSort, (value: Sort) => $x.emit('SelectedSortProvided', value), {\n immediate: true\n });\n\n /**\n * Emits the events related to the selection of a sort value.\n *\n * @remarks `(rootRef.value as any)?.$el` because rollup-plugin-vue understands\n * `ref<typeof BaseDropdown>` as VueConstructor which doesn't contain $el.\n *\n * @param sort - The selected sort.\n */\n function emitUserClickedASort(sort: Sort) {\n $x.emit('UserClickedASort', sort, { target: (rootRef.value as any)?.$el });\n emit('change', sort);\n }\n\n return {\n emitUserClickedASort,\n rootRef,\n selectedSort\n };\n }\n });\n</script>\n\n<docs lang=\"mdx\">\n## Sort Dropdown\n\nThe `SortDropdown` component can be used to change the way the search results are ordered.\n\nTo do so, the list of valid sort values has to be provided using the `items` prop. These are the\nvalues that can be received then in the `SearchAdapter`.\n\nThe component also optionally accepts the selected sort, which can be set using the `value` prop.\nThis prop allows changing programmatically the selected sort, as it will be synced with the store\nimmediately. If this prop is not provided, the first item from the `items` prop will be the one\nselected by default.\n\nThis component also allows customizing both the toggle button and each one of the possible sort\nvalues. This can be done with the`toggle` and `item` slots.\n\n## Events\n\nThis component emits 2 different events:\n\n- [`SelectedSortProvided`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n To sync the selected sort with the store state value. This event is emitted as soon as the list of\n items is received, whenever this list changes if there is no provided value, and when the provided\n value changes.\n- [`UserClickedASort`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n As its name suggest, the event is emitted after the user clicks one of the sort options. This does\n not mean that the sort has changed, only that the user has clicked it.\n\n## Examples\n\n### Only providing the list of items\n\n```vue\n<template>\n <SortDropdown :items=\"sortValues\">\n <template #toggle=\"{ item, isOpen }\">{{ item }} {{ isOpen ? '🔼' : '🔽' }}</template>\n <template #item=\"{ item, isHighlighted, isSelected }\">\n <span v-if=\"isSelected\">✅</span>\n <span v-if=\"isHighlighted\">🟢</span>\n {{ item }}\n </template>\n </SortDropdown>\n</template>\n\n<script>\n import { SortDropdown } from '@empathyco/x-components/search';\n\n export default {\n components: {\n SortDropdown\n },\n data() {\n return { sortValues: ['Relevance', 'Price asc', 'Price desc'] };\n }\n };\n</script>\n```\n\n### Providing also the selected value\n\n```vue\n<template>\n <SortDropdown v-model=\"selectedSort\" :items=\"sortValues\">\n <template #toggle=\"{ item, isOpen }\">{{ item }} {{ isOpen ? '🔼' : '🔽' }}</template>\n <template #item=\"{ item, isHighlighted, isSelected }\">\n <span v-if=\"isSelected\">✅</span>\n <span v-if=\"isHighlighted\">🟢</span>\n {{ item }}\n </template>\n </SortDropdown>\n</template>\n\n<script>\n import { SortDropdown } from '@empathyco/x-components/search';\n\n export default {\n components: {\n SortDropdown\n },\n data() {\n return {\n selectedSort: 'Price asc',\n sortValues: ['Relevance', 'Price asc', 'Price desc']\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["_resolveComponent","_openBlock","_createBlock","emitUserClickedASort","selectedSort","animation","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps"],"mappings":";;;;;kCACEA,gBA6Be,CAAA,cAAA,CAAA,CAAA;AA3BZ,EAAA,OAAAC,SAAA,EAAA,EAAAC,WAAA,CAAmBC,uBAAoB,EAAA;AAAA,IACvC,GAAK,EAAA,SAAA;AAAA,IACL,qBAAYC,EAAAA,IAAAA,CAAAA,oBAAAA;AAAAA,IACZ,KAAWC,EAAAA,IAAAA,CAAAA,KAAAA;AAAAA,IACZ,UAAM,EAAA,IAAA,CAAA,YAAA;AAAA,IACN,WAAS,IAAC,CAAA,SAAA;AAAA,IACV,KAAA,EAAA,iBAAA;AAAA,IAAA,WAAA,EAAA,eAAA;IAEW,YAAM,EAAA,gBAAA;AAAA,GAAA,EAAA;YAXrBC,OAkBuD,CAAA,CAAA,EAAA,MAAA,EAAA,IAAA,EAAA,KAAA;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,QAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA,MAAA;;;;;;AAExC,OAAA,CAAA;AAAA,KAAA,CAAA;AApBf,IAAA,IAAA,EAAAH,OAAA,CAAA,CAAA,EAAA,IAAA,EAAA,aAAA,EA4BwE,UAAI,EAAA,KAAA;AAAA,MAAAC,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,MAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,EAAA,IAAA,EAAA,aAAA,EAAA,UAAA,EAAA,CAAA,CAAA,EAAA,MAAA;;;;;;AA5B5E,OAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;;;"}
|
|
@@ -24,13 +24,20 @@ const { fetchAndSave, cancelPrevious } = createFetchAndSaveActions({
|
|
|
24
24
|
*/
|
|
25
25
|
function enrichRequest(request, state) {
|
|
26
26
|
const { page, ...restRequest } = request;
|
|
27
|
-
const { config: { pageSize }, origin, results } = state;
|
|
28
|
-
|
|
27
|
+
const { config: { pageSize, pageMode }, origin, results } = state;
|
|
28
|
+
let start;
|
|
29
|
+
if (pageMode === 'infinite_scroll') {
|
|
30
|
+
start = page === 1 ? 0 : results.length;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
start = state.config.pageSize * (page - 1);
|
|
34
|
+
}
|
|
35
|
+
const rows = pageMode === 'infinite_scroll' ? pageSize * page - start : pageSize;
|
|
29
36
|
return {
|
|
30
37
|
...restRequest,
|
|
31
38
|
...(origin && { origin }),
|
|
32
39
|
start,
|
|
33
|
-
rows
|
|
40
|
+
rows
|
|
34
41
|
};
|
|
35
42
|
}
|
|
36
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-search-response.action.js","sources":["../../../../../../src/x-modules/search/store/actions/fetch-and-save-search-response.action.ts"],"sourcesContent":["import { SearchRequest, SearchResponse } from '@empathyco/x-types';\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils';\nimport { InternalSearchRequest } from '../../types';\nimport { SearchActionContext, SearchState } from '../types';\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n SearchActionContext,\n InternalSearchRequest | null,\n SearchResponse | null\n>({\n fetch({ dispatch, state }, request) {\n return request\n ? dispatch('fetchSearchResponse', enrichRequest(request, state))\n : Promise.resolve(null);\n },\n onSuccess({ dispatch }, response) {\n if (response !== null) {\n dispatch('saveSearchResponse', response);\n }\n }\n});\n\n/**\n * Enriches the {@link SearchRequest} object with the origin and page properties taken from the\n * {@link SearchState | search state}.\n *\n * @param request - The {@link InternalSearchRequest}.\n * @param state - {@link SearchState}.\n *\n * @returns The search request.\n * @internal\n */\nfunction enrichRequest(request: InternalSearchRequest, state: SearchState): SearchRequest {\n const { page, ...restRequest } = request;\n const {\n config: { pageSize },\n origin,\n results\n } = state;\n
|
|
1
|
+
{"version":3,"file":"fetch-and-save-search-response.action.js","sources":["../../../../../../src/x-modules/search/store/actions/fetch-and-save-search-response.action.ts"],"sourcesContent":["import { SearchRequest, SearchResponse } from '@empathyco/x-types';\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils';\nimport { InternalSearchRequest } from '../../types';\nimport { SearchActionContext, SearchState } from '../types';\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n SearchActionContext,\n InternalSearchRequest | null,\n SearchResponse | null\n>({\n fetch({ dispatch, state }, request) {\n return request\n ? dispatch('fetchSearchResponse', enrichRequest(request, state))\n : Promise.resolve(null);\n },\n onSuccess({ dispatch }, response) {\n if (response !== null) {\n dispatch('saveSearchResponse', response);\n }\n }\n});\n\n/**\n * Enriches the {@link SearchRequest} object with the origin and page properties taken from the\n * {@link SearchState | search state}.\n *\n * @param request - The {@link InternalSearchRequest}.\n * @param state - {@link SearchState}.\n *\n * @returns The search request.\n * @internal\n */\nfunction enrichRequest(request: InternalSearchRequest, state: SearchState): SearchRequest {\n const { page, ...restRequest } = request;\n const {\n config: { pageSize, pageMode },\n origin,\n results\n } = state;\n\n let start;\n if (pageMode === 'infinite_scroll') {\n start = page === 1 ? 0 : results.length;\n } else {\n start = state.config.pageSize * (page - 1);\n }\n\n const rows = pageMode === 'infinite_scroll' ? pageSize * page - start : pageSize;\n\n return {\n ...restRequest,\n ...(origin && { origin }),\n start,\n rows\n };\n}\n\n/**\n * Default implementation for {@link SearchActions.fetchAndSaveSearchResponse} action.\n *\n * @public\n */\nexport const fetchAndSaveSearchResponse = fetchAndSave;\n\n/**\n * Default implementation for {@link SearchActions.cancelFetchAndSaveSearchResponse} action.\n *\n * @public\n */\nexport const cancelFetchAndSaveSearchResponse = cancelPrevious;\n"],"names":[],"mappings":";;AAKA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;AACA,IAAA,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAA;AAChC,QAAA,OAAO,OAAO;cACV,QAAQ,CAAC,qBAAqB,EAAE,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAChE,cAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KAC3B;AACD,IAAA,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAA;QAC9B,IAAI,QAAQ,KAAK,IAAI,EAAE;AACrB,YAAA,QAAQ,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AAC1C,SAAA;KACF;AACF,CAAA,CAAC,CAAC;AAEH;;;;;;;;;AASG;AACH,SAAS,aAAa,CAAC,OAA8B,EAAE,KAAkB,EAAA;IACvE,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC;AACzC,IAAA,MAAM,EACJ,MAAM,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAC9B,MAAM,EACN,OAAO,EACR,GAAG,KAAK,CAAC;AAEV,IAAA,IAAI,KAAK,CAAC;IACV,IAAI,QAAQ,KAAK,iBAAiB,EAAE;AAClC,QAAA,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;AACzC,KAAA;AAAM,SAAA;AACL,QAAA,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC;AAC5C,KAAA;AAED,IAAA,MAAM,IAAI,GAAG,QAAQ,KAAK,iBAAiB,GAAG,QAAQ,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAC;IAEjF,OAAO;AACL,QAAA,GAAG,WAAW;AACd,QAAA,IAAI,MAAM,IAAI,EAAE,MAAM,EAAE;QACxB,KAAK;QACL,IAAI;KACL,CAAC;AACJ,CAAC;AAED;;;;AAIG;AACI,MAAM,0BAA0B,GAAG,aAAa;AAEvD;;;;AAIG;AACI,MAAM,gCAAgC,GAAG;;;;"}
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
|
-
const saveSearchResponse = ({ commit, state, getters }, { results, partialResults, facets, banners, promoteds, totalResults, spellcheck, redirections, queryTagging, displayTagging }) => {
|
|
10
|
+
const saveSearchResponse = ({ commit, state, getters }, { results, partialResults, facets, banners, promoteds, totalResults, spellcheck, redirections, queryTagging, displayTagging, stats }) => {
|
|
11
11
|
if (totalResults === 0) {
|
|
12
12
|
commit('setIsNoResults', true);
|
|
13
13
|
if (getters.request && Object.keys(getters.request.filters).length > 0) {
|
|
14
|
+
commit('setSelectedFilters', []);
|
|
14
15
|
commit('setFromNoResultsWithFilters', true);
|
|
15
16
|
}
|
|
16
17
|
}
|
|
@@ -38,6 +39,7 @@ const saveSearchResponse = ({ commit, state, getters }, { results, partialResult
|
|
|
38
39
|
}
|
|
39
40
|
commit('setTotalResults', totalResults);
|
|
40
41
|
commit('setSpellcheck', spellcheck ?? '');
|
|
42
|
+
commit('setStats', stats);
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
export { saveSearchResponse };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-search-response.action.js","sources":["../../../../../../src/x-modules/search/store/actions/save-search-response.action.ts"],"sourcesContent":["import { SearchXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link SearchActions.saveSearchResponse}.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param response - The {@link @empathyco/x-types#SearchResponse} to save.\n *\n * @public\n */\nexport const saveSearchResponse: SearchXStoreModule['actions']['saveSearchResponse'] = (\n { commit, state, getters },\n {\n results,\n partialResults,\n facets,\n banners,\n promoteds,\n totalResults,\n spellcheck,\n redirections,\n queryTagging,\n displayTagging\n }\n) => {\n if (totalResults === 0) {\n commit('setIsNoResults', true);\n if (getters.request && Object.keys(getters.request.filters!).length > 0) {\n commit('setFromNoResultsWithFilters', true);\n }\n } else {\n commit('setIsNoResults', false);\n }\n\n if (state.isAppendResults) {\n commit('appendResults', results);\n } else {\n commit('setResults', results);\n commit('setBanners', banners ?? []);\n commit('setPromoteds', promoteds ?? []);\n commit('setRedirections', redirections ?? []);\n }\n\n commit('setPartialResults', partialResults ?? []);\n\n if (facets) {\n commit('setFacets', facets);\n }\n\n if (queryTagging) {\n commit('setQueryTagging', queryTagging);\n }\n\n if (displayTagging) {\n commit('setDisplayTagging', displayTagging);\n }\n\n commit('setTotalResults', totalResults);\n commit('setSpellcheck', spellcheck ?? '');\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"save-search-response.action.js","sources":["../../../../../../src/x-modules/search/store/actions/save-search-response.action.ts"],"sourcesContent":["import { Stats } from '@empathyco/x-types';\nimport { SearchXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link SearchActions.saveSearchResponse}.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param response - The {@link @empathyco/x-types#SearchResponse} to save.\n *\n * @public\n */\nexport const saveSearchResponse: SearchXStoreModule['actions']['saveSearchResponse'] = (\n { commit, state, getters },\n {\n results,\n partialResults,\n facets,\n banners,\n promoteds,\n totalResults,\n spellcheck,\n redirections,\n queryTagging,\n displayTagging,\n stats\n }\n) => {\n if (totalResults === 0) {\n commit('setIsNoResults', true);\n if (getters.request && Object.keys(getters.request.filters!).length > 0) {\n commit('setSelectedFilters', []);\n commit('setFromNoResultsWithFilters', true);\n }\n } else {\n commit('setIsNoResults', false);\n }\n\n if (state.isAppendResults) {\n commit('appendResults', results);\n } else {\n commit('setResults', results);\n commit('setBanners', banners ?? []);\n commit('setPromoteds', promoteds ?? []);\n commit('setRedirections', redirections ?? []);\n }\n\n commit('setPartialResults', partialResults ?? []);\n\n if (facets) {\n commit('setFacets', facets);\n }\n\n if (queryTagging) {\n commit('setQueryTagging', queryTagging);\n }\n\n if (displayTagging) {\n commit('setDisplayTagging', displayTagging);\n }\n\n commit('setTotalResults', totalResults);\n commit('setSpellcheck', spellcheck ?? '');\n commit('setStats', stats as Stats);\n};\n"],"names":[],"mappings":"AAGA;;;;;;;;AAQG;AACU,MAAA,kBAAkB,GAAwD,CACrF,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAC1B,EACE,OAAO,EACP,cAAc,EACd,MAAM,EACN,OAAO,EACP,SAAS,EACT,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,KAAK,EACN,KACC;IACF,IAAI,YAAY,KAAK,CAAC,EAAE;AACtB,QAAA,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AAC/B,QAAA,IAAI,OAAO,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;AACvE,YAAA,MAAM,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AACjC,YAAA,MAAM,CAAC,6BAA6B,EAAE,IAAI,CAAC,CAAC;AAC7C,SAAA;AACF,KAAA;AAAM,SAAA;AACL,QAAA,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;AACjC,KAAA;IAED,IAAI,KAAK,CAAC,eAAe,EAAE;AACzB,QAAA,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAClC,KAAA;AAAM,SAAA;AACL,QAAA,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAC9B,QAAA,MAAM,CAAC,YAAY,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;AACpC,QAAA,MAAM,CAAC,cAAc,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;AACxC,QAAA,MAAM,CAAC,iBAAiB,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC;AAC/C,KAAA;AAED,IAAA,MAAM,CAAC,mBAAmB,EAAE,cAAc,IAAI,EAAE,CAAC,CAAC;AAElD,IAAA,IAAI,MAAM,EAAE;AACV,QAAA,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAC7B,KAAA;AAED,IAAA,IAAI,YAAY,EAAE;AAChB,QAAA,MAAM,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;AACzC,KAAA;AAED,IAAA,IAAI,cAAc,EAAE;AAClB,QAAA,MAAM,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;AAC7C,KAAA;AAED,IAAA,MAAM,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;AACxC,IAAA,MAAM,CAAC,eAAe,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC;AAC1C,IAAA,MAAM,CAAC,UAAU,EAAE,KAAc,CAAC,CAAC;AACrC;;;;"}
|